aboutsummaryrefslogtreecommitdiff
path: root/share/examples
Commit message (Collapse)AuthorAgeFilesLines
* release: add optional OCI imagesDoug Rabson2024-11-083-0/+40
| | | | | | | | | | | This adds three OCI archive format files to the release containing FreeBSD base images suitable for static linked, dynamic linked and shell workloads. The shell image also contains pkg-bootstrap and can be easily extended by installing packages (including pkgbase packages). Reviewed by: dch, cpersiva, jlduran, zlei Differential Revision: https://reviews.freebsd.org/D46759 MFC after: 2 days
* sound examples: Delete stale ossinit.h fileChristos Margiolis2024-08-241-262/+0
| | | | | | Fixes: 3decd659a788("sound examples: Simplify audio example") Sponsored by: The FreeBSD Foundation MFC after: 2 days
* sound examples: Move MIDI example out of OSS directoryChristos Margiolis2024-08-242-3/+3
| | | | | | | | | This example is not related to OSS. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, meka_tilda.center Differential Revision: https://reviews.freebsd.org/D46308
* sound examples: Simplify audio exampleChristos Margiolis2024-08-243-102/+312
| | | | | | | | | | | | - Merge ossinit.h and basic.c. - Rename basic.c to audio.c. - Use err(3) instead of fprintf(3) + exit(3). - Some style(9) improvements. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46307
* sound examples: Simplify MIDI exampleChristos Margiolis2024-08-243-97/+46
| | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D46306
* Remove "All Rights Reserved" from FreeBSD Foundation copyrightsEd Maste2024-07-304-4/+0
| | | | | | | These ones were unambiguous cases where the Foundation was the only listed copyright holder. Sponsored by: The FreeBSD Foundation
* sound examples: Add sndstat nvlist exampleChristos Margiolis2024-07-272-1/+208
| | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45969
* sound examples: Organize files in directoriesChristos Margiolis2024-07-276-4/+7
| | | | | | | | | More examples will be added, so it's better to be organized. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45968
* Remove residual blank line at start of MakefileWarner Losh2024-07-1524-24/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* share/examples/etc/make.conf: Remove old arm archsAndrew Turner2024-06-201-3/+2
| | | | | | | | | Remove the pre-armv7 architecture options from the example make.conf. These have either been removed, or will soon be removed from the build. Reviewed by: manu, imp, emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45636
* targ: fix compiling the exampleAlan Somers2024-06-194-21/+29
| | | | | | | | | The targ example program doesn't compile with current clang, and probably hasn't for multiple releases. Fix the build. I don't have the right hardware to test it, though. MFC after: 2 weeks Sponsored by: Axcient
* Fix up a mistake in the CFLAGS added. Pointed out by jrtc.George V. Neville-Neil2024-05-011-1/+1
|
* Out of tree modules should be built with DTrace by default.George V. Neville-Neil2024-05-011-0/+2
|
* examples: Install bhyve files on arm64Mark Johnston2024-05-011-1/+1
| | | | Sponsored by: Innovate UK
* vmrun.sh: Add arm64 supportMark Johnston2024-05-011-29/+71
| | | | | | | | | | | | | | | | For now, we enumerate disk devices before network devices. This is to work around a problem wherein u-boot remaps BARs during boot in a way that bhyve does not handle. Some discussion and experiments suggest that this can be handled by having bhyve not map BARs during boot on arm64; until a solution is implemented, however, this workaround is sufficient for simple usage and doesn't have any real downsides. The console and bootrom are specified slightly differently versus amd64, and a few of vmrun.sh's command-line options are amd64-only. Reviewed by: corvink, jhb Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44933
* vmrun.sh: Stop passing -A to bhyveMark Johnston2024-04-241-1/+1
| | | | | | It's a no-op now. Sponsored by: Innovate UK
* share/examples: move examples into appropriate packagesLexi Winter2024-04-231-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allow a new variable SE_xxxPACKAGE to be used to place an example group into a package. Move the following examples into existing appropriate packages: - bhyve examples into FreeBSD-bhyve - bootforth examples into FreeBSD-bootloader - csh examples into FreeBSD-csh - ipfw examples into FreeBSD-ipfw - jail examples into FreeBSD-jail - pf examples into FreeBSD-pf - ppp examples into FreeBSD-ppp - printing examples into FreeBSD-lp - uefisign examples into FreeBSD-efi-tools - ypldap examples into FreeBSD-yp - hast examples into FreeBSD-hast Move all other examples into the new 'FreeBSD-examples' package. This removes a significant number of files from the FreeBSD-utilities package. Reviewed by: imp, manu Pull Request: https://github.com/freebsd/freebsd-src/pull/1176
* share/examples/sound: Fix spelling "controller"Assume-Zhan2024-02-132-3/+3
| | | | | Event: Advanced UNIX Programming Course (Fall’23) at NTHU. Pull Request: https://github.com/freebsd/freebsd-src/pull/994
* Fix typo in share/examples/sunrpc/dir/rls.cYuZhong-Chen2024-02-131-1/+1
| | | | | Event: Advanced UNIX Programming Course (Fall’23) at NTHU. Pull Request: https://github.com/freebsd/freebsd-src/pull/974
* Fix typo in share/examples/sound/ossinit.hYuZhong-Chen2024-02-131-1/+1
| | | | | Event: Advanced UNIX Programming Course (Fall’23) at NTHU. Pull Request: https://github.com/freebsd/freebsd-src/pull/974
* share/examples/IPv6/USAGE: removeLexi Winter2024-02-022-532/+0
| | | | | | | | | | This document dates from the KAME days and, among other things, references the 'prefix' command which has not existed for a long time. Since IPv6 configuration is now documented in the Handbook, remove this obsolete file. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1094
* vmrun.sh: allow device name arguments in pci-passthru optionChristos Margiolis2024-01-021-7/+18
| | | | | | | | | | This is more intuitive than having to run `pciconf -l` and figure out the bus/slot/func entry manually. Reviewed by: markj Sponsored by; The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43270
* vmrun.sh: add missing options in usage messageChristos Margiolis2024-01-021-1/+2
| | | | | | | Reviewed by: markj Sponsored by; The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43269
* Silence snprintf truncation warnings in printf_test examplesDimitry Andric2023-12-213-0/+12
| | | | | | | | | | | | | | Building share/examples/tests with clang 18 results in a few warnings like: share/examples/tests/tests/plain/printf_test.c:67:6: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 17 [-Werror,-Wformat-truncation] 67 | if (snprintf(buffer, sizeof(buffer), "0123456789abcdef") != 16) | ^ Since these tests are meant as an example of testing snprintf overflow, suppress the warnings. MFC after: 3 days
* share: Automated cleanup of cdefs and other formattingWarner Losh2023-11-274-4/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* share: Remove ancient SCCS tags.Warner Losh2023-11-2714-26/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Fix a comment typo.Brad Davis2023-11-171-1/+1
|
* Address review feedback on a typo.George V. Neville-Neil2023-11-141-1/+1
| | | | | Reviewed by: jhb, gbe Differential Revision: <https://reviews.freebsd.org/D42096>
* A skeleton kernel module suitable for creating new such modules.George V. Neville-Neil2023-11-142-0/+93
|
* share/examples/etc/make.conf: Add AMD Zen 4 to listDaniel Engberg2023-11-041-5/+5
| | | | | | | | Add AMD Zen 4 (znver4) to the list of valid "Intel x86 CPU types" Reviewed by: emaste Approved by: emaste Differential Revision: https://reviews.freebsd.org/D41518
* Retire old diskless setup scriptsJohn Baldwin2023-09-255-670/+0
| | | | | | | | | These scripts predate /etc/rc.diskless* and use a different scheme. A comment was added to them back in 2002 noting they were 3 years old at that point. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41951
* make_*_driver.sh: Don't include $FreeBSD$ in generated filesJohn Baldwin2023-09-252-14/+0
| | | | | Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41950
* share/examples: clarify BOOT_COMCONSOLE_SPEEDEd Maste2023-08-171-1/+2
| | | | | | | | | Give an example of why one may want to override BOOT_COMCONSOLE_SPEED so that it's clear why the default (in a comment) and the commented-out example setting have different values. Reported by: otis Fixes: 4722ceb7d53e ("Use 115200 bps by default for serial communication")
* Use 115200 bps by default for serial communicationEd Maste2023-08-171-3/+2
| | | | | | | | | | | | | 9600 was a standard baud rate decades ago, but 115200 is now more common so choose defaults that are useful to the largest number of users. Note that boot0sio does not support rates above 9600 so it remains unchanged. Reviewed by: bz, imp, manu Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36295
* share/examples/tests: fix comments after $FreeBSD$ removalEd Maste2023-08-162-2/+2
| | | | Fixes: 2a63c3be1582 ("Remove $FreeBSD$: one-line .c comment pattern")
* Remove $FreeBSD$: one-line forth tagWarner Losh2023-08-166-6/+0
| | | | Remove /^\\[\s*]*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line lua tagWarner Losh2023-08-163-3/+0
| | | | Remove /^--\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line bare tagWarner Losh2023-08-1613-16/+0
| | | | Remove /^\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-166-12/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-16127-128/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-163-6/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-1622-22/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1627-54/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* examples/kld/syscall: unbreak compilationMaxim Konovalov2023-06-181-1/+1
| | | | modfind(9)/modstat(9) need sys/param.h.
* spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSDWarner Losh2023-05-122-2/+2
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1222-22/+22
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* vmrun.sh: mention new edk2 packageChristos Margiolis2023-05-021-1/+1
| | | | | | | | | uefi-edk2-bhyve no longer exists. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39937
* Remove portsnap(8)Colin Percival2023-04-231-3/+2
| | | | | | | | | | | | | | | Rather than having a tool in the FreeBSD base system for obtaining the FreeBSD ports tree, users are encouraged to `pkg install git` and then `git clone https://git.FreeBSD.org/ports.git /usr/ports`. The portsnap servers will continue operating until FreeBSD 13 reaches its End-of-Life, and portsnap is available from the ports tree as ports-mgmt/portsnap. Requested by: portmgr Relnotes: yes Differential Revision: https://reviews.freebsd.org/D39563 X-MFC: no
* vmrun.sh: Fix a typo in usage()Mateusz Piotrowski2023-04-201-1/+1
| | | | | MFC after: 3 days Sponsored by: Klara Inc.