操作为:
./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.
这是怎么回事?谢谢、
leo chen:
这个可以从sh文件中找到答案的吧
你可以找找在什么地方打印的这个错误
Jian Zhou:
回复 leo chen:
感觉是版本不匹配啊,具体要看下xenomai的版本说明。
jason Lee5:
回复 leo chen:
感谢你的回答,在sh文件看到是缺少文件导致的。谢谢你的提示、
下面是sh文件的内容:
if test -r $linux_tree/include/linux/ipipe.h; then if test x$verbose = x1; then echo "I-pipe found – bypassing patch." fielse 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 $curdirfi