Page MenuHomeFreeBSD

New port: sysutils/opensbi: OpenSBI, a RISC-V bootloader and firmware
ClosedPublic

Authored by mhorne on Oct 26 2019, 9:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 1:50 PM
Unknown Object (File)
Fri, Nov 22, 1:50 PM
Unknown Object (File)
Fri, Nov 22, 12:10 PM
Unknown Object (File)
Wed, Nov 20, 2:22 PM
Unknown Object (File)
Thu, Nov 14, 10:07 AM
Unknown Object (File)
Wed, Nov 13, 12:25 AM
Unknown Object (File)
Sun, Nov 10, 6:29 PM
Unknown Object (File)
Sun, Nov 10, 6:18 PM

Details

Summary

OpenSBI is a RISC-V bootloader and set of firmware libraries that
implement the RISC-V Supervisor Binary Interface (SBI) required for
supervisor targets, such as the FreeBSD kernel.

This port installs the OpenSBI libraries that can be used for
development of custom firmwares, as well as the firmware files for the
QEMU virt and SiFive U540 platforms.

Test Plan

Passes portlint.
Builds fine in poudriere.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

philip added a subscriber: philip.

I also tested this in Poudriere on 12 and HEAD.

Looks good to me!

This revision is now accepted and ready to land.Oct 27 2019, 2:29 AM
linimon retitled this revision from New port: OpenSBI a RISC-V bootloader and firmware to New port: sysutils/opensbi: OpenSBI, a RISC-V bootloader and firmware.Oct 27 2019, 6:20 AM

Of course if it were me (with my decades-long aversion to repeating hardcoded strings) I would have done it as, e.g.:

QEMU_VIRT_PLATFORM=qemu/virt
[...]
${MAKE_CMD} -C ${WRKSRC} PLATFORM=${QEMU_VIRT_PLATFORM} I=${STAGEDIR}${DATADIR} \
[...]

Reduce hardcoded strings.

This revision now requires review to proceed.Oct 27 2019, 3:12 PM

This might be too aggressive, but it can be folded more: https://gist.github.com/e48b2311f72d655b0f88c7c798e6e722

This might help adding more platforms in the future, but I'm fine with the original version.

This revision is now accepted and ready to land.Oct 27 2019, 3:34 PM
sysutils/opensbi/Makefile
19 โ†—(On Diff #63719)

+= here is not necessary, = is enough.

21 โ†—(On Diff #63719)

Also here.

Use lhwsu's simplification.

This revision now requires review to proceed.Oct 27 2019, 5:25 PM

Feel free to commit this with my approval, just modify the += nit before committing.

This revision is now accepted and ready to land.Oct 27 2019, 5:27 PM

This might be too aggressive, but it can be folded more: https://gist.github.com/e48b2311f72d655b0f88c7c798e6e722

This might help adding more platforms in the future, but I'm fine with the original version.

I think it's good. As far as I can tell, all platforms will produce the same firmware files.

Just to note, the platforms I've included now are the ones that are currently relevant to running FreeBSD. I could include the others (andes/ae350, kendryte/k210, and ariane-fpga) if we think that's useful.

Just to note, the platforms I've included now are the ones that are currently relevant to running FreeBSD. I could include the others (andes/ae350, kendryte/k210, and ariane-fpga) if we think that's useful.

We can add them when them become relevant to FreeBSD, or, add them as default-off options.