1、环境
ubuntu: 16.04 LTS
android源码包:从gitlab.com/9tripod上下载:x3399_nougat-master.tar.gz,在ubuntu下解压
2、host机器上的gcc编译器版本
同一个虚拟机下安装了2个版本,如下:
lixin@ubuntu:/usr/bin$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
另外一个版本:
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
在以上两个版本的gcc编译器下,编译uboot均出现同样错误。
3、编译uboot出错,信息如下:。
lixin@ubuntu:~/project/x3399_nougat-master$ ./mk.sh -u
'/home/lixin/tof-project/x3399_nougat-master/device/rockchip/rk3399/x3399/parameter.txt' -> '/home/lixin/tof-project/x3399_nougat-master/out/release/parameter.txt'
'/home/lixin/tof-project/x3399_nougat-master/device/rockchip/rk3399/x3399/misc.img' -> '/home/lixin/tof-project/x3399_nougat-master/out/release/misc.img'
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN include/config include/generated
CLEAN .config include/config.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
GEN include/autoconf.mk
In file included from include/linux/compiler.h:54,
from include/linux/byteorder/little_endian.h:12,
from /home/lixin/tof-project/x3399_nougat-master/u-boot/arch/arm/include/asm/byteorder.h:29,
from include/compiler.h:125,
from include/image.h:19,
from /home/lixin/tof-project/x3399_nougat-master/u-boot/include/common.h:87:
include/linux/compiler-gcc.h:114:1: fatal error: linux/compiler-gcc8.h: No such file or directory
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
/home/lixin/tof-project/x3399_nougat-master/u-boot/scripts/Makefile.autoconf:64: recipe for target 'include/autoconf.mk' failed
make[2]: *** [include/autoconf.mk] Error 1
/home/lixin/tof-project/x3399_nougat-master/u-boot/Makefile:496: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.
4、分析
似乎是开发环境问题,是host机器上gcc编译器版本导致的吗?__GNUC__解析成了8?但是,我使用过以上两个gcc版本,错误结果都一样。
请帮忙分析,非常感谢!
|