筆者所用的OS系統為Lubuntu 18.10。首先要安裝arm版本的qemu,指令如下:
sudo apt install qemu-system-arm
會需要三個檔案:
Raspbian Stretch Lite image
Linux Kernel(kernel-qemu-4.14.50-stretch)
Device Tree Blob(versatile-pb.dtb)
筆者將kernel-qemu-4.14.50-stretch與versatile-pb.dtd放bootpart資料夾下:
接著執行底下指令:
qemu-system-arm -kernel bootpart/kernel-qemu-4.14.50-stretch -dtb bootpart/versatile-pb.dtb -m 256 -M versatilepb -cpu arm1176 -serial stdio -append "rw console=ttyAMA0 root=/dev/sda2 rootfstype=ext4 loglevel=8 rootwait fsck.repair=yes memtest=1" -drive file=2019-04-08-raspbian-stretch-lite.img,format=raw -redir tcp:5022::22 -no-reboot
執行結果畫面:
沒有留言:
張貼留言