6.19. Programs from Util-linux-2.37.2

agetty, mount, and setsid are utilities in Util-Linux. We need them to set up the temporary system environment in the early stage after boot into it.

Approximate build time: less than 0.1 SBU
Required disk space: 85 MB

6.19.1. Installation of the Programs from Util-linux

Update helper scripts to allow cross compilation for loongarch:

tar xf ../config-20210826.tar.xz --strip-components=1 -C config

Prepare Util-linux for compilation:

./configure --build=$(config/config.guess) --host=$LFS_TGT --disable-shared

The meaning of the configure option:

--disable-shared

We do not need to install any of the shared libraries at this time, therefore there is no need to build them.

We only need three tools from the package now, build them:

make agetty mount setsid

Install the tools:

install -vm755 agetty       $LFS/usr/sbin
install -vm755 mount setsid $LFS/usr/bin

Details on this package are located in Section 8.75.2, “Contents of Util-linux.”