Page MenuHomeFreeBSD

Modify nanobsd/defaults.sh to reduce buildsize, buildtime and increase imgsize to fit.
ClosedPublic

Authored by mr on Apr 18 2025, 10:00 AM.
Tags
None
Referenced Files
F149251188: D49885.id.diff
Mon, Mar 23, 7:19 AM
Unknown Object (File)
Fri, Mar 20, 4:20 PM
Unknown Object (File)
Fri, Mar 20, 6:40 AM
Unknown Object (File)
Thu, Mar 19, 7:41 AM
Unknown Object (File)
Tue, Mar 17, 4:57 PM
Unknown Object (File)
Fri, Mar 6, 10:28 AM
Unknown Object (File)
Sun, Mar 1, 2:24 PM
Unknown Object (File)
Sun, Mar 1, 3:32 AM

Details

Summary

Not building debug symbols and tests reduces _.w/ from 1465 to 503 MB.
Increasing the mediasize to 6000000 let the image be built.
Otherwise I get:
...
00:33:58 build code slice 00:33:58 # log: /usr/obj/nanobsd.full/_.cs

/usr/obj/nanobsd.full/_.mnt: write failed, filesystem is full

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63614
Build 60498: arc lint + arc unit

Event Timeline

mr requested review of this revision.Apr 18 2025, 10:00 AM
mr created this revision.
This revision is now accepted and ready to land.Apr 18 2025, 6:48 PM

What about also adding:

WITHOUT_LIB32=true
WITHOUT_KERNEL_SYMBOLS=true

It should fit with:

NANO_MEDIASIZE=4000000

Reference: https://github.com/freebsd/freebsd-src/pull/964

Additionally, if you really wan to keep the NANO_MEDIASIZE unchanged, you can also add WITHOUT_TOOLCHAIN=true.
For self reference, EC2 images are built with:

  • WITHOUT_DEBUG_FILES=YES
  • WITHOUT_KERNEL_SYMBOLS=YES
  • WITHOUT_LIB32=YES
  • WITHOUT_TESTS=YES
  • WITHOUT_LLDB=YES

But these options would only fit with 4000000, changing the last option, WITHOUT_LLDB, to the entire WITHOUT_TOOLCHAIN, would make it still fit 2000000. But I don't know where to draw the line when removing things by default for NanoBSD.

Followed the suggestions.
Compile tested and seems to fit...

Updating D49885: Modify nanobsd/defaults.sh to reduce buildsize, buildtime and

increase imgsize to fit.

This revision now requires review to proceed.Apr 21 2025, 5:07 PM

(sorry, this got lost in my busy queue)

This revision is now accepted and ready to land.Aug 6 2025, 8:34 PM