2

ARM 用の Linux カーネル 3.2.81 をビルドしようとしています。

これが私が従っている手順です:

  1. wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.81.tar.gz
  2. tar xvzf linux-3.2.81.tar.gz
  3. エクスポート ARCH=アーム
  4. export CROSS_COMPILE=arm-linux-gnueabi-
  5. CD Linux-3.2.81
  6. make vexpress_defconfig
  7. すべてを作る

これは、ステップ 7 (すべてを作成) を実行したときに直面しているエラー出力です。

  CC      init/do_mounts_initrd.o
  LD      init/mounts.o
init/do_mounts_initrd.o: In function `return_address':
/home/ramy/QEMU_Learn/Kernel/linux-3.2.81/arch/arm/include/asm/ftrace.h:51: multiple definition of `return_address'
init/do_mounts.o:/home/ramy/QEMU_Learn/Kernel/linux-3.2.81/arch/arm/include/asm/ftrace.h:51: first defined here
scripts/Makefile.build:427: recipe for target 'init/mounts.o' failed
make[1]: *** [init/mounts.o] Error 1
Makefile:947: recipe for target 'init' failed
make: *** [init] Error 2

これは、エラーで言及されている ftrace.h (ftrace.h:51) の一部です。

#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
/*
 * return_address uses walk_stackframe to do it's work.  If both
 * CONFIG_FRAME_POINTER=y and CONFIG_ARM_UNWIND=y walk_stackframe uses unwind
 * information.  For this to work in the function tracer many functions would
 * have to be marked with __notrace.  So for now just depend on
 * !CONFIG_ARM_UNWIND.
 */

void *return_address(unsigned int);

#else

extern inline void *return_address(unsigned int level)
{
    return NULL;
}

私は Ubuntu オペレーティング システムで作業しており、Linaro ツール チェーンを使用しています。

パス変数:

printenv | grep PATH
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ramy/gcc-arm-none-eabi-5_3-2016q1/bin
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
4

0 に答える 0