如何解决要为 arm多功能板编译和构建 linux-5.8.10 映像并使用 Qemu 对其进行模拟:
我按照 compile_linux_kernal 参考。
步骤:
- 下载并解压 linux-5.8.10.tar.gz
- cd linux-5.8.10
make -C build ARCH=arm versatile_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- all
- cd ..
- 使用
arm-linux-gnueabi-gcc static hello.c -o hello
编译 hello.c echo hello | cpio -o --format=newc > rootfs
- cd linux-5.8.10/arch/arm/boot
qemu-system-arm -M versatilepb -m 128M -kernel zImage -dtb dts/versatile-pb.dtb -initrd ~/rootfs -append "root=/dev/mtdblock0 rdinit=~/hello" -nographic
错误信息:
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
vpb_sic_write: Bad register offset 0x2c
---[结束内核恐慌 - 不同步:VFS:无法在未知块(0,0)上挂载根文件系统]---
QEMU 版本: qemu-system-arm --version QEMU 模拟器版本 4.2.1 (Debian 1:4.2-3ubuntu6.16) 版权所有 (c) 2003-2019 Fabrice Bellard 和 QEMU 项目开发人员
我的机器: uname -a Linux ubuntu 5.8.0-55-generic #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
我不确定是什么问题。 我尝试将根参数更改为 root-/dev/sda6 [我的根文件系统] 并验证了 initrd 和 rdinit 的路径。
sudo update-grub2
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.8.0-55-generic
Found initrd image: /boot/initrd.img-5.8.0-55-generic
Found linux image: /boot/vmlinuz-5.8.0-43-generic
Found initrd image: /boot/initrd.img-5.8.0-43-generic
Found linux image: /boot/vmlinuz-5.8.0-55-generic
Found initrd image: /boot/initrd.img-5.8.0-55-generic
Found linux image: /boot/vmlinuz-5.8.0-43-generic
Found initrd image: /boot/initrd.img-5.8.0-43-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。