Typo
[linux_from_scratch_hints.git] / OLD / device-files.txt
blobb34a1f601b4a53fe6f732fc2afbaf5283d4c4572
1 TITLE:          Creating the device files with MAKEDEV
2 LFS VERSION:    obsolete
3 AUTHOR:         Morgan Hall <morganh@aracnet.com>
5 SYNOPSIS:
6         An alternative way of creating devices (this way is now used in LFS, as of version 2.3.7)
8 HINT:
9 For what it's worth, if you don't want to fill your /dev directory by
10 copying off whatever distribution, Here's how to go about filling /dev
11 from scratch.
13 Background:
14 The /dev directory contains file-like objects that are actually links
15 to drivers in the kernel.  These are, at bottom, created by the command
16 'mknode' (read the fine man page).  Since there are so many of them,
17 the lazy way to do it is with the 'MAKEDEV' script.
19 Source:
21 You can get the MAKEDEV script from tsx11.mit.edu.  It doesn't look to
22 have changed much since 1997 (date on the latest version).
24 To get it, grab:
25 ftp://tsx-11.mit.edu/pub/linux/sources/sbin/MAKEDEV-2.3.1.tar.gz   
27 Unwrap it with 'tar xzvf MAKEDEV-2.3.1.tar.gz' and it unwrapps into
28 a directory named MAKEDEV-2.3.1.  Inside is the actual MAKEDEV script, 
29 some documentation, and a Makefile for installing in a running system.
31 For our purposes, you've already created the $LFS/dev directory.  Copy
32 or move the MAKEDEV script to that directory.  That's where it should
33 stay, as there are some update functions the script can do.  ('fraid
34 you'll have to read through the script to figure 'em out, but it looks
35 like you can use the script to run through and delete devices your kernel
36 doesn't support!)
38 After MAKEDEV is in its new home, 'cd' to $LFS/dev and make it executable
39 with chmod.
40   chmod 755 MAKEDEV
42 You'll have to be root to actually do anything with MAKEDEV.  So, 'su'
43 to root and get ready to roll.
45 For the insatiably curious among us (like me) fire it off with the verbose
46 option turned on with:
48 # MAKEDEV -v generic
50 Take a break and watch 'em scroll.  You'll see things you never wanted to
51 know about.  There's lots there for us to ferret out information on!
53 Of course, if you don't want that much stuff, you can make, for example,
54 ony the hard disk devices.  To do so, you'd enter:  MAKEDEV hda
55 and automagically you'll get hda, hda1 ... hda8.
57 For now, and for just getting going, it looks like 'generic' is the way
58 to go.  optimization can come later.
60 'Nuff for now.  Let's get rid of copying the /dev/directory?  This is
61 really a bit easier anyway, and if you accidentaly mangle some devices, it
62 gives you a way to recover.
64 Hope this helps,
66 Morgan
69 Morgan Hall
70 Wilsonville, Oregon
71 (morganh@aracnet.com)