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, Apr 1, 1:12 PM
Unknown Object (File)
Mar 3 2024, 12:37 AM
Unknown Object (File)
Mar 3 2024, 12:36 AM
Unknown Object (File)
Mar 3 2024, 12:36 AM
Unknown Object (File)
Mar 3 2024, 12:36 AM
Unknown Object (File)
Mar 3 2024, 12:36 AM
Unknown Object (File)
Mar 2 2024, 1:56 PM
Unknown Object (File)
Feb 9 2024, 10:17 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

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 27239
Build 25503: arc lint + arc unit

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

+= here is not necessary, = is enough.

21

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.