Building arm64 image for booting in qemu
Edward Tomasz Napierała
trasz at freebsd.org
Thu May 21 12:44:54 UTC 2020
On 0520T1929, Oleksandr Tymoshenko wrote:
> Gordon Bergling via freebsd-hackers (freebsd-hackers at 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).
We use both u-boot-qemu-arm (for armv7) and u-boot-qemu-arm64 packages
on CI; they don't seem to depend on any external DTB. You are right
about boot1.efi, though. The arm64 part of the build script used on CI
(https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test_image-head.sh)
looks like this:
mkdir -p efi/EFI/BOOT
cp -f ufs/boot/loader_lua.efi efi/EFI/BOOT/bootaa64.efi
sudo makefs -d 6144 -t msdos -s 50m -Z efi.img efi
mkimg -s gpt -f raw \
-p efi:=efi.img \
-p freebsd-swap/swapfs::1G \
-p freebsd-ufs/rootfs:=ufs.img \
-o ${OUTPUT_IMG_NAME}
[..]
More information about the freebsd-hackers
mailing list