-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
ubootRockPi4: init #103735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ubootRockPi4: init #103735
Conversation
pkgs/misc/uboot/default.nix
Outdated
BL31 = "${armTrustedFirmwareRK3399}/bl31.elf"; | ||
filesToInstall = [ "u-boot.itb" "idbloader.img"]; | ||
postBuild = '' | ||
./tools/mkimage -n rk3399 -T rksd -d tpl/u-boot-tpl.bin idbloader.img |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something smells fishy here. The idbloader.img
isn't produced by that defconfig like every other rk3399 defconfig?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this comment can be resolved as the code I had here was just duplicating efforts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot verify on hardware, but how does this work for you?
diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix
index 0bb030a86a0..0a178b39800 100644
--- a/pkgs/misc/uboot/default.nix
+++ b/pkgs/misc/uboot/default.nix
@@ -400,9 +400,5 @@ in {
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareRK3399}/bl31.elf";
filesToInstall = [ "u-boot.itb" "idbloader.img"];
- postBuild = ''
- ./tools/mkimage -n rk3399 -T rksd -d tpl/u-boot-tpl.bin idbloader.img
- cat spl/u-boot-spl.bin >> idbloader.img
- '';
};
}
Using nix-build -A pkgsCross.aarch64-multiplatform.ubootRockPi4
With this applied:
@DUFFMAN ~/tmp/nixpkgs/nixpkgs-103735 $ file result/*
result/idbloader.img: data
result/u-boot.itb: Device Tree Blob version 17, size=1396, boot CPU=0, string block size=131, DT structure block size=1208
@DUFFMAN ~/tmp/nixpkgs/nixpkgs-103735 $ sha256sum result/*
5603261c91833d53495da0c1267846405d4a30def5c4a8b414ba05db3ff014bf result/idbloader.img
4c29ebe130b4628e766ab3b93a1abb670e4886d19000f0c719d93e30e8606a74 result/u-boot.itb
And your commit untouched:
@DUFFMAN ~/tmp/nixpkgs/nixpkgs-103735 $ file result/*
result/idbloader.img: data
result/u-boot.itb: Device Tree Blob version 17, size=1396, boot CPU=0, string block size=131, DT structure block size=1208
@DUFFMAN ~/tmp/nixpkgs/nixpkgs-103735 $ sha256sum result/*
5603261c91833d53495da0c1267846405d4a30def5c4a8b414ba05db3ff014bf result/idbloader.img
4c29ebe130b4628e766ab3b93a1abb670e4886d19000f0c719d93e30e8606a74 result/u-boot.itb
It looks like you've been re-implemented a small bit of the existing build!
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 ''; ```
Ha, thanks! I've removed that custom part. |
Motivation for this change
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:
cc @samueldr
Things done
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)