projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
438da10
)
Add a symlink option to the patching script
author
charles
<charles>
Wed, 25 Jul 2007 01:04:38 +0000
(
01:04
+0000)
committer
charles
<charles>
Wed, 25 Jul 2007 01:04:38 +0000
(
01:04
+0000)
README-linux-patch
patch
|
blob
|
history
patch-ker.sh
patch
|
blob
|
history
diff --git
a/README-linux-patch
b/README-linux-patch
index 6022358187180603bbdf22b88e968eaacc9ba652..b38de80fee6f7f3103aa270a430111c6d162a747 100644
(file)
--- a/
README-linux-patch
+++ b/
README-linux-patch
@@
-1,11
+1,16
@@
To build YAFFS in the Linux kernel tree you need to run the patch-ker.sh
To build YAFFS in the Linux kernel tree you need to run the patch-ker.sh
-script, giving the path to your kernel sources, e.g:
+script from the yaffs soiurce directory, giving your chouce as to whether
+you wish to copy or link the code and the path to your kernel sources, e.g:
-./patch-ker.sh /usr/src/linux
+./patch-ker.sh
c
/usr/src/linux
This will copy the yaffs files into fs/yaffs2 and modify the Kconfig
and Makefiles in the fs directory.
This will copy the yaffs files into fs/yaffs2 and modify the Kconfig
and Makefiles in the fs directory.
+./patch-ker.sh l /usr/src/linux
+
+This does the same as the above but makes symbolic links instead.
+
After you've run the script, go back to your normal kernel making procedure
and configure the yaffs settings you want.
After you've run the script, go back to your normal kernel making procedure
and configure the yaffs settings you want.
diff --git
a/patch-ker.sh
b/patch-ker.sh
index 93233889cf807dd62da226bd7f70250cab836924..6ffabecd2ff1ca0da1e46ebba09f2552740b879c 100755
(executable)
--- a/
patch-ker.sh
+++ b/
patch-ker.sh
@@
-16,19
+16,21
@@
#
# Somewhat "inspired by" the mtd patchin script
#
#
# Somewhat "inspired by" the mtd patchin script
#
-# $Id: patch-ker.sh,v 1.
2 2007-02-12 16:55:25 wookey
Exp $
+# $Id: patch-ker.sh,v 1.
3 2007-07-25 01:04:38 charles
Exp $
VERSION=0
PATCHLEVEL=0
SUBLEVEL=0
VERSION=0
PATCHLEVEL=0
SUBLEVEL=0
-LINUXDIR=$1
+COPYORLINK=$1
+LINUXDIR=$2
# To be a Linux directory, it must have a Makefile
# Display usage of this script
usage () {
# To be a Linux directory, it must have a Makefile
# Display usage of this script
usage () {
- echo "usage: $0 kernelpath"
+ echo "usage: $0 c/l kernelpath"
+ echo " if c/l is c, then copy. If l then link"
exit 1
}
exit 1
}
@@
-39,6
+41,16
@@
then
usage;
fi
usage;
fi
+if [ $COPYORLINK = l ]; then
+ CPY="ln -s"
+elif [ $COPYORLINK = c ]; then
+ CPY="cp"
+else
+ echo "unknown copy or link type"
+ usage;
+fi
+
+
# Check if kerneldir contains a Makefile
if [ ! -f $LINUXDIR/Makefile ]
then
# Check if kerneldir contains a Makefile
if [ ! -f $LINUXDIR/Makefile ]
then
@@
-103,7
+115,7
@@
then
echo "$YAFFSDIR exists, not patching"
else
mkdir $LINUXDIR/fs/yaffs2
echo "$YAFFSDIR exists, not patching"
else
mkdir $LINUXDIR/fs/yaffs2
-
cp
Makefile.kernel $LINUXDIR/fs/yaffs2/Makefile
-
cp
Kconfig $LINUXDIR/fs/yaffs2
-
cp *.c
*.h $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
fi
fi