九鼎创展论坛中文版English
登录 | 立即注册 设为首页收藏本站 切换到宽版
查看: 2315|回复: 2
打印 上一主题 下一主题

X3399 android源码编译问题

[复制链接]
跳转到指定楼层
楼主
发表于 2020-6-23 15:07:41 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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版本,错误结果都一样。
    请帮忙分析,非常感谢!


     
回复

使用道具 举报

沙发
发表于 2020-6-23 16:34:52 | 只看该作者
https://blog.csdn.net/weixin_388 ... earnPai2-1.nonecase
网上有相关资源,多利用网络
回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2020-6-23 18:25:53 | 只看该作者
ykun 发表于 2020-6-23 16:34
https://blog.csdn.net/weixin_38890593/article/details/88580428?utm_medium=distribute.pc_relevant_t0. ...

从提供的mk.sh脚本中看,uboot,kernel的编译,是用host上的gcc,为何没有使用交叉编译器呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|深圳市九鼎创展科技官方论坛 ( 粤ICP备11028681号-2  

GMT+8, 2024-6-18 04:32 , Processed in 0.017599 second(s), 16 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表