Errata

Linux Kernel in a Nutshell

Errata for Linux Kernel in a Nutshell

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 6
Paragraph 2 Sentence 1

"install make youself"
Should be:
"install make yourself"

Anonymous  Aug 20, 2013 
Printed Page 9
Section NFS, Paragraph 3, Sentence 1

"...the kernel To determine..."

Previous paragraphs read "... the kernel. To determine..."
- you're missing a period.

Anonymous  Aug 21, 2013 
Other Digital Version 14
Section "Where to Find the Kernel Source", paragraph 3

Book has dead link: http://www.us.kernel.org/pub/linux.kernel/v2.6/
Working link: https://www.kernel.org/pub/linux/kernel/v2.6/

Ura Nulu  Aug 21, 2013 
Other Digital Version 14
Chapter 3 on

Any mention to kernel 2.6.17.x should be noted kernel.org only has 2.6.17 or 2.6.18

Nuluchan  Aug 22, 2013 
Other Digital Version 18
Section "Configuring from Scratch"

Missing the bold Y for what the user should answer to Local version - append to kernel release (LOCALVERSION)

Ura Nulukins  Aug 22, 2013 
Printed Page 48
7th line from the bottom

Very very minor technical addition:
>> $ find -type f -name Makefile | xargs grep e1000
Without the -i option to grep, this doesn't work for strings like "via_rhine".
But to follow the possible intention, there could be a hint to change non-
alphanumerical chars to "." an use egrep like this:
>> $find -type f -name Makefile | xargs egrep via.rhine

Anonymous   
Printed Page 56
4th paragraph, line 20

>> Now that we have the driver name,...
A little annotation to the filename would be nice, because only the corresponding
object-file does appear in the Makefile.
So one could search for the filename without the suffix.
The referred first section was about a dirname.

Anonymous   
Printed Page 56
1st-3rd paragraph

On page 53 the command lspci:
=================================================================
$ /usr/sbin/lspci | grep -i ethernet
06:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/
8139C/8139C+ (rev 10)
=====================================================
Note the card revision is 0x10

on page 55 codes in 8139too.c show
=====================================================
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) {
dev_info(&pdev->dev,
"This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
pdev->vendor, pdev->device, pci_rev);
dev_info(&pdev->dev,
"Use the \"8139cp\" driver for improved performance and
stability.\n");
=====================================================
Note on second line of the code, pci_rev >= 0x20.

So the code show RTL8139 with revision above and equel to 0x20 should use the "8139cp" driver.

And page 56 1st paragraph say:
====================================================================
The use of the PCI_VENDOR_ID_REALTEK value here also corresponds with the code that checks whether the PCI device ID matches the PCI_DEVICE_ID_REALTEK_8139 value. If it does, the driver is to print out a message that says: "Use the 8139cp driver for improved performance and stability." Perhaps we should look at that driver next. Even if we did not have such a visible clue, the 8139too.c driver does not have the vendor and device ID pair that we are looking for in a struct pci_device_id variable, so that gives us the clue that it will not support our device.
====================================================================
1. The fist sentence does not mention the revision number.
2. Actually, the 8139too.c use the number "0x10ec, 0x8139" instead of symbol pair. This can be checked by " grep -A 10 pci_device_id 8139too.c".
3. In page 56 2nd -3rd paragraph, the author does not mention "8139cp.c" also have condition with "pci_rev < 0x20". this can be checked with "grep -A 10 pci_rev 8139cp.c "


So, Realtek 8139 Card[vendor id =0x10ec, device id =0x8139] with revision above 0x19 should use the driver "8139cp", others with revision less than 0x20 should use the driver "8139too".

BTW, We can use "lspci -nv or lspci -xxx " instead of sysfs to get vendor id and device id. It's not a mistake. I just give a hint here and please forgive my bad english(may be lots syntax error in the sentence above).

tinker_wq  Jul 29, 2010 
Printed Page 58
5th paragraph

On page 57 the vendor and product ID found was: 157e:300d.
On page 58 the ID 157e:300b is selected from the list instead of 157e:300d.

Anonymous   
Printed Page 62
9th line from the bottom

get-driver.sh doesn't always treat possible spaces in sysfs-filenames correctly:

This example tests "/sys/bus/pci/drivers/Intel ICH/module" for existance:
$ ./get-driver.sh adsp
looking at sysfs device: /sys/class/sound/adsp
follow 'device' link to parent: /sys/devices/pci0000:00/0000:00:1f.5
found driver: Intel./get-driver.sh: line 63: test: /sys/bus/pci/drivers/Intel:
binary operator expected

Even on my system there are 4 additional filenames with spaces in that (and only
that) directory. So only the critical hunk would be:

--- get-driver-orgy.sh 2007-01-20 15:08:03.000000000 +0100
+++ get-driver.sh 2007-01-20 15:08:03.000000000 +0100
@@ -60,8 +60,8 @@
DRIVERPATH=$(readlink -f $DEVPATH/driver)
DRIVER=$(basename $DRIVERPATH)
echo -n "found driver: $DRIVER"
- if test -e $DRIVERPATH/module; then
- MODULEPATH=$(readlink -f $DRIVERPATH/module)
+ if test -e "$DRIVERPATH/module"; then
+ MODULEPATH=$(readlink -f "$DRIVERPATH/module")
MODULE=$(basename $MODULEPATH)
echo -n " from module: $MODULE"
fi

For convenience, here the full listing with some more quotes and cites:
#=================================================================================
#!/bin/sh
#
# Find all modules and drivers for a given class device.
#

if [ $# != "1" ] ; then
echo
echo "Script to display the drivers and modules for a specified sysfs class device"
echo "usage: $0 <CLASS_NAME>"
echo
echo "example usage:"
echo " $0 sda"
echo "Will show all drivers and modules for the sda block device."
echo
exit 1
fi

DEV=$1

if test -e "$1"; then
DEVPATH=$1
else
# find sysfs device directory for device
DEVPATH=$(find /sys/class -name "$1" | head -1)
test -z "$DEVPATH" && DEVPATH=$(find /sys/block -name "$1" | head -1)
test -z "$DEVPATH" && DEVPATH=$(find /sys/bus -name "$1" | head -1)
if ! test -e "$DEVPATH"; then
echo "no device found"
exit 1
fi
fi

echo "looking at sysfs device: $DEVPATH"

if test -L "$DEVPATH"; then
# resolve class device link to device directory
DEVPATH=$(readlink -f "$DEVPATH")
echo "resolve link to: $DEVPATH"
fi

if test -d "$DEVPATH"; then
# resolve old-style "device" link to the parent device
PARENT="$DEVPATH";
while test "$PARENT" != "/"; do
if test -L "$PARENT/device"; then
DEVPATH=$(readlink -f "$PARENT/device")
echo "follow 'device' link to parent: $DEVPATH"
break
fi
PARENT=$(dirname "$PARENT")
done
fi

while test "$DEVPATH" != "/"; do
DRIVERPATH=
DRIVER=
MODULEPATH=
MODULE=
if test -e "$DEVPATH/driver"; then
DRIVERPATH=$(readlink -f "$DEVPATH/driver")
DRIVER=$(basename "$DRIVERPATH")
echo -n "found driver: $DRIVER"
if test -e "$DRIVERPATH/module"; then
MODULEPATH=$(readlink -f "$DRIVERPATH/module")
MODULE=$(basename "$MODULEPATH")
echo -n " from module: $MODULE"
fi
echo
fi

DEVPATH=$(dirname "$DEVPATH")
done

Anonymous   
Printed Page 88
3rd paragraph

where it says: /sys/module/usbcore/blinkenlights
it should say: /sys/module/usbcore/parameters/blinkenlights
(at least for kernel 2.6.17)

Anonymous   
Printed Page 95
lpj option

[quote]
lpj Set the loops per jiffy.

lpg=n

Specify the loops per jiffy that . . .
[/quote]

The second line quoted above should be "lpj=n" ?

Anonymous  Nov 16, 2008 
Printed Page 97
Second item

"max_cpus"
should be
"maxcpus"

Jean DELVARE  May 10, 2011 
Printed Page 121
2nd heading, "Architecture-specific targets", table 10-8

last row in table 10-8:
<quote>
isoimage Creates a CD-ROM boot image and places it in the file arch/i396/boot/image.iso. The syslinux
package must be present on your system in order for this to work properly.
</quote>

arch/i396/boot/image.iso should be arch/i386/boot/image.iso

Anonymous   
Printed Page 128
FLATMEM_MANUAL option

"Most users will see only have one option here: FLATMEM."

This should be either

"Most users will see only one option here: FLATMEM."

or

"Most users will only have one option here: FLATMEM."

Anonymous  Nov 16, 2008 
Printed Page 179
item 9

Item 9(line 23) procfs should be procps

BTW: Can someone change the errtum I post in Page 56 from "Serious Technical Mistake" to "Minor Technical Mistake"?

tinker_wq  Jul 29, 2010