uboot: simplify ubootNanoPCT4 build
This commit is contained in:
parent
c21fee9d2f
commit
c3da6f908d
@ -1,6 +1,5 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
, callPackage
|
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
@ -180,31 +179,24 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ubootNanoPCT4 = buildUBoot rec {
|
ubootNanoPCT4 = buildUBoot rec {
|
||||||
# vanilla u-boot does not work with the nanopc-t4
|
rkbin = fetchFromGitHub {
|
||||||
# so we use this repo with the required patches applied
|
owner = "armbian";
|
||||||
src = fetchFromGitHub {
|
repo = "rkbin";
|
||||||
owner = "tmountain";
|
rev = "3bd0321cae5ef881a6005fb470009ad5a5d1462d";
|
||||||
repo = "u-boot-nanopct4";
|
sha256 = "09r4dzxsbs3pff4sh70qnyp30s3rc7pkc46v1m3152s7jqjasp31";
|
||||||
rev = "23f6f74ec3ba53263ed97ec3cac9979b0ad998bc";
|
|
||||||
sha256 = "07b3gcizkswld796l502bj6ln0hwz7wcm2rp3knpjmmha5llb5dz";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
version = "2020.10";
|
|
||||||
# this provides wrapped rkbin binaries that are patched to work with NixOS
|
|
||||||
rkbin = callPackage "${src}/rkbin" {};
|
|
||||||
|
|
||||||
defconfig = "nanopc-t4-rk3399_defconfig";
|
defconfig = "nanopc-t4-rk3399_defconfig";
|
||||||
|
|
||||||
extraMeta = {
|
extraMeta = {
|
||||||
platforms = [ "aarch64-linux" ];
|
platforms = [ "aarch64-linux" ];
|
||||||
license = lib.licenses.unfreeRedistributableFirmware;
|
license = lib.licenses.unfreeRedistributableFirmware;
|
||||||
};
|
};
|
||||||
filesToInstall = [ "idbloader.bin" "uboot.img" "trust.bin" ];
|
BL31="${armTrustedFirmwareRK3328}/bl31.elf";
|
||||||
|
filesToInstall = [ "u-boot.itb" "idbloader.img"];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
./tools/mkimage -n rk3399 -T rksd -d ${rkbin}/share/rkbin/rk33/rk3399_ddr_800MHz_v1.24.bin idbloader.bin
|
./tools/mkimage -n rk3399 -T rksd -d ${rkbin}/rk33/rk3399_ddr_800MHz_v1.24.bin idbloader.img
|
||||||
cat ${rkbin}/share/rkbin/rk33/rk3399_miniloader_v1.19.bin >> idbloader.bin
|
cat ${rkbin}/rk33/rk3399_miniloader_v1.19.bin >> idbloader.img
|
||||||
${rkbin}/bin/trust_merger --replace bl31.elf ${rkbin}/share/rkbin/rk33/rk3399_bl31_v1.30.elf trust.ini
|
|
||||||
${rkbin}/bin/loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user