Page MenuHomeFreeBSD

kboot: Add MK_LOADER_KBOOT
ClosedPublic

Authored by imp on Dec 16 2021, 4:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 18, 10:58 AM
Unknown Object (File)
Feb 20 2024, 2:08 AM
Unknown Object (File)
Feb 14 2024, 10:21 AM
Unknown Object (File)
Feb 14 2024, 10:21 AM
Unknown Object (File)
Feb 14 2024, 10:21 AM
Unknown Object (File)
Feb 14 2024, 10:21 AM
Unknown Object (File)
Feb 14 2024, 9:32 AM
Unknown Object (File)
Jan 23 2024, 7:19 AM
Subscribers

Details

Summary

Control building of KBOOT same as we do for uboot.

Sponsored by: Netflix

Test Plan

First of a series of commit to make kboot MI with and MD component.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43655
Build 40543: arc lint + arc unit

Event Timeline

imp requested review of this revision.Dec 16 2021, 4:59 PM
This revision is now accepted and ready to land.Dec 16 2021, 5:04 PM
luporl requested changes to this revision.Dec 22 2021, 12:48 PM
luporl added inline comments.
share/mk/src.opts.mk
316

This will break powerpc64le builds, that currently can't build kboot.

So this line should probably be something like:

.if ${__T} != "powerpc64"

Another option is to create a kboot/ldscript.powerpcle file and adjust the Makefile to use it instead, when on powerpc64le.
The contents of this file would be almost identical to kboot/ldscript.powerpc, just replacing "powerpc" occurrences by "powerpcle".

I've tested this change and it produces a "working" kboot binary, which can be useful to experiment with on Petitboot, on POWER8/POWER9 machines, now that MK_LOADER_FORCE_LE is gone. This "working" binary is able to start and most of loader's commands work, but I was unable to load a kernel with it (segfaults when trying to list a partition).

This revision now requires changes to proceed.Dec 22 2021, 12:48 PM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 30 2021, 11:32 PM
This revision was automatically updated to reflect the committed changes.