Device creation and MAKEDEV

Marc Heerdink marc_heerdink at
Tue Mar 27 04:32:28 PST 2001

Hi peeps,

you may have expected this about now, but the new MAKEDEV is "ready." Ready
doesn't mean finished, I would really appreciate test results and bug reports
from you. This MAKEDEV is up with the Linux 2.4 device specs (as in
/usr/src/linux/Documentation/devices.txt) as far as the basic device creation
concerns. I have removed options from the MAKEDEV to create generic devices for
other systems than i?86 because I don't have any experience with these systems.
I'll update the MAKEDEV later to have at least half of the devices according to
the Linux 2.4 devices.txt. Attached is the MAKEDEV for LFS 3.0-pre2, and a
simple perl script that extracts a device list (in a very stupid way... please
don't read the code ;) from /usr/src/linux/Documentation/devices.txt.

Second point: the way devices are created. As you may have noticed, I didn't
attach a "numpatch" as is being used in the book now. My reason not to do so is
that I don't consider it needed in LFS 3.x. Why? Quite simple: the glibc compile
only needs /dev/null. Why would we create all devices with some stupid patch?
It's better to add

cd $LFS/dev &&
mknod null c 1 3 &&
chmod 666 null

to chapter 6 (preparing the chrooted environment) than to go through all the
pain of a numpatch and a MAKEDEV-temp etc etc. We'll have to tell the user to
leave chroot and re-enter it immediately after glibc was compiled, and put
MAKEDEV right after glibc in the book. This method (compiling glibc 2.2.x with
only /dev/null) was tested by me, and by Balu if he followed my advice :). It
works here.

There is no programming language, no matter how structured,
that will prevent programmers from writing bad programs.
- L. Flon

Marc Heerdink
marc_heerdink at
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 632 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MAKEDEV.gz
Type: application/octet-stream
Size: 6947 bytes
Desc: not available
URL: <>

More information about the lfs-book mailing list