diff --git a/emmc-image.nix b/emmc-image.nix index a2f0745..34dd5cc 100644 --- a/emmc-image.nix +++ b/emmc-image.nix @@ -61,15 +61,15 @@ # Copy the rootfs into the SD image eval $(partx $img -o START,SECTORS --nr 3 --pairs) - dd conv=notrunc if=./root-fs.img of=$img seek=$((START/64)) count=$((SECTORS/64)) bs=$((512*64)) + dd conv=notrunc if=./root-fs.img of=$img seek=$((START*512)) oflag=seek_bytes bs=1M # Copy u-boot into the SD image eval $(partx $img -o START,SECTORS --nr 2 --pairs) - dd conv=notrunc if=${pkgs.ubootHelios64}/u-boot.itb of=$img seek=$((START/64)) count=$((SECTORS/64)) bs=$((512*64)) + dd conv=notrunc if=${pkgs.ubootHelios64}/u-boot.itb of=$img seek=$START count=$SECTORS # Copy bootloader into the SD image eval $(partx $img -o START,SECTORS --nr 1 --pairs) - dd conv=notrunc if=${pkgs.ubootHelios64}/idbloader.img of=$img seek=$((START/64)) count=$((SECTORS/64)) bs=$((512*64)) + dd conv=notrunc if=${pkgs.ubootHelios64}/idbloader.img of=$img seek=$START count=$SECTORS zstd -v --no-progress $img -o $out/sd-image/${config.sdImage.imageName}.zstd '';