uboot: rock64: use binary blob for TPL

This stops the kernel from crashing immediately after boot.

authored by Ben Wolsieffer and committed by Tuomas Tynkkynen ba3e4706 1f4bb8c6

+15 -4
+15 -4
pkgs/misc/uboot/rock64.nix
··· 1 - { lib, buildUBoot, fetchFromGitHub, armTrustedFirmwareRK3328 }: buildUBoot rec { 1 + { lib, buildUBoot, fetchFromGitHub, armTrustedFirmwareRK3328 }: let 2 + rkbin = fetchFromGitHub { 3 + owner = "ayufan-rock64"; 4 + repo = "rkbin"; 5 + rev = "d8b90685b3d93c358936babdd854f1018bc6d35e"; 6 + sha256 = "0wrh3xa968sdp0j9n692jnv3071ymab719zc56vllba0aaabiaxr"; 7 + }; 8 + in buildUBoot rec { 2 9 name = "uboot-${defconfig}-${version}"; 3 10 version = "2018.01"; 4 11 ··· 10 17 }; 11 18 12 19 extraMakeFlags = [ "BL31=${armTrustedFirmwareRK3328}/bl31.elf" "u-boot.itb" "all" ]; 20 + 21 + # So close to being blob free... But U-Boot TPL causes the kernel to hang 13 22 postBuild = '' 14 - ./tools/mkimage -n rk3328 -T rksd -d tpl/u-boot-tpl.bin idbloader.img 23 + ./tools/mkimage -n rk3328 -T rksd -d ${rkbin}/rk33/rk3328_ddr_786MHz_v1.06.bin idbloader.img 15 24 cat spl/u-boot-spl.bin >> idbloader.img 16 25 dd if=u-boot.itb of=idbloader.img seek=448 conv=notrunc 17 26 ''; ··· 19 28 defconfig = "rock64-rk3328_defconfig"; 20 29 filesToInstall = [ "spl/u-boot-spl.bin" "tpl/u-boot-tpl.bin" "u-boot.itb" "idbloader.img"]; 21 30 22 - extraMeta = { 23 - maintainers = [ lib.maintainers.lopsided98 ]; 31 + extraMeta = with lib; { 32 + maintainers = [ maintainers.lopsided98 ]; 24 33 platforms = ["aarch64-linux"]; 34 + # Because of the TPL blob 35 + license = licenses.unfreeRedistributableFirmware; 25 36 }; 26 37 }