From fd4fff924a9ed90e3a8ac4aca6d505108f06e258 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Fri, 8 Jan 2021 23:26:31 +0100 Subject: [PATCH] image: use seek_bytes to allow large block size when copying rootfs --- emmc-image.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 '';