]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Allow bootstrapping makefs on older FreeBSD hosts and Linux/macOS
authorAlex Richardson <arichardson@FreeBSD.org>
Mon, 27 Jan 2020 12:02:41 +0000 (12:02 +0000)
committerAlex Richardson <arichardson@FreeBSD.org>
Mon, 27 Jan 2020 12:02:41 +0000 (12:02 +0000)
commit162ae9c834f6d9f9cb443bd62cceb23e0b5fef48
tree193998f4d8fae21499754add6f67e527b3b3b389
parent9ea85092d93a3e993f0bad9718adc9e28fa328f8
Allow bootstrapping makefs on older FreeBSD hosts and Linux/macOS

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.

We also have to avoid using the IO_SYNC macro since that may not be
available. In makefs it is only used to switch between calling
bwrite() and bdwrite() which both call the same function. Therefore we
can simply always call bwrite().

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.

Reviewed By: brooks
Differential Revision: https://reviews.freebsd.org/D23201
sbin/newfs_msdos/mkfs_msdos.c
sys/fs/msdosfs/msdosfsmount.h
tools/build/Makefile
usr.sbin/makefs/msdos/msdosfs_denode.c
usr.sbin/makefs/msdos/msdosfs_vnops.c