This patch enables bsdinstall to create EFI partition during installation and uploading it's contents,
making the ARM64 FreeBSD installation bootable.
Details
- Reviewers
nwhitehorn zbb wma emaste allanjude
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
73 | This is not actually true, although I would expect the installer to always produce EFI on GPT for arm64. |
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
73 | That is, I think you might want to update the comment, but I don't think the functionality needs to change. /* We only support GPT with EFI */ perhaps? |
Partition scheme screen from Thunder:
FreeBSD Installer ────────────────────────────────────────────────────────────────────────────── ┌────────────Partition Scheme───────────────┐ │ Select a partition scheme for this │ │ volume: │ │ ┌───────────────────────────────────────┐ │ │ │ APM Apple Partition Map │ │ │ │ BSD BSD Labels │ │ │ │ GPT GUID Partition Table │ │ │ │ MBR DOS Partitions │ │ │ │ PC98 NEC PC9801 Partition Table │ │ │ │ VTOC8 Sun VTOC8 Partition Table │ │ │ └───────────────────────────────────────┘ │ │ │ │ │ ├───────────────────────────────────────────┤ │ < OK > <Cancel> │ └───────────────────────────────────────────┘ Bootable on most x86 systems and EFI aware ARM64
After GPT has ben selected (which is default):
FreeBSD Installer ────────────────────────────────────────────────────────────────────────────── ┌──────────────────Partition Editor────────────────────┐ │ Please review the disk setup. When complete, press │ │ the Finish button. │ │┌────────────────────────────────────────────────────┐│ ││ada0 75 GB GPT ││ ││ ada0p1 800 KB efi ││ ││ ada0p2 71 GB freebsd-ufs / ││ ││ ada0p3 3.5 GB freebsd-swap none ││ ││da0 7.2 GB GPT ││ ││ da0p1 800 KB efi ││ ││ da0s2 581 MB freebsd ││ ││ ││ │└────────────────────────────────────────────────────┘│ ├──────────────────────────────────────────────────────┤ │<Create> <Delete> <Modify> <Revert> < Auto > <Finish> │ └──────────────────────────────────────────────────────┘ Exit partitioner (will ask whether to save changes)
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
73 | Yeah, I can fix that. Though I would stay with making only GPT paritions on installation targets - I do not think that MBR has future on non-x86 machines (with exception to memsticks.) |
Thanks! I'll take care of re@ and committing this change then.
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
29 | $FreeBSD$ missing |
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
63 | I don't think you need the GPT conditional here |
If you also include this diff:
https://reviews.freebsd.org/differential/diff/17606/
It will enable the 'ZFS Auto' installer bits as well
It will enable the 'ZFS Auto' installer bits as well
We'll want to wait for @andrew to confirm that we're good to go with ZFS on arm64 before adding that part.
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
35–36 | Experience at Netflix suggests that dd'ing the FAT partition is too limiting. We've gone to using a 50MB EFI partition because we have too much hardware that needs EFI drivers or applications to upgrade firmware or change settings... This suggests that only allowing an 800k partition may be too limiting... | |
73 | I'd like to disagree. MBR is the happening place on ARM and has been for long enough that it isn't going away anytime soon (too many ROM-based boot loaders are burned into the CPU/SoC). If you say that only in the context of EFI, then perhaps you're right. |
All reviewers comments have been applied.
Booting from ZFS have been removed for now.
Thank you for reviewing the code.
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
35–36 | Following your suggestion I will change the partition size to 50MB, for ARM64 only. I'll try to make it compilation option after freeze ends, for all archs that use EFI. | |
63 | True. For now I will remove zfs support now. I have just tested booting from ZFS and it is not possible for now: >> FreeBSD EFI boot block Loader path: /boot/loader.efi Initializing modules: ZFS UFS Probing 8 block devices......+..** done ZFS found the following pools: root UFS found 2 partitions Consoles: EFI console part0 isn't a logical partition, skipping part1 isn't a logical partition, skipping part4 isn't a logical partition, skipping Nommand line arguments: lUS_BLK_LOCK not completed Image base: 0x1ff7bb3000TUS_BLK_LOCK not completed EFI version: 2.40 EFI Firmware: Cavium Thunder cn88xx EFI sdk-test-tag-xxx-46-g8f94dfc Feb 12 2016 13:01:59 (rev 0.04) FreeBSD/arm64 EFI loader, Revision 1.1 (root@arm64-prime, Tue Jun 7 16:44:13 CEST 2016) Loading /boot/defaults/loader.conf / Synchronous Exception at 0x0000001FF7BB3FE0 Synchronous Exception at 0x0000001FF7BB3FE0 Synchronous Exception at 0x0000001FF7BB3FE0 |
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
35–36 | A problem with this is that boot1 is currently shipped as a pre-built FAT image, so would add a 50MB file to /boot. We really need to rework the installer to create the EFI filesystem and install boot1 into there rather than using a prebuilt image. |
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
35–36 | I was mistaken: this is the EFI partition size, not the size of the FAT filesystem it will contain, and does not have this problem. I've since made a similar change to amd64. |
usr.sbin/bsdinstall/partedit/partedit_arm64.c | ||
---|---|---|
35–36 | I let myself provide link to Your review: https://reviews.freebsd.org/D6935 |
Looks like it did not auto-close due to the indentation of the Differential Revision line in rS302025