raspberry piの仮想環境をMacに構築する(Stretch)
ダウンロード
brew update
brew install qemu
wget https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.14.79-stretch
wget https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/versatile-pb.dtb
wget http://ftp.jaist.ac.jp/pub/raspberrypi/raspbian_lite/images/raspbian_lite-2019-04-09/2019-04-08-raspbian-stretch-lite.zip
起動
- ひとまず起動
qemu-system-arm \
-M versatilepb \
-cpu arm1176 \
-m 256 -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
-dtb versatile-pb.dtb \
-display none \
-kernel /Users/hoge/VirtualBox \VMs/pi_qemu/kernel-qemu-4.14.79-stretch \
-hda /Users/hoge/VirtualBox \VMs/pi_qemu/2019-04-08-raspbian-stretch-lite.img
起動させたターミナルでそのままRaspberry Piへのログイン画面に遷移する
イメージのサイズを拡張する
qemu-img resize 2019-04-08-raspbian-stretch-lite.img +10G