X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=patch-ker.sh;h=c57c6377c486279c6514b7dc515e41b4e3b752be;hp=4393e8d01b95cdbe65a4b6d4eb1acb7d330d5497;hb=cf6888f05f691aa1a357e7e94f9bf7b98174bbc3;hpb=1996f7866c793b99020d2d204d522291609e9fbb diff --git a/patch-ker.sh b/patch-ker.sh index 4393e8d..c57c637 100755 --- a/patch-ker.sh +++ b/patch-ker.sh @@ -53,9 +53,22 @@ else fi if [ $MULTIORSINGLE = m ]; then - VFSGLUE="yaffs_vfs_multi.c" + VFS_CODE="yaffs_vfs_multi.c" + MTD1_CODE="yaffs_mtdif1_multi.c" + MTD2_CODE="yaffs_mtdif2_multi.c" elif [ $MULTIORSINGLE = s ]; then - VFSGLUE="yaffs_vfs.c" + VFSGLUE="yaffs_vfs_single.c" + MTD1_CODE="yaffs_mtdif1_single.c" + MTD2_CODE="yaffs_mtdif2_single.c" + + echo "" + echo "*** Warning ***" + echo "You have chosen to use the single kernel variant of the yaffs VFS glue code" + echo "that only works with the latest Linux kernel tree. If you are using an older" + echo "version of Linux then you probably wanted to use the multi-version variant by" + echo "re-running the patch-ker.sh script using m as a the second argument." + echo " ie $0 $COPYORLINK m $LINUXDIR" + echo "" else echo "unknown multi/single version selection" usage; @@ -123,14 +136,16 @@ YAFFSDIR=$LINUXDIR/fs/yaffs2 if [ -e $YAFFSDIR ] then - echo "$YAFFSDIR exists, not patching." - echo "If you want to replace what is already there then delete $YAFFSDIR" + echo "$YAFFSDIR exists, so not patching. If you want to replace what is" + echo "already there then delete $YAFFSDIR and re-run this script" echo " eg. \"rm -rf $YAFFSDIR\" " else mkdir $LINUXDIR/fs/yaffs2 $CPY $PWD/Makefile.kernel $LINUXDIR/fs/yaffs2/Makefile $CPY $PWD/Kconfig $LINUXDIR/fs/yaffs2 $CPY $PWD/*.c $PWD/*.h $LINUXDIR/fs/yaffs2 - rm $LINUXDIR/fs/yaffs2/yaffs_vfs.c $LINUXDIR/fs/yaffs2/yaffs_vfs_multi.c - $CPY $PWD/$VFSGLUE $LINUXDIR/fs/yaffs2/yaffs_vfs_glue.c + rm $LINUXDIR/fs/yaffs2/yaffs_vfs*.c $LINUXDIR/fs/yaffs2/yaffs_mtdif[12]*.c + $CPY $PWD/$VFS_CODE $LINUXDIR/fs/yaffs2/yaffs_vfs.c + $CPY $PWD/$MTD1_CODE $LINUXDIR/fs/yaffs2/yaffs_mtdif1.c + $CPY $PWD/$MTD2_CODE $LINUXDIR/fs/yaffs2/yaffs_mtdif2.c fi