mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-05 07:23:29 +01:00
mnt-reform: Add uboot flash script
This commit is contained in:
4 files changed
+71
-4
No files matched your search
@@ -44,8 +44,8 @@
|
||||
storeContents = config.installerImage.storeContents;
|
||||
comp = config.installerImage.squashfsCompression;
|
||||
};
|
||||
uboot = pkgs.callPackage ./uboot.nix { };
|
||||
firmware = pkgs.callPackage ./firmware.nix { inherit uboot; };
|
||||
packages = pkgs.callPackage ../pkgs { };
|
||||
ubootImage = packages.ubootImage.reform2-rk3588-dsi;
|
||||
content = pkgs.callPackage (
|
||||
{
|
||||
stdenv,
|
||||
@@ -215,7 +215,7 @@
|
||||
eval $(partx $img -o START,SECTORS --nr 1 --pairs)
|
||||
dd conv=notrunc if=${content} of=$img seek=$START count=$SECTORS
|
||||
|
||||
dd conv=notrunc if=${firmware}/rk3588-mnt-reform2-dsi-flash.bin of=$img seek=64
|
||||
dd conv=notrunc if=${ubootImage}/rk3588-mnt-reform2-dsi-flash.bin of=$img seek=64
|
||||
|
||||
if test -n "$compressImage"; then
|
||||
zstd -T$NIX_BUILD_CORES --rm $img
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
# script from https://source.mnt.re/reform/reform-rk3588-uboot/-/blob/28289e36cd1cb90b302780e83b014250c880c4ec/build.sh
|
||||
runCommand "mnt-reform-firmware-rk3855${uboot.variant}" { } ''
|
||||
runCommand "mnt-reform-uboot-image-rk3855${uboot.variant}" { } ''
|
||||
mkdir $out
|
||||
cp ${uboot}/idbloader.img $out/rk3588-mnt-reform2${uboot.variant}-flash.bin
|
||||
dd if=${uboot}/u-boot.itb of=$out/rk3588-mnt-reform${uboot.variant}-flash.bin seek=16320
|
||||
Reference in new issue
Block a user