mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-20 09:59:42 +01:00
Remove buildUBoot function from U-Boot build
The buildUBoot function is intended for internal use and is dedicated for Raspberry Pi platforms. With latest nixpkgs it is causing build failure in older uboot(prior to v2023.07) due to a Raspberry Pi patch. Now this function is not used for the U-Boot build. More Information: https://github.com/NixOS/nixpkgs/pull/311614 https://github.com/NixOS/nixpkgs/pull/146634 Signed-off-by: Ganga Ram <Ganga.Ram@tii.ae>
This commit is contained in:
parent
a4e2b7909f
commit
772de835d5
2 changed files with 142 additions and 44 deletions
|
@ -1,19 +1,57 @@
|
||||||
{pkgs}:
|
{ stdenv
|
||||||
with pkgs; let
|
, lib
|
||||||
inherit buildUBoot;
|
, bison
|
||||||
in
|
, dtc
|
||||||
(buildUBoot {
|
, fetchgit
|
||||||
pname = "imx8mp-uboot";
|
, flex
|
||||||
version = "2023.04";
|
, gnutls
|
||||||
|
, libuuid
|
||||||
src = fetchgit {
|
, ncurses
|
||||||
|
, openssl
|
||||||
|
, which
|
||||||
|
, perl
|
||||||
|
, buildPackages
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
ubsrc = fetchgit {
|
||||||
url = "https://github.com/nxp-imx/uboot-imx.git";
|
url = "https://github.com/nxp-imx/uboot-imx.git";
|
||||||
# tag: "lf-6.1.55-2.2.0"
|
# tag: "lf-6.1.55-2.2.0"
|
||||||
rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f";
|
rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f";
|
||||||
sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA=";
|
sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA=";
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
(stdenv.mkDerivation {
|
||||||
|
pname = "imx8mp-uboot";
|
||||||
|
version = "2023.04";
|
||||||
|
src = ubsrc;
|
||||||
|
|
||||||
extraConfig = ''
|
postPatch = ''
|
||||||
|
patchShebangs tools
|
||||||
|
patchShebangs scripts
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
bison
|
||||||
|
flex
|
||||||
|
openssl
|
||||||
|
which
|
||||||
|
ncurses
|
||||||
|
libuuid
|
||||||
|
gnutls
|
||||||
|
openssl
|
||||||
|
perl
|
||||||
|
];
|
||||||
|
|
||||||
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
|
hardeningDisable = [ "all" ];
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"DTC=${lib.getExe buildPackages.dtc}"
|
||||||
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
CONFIG_USE_BOOTCOMMAND=y
|
CONFIG_USE_BOOTCOMMAND=y
|
||||||
CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; "
|
CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; "
|
||||||
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
||||||
|
@ -25,17 +63,28 @@ in
|
||||||
CONFIG_CMD_CACHE=y
|
CONFIG_CMD_CACHE=y
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
passAsFile = [ "extraConfig" ];
|
||||||
defconfig = "imx8mp_evk_defconfig";
|
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
|
||||||
|
|
||||||
filesToInstall = [
|
configurePhase = ''
|
||||||
"./u-boot-nodtb.bin"
|
runHook preConfigure
|
||||||
"./spl/u-boot-spl.bin"
|
|
||||||
"./arch/arm/dts/imx8mp-evk.dtb"
|
make imx8mp_evk_defconfig
|
||||||
".config"
|
cat $extraConfigPath >> .config
|
||||||
];
|
|
||||||
})
|
runHook postConfigure
|
||||||
.overrideAttrs (old: {
|
'';
|
||||||
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.perl];
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out
|
||||||
|
cp ./u-boot-nodtb.bin $out
|
||||||
|
cp ./spl/u-boot-spl.bin $out
|
||||||
|
cp ./arch/arm/dts/imx8mp-evk.dtb $out
|
||||||
|
cp .config $out
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontStrip = true;
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,19 +1,57 @@
|
||||||
{pkgs}:
|
{ stdenv
|
||||||
with pkgs; let
|
, lib
|
||||||
inherit buildUBoot;
|
, bison
|
||||||
in
|
, dtc
|
||||||
(buildUBoot {
|
, fetchgit
|
||||||
pname = "imx8mq-uboot";
|
, flex
|
||||||
version = "2023.04";
|
, gnutls
|
||||||
|
, libuuid
|
||||||
src = fetchgit {
|
, ncurses
|
||||||
|
, openssl
|
||||||
|
, which
|
||||||
|
, perl
|
||||||
|
, buildPackages
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
ubsrc = fetchgit {
|
||||||
url = "https://github.com/nxp-imx/uboot-imx.git";
|
url = "https://github.com/nxp-imx/uboot-imx.git";
|
||||||
# tag: "lf-6.1.55-2.2.0"
|
# tag: "lf-6.1.55-2.2.0"
|
||||||
rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f";
|
rev = "49b102d98881fc28af6e0a8af5ea2186c1d90a5f";
|
||||||
sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA=";
|
sha256 = "sha256-1j6X82DqezEizeWoSS600XKPNwrQ4yT0vZuUImKAVVA=";
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
(stdenv.mkDerivation {
|
||||||
|
pname = "imx8mq-uboot";
|
||||||
|
version = "2023.04";
|
||||||
|
src = ubsrc;
|
||||||
|
|
||||||
extraConfig = ''
|
postPatch = ''
|
||||||
|
patchShebangs tools
|
||||||
|
patchShebangs scripts
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
bison
|
||||||
|
flex
|
||||||
|
openssl
|
||||||
|
which
|
||||||
|
ncurses
|
||||||
|
libuuid
|
||||||
|
gnutls
|
||||||
|
openssl
|
||||||
|
perl
|
||||||
|
];
|
||||||
|
|
||||||
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
|
hardeningDisable = [ "all" ];
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"DTC=${lib.getExe buildPackages.dtc}"
|
||||||
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
CONFIG_USE_BOOTCOMMAND=y
|
CONFIG_USE_BOOTCOMMAND=y
|
||||||
CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; "
|
CONFIG_BOOTCOMMAND="setenv ramdisk_addr_r 0x45000000; setenv fdt_addr_r 0x44000000; run distro_bootcmd; "
|
||||||
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
CONFIG_CMD_BOOTEFI_SELFTEST=y
|
||||||
|
@ -25,17 +63,28 @@ in
|
||||||
CONFIG_CMD_CACHE=y
|
CONFIG_CMD_CACHE=y
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
passAsFile = [ "extraConfig" ];
|
||||||
defconfig = "imx8mq_evk_defconfig";
|
|
||||||
extraMeta.platforms = ["aarch64-linux"];
|
|
||||||
|
|
||||||
filesToInstall = [
|
configurePhase = ''
|
||||||
"./u-boot-nodtb.bin"
|
runHook preConfigure
|
||||||
"./spl/u-boot-spl.bin"
|
|
||||||
"./arch/arm/dts/imx8mq-evk.dtb"
|
make imx8mq_evk_defconfig
|
||||||
".config"
|
cat $extraConfigPath >> .config
|
||||||
];
|
|
||||||
})
|
runHook postConfigure
|
||||||
.overrideAttrs (old: {
|
'';
|
||||||
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.perl];
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out
|
||||||
|
cp ./u-boot-nodtb.bin $out
|
||||||
|
cp ./spl/u-boot-spl.bin $out
|
||||||
|
cp ./arch/arm/dts/imx8mq-evk.dtb $out
|
||||||
|
cp .config $out
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontStrip = true;
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue