📄 util-linux.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content= "application/xhtml+xml; charset=iso-8859-1" /> <title> 7.9. Util-linux-2.12r </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-MIPS"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS </h4> <h3> Chapter 7. If You Are Going to Boot </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="module-init-tools.html" title= "Module-Init-Tools-3.2.2">Prev</a> <p> Module-Init-Tools-3.2.2 </p> </li> <li class="next"> <a accesskey="n" href="udev.html" title="Udev-090">Next</a> <p> Udev-090 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 7.9. Util-linux-2.12r </h1> </div> <div class="package" lang="en" xml:lang="en"> <p> The Util-linux package contains miscellaneous utility programs. Among them are utilities for handling file systems, consoles, partitions, and messages. </p> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installation depends on:</span></strong> <span class="seg">Bash, Binutils, Coreutils, Diffutils, E2fsprogs, GCC, Gettext, Glibc, Grep, Make, Ncurses, Patch, Sed, and Zlib</span> </div> </div> </div> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <h2 class="sect2"> 7.9.1. Installation of Util-linux </h2> </div> <p> Util-linux fails to compile against newer versions of Linux-Libc-Headers. The following patch properly fixes this issue: </p> <pre class="userinput"><kbd class="command">patch -Np1 -i ../util-linux-2.12r-cramfs-1.patch</kbd></pre> <p> The following patch fixes build issues with GCC 4.1.0: </p> <pre class="userinput"><kbd class="command">patch -Np1 -i ../util-linux-2.12r-gcc4_fixes-1.patch</kbd></pre> <p> Util-linux does not use the freshly installed headers and libraries from the <tt class="filename">/tools</tt> directory by default. This is fixed by altering the configure script: </p> <pre class="userinput"><kbd class="command">cp -v configure{,.orig}sed -e 's@/usr/include@/tools/include@g' configure.orig > configure</kbd></pre> <p> The Util-linux installation uses <tt class="option">-o root</tt>. The following <span><strong class="command">sed</strong></span> removes that since we don't have users setup yet: </p> <pre class="userinput"><kbd class="command">cp -v MCONFIG{,.orig}sed -e 's|-o root||' MCONFIG.orig > MCONFIG</kbd></pre> <p> Prepare Util-linux for compilation: </p> <pre class="userinput"><kbd class="command">./configure</kbd></pre> <p> Compile the package: </p> <pre class="userinput"><kbd class="command">make HAVE_KILL=yes HAVE_SLN=yes \HAVE_SHADOW=no CPUOPT="" ARCH="" \CPU=""</kbd></pre> <div class="variablelist"> <p class="title"> <b>The meaning of the make parameters:</b> </p> <dl> <dt> <span class="term"><em class= "parameter"><tt>HAVE_KILL=yes</tt></em></span> </dt> <dd> <p> This prevents the <span><strong class= "command">kill</strong></span> program from being built. </p> </dd> <dt> <span class="term"><em class= "parameter"><tt>HAVE_SLN=yes</tt></em></span> </dt> <dd> <p> This prevents the <span><strong class= "command">sln</strong></span> program (a statically linked version of <span><strong class="command">ln</strong></span> already installed by Glibc) from being built and installed again. </p> </dd> <dt> <span class="term"><em class= "parameter"><tt>HAVE_SHADOW=no</tt></em></span> </dt> <dd> <p> This disables linking to shadow . </p> </dd> <dt> <span class="term"><em class= "parameter"><tt>CPUOPT=""</tt></em></span> </dt> <dd> <p> This disables any compiler optimizations by CPU type. </p> </dd> <dt> <span class="term"><em class= "parameter"><tt>ARCH=""</tt></em></span> </dt> <dd> <p> This disables the detection of the architecture. </p> </dd> <dt> <span class="term"><em class= "parameter"><tt>CPU=""</tt></em></span> </dt> <dd> <p> This disables the detection of the CPU. </p> </dd> </dl> </div> <p> Install the package: </p> <pre class="userinput"><kbd class="command">make HAVE_KILL=yes HAVE_SLN=yes HAVE_SHADOW=no \USE_TTY_GROUP=no CPUOPT="" ARCH="" \CPU="" DESTDIR=${LFS} install</kbd></pre> </div> <div class="content" lang="en" xml:lang="en"> <p> Details on this package are located in <a href= "../final-system/util-linux.html#contents-util-linux" title= "10.52.3. Contents of Util-linux">Section 10.52.3, “Contents of Util-linux.”</a> </p> </div> </div> <div class="navfooter"> <ul> <li class="prev"> <a accesskey="p" href="module-init-tools.html" title= "Module-Init-Tools-3.2.2">Prev</a> <p> Module-Init-Tools-3.2.2 </p> </li> <li class="next"> <a accesskey="n" href="udev.html" title="Udev-090">Next</a> <p> Udev-090 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a>. </li> </ul> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -