Skip to content

Setup Development Environment

Antonio Vivace edited this page Apr 11, 2018 · 27 revisions
mkdir ~/rasp-qemu
cd ~/rasp-qemu
wget https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2018-03-14/2018-03-13-raspbian-stretch-lite.zip

[DOWNLOAD IMG RASPBIAN + KERNEL + UNZIP]

wget https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/kernel-qemu-4.9.59-stretch
wget https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/versatile-pb.dtb
unzip 2018-03-13-raspbian-stretch-lite.zip
rm 2018-03-13-raspbian-stretch-lite.zip
sudo qemu-system-arm -kernel ./qemu-rpi-kernel/kernel-qemu-4.9.59-stretch \                                                                                       
                              -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
                              -hda 2018-03-13-raspbian-stretch-lite.qcow  \
                              -cpu arm1176 -m 256 \
                              -machine versatilepb \
                              -no-reboot \
                              -serial stdio \
                              -dtb ./qemu-rpi-kernel/versatile-pb.dtb \
                              -net nic -net user,hostfwd=tcp::3333-:3333
ssh-keygen -t rsa -b 2048 -q -f rasp-qemu/rpi_key -P ""
ssh-copy-id pi@localhost -i rpi_key.pub -p 3333
ssh pi@localhost -p 3333 -i rasp-qemu/rpi_key
Clone this wiki locally