aboutsummaryrefslogtreecommitdiff
path: root/share/mk/bsd.libnames.mk
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit d0b2dbfa0ecf)
* Remove the MK_LIBCPLUSPLUS optionAlex Richardson2023-03-221-1/+0
| | | | | | | | | | This option has been equivalent to any form of C++ support since libstdc++ was removed. Therefore, replace all MK_LIBCPLUSPLUS uses with MK_CXX. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D27974 (cherry picked from commit 5cf6f1c4bc281ac45ced086bc2e393f732f2fcc2)
* irdma: Add RDMA driver for Intel(R) Ethernet Controller E810Bartosz Sobczak2023-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | This is an initial commit for RDMA FreeBSD driver for Intel(R) Ethernet Controller E810, called irdma. Supporting both RoCEv2 and iWARP protocols in per-PF manner, RoCEv2 being the default. Testing has been done using krping tool, perftest, ucmatose, rping, ud_pingpong, rc_pingpong and others. Signed-off-by: Eric Joyner <erj@FreeBSD.org> Reviewed by: #manpages (pauamma_gundo.com) [documentation] Relnotes: yes Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D34690 (cherry picked from commit cdcd52d41e246ba1c0fcfad0769bd691487355ef) (cherry picked from commit e602a30bb9fc7ee041a0e629d0fd2db7933ffa32) (cherry picked from commit a6e275af46644af1de365a1edf19742bfa28bb69)
* libc: add test case for qsort_b(3)Xin LI2022-09-211-0/+1
| | | | | | | | Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D36463 (cherry picked from commit c65e42dbde4198ce46aef7ddac061390abe672dc) (cherry picked from commit 4385a9f851bbbb88a4310ebfa929dfab01b6fc4d)
* Add an internal libiscsiutil library.John Baldwin2022-04-291-0/+1
| | | | | | | | | | | | | | | Move some of the code duplicated between ctld(8) and iscsid(8) into a libiscsiutil library. Sharing the low-level PDU code did require having a 'struct connection' base class with a method table to permit separate initiator vs target behavior (e.g. in handling proxy PDUs). Reviewed by: mav, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D33544 (cherry picked from commit 6378393308bc6bd81fb871dacf6b03cf1a390d8b)
* bsd.compat.mk: Allow finding non-internal librariesBryan Drewery2021-01-081-1/+1
| | | | | | | | | | | | | | | Currently only libexec/rtld-elf32 uses internal LIBC_NOSSP_PIC during the build but it gets it directly from the objdir rather than a sysroot. For example, /usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc/libc_nossp_pic.a. We don't stage lib32 libraries in WORLDTMP/usr/lib32 and doing so doesn't buy much. If we want to use a staged lib32 library then we need to look in LIBCOMPATTMP where they were staged. For example if LIBC_PIC were wanted then look for /usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32/libc_pic.a. Reported by: rlibby Reviewed by: rlibby Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27648
* build: remove the option to build gnugrepKyle Evans2020-12-251-1/+0
| | | | | | | | | Unconditionally install bsdgrep as grep, bootstrap or not. Remove all build glue and stop installing both gnugrep and libgnuregex now that all consumers of the latter are gone. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27732
* Add virtio-9p (aka VirtFS) filesystem sharing to bhyve.Jakub Wojciech Klama2020-10-031-0/+1
| | | | | | | | | | | | | | | | | VirtFS allows sharing an arbitrary directory tree between bhyve virtual machine and the host. Current implementation has a fairly complete support for 9P2000.L protocol, except for the extended attribute support. It has been verified to work with the qemu-kvm hypervisor. Reviewed by: rgrimes, emaste, jhb, trasz Approved by: trasz (mentor) MFC after: 1 month Relnotes: yes Sponsored by: Conclusive Engineering (development), vStack.com (funding) Differential Revision: https://reviews.freebsd.org/D10335 Notes: svn path=/head/; revision=366413
* loader: zfs should support bootonce an nextbootToomas Soome2020-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootonce feature is temporary, one time boot, activated by "bectl activate -t BE", "bectl activate -T BE" will reset the bootonce flag. By default, the bootonce setting is reset on attempt to boot and the next boot will use previously active BE. By setting zfs_bootonce_activate="YES" in rc.conf, the bootonce BE will be set permanently active. bootonce dataset name is recorded in boot pool labels, bootenv area. in case of nextboot, the nextboot_enable boolean variable is recorded in freebsd:nvstore nvlist, also stored in boot pool label bootenv area. On boot, the loader will process /boot/nextboot.conf if nextboot_enable is "YES", and will set nextboot_enable to "NO", preventing /boot/nextboot.conf processing on next boot. bootonce and nextboot features are usable in both UEFI and BIOS boot. To use bootonce/nextboot features, the boot loader needs to be updated on disk; if loader.efi is stored on ESP, then ESP needs to be updated and for BIOS boot, stage2 (zfsboot or gptzfsboot) needs to be updated (gpart or other tools). At this time, only lua loader is updated. Sponsored by: Netflix, Klara Inc. Differential Revision: https://reviews.freebsd.org/D25512 Notes: svn path=/head/; revision=365938
* lib: add libnetmapVincenzo Maffione2020-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset introduces the new libnetmap library for writing netmap applications. Before libnetmap, applications could either use the kernel API directly (e.g. NIOCREGIF/NIOCCTRL) or the simple header-only-library netmap_user.h (e.g. nm_open(), nm_close(), nm_mmap() etc.) The new library offers more functionalities than netmap_user.h: - Support for complex netmap options, such as external memory allocators or per-buffer offsets. This opens the way to future extensions. - More flexibility in the netmap port bind options, such as non-numeric names for pipes, or the ability to specify the netmap allocator that must be used for a given port. - Automatic tracking of the netmap memory regions in use across the open ports. At the moment there is no man page, but the libnetmap.h header file has in-depth documentation. Reviewed by: hrs MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26171 Notes: svn path=/head/; revision=364936
* Merge OpenZFS support in to HEAD.Matt Macy2020-08-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort. I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak. Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream. Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression. Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872 Notes: svn path=/head/; revision=364746
* Introduce stats(3), a flexible statistics gathering API.Edward Tomasz Napierala2019-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a framework to define a template describing a set of "variables of interest" and the intended way for the framework to maintain them (for example the maximum, sum, t-digest, or a combination thereof). Afterwards the user code feeds in the raw data, and the framework maintains these variables inside a user-provided, opaque stats blobs. The framework also provides a way to selectively extract the stats from the blobs. The stats(3) framework can be used in both userspace and the kernel. See the stats(3) manual page for details. This will be used by the upcoming TCP statistics gathering code, https://reviews.freebsd.org/D20655. The stats(3) framework is disabled by default for now, except in the NOTES kernel (for QA); it is expected to be enabled in amd64 GENERIC after a cool down period. Reviewed by: sef (earlier version) Obtained from: Netflix Relnotes: yes Sponsored by: Klara Inc, Netflix Differential Revision: https://reviews.freebsd.org/D20477 Notes: svn path=/head/; revision=353283
* Remove NAND and NANDFS supportWarner Losh2019-06-251-1/+0
| | | | | | | | | | | | | | | | | | | | | NANDFS has been broken for years. Remove it. The NAND drivers that remain are for ancient parts that are no longer relevant. They are polled, have terrible performance and just for ancient arm hardware. NAND parts have evolved significantly from this early work and little to none of it would be relevant should someone need to update to support raw nand. This code has been off by default for years and has violated the vnode protocol leading to panics since it was committed. Numerous posts to arch@ and other locations have found no actual users for this software. Relnotes: Yes No Objection From: arch@ Differential Revision: https://reviews.freebsd.org/D20745 Notes: svn path=/head/; revision=349352
* Make libifconfig INTERNALLIBEd Maste2019-02-251-1/+0
| | | | | | | | | | | | | | | Instead of PRIVATELIB + NO_PIC. This avoids the need for the wlandebug PIE special case added in r344211, and provides a stronger guarantee against 3rd party software coming to depend on the API or ABI. If / when we declare the API/ABI to be stable we can make it a normal library. Discussed with: bapt Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=344530
* libbe(3): Add to bsd.libnames.mkKyle Evans2018-08-111-0/+1
| | | | Notes: svn path=/projects/bectl/; revision=337604
* Fix stale dependencies on libcasper libraries.Bryan Drewery2018-05-151-7/+0
| | | | | | | | | | | | Libcasper and its modules have no static libraries so don't define paths to them. This fixes LIBADD automatically adding DPADD entries for casper. Reported by: sbruno Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=333654
* Add new shared library -- libopencsd.Ruslan Bukin2018-04-041-0/+1
| | | | | | | | | | | | OpenCSD is an ARM CoreSight(tm) trace packets decoder. - Connect libopencsd to the arm64 build. - Install opencsd headers to /usr/include/opencsd/ Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=332033
* Add new shared library -- libipt.Ruslan Bukin2018-03-211-0/+1
| | | | | | | | | | | | libipt is the Intel Processor Trace (Intel PT) packets decoder. - Include libipt to amd64 build. - Install libipt headers to /usr/include/libipt/ Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=331293
* Add libregex, connect it to the buildKyle Evans2018-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libregex is a regex(3) implementation intended to feature GNU extensions and any other non-POSIX compliant extensions that are deemed worthy. These extensions are separated out into a separate library for the sake of not cluttering up libc further with them as well as not deteriorating the speed (or lack thereof) of the libc implementation. libregex is implemented as a build of the libc implementation with LIBREGEX defined to distinguish this from a libc build. The reasons for implementation like this are two-fold: 1.) Maintenance- This reduces the overhead induced by adding yet another regex implementation to base. 2.) Ease of use- Flipping on GNU extensions will be as simple as linking against libregex, and POSIX-compliant compilations can be guaranteed with a REG_POSIX cflag that should be ignored by libc/regex and disables extensions in libregex. It is also easier to keep REG_POSIX sane and POSIX pure when implemented in this fashion. Tests are added for future functionality, but left disconnected for the time being while other testing is done. Reviewed by: cem (previous version) Differential Revision: https://reviews.freebsd.org/D12934 Notes: svn path=/head/; revision=328240
* Merge ^/head r325663 through r325841.Hans Petter Selasky2017-11-151-0/+1
|\ | | | | | | Notes: svn path=/projects/bsd_rdma_4_9/; revision=325842
| * Introduce syslog service for Casper.Mariusz Zaborski2017-11-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | syslog in libc secretly reconnects to the daemon. Another issue is that we don't have any information from openlog(3) if we succeeded to open log or not so we don't know if we are ready to enter cabability mode. Because all of that we decided we need a syslog service for Caspser. Reviewed by: bapt@ Differential Revision: https://reviews.freebsd.org/D12824 Notes: svn path=/head/; revision=325739
* | Fix OFED library dependencies.Hans Petter Selasky2017-11-131-2/+2
| | | | | | | | | | | | | | Sponsored by: Mellanox Technologies Notes: svn path=/projects/bsd_rdma_4_9/; revision=325763
* | Remove no longer supported mthca driver.Hans Petter Selasky2017-11-131-1/+0
|/ | | | | | | Sponsored by: Mellanox Technologies Notes: svn path=/projects/bsd_rdma_4_9/; revision=325761
* Disconnect libstand from the build.Warner Losh2017-10-091-1/+0
| | | | | | | | | | Remove libstand from the src/lib build. Remove LIBSTAND from bsd.libnames.mk. Add affected files to the obsolete files list. Sponsored by: Netflix Notes: svn path=/head/; revision=324454
* Provide libdl.Konstantin Belousov2017-07-101-0/+1
| | | | | | | | | | | | | | | | | | | | Create libdl.so.1 as a filter for libc.so.7 which exports public dl* functions. The functions are resolved from the rtld instead, the goal of creating library is to avoid errors from the static linker due to missed libdl. For static binaries, an empty .o is compiled into libdl.a so that static binaries still get dl stubs from libc.a. Right now lld cannot create filter objects, disable libdl on arm64 when binutils are not used. Reviewed by: bdrewery, dim (previos version); emaste Exp run: PR 220525, done by antoine Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D11504 Notes: svn path=/head/; revision=320872
* LIBADD: Try to support partial tree checkouts in some limited cases.Bryan Drewery2017-06-201-0/+22
| | | | | | | | | | | | | | | | | | | LIBADD is only supported for in-tree builds because we do not install share/mk/src.libnames.mk (which provides LIBADD support) into /usr/share/mk. So if a partial checkout is done then the LIBADDs are ignored and no LDADD is ever added. Provide limited support for this case for when LIBADD is composed entirely of base libraries. This is to avoid clashes with ports and other out-of-tree LIBADD uses that should not be mapped to LDADD and because we do not want to support LIBADD out-of-tree right now. Reported by: mckusick, kib MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320171
* Utilize SYSROOT from r320119 in places where DESTDIR may be wanting WORLDTMP.Bryan Drewery2017-06-191-152/+154
| | | | | | | | | | | | | | Since buildenv exports SYSROOT all of these uses will now look in WORLDTMP by default. sys/boot/efi/loader/Makefile A LIBSTAND hack is no longer required for buildenv. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320122
* Fix Makefiles which override LIBDIR to not add incorrect dependencies into ↵Bryan Drewery2017-06-171-152/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | .depend. This fixes these cases which would rebuild every time: make[6]: /usr/obj/usr/src/libexec/rtld-elf/tests/libpythagoras/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/tmp/usr/tests/libexec/rtld-elf/libm.a make[6]: /usr/obj/usr/src/lib/libxo/tests/encoder/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/tmp/usr/tests/lib/libxo/libxo.a make[7]: /usr/obj/usr/src/lib/libthr/tests/dlopen/dso/.depend, 1: ignoring stale .depend for /usr/obj/usr/src/tmp/usr/tests/lib/libthr/dlopen/libpthread.a The problem is that some Makefiles will override LIBDIR to where they want their library to install. bsd.libnames.mk will then use ${LIBDIR} to define where *existing* libraries are. This then leads to looking for the libraries in the *target* place rather than the *expected* place. We may want to expand this (and all of the other *DIR variables in bsd.own.mk) into something like what Ports has, a PREFIX and a LOCALBASE. PREFIX being where things are being installed to and LOCALBASE being where they already are. For now store the default expected LIBDIR into LIBDIR_BASE and use that for library locations. Reported by: sbruno MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320061
* Create libefivar library. This library aims to provideWarner Losh2016-10-111-0/+1
| | | | | | | | | | | | | | | the same API as the GPL'd version of this library. It implements the common Linux API for programatically manipulating UEFI environment varibales using the UEFI Runtime Services the kernel provides. It replaces the old efi library since it is programmed to a different interface, but retails the CHAR16 to UTF-8 and vice versa conversion routines. The new name is to match Linux program's expectations. Differential Revision: https://reviews.freebsd.org/D8128 Reviewed by: kib@, wblock@, Ganael Laplanche Notes: svn path=/head/; revision=307071
* Renaming libifc to libifconfig in response to feedback on initial commit ofKristof Provost2016-09-021-1/+1
| | | | | | | | | | | | | this library. Sticking to 'libifconfig' (and 'ifconfig_' as function prefix) should reduce chances of namespace collisions, make it more clear what the library does, and be more in line with existing libraries. Submitted by: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Differential Revision: https://reviews.freebsd.org/D7742 Reviewed by: cem, kp Notes: svn path=/head/; revision=305290
* Add libifc, a library implementing core functionality that exists in ↵Kristof Provost2016-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | ifconfig(8) today. libifc (pronounced lib-ifconfig) aims to be a light abstraction layer between programs and the kernel APIs for managing the network configuration. This should hopefully make programs easier to maintain, and reduce code duplication. Work will begin on making ifconfig(8) use this library in the near future. This code is still evolving. The interface should not be considered stable until it is announced as such. Submitted By: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D7529 Notes: svn path=/head/; revision=304815
* Add basic blacklist build supportKurt Lidl2016-06-021-0/+1
| | | | | | | | | | | Reviewed by: rpaulo Approved by: rpaulo Relnotes: YES Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5913 Notes: svn path=/head/; revision=301226
* zfsd(8), the ZFS fault management daemonAlan Somers2016-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add zfsd, which deals with hard drive faults in ZFS pools. It manages hotspares and replements in drive slots that publish physical paths. cddl/usr.sbin/zfsd Add zfsd(8) and its unit tests cddl/usr.sbin/Makefile Add zfsd to the build lib/libdevdctl A C++ library that helps devd clients process events lib/Makefile share/mk/bsd.libnames.mk share/mk/src.libnames.mk Add libdevdctl to the build. It's a private library, unusable by out-of-tree software. etc/defaults/rc.conf By default, set zfsd_enable to NO etc/mtree/BSD.include.dist Add a directory for libdevdctl's include files etc/mtree/BSD.tests.dist Add a directory for zfsd's unit tests etc/mtree/BSD.var.dist Add /var/db/zfsd/cases, where zfsd stores case files while it's shut down. etc/rc.d/Makefile etc/rc.d/zfsd Add zfsd's rc script sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fix the resource.fs.zfs.statechange message. It had a number of problems: It was only being emitted on a transition to the HEALTHY state. That made it impossible for zfsd to take actions based on drives getting sicker. It compared the new state to vdev_prevstate, which is the state that the vdev had the last time it was opened. That doesn't make sense, because a vdev can change state multiple times without being reopened. vdev_set_state contains logic that will change the device's new state based on various conditions. However, the statechange event was being posted _before_ that logic took effect. Now it's being posted after. Submitted by: gibbs, asomers, mav, allanjude Reviewed by: mav, delphij Relnotes: yes Sponsored by: Spectra Logic Corp, iX Systems Differential Revision: https://reviews.freebsd.org/D6564 Notes: svn path=/head/; revision=300906
* Move casper library entries to proper places.Bryan Drewery2016-03-031-0/+5
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296337
* Convert casperd(8) daemon to the libcasper.Mariusz Zaborski2016-02-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | After calling the cap_init(3) function Casper will fork from it's original process, using pdfork(2). Forking from a process has a lot of advantages: 1. We have the same cwd as the original process. 2. The same uid, gid and groups. 3. The same MAC labels. 4. The same descriptor table. 5. The same routing table. 6. The same umask. 7. The same cpuset(1). From now services are also in form of libraries. We also removed libcapsicum at all and converts existing program using Casper to new architecture. Discussed with: pjd, jonathan, ed, drysdale@google.com, emaste Partially reviewed by: drysdale@google.com, bdrewery Approved by: pjd (mentor) Differential Revision: https://reviews.freebsd.org/D4277 Notes: svn path=/head/; revision=296047
* Start on a new library (libsysdecode) that provides routines for decodingJohn Baldwin2015-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | system call information such as system call arguments. Initially this will consist of pulling duplicated code out of truss and kdump though it may prove useful for other utilities in the future. This commit moves the shared utrace(2) record parser out of kdump into the library and updates kdump and truss to use it. One difference from the previous version is that the library version treats unknown events that start with the "RTLD" signature as unknown events. This simplifies the interface and allows the consumer to decide how to handle all non-recognized events. Instead, this function only generates a string description for known malloc() and RTLD records. Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D4537 Notes: svn path=/head/; revision=292236
* Convert contrib/ofed libraries to LIBADD.Bryan Drewery2015-12-101-0/+13
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292037
* Sort the LIB list.Bryan Drewery2015-12-101-9/+9
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292036
* Add LIBNANDFS.Bryan Drewery2015-12-021-0/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291639
* Add assertions that capture invalid configurations for new libraries.Bryan Drewery2015-12-021-0/+10
| | | | | | | | | | | | | | | | | Fix current findings, which should fix cases of NO_SHARED not building properly. Given libfoo: - Ensure that a LIBFOO is set. For INTERNALLIBS advise setting this in src.libnames.mk, otherwise bsd.libnames.mk. - Ensure that a LIBFOODIR is properly set. - Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own Makefile Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291632
* Revert incomplete r291623.Bryan Drewery2015-12-021-10/+0
| | | | Notes: svn path=/head/; revision=291624
* Add assertions that capture invalid configurations for new libraries.Bryan Drewery2015-12-021-0/+10
| | | | | | | | | | | | | | | | Fix current findings. Given libfoo: - Ensure that a LIBFOO is set. For INTERNALLIBS advise setting this in src.libnames.mk, otherwise bsd.libnames.mk. - Ensure that a LIBFOODIR is properly set. - Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own Makefile Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291623
* Define a LIB*SRCDIR for all known _LIBRARIES.Bryan Drewery2015-12-011-0/+8
| | | | | | | | | | This is a follow-up to r291327 which added a LIB*DIR for all known _LIBRARIES. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291619
* Add missing LIB80211 entry for DPADD needs.Bryan Drewery2015-12-011-0/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291601
* Define a LIB<NAME>DIR for every library that LIBADD provides.Bryan Drewery2015-11-251-0/+2
| | | | | | | | | | | | | | | This is going to be used to allow DIRDEPS to be bootstrapped off of LIBADD/DPADD. It currently works for internal libraries which have a DIR defined for them but also use the .a library from a src-mapped obj directory. It can also be useful for using -L without a --sysroot per LIBADD to use the OBJDIR version of the libraries. I didn't review every LIBADD, so it is possible this is missing some. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291327
* Significant upgrades to sa(4) and mt(1).Kenneth D. Merry2015-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary focus of these changes is to modernize FreeBSD's tape infrastructure so that we can take advantage of some of the features of modern tape drives and allow support for LTFS. Significant changes and new features include: o sa(4) driver status and parameter information is now exported via an XML structure. This will allow for changes and improvements later on that will not break userland applications. The old MTIOCGET status ioctl remains, so applications using the existing interface will not break. o 'mt status' now reports drive-reported tape position information as well as the previously available calculated tape position information. These numbers will be different at times, because the drive-reported block numbers are relative to BOP (Beginning of Partition), but the block numbers calculated previously via sa(4) (and still provided) are relative to the last filemark. Both numbers are now provided. 'mt status' now also shows the drive INQUIRY information, serial number and any position flags (BOP, EOT, etc.) provided with the tape position information. 'mt status -v' adds information on the maximum possible I/O size, and the underlying values used to calculate it. o The extra sa(4) /dev entries (/dev/saN.[0-3]) have been removed. The extra devices were originally added as place holders for density-specific device nodes. Some OSes (NetBSD, NetApp's OnTap and Solaris) have had device nodes that, when you write to them, will automatically select a given density for particular tape drives. This is a convenient way of switching densities, but it was never implemented in FreeBSD. Only the device nodes were there, and that sometimes confused users. For modern tape devices, the density is generally not selectable (e.g. with LTO) or defaults to the highest availble density when the tape is rewritten from BOT (e.g. TS11X0). So, for most users, density selection won't be necessary. If they do need to select the density, it is easy enough to use 'mt density' to change it. o Protection information is now supported. This is either a Reed-Solomon CRC or CRC32 that is included at the end of each block read and written. On write, the tape drive verifies the CRC, and on read, the tape drive provides a CRC for the userland application to verify. o New, extensible tape driver parameter get/set interface. o Density reporting information. For drives that support it, 'mt getdensity' will show detailed information on what formats the tape drive supports, and what formats the tape drive supports. o Some mt(1) functionality moved into a new mt(3) library so that external applications can reuse the code. o The new mt(3) library includes helper routines to aid in parsing the XML output of the sa(4) driver, and build a tree of driver metadata. o Support for the MTLOAD (load a tape in the drive) and MTWEOFI (write filemark immediate) ioctls needed by IBM's LTFS implementation. o Improve device departure behavior for the sa(4) driver. The previous implementation led to hangs when the device was open. o This has been tested on the following types of drives: IBM TS1150 IBM TS1140 IBM LTO-6 IBM LTO-5 HP LTO-2 Seagate DDS-4 Quantum DLT-4000 Exabyte 8505 Sony DDS-2 contrib/groff/tmac/doc-syms, share/mk/bsd.libnames.mk, lib/Makefile, Add libmt. lib/libmt/Makefile, lib/libmt/mt.3, lib/libmt/mtlib.c, lib/libmt/mtlib.h, New mt(3) library that contains functions moved from mt(1) and new functions needed to interact with the updated sa(4) driver. This includes XML parser helper functions that application writers can use when writing code to query tape parameters. rescue/rescue/Makefile: Add -lmt to CRUNCH_LIBS. src/share/man/man4/mtio.4 Clarify this man page a bit, and since it contains what is essentially the mtio.h header file, add new ioctls and structure definitions from mtio.h. src/share/man/man4/sa.4 Update BUGS and maintainer section. sys/cam/scsi/scsi_all.c, sys/cam/scsi/scsi_all.h: Add SCSI SECURITY PROTOCOL IN/OUT CDB definitions and CDB building functions. sys/cam/scsi/scsi_sa.c sys/cam/scsi/scsi_sa.h Many tape driver changes, largely outlined above. Increase the sa(4) driver read/write timeout from 4 to 32 minutes. This is based on the recommended values for IBM LTO 5/6 drives. This may also avoid timeouts for other tape hardware that can take a long time to do retries and error recovery. Longer term, a better way to handle this is to ask the drive for recommended timeout values using the REPORT SUPPORTED OPCODES command. Modern IBM and Oracle tape drives at least support that command, and it would allow for more accurate timeout values. Add XML status generation. This is done with a series of macros to eliminate as much duplicate code as possible. The new XML-based status values are reported through the new MTIOCEXTGET ioctl. Add XML driver parameter reporting, using the new MTIOCPARAMGET ioctl. Add a new driver parameter setting interface, using the new MTIOCPARAMSET and MTIOCSETLIST ioctls. Add a new MTIOCRBLIM ioctl to get block limits information. Add CCB/CDB building routines scsi_locate_16, scsi_locate_10, and scsi_read_position_10(). scsi_locate_10 implements the LOCATE command, as does the existing scsi_set_position() command. It just supports additional arguments and features. If/when we figure out a good way to provide backward compatibility for older applications using the old function API, we can just revamp scsi_set_position(). The same goes for scsi_read_position_10() and the existing scsi_read_position() function. Revamp sasetpos() to take the new mtlocate structure as an argument. It now will use either scsi_locate_10() or scsi_locate_16(), depending upon the arguments the user supplies. As before, once we change position we don't have a clear idea of what the current logical position of the tape drive is. For tape drives that support long form position data, we read the current position and store that for later reporting after changing the position. This should help applications like Bacula speed tape access under FreeBSD once they are modified to support the new ioctls. Add a new quirk, SA_QUIRK_NO_LONG_POS, that is set for all drives that report SCSI-2 or older, as well as drives that report an Illegal Request type error for READ POSITION with the long format. So we should automatically detect drives that don't support the long form and stop asking for it after an initial try. Add a partition number to the sa(4) softc. Improve device departure handling. The previous implementation led to hangs when the device was open. If an application had the sa(4) driver open, and attempted to close it after it went away, the cam_periph_release() call in saclose() would cause the periph to get destroyed because that was the last reference to it. Because destroy_dev() was called from the sa(4) driver's cleanup routine (sacleanup()), and would block waiting for the close to happen, a deadlock would result. So instead of calling destroy_dev() from the cleanup routine, call destroy_dev_sched_cb() from saoninvalidate() and wait for the callback. Acquire a reference for devfs in saregister(), and release it in the new sadevgonecb() routine when all devfs devices for the particular sa(4) driver instance are gone. Add a new function, sasetupdev(), to centralize setting per-instance devfs device parameters instead of repeating the code in saregister(). Add an open count to the softc, so we know how many peripheral driver references are a result of open sessions. Add the D_TRACKCLOSE flag to the cdevsw flags so that we get a 1:1 mapping of open to close calls instead of a N:1 mapping. This should be a no-op for everything except the control device, since we don't allow more than one open on non-control devices. However, since we do allow multiple opens on the control device, the combination of the open count and the D_TRACKCLOSE flag should result in an accurate peripheral driver reference count, and an accurate open count. The accurate open count allows us to release all peripheral driver references that are the result of open contexts once we get the callback from devfs. sys/sys/mtio.h: Add a number of new mt(4) ioctls and the requisite data structures. None of the existing interfaces been removed or changed. This includes definitions for the following new ioctls: MTIOCRBLIM /* get block limits */ MTIOCEXTLOCATE /* seek to position */ MTIOCEXTGET /* get tape status */ MTIOCPARAMGET /* get tape params */ MTIOCPARAMSET /* set tape params */ MTIOCSETLIST /* set N params */ usr.bin/mt/Makefile: mt(1) now depends on libmt, libsbuf and libbsdxml. usr.bin/mt/mt.1: Document new mt(1) features and subcommands. usr.bin/mt/mt.c: Implement support for mt(1) subcommands that need to use getopt(3) for their arguments. Implement a new 'mt status' command to replace the old 'mt status' command. The old status command has been renamed 'ostatus'. The new status function uses the MTIOCEXTGET ioctl, and therefore parses the XML data to determine drive status. The -x argument to 'mt status' allows the user to dump out the raw XML reported by the kernel. The new status display is mostly the same as the old status display, except that it doesn't print the redundant density mode information, and it does print the current partition number and position flags. Add a new command, 'mt locate', that will supersede the old 'mt setspos' and 'mt sethpos' commands. 'mt locate' implements all of the functionality of the MTIOCEXTLOCATE ioctl, and allows the user to change the logical position of the tape drive in a number of ways. (Partition, block number, file number, set mark number, end of data.) The immediate bit and the explicit address bits are implemented, but not documented in the man page. Add a new 'mt weofi' command to use the new MTWEOFI ioctl. This allows the user to ask the drive to write a filemark without waiting around for the operation to complete. Add a new 'mt getdensity' command that gets the XML-based tape drive density report from the sa(4) driver and displays it. This uses the SCSI REPORT DENSITY SUPPORT command to get comprehensive information from the tape drive about what formats it is able to read and write. Add a new 'mt protect' command that allows getting and setting tape drive protection information. The protection information is a CRC tacked on to the end of every read/write from and to the tape drive. Sponsored by: Spectra Logic MFC after: 1 month Notes: svn path=/head/; revision=279219
* Add LIBXO.Marcel Moolenaar2015-02-181-0/+1
| | | | Notes: svn path=/head/; revision=278962
* Add a new device control utility for new-bus devices called devctl. ThisJohn Baldwin2015-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allows the user to request administrative changes to individual devices such as attach or detaching drivers or disabling and re-enabling devices. - Add a new /dev/devctl2 character device which uses ioctls for device requests. The ioctls use a common 'struct devreq' which is somewhat similar to 'struct ifreq'. - The ioctls identify the device to operate on via a string. This string can either by the device's name, or it can be a bus-specific address. (For unattached devices, a bus address is the only way to locate a device.) Bus drivers register an eventhandler to claim unrecognized device names that the driver recognizes as a valid address. Two buses currently support addresses: ACPI recognizes any device in the ACPI namespace via its full path starting with "\" and the PCI bus driver recognizes an address specification of 'pci[<domain>:]<bus>:<slot>:<func>' (identical to the PCI selector strings supported by pciconf). - To make it easier to cut and paste, change the PnP location string in the PCI bus driver to output a full PCI selector string rather than 'slot=<slot> function=<func>'. - Add a devctl(3) interface in libdevctl which provides a wrapper around the ioctls and is the preferred interface for other userland code. - Add a devctl(8) program which is a simple wrapper around the requests supported by devctl(3). - Add a device_is_suspended() function to check DF_SUSPENDED. - Add a resource_unset_value() function that can be used to remove a hint from the kernel environment. This is used to clear a hint.<driver>.<unit>.disabled hint when re-enabling a boot-time disabled device. Reviewed by: imp (parts) Requested by: imp (changing PCI location string) Relnotes: yes Notes: svn path=/head/; revision=278320
* Remove MINUSLPAM the LIBADD framework handles static dependencies just fineBaptiste Daroussin2014-11-261-26/+0
| | | | Notes: svn path=/head/; revision=275105
* Import libgpio.Rui Paulo2014-11-241-0/+1
| | | | | | | | | | | | | | This is a thin wrapper around the kernel interface which should make it easier to write GPIO applications. gpioctl(8) will be converted to use this library in a separate commit. Differential Revision: https://reviews.freebsd.org/D1183 Reviewed by: adrian, loos Discussed on: arm@, embedded@ Relnotes: yes Notes: svn path=/head/; revision=274987