Page MenuHomeFreeBSD

boot1sa.chrp: A libsa-based first-stage loader for PPC
AcceptedPublic

Authored by ivy on Fri, Apr 17, 11:22 AM.
Tags
None
Referenced Files
F153131352: D56465.diff
Sun, Apr 19, 9:27 AM
Unknown Object (File)
Sat, Apr 18, 5:34 AM
Unknown Object (File)
Sat, Apr 18, 4:39 AM

Details

Reviewers
manu
jhibbits
tsoome
imp
Group Reviewers
Loader
PowerPC
Summary

Add boot1sa.chrp, a first-stage loader for powerpc that uses libsa
and libofw instead of its own implementation. This is quite a bit
larger than boot1.chrp (~230kB vs 31kB), but we have 800kB of space
available, so that should be fine.

Only pSeries is supported for now; the HFS wrapper required for
PowerMac isn't included.

Sponsored by: https://www.patreon.com/bsdivy

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72283
Build 69166: arc lint + arc unit

Event Timeline

ivy requested review of this revision.Fri, Apr 17, 11:22 AM

the purpose of this is to enable ZFS root support on powerpc, but for ease of review, i'll do the ZFS bits in a separate commit.

jhibbits added a subscriber: jhibbits.

If it boots, ship it!

Regarding the HFS bits, it should be as simple as updating BOOT1_SIZE in generate-hfs.sh and regenerating the HFS template (you need hfsutils installed to do that).

This revision is now accepted and ready to land.Fri, Apr 17, 2:14 PM

neat! how do I build/install this to test this in pseries VMs?

neat! how do I build/install this to test this in pseries VMs?

build it, then install it with gpart:

gpart bootcode -i <part> -b /boot/boot1sa.elf <geom>

alternatively you can just dd it directly into your prep-boot partition.

once this is done, i'm planning to write a manpage for boot1{,sa}.chrp since i'm not sure this is documented anywhere right now.