4

I have flashed archlinux arm to my raspberry pi's SD card, and installed some packages. I have also created a non-privileged user account.

I would now like to plug the SD card into my x86_64 computer using a USB microcontroller, and boot the arch install using qemu.

Note this is not the same question as, "how do I boot an archlinux arm image using Qemu?".

dmesg reports:

[858076.937323] sd 14:0:0:1: [sdf] Assuming drive cache: write through
[858076.938569]  sdf: sdf1 sdf2 sdf3

where partitions sdf{1,2,3} correspond--respectively--to boot, root, and home mountpoints.

fstab on the pi is:

/dev/root               /       auto defaults                       0 1
/dev/mmcblk0p1  /boot           vfat    defaults        0       0
/dev/mmcblk0p3  /home       ext4    defaults,user        0       0

I have tried a bunch of different qemu incantations, such as:

sudo qemu-system-arm -machine versatilepb \
                     -cpu arm1176 -m 1024 -no-reboot -serial stdio \
                     -append "root=/dev/sda2 panic=1 rw" -hda /dev/sdf \
                     -kernel /mnt/rpi/boot/kernel.img

But I'm getting a black screen when I run the above command.

Finally, I'd like to add the tag "qemu" but don't have the rep...

EDIT @Jivings:

Getting warmer, but I'm unable to unpack the kernel.img as it doesn't seem to be in a standard format. I found some interesting information on Github, however, regarding how that kernel.img file is created:

This step of the build script:

https://github.com/archlinuxarm/PKGBUILDs/blob/master/core/linux-raspberrypi/PKGBUILD#L111

Calls this python script, which concatenates two files into kernel.img:

https://github.com/archlinuxarm/PKGBUILDs/blob/master/core/linux-raspberrypi/imagetool-uncompressed.py

See also:

https://github.com/raspberrypi/tools/issues/2

% sudo mount -o loop,offset=32768 kernel.img /mnt/kernel

does not work.

Actually I think that the output of

dd bs=$(stat -c%s first32k.bin) skip=1 if=kernel.img

would be bzImage ... correct?

3
  • Unfortunately you need the kernel image (zImage) which I think is found inside kernel.img. Can you extract or mount that and see?
    – Jivings
    Mar 4, 2013 at 7:58
  • Please see my note above.
    – user5555
    Mar 4, 2013 at 10:39
  • I want to do the same. Do you have made any progress on your question?
    – Strubbl
    May 19, 2014 at 20:45

0