Changeset 540fd31


Ignore:
Timestamp:
02/07/2004 02:55:52 PM (20 years ago)
Author:
Alex Gronenwoud <alex@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
7873a7c
Parents:
e8692c5e
Message:

Replacing MAKEDEV with make_devices.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3236 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • appendixa/makedev-dep.xml

    re8692c5e r540fd31  
    1 <para>For its installation MAKEDEV depends on: Bash, Coreutils.</para>
     1<para>For its installation Make_devices depends on: Bash, Bzip2,
     2Coreutils.</para>
  • appendixa/makedev-desc.xml

    re8692c5e r540fd31  
    11<sect2><title>Short description</title>
    22
    3 <para><command>MAKEDEV</command> is a script for creating the necessary
    4 static device nodes, usually residing in the <filename>/dev</filename>
    5 directory.</para>
     3<para><command>make_devices</command> is a script for creating a basic set of
     4static device nodes, usually residing in the <filename
     5class="directory">/dev</filename> directory.</para>
    66
    77</sect2>
  • appendixa/makedev-down.xml

    re8692c5e r540fd31  
    1 <literallayout>Official download location for MAKEDEV (&makedev-version;):
     1<literallayout>Official download location for Make_devices (&makedev-version;):
    22<ulink url="&http-down;"/></literallayout>
  • appendixa/makedev-shortdesc.xml

    re8692c5e r540fd31  
    11<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
    22
    3 <sect2 id="contents-makedev"><title>Contents of MAKEDEV</title>
     3<sect2 id="contents-makedev"><title>Contents of Make_devices</title>
    44
    5 <para><emphasis>Installed script</emphasis>: MAKEDEV</para>
     5<para><emphasis>Installed script</emphasis>: make_devices</para>
    66
    77</sect2>
  • chapter01/changelog.xml

    re8692c5e r540fd31  
    66
    77<itemizedlist>
     8
     9<listitem><para>February 7th, 2004 [alex]: Chapter 6 - Creating devices:
     10replaced the MAKEDEV script with the make_devices script. Contributed by
     11Matthias Benkmann.</para></listitem>
    812
    913<listitem><para>February 5th, 2004 [alex]: Chapter 6 - Simplified the final
  • chapter06/makedev.xml

    re8692c5e r540fd31  
    1 <sect1 id="ch-system-MAKEDEV" xreflabel="Makedev">
    2 <title>Creating devices with Makedev-&makedev-version;</title>
    3 <?dbhtml filename="makedev.html" dir="chapter06"?>
     1<sect1 id="ch-system-MAKEDEV" xreflabel="Make_devices">
     2<title>Creating devices with Make_devices-&makedev-version;</title>
     3<?dbhtml filename="makedevices.html" dir="chapter06"?>
    44
    5 <para>The MAKEDEV package contains a script for making device nodes.</para>
     5<para>The Make_devices package contains a script for creating device
     6nodes.</para>
    67
    78<screen>&buildtime; &makedev-time;
     
    1617<title>Making devices</title>
    1718
    18 <para>Note that unpacking the <filename>MAKEDEV-&makedev-version;.bz2</filename>
    19 file doesn't create a directory for you to <command>cd</command> into, as
    20 the file contains only a shell script.</para>
     19<para>Note that unpacking the
     20<filename>make_devices-&makedev-version;.bz2</filename> file doesn't
     21create a directory for you to <command>cd</command> into, as the file
     22contains only a shell script.</para>
    2123
    22 <para>Install the <command>MAKEDEV</command> script:</para>
     24<para>Install the <filename>make_devices</filename> script:</para>
    2325
    24 <screen><userinput>bzcat MAKEDEV-&makedev-version;.bz2 &gt; /dev/MAKEDEV
    25 chmod 754 /dev/MAKEDEV</userinput></screen>
     26<screen><userinput>bzcat make_devices-&makedev-version;.bz2 &gt; /dev/make_devices
     27chmod 754 /dev/make_devices</userinput></screen>
    2628
    27 <para>Run the script to create the device files:</para>
     29<para>Device nodes are special files: things that can generate or receive data.
     30They usually correspond to physical pieces of hardware, and can be created by
     31issuing commands of the form: <command>mknod -m mode name type major
     32minor</command>. In such a command, <emphasis>mode</emphasis> is the usual
     33octal read/write/execute permissions triplet, and <emphasis>name</emphasis> is
     34the name of the device file to be created. It may seem surprising, but the
     35device name is actually arbitrary, except that most programs rely on devices
     36such as <filename>/dev/null</filename> having their usual names. The remaining
     37three parameters tell the kernel what piece of hardware the device node
     38actually refers to. The <emphasis>type</emphasis> is a letter, either b or c,
     39indicating whether the device is accessed in blocks (such as a hard disk) or
     40character by character (such as the console). And <emphasis>major</emphasis>
     41and <emphasis>minor</emphasis> are numbers, together forming a code that
     42identifies the device to the kernel. A list of the currently assigned device
     43numbers for Linux can be found in the file <filename>devices.txt</filename> in
     44the <filename class="directory">Documentation</filename> subdirectory of the
     45kernel sources.</para>
     46
     47<para>Note that the same major/minor combination are usually assigned to both a
     48block and a character device. These are, however, completely unrelated devices
     49that cannot be interchanged. A device is identified by the type/major/minor
     50triple, not just the major/minor pair, so when creating a device node it is
     51important to choose the correct <emphasis>type</emphasis> of device.</para>
     52
     53<para>Because looking up the type/major/minor triples and using
     54<command>mknod</command> manually is tedious and error-prone, the
     55<filename>make_devices</filename> script has been created. It contains a whole
     56series of <command>mknod</command> commands, one for each device, complete with
     57recommended name, permissions and group assignment. It has been set up so that
     58only a minimal set of commonly used devices is enabled and the other lines are
     59commented out. You should open <filename>make_devices</filename> in an editor
     60and customize it to your needs. This takes some time, but is very simple. When
     61you are satisfied, run the script to create the device files:</para>
    2862
    2963<screen><userinput>cd /dev
    30 ./MAKEDEV -v generic-nopty</userinput></screen>
     64./make_devices</userinput></screen>
    3165
    32 <para>The meaning of the arguments:</para>
     66<para>(The FHS states that there should be a <filename>MAKEDEV</filename>
     67script present in the <filename class="directory">/dev</filename> directory.
     68But the FHS is mistaken: it should not dictate anything about files, and limit
     69itself to directories.)</para>
    3370
    34 <itemizedlist>
    35 <listitem><para><userinput>-v</userinput>: This tells the script to run in
    36 verbose mode.</para></listitem>
    37 
    38 <listitem><para><userinput>generic-nopty</userinput>: This instructs
    39 <command>MAKEDEV</command> to create a generic selection of commonly used
    40 device special files, except for the ptyXX and ttyXX range of files. We don't
    41 need those files because we are going to use Unix98 PTYs via the
    42 <emphasis>devpts</emphasis> file system.</para></listitem>
    43 </itemizedlist>
    44 
    45 <para>If it turns out that some special device <filename>zzz</filename> that
    46 you need is missing, try running <userinput>./MAKEDEV -v zzz</userinput>.
    47 Alternatively, you may create devices via the <command>mknod</command>
    48 program. Please refer to its man and info pages if you need more
    49 information.</para>
    50 
    51 <para>If you wish your system to be FHS-compliant, then the
    52 <filename>MAKEDEV</filename> script has to remain present in the
    53 <filename class="directory">/dev</filename> directory. This way it is always
    54 available for making extra device nodes.</para>
    55 
    56 <para>Additionally, if you were unable to mount the devpts file system earlier
    57 in <xref linkend="ch-system-proc"/>, now is the time to try the alternatives. If
    58 your kernel supports the devfs file system, run the following command to mount
     71<para>If you had success with mounting the devpts file system earlier in <xref
     72linkend="ch-system-proc"/>, you can continue with the next section. If you were
     73unable to mount devpts, now is the time to try the alternatives. If your kernel
     74supports the devfs file system, run the following command to mount
    5975devfs:</para>
    6076
     
    6278
    6379<para>This will mount the devfs file system over the top of the new static
    64 <filename>/dev</filename> structure. This poses no problems, as the device nodes
    65 created are still present, they are just hidden by the new devfs
    66 file system.</para>
     80<filename>/dev</filename> structure. This poses no problems, as the device
     81nodes created are still present, they are just hidden by the new devfs file
     82system.</para>
    6783
    68 <para>If this still doesn't work, the only option left is to use the MAKEDEV
    69 script to create the ptyXX and ttyXX range of files that would otherwise not be
    70 needed. Ensure you are still in the <filename>/dev</filename> directory then run
    71 <userinput>./MAKEDEV -v pty</userinput>. The downside of this is, we are
    72 creating an extra 512 device special files which will not be needed when we
    73 finally boot into the finished LFS system.</para>
     84<para>If that didn't work either, the only option left is to create a few ptyXX
     85and ttyXX device nodes. To do this, open <filename>make_devices</filename> in
     86your editor, go to the section "Pseudo-TTY masters" and enable as many ptyXX
     87devices as you think you will need (one for every active xterm, ssh connection,
     88telnet connection, and so on). In the immediately following section "Pseudo-TTY
     89slaves", enable the corresponding ttyXX devices. When you are done, rerun
     90<command>./make_devices</command> from inside <filename>/dev</filename> to have
     91it create the new devices.</para>
    7492
    7593</sect2>
  • entities/makedev.ent

    re8692c5e r540fd31  
    66<!ENTITY aa-makedev-down SYSTEM "../appendixa/makedev-down.xml">
    77
    8 <!ENTITY makedev-version "1.7">
    9 <!ENTITY makedev-depversion "1.7">
    10 <!ENTITY makedev-contversion "1.7">
    11 <!ENTITY makedev-package "MAKEDEV-&makedev-version;.bz2">
    12 <!ENTITY makedev-size "8 KB">
     8<!ENTITY makedev-version "1.1">
     9<!ENTITY makedev-depversion "1.1">
     10<!ENTITY makedev-contversion "1.1">
     11<!ENTITY makedev-package "Make_devices-&makedev-version;.bz2">
     12<!ENTITY makedev-size "20 KB">
    1313
    14 <!ENTITY makedev-compsize "50 KB">
    15 <!ENTITY makedev-time "0.1 SBU">
     14<!ENTITY makedev-compsize "160 KB">
     15<!ENTITY makedev-time "1 SBU">
Note: See TracChangeset for help on using the changeset viewer.