Merge pull request #265411 from K900/fix-all-the-uboots
uboot: a whole bunch of build fixes
This commit is contained in:
commit
32ea236e59
@ -30,6 +30,16 @@ let
|
|||||||
url = "https://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
|
url = "https://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
|
||||||
hash = "sha256-a2pIWBwUq7D5W9h8GvTXQJIkBte4AQAqn5Ryf93gIdU=";
|
hash = "sha256-a2pIWBwUq7D5W9h8GvTXQJIkBte4AQAqn5Ryf93gIdU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Dependencies for the tools need to be included as either native or cross,
|
||||||
|
# depending on which we're building
|
||||||
|
toolsDeps = [
|
||||||
|
ncurses # tools/kwboot
|
||||||
|
libuuid # tools/mkeficapsule
|
||||||
|
gnutls # tools/mkeficapsule
|
||||||
|
openssl # tools/mkimage
|
||||||
|
];
|
||||||
|
|
||||||
buildUBoot = lib.makeOverridable ({
|
buildUBoot = lib.makeOverridable ({
|
||||||
version ? null
|
version ? null
|
||||||
, src ? null
|
, src ? null
|
||||||
@ -40,6 +50,7 @@ let
|
|||||||
, extraPatches ? []
|
, extraPatches ? []
|
||||||
, extraMakeFlags ? []
|
, extraMakeFlags ? []
|
||||||
, extraMeta ? {}
|
, extraMeta ? {}
|
||||||
|
, crossTools ? false
|
||||||
, ... } @ args: stdenv.mkDerivation ({
|
, ... } @ args: stdenv.mkDerivation ({
|
||||||
pname = "uboot-${defconfig}";
|
pname = "uboot-${defconfig}";
|
||||||
|
|
||||||
@ -53,7 +64,7 @@ let
|
|||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs tools
|
patchShebangs tools
|
||||||
patchShebangs arch/arm/mach-rockchip
|
patchShebangs scripts
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -70,15 +81,9 @@ let
|
|||||||
]))
|
]))
|
||||||
swig
|
swig
|
||||||
which # for scripts/dtc-version.sh
|
which # for scripts/dtc-version.sh
|
||||||
];
|
] ++ lib.optionals (!crossTools) toolsDeps;
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
|
buildInputs = lib.optionals crossTools toolsDeps;
|
||||||
buildInputs = [
|
|
||||||
ncurses # tools/kwboot
|
|
||||||
libuuid # tools/mkeficapsule
|
|
||||||
gnutls # tools/mkeficapsule
|
|
||||||
openssl # tools
|
|
||||||
];
|
|
||||||
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
|
|
||||||
@ -133,7 +138,9 @@ in {
|
|||||||
hardeningDisable = [];
|
hardeningDisable = [];
|
||||||
dontStrip = false;
|
dontStrip = false;
|
||||||
extraMeta.platforms = lib.platforms.linux;
|
extraMeta.platforms = lib.platforms.linux;
|
||||||
extraMakeFlags = [ "HOST_TOOLS_ALL=y" "CROSS_BUILD_TOOLS=1" "NO_SDL=1" "tools" ];
|
|
||||||
|
crossTools = true;
|
||||||
|
extraMakeFlags = [ "HOST_TOOLS_ALL=y" "NO_SDL=1" "cross_tools" ];
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
@ -183,6 +190,7 @@ in {
|
|||||||
defconfig = "bananapi_m64_defconfig";
|
defconfig = "bananapi_m64_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
||||||
|
SCP = "/dev/null";
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -190,7 +198,7 @@ in {
|
|||||||
ubootClearfog = buildUBoot {
|
ubootClearfog = buildUBoot {
|
||||||
defconfig = "clearfog_defconfig";
|
defconfig = "clearfog_defconfig";
|
||||||
extraMeta.platforms = ["armv7l-linux"];
|
extraMeta.platforms = ["armv7l-linux"];
|
||||||
filesToInstall = ["u-boot-spl.kwb"];
|
filesToInstall = ["u-boot-with-spl.kwb"];
|
||||||
};
|
};
|
||||||
|
|
||||||
ubootCubieboard2 = buildUBoot {
|
ubootCubieboard2 = buildUBoot {
|
||||||
@ -341,6 +349,7 @@ in {
|
|||||||
defconfig = "a64-olinuxino-emmc_defconfig";
|
defconfig = "a64-olinuxino-emmc_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
||||||
|
SCP = "/dev/null";
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -354,6 +363,7 @@ in {
|
|||||||
defconfig = "orangepi_zero_plus2_defconfig";
|
defconfig = "orangepi_zero_plus2_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
||||||
|
SCP = "/dev/null";
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -374,6 +384,7 @@ in {
|
|||||||
defconfig = "orangepi_3_defconfig";
|
defconfig = "orangepi_3_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
BL31 = "${armTrustedFirmwareAllwinnerH6}/bl31.bin";
|
BL31 = "${armTrustedFirmwareAllwinnerH6}/bl31.bin";
|
||||||
|
SCP = "/dev/null";
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -387,6 +398,7 @@ in {
|
|||||||
defconfig = "pine64_plus_defconfig";
|
defconfig = "pine64_plus_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
||||||
|
SCP = "/dev/null";
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -394,6 +406,7 @@ in {
|
|||||||
defconfig = "pine64-lts_defconfig";
|
defconfig = "pine64-lts_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
||||||
|
SCP = "/dev/null";
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -401,6 +414,7 @@ in {
|
|||||||
defconfig = "pinebook_defconfig";
|
defconfig = "pinebook_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
||||||
|
SCP = "/dev/null";
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -542,6 +556,7 @@ in {
|
|||||||
defconfig = "sopine_baseboard_defconfig";
|
defconfig = "sopine_baseboard_defconfig";
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
extraMeta.platforms = ["aarch64-linux"];
|
||||||
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
|
||||||
|
SCP = "/dev/null";
|
||||||
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user