Created
May 21, 2013 22:12
-
-
Save blast-hardcheese/5623703 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Sources: | |
- http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ | |
- http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=22975 | |
- http://www.thomaskho.com/blog/2006/02/qemu-and-the-network-bridge/ | |
- http://toast.djw.org.uk/qemu.html | |
- http://wiki.debian.org/QEMU#Host_and_guests_on_same_network | |
Files needed: | |
- http://downloads.raspberrypi.org/images/raspbian/2013-02-09-wheezy-raspbian/2013-02-09-wheezy-raspbian.zip.torrent | |
- http://xecdesign.com/downloads/linux-qemu/kernel-qemu | |
Filesystem: | |
unzip 2013-02-09-wheezy-raspbian.zip | |
getpartoffset() { BLOCKS=$(fdisk -l $1 | grep ${1}${2} | sed -e 's/\s\+/ /g' | cut -d ' ' -f 2); echo $((BLOCKS*512)); } | |
getpartoffset 2013-02-09-wheezy-raspbian.img 2 | |
mkdir loopback | |
sudo mount -o loop,offset=${OFFSET_FROM_EARLIER} loopback | |
sudo sed -i 's/^\([^#]\)/#\1/' loopback/etc/ld.so.preload | |
sudo sed -i 's/mmcblk0p/sda/' loopback/etc/fstab | |
sudo umount loopback | |
Networking: | |
tunctl -u $USER -t tap0 | |
brctl addbr br0 | |
brctl addif br0 tap0 | |
Arguments: | |
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb \ | |
-no-reboot -append "root=/dev/sda2 panic=1" \ | |
-hda 2013-02-09-wheezy-raspbian.img \ | |
-net nic,vlan=0 -net tap,ifname=tap0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment