M-Systems Flash Disk Pioneers 91-SR-005-10-7L, DiskOnChip Appendix III Applying a Patch Manually

Page 23

Using the DiskOnChip with Linux OS

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.

91-SR-005-10-7L REV. 2.0

23

Image 23
Contents Using the DiskOnChip with Linux OS Limited Warranty Contents Hardware Requirements for the DiskOnChip IntroductionUtilities Diskette Content Requirements for Installation of the DiskOnChip into LinuxLinux Driver for DiskOnChip Updating the Firmware Installing the DiskOnChip as an Additional DriveIf the /dev/fd0 doesn’t appear in the first column, type Floppy drive must be active. Verify this by typingCheck dependencies Configure the kernel as followsAdding the Driver to the Kernel Remove the old object filesMake the inodes for the DiskOnChip Booting the Compiled Kernel from HDDCreating a Linux Partition on the DiskOnChip Mount the file system to a directory Creating a Native Linux File System on the DiskOnChipRecheck the partition table Save the new partition table disregard any fdisk warningsCreating a Root File System Introduction Booting Linux from the DiskOnChipCreate the list of files to be mounted OverviewPopulating the File System Run the scriptCopying the Kernel, Updating the Boot Sector and Rebooting Linux will now boot from the DiskOnChip TroubleshootingReboot and load DOS, and reinstall the original firmware Most likely, you forgot to do Sys.com Additional Information and ToolsAppendix I Making a Root File System Diskonchip/bin/programname Copy the library loaders as follows For exampleYou now have pLilo sources There are 5 files that you will need to patch Appendix III Applying a Patch ManuallyUsing the DiskOnChip with Linux OS Tel Aviv 61580, Israel How to Contact UsAtidim Industrial Park P.O.B