svn commit: r297597 - in head/sys: amd64/linux amd64/linux32 i386/linux

Baptiste Daroussin bapt at freebsd.org
Wed Apr 6 06:40:07 UTC 2016


On Tue, Apr 05, 2016 at 06:32:16PM -0700, John Baldwin wrote:
> On Tuesday, April 05, 2016 10:36:49 PM Baptiste Daroussin wrote:
> > Author: bapt
> > Date: Tue Apr  5 22:36:48 2016
> > New Revision: 297597
> > URL: https://svnweb.freebsd.org/changeset/base/297597
> > 
> > Log:
> >   Add kern.features flags for linux and linux64 modules
> >   
> >   kern.features.linux: 1 meaning linux 32 bits binaries are supported
> >   kern.features.linux64: 1 meaning linux 64 bits binaries are supported
> >   
> >   The goal here is to help 3rd party applications (including ports) to determine
> >   if the host do support linux emulation
> >   
> >   Reviewed by:	dchagin
> >   MFC after:	1 week
> >   Relnotes:	yes
> >   Differential Revision:	D5830
> 
> Other parts of the system (e.g. libsysdecode, the various symbols exported by
> the modules, etc.) use "linux" to mean supporting Linux binaries of the same
> ABI as the host (so x86-64 on amd64 and i386 on i386) and "linux32" to mean
> supporting 32-bit Linux binaries on a 64-bit host.  Note that we used to
> have linux.ko on Alpha which was a 64-bit ABI, not 32-bit.  It is unfortunate
> that we called linux32.ko linux.ko, but we shouldn't perpetuate that mistake
> further IMO.  For example, I think if we grow Linux/aarch64 ABI support on
> FreeBSD/arm64, that should be called 'linux.ko', not 'linux64.ko'.
> Similarly, Linux/armv6 on FreeBSD/armv6 would also be 'linux.ko'.
> 
> I would also list the names in the feature description (so Linux/i386, not
> Linux 32-bit, since Linux/armv6 is a 32-bit binary, but linux.ko on
> FreeBSD/i386 can't run it).
> 
Well I tried to be consistent with the other example we have which is cloudabi.

I considered the x86 case and tried to generalize:

linux => my arch (x86) in 32bit
linux64 => my arch (x86) in 64bit

Let's consider aarch64 which is supposed to also have support for 32bits (one
would be happy to run linux armv6 on top of it ,no?)

linux => my arm in 32bits
linux64 => my arch in 64bits

That said, I have no strong feelings about it

Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20160406/dcbae859/attachment.sig>


More information about the svn-src-head mailing list