From ae636e7f2079cfd1bc08e71ea26ba896a9fa9c55 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 25 Aug 2021 01:35:21 +0800 Subject: [PATCH] cross-ng: chapter 6: add agetty, mount, and setsid from util-linux --- chapter06/chapter06.xml | 2 + chapter06/util-linux.xml | 83 ++++++++++++++++++++++++++++++++++++++++ packages.ent | 2 + 3 files changed, 87 insertions(+) create mode 100644 chapter06/util-linux.xml diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 366e9a8ab..749cca8fe 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -31,4 +31,6 @@ + + diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml new file mode 100644 index 000000000..f68c2a605 --- /dev/null +++ b/chapter06/util-linux.xml @@ -0,0 +1,83 @@ + + + %general-entities; +]> + + + + + + util-linux + &util-linux-version; +
&util-linux-url;
+
+ + Programs from Util-linux-&util-linux-version; + + + programs from util-linux + tools + + + + + + <para><command>agetty</command>, <command>mount</command>, and + <command>setsid</command> are utilities in + <application>Util-Linux</application>. We need them to + set up the environment once we boot the temporary system.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&mount-setsid-sbu;</seg> + <seg>&mount-setsid-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of agetty, setsid and mount + + 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 + + + + + + + <para>Details on this package are located in + <xref linkend="contents-utillinux" role="."/></para> + + </sect2> + +</sect1> diff --git a/packages.ent b/packages.ent index e20364803..f11926bff 100644 --- a/packages.ent +++ b/packages.ent @@ -719,6 +719,8 @@ <!ENTITY util-linux-tmp-sbu "0.7 SBU"> <!ENTITY util-linux-fin-du "261 MB"> <!ENTITY util-linux-fin-sbu "1.1 SBU"> +<!ENTITY mount-setsid-du "85 MB"> +<!ENTITY mount-setsid-sbu "less than 0.1 SBU"> <!ENTITY vim-version "8.2.4383"> <!ENTITY vim-majmin "82">