Page MenuHomeFreeBSD

build/development.7: System building examples
Needs ReviewPublic

Authored by ziaee on Jan 26 2025, 7:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 8, 10:44 PM
Unknown Object (File)
Tue, Mar 4, 9:34 AM
Unknown Object (File)
Fri, Feb 21, 3:07 PM
Unknown Object (File)
Feb 13 2025, 4:40 PM
Unknown Object (File)
Feb 12 2025, 5:34 AM
Unknown Object (File)
Feb 6 2025, 7:33 PM
Unknown Object (File)
Feb 6 2025, 3:59 PM
Unknown Object (File)
Feb 6 2025, 7:20 AM
Subscribers

Details

Reviewers
carlavilla
emaste
mhorne
Group Reviewers
manpages
Summary
build/development.7: System building examples

The system reference manual is notably missing building a custom kernel.
To polish the idea of a complete, well-integrated system, the integrated
doc could use this. Upon reviewing development(7), and build(7), they
needed some work, and I thought it was better to work on them together.

build(7):
+ refactor introduction for presentation
+ EXAMPLES: explain build(7)ing the system
+ CAVEATS: import common cases from src/UPDATING
+ BUGS: instructions for build(7)ing the system are proliferated
+ fix some weird line wrapping/indentation

development(7):
- system build(7)ing examples moved to build(7)
+ mention github
+ add examples for applying patches

MFC after:              3 days
Reported by:            emaste (manpages needs a kernconf example)
Reported by:            imp (kernconfs include and go from there)
Differential Revision:  https://reviews.freebsd.org/D48693
Test Plan
# apply patch
sh src/tools/tools/git/git-arc.sh patch D48693
# look at rendered manual on various consoles, consider split screen with existing
MANWIDTH=80 man share/man/man 7/development.7
MANWIDTH=59 man share/man/man 7/development.7
# evaluate for accuracy, consistency, location, flow, style, tenseness, omission
# test examples
# lint manual
mandoc -Tlint share/man/man 7/development.7

(I'm trying to flesh manage testing procedure out to eventually become a doc or something)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ziaee requested review of this revision.Jan 26 2025, 7:00 PM

Not copy.

We recommend using include with either device or nodevice to include or exclude devices.. ditto for option and nooption

The description says build examples are in build(7) and release(7).
I think build(7) is a very sensible place for them, and I would like to
move this entire section there.

ziaee retitled this revision from development.7: Document customizing KERNCONF to build/development.7: System building examples.
ziaee edited the summary of this revision. (Show Details)

Here's what I've got so far. I don't have any working non-amd64 devices to test many of these options on.

When testing this I discovered, interestingly enough, the kernel won't build with just nodevice sound, and I loose trackpad support in X on MINIMAL.

Oops, I forgot to make the patch with -U9999 like bz taught me.
That, is an excellent example which I think is very appropriate to put in development(7).

Oops, I forgot to make the patch with -U9999 like bz taught me.
That, is an excellent example which I think is very appropriate to put in development(7).

You can also use git-arc(1) to avoid the manual diffing. John Baldwin has written an article on using it: https://freebsdfoundation.org/wp-content/uploads/2021/11/FreeBSD-Code-Review-with-git-arc.pdf

Thanks! That's how I create them, but this one changed too much for git-arc.sh update HEAD.

Thanks! That's how I create them, but this one changed too much for git-arc.sh update HEAD.

Does this mean the patch doesn't apply cleanly on main?

No, I don't understand exactly what it does, but if the commit changes too much, git arc can't update it. You can apply it with git-arc.sh patch D48693.

No, I don't understand exactly what it does, but if the commit changes too much, git arc can't update it. You can apply it with git-arc.sh patch D48693.

I'm sure jhb and i would be interested in a test case.

More likely your first line of the commit messasge.

In D48693#1110685, @imp wrote:

No, I don't understand exactly what it does, but if the commit changes too much, git arc can't update it. You can apply it with git-arc.sh patch D48693.

I'm sure jhb and i would be interested in a test case.

More likely your first line of the commit messasge.

Yes, I think that's exactly it. git-arc just lost a revision upon correcting the commit message title from "ports.7/history: Don't forget MacOS" to "ports.7/history: Don't forget macOS". After editing the commit title through the Phabricator web interface, git-arc was able to find and update it again.