so i'm looking at supporting ZFS boot on FreeBSD/powerpc64.
-
so i'm looking at supporting ZFS boot on FreeBSD/powerpc64. i think this should actually be quite simple: we have a standalone utility library for the boot loaders called libsa which supports reading from ZFS, and we already have the glue to hook libsa up to OpenFirmware since loader(8) uses that for UFS boot.
the current boot process is that OFW loads boot1.chrp from the prep-boot partition, then boot1.chrp finds the UFS partition, loads /boot/loader from there and starts it, then /boot/loader loads the kernel (+modules) and boots it.
most of the work will be writing a new boot1.chrp that uses libsa instead of its own hand-rolled UFS code, which will automatically support reading ZFS as well once we enable ZFS in libsa for powerpc. the new boot1.chrp will be quite a bit larger (it's currently 31KB), but we have 800KB of physical address space to play with, so that should be fine. (to make it any larger, we'd have to change the kernel load address.)
this doesn't cover the bsdinstall changes needed to support installing on ZFS, which i'm trying to avoid looking at since i dislike working on bsdinstall...
-
so i'm looking at supporting ZFS boot on FreeBSD/powerpc64. i think this should actually be quite simple: we have a standalone utility library for the boot loaders called libsa which supports reading from ZFS, and we already have the glue to hook libsa up to OpenFirmware since loader(8) uses that for UFS boot.
the current boot process is that OFW loads boot1.chrp from the prep-boot partition, then boot1.chrp finds the UFS partition, loads /boot/loader from there and starts it, then /boot/loader loads the kernel (+modules) and boots it.
most of the work will be writing a new boot1.chrp that uses libsa instead of its own hand-rolled UFS code, which will automatically support reading ZFS as well once we enable ZFS in libsa for powerpc. the new boot1.chrp will be quite a bit larger (it's currently 31KB), but we have 800KB of physical address space to play with, so that should be fine. (to make it any larger, we'd have to change the kernel load address.)
this doesn't cover the bsdinstall changes needed to support installing on ZFS, which i'm trying to avoid looking at since i dislike working on bsdinstall...
the existing boot1.chrp + libsa + libofw is 254KB, so i think we're fine. also, it builds! just need to wait for qemu to build so i can test it...
-
S stefano@mastodon.bsd.cafe shared this topic