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

📄 makedev.html

📁 lfs3.1 从源代码构建linux。html版本。
💻 HTML
字号:
<HTML><HEAD><TITLE>Creating devices (Makedev-1.4)</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.63"><LINKREL="HOME"TITLE="Linux From Scratch"HREF="../index.html"><LINKREL="UP"TITLE="Installing basic system software"HREF="../chapter06/chapter06.html"><LINKREL="PREVIOUS"TITLE="Installing Glibc-2.2.4"HREF="../chapter06/glibc.html"><LINKREL="NEXT"TITLE="Installing Man-pages-1.43"HREF="../chapter06/man-pages.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="../chapter06/glibc.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 6. Installing basic system software</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="../chapter06/man-pages.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="sect1"><H1CLASS="sect1"><ANAME="ch06-makedev">6.6. Creating devices (Makedev-1.4)</A></H1><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen">Estimated build time:           1 minuteEstimated required disk space:  57 KB</PRE></FONT></TD></TR></TABLE><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN1796">6.6.1. Creating devices</A></H2><P>Note: the MAKEDEV-1.4.bz2 file you have unpacked is not an archive, so it won't create a directory for you to cd into.</P><P>Create the device files by running the following commands:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>cp MAKEDEV-1.4 /dev/MAKEDEV &#38;&#38;cd /dev &#38;&#38;chmod 754 MAKEDEV</B></TT></PRE></FONT></TD></TR></TABLE></P><P>Now, depending on whether you are going to use devpts or not, youcan run one of two commands:</P><P>If you do not intend to use devpts, run:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>./MAKEDEV -v generic</B></TT></PRE></FONT></TD></TR></TABLE></P><P>If you do intend to use devpts, then run:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>./MAKEDEV -v generic-nopty</B></TT></PRE></FONT></TD></TR></TABLE></P><P>Note that if you aren't sure, it's best to use the <TTCLASS="userinput"><B>./MAKEDEV -v generic</B></TT> command as this willensure you have the devices you need.  If you are sure you are going touse devpts however, the other command makes sure that you don't create aset of devices which you don't require.</P><P>MAKEDEV will create hda[1-20] to hdh[1-20] and such but keep in mindthat you may not be able to use all of those devices due to kernel limitations regarding the max. number of partitions.</P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN1815">6.6.2. Command explanations</A></H2><P><TTCLASS="userinput"><B>./MAKEDEV -v generic:</B></TT> This creates genericdevices. Normally, these devices are all the devices you need. It's possible that you are missing some special devices that are needed for your hardwareconfiguration. Create them with ./MAKEDEV -v &#60;device&#62;.  The <TTCLASS="userinput"><B>generic-nopty</B></TT> option does a similar job but skipssome devices which are not needed if you are using devpts.</P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN1820">6.6.3. Contents</A></H2><P>The MAKEDEV package contains the MAKEDEV script.</P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN1823">6.6.4. Description</A></H2><P>MAKEDEV is a script that can help in creating the necessary staticdevice files that usually reside in the /dev directory.</P></DIV><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN1826">6.6.5. Dependencies</A></H2><P>MAKEDEV-1.4 needs the following to be installed:</P><PCLASS="literallayout"><br>sh&nbsp;from&nbsp;the&nbsp;bash&nbsp;package<br><br>chmod&nbsp;from&nbsp;the&nbsp;fileutils&nbsp;package<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>mknod&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>grep&nbsp;from&nbsp;the&nbsp;grep&nbsp;package<br><br>expr&nbsp;from&nbsp;the&nbsp;sh-utils&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="../chapter06/glibc.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../index.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="../chapter06/man-pages.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Installing Glibc-2.2.4</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../chapter06/chapter06.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Installing Man-pages-1.43</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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