Page MenuHomeFreeBSD

cross-build-macos.sh - build FreeBSD/arm64 from source on MacOS for MacOS 14.x and later
Needs ReviewPublic

Authored by wosch on Jun 29 2025, 10:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 15, 9:36 PM
Unknown Object (File)
Mon, Nov 10, 6:38 PM
Unknown Object (File)
Mon, Nov 3, 7:38 AM
Unknown Object (File)
Fri, Oct 31, 10:58 PM
Unknown Object (File)
Oct 22 2025, 11:47 PM
Unknown Object (File)
Oct 20 2025, 2:55 PM
Unknown Object (File)
Oct 20 2025, 1:11 AM
Unknown Object (File)
Oct 19 2025, 11:10 AM

Details

Reviewers
olivier
Summary

This script make it easy to compile FreeBSD on MacOS out of the box.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

wosch created this revision.
olivier requested changes to this revision.EditedJun 30 2025, 8:53 AM
olivier added a subscriber: olivier.

What the advantage of this tools vs the existing tools/build/make.py ?

This revision now requires changes to proceed.Jun 30 2025, 8:53 AM

very cool :-) maybe optional iso/usb/vm image creation with selectable format would be useful too? :-)

What the advantage of this tools vs the existing tools/build/make.py ?

./tools/build/cross-build-macos.sh is a wrapper for ./tools/build/make.py on macOS - to make it easy to compile FreeBSD on macOS.

  • support multiple LLVM versions (clang19 and clang20)
  • supports Apple M1 arm64 and Apple/Intel
  • supports concurrent cross building (e.g. current and stable at the same time with same MAKEOBJDIRPREFIX)
  • supported make targets: buildworld; buildkernel; packages; -C./release ftp
  • by default it runs fast (no toolchain etc.) for buildworld + buildkernel
  • add a help message: ./cross-build-macos.sh help
  • keep up to 32 logfiles
  • add a debug mode (debug=1)
  • keep track of good/bad git commits in .cross-build-macos-git-*
  • supported branches: main, stable/15 (buildworld + buildkernel)
  • tested on macOS 14.x, 15.x, 26.x