Skip to content

Commit 7705fdf

Browse files
committed
tools: labs: qemu: Make rootfs disk size power of 2
In some configurations Qemu requires rootfs image to be a size of 2. Resize the yocto rootfs to 64MB for now to fix the following error when booting ARM rootfs: qemu-system-arm: Invalid SD card size: 40 MiB SD card size has to be a power of 2, e.g. 64 MiB. You can resize disk images with 'qemu-img resize <imagefile> <new-size>' (note that this will lose data if you make the image smaller than it currently is). Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
1 parent f1be7e5 commit 7705fdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/labs/qemu/prepare-image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
size=$(stat -c%s $1)
44
if [ $size -lt 50000000 ]; then
55
e2fsck -f $1
6-
resize2fs $1 50M
6+
resize2fs $1 64M
77
fi
88

99
TMP=$(mktemp -d)

0 commit comments

Comments
 (0)