Re: [Balloon] Changes to yaffs path-ker.sh script

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: balloon
Subject: Re: [Balloon] Changes to yaffs path-ker.sh script
On Monday 11 October 2010 09:48:24 Charles Manning wrote:
> Ballooners
>
> I recently changed the patch-ker.sh script to support multi-version and
> single-version variants of the yaffs VFS glue code.
>
> The new form for the arguments is:
>
> ./patch-ker.sh c m /linux-dir
>
> the old form was
>
> ./patch-ker.sh c /linux-dir
>
>
> I now realise that this impacts on the balloon scripts.
>
> There seem to be two options here:
> 1) I change patch-ker.sh script back and introduce another script for
> handling the single-version patching.
> 2) The balloon script changes to the following logic:
>
> if yaffs_vfs_multi.c exists
>     then
>         ./patch-ker.sh c m /linux-dir
>     else
>         ./patch-ker.sh c /linux-dir

>
> For me the second mechanism is a bit easier. It that an acceptable
> approach?
>
> If so, I'll make a fix


Herewith...

--- kernel/Makefile    (revision 1277)
+++ kernel/Makefile    (working copy)
@@ -101,9 +101,11 @@
     (( wget -N $(RELEASESITE)/sources/kernel/yaffs-$(YAFFSCHECKOUT).tar.bz2 && \
       tar --extract --bzip2 --file yaffs-$(YAFFSCHECKOUT).tar.bz2) || \
         ( echo "Fetch yaffs2 ($(YAFFSCHECKOUT)) from git"; \
-         git 
archive --format=tar --prefix=yaffs2/ --remote=git://www.aleph1.co.uk/yaffs2  
master@{YAFFSCHECKOOUT} | tar -x \
+         git 
archive --format=tar --prefix=yaffs2/ --remote=git://www.aleph1.co.uk/yaffs2  
master@{$(YAFFSCHECKOOUT)} | tar -x \
           || test $$? = 2 ) )) && \
-    ( cd $(RES)/yaffs2 && ./patch-ker.sh c ../linux-$(KERNVER) && \
+    ( cd $(RES)/yaffs2 && \
+        (( [ -e yaffs_vfs_multi.c ] && ./patch-ker.sh c m ../linux-$(KERNVER)) || \
+         ./patch-ker.sh c ../linux-$(KERNVER) ) && \
     cd .. && tar -cjf $(RES)/yaffs-$(YAFFSCHECKOUT).tar.bz2 yaffs2 && rm -rf 
yaffs2) && \
     touch $(RES)/yaffs-source-$(YAFFSCHECKOUT).stamp