loading 'VIRT' kernel in qemu

Oleksandr Tymoshenko gonzo at bluezbox.com
Fri Dec 30 08:15:00 UTC 2016


> On Dec 29, 2016, at 5:25 PM, Oleksandr Tymoshenko <gonzo at bluezbox.com> wrote:
> 
> 
>> On Dec 29, 2016, at 5:12 AM, Jason Harmening <jason.harmening at gmail.com> wrote:
>> 
>> 
.. skipped ..
>> 
>> Ah, thanks!  That should make things a good deal easier.
>> Using the nanobsd-generated images and the qemu invocation from qemu-armv7.cfg, I get a bit further but end up with a repeating prefetch abort:
>> Prefetch Abort Exception PC at 0xFF176790  CPSR 0x80000113
>> 
>> This is either in UEFI or very early in kernel bootstrap, since the copyright hasn't printed yet...haven't poked at it to figure out where the pc comes from yet.
> 
> Looks like it's boot1.efi. After upgrading to clang 3.9.0 -fPIC is required to  build loader. In addition to this problem there seems to be some error when calculating value for relocation. Looks like it’s going to take a bit of time to track down, I can’t identify it immediately.  


Hi Jason,

I think I fixed the PIC problem along with FDT-related one:
https://people.freebsd.org/~gonzo/arm/patches/arm-uefi.diff

You also need to provide 256M memory to qemu, because
loader.efi allocates 64Mb heap and 128Mb is just not enough
for UEFI firmware and loader.efi. Message below is an
indication of such error:
    Failed to start image provided by UFS (9)

I used following command line to test nanobsd image:
qemu-system-arm -M virt -serial stdio -bios QEMU_EFI.fd \
                -m 256M -nographic -monitor none \
                -drive if=none,file=_.disk.image.qemu-armv7.qcow2,id=hd0 \
                -device virtio-blk-device,drive=hd0



More information about the freebsd-arm mailing list