comparison patch-ker.sh @ 205:f95fdc6123fb

Cleanup patch - Remove all trailing whitespace and fix a few typos.
author wookey
date Thu, 13 Dec 2007 15:35:19 +0000
parents 45fbb5342d69
children 6170df5875f3
comparison
equal deleted inserted replaced
204:5ee93b08ed3a 205:f95fdc6123fb
1 #!/bin/sh 1 #!/bin/sh
2 # 2 #
3 # YAFFS: Yet another FFS. A NAND-flash specific file system. 3 # YAFFS: Yet another FFS. A NAND-flash specific file system.
4 # 4 #
5 # Copyright (C) 2002-2006 Aleph One Ltd. 5 # Copyright (C) 2002-2006 Aleph One Ltd.
6 # 6 #
7 # Created by Charles Manning <charles@aleph1.co.uk> 7 # Created by Charles Manning <charles@aleph1.co.uk>
8 # 8 #
9 # This program is free software; you can redistribute it and/or modify 9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2 as 10 # it under the terms of the GNU General Public License version 2 as
11 # published by the Free Software Foundation. 11 # published by the Free Software Foundation.
12 # 12 #
13 # Patch YAFFS into the kernel 13 # Patch YAFFS into the kernel
50 usage; 50 usage;
51 fi 51 fi
52 52
53 53
54 # Check if kerneldir contains a Makefile 54 # Check if kerneldir contains a Makefile
55 if [ ! -f $LINUXDIR/Makefile ] 55 if [ ! -f $LINUXDIR/Makefile ]
56 then 56 then
57 echo "Directory $LINUXDIR does not exist or is not a kernel source directory"; 57 echo "Directory $LINUXDIR does not exist or is not a kernel source directory";
58 exit 1; 58 exit 1;
59 fi 59 fi
60 60
61 # Get kernel version 61 # Get kernel version
63 PATCHLEVEL=`grep -s PATCHLEVEL <$LINUXDIR/Makefile | head -n 1 | sed s/'PATCHLEVEL = '//` 63 PATCHLEVEL=`grep -s PATCHLEVEL <$LINUXDIR/Makefile | head -n 1 | sed s/'PATCHLEVEL = '//`
64 SUBLEVEL=`grep -s SUBLEVEL <$LINUXDIR/Makefile | head -n 1 | sed s/'SUBLEVEL = '//` 64 SUBLEVEL=`grep -s SUBLEVEL <$LINUXDIR/Makefile | head -n 1 | sed s/'SUBLEVEL = '//`
65 65
66 # Can we handle this version? 66 # Can we handle this version?
67 if [ $VERSION -ne 2 -o $PATCHLEVEL -lt 6 ] 67 if [ $VERSION -ne 2 -o $PATCHLEVEL -lt 6 ]
68 then 68 then
69 echo "Cannot patch kernel version $VERSION.$PATCHLEVEL.$SUBLEVEL, must be 2.6.x or higher" 69 echo "Cannot patch kernel version $VERSION.$PATCHLEVEL.$SUBLEVEL, must be 2.6.x or higher"
70 exit 1; 70 exit 1;
71 fi 71 fi
72 72
73 73