Skip to content
Dave Cottlehuber edited this page Oct 27, 2021 · 4 revisions

Rough Notes

This process will be reduced over time, and merged into either poudriere-image(8) or the official FreeBSD release process.

This creates a efi.qcow image, which you should rename to include date of build & truncated sha of commit:

  • FreeBSD-14.0-CURRENT-arm64-aarch64-20211026-a40784e-rescue.qcow2

This image (currently) is manually modified and a functioning zroot.zfs appended to it - hacky but quicker than perfecting poudriere image at short notice.

You can just grab mine

appending a working zroot

This is probably correct, but done from rough notes.

# truncate -s 5G efi.fat
# mdconfig -u md99 efi.fat
# gpart add -t freebsd-zfs -a 1m -l zfs0 md99
# zpool create \
  -o failmode=continue \
  -O atime=off \
  -O compression=zstd-9 \
   -O checksum=skein \
  -R /mnt \
zroot /dev/md99p2
# zfs recv -Fuvs zroot > /some/existing/zroot.zfs
# zpool set bootfs=zroot/ROOT/default zroot
# zpool export zroot
# mdconfig -du md99
# qemu-img convert -c -p -f raw -O qcow2 efi.fat FreeBSD-14.0-CURRENT-arm64-aarch64-20211027-a40784e-phat.qcow2

uploading the image into a bucket

I obtained a pre-authorised token and then did this via curl.

$ curl -vXPUT -u "dch@...:(vault read -field=auth_token secret/oci/...)" \
  (vault read -field=pre_authed_url secret/oci/...) \
  --upload-file ...phat.qcow2

This takes a while.

create a custom image

  • create a new custom image in the OCI console (image type qcow2, use native mode)

  • this takes 15-20 minutes to finish

  • once complete, modify image properties:

  • remove VFIO from NIC attachment type or it won't boot)

  • set compatible shapes to BM.Standard.A1.160 and VM.Standard.A1.Flex

the image is now ready to use. Copy the OID and put it into source_id in the main.tf file.

terraform

TBD. Amend all the dave-specific settings with your own.

Then it will Just Work.

building tarballs

These are built in the usual way from https://git.sr.ht/~dch/src/tree/works-on-my-machine which is https://cgit.freebsd.org/src/commit/?id=1fec1fa and a further few commits, only one of which is still needed. I built these on FreeBSD arm64, not amd64.

tag: works-on-my-machine
a40784e6acc5 iscsid: default conn_max_recv_data_segment_length to our request (fixed)
93b8d80e6864 wip: skip 32 bit acpi stuff on arm64 (fixed)
59ff0edf52ab Raise SIGBUS on external error (not required)
c5584cb735d7 acpi: Pass the ACPI ID when reading the ACPI domain (fixed)
044d9822d5b0 wip: PR#259152 jhb@ (fixed)
56f4ac740ef7 wip: skip NUMA cpu locality for the moment (dropped)
4efd4169943d Hack the isboot iBFT code into FreeBSD (required) <--------------------------------
48d94c54e4b1 dhclient: add flag to run as root (not currently needed)
Clone this wiki locally