mnt-reform: Add uboot flash script

This commit is contained in:
Jakob Leifhelm committed 2025-11-09 11:25:35 +01:00
1 parent 20baaa0d68
commit a31d53a0b2
4 files changed
+71 -4

No files matched your search

+3 -3
View File
@@ -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