summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
44 hoursnanobsd: Fix typosJose Luis Duran
MFC after: 1 week
44 hoursnanobsd: Add a NO_ROOT build optionJose Luis Duran
Add a -U option to build NanoBSD images without root privileges. It relies on makefs/mkimg and metalog (mtree) files, similar to what release engineering uses to build images. Keep the current way to build NanoBSD images untouched. Once this method gets battle tested, it may be used to build images as root as well. Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48793
44 hoursnanobsd: Add a provisional populate /data functionJose Luis Duran
Add a provisional _populate_data_part function. It populates the optional /data partition, but using makefs(8), which is more in-line with what release engineering uses to create images. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48792
44 hoursnanobsd: Add a provisional populate /cfg functionJose Luis Duran
Add a provisional _populate_cfg_part function. It populates the /cfg partition, but using makefs(8), which is more in-line with what release engineering uses to create images. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48791
44 hoursnanobsd: Add a provisional populate_part functionJose Luis Duran
Add a _populate_part(ition) function that mimics the current populate_slice. Note however, that this function is not backward-compatible with populate_slice, hence the different name. A "_" is prepended to signal that it still experimental. It can be used to populate the /cfg and /data partition using makefs(8). Initially not wired. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48790
44 hoursnanobsd: Add a nano_makefs functionJose Luis Duran
Add a NANO_MAKEFS global variable with options equivalent to NANO_NEWFS to be used with a nano_makefs function for creating images. Also add a function that adjusts the code size calculation, so makefs -s won't error about the minimum rounded size. Ideally this shim should be removed, therefore the suspicious _xxx prefix. Initially not wired. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48789
44 hoursnanobsd: Switch the / partition in fstabJose Luis Duran
Introduce a function tgt_switch_root_fstab() that switches the root partition in the target file system tab file. Initially not wired. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48788
44 hoursnanobsd: Add a NANO_TIMESTAMP variableJose Luis Duran
Initially not wired, this variable will hold the time stamp for all the files of the final image. By default uses the last commit time stamp, if empty, it will use the start time of the NanoBSD build. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48787
44 hoursnanobsd: Add a function to create directoriesJose Luis Duran
Add tgt_dir(), that creates and adds directory entries to the metalog specification file. Initially not wired. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48786
44 hoursnanobsd: Prefer tgt_touch() instead of touchJose Luis Duran
Prefer tgt_touch() as it adds an entry to the metalog file. Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48785
44 hoursnanobsd: Set the proper mode for /tmpJose Luis Duran
The correct mode for /tmp is 1777, keep the same mode when symlinking it to /var/tmp. Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48784
44 hoursnanobsd: Prefer tgt_dir2symlink() to create symlinksJose Luis Duran
Prefer tgt_dir2symlink() to create symlinks, as it has the benefit of appending the entry to the metalog file. Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48783
44 hoursnanobsd: Make tgt_dir2symlink() take a modeJose Luis Duran
Make tgt_dir2symlink() take an optional third argument that sets the mode. By default, assume an absolute mode of 0777, to maintain backward compatibility. Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48782
44 hoursnanobsd: Add uname/gname to the specJose Luis Duran
Also include the default NanoBSD uname/gname in the specification file. By default, NANO_DEF_UNAME and NANO_DEF_GNAME map to root and wheel respectively. Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48781
44 hoursnanobsd: Prefer nano_umount to umountJose Luis Duran
nano_umount[^1] is a convenience routine used to override issues with umount(8) without changing the nanobsd.sh source code. There were a few places where it was not being used. [^1]: Introduced in 6d12b61a88a6 ("Add a routine for easy workaround any umount issues w/o hacking nanobsd.sh.") Reviewed by: imp, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48780
2 dayslibc: drop NO_FP_LIBC supportXin LI
NO_FP_LIBC was added in 2004 to save space by disabling FP support in *printf()/*scanf(). The size benefit is negligible on modern systems and conflicts with assumptions made by current base utilities. Remove the option and always build libc with floating-point support. Reported by: Oskar Holmlund <eovholmlund at gmail com> MFC after: 2 weeks
3 daysexterr: Sort output from make_libc_exterr_cat_filenames.shMark Johnston
Otherwise the script may permute the order of entries in the file since find(1) output is not stable. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54669
4 daysdepend-cleanup.sh: Clean up the old arm64 memset.SAndrew Turner
This has moved from a generated file in objdir to the source tree. Remove the old file and any .depend files that reference it. Reviewed by: bapt (via IRC) Fixes: 41ccf82b29f3 ("libc/aarch64: Use MOPS implementations of memcpy/memmove/memset where availble") Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54729
5 daysncurses: merge update to ncurses 6.6Baptiste Daroussin
6.6 is ABI compatible with 6.5 (tested with abidiff) Remove html documentation to ease updates MFC After: 1 month
7 dayssrc.opts: Introduce MK_SOUNDChristos Margiolis
PR: 291853 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: zarychtam_plan-b.pwste.edu.pl, markj Differential Revision: https://reviews.freebsd.org/D54456
10 daystools: remove powerpcspeMinsoo Choo
As reported on the freebsd-announce mailing list[1] FreeBSD is continuing to retire 32-bit support. Remove powerpcspe from boot test tools. [1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: jhibbits, emaste Pull request: 698d3c98d8f5814f705908d5bc6d930e3d4c4eda
10 dayscam: Dtrace scripts to help diagnose weird thingsWarner Losh
These are sample dtrace scripts that likely need to be modified for whatever problem you are chasing. Unfortuneately, you have to read the driver extensively to understand them or how to use them. But studying the completion routine of mpr/mps will help understand many of the error and recovery paths. Sponsored by: Netflix
11 daystools/cam: Start to add the testing tools for CAMWarner Losh
Create a directory for testing tools arond CAM. These are snippets of what will eventually be camio. At the moment, it was written using fbt traces. This is OK, but fragile, so they need to be re-written with the cam provider. cam_all_but_scsi.d is the first step. It shows how to do this with the new cam dtrace provider. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54472
11 daysExtend the script to collect gprof dataGeorge V. Neville-Neil
While we're at it, switch to simple waiting from communicate() calls.
13 daysSplit counting from sampling.George V. Neville-Neil
13 daysCorrect the data collection arguments. Add proper tempdirs.George V. Neville-Neil
14 daysgit-arc: Try to improve documentationMark Johnston
When I originally wrote git-arc, the usage string was the documentation. Later, a man page was added, largely copied from the usage string. Over time they have diverged slightly. It is silly to have two copies of the same information, so let's make the man page the source of truth. While here, document some options for git-arc-patch and rewrite a few sentences here and there in a way that I hope is clearer. Reviewed by: ziaee, ngie, adrian Differential Revision: https://reviews.freebsd.org/D54405
14 daysgit-arc: Try to make patching more usefulMark Johnston
Add a raw mode, which fetches the patch file and applies it manually rather than using arc patch. This is handy because arc patch will always try to fetch your remotes if it can't find the base commit in your repo (even if you ask it not to make a commit). This is basically unusable in some of my workspaces where I have 20+ remotes configured, some of which may be unreachable. Add a stack mode, which causes git-arc to recursively apply parent revisions, going up the patch stack. Thus, to apply a full patch stack, just apply the final patch with -s. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D54403
2026-01-05Start adding an exercise mode for programs under test.George V. Neville-Neil
In exercise mode we collect data for every available counter on a program and keep all of that in a directory in /tmp.
2026-01-05Convert fully to Python 3. Remove licence text, only keepGeorge V. Neville-Neil
SPDX. Update to use argparse rather than OptionParser (now deprecated).
2025-12-31depend-cleanup.sh: Reduce repetitionDag-Erling Smørgrav
MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54329
2025-12-31depend-cleanup: Force a clean build when options changeDag-Erling Smørgrav
Similar to the build epoch check, cache a list of source options in the object tree, and force a clean build if the cached list does not match the current list, after filtering out options which are known not to affect the build (e.g. CLEAN, TESTS, WARNS). This also adds a DEPEND_CLEANUP option (which defaults to yes unless the CLEAN option is set) which can be used to skip depend-cleanup for faster incremental builds. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52011
2025-12-29Fix typo in tools/build/options/WITH_REPRODUCIBLE_PATHSDimitry Andric
Fixes: faeaa25f5624
2025-12-29cross-build: Avoid adding <sys/cdefs.h> to SYSINCSAyrton Munoz
Summary: The sys/cdefs.h in src is incompatible with glibc's sys/cdefs.h so cross-building broke when the former was added to SYSINCS in 1c9ff80f06. This commit adds a guard around that to only do that when building on FreeBSD. This should fix github CI. Test Plan: Ran buildkernel using tools/build/make.py on linux in github CI and locally on FreeBSD to double check nothing broke. Reviewed by: dim MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54385
2025-12-29Add a script to auto-generate mapping from exterr category to source fileKonstantin Belousov
Reviewed by: emaste, mkusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54380
2025-12-28kernel: MK_REPRODUCIBLE_PATHS for full paths vs /usr/srcWarner Losh
There are many environments that you do not want the paths to be canonicalized. For example, if I always build a product from a specific path in a jail that's dependent on the product version, I don't want that to be sanitized to /usr/src because when I have profiling tools run against multiple kernels, I can't do A/B testing and results processing if everything points to /usr/src (sadly, the profiling tools cannot remap back to the original like gdb can). Since we need both active at the same time, symbloic link fallbacks don't work. We do want the rest of the build to be reproducible, however. We'll get the same binaries if we rebuild later since we always rebuild with the same path. Turn them both on for maximum reproduction for environments where that cannot be guaranteed. Sponsored by: Netflix Input from: emaste, ivy Differential Revision: https://reviews.freebsd.org/D52959
2025-12-27tools.build: also add sys/_visible.h to SYSINCSDimitry Andric
This is needed since sys/cdefs.h includes sys/_visible.h. Reported by: kib Fixes: 1c9ff80f0635 MFC after: 3 days
2025-12-26tools.build: add sys/cdefs.h to SYSINCS, since lots of other headers use itDimitry Andric
This is needed to let the legacy stage compile against newer versions of sys/font.h, which transitively includes sys/cdefs.h, and requires the new __nonstring macro from it. Fixes: e2c93ed09f25 MFC after: 3 days
2025-12-24OptionalObsoleteFiles.inc: fix up WITH_LLVM_LINK_STATIC_LIBRARIES casesDimitry Andric
In commit cf1eaaf41cef I added the WITH_LLVM_LINK_STATIC_LIBRARIES src.conf(5) build knob, which also affects OptionalObsoleteFiles.inc. However, the checks were incorrect: when WITH_LLVM_LINK_STATIC_LIBRARIES is active, the OLD_LIBS libprivatellvm.so.19, libprivateclang.so.19 and libprivatelldb.so.19 should always be cleaned up. Fixes: cf1eaaf41cef MFC after: 1 week
2025-12-23src.conf: Add WITH_LLVM_LINK_STATIC_LIBRARIES build knobDimitry Andric
In commit 2e47f35be5dc libllvm, libclang and liblldb were converted into private shared libraries. This allowed clang, lld, lldb, and other llvm tools to be linked against these shared libraries, which makes them smaller and avoids duplication. However, this also comes at the cost of some performance, since the dynamic libraries are quite large, and contain lots of long symbols (mangled C++ identifiers). Add a WITH_LLVM_LINK_STATIC_LIBRARIES build knob that can be used to go back to the previous behavior: libllvm, libclang and liblldb are built as internal static libraries, i.e. only available during buildworld, and fully linked into the various executables such as clang, lld, etc. PR: 287447 Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50956
2025-12-16cdefs.h: Introduce __nonstring attributeAlex Richardson
This attribute can be used to annotate char arrays that are not supposed to be terminated with a NUL char and is needed to silence clang's new -Wunterminated-string-initialization warning. The name matches linuxkpi. Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52565
2025-12-16makeman.lua: Update for src.conf in the src treeEd Maste
Copy the text change from the shell makeman to makeman.lua. Fixes: dd8c666d8b78 ("src.sys.mk: Support src.conf in SRCTOP") Sponsored by: The FreeBSD Foundation
2025-12-15options: describe WITH_IPFILTER_IPFSBrooks Davis
Add a description for WITH_IPFILTER_IPFS. Fixes: 0ff0c19e7f70 ("ipfilter: Disable ipfs(8) by default")
2025-12-12stress2: Fix looping at exit and fix the cleanupPeter Holm
2025-12-09stress2: Added a regression testPeter Holm
2025-12-08bsdinstall: Mount /dev and /packages after using the shell to partition disksJohn Baldwin
Normally after partitions are created by the installer, the 'mount' script is used to mount the target disk partitions under /mnt. The tail end of this script also mounts a couple of additional filesystems under /mnt so that chrooted programs can work such as devfs and /packages. When the "Shell" option is used to permit the user to manually mount the destination filesystem, the "mount" script is not used as the user is instructed to mount the target filesystems and construct /mnt/etc/fstab, etc. However, this means that the user is responsible for mounting devfs (which is not included in /etc/fstab) and /packages as well. The help message for the "Shell" option doesn't mention these requirements, so users may not know to do so. This can lead to confusing errors as chrooted commands can fail to find needed /dev entries. For example, running fwget to fetch wireless firmware fails because /dev/pci doesn't exist. To make this less painful for users using this option, split out the bottom half of the 'mount' script that mounts these non-fstab-related filesystems into a separate 'mount_aux' script. Invoke 'mount_aux' after using "Shell" to create the filesystem to ensure that these filesystems are always present. PR: 290901 Reported by: Peter <freebsd@peterk.org> Tested by: Peter <freebsd@peterk.org> Differential Revision: https://reviews.freebsd.org/D53770
2025-12-08locale: make install Unicode 17.0.0/CLDR 48Jose Luis Duran
Unicode 17.0 adds 4803 characters, for a total of 159,801 characters. The new additions include 4 new scripts: - Sidetic - Tolong Siki - Beria Erfe - Tai Yo https://www.unicode.org/versions/Unicode17.0.0/
2025-12-08ipfilter: Disable ipfs(8) by defaultCy Schubert
At the moment ipfs(8) is a tool that can be easily abused. Though the concept is sound the implementation needs some work. ipfs(8) should be considered experimental at the moment. This commit also makes ipfs support in the kernel optional. Reviewed by: emaste, glebius MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53787
2025-12-08prepare-commit-msg: Add missing tabs to Fixes: and Event:Jessica Clarke
Although these line up when prefixed with "# ", once the comment prefix is deleted they no longer do. Add an extra tab to each to compensate, just like "Obtained from:".
2025-12-06locale: Update Unicode to CLDR 48Jose Luis Duran
Reviewed by: bapt MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53983