From 7a5047bede8f7851eac2fcc4d257d07cc5f6eda7 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Tue, 10 Nov 2020 12:54:24 +0100 Subject: [PATCH] ubootRockPi4: init This adds support for the Radxa Rock Pi 4 board which is based on RK3399. The u-boot outputs from the introduced build are suitable to build a generic image for the Rock Pi 4 by setting the following in a custom build of $nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix: ``` sdImage.postBuildCommands = '' dd if=${pkgs.ubootRockPi4}/idbloader.img of=$img seek=64 conv=notrunc dd if=${pkgs.ubootROckPi4}/u-boot.itb of=$img seek=16384 conv=notrunc ''; ``` --- pkgs/misc/uboot/default.nix | 7 +++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 8 insertions(+) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index d3ce3e598761..0a178b398006 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -394,4 +394,11 @@ in { extraMeta.platforms = ["armv7l-linux"]; filesToInstall = ["u-boot.img" "SPL"]; }; + + ubootRockPi4 = buildUBoot { + defconfig = "rock-pi-4-rk3399_defconfig"; + extraMeta.platforms = ["aarch64-linux"]; + BL31 = "${armTrustedFirmwareRK3399}/bl31.elf"; + filesToInstall = [ "u-boot.itb" "idbloader.img"]; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3667a63a03e6..4dfc8d937ff0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18988,6 +18988,7 @@ in ubootRaspberryPi3_64bit ubootRaspberryPiZero ubootRock64 + ubootRockPi4 ubootRockPro64 ubootROCPCRK3399 ubootSheevaplug