Created
December 16, 2019 13:24
-
-
Save grisu48/8d17624d76fecb157aac820d0f804673 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## 2019, phoenix | |
## Start Raspberry Pi in QEMU instance | |
## | |
# | |
# 1. Get the Raspian image: https://www.raspberrypi.org/downloads/raspbian/ | |
# 2. Get Raspberry Kernel and dtb: https://github.com/dhruvvyas90/qemu-rpi-kernel | |
# 3. Extract Raspbian and put the Kernel and the dtb into a directory | |
# 4. Convert the IMG to a QCOW2: qemu-img convert -f raw -O qcow22019-09-26-raspbian-buster-lite.img 2019-09-26-raspbian-buster-lite.qcow | |
# 5. Make some more space: qemu-img resize 2019-09-26-raspbian-buster-lite.qcow2 +5G | |
# 6. Go for it: | |
qemu-system-arm -kernel kernel-qemu-4.19.50-buster -dtb versatile-pb.dtb -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda 2019-09-26-raspbian-buster-lite.qcow2 -m 256 -M versatilepb -cpu arm1176 -no-reboot -nographic -serial mon:stdio -audiodev none,id=0 $@ | |
#-net nic -net user -net tap,ifname=virbr0,script=no,downscript=no | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment