make menuconfig 常见错误分析
       
一:
invalid option `abi=aapcs-linux'选项错误
scripts/kconfig/conf -s arch/arm/Kconfig
CHK    include/linux/version.h
SYMLINK include/asm-arm/arch -> include/asm-arm/arch-s3c2410
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK    include/linux/utsrelease.h
CC      arch/arm/kernel/asm-offsets.s
cc1: error: invalid option `abi=aapcs-linux'
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
解决方法:
You're building an EABI kernel with an OABI compiler. You can either turn off the EABI option in your config file (Kernel Features->Use EABI),or, you can use an EABI toolchain such as the ARM/GNU Linux one from <desourcery/gnu_toolchains/arm/download.html>.I recommend the latter, because then you can run Arjan's new images.
上述的关掉EABI选项可以通过测试
二:
drivers/video/console/vgacon.o:987:warning:comparison is always true due to limited range of data type
make[3]:***[drivers/video/console/vgacon.o] error 1
make[2]:***[drivers/video/console2] error 2
make[1]:***[drivers/video1] error 2
make:***[drivers] error 2
解决方法:
在make menuconfig 时选哪个设备驱动的选项进去在选Graphics support ->
console display driver support->
vga text console(不选这个)
再编译就行了!
三:`rtc_lock'未定义错误(未完全解决)
方法:
drivers/built-in.o(.text+0x281e4):drivers/char/nvram.c:350: more undefined references to `rtc_lock' follow
查drivers/char/nvram.c有关的rtc_lock定义,发现2.6.21与以往的kernel不同,于是在包含文件中查,在include/linux/mc146818rtc.h中发现了rtc_lock的定义,但是有一个__KERNEL__的条件编译选项,去掉这个条件编译选项,再make zImage,但是问题好像依然存在,继续在drivers/char/nvram.c中增加这个定义spinlock_t rtc_lock;再编译,发现编译通过。
四:
make zImage和make xipImage
Kernel configured for XIP (CONFIG_XIP_KERNEL=y)
Only the xipImage target is available in this case
make[1]: *** [arch/arm/boot/zImage] Error 1
make: *** [zImage] Error 2
解决方法:
好象是make menuconfig的时候Boot options--->Kernel Execte-In-Place from ROM选项问题,去掉这个选项编译通过(如果是make xopImage时則需要将这个选项选上),最终成功编译了make zImage。
五:
出现make:***[.tmp_vmlinux1] Error 1这类错误
解决方法:修改arch/arm/kernel/vmlinux.lds
[arm@localhost linux2.6.14]$
vi arch/arm/kernel/vmlinux.lds
error parse new
将文件尾2条的ASSERT注释掉(1439行)
/* ASSERT((__proc_info_end __
proc_info_begin), "missing CPU support") */
/* ASSERT((__arch_info_end __
arch_info_begin), "no machine record defined") */
然后重新make zImage即可
六:
如果大家遇到一下几个问题可以参考本文:
a      make menuconfig
    1)    /usr/bin/ld: cannot find -lncurses
    解决办法:
    sudo apt-get install libncurses5-dev
    2)    Your display is too small to run Menuconfig!
    解决办法:    窗口最大化
b
/usr/local/arm/bin/arm-linux-ld:arch/arm/kernel/vmlinux.lds:782: parse error
make: *** [.tmp_vmlinux1] 错误 1
ld链接时产生错误
对应行:
/home/kevin/ARMSystem/linux-2.6.12/arch/arm/kernel/vmlinux.lds
/* those must never be empty */
ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
解决办法: 注释掉这两行
下面是编译时产生的一些信息
1' cross compile
    # CROSS_COMPILE specify the prefix used for all executables used
    # during compilation. Only gcc and related bin-utils executables
    # are prefixed with $(CROSS_COMPILE).
    # CROSS_COMPILE can be set on the command line
    # make CROSS_COMPILE=ia64-linux-
    # Alternatively CROSS_COMPILE can be set in the environment.
    # Default value for CROSS_COMPILE is not to prefix executables
    # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
    ARCH        := arm
    CROSS_COMPILE    := /usr/local/arm/bin/arm-linux-
2'
kevin@kevin-desktop:~/ARMSystem/linux-2.6.12$ make distclean
# distclean
#
.PHONY: distclean
distclean: mrproper
    @find $(srctree) $(RCS_FIND_IGNORE) \
          \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
        -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
          -o -name '.*.rej' -o -size 0 \
        -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
        -type f -print | xargs rm -f
只是到一些残存文件并删除;
3‘
kevin@kevin-desktop:~/ARMSystem/linux-2.6.12$ make menuconfig
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c: 在函数‘parse_config_file’中:
scripts/basic/fixdep.c:245: 警告: 传递参数 1 (属于‘use_config’) 给指针时,目标与指针符号不一致
scripts/basic/fixdep.c: 在函数‘parse_dep_file’中:
scripts/basic/fixdep.c:299: 警告: 传递参数 1 (属于‘__builtin_strchr’) 给指针时,目标与指针符号不一致

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。