Merge pull request #265411 from K900/fix-all-the-uboots

uboot: a whole bunch of build fixes

K900 32ea236e 105676cb

Changed files
+26 -11
pkgs
misc
uboot
+26 -11
pkgs/misc/uboot/default.nix
···
url = "https://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
hash = "sha256-a2pIWBwUq7D5W9h8GvTXQJIkBte4AQAqn5Ryf93gIdU=";
};
buildUBoot = lib.makeOverridable ({
version ? null
, src ? null
···
, extraPatches ? []
, extraMakeFlags ? []
, extraMeta ? {}
, ... } @ args: stdenv.mkDerivation ({
pname = "uboot-${defconfig}";
···
postPatch = ''
patchShebangs tools
-
patchShebangs arch/arm/mach-rockchip
'';
nativeBuildInputs = [
···
]))
swig
which # for scripts/dtc-version.sh
-
];
depsBuildBuild = [ buildPackages.stdenv.cc ];
-
-
buildInputs = [
-
ncurses # tools/kwboot
-
libuuid # tools/mkeficapsule
-
gnutls # tools/mkeficapsule
-
openssl # tools
-
];
hardeningDisable = [ "all" ];
···
hardeningDisable = [];
dontStrip = false;
extraMeta.platforms = lib.platforms.linux;
-
extraMakeFlags = [ "HOST_TOOLS_ALL=y" "CROSS_BUILD_TOOLS=1" "NO_SDL=1" "tools" ];
outputs = [ "out" "man" ];
···
defconfig = "bananapi_m64_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
ubootClearfog = buildUBoot {
defconfig = "clearfog_defconfig";
extraMeta.platforms = ["armv7l-linux"];
-
filesToInstall = ["u-boot-spl.kwb"];
};
ubootCubieboard2 = buildUBoot {
···
defconfig = "a64-olinuxino-emmc_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "orangepi_zero_plus2_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "orangepi_3_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinnerH6}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "pine64_plus_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "pine64-lts_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "pinebook_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "sopine_baseboard_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
url = "https://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
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 ({
version ? null
, src ? null
···
, extraPatches ? []
, extraMakeFlags ? []
, extraMeta ? {}
+
, crossTools ? false
, ... } @ args: stdenv.mkDerivation ({
pname = "uboot-${defconfig}";
···
postPatch = ''
patchShebangs tools
+
patchShebangs scripts
'';
nativeBuildInputs = [
···
]))
swig
which # for scripts/dtc-version.sh
+
] ++ lib.optionals (!crossTools) toolsDeps;
depsBuildBuild = [ buildPackages.stdenv.cc ];
+
buildInputs = lib.optionals crossTools toolsDeps;
hardeningDisable = [ "all" ];
···
hardeningDisable = [];
dontStrip = false;
extraMeta.platforms = lib.platforms.linux;
+
+
crossTools = true;
+
extraMakeFlags = [ "HOST_TOOLS_ALL=y" "NO_SDL=1" "cross_tools" ];
outputs = [ "out" "man" ];
···
defconfig = "bananapi_m64_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+
SCP = "/dev/null";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
ubootClearfog = buildUBoot {
defconfig = "clearfog_defconfig";
extraMeta.platforms = ["armv7l-linux"];
+
filesToInstall = ["u-boot-with-spl.kwb"];
};
ubootCubieboard2 = buildUBoot {
···
defconfig = "a64-olinuxino-emmc_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+
SCP = "/dev/null";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "orangepi_zero_plus2_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+
SCP = "/dev/null";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "orangepi_3_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinnerH6}/bl31.bin";
+
SCP = "/dev/null";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "pine64_plus_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+
SCP = "/dev/null";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "pine64-lts_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+
SCP = "/dev/null";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "pinebook_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+
SCP = "/dev/null";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};
···
defconfig = "sopine_baseboard_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+
SCP = "/dev/null";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};