Date: Wed, 20 May 2020 19:29:56 -0700 From: Oleksandr Tymoshenko <gonzo@bluezbox.com> To: Gordon Bergling <gbergling@googlemail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Building arm64 image for booting in qemu Message-ID: <20200521022956.GA32686@bluezbox.com> In-Reply-To: <20200520165024.GA2695@lion.0xfce3.net> References: <20200520165024.GA2695@lion.0xfce3.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Gordon Bergling via freebsd-hackers (freebsd-hackers@freebsd.org) wrote: > Greetings, > > I am currently try to setup a crossbuild for arm64 to test some > local changes. I use the following steps to create the image > after crossbuilding arm64 on amd64. These steps were taken from > the arm64_build.sh found at the FreeBSD wiki. Hi Gordon, I believe that script is very outdated in several areas. It refers to boot1.efifat which is not boot1.efi but a FAT image that contains boot1.efi as EFI\BOOT\bootaa64.efi. Also current version of u-boot-qemu looks for DTB file which is not provided by the script (probably it was built into u-boot before). I think the easiest way to run FreeBSD on quemu/arm64 these days is by using UEFI. I was able to build bootable image by hacking together your script and pieces from release/ directory of the src tree: https://people.freebsd.org/~gonzo/build-qemu-aarch4-img.sh It's not very clean but it should give you an idea of what's required. The start command for qemu I used: BIOS=QEMU_EFI.fd qemu-system-aarch64 -m 4096M -cpu cortex-a57 -M virt \ -bios $BIOS \ -serial mon:stdio -nographic \ -drive if=none,file=/src/FreeBSD/tftproot/disk.img,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -device virtio-net-device,netdev=net0 \ -netdev user,id=net0 QEMU_EFI.fd was downloaded from http://releases.linaro.org/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.fd -- gonzo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200521022956.GA32686>