Date: Fri, 30 Dec 2016 00:14:26 -0800 From: Oleksandr Tymoshenko <gonzo@bluezbox.com> To: Jason Harmening <jason.harmening@gmail.com> Cc: freebsd-arm@freebsd.org Subject: Re: loading 'VIRT' kernel in qemu Message-ID: <272ABF9C-4735-44C4-8EB8-FBCCDE37785A@bluezbox.com> In-Reply-To: <58C0D791-3D3C-4DE2-9EAF-93DA40ED620D@bluezbox.com> References: <CAM=8qa=pSRphmsbvy1L7fgPFDDK4xhozfrr3tj5fojd8w7fFjg@mail.gmail.com> <BA5B89E5-9187-4BD3-A036-554F3CF6F671@bluezbox.com> <CAM=8qa=RZJvRXX1H3hWS%2BSnOv_Hxnp=6P71SE%2Bt6d6D9Kbxx8A@mail.gmail.com> <58C0D791-3D3C-4DE2-9EAF-93DA40ED620D@bluezbox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Dec 29, 2016, at 5:25 PM, Oleksandr Tymoshenko <gonzo@bluezbox.com> = wrote: >=20 >=20 >> On Dec 29, 2016, at 5:12 AM, Jason Harmening = <jason.harmening@gmail.com> wrote: >>=20 >>=20 .. skipped .. >>=20 >> 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 >>=20 >> 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. >=20 > 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=E2=80=99s = going to take a bit of time to track down, I can=E2=80=99t identify it = immediately. =20 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=3Dnone,file=3D_.disk.image.qemu-armv7.qcow2,id=3D= hd0 \ -device virtio-blk-device,drive=3Dhd0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?272ABF9C-4735-44C4-8EB8-FBCCDE37785A>