--- README.INSTALL | 11 +++++------ scripts/prepare-kernel.sh | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) Index: xenomai/README.INSTALL =================================================================== --- xenomai.orig/README.INSTALL +++ xenomai/README.INSTALL @@ -51,8 +51,10 @@ $ scripts/prepare-kernel.sh --linux=/patches. This parameter can be omitted if + Adeos has already been patched in or the script shall suggest an + appropriate one. In any case, the script will not try to apply it again whenever a former patch is detected. --arch tells the script about the target architecture. If @@ -64,10 +66,7 @@ located at /usr/src/linux-2.6.23-ipipe i support: $ cd xenomai-2.4 -$ scripts/prepare-kernel.sh - --linux=/usr/src/linux-2.6.23-ipipe - --adeos=/tmp/adeos-ipipe-2.6.23-i386-1.10-12.patch - --arch=i386 +$ scripts/prepare-kernel.sh --linux=/usr/src/linux-2.6.23-ipipe Note: The script will infer the location of the Xenomai kernel code from its own location within the Xenomai source tree. In other words, Index: xenomai/scripts/prepare-kernel.sh =================================================================== --- xenomai.orig/scripts/prepare-kernel.sh +++ xenomai/scripts/prepare-kernel.sh @@ -353,10 +353,10 @@ eval linux_`grep '^PATCHLEVEL =' $linux_ eval linux_`grep '^SUBLEVEL =' $linux_tree/Makefile | sed -e 's, ,,g'` eval linux_`grep '^VERSION =' $linux_tree/Makefile | sed -e 's, ,,g'` -linux_version="$linux_VERSION.$linux_PATCHLEVEL.$linux_SUBLEVEL$linux_EXTRAVERSION" +linux_version="$linux_VERSION.$linux_PATCHLEVEL.$linux_SUBLEVEL" if test x$verbose = x1; then -echo "Preparing kernel $linux_version in $linux_tree..." +echo "Preparing kernel $linux_version$linux_EXTRAVERSION in $linux_tree..." fi if test -r $linux_tree/include/linux/ipipe.h; then @@ -369,7 +369,7 @@ elif test -r $linux_tree/include/linux/a exit 2 else if test x$adeos_patch = x; then - default_adeos_patch=`( ls $xenomai_root/ksrc/arch/$xenomai_arch/patches/adeos-ipipe-$linux_version-$linux_arch-*|sort -r ) 2>/dev/null | head -n1` + default_adeos_patch="`( ls $xenomai_root/ksrc/arch/$xenomai_arch/patches/adeos-ipipe-$linux_version*-{$linux_arch,$xenomai_arch}-*|sort -r ) 2>/dev/null | head -n1`" fi if test x$default_adeos_patch = x; then default_adeos_patch=/dev/null @@ -393,7 +393,7 @@ else curdir=$PWD cd $linux_tree && patch --dry-run -p1 -f < $adeos_patch || { cd $curdir; - echo "$me: Unable to patch kernel $linux_version with `basename $adeos_patch`." >&2 + echo "$me: Unable to patch kernel $linux_version$linux_EXTRAVERSION with `basename $adeos_patch`." >&2 exit 2; } patch -p1 -f -s < $adeos_patch