Article is updated for piCore-5.3 release.piCore can run in QEMU, you do not need a real hardver. This way you can get familiar with the system and see how it works. Even if you own a Raspberry Pi it can be easier to test programs or develop than on a real hardware.
PrerequisitsFirst you need
qemu-system-arm version 1.1 or later release, olders doesn't work. On TC, install quemu-arm.tcz available in the repo. It is available in most LINUX distributions, probably in the qemu-extra package.
Windows version of QEM can be downloaded from
from this siteNext download the
piCore-5.3-QEMU.zip of piCore and extract it to the directory where qemu-system-arm is found. Please note, for QEMU a special version of piCore (both kernel and initrd) required, normal version doesn't work.
Running piCoreRun piCore-start.sh or piCore-start.bat depending on operating system. udevd messages during boot running on older versions of QEMU can be safely omitted.
Adding persistencyNow you must have piCore running in QEMU with networking. You can install package online with tce or tce-load but they are loaded to RAM in /tmp/tce directory. Lets add a virtual drive. Create a virtual disk image:
qemu-img create -f qcow2 tcdisk.qcow2 128M
It will create a 128Mbyte sized qcow2 type blank disk image. qcow2 is a special QEMU format; initial size is very small and automatically growing when necessary. Choose size fits to your requirements. Next, add
-hda tcdisk.qcow2
to the startup options. Start piCore, there will be a blank /dev/sda drive. Create a LINUX partition with
fdisk and run
rebuildfstab as root, than format with
mkfs.ext4 Mount and create a tce directory in root. As you see nothing special, works exactly on the same way as x86 version with a new blank drive.
Add swapDue to Raspberry Pi's low memory compressed RAM swap is disabled; it is worth to add a SWAP partition. You can have it on the same virtual disk as your persistent partition, but I advice to have a different raw type drive, created with
qemu-img create -f raw tcswap.img 256M
Add
-hdb tcswap.img
to qemu options. Drive will be seen as /dev/sdb in piCore. Create a swap partition with
fdisk and prepare with
mkswap. It will be recognized at next boot automatically. Use
free to check. You can activate it after creation without reboot with the
swapon command.
Note: remove noswap option in start.sh/start.bat when swap used.
Install GUITo install basic GUI environment install TC.tcz extension. As a normal user (tc) execute
tce-load -iw TC
than type
startx