Errata ------ Chapter 1 --------- Page 13, 9th last line in the page: Please change "mymodule.ko" to 'mymodule.o". Chapter 2 --------- Page 34, line 4: Please change "jiffies + HZ" to "HZ". Page 46, last line in the page: Please change "read_lock_irqrestore()" to "read_unlock_irqrestore()". In the first line of the next page, please change "write_lock_irqrestore()" to "write_unlock_irqrestore()". Please also make the same corrections to Table 2.2 in page 54. Chapter 4 --------- Page 97, line 9 in Listing 4.1: Please change the line "PA_t = PORTD & 0x07;" to "PA_t = PA_delta_t = PORTD & 0x07;" Page 101, 5th line in Listing 4.3, the line "}": Please add a semicolon at the end of the line. Page 104 and Page 105: In the udevinfo output, please replace » with double quotes and = with ==. In the udev rules in page 105, please use == instead of = after BUS, SYSFS{idProduct}, SYSFS{idVendor}, and KERNEL. Chapter 5 --------- Page 123, Listing 5.1: There are errors in this listing. Please download the corrected source code listing from elinuxdd.com. Page 127, 1st line: Please replace "class_device_create()" with "device_create()". Page 127, 7th line in the page: Please change KERNEL="cmos[0-1]*", NAME="cmos/%n" to KERNEL=="cmos[0-1]*", NAME="cmos/%n" (i.e., please change KERNEL= to KERNEL==) Page 150, line 1, the line starting "unregister_chrdev_region(MAJOR(dev_number), 1);" should read "unregister_chrdev_region(dev_number, 1);" Page 150, line 2, the line starting class_device_destroy(led_class, MKDEV(MAJOR(dev_number),0)); should read class_device_destroy(led_class, dev_number); Page 154, Please add the following after line 19 (the line starting "struct class_device *c_d;") ---------- if (alloc_chrdev_region (&dev_number, 0, 1, DEVICE_NAME) < 0) { printk(KERN_DEBUG "Can't register device\n"); return -1; } ---------- Page 155, the 8th last line in the listing, the line starting class_device_destroy(led_class, MKDEV(MAJOR(dev_number), 0)); Please change it to: class_device_destroy(led_class, dev_number); Page 160, in the second bullet, please replace "class_device_create()" with "device_create()". Chapter 7 ---------- Page 213, line 21: Please change --------- if (IS_ERR(vms_dev)){ PTR_ERR(vms_dev); printk ("vms_init: error\n"); } --------- to --------- if (IS_ERR(vms_dev)){ printk ("vms_init: error\n"); return PTR_ERR(vms_dev); } --------- Page 213, line 30: Please change "printk ("Bad input_alloc_device()\n");" to "printk ("Bad input_allocate_device()\n"); return -ENOMEM;" Chapter 8 --------- Page 240, line 18: Please replace class_device_create(eep_class, NULL, (dev_number + i), NULL, "eeprom%d", i); with: device_create (eep_class, NULL, MKDEV(MAJOR(dev_number), i), "eeprom%d", i); Page 240, last line in the page: Please change KERNEL:"eeprom[0-1]*", NAME="eep/%n" to KERNEL=="eeprom[0-1]*", NAME="eep/%n" (i.e., please change KERNEL: to KERNEL==) Page 252, the 4th last line under numbered bullet 1, i.e., the line just before "spi_register_driver(&myspi_driver);", i.e., the line, "}". Please add a semicolon after "}". Chapter 10 ---------- Page 284, 9th line, the bash command, "bash> od -x /sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.1/config" Please change it to: "bash> od -x /sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/config" (i.e., please change the 8th last character in the line from '1' to '0') Page 287, 2nd line, line starting "memory region associated with..". Please change it to "I/O region associated with..". Also, the 9th line, the line starting "spot this memory region". Please change it to "spot this I/O region". Page 288, 2nd last line, the line starting "directly between the DMA controller and main memory...". Please change this to "directly between the peripheral device and main memory...". (i.e., please change "DMA controller" to "peripheral device"). Page 302, Figure 10.2, the right half of the figure. At the top, under the title "Transmit DMA Descriptors and Buffers", the phrase "(dma_buffer_tx/dma_bus_rx)": Please change it to "(dma_buffer_tx/dma_bus_tx)". While incorporating this change in the first reprint, the right half of the figure has gotten damaged - the outer box has disappeared. Fixed in the second reprint, however. Page 307, line 11, the comment line starting "transmit descriptor */": Please change it to "receive descriptor */". Similarly, in the very next line, please change the comment "/* Bus address of the transmit descriptor */" to "/* Bus address of the receive descriptor */". Also, in line 22, the comment line starting "receive descriptor */". Please change it to "transmit descriptor */". Chapter 12 ---------- Page 356, 3rd line in 2nd paragraph in the section "Display Architecture": Please replace "newer standards such as eXtended Graphics Array (XGA) and Super Video Graphics Array (SVGA) support higher resolutions of 800x600 and 1024x768." with "newer standards such as Super Video Graphics Array (SVGA) and eXtended Graphics Array (XGA) support higher resolutions of 800x600 and 1024x768, respectively." Page 383, 5th line, the line starting "Figure 12.7 shows the position...". Please change it to "Figure 12.5 shows the position...". (i.e., please change 12.7 to 12.5). Chapter 13 ---------- Page 401, 2nd line under the code snippet, the line starting "SAMPLING_RATE_REGISTER, clock source into the CLOCKING_INPUT_REGISTER..": Please change "CLOCKING_INPUT_REGISTER" to "CLOCK_INPUT_REGISTER". Chapter 15 ---------- Page 454, line 15, the line starting "/* Fill transmit and receive rings */": Please change it to "/* Allocate Descriptor rings */" Chapter 16 ---------- Page 468, the right half of Figure 16.1, the second box from the bottom: Please change "Link Layer" to "Link Controller". Page 479, Figure 16.4, the bottom right box, the box that has the text "1R Transceiver (SIR/FIR)": Please change "1R" to "IR". Page 489, 2nd line under "Looking at the Sources", the line starting "mentation, and...": At the end of this line, please change "proc/sys/net/irda/*" to "/proc/sys/net/irda/*". Chapter 17 ---------- Page 515, Figure 17.4: The second text line at the top of the figure, the line starting ".eccbytes = 24..." should be pushed 2 spaces to the right for proper indentation. In the same figure, please notice the line, "NAND Chip 0 2 38 63". In this line, please change "38" to "40". Chapter 19 ---------- Page 572, 4th last line in the page, the line starting "if (ioctl(..) < 0){": In this line, please change "EEPROM_SLAVE_ADDR1" to "SLAVE_ADDR1". Chapter 21 ---------- Page 608, Figure 21.2: Please draw a line connecting the box with text "Remote Power Switch" and the box with text "Target Hardware". The power switch needs to be shown wired to the target hardware. Chapter 22 ---------- Page 646, 4th last line in the page: Please replace export INSTALL_MOD_PATH=»$TARGET_DIRECTORY/modules» with export INSTALL_MOD_PATH="$TARGET_DIRECTORY/modules" Appendix B ---------- Page 663, 3rd line under the code listing, the line starting "call definition for int 0x15, function 0xe820 (the full list is available at http://lrs.fmi.uni-passau.de/support/doc/interrupt-57/INT.HTM), ..": The lrs.fmi.uni-passau.de website has been recently renamed to lrs.fim.uni-passau.de. For one reprint (Dec 2008), I had removed the website reference from this page after finding it to be defunct. Licensing --------- As per the publisher, the code in the book is released under the GPL, but the text is not licensed under the Open Publication License (OPL). The verbage in page iv that states that the whole book can be distributed under the OPL is incorrect.