User Tools

Site Tools


sparky_armhf_qemu

This is an old revision of the document!


Sparky ARMHF emulated in QEMU

Sparky ARM edition can be tested inside the QEMU emulator.

Linux host

Requirements

sparky-armhf image
kernel
unzip
git
qemu
qemu-system-arm
sudo
Sparky ARMHF image

Download zipped Sparky ARMHF image from our official page.

Unzip it:

unzip sparkylinux-VER-armhf.zip

or (Lite version):

unzip sparkylinux-VER-armhf-lite.zip
Kernel

Download an ARM kernel to run the image in QEMU, using git:

git clone https://github.com/dhruvvyas90/qemu-rpi-kernel.git

Place on of the kernels in the same directory where unzipped Sparky image is already placed.

Run
sudo qemu-system-arm \
-kernel ./kernel-qemu-4.4.34-jessie \
-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
-hda sparkylinux-VER-armhf.img \
-cpu arm1176 -m 256 \
-M versatilepb \
-no-reboot \
-serial stdio \
-net nic -net user \
-net tap,ifname=vnet0,script=no,downscript=no

or the Lite version:

sudo qemu-system-arm \
-kernel ./kernel-qemu-4.4.34-jessie \
-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
-hda sparkylinux-VER-armhf-lite.img \
-cpu arm1176 -m 256 \
-M versatilepb \
-no-reboot \
-serial stdio \
-net nic -net user \
-net tap,ifname=vnet0,script=no,downscript=no

A more efficient option is to convert this to a qcow2 image first. Use the qemu-img command to do this (optional):

qemu-img convert -f raw -O qcow2 sparkylinux-VER-armhf.img sparkylinux-VER-armhf.qcow

Now you can also easily expand the image (optional):

qemu-img resize sparkylinux-VER-armhf.qcow +6G

Sparky ARMHF in QEMU with Openbox and UXterm

sparky_armhf_qemu.1511808325.txt.gz · Last modified: 2021/05/04 15:25 (external edit)