Skip to content
This repository was archived by the owner on Aug 14, 2023. It is now read-only.

Commit 45fefe4

Browse files
committed
use MByte=MiB units for the image size
1 parent 25981e8 commit 45fefe4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builder/rpi/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ BOOT_PARTITION_SIZE="64"
2020
BOOTFS_START=2048
2121
BOOTFS_SIZE=$(expr ${BOOT_PARTITION_SIZE} \* 2048)
2222
ROOTFS_START=$(expr ${BOOTFS_SIZE} + ${BOOTFS_START})
23-
SD_MINUS_DD=$(expr ${SD_CARD_SIZE} \* 1000000 - 256)
23+
SD_MINUS_DD=$(expr ${SD_CARD_SIZE} \* 1024 \* 1024 - 256)
2424
ROOTFS_SIZE=$(expr ${SD_MINUS_DD} / 512 - ${ROOTFS_START})
2525

26-
dd if=/dev/zero of=${IMAGE_PATH} bs=1MB count=${SD_CARD_SIZE}
26+
dd if=/dev/zero of=${IMAGE_PATH} bs=1MiB count=${SD_CARD_SIZE}
2727

2828
DEVICE=$(losetup -f --show ${IMAGE_PATH})
2929

0 commit comments

Comments
 (0)