M-Systems Flash Disk Pioneers DiskOnChip Computer Accessories User Manual


 
Using the DiskOnChip with Linux OS
91-SR-005-10-7L REV. 2.0 23
Appendix III: Applying a Patch Manually
There are two ways to integrate the TrueFFS driver into the kernel: manually or with a patch utility.
The TrueFFS driver for kernel versions 2.0.## contains patch files for kernel versions 2.0.29-2.0.35
(/tmp/doc-driver/doc-patch-2.0.##). See paragraph 4.2.1 for detailed information on
how to patch your kernel with these patch files.
When using the TrueFFS driver for kernel versions 2.2.##, the kernel needs to be patched manually. For
your reference, the driver contains an example patch file (/tmp/doc-driver/doc-patch-
example). This appendix explains how to patch the kernel manually.
To patch your kernel manually, go to your local kernel sources:
# cd /usr/src/linux
There are 5 files that you will need to patch:
/usr/src/linux/include/linux/blk.h
/usr/src/linux/include/linux/major.h
/usr/src/linux/drivers/block/Makefile
/usr/src/linux/drivers/block/Config.in
/usr/src/linux/drivers/block/ll_rw_blk.c
Review the example patch file (/tmp/doc-driver/doc-patch-example) provided with the
TrueFFS driver (driver.tgz). The file will look something like this.
--- include/linux/major.h Tue Aug 12 23:57:23 1997
+++ /tmp/package/usr/src/linux/include/linux/major.h Mon Aug
17 14:05:19 1998
@@ -69,6 +69,8 @@
#define APBLOCK_MAJOR 60 /* AP1000 Block device */
#define DDV_MAJOR 61 /* AP1000 DDV block device */
+#define IGEL_FLASH_MAJOR 62 /* tom@igel.de 2.6.98 */
+
#define SPECIALIX_NORMAL_MAJOR 75
#define SPECIALIX_CALLOUT_MAJOR 76
Each of the above mentioned files needs to be edited to create the correct patch for your kernel.