summaryrefslogtreecommitdiffstats
path: root/pkgs/misc/uboot
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-14 23:33:03 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-14 23:33:03 -0400
commit5e17335bd7ff853379122e08dadfaa2fc1c020b7 (patch)
tree911e75d700bebef1aa60fedcaa6a29b5032d6428 /pkgs/misc/uboot
parent330ca731e88ec015181c43d92ae8f7c77cf0226a (diff)
parent0fc21a364bfd6b2dea9010fdf21415ff3de1805a (diff)
Merge remote-tracking branch 'upstream/staging' into strictDeps
Diffstat (limited to 'pkgs/misc/uboot')
-rw-r--r--pkgs/misc/uboot/rock64.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/misc/uboot/rock64.nix b/pkgs/misc/uboot/rock64.nix
new file mode 100644
index 000000000000..623c6015534a
--- /dev/null
+++ b/pkgs/misc/uboot/rock64.nix
@@ -0,0 +1,37 @@
+{ lib, buildUBoot, fetchFromGitHub, armTrustedFirmwareRK3328 }: let
+ rkbin = fetchFromGitHub {
+ owner = "ayufan-rock64";
+ repo = "rkbin";
+ rev = "d8b90685b3d93c358936babdd854f1018bc6d35e";
+ sha256 = "0wrh3xa968sdp0j9n692jnv3071ymab719zc56vllba0aaabiaxr";
+ };
+in buildUBoot rec {
+ name = "uboot-${defconfig}-${version}";
+ version = "2018.01";
+
+ src = fetchFromGitHub {
+ owner = "ayufan-rock64";
+ repo = "linux-u-boot";
+ rev = "19e31fac0dee3c4f6b2ea4371e4321f79db0f495";
+ sha256 = "1vmv7q9yafsc0zivd0qdfmf930dvhzkf4a3j6apxxgx9g10wgwrg";
+ };
+
+ extraMakeFlags = [ "BL31=${armTrustedFirmwareRK3328}/bl31.elf" "u-boot.itb" "all" ];
+
+ # So close to being blob free... But U-Boot TPL causes the kernel to hang
+ postBuild = ''
+ ./tools/mkimage -n rk3328 -T rksd -d ${rkbin}/rk33/rk3328_ddr_786MHz_v1.06.bin idbloader.img
+ cat spl/u-boot-spl.bin >> idbloader.img
+ dd if=u-boot.itb of=idbloader.img seek=448 conv=notrunc
+ '';
+
+ defconfig = "rock64-rk3328_defconfig";
+ filesToInstall = [ "spl/u-boot-spl.bin" "tpl/u-boot-tpl.bin" "u-boot.itb" "idbloader.img"];
+
+ extraMeta = with lib; {
+ maintainers = [ maintainers.lopsided98 ];
+ platforms = ["aarch64-linux"];
+ # Because of the TPL blob
+ license = licenses.unfreeRedistributableFirmware;
+ };
+}