Page MenuHomeFreeBSD

Allow bootstrapping makefs on older FreeBSD hosts and Linux/mac
ClosedPublic

Authored by arichardson on Jan 16 2020, 10:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 11, 10:46 PM
Unknown Object (File)
Jan 5 2024, 4:45 AM
Unknown Object (File)
Dec 20 2023, 2:27 AM
Unknown Object (File)
Nov 8 2023, 12:34 PM
Unknown Object (File)
Nov 7 2023, 9:36 PM
Unknown Object (File)
Nov 7 2023, 1:29 AM
Unknown Object (File)
Nov 5 2023, 6:54 AM
Unknown Object (File)
Oct 7 2023, 11:31 AM
Subscribers

Details

Summary

In order to do so we need to install the msdosfs headers to the bootstrap
sysroot and avoid includes of kernel headers that may not exist on every
host (e.g. sys/lockmgr.h). This change should allow bootstrapping of makefs
on FreeBSD 11+ as well as Linux and macOS.

For our CheriBSD builds we always bootstrap makefs by setting
LOCAL_XTOOL_DIRS='lib/libnetbsd usr.sbin/makefs' and use the makefs binary
from the build tree to create a bootable disk image.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks added inline comments.
usr.sbin/makefs/msdos/msdosfs_denode.c
294 ↗(On Diff #66823)

This change should probably be explained in the commit message.

This revision is now accepted and ready to land.Jan 16 2020, 11:01 AM
usr.sbin/makefs/msdos/msdosfs_denode.c
294 ↗(On Diff #66823)

Yeah, makes sense. In the makefs wrapper bwrite and bdwrite are the same. However, Linux does not have a IO_SYNC macro, so to bootstrap there I just always call bwrite.