Compile QEMU 2.9.0 from source:
sudo apt-get build-dep qemu-system-arm git clone --recursive git://git.qemu-project.org/qemu.git cd qemu git checkout v2.9.0 ./configure make `nproc`Download image and extract the kernel and dts from it:
Download the image and unzip it:
wget http://downloads.raspberrypi.org/raspbian/images/raspbian-2016-05-31/2016-05-27-raspbian-jessie.zip unzip 2016-05-27-raspbian-jessie.zipMount the second image of the partition. The easiest way is:
sudo losetup -f --show -P 2016-05-27-raspbian-jessie.imgThis only works with latest
losetupon Ubuntu 16.04, other methods at: https://askubuntu.com/questions/69363/mount-single-partition-from-image-of-entire-disk-device/496576#496576This prints a loop device, e.g.:
/dev/loop0so we do:
sudo mkdir /mnt/rpi sudo mount /dev/loop0p1 /mnt/rpi cp /mnt/rpi/kernel7.img /mnt/rpi/bcm2709-rpi-2-b.dtb . sudo umount /mnt/rpi sudo losetup -d /dev/loop0
Run:
./arm-softmmu/qemu-system-arm \ -M raspi2 \ -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2" \ -cpu arm1176 \ -dtb bcm2709-rpi-2-b.dtb \ -sd 2016-05-27-raspbian-jessie.img \ -kernel kernel7.img \ -m 1G \ -smp 4 \ -serial stdio \ ;
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
replaced http://raspberrypi.stackexchange.com/ with https://raspberrypi.stackexchange.com/
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20
Ciro Santilli OurBigBook.com
- 633
- 10
- 20