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
Unknown Object (File)
Mon, Sep 29, 2:48 AM
Unknown Object (File)
Fri, Sep 19, 9:05 AM
Unknown Object (File)
Thu, Sep 18, 1:59 PM
Unknown Object (File)
Wed, Sep 17, 7:43 AM
Unknown Object (File)
Tue, Sep 16, 7:34 AM
Unknown Object (File)
Sat, Sep 13, 9:33 PM
Unknown Object (File)
Sat, Sep 13, 7:30 AM
Unknown Object (File)
Fri, Sep 12, 5:20 PM

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