Created
February 8, 2020 20:44
-
-
Save AleXoundOS/f98f19809cef10aed52eeed5a7838d3a to your computer and use it in GitHub Desktop.
uboot nix derivation for Rock64 with CONFIG_BAUDRATE=115200
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, buildUBoot, fetchFromGitHub, armTrustedFirmwareRK3328 }: | |
let | |
rkbin = fetchFromGitHub { | |
owner = "ayufan-rock64"; | |
repo = "rkbin"; | |
rev = "f79a708978232a2b6b06c2e4173c5314559e0d3a"; | |
sha256 = "0h7xm4ck3p3380c6bqm5ixrkxwcx6z5vysqdwvfa7gcqx5d6x5zz"; | |
}; | |
in buildUBoot { | |
extraMakeFlags = [ "all" "u-boot.itb" ]; | |
defconfig = "rock64-rk3328_defconfig"; | |
extraMeta = { | |
platforms = [ "aarch64-linux" ]; | |
license = lib.licenses.unfreeRedistributableFirmware; | |
}; | |
BL31="${armTrustedFirmwareRK3328}/bl31.elf"; | |
filesToInstall = [ "u-boot.itb" "idbloader.img"]; | |
# Derive MAC address from cpuid | |
# Submitted upstream: https://patchwork.ozlabs.org/patch/1203686/ | |
extraConfig = '' | |
CONFIG_MISC_INIT_R=y | |
CONFIG_BAUDRATE=115200 | |
''; | |
# Close to being blob free, but the U-Boot TPL causes random memory | |
# corruption | |
postBuild = '' | |
./tools/mkimage -n rk3328 -T rksd -d ${rkbin}/rk33/rk3328_ddr_786MHz_v1.13.bin idbloader.img | |
cat spl/u-boot-spl.bin >> idbloader.img | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Successfully cross-builds at 437e1f69be786bfbd06a611530bbd2fac6af1d35 nixpkgs commit: