Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu-system-arm: sd_init failed: Invalid SD card size: 100 MiB 问题的修复 #2

Open
cow0o0 opened this issue Jan 22, 2022 · 0 comments

Comments

@cow0o0
Copy link

cow0o0 commented Jan 22, 2022

hello~!
当我运行arm_now start armv5-eabi时我遇到了一个错误

qemu-system-arm: sd_init failed: Invalid SD card size: 100 MiB
SD card size has to be a power of 2, e.g. 128 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).
qemu-system-arm: sd_init failed

根据提示,应该是sd的大小有问题。

我尝试解决了一下。
armv5-eabi.tar.xz 解压得到如下文件:

-rw-r--r--   1 staff  staff  104857600  6  4  2018 rootfs.ext2

我使用如下命令修改了rootfs.ext2文件的大小

qemu-img resize arm_now/rootfs.ext2 128M

修改后的大小如下所示:

-rw-r--r--  1 staff  staff  134217728  1 22 23:12 arm_now/rootfs.ext2

此时再次运行arm_now start armv5-eabi就可以正常进入到qemu中。

对于类似的问题,同样也可以用此方法进行修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant