Showing posts from September, 2016

Running RaspberryPi using Qemu (Fedora 24)

Mostly taken from here:
Adopted to run using Fedora 24

Install qemu-user-static: dnf install qemu-user-static

Register binfmt: systemctl restart systemd-binfmt

Check binfmt interpreter: cat /proc/sys/fs/binfmt_misc/qemu-arm-static will show you:

interpreter /usr/bin/qemu-arm
offset 0
magic 7f454c4601010100000000000000000002002800
mask ffffffffffffff00fffffffffffffffffeffffff

Make symbolic link to match the interpreter path:
ln -s /usr/bin/qemu-arm-static /usr/bin/qemu-arm

Download raspbian image, and extract it (Skip this if you already have sdcard with raspbian) wget ......

Setup loopback:
losetup -f -P --show 2016-05-27-raspbian-jessie.img

Mount image or sdcard: cd ~
mkdir ~/mnt

mount /dev/loop0p2 ~/mnt
mount /dev/loop0p1 ~/mnt/boot

# or for sdcard

mount /dev/mmcblk0p2 ~/mnt
mount /dev/mmcblk0p1 ~/mnt/boot

Copy qemu-arm-static: cp  /usr/bin/qemu-arm-static ~/mnt/usr/bin/qemu-arm