在buildroot根目录下
mkdir img
cd img
qemu-img create -f raw image.raw 2048M
mkfs.ext2 image.raw
mkdir image
sudo mount -o loop image.raw image
output/images/rootfs.ext2
mkdir root
mount -o loop ../output/images/rootfs.ext2 root
sudo mount -o loop ../output/images/rootfs.ext2 root
sudo cp -r root/* image/
qemu-system-x86_64 -enable-kvm -M pc -kernel output/images/bzImage -drive file=file=img/image.raw -append root=/dev/sda -vga std -serial stdio -net nic,model=rtl8139 -net tap
阅读(1628) | 评论(0) | 转发(0) |