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)
Tue, Dec 17, 3:23 AM
Unknown Object (File)
Sun, Dec 15, 9:46 PM
Unknown Object (File)
Fri, Dec 13, 1:57 PM
Unknown Object (File)
Nov 16 2024, 12:26 PM
Unknown Object (File)
Oct 28 2024, 1:45 AM
Unknown Object (File)
Oct 27 2024, 9:06 AM
Unknown Object (File)
Oct 6 2024, 8:57 AM
Unknown Object (File)
Oct 2 2024, 12:25 PM
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 13201
Build 13442: arc lint + arc unit

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

I'd preserve the blank line.

usr.sbin/makefs/ffs.c
322

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.