So what's this tool about ?

ngadkm is a tool to create a Nasgaïa devkit (NasGAïa DevKit Maker). Its aim is to make automaticaly a new basic Nasgaïa system. It’s accessible in subversion repositories, or can be viewed online

And what is done ?

For those who don't known what LFS is about

In some words, the goal is to create a new Nasgaïa system (the target one) from the one you’re currently on (the host one). To make the target system, you’ve to compile all the softwares in the new one with standard build programs (the compilation toolchain). We use for that the LFS book, which has proven its reliability.

But if you compile the target system directly with the tools of the host one, the result tend to be unusable (because the build toolchain has been built for your system, not another one). So the first step is to create a temporary environment, containing the required toolchain to make the real target system. This correspond to Chapter 5 of the LFS book (and the chap5 part of ngalfs). In ngadkm, this’s just a step in the build process, and result in a minimal system inside the tmpsys directory of the target filesystem.

And technicaly, what's really done ?

ngadkm use a configuration file to adjust itself to the host system. The first variable in this configuration is $DK_TARGET, which is where it can access the target root directory (/). This can be a simple directory in your existing filesystem (but when the devkit will be build, you’ll not be able to boot on), or a mount point for a dedicated filesystem (mounted from a real or a loopback device, at your convenience).

The first thing ngadkm do is to check its configuration file and the exactness of them (real directories, etc..). After what it copies itself in the target directory (mentionned by $DK_COPY in the configuration file). To be as independent as possible from the host system, it want to be executed by a dedicated user ($DK_USER) which will be created if it doesn’t exist. This re-run is done not from your copy of ngadkm, but from a copy (all the necessary tools are now found in the target directory).

At the end of all theses steps, the build process can begin ...

The temporary system creation

As already said, before creating the devkit, we’ve to make a temporary minimal system, containing an autonomous compilation toolchain (all the softwares needed to build the real system). This system, to be easily removed in the future built one, is placed entirely in the subdirectory: tmpsys.

The ngadkm tool and all it’s needed files (the software sources, the build directories, its log files ..) will be in the $DK_COPY subdirectory.

In a simplified view, from the target system, you’ll find :

/		the root of the new system
/tmpsys/	the temporary system
/ngadkm/	the ngadkm tool

And from the host system, if the target system is mounted in /nasgaia, you’ll find :

/				your system (the host one)
/nasgaia/			the root of the new system
/nasgaia/tmpsys/		the temporary system
/nasgaia/ngadkm/		the ngadkm tool
/tmpsys -> /nasgaia/tmpsys	needed for host/target referencing

It will build bash, gcc, binutils, bison, etc.. in this system. At the end, we’ll enter with the chroot command in the temporary system, from which we’ll build the real system: a minimal Nasgaïa (aka the devkit). This second step will not follow LFS anymore (and the tmpsys step did not follow it completly :-) ). This’s where Ncooker will start its work; you’ve understood, from this point, we’ll use standard Nasgaïa tools to make it build itself :-)

ngadkm.txt · Dernière modification: 19/10/2005 17:27
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki