ok6410A开发板给出的官方内核文件编译时报错

[复制链接]
 楼主| 冰糖炖雪梨 发表于 2018-8-31 21:36 | 显示全部楼层 |阅读模式
问题描述如下:

PC使用的win764位机,虚拟机中用ubuntu16.04 LTS,64位机,开发板为OK6410A。

下载的资料是论坛链接里最新的2016年版本的资料。

已经成功安装了arm-linux-gcc 4.3.2,因为这个交叉编译器是32位的,所以安装了必要的32位库文件,顺利编译了uboot文件,在编译内核文件时出现了以下错误:

root@ubuntu:/forlinx/linux-3.0.1# make zImage

  CHK     include/linux/version.h

  CHK     include/generated/utsrelease.h

make[1]: 'include/generated/mach-types.h' is up to date.

  CALL    scripts/checksyscalls.sh

  CHK     include/generated/compile.h

  TIMEC   kernel/timeconst.h

Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373.

/forlinx/linux-3.0.1/kernel/Makefile:140: recipe for target 'kernel/timeconst.h' failed

make[1]: *** [kernel/timeconst.h] Error 255

Makefile:947: recipe for target 'kernel' failed

make: *** [kernel] Error 2



有人说是交叉编译器的位置错误,所以将Makefile中做了如下修改

export KBUILD_BUILDHOST := $(SUBARCH)

ARCH                := arm

CROSS_COMPILE        := /usr/local/arm/4.3.2/bin/arm-linux-



#CROSS_COMPILE        ?= $(CONFIG_CROSS_COMPILE:"%"=%)

将编译器的位置直接指向了固定路径

然而并没有解决问题,百度了几次都没有找到相关的问题,只好到论坛里发帖。

小弟刚入门,大神多支持!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

430

主题

436

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部