tweak scripts/prepare-kernel.sh to work with O=../linux-output
PATCH 1/1 tweak scripts/prepare-kernel.sh to work with O=../linux-output
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.
prepare-kernel.sh +8 -1
@@ -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'`
Philippe Gerum
AppliedQuoted 5 lines · Jim Cromie
hi folks,
with this patch, you can run
prepare-kernel.shon a kernel output tree, at least once that tree contains theMakefilethat the script looks for.
Applied, thanks.
Quoted 46 lines
------------------------------------------------------------------------
Index:
scripts/prepare-kernel.sh
===================================================================prepare-kernel.sh +8
-2@@ -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
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.