On physical arm hardware, the bit that typically handles fetching the kernel/initrd from disk is U-Boot. However there are no U-Boot builds shipped with qemu for us to take advantage of.
Well that's changed a bit now. I was talking to Gerd about this at KVM Forum last month, and after some tinkering he got a working U-Boot build for the Versatile Express board that qemu emulates.
Steps to use it:
- Grab a Fedora 21 ARM image (I used the F21 beta 'Minimal' image from here)
- Enable Gerd's upstream firmware repo
- Install u-boot.git-arm (this just installs some binaries in /usr/share, doesn't mess with any host boot config)
sudo virt-install --name f21-arm-a9-uboot \ --ram 512 \ --arch armv7l --machine vexpress-a9 \ --os-variant fedora21 \ --boot kernel=/usr/share/u-boot.git/arm/vexpress-a9/u-boot \ --disk Fedora-Minimal-armhfp-21_Beta-1-sda.raw
For straight QEMU, you can do:
qemu-system-arm -machine vexpress-a9 -m 512 \ -nographic \ -kernel /usr/share/u-boot.git/arm/vexpress-a9/u-boot \ -sd Fedora-Minimal-armhfp-21_Beta-1-sda.raw
Is there a u-boot image that boots into Linux, rather than leaving the console at the u-boot prompt, which requires entering 1[cr]?
ReplyDeleteI don't think so. If you have uboot knowledge there's it's probably just a matter of tweaking build options.
Delete