Subject: Re: compat_linux/amd64 need testers
To: Mihai CHELARU <kefren@netbsd.ro>
From: Nicolas Joly <njoly@pasteur.fr>
List: port-amd64
Date: 06/26/2005 14:58:13
On Sun, Jun 26, 2005 at 01:37:49PM +0300, Mihai CHELARU wrote:
> Mihai CHELARU wrote:
> 
> > Emmanuel Dreyfus wrote:
> > 
> >> I made some prgress with compat_linux/amd64. It's probably not ready for
> >> running interesting programs yet, but we need to try.
> >> 
> >> I'm looking for some testers that could try running stuff and discovers
> >> the remaining problems.
> > 
> > Also, pkgsrc/emulators/suse91_base fails with the same error when execute
> > ldconfig on install.
> > Looks like it checks /proc/sys/kernel/osrelease (which netbsd procfs
> > doesn't implement) but I'm not sure it doesn't check anything else because
> > I've created that file and echoed there 2.6.11 but still complains.
[...]
> Ah, this makes the difference and looks like my testing programs are working
> at least:
> 
> # cvs -d:pserver:anoncvs@anoncvs.netbsd.org:/cvsroot diff -u -rHEAD
> src/sys/compat/linux/common/linux_sysctl.c
> Index: src/sys/compat/linux/common/linux_sysctl.c
> ===================================================================
> RCS file: /cvsroot/src/sys/compat/linux/common/linux_sysctl.c,v
> retrieving revision 1.17
> diff -u -r1.17 linux_sysctl.c
> --- src/sys/compat/linux/common/linux_sysctl.c  20 Jun 2005 02:49:19 -0000     
> 1.17
> +++ src/sys/compat/linux/common/linux_sysctl.c  26 Jun 2005 10:37:07 -0000
> @@ -63,6 +63,9 @@
>  #if defined(__i386__) || defined(__powerpc__)
>  char linux_release[128] = "2.4.18";
>  char linux_version[128] = "#0 Wed Feb 20 20:00:02 CET 2002";
> +#elif defined(__amd64__)
> +char linux_release[128] = "2.6.11";
> +char linux_version[128] = "#0 Sat Jun 25 11:11:11 CET 2005";
>  #else
>  char linux_release[128] = "2.0.38";
>  char linux_version[128] = "#0 Sun Nov 11 11:11:11 MET 2000";

Do we need to have a 2.6 kernel here ?

njoly@lanfeust [~]> sudo sysctl -w emul.linux.kern.osrelease=2.4.18
emul.linux.kern.osrelease: 2.0.38 -> 2.4.18
njoly@lanfeust [~]> /usr/pkg/emul/linux/bin/uname -a
Linux lanfeust.sis.pasteur.fr 2.4.18 #0 Sun Nov 11 11:11:11 MET 2000 amd64 amd64 amd64 GNU/Linux
njoly@lanfeust [~]> file /usr/pkg/emul/linux/bin/uname
/usr/pkg/emul/linux/bin/uname: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), not stripped

It seems that we need a Linux kernel version greater than 2.4.1; and
the already defined version 2.4.18 looks good enough ...

Here are 2 x86_64 linux hosts i have access to (CentOS and SuSE) :

njoly@raclette-04 [~]> cat /proc/version 
Linux version 2.4.21-27.0.2.ELsmp (centos@head) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-39)) #1 SMP Wed Jan 19 11:28:26 CST 2005

njoly@raclette-04:~> cat /proc/version 
Linux version 2.6.5-7.145-smp (geeko@buildhost) (gcc version 3.3.3 (SuSE Linux)) #1 SMP Thu Jan 27 09:19:29 UTC 2005

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.