Hello, After recent discussion on the port-amd64 mailing list and some bug fixes this year, I would like to propose the new manpage below to document the working compatibility with BSDi binaries under NetBSD on i386 and amd64.
An additional manpage covering the other 4.3-4.4 BSD derived binaries that work on NetBSD under COMPAT_NOMID might also be helpful in the future. I would be interested in continuing to work on compat documentation. Thanks, Dan Plassche compat_bsdos(8) NetBSD System Manager's Manual compat_bsdos(8) NAME compat_bsdos -- binary compatibility for BSDi releases DESCRIPTION The COMPAT_NOMID kernel option provides compatibility with BSDi 1-3 a.out(5) binaries on NetBSD/i386 and NetBSD/amd64. The option is included in the GENERIC kernel on i386, but needs to be enabled along with EXEC_AOUT on amd64. Null memory protection must be disabled with the sysctl(7) option vm.user_va0_disable set to 0 for the binaries to run successfully. BSD/OS 2.0+ binaries also require an ldconfig(8) configuration or a sym- bolic link pointing to the /emul/bsdos/shlib directory to run outside of a chroot. BSD/OS 4.0 switched to elf binaries that do not run under the compatibil- ity layers currently available on NetBSD. SEE ALSO options(4), a.out(5), elf(5), sysctl(7), compat_netbsd32(8) HISTORY BSD/OS (BSD/386) 1.0-1.1 was derived from 4.3BSD-Reno code in the Net/2 release. BSD/OS 2.0 was based on 4.4BSD-Lite, but introduced new static shared libraries compiled into binary objects under /shlib. The build system included the shlicc command with the -Bstatic flag that allowed reverting to the standard library archive format. OpenBSD 2.2-4.7 included a different compatibility implementation under the COMPAT_BSDOS kernel option. BUGS BSD/OS compatibility was broken on NetBSD 5-6. BSD/OS added SPARC support with release 3.0, but the binaries are incor- rectly recognized and fail as sunos executables on NetBSD/sparc and NetBSD/sparc64. NetBSD 9.0 August 27, 2020 NetBSD 9.0 Source: .\" .\" .\" Copyright (c) 2020 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Dan Plassche. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd August 27, 2020 .Dt compat_bsdos 8 amd64,i386,sparc,sparc64 .Os .Sh NAME .Nm compat_bsdos .Nd binary compatibility for BSDi releases .Sh DESCRIPTION .Pp The .Cd COMPAT_NOMID kernel option provides compatibility with BSDi 1-3 .Xr a.out 5 binaries on .Tn Nx Ns /i386 and .Tn Nx Ns /amd64 . The option is included in the .Li GENERIC kernel on .Em i386 , but needs to be enabled along with .Cd EXEC_AOUT on .Em amd64 . .Pp Null memory protection must be disabled with the .Xr sysctl 7 option .Va vm.user_va0_disable set to .Li 0 for the binaries to run successfully. .Pp .Bsx 2.0+ binaries also require an .Xr ldconfig 8 configuration or a symbolic link pointing to the .Pa /emul/bsdos/shlib directory to run outside of a chroot. .Pp .Bsx 4.0 switched to elf binaries that do not run under the compatibility layers currently available on .Nx . .Sh SEE ALSO .Xr options 4 , .Xr a.out 5 , .Xr elf 5 , .Xr sysctl 7 , .Xr compat_netbsd32 8 .Sh HISTORY .Pp .Tn Bsx "(BSD/386)" 1.0-1.1 was derived from .Bx 4.3 Reno code in the .Tn Net/2 release. .Pp .Bsx 2.0 was based on .Bx 4.4 Lite , but introduced new static shared libraries compiled into binary objects under .Pa /shlib . The build system included the .Li shlicc command with the .Fl Bstatic flag that allowed reverting to the standard library archive format. .Pp .Ox 2.2-4.7 included a different compatibility implementation under the .Li COMPAT_BSDOS kernel option. .Sh BUGS .Pp .Bsx compatibility was broken on .Nx 5-6. .Pp .Bsx added .Tn SPARC support with release 3.0, but the binaries are incorrectly recognized and fail as .Li sunos executables on .Tn Nx Ns /sparc and .Tn Nx Ns /sparc64 .