工程简介:
Darwin 工程是君正针对X1830/X1520 芯片开发的一套linux 系统的发布、开发平台。该工程是应用于智能门禁、智能道闸、二维码等市场的软件解决方案。该工程主要由成熟的开源工程u-boot、linux、buildroot 构造完整的系统。
编译步骤:
①安装依赖库
- $sudo apt-get install autopoint
- $sudo apt-get install liblzo2-dev
- $sudo apt-get install build-essential
- $sudo apt-get install automake autoconf m4 libtool gettext
- $sudo apt-get install zlib1g-dev
- $sudo apt-get install libncurses5-dev libslang2-dev libselinux1-dev debhelper l***-release pkg-config po-debconf
②到处编译所需环境变量:
(首先要进入到源码同步的文件夹,我的文件夹名是project_workspace)
- $cd project_workspace
- $source build/envsetup.sh
③列出设备信息,并选择对应的设备:
因为我用的是x1830人脸识别开发包,选择的是第4项,你可根据你使用的
开发板选择对应设备。
④整体编译工程:
常见报错及解决办法(注意:有报错输入解决办法后,再次编译前要输入make clean,之后再make):
- 问题:make:command not found
- 解决方法: sudo apt-get install make
- 问题:gcc: not found
- 解决方法: sudo apt-get update
- sudo apt-get install build-essential fakeroot dpkg-dev
- 问题:./autogen.sh: 56: ./autogen.sh: libtoolize: not found
- You must have libtool version >= 2.x.x, but you have none.
- 解决方法: sudo apt-get install libtool
- 问题:You must have autopoint installed to generate util-linux build system.
- The autopoint command is part of the GNU gettext package.
- 解决方法: sudo apt-get install automake
- sudo apt-get install autoconf
- sudo apt-get install autopoint
- 问题:autom4te: /usr/bin/m4 failed with exit status: 1
- aclocal: error: echo failed with exit status: 1
- 或者configure.ac:120: error: Could not locate the pkg-config autoconf
- 解决方法: sudo apt-get install pkg-config
- 问题:configure: error: ncurses or ncursesw selected, but library not found (--without-ncurses to
- disable)
- 解决方法:sudo apt-get install ncurses-dev
- 问题:mv: cannot stat 't-zh_CN.gmo': No such file or directory
- mv: cannot stat 't-zh_TW.gmo': No such file or directory
- 解决方法: sudo apt-get install libgettextpo-dev
- sudo apt-get install libasprintf-dev
- sudo apt-get install gettext
- 注:此处可能需将出错的模块进行clean 操作,再进行编译。
- 问题:/bin/sh: 1: bc: not found
- 解决方法: sudo apt-get install bc
- 问题:mkimage:Command not found
- 解决方法:sudo apt-get install uboot-mkimage
- 问题:You must install ‘svn’ on your build machine
- 解决方法:sudo apt-get install subversion
- 问题:you need a C++ compiler for C++ support
- 解决方法:sudo apt-get install build-essential
- 问题:编译buildroot 时提示“缺少libstdc++.so.6”
- 解决方法:当前编译环境中缺少32 位兼容工具包(请根据安装的系统自行查询解决办法)
- 也可尝试通过以下命令安装:
- sudo apt-get install libstdc++6
- sudo apt-get install lib32stdc++6
- 问题:编译buildroot 时提示“__NR_sched_setattr’ undeclared”
- 解决方式:当前编译环境中缺少32 位兼容工具包(请根据安装的系统自行查询解决办法)
- 也可尝试通过以下命令安装:
- sudo apt-get install g++-4.8-multilib
- sudo apt-get install chrpath curl dosfstools gawk g++-multilib gcc-multilib lib32z1-dev
- libcrypto++9:i386 libcrypto++-dev:i386 liblzo2-dev:i386 lzoplibsdl1.2-dev libstdc++-4.8-dev:i386
- libu***-1.0-0:i386 libu***-1.0-0-dev:i386 texinfo uuid-dev:i386