kfreebsd-amd64 ?

Robert Millan rmh at aybabtu.com
Mon Oct 31 08:36:36 UTC 2005


On Sun, Oct 30, 2005 at 03:42:39PM +0100, Petr Salinger wrote:
> Hi all.
> 
> * according to popcon.debian.org amd64 is the 2nd most popular debian architecture despite being unofficial
> * majority of currently produced i386-capable processors is also amd64-capable
> * amd64 is fully supported in FreeBSD since release 5.2   
> * amd64 is fully supported in glibc 2.3.x series for Linux
> 
> Therefore, it might be both usefull and possible to create kfreebsd-amd64.

Yes.  We have looked into this already, but noone volunteered to do the work yet.

Does glibc 2.3 support amd64?  Otherwise we'll have to work on updating glibc
first.
                                
> In fact, I cannot estimate at least roughly how much work it is.
> But someone of you might.
> 
> Creating amd64 port of glibc might be as "easy"?as create 
> x86_64 directory in glibc-kbsd-2.3/sysdeps/unix/bsd/bsd4.4/kfreebsd/
> and create a few (but extra sophisticated) files 
> similar to neighbours in i386 and alpha directories.
> Or not ...

Adding the amd64-specific asm code in sysdeps might be a bit difficult (but we
probably can reuse code from FreeBSD libc).

Bootstrapping a new port is not a big deal if you know what you're doing, but it
takes lots of hours.  If you want an example, when I bootstrapped kfreebsd-i386,
it took roughly a month from the first native toolchain (that run on glibc), to
a fully self-hosting system, with X11, that was able to boot on itself.  At that
time the packages in base that needed porting work was much higher, though (and
I had a lot of spare time too ;)).

> The rest of bootstrap can be similar to bootstrap of kfreebsd-i386 from FreeBSD/i386.       
> Or easier, because it looks like amd64 kernel can with COMPAT_IA32 have i386 userspace.

Are you sure it can?  That'd be very good news!  Then it'd probably be easier to
start with making gcc accept -m64, and then build an amd64 kernel for the ia32
port (however, I think this can't be done without a 64-bit libc).  After that,
one could simply run kfreebsd-i386 userland with your 64-bit kernel and build a
64-bit chroot or something.

-- 
Robert Millan



More information about the Glibc-bsd-devel mailing list