yaffs: Fix patch-ker.sh to handle Kconfigs properly.
authorCharles Manning <cdhmanning@gmail.com>
Thu, 12 May 2011 22:12:55 +0000 (10:12 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 12 May 2011 22:12:55 +0000 (10:12 +1200)
Thanks to submitters for this.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
patch-ker.sh

index 41c50890b9452e15125f55d7f8034c55b81372b9..44152c8b8f20270b0cf8b73ce65415454ba87c79 100755 (executable)
@@ -57,13 +57,13 @@ if [ $MULTIORSINGLE = m ]; then
    MTD1_CODE="yaffs_mtdif1_multi.c"
    MTD2_CODE="yaffs_mtdif2_multi.c"
    YPORTENV="yportenv_multi.h"
-   KCONFIG="Kconfig_multi"
+   KCONFIG_SRC="Kconfig_multi"
 elif [ $MULTIORSINGLE = s ]; then
    VFS_CODE="yaffs_vfs_single.c"
    MTD1_CODE="yaffs_mtdif1_single.c"
    MTD2_CODE="yaffs_mtdif2_single.c"
    YPORTENV="yportenv_single.h"
-   KCONFIG="Kconfig_single"
+   KCONFIG_SRC="Kconfig_single"
 
    echo ""
    echo "*** Warning ***"
@@ -144,10 +144,10 @@ then
    echo "already there then delete $YAFFSDIR and re-run this script"
    echo " eg.  \"rm -rf $YAFFSDIR\" "
 else
-   rm yaffs*.mod.c
+   rm yaffs*.mod.c 2> /dev/null
    mkdir $LINUXDIR/fs/yaffs2
    $CPY  $PWD/Makefile.kernel $LINUXDIR/fs/yaffs2/Makefile
-   $CPY $PWD/$KCONFIG $LINUXDIR/fs/yaffs2/Kconfig
+   $CPY $PWD/$KCONFIG_SRC $LINUXDIR/fs/yaffs2/Kconfig
    $CPY $PWD/*.c $PWD/*.h  $LINUXDIR/fs/yaffs2
    rm $LINUXDIR/fs/yaffs2/yaffs_vfs*.c $LINUXDIR/fs/yaffs2/yaffs_mtdif[12]*.c
    rm $LINUXDIR/fs/yaffs2/yportenv*.h