qLinux
… a distribution study
<< Prev Prepare the Chroot Environment
Next >> Install the Basic System
Temporary Tools Part II
Entering the Chroot'ed Environment
Enter the Chroot ( sudo ~/dochroot ). If not done already, the first thing we have to do is to create  /bin/sh  for compatibility reasons:
$> mkdir /bin $> cd /bin $> ln -s ../qlnx/bin/sh
This is really temporarily to build the rest of qLinux. Later on we will get rid of "/bin/sh" - fortunately we running a linux kernel. Some more directories and files:
$> mkdir /tmp && chmod 1777 /tmp $> mkdir -p /home/admin
Building Additional Temporary Tools
Some packages from the chapter 7 of the book can be skipped, because they are not required. The ones are:
| Gettext-0.21 | internationalization and localization are not required right now | ||
| Perl-5.34.0 | |||
| Python-3.9.6 | required to run the glibc test suite - we don't have glibc | ||
| Texinfo-6.8 | we don't want info pages at all |
Thus the following packages remains:
        Libstdc++ from GCC-11.2.0, Pass 2
        Bison-3.7.6
        Util-linux-2.37.2
Libstdc++ from GCC-11.2.0, Pass 2
Reference: Libstdc++ from GCC-11.2.0, Pass 2. This is done already.
Bison-3.7.6
Reference: 7.9. Bison-3.7.6.
./configure --prefix=/qlnx \
--docdir=/tmp \
--mandir=/qlnx/man \
--datarootdir=/qlnx/dat \
--infodir=/tmp
Fix the shebang of  yacc :
sed -i 's/^#\!*.\/bin\/sh/#\!\/qlnx\/bin\/sh/g' /qlnx/bin/yacc
Util-linux-2.37.2
Reference: 7.13. Util-linux-2.37.2.
Apply a patch to adjust path names for qLinux:
./configure --prefix=/qlnx \
--bindir=/qlnx/bin \
--sysconfdir=/qlnx/etc \
--includedir=/qlnx/inc \
--mandir=/qlnx/man \
--datarootdir=/qlnx/dat \
--docdir=/tmp \
--infodir=/tmp
This package doesn't have any scripts with a shebang, but actually some man pages have a wrong path (and even others like “/etc/passwd” or “/proc/mounts” etc.). The configure option  –sbindir  doesn't work for all programs, so some will be installed in  {$prefix]/sbin  anyway. Thus we don't use this option and move the admin executables with modified rights after install:
chmod 0754 qlnx/sbin/* mv /qlnx/sbin/* /qlnx/bin rmdir /qlnx/sbin
<< Prev Prepare the Chroot Environment
        
Next >> Install the Basic System
