RE: [Lsb-book] SI chapter

"Wichmann, Mats D" <[email protected]> Mon, 1 Mar 2004 07:36:09 -0800
Newsgroups gmane.linux.lsb.implementation
Message-ID <[email protected]>
> Could someone explain to me the phases to build the SI?
>
> http://lsbbook.gforge.freestandards.org/samp-lsb-si.html

Okay, don't know how much or how little detail you were
looking for, so please come back with questions.

The first, or bootstrap, phase of the LSB-si build is to
produce a minimal toolchain of static binaries.

The second phase of the build is to use the bootstrap
phase as a chroot environment to build a more complete
toolchain.  As binaries are rebuilt which were built
in the bootstrap phase, the new ones install on top
of the old static copies so that by the end of the
second phase, a complete build environment, using
all dynamic libraries.  This environment has the
characteristic that it is entirely isolated from the
details of the build host's build enviroment, since
none of the build host's tools have been used to
compile the final binaries and libraries.

Clarifying side note: To reduce rebuild time, the bootstrap
phase is copied to another location before starting, and 
the copy is used as phase2.  During LSB-si development, 
there tend to be few changes to the bootstrap, but many 
to the later phases. For a released LSB-si source tree, 
this really doesn't matter except that it increases the 
space requirements of the build area a bit (only about 
150 meg for an ia32 build host, however).  Thus the "copy 
bootstrap to phase2 part is not an essential part of the 
build strategy, but rather a convenience for LSB-si
developers.

Phase 3 is the construction of the actual LSB-si as it
will be delivered.  In this phase, the completed phase 2
is used in a chroot as the build environment, and each
package is then compiled, and installed to a target
location which will be the LSB-si tree.  During phase 3,
care is taken not to install unnecessary binaries or
libraries, often an upstream source package will build
and install more than is required by the LSB and these
are (sometimes) pruned from the final tree.

Because we already anticipate several uses for the LSB-si
that require more than the core set, there exists a
phase 4 which builds add-on bundles that can be installed
on top of the base LSB-si bundle to provide additional
functionality.  There are currently three sub-phases of
phase 4, one to build additional tools required for 
running the lsb-runtime-test suite on the lsbsi, a
second to build additional binaries to make a bootable
system, and the third to build additional binaries to
make a user-mode-linux system.  Phase 4 is built by the
phase 2 build environment just like phase 3 is, and is
completely independent of phase 3.  That is, if one had
a completed phase 2, one could start off a phase 4 build
without ever building phase 3 and it would work fine.
This has implications for your diagram, which should not
show phase 4 as a sucessor to phase 3, but as a sibling
(or perhaps 3 siblings? not sure...)
It is likely there will be additional phase 4 subphases
in the future, with the one which has been requested
fairly often being a build environment.  

Hope this helps.

Mats