-
Notifications
You must be signed in to change notification settings - Fork 1
Building a virtual Raspberry Pi
gunnar edited this page Apr 22, 2017
·
6 revisions
- instruction shown here still have to be generalized
- also it's grossly incomplete and not well structured yet
save it on your host and unpack it
mkdir ~/rpicd ~/rpiwget http://director.downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-04-10/2017-04-10-raspbian-jessie-lite.zip .unzip 2017-04-10-raspbian-jessie-lite.zip
$ sudo mount ~/rpi/2017-03-02-raspbian-jessie-lite.img -o loop,offset=70254592 /mnt-
$ sudo vim ld.so.preload(and comment out the line in there) $ cd /$ sudo umount /mnt
Raspbian kernel for qemu and howto: https://github.com/dhruvvyas90/qemu-rpi-kernel
we will be using the newest one (kernel-qemu-4.4.34-jessie)
wget https://raw.githubusercontent.com/dhruvvyas90/qemu-rpi-kernel/master/kernel-qemu-4.4.34-jessie
$ qemu-system-arm -kernel /path/to/kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -M versatilepb -append "root=/dev/sda2 panic=1 $ rootfstype=ext4 rw" -drive "file=/path/to/rpi/2017-04-10-raspbian-jessie-lite.img,index=0,media=disk,format=raw" -nographic -vnc :0
doubled port forwarding has to be applied
- from another terminal
-
$ ssh user@server -L 9999:localhost:9999(access the host) -
$ ssh coder@10.1.80.203 -L 9999:localhost:5900(access virtual rpi)