⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kernel.html

📁 lfs3.1 从源代码构建linux。html版本。
💻 HTML
字号:
<HTML><HEAD><TITLE>Installing a kernel</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.63"><LINKREL="HOME"TITLE="Linux From Scratch"HREF="../index.html"><LINKREL="UP"TITLE="Making the LFS system bootable"HREF="../chapter08/chapter08.html"><LINKREL="PREVIOUS"TITLE="Creating the /etc/fstab file"HREF="../chapter08/fstab.html"><LINKREL="NEXT"TITLE="Making the LFS system bootable"HREF="../chapter08/lilo.html"></HEAD><BODYCLASS="sect1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Linux From Scratch: Version 3.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="../chapter08/fstab.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 8. Making the LFS system bootable</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="../chapter08/lilo.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="sect1"><H1CLASS="sect1"><ANAME="ch08-kernel">8.3. Installing a kernel</A></H1><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen">Estimated build time:           Depends on options selectedEstimated required disk space:  Depends on options selected</PRE></FONT></TD></TR></TABLE><P>Building the kernel involves a few steps: configuring it and compilingit. There are a few ways to configure the kernel. If you don't like theway this book does it, read the <TTCLASS="filename">README</TT> that comeswith the kernel source tree, and find out what the other options are.</P><P>Something you could do, is take the .config file from your hostdistribution's kernel source tree and copy it to $LFS/usr/src/linux.This way you don't have to configure the entire kernel from scratch andcan use your current values. If you choose to do this, first run themake mrproper command below, then copy the .config file over, then runmake menuconfig (make oldconfig may be better in some situations. Seethe <TTCLASS="filename">README</TT> file for more details when to use makeoldconfig).</P><P>The following commands are run to build the kernel:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>cd /usr/src/linux &#38;&#38;</B></TT><TTCLASS="userinput"><B>make mrproper &#38;&#38;</B></TT><TTCLASS="userinput"><B>make menuconfig &#38;&#38;</B></TT><TTCLASS="userinput"><B>make dep &#38;&#38;</B></TT><TTCLASS="userinput"><B>make bzImage &#38;&#38;</B></TT><TTCLASS="userinput"><B>make modules &#38;&#38;</B></TT><TTCLASS="userinput"><B>make modules_install &#38;&#38;</B></TT><TTCLASS="userinput"><B>cp arch/i386/boot/bzImage /boot/lfskernel &#38;&#38;</B></TT><TTCLASS="userinput"><B>cp System.map /boot</B></TT></PRE></FONT></TD></TR></TABLE></P><P>Note: the arch/i386/boot/bzImage path may vary on different platforms.</P><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN4508">8.3.1. Dependencies</A></H2><P>Linux-2.4.8 needs the following to be installed:</P><PCLASS="literallayout"><br>sh&nbsp;from&nbsp;the&nbsp;bash&nbsp;package<br><br>ar&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br>as&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br>ld&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br>nm&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br>objcopy&nbsp;from&nbsp;the&nbsp;binutils&nbsp;package<br><br>chown&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>cp&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>ln&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>mkdir&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>mv&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br>rm&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<br><br>find&nbsp;from&nbsp;the&nbsp;findutils&nbsp;package<br>xargs&nbsp;from&nbsp;the&nbsp;findutils&nbsp;package<br><br>gcc&nbsp;from&nbsp;the&nbsp;gcc&nbsp;package<br><br>grep&nbsp;from&nbsp;the&nbsp;grep&nbsp;package<br><br>make&nbsp;from&nbsp;the&nbsp;make&nbsp;package<br><br>awk&nbsp;from&nbsp;the&nbsp;mawk&nbsp;package<br><br>depmod&nbsp;from&nbsp;the&nbsp;modutils&nbsp;package<br>genksyms&nbsp;from&nbsp;the&nbsp;modutils&nbsp;package<br><br>hostname&nbsp;from&nbsp;the&nbsp;net-tools&nbsp;package<br><br>sed&nbsp;from&nbsp;the&nbsp;sed&nbsp;package<br><br>basename&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>date&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>expr&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>pwd&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>uname&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>whoami&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br>yes&nbsp;from&nbsp;the&nbsp;sh-utils&nbsp;package<br><br>cat&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br>md5sum&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br>sort&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br>tail&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br>touch&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br>tr&nbsp;from&nbsp;the&nbsp;textutils&nbsp;package<br></P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="../chapter08/fstab.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../index.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="../chapter08/lilo.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Creating the /etc/fstab file</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../chapter08/chapter08.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Making the LFS system bootable</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -