This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

linux3.2.21打xenomai补丁怎么会错误?



操作为:

 ./scripts/prepare-kernel.sh   --arch=arm --linux=/home/hello/work/kernel/linux-3.2.0-psp04.06.00.11 --ipipe=/home/hello/work/kernel/xenomai-3.0-rc4/kernel/cobalt/arch/arm/patches/ipipe-core-3.2.21-arm-4.patch 

但是提示:

prepare-kernel.sh: Unable to patch kernel 3.2.21 with ipipe-core-3.2.21-arm-4.patch.

这是怎么回事?谢谢、

  • 这个可以从sh文件中找到答案的吧

    你可以找找在什么地方打印的这个错误

  • 感觉是版本不匹配啊,具体要看下xenomai的版本说明。

  • 感谢你的回答。

    这句话可以看出来,kernel 3.2.21 with ipipe-core-3.2.21-arm-4.patch

    内核版本是 3.2.21 补丁是也是支持3.2.21的。根据楼上的提示可以看到是缺少某个文件导致的。

    再次感谢你的回答!

  • 感谢你的回答,在sh文件看到是缺少文件导致的。谢谢你的提示、

    下面是sh文件的内容:

    if test -r $linux_tree/include/linux/ipipe.h; then
    if test x$verbose = x1; then
    echo "I-pipe found - bypassing patch."
    fi
    else
    if test x$ipipe_patch = x; then
    # Pick ipipe-core-* patches based on the highest numbered
    # sequence/release number.
    default_ipipe_patch="`( ls $xenomai_root/kernel/cobalt/arch/$linux_arch/patches/ipipe-core-$linux_version*-$linux_arch-*|sort -r ) 2>/dev/null | head -n1`"
    fi
    if test x$default_ipipe_patch = x; then
    if test x$verbose = x1; then
    echo "$me: no default I-pipe patch found." >&2
    fi
    default_ipipe_patch=/dev/null
    fi
    while test x$ipipe_patch = x; do
    if test x$usedefault = x; then
    echo -n "I-pipe patch [default $default_ipipe_patch]: "
    read ipipe_patch
    fi
    if test x$ipipe_patch = x; then
    ipipe_patch=$default_ipipe_patch
    fi
    if test \! -r "$ipipe_patch" -o x$ipipe_patch = x/dev/null; then
    echo "$me: cannot read I-pipe patch from $ipipe_patch" >&2
    usedefault=
    ipipe_patch=
    fi
    done
    patchdir=`dirname $ipipe_patch`;
    patchdir=`cd $patchdir && pwd`
    ipipe_patch=$patchdir/`basename $ipipe_patch`
    curdir=$PWD
    cd $linux_tree && patch --dry-run -p1 -f < $ipipe_patch || {
    cd $curdir;
    echo "$me: Unable to patch kernel $linux_version$linux_EXTRAVERSION with `basename $ipipe_patch`." >&2
    exit 2;
    }
    patch -p1 -f -s < $ipipe_patch
    cd $curdir
    fi