mtd/patches patchin.sh,1.23,1.24

gleixner at infradead.org gleixner at infradead.org
Thu Sep 16 19:58:59 EDT 2004


Update of /home/cvs/mtd/patches
In directory phoenix.infradead.org:/tmp/cvs-serv7936/patches

Modified Files:
	patchin.sh 
Log Message:
Reed somolon lib import. Will vanish away once it is accepted upstream

Index: patchin.sh
===================================================================
RCS file: /home/cvs/mtd/patches/patchin.sh,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- patchin.sh	9 Aug 2004 18:46:05 -0000	1.23
+++ patchin.sh	16 Sep 2004 23:58:57 -0000	1.24
@@ -38,10 +38,12 @@
 PATCHLEVEL=0
 SUBLEVEL=0
 ZLIBPATCH="no"
+RSLIBPATCH="no"
 CONFIG="Config.in"
 LNCP="ln -sf"
 METHOD="Link"
 
+
 # MTD - files and directories
 MTD_DIRS="drivers/mtd drivers/mtd/chips drivers/mtd/devices drivers/mtd/maps drivers/mtd/nand include/linux/mtd include/mtd"
 MTD_FILES="*.[ch] Makefile Rules.make"
@@ -60,6 +62,11 @@
 # shared ZLIB patch
 ZLIB_DIRS="lib/zlib_deflate lib/zlib_inflate"
 ZLIB_FILES="*.[ch] Makefile"
+# shared REED_SOLOMON patch
+RSLIB_DIRS="lib/reed_solomon"
+RSLIB_FILES="*.[ch]"
+RSLIB_INC_DIR="include/linux"
+RSLIB_INC="rslib.h"
 
 # Make text utils not suck
 export LANG=C
@@ -174,6 +181,13 @@
 	fi
 fi
 
+# Have we to use REED_SOLOMON PATCH ?
+PATCHDONE=`grep -s reed_solomon $LINUXDIR/lib/Makefile | head -n 1`
+if [ "$PATCHDONE" = "" ]
+then
+	RSLIBPATCH=yes;
+fi
+
 # Check which header files we need depending on kernel version
 HDIR="include/linux"
 if test $PATCHLEVEL -eq 4 
@@ -193,6 +207,7 @@
 echo Patching $LINUXDIR 
 echo Include Filesytems: $FILESYSTEMS
 echo Zlib-Patch needed: $ZLIBPATCH
+echo RS-Lib-Patch needed: $RSLIBPATCH
 echo Method: $METHOD
 read -p "Can we start now ? [y/N]" ANSWER
 echo ""
@@ -290,6 +305,43 @@
 	patch -p1 -i $TOPDIR/lib/patch-Makefile
 fi
 
+echo "Patching RS Lib"
+if [ "$RSLIBPATCH" = "yes" ]
+then
+	if test $PATCHLEVEL -eq 4 
+	then
+		patch -p1 -i $TOPDIR/lib/Makefile24-rs.diff
+		patch -p1 -i $TOPDIR/lib/Config.in-rs.diff
+	else
+		patch -p1 -i $TOPDIR/lib/Makefile26-rs.diff
+		patch -p1 -i $TOPDIR/lib/Kconfig-rs.diff
+	fi
+	mkdir -p lib/reed_solomon
+fi
+
+PATCH_DIRS=$RSLIB_DIRS
+PATCH_FILES=$RSLIB_FILES
+patchit;
+
+PATCH_DIRS=$RSLIB_INC_DIR
+PATCH_FILES=$RSLIB_INC
+patchit;
+
+if test $PATCHLEVEL -eq 4 
+then
+	PATCH_DIRS=$RSLIB_DIRS
+	PATCH_FILES="Makefile24"
+	patchit;
+	rm -f $LINUXDIR/lib/reed_solomon/Makefile 2>/dev/null
+	mv -f $LINUXDIR/lib/reed_solomon/Makefile24 $LINUXDIR/lib/reed_solomon/Makefile
+else	
+	PATCH_DIRS=$RSLIB_DIRS
+	PATCH_FILES="Makefile26"
+	patchit;
+	rm -f $LINUXDIR/lib/reed_solomon/Makefile 2>/dev/null
+	mv -f $LINUXDIR/lib/reed_solomon/Makefile26 $LINUXDIR/lib/reed_solomon/Makefile
+fi
+
 echo "Patching done"
 
 # some BUG() definitions were moved to asm/bug.h in the 2.5 kernels





More information about the linux-mtd-cvs mailing list