Page MenuHomeFreeBSD

Allow xinstall and makefs to be crossbuilt on Linux and Mac
ClosedPublic

Authored by arichardson on Nov 30 2017, 5:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 7:48 AM
Unknown Object (File)
Dec 20 2023, 4:50 AM
Unknown Object (File)
Dec 4 2023, 7:29 AM
Unknown Object (File)
Nov 25 2023, 8:30 PM
Unknown Object (File)
Nov 22 2023, 4:04 PM
Unknown Object (File)
Nov 17 2023, 1:30 PM
Unknown Object (File)
Nov 13 2023, 4:39 AM
Unknown Object (File)
Nov 12 2023, 1:46 AM
Subscribers

Details

Summary

I need these tools in order to install the crossbuilt FreeBSD and create a
disk image. Linux does not have a st_flags in struct stat so unfortunately
I need a bunch of ugly ifdefs. The resulting binaries allow me to
sucessfully install a MIPS64 world and create a disk-image that boots.

Diff Detail

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

Event Timeline

LGTM, but I'd wait for @emaste to take a look as he's been working on makefs.

usr.bin/xinstall/xinstall.c
1003 ↗(On Diff #36010)

I'd preserve the blank line.

usr.sbin/makefs/ffs.c
322 ↗(On Diff #36010)

I'd GC this block in a separate commit. It's been "not yet" since 2008...

This revision is now accepted and ready to land.Nov 30 2017, 7:38 PM
This revision was automatically updated to reflect the committed changes.

Why not the less ugly #ifdef UF_SETTABLE?

you wouldn't need the nbtool junk either.

In D13307#292355, @imp wrote:

Why not the less ugly #ifdef UF_SETTABLE?

you wouldn't need the nbtool junk either.

I didn't know there was a macro I could check that works across operating systems to check for st_flags availability. It seems like macOS has the UF_SETTABLE in sys/stat.h and Linux doesn't so I could remove the nbtool changes. I'll post a follow up patch tomorrow.

In D13307#292355, @imp wrote:

Why not the less ugly #ifdef UF_SETTABLE?

you wouldn't need the nbtool junk either.

I didn't know there was a macro I could check that works across operating systems to check for st_flags availability. It seems like macOS has the UF_SETTABLE in sys/stat.h and Linux doesn't so I could remove the nbtool changes. I'll post a follow up patch tomorrow.

Excellent! Glad I could suggest something. I think there used to be ifdefs there like that back in the net2 / bsd4.4 days...

Also, --include nbtool_config.h could help as well on the !FreeBSD platforms.