Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2006 15:19:38 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        freebsd-emulation@FreeBSD.org
Subject:   Fedora Core 5 emulation and problems
Message-ID:  <15886293@srv.sem.ipt.ru>

next in thread | raw e-mail | index | archive | help
Hi!


I have tiny success on porting FC5.

The first problem was getting message "FATAL: kernel too old". After
patching /sys/compat/linux/linux_mib.c:
=====
--- linux_mib.c.orig    Fri May 12 14:36:25 2006
+++ linux_mib.c Wed May 17 01:53:06 2006
@@ -81,7 +81,7 @@
            0, 0, linux_sysctl_osname, "A",
            "Linux kernel OS name");
 
-static char    linux_osrelease[LINUX_MAX_UTSNAME] = "2.4.2";
+static char    linux_osrelease[LINUX_MAX_UTSNAME] = "2.6.10";
 
 static int
 linux_sysctl_osrelease(SYSCTL_HANDLER_ARGS)
=====

Thanks to netchild for pointing me to the right direction.

Now I'm able to install FC5 but not run. Here is a result of ktrace:
=====
   765 uname    CALL  #243(0xbfbfe5fc)
   765 uname    RET   #243 -1 errno -78 Unknown error: -78
   765 uname    CALL  old.killpg(0x2,0xbfbfe3c0,0x3)
   765 uname    GIO   fd 2 wrote 97 bytes
       "cannot set up thread-local storage: set_thread_area failed when settin\
        g up thread-local storage
=====

SYS_243 is a call for set_thread_area() and error 78 is ENOSYS. That
is actually what we do implement at /sys/i386/linux/linux_machdep.c.
Seems that for linux kernel versions 2.5.29+ this function is
mandatory but not only a dummy one with an error return.

According to linux man(2) set_thread_area, the function may return
EINVAL, EFAULT or ESRCH if unsuccess. I tried to replace our current
errno ENOSYS with those but in vain.

Moreover, at linux literature this method is called an "old way". The
new way is using NTPL (Native POSIX Thread Library):
http://people.redhat.com/drepper/nptl-design.pdf

This are directions we should go to to get modern linux kernel and
programms to run under FreeBSD. Maybe a Google SoC may help.


Hey, the good news is that an FC4 port is successfilly running on my
system a couple of days. ;-)


WBR
-- 
Boris B. Samorodov, Research Engineer
InPharmTech Co,     http://www.ipt.ru
Telephone & Internet Service Provider



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15886293>