Page MenuHomeFreeBSD

Convert arm64 VM images to GPT
ClosedPublic

Authored by mhorne on Oct 28 2020, 2:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 4:19 PM
Unknown Object (File)
Nov 28 2024, 6:36 AM
Unknown Object (File)
Nov 23 2024, 9:28 AM
Unknown Object (File)
Oct 30 2024, 10:56 AM
Unknown Object (File)
Sep 21 2024, 4:45 AM
Unknown Object (File)
Sep 6 2024, 1:45 AM
Unknown Object (File)
Sep 5 2024, 6:41 AM
Unknown Object (File)
Aug 19 2024, 1:56 PM
Subscribers

Details

Summary

These images were switched to MBR in r281876 as a way to cope with a
hard-coded partition GUID in QEMU's default EFI firmware. Enough time
has passed that this is no longer a problem; QEMU versions >= 4.0
include a copy of edk2 EFI firmware that can detect the root filesystem
properly. Alternatively, sysutils/u-boot-qemu-arm64 can be used.

Switch back to building these images with a GPT partition table, and
re-enable the swap partition.

Test Plan

Build and boot vm.raw with edk2, u-boot. emulators/qemu31 does not include
edk2, but can be booted with sysutils/u-boot-qemu-arm64.

An image generated with this change is available here: https://people.freebsd.org/~mhorne/FreeBSD-13.0-CURRENT-arm64-aarch64-gpt.raw.zstd

Launch with built-in EDK2:

$  qemu-system-aarch64 -cpu cortex-a57 -machine virt -m 4G -nographic -drive if=none,file=FreeBSD-13.0-CURRENT-arm64-aarch64-gpt.raw,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -bios edk2-aarch64-code.fd

Launch with u-boot:

$  qemu-system-aarch64 -cpu cortex-a57 -machine virt -m 4G -nographic -drive if=none,file=FreeBSD-13.0-CURRENT-arm64-aarch64-gpt.raw,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -bios /usr/local/share/u-boot/u-boot-qemu-arm64/u-boot.bin

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mhorne created this revision.

can you provide example command lines?

LGTM. Let's give releng an opportunity to comment though.

This revision is now accepted and ready to land.Oct 28 2020, 6:46 PM

LGTM. Let's give releng an opportunity to comment though.

This is on my list of things to look at tomorrow, as I'd like to test it against this week's snapshot builds after the fact.

(The other reviews are on my todo list for tomorrow, as well.)

In D26986#602048, @gjb wrote:

LGTM. Let's give releng an opportunity to comment though.

This is on my list of things to look at tomorrow, as I'd like to test it against this week's snapshot builds after the fact.

(The other reviews are on my todo list for tomorrow, as well.)

Thank you Glen, that sounds good.

@gjb Would you prefer to see this change (and the preceeding ones) MFC'd to stable/12, or should it be for 13 only?

@gjb Would you prefer to see this change (and the preceeding ones) MFC'd to stable/12, or should it be for 13 only?

If they are effective on stable/12, then yes, it makes sense to MFC.

This revision was automatically updated to reflect the committed changes.