Source Mage GNU/Linux

Programs Speedtouch Project Snoopy Project eciadsl Project Sabine's website The bread recipe Source Mage BeOS LinAC My resume Notes Donation
Programs
Speedtouch Project
Snoopy Project
eciadsl Project
Sabine's website
The bread recipe
Source Mage
BeOS
LinAC
My resume
Notes
Donation
en fr

Source Mage GNU/Linux

BenoƮt PAPILLAULT, 2004-09-16
Updated: 2005-02-06

Some explanations

Source Mage GNU/Linux is a source based GNU/Linux distribution. This means that the installation of any software inside this distribution will download sources and compile them with specific chosen optimisation. The main site of this distribution is http://www.sourcemage.org/ . Many informations on the installation and use are available on the Wiki : http://wiki.sourcemage.org/ .

Since I found this project interesting, I'm participating in it since June 2003 in order to produce installation CD-ROM. Recently, I'm trying to port Source Mage to 64 bits processor from AMD (x86_64).

ISO image creation

ISO image version 0.9.4-test2 x86, ppc and x86_64 (for testing)

Those images are available here!

ISO images version 0.9.3 x86 and ppc (stable)

ISO images version 0.9.2 ppc review

This image is available at http://download.sourcemage.org/iso/. Tests done on a ibook g4 have lead to the following results.

ISO documentation

64 bits architecture portage

64 bits architecture of AMD processors allows (under some conditions) to execute both 32 bits and 64 bits code. For this reason, we call such platform bi-arch platforms. However, even if the processor is able to simultaneously execute 32 bits process and 64 bits process, each 32 bits programs can only use 32 bits libraries and each 64 bits programs can only use 64 bits libraries. For this reason, some libraries are needed in both 32 bits version and 64 bits version. We have chosen to put 32 bits libraries under /lib32 (or /usr/lib32) and 64 bits libraries under /lib (or /usr/lib). This choice simplify porting existing applications that are used to install under /lib.

  • Definition : We call bi-arch platform a platform that is able to execute code for two different architectures simultaneously.
  • Definition : We call multi-arch kernel header Linux kernel headers that are designed to be used on several architectures simultaneously. This is a requirement to compile glibc on a bi-arch platform.
  • Definition : We call bi-arch spell a spell that should be compiled on both architectures. Example: glibc.
  • Definition : We call multilib compiler a compiler that handles (and generates) libraries for different architectures. Requirement is to have a bi-arch glibc first.
  • Definition : We call bi-arch sorcery a sorcery version that is able to compile bi-arch spells. Reminder: sorcery is the tool that will install software from sources.

To add all those functionnalities to Source Mage, various modifications have been done. Those modifications have been tested on a 64 bits Athlon processor. Beside all the work done, only a chroot'ed system inside a Mandrake distribution has been achieved.

Sorcery

sorcery is the tool for package management in SourceMage GNU/Linux.

sorcery patch for /lib/ld-linux.so.2 use

sorcery is the package (or spell) management tool. Installation is done by using the usual sequence (described here in a simplified version) :

./configure --prefix=/usr
make
make install

Installed files are then found by using the installwatch tool. The above mentioned sequence has then an extra step:

./configure --prefix=/usr
make
here, all previously installed files by the spell are removed
make install

Thus in the case of the glibc spell, both files /lib/ld-2.3.2.so and /lib/ld-linux.so.2 are removed. The latter being a symbolic link to the former build by the ldconfig command.

The file /lib/ld-linux.so.2 is however a vital file for the system. Indeed, it is the loader. Each and every dynamic executable contain a reference to this file, as show in the following command:

$ LANG= readelf -l /bin/sh | grep interpreter
      [Requesting program interpreter: /lib/ld-linux.so.2]

Thus to prevent this file deletion, a special file /var/lib/sorcery/excluded contains the name of all files that will not be removed. However, the problem is that each architecture use a different name. Thus, the above command would produce the following results on ppc and x86_64 architectures respectively:

$LANG= readelf -l /bin/sh | grep interpreter
      [Requesting program interpreter: /lib/ld.so.1]
$LANG= readelf -l /bin/sh | grep interpreter
      [Requesting program interpreter: /lib/ld-linux-x86-64.so.2]

The following patch is used to remove such limitation : sorcery-ld.diff

glibc-2.3.2 spell has been compiled twice to check that the patch is working correctly.

Using sorcery for cross compilation

Here is a small design document on how this could be implemented : sorcery BUILD_ROOT. You can read some official links too:

installwatch bugs

Links

Valid HTML 4.01! Valid CSS!
Benoit PAPILLAULT