Go to file
riastradh 932706d0fa dk(4): Use disk_begindetach and rely on vdevgone to close instances.
The first step is to decide whether we can detach (if forced, yes; if
not forced, only if not already open), and prevent new opens if so.
There's no need to start closing open instances at this point --
we're just making a decision to detach, and preventing new opens by
transitioning state that dkopen will respect[*].

The second step is to force all open instances to close.  This is
done by vdevgone.  By the time vdevgone returns, there can be no open
instances, so if there _were_ any, closing them via vdevgone will
have passed through dklastclose.

After that point, there can be no opens and no I/O operations, so
dk_openmask must already be zero and the bufq must be empty.

Thus, there's no need to have an explicit call to dklastclose (via
dkwedge_cleanup_parent) before or after making the decision to
detach.

[*] Currently access to this state is racy: nothing serializes
    dkwedge_detach's state transition with dkopen's test.  TBD in a
    separate commit shortly.
2023-04-21 18:30:52 +00:00
bin Remove an end of file trailing blank line that served no purpose. 2023-04-07 10:42:28 +00:00
common libc atomic: Make previous work a little less accidentally. 2023-04-03 16:45:46 +00:00
compat fix various typos in comments and log messages. 2022-05-29 10:47:39 +00:00
crypto remove files from previous version 2023-04-18 20:10:43 +00:00
dist/pf
distrib Install /boot/boot.cfg with EFI bootloaders. 2023-04-19 18:39:18 +00:00
doc Note update to dhcpcd-10.0.1 2023-04-21 17:00:05 +00:00
etc Resolve conflicts for lua 5.4.4 import. 2023-04-16 20:46:16 +00:00
external lua: fix formating diff to upstream in ldo.h 2023-04-21 17:48:06 +00:00
games Another err message typo! (found this one myself!!) 2023-04-19 09:39:29 +00:00
include PR/57288: Mingye Wang: <ssp/ssp.h>: Use __builtin_dynamic_object_size 2023-03-29 13:37:10 +00:00
lib Align types with readline-8.2 (wiz@) 2023-04-21 14:56:13 +00:00
libexec Oops wrong mask. 2023-04-18 22:42:52 +00:00
regress fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
rescue remove threads; size constraints and behavioral change 2022-05-16 14:55:56 +00:00
sbin mount_procfs(8): Document the format of the region descriptor 2023-04-18 18:42:20 +00:00
share style: remove mentions of ANSI C 2023-04-21 16:12:53 +00:00
sys dk(4): Use disk_begindetach and rely on vdevgone to close instances. 2023-04-21 18:30:52 +00:00
tests tests/lint: remove wrong comment 2023-04-15 12:59:02 +00:00
tools remap arm directory names, the same way the source does. 2023-02-07 20:37:30 +00:00
usr.bin resize.c: use estrdup(3) with basename(3) 2023-04-20 22:23:53 +00:00
usr.sbin Move date setting into cd9660_populate_iso_dir_record so there is no 2023-04-18 23:05:51 +00:00
BUILDING fix documentation for MKLINT 2022-10-01 08:55:45 +00:00
Makefile Deprecate extsrc/, EXTSRCSRCDIR, MKEXTSRC 2022-08-21 07:10:03 +00:00
Makefile.inc
README.md README: use https for man.NetBSD.org 2021-09-05 12:45:44 +00:00
UPDATING add a note about how to fix missing ./usr/lib/libisns* files. 2023-03-23 07:15:08 +00:00
build.sh Avoid the dependency on a populated tooldir (or building the tools) 2023-03-13 11:52:29 +00:00

README.md

NetBSD

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.

Building

You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:

./build.sh -U -u -j4 -m amd64 -O ~/obj release

Additional build information available in the BUILDING file.

Binaries

Testing

On a running NetBSD system:

cd /usr/tests; atf-run | atf-report

Troubleshooting

Latest sources

To fetch the main CVS repository:

cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src

To work in the Git mirror, which is updated every few hours from CVS:

git clone https://github.com/NetBSD/src.git