文章目录
- 编译qemu
- 编译buildroot
- 编译linux-6.8.1
- 编译virtiofsd
- 启动脚本
- qemu调试方法
环境:
win11 + vmware17
ubuntu24.04
buildroot
git clone git://git.busybox.net/buildroot
linux-6.8.1
https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.8.1.tar.gz
virtiofsd
https://gitlab.com/virtio-fs/virtiofsd
virtio-fs-qemu
https://gitlab.com/virtio-fs/qemu/-/tree/dax-2022-05-17-qemu7.0?ref_type=tags
aarch64
编译qemu
dax-2022-05-17-qemu7.0会自带virtiofsd
编译后在build/tools/virtiofsd/virtiofsd
git clone git@gitlab.com:virtio-fs/qemu.git
git tag dax-2022-05-17-qemu7.0
mkdir build && build
../configure --enable-debug
sudo make qemu_aarch64_virt_defconfig
编译buildroot
- 下载 配置 编译
git clone git://git.busybox.net/buildrootmake menuconfig
#配置好后编译make -j8
#编译好的结果会在output目录
- make menuconfig后选择配置
在弹出的配置界面中,
设置
Target option ---> Target Architecture为
AArch64 (little endian);
设置
Toolchain ---> Toolchain type为
External toolchain,这时我们可以看到
Toolchain ---> Toolchain的值为
linaro AArch64 xxxx.xx;
设置
System configuration ---> Enable root login with password开启,并设置
System configuration ---> Root password为
xxxx(任意的你喜欢的密码);
设置
System configuration ---> Run a getty (login prompt) after boot ---> TTY port的值为
#按i编辑
ttyAMA0(这一条非常重要,不然虚拟机可能启动不了);
表示使用树莓派上的串口设备ttyAMA0作为终端设备
设置
Target packages ---> Show packages that are also provided by busybox开启;设置