There are some excellent guides out there for running qemu, and I'll point in particular to the Slackwarearm HOWTO for those who are interested in installing a full slackwarearm system in qemu:
ftp://ftp.arm.slackware.com/slackwarear ... L_QEMU.TXT
Note that I haven't enabled networking access between the host and target, and I didn't use the qcow image format to create disk images -- I went a little more quick and dirty to get things running to the point where I could move to a real ARM board for more development.
Running inside qemu is very slow, so be patient. The system is faster on real hardware (specs depending).
Ok, let's get started: First, you'll want to install qemu. I've compiled version 1.4 for Slackware (32 and 64-bit) and built Porteus xzm modules, you can get them here:
32-bit: http://porteus-arm.googlecode.com/files ... -1Ahau.xzm
64-bit: http://porteus-arm.googlecode.com/files ... -1Ahau.xzm
Download qemu module for your architecture and activate it, or put it in /porteus/modules (so it's activated on every boot) and reboot.
Next, download the vexpress-express kernel tarball and the Porteus-ARM userland from here:
kernel: http://porteus-arm.googlecode.com/files ... -12.tar.gz
Userland: http://porteus-arm.googlecode.com/files ... -11.tar.gz
I'm using the versatile express board for a couple of reasons. First, it has better specs than the versatilepb board that ships standard with slackwarearm. I don't know what kind of performance increase this translates into (because qemu seems to be the bottleneck, not the virtual specs), but having 1G of ram is quite helpful when you're running in live mode and need room inside aufs. Second, I have to recompile the kernel to add aufs anyway, so it was good practice to get this up and running.
Ok, now that you have the tarballs, move them to a clean directory and extract both of them:
Code: Select all
tar -xvf vexpress_kernel-3-12.tar.gz
tar -xvf Porteus-ARM-userland-3-11.tar.gz
Code: Select all
cp vexpress_kernel/initrd.xz vexpress_kernel/zImage .
Code: Select all
cp vexpress_kernel/000-vexpress-kernel.xzm porteus/base/
Here's the command to create the sparse file. As you can see, we're just lobbing zeros into a new file.
Code: Select all
dd if=/dev/zero of=porteus.img bs=4096 count=76800
Code: Select all
mkfs.ext2 porteus.img
Mount your image on a loop so that you can access it like a mounted physical drive:
Code: Select all
mloop porteus.img
Copy the porteus files into your image:
Code: Select all
cp -ar porteus /mnt/loop
sync
Now unmount your image:
Code: Select all
uloop
Now you can start qemu. I use a script that I adapted and shortened from a slackwarearm qemu startup script from:
Code: Select all
#!/bin/bash
qemu-system-arm \
-M vexpress-a9 \
-cpu cortex-a9 \
-m 1024 \
-kernel zImage \
-usb \
-sd porteus.img \
-no-reboot \
-serial stdio \
-initrd initrd.xz \
-append ' excheat mem=1024M raid=noautodetect console=ttyAMA0,38400n8 rootwait vmalloc=256MB devtmpfs.mount=0'
you can save that script as "start_qemu" and make it executable with "chmod +x start_qemu", and then start it all up with "./start_qemu".
This should open the qemu window and start porteus. Remember to be patient. You should get some kernel messages scrolling (inside the terminal in which you ran the script) within a few seconds, but it will take a few minutes for porteus to boot into the GUI.
Note that as of right now, LXDE is the default desktop. Xfce is also present, and you can boot into xfce by adding the 'xfce' cheatcode to the 'excheat' file inside the porteus.img, at /porteus/excheat. This is a little crutch I've implemented to allow passing cheatcodes to Porteus, because it can be difficult to modify boot parameters on some devices. On my tablet, for example, I'd have to recompile the kernel in order to change cheatcodes. 'excheat' works just like the 'append' line on an x86 system's bootloader config, but it can't modify kernel parameters, just the porteus-specific cheatcodes.
Please give Porteus-ARM a shot and let me know how it goes!
Thanks for reading!