All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [patch] tweak scripts/prepare-kernel.sh to work with O=../linux-output
@ 2006-02-07 10:54 Jim Cromie
  2006-02-11 17:19 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Cromie @ 2006-02-07 10:54 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 159 bytes --]

hi folks,

with this patch, you can run prepare-kernel.sh on a kernel output tree,
at least once that tree contains the Makefile that the script looks for.




[-- Attachment #2: patch-output --]
[-- Type: text/plain, Size: 989 bytes --]

Index: scripts/prepare-kernel.sh
===================================================================
--- scripts/prepare-kernel.sh	(revision 550)
+++ scripts/prepare-kernel.sh	(working copy)
@@ -74,13 +74,14 @@
 done
 
 linux_tree=`cd $linux_tree && pwd`
+linux_out=$linux_tree
 
 if test \! -r $linux_tree/Makefile; then
    echo "$me: $linux_tree is not a valid Linux kernel tree"
    exit 2
 fi
 
-# Infere the default architecture if unspecified.
+# Infer the default architecture if unspecified.
 
 if test x$linux_arch = x; then
    build_arch=`$xenomai_root/config/config.guess`
@@ -144,6 +145,12 @@
    linux_arch=blackfin
 fi
 
+foo=`grep '^KERNELSRC    := ' $linux_tree/Makefile | cut -d= -f2`
+if [ ! -z $foo ] ; then
+    linux_tree=$foo
+fi
+unset foo
+
 eval linux_`grep '^EXTRAVERSION =' $linux_tree/Makefile | sed -e 's, ,,g'`
 eval linux_`grep '^PATCHLEVEL =' $linux_tree/Makefile | sed -e 's, ,,g'`
 eval linux_`grep '^SUBLEVEL =' $linux_tree/Makefile | sed -e 's, ,,g'`

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai-core] [patch] tweak scripts/prepare-kernel.sh to work with O=../linux-output
  2006-02-07 10:54 [Xenomai-core] [patch] tweak scripts/prepare-kernel.sh to work with O=../linux-output Jim Cromie
@ 2006-02-11 17:19 ` Philippe Gerum
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2006-02-11 17:19 UTC (permalink / raw)
  To: Jim Cromie; +Cc: xenomai

Jim Cromie wrote:
> hi folks,
> 
> with this patch, you can run prepare-kernel.sh on a kernel output tree,
> at least once that tree contains the Makefile that the script looks for.
> 

Applied, thanks.

> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: scripts/prepare-kernel.sh
> ===================================================================
> --- scripts/prepare-kernel.sh	(revision 550)
> +++ scripts/prepare-kernel.sh	(working copy)
> @@ -74,13 +74,14 @@
>  done
>  
>  linux_tree=`cd $linux_tree && pwd`
> +linux_out=$linux_tree
>  
>  if test \! -r $linux_tree/Makefile; then
>     echo "$me: $linux_tree is not a valid Linux kernel tree"
>     exit 2
>  fi
>  
> -# Infere the default architecture if unspecified.
> +# Infer the default architecture if unspecified.
>  
>  if test x$linux_arch = x; then
>     build_arch=`$xenomai_root/config/config.guess`
> @@ -144,6 +145,12 @@
>     linux_arch=blackfin
>  fi
>  
> +foo=`grep '^KERNELSRC    := ' $linux_tree/Makefile | cut -d= -f2`
> +if [ ! -z $foo ] ; then
> +    linux_tree=$foo
> +fi
> +unset foo
> +
>  eval linux_`grep '^EXTRAVERSION =' $linux_tree/Makefile | sed -e 's, ,,g'`
>  eval linux_`grep '^PATCHLEVEL =' $linux_tree/Makefile | sed -e 's, ,,g'`
>  eval linux_`grep '^SUBLEVEL =' $linux_tree/Makefile | sed -e 's, ,,g'`
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core


-- 

Philippe.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-11 17:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-07 10:54 [Xenomai-core] [patch] tweak scripts/prepare-kernel.sh to work with O=../linux-output Jim Cromie
2006-02-11 17:19 ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.