NetBSD-Docs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New compat_bsdos.8 Manpage



On Fri, 28 Aug 2020 at 01:10, Dan Plassche <dplassche%gmail.com@localhost> wrote:
>
> 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.

Nice - some possible tweaks inline :)

> 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.

... the compat documentation and anyone having to read it in future
would certainly appreciate that

>
> 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

Could s/provides/includes/ as NOMID handles other older binaries

>      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.

It might be nice to provide a little more clarity on this - possibly
something like:

Standard BSD/OS 2.0+ binaries require static shared libraries. These
would typically be installed in /emul/bsdos/shlib under NetBSD, and
access can be provided by one of:
    1. A symlink from /shlib to /emul/bsdos/shlib
    2. ldconfig(8) [[configuration details here :)]]
    3. Setup /emul/bsdos suitable for chroot

Unrelated thought - if the handling of BSDI's binaries from
netbsd32_exec_aout.c::netbsd32_exec_aout_nomid was broken out into a
new bsdos_exec it could setup struct emul to default to the
/emul/bsdos in the same way as compat_linux and similar, plus give a
genuine COMPAT_BSDOS define :-p

>      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.


Home | Main Index | Thread Index | Old Index