Page MenuHomeFreeBSD

arm: Introduce MK_KERNEL_BIN to control generation of kernel.bin
ClosedPublic

Authored by imp on Mar 10 2023, 12:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 28 2024, 5:08 PM
Unknown Object (File)
Nov 28 2024, 5:07 PM
Unknown Object (File)
Nov 28 2024, 5:07 PM
Unknown Object (File)
Nov 28 2024, 5:07 PM
Unknown Object (File)
Nov 28 2024, 5:07 PM
Unknown Object (File)
Nov 28 2024, 5:06 PM
Unknown Object (File)
Nov 28 2024, 5:06 PM
Unknown Object (File)
Nov 28 2024, 5:06 PM
Subscribers

Details

Summary

It's sometimes desirable to generate kernel.bin and install it. While
the mainstream has moved on to UEFI booting on arm, some specialized
gear can't support it. For that gear, we unconditionally generate
kernel.bin. Add a knob so that WITH_KERNEL_BIN or WITHOUT_KERNEL_BIN
control its generation and installation. config files should add
'makeoptions WITH_KERNEL_BIN=t' to enable it. Since its use is
specialized, it is off by default now since the arm world has largely
moved on to UEFI.

It only affects arm and arm64 (since those are the only two that support
it).

Sponsored by: Netflix

Test Plan

Note: needs docs

Diff Detail

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

Event Timeline

imp requested review of this revision.Mar 10 2023, 12:33 PM
imp added reviewers: manu, mw.
sys/conf/kern.opts.mk
101

s/KERNEL_SYMBOLS/KERNEL_BIN/ no ?

SYMBOLS -> BIN, commit message tweaks

The only problem I see with disabling it by default is that we won't have kernel.bin in memstick images which can be used to boot on tegra board where this is the only possible way.

stupid missing && operator.

sorry -- too many update --- this one fixes a comment

fyi, original idea was provide (not-preferred) way how to (limited) boot FreeBSD on a board with a problematic u-boot that might be locked or need lots of GPL or Linux specific utilities. It was easy for arm64 (where any u-boot can handle a booti image that is generic and has an easy format), but it's hard for armv7, where bootm needs an external program and the resulting image is not generic - it has a built-in load and boot address.
from my current point of view something like user submake stubs will be better (in simple words - be may include and run user definable makefile fragment) -> so system make can try to run this fragment for postprocessing

This revision is now accepted and ready to land.Mar 22 2023, 6:53 AM

Yea, submake stubs would be better... but we don't have those yet :)