Details on this package are located in Section 8.75.2, “Contents of Util-linux.”
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.
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.”