Page MenuHomeFreeBSD

kboot: add minmalist init functionality
ClosedPublic

Authored by imp on Aug 26 2022, 6:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 7:35 PM
Unknown Object (File)
Thu, Oct 31, 5:20 PM
Unknown Object (File)
Sun, Oct 27, 10:51 AM
Unknown Object (File)
Sat, Oct 19, 4:27 PM
Unknown Object (File)
Sat, Oct 19, 4:26 PM
Unknown Object (File)
Sat, Oct 19, 4:26 PM
Unknown Object (File)
Sat, Oct 19, 4:26 PM
Unknown Object (File)
Sat, Oct 19, 4:26 PM
Subscribers

Details

Summary

It is desirable to run kboot as the first program in some LinuxBoot
environments. This is the traditional "pid 1" or "init" program. When
running as pid 1. rovide a minimal environment based on what sysvinit,
u-root, initramfs-tools and other like projects do. We mount /dev, /sys,
/proc, make symlinks from /dev/fd to /dev/proc, and create /tmp, /run,
and /var. We also setup stdin/out/err to the console, set the tty
characteristics of same and block the appropriate signals.

This is indended as an environment that never does a fork/exec. If
that's required, the process groups, session leaders and all things
POSIX terminal handlers will need to be added.

Unlike the general purpose linux projects in this area, no attempt is
made to support very old kernels.

When not pid 1, we skip all of the above.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningstand/kboot/init.c:83SPELL1Possible Spelling Mistake
Unit
No Test Coverage
Build Status
Buildable 47146
Build 44033: arc lint + arc unit

Event Timeline

imp requested review of this revision.Aug 26 2022, 6:18 PM
stand/kboot/init.c
5

We seem to typically put the SPDX tag first. Also we ought to be able to use © now

stand/kboot/init.c
5

The most typical use in the wider open source is copyright then SPDX, though it's a 60/40 or 70/30 more typical.
We put the SPDX tag before the license, which we originally thought included the copyright (it does not).
For these reasons, I've also put it in this order in the proposed license policy. Given the larger context, I'm inclined to break from our original addition of SPDX tags in this way (we have a number of other errors in what we've tagged, including using tags that have been obsoleted and don't mean what we think they mean), so changes in this area aren't unwarranted.

I'm still hesitant to use © because at least on my mac I have to jump through hoops to insert it.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 1 2022, 5:11 PM
This revision was automatically updated to reflect the committed changes.