Merge pull request #191538 from lorenz/rock64-uboot-improvements

u-boot: ROCK64 RAM init improvements

authored by Silvan Mosberger and committed by GitHub 1fb12391 6909e461

+20 -24
-1
pkgs/misc/arm-trusted-firmware/default.nix
··· 141 platform = "rk3328"; 142 extraMeta.platforms = ["aarch64-linux"]; 143 filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"]; 144 - platformCanUseHDCPBlob = true; 145 }; 146 147 armTrustedFirmwareRK3399 = buildArmTrustedFirmware rec {
··· 141 platform = "rk3328"; 142 extraMeta.platforms = ["aarch64-linux"]; 143 filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"]; 144 }; 145 146 armTrustedFirmwareRK3399 = buildArmTrustedFirmware rec {
+19 -23
pkgs/misc/uboot/default.nix
··· 497 filesToInstall = ["u-boot.bin"]; 498 }; 499 500 - ubootRock64 = let 501 - rkbin = fetchFromGitHub { 502 - owner = "ayufan-rock64"; 503 - repo = "rkbin"; 504 - rev = "f79a708978232a2b6b06c2e4173c5314559e0d3a"; 505 - sha256 = "0h7xm4ck3p3380c6bqm5ixrkxwcx6z5vysqdwvfa7gcqx5d6x5zz"; 506 - }; 507 - in buildUBoot { 508 defconfig = "rock64-rk3328_defconfig"; 509 - extraMeta = { 510 - platforms = [ "aarch64-linux" ]; 511 - license = lib.licenses.unfreeRedistributableFirmware; 512 - }; 513 BL31="${armTrustedFirmwareRK3328}/bl31.elf"; 514 - filesToInstall = [ "u-boot.itb" "idbloader.img"]; 515 - # Derive MAC address from cpuid 516 - # Submitted upstream: https://patchwork.ozlabs.org/patch/1203686/ 517 - extraConfig = '' 518 - CONFIG_MISC_INIT_R=y 519 - ''; 520 - # Close to being blob free, but the U-Boot TPL causes random memory 521 - # corruption 522 - postBuild = '' 523 - ./tools/mkimage -n rk3328 -T rksd -d ${rkbin}/rk33/rk3328_ddr_786MHz_v1.13.bin idbloader.img 524 - cat spl/u-boot-spl.bin >> idbloader.img 525 ''; 526 }; 527 528 ubootRockPro64 = buildUBoot {
··· 497 filesToInstall = ["u-boot.bin"]; 498 }; 499 500 + ubootRock64 = buildUBoot { 501 defconfig = "rock64-rk3328_defconfig"; 502 + extraMeta.platforms = [ "aarch64-linux" ]; 503 BL31="${armTrustedFirmwareRK3328}/bl31.elf"; 504 + filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" ]; 505 + }; 506 + 507 + # A special build with much lower memory frequency (666 vs 1600 MT/s) which 508 + # makes ROCK64 V2 boards stable. This is necessary because the DDR3 routing 509 + # on that revision is marginal and not uncoditionally stable at the specified 510 + # frequency. If your ROCK64 is unstable you can try this u-boot variant to 511 + # see if it works better for you. The only disadvantage is lowered memory 512 + # bandwidth. 513 + ubootRock64v2 = buildUBoot { 514 + prePatch = '' 515 + substituteInPlace arch/arm/dts/rk3328-rock64-u-boot.dtsi \ 516 + --replace rk3328-sdram-lpddr3-1600.dtsi rk3328-sdram-lpddr3-666.dtsi 517 ''; 518 + defconfig = "rock64-rk3328_defconfig"; 519 + extraMeta.platforms = [ "aarch64-linux" ]; 520 + BL31="${armTrustedFirmwareRK3328}/bl31.elf"; 521 + filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" ]; 522 }; 523 524 ubootRockPro64 = buildUBoot {
+1
pkgs/top-level/all-packages.nix
··· 28876 ubootRaspberryPi4_64bit 28877 ubootRaspberryPiZero 28878 ubootRock64 28879 ubootRockPi4 28880 ubootRockPro64 28881 ubootROCPCRK3399
··· 28876 ubootRaspberryPi4_64bit 28877 ubootRaspberryPiZero 28878 ubootRock64 28879 + ubootRock64v2 28880 ubootRockPi4 28881 ubootRockPro64 28882 ubootROCPCRK3399