首页 > 技术知识 > 正文

源码同步教程:https://blog.csdn.net/qq_33624125/article/details/107636769

工程简介:

君正linux全开发平台工程是君正针对君正所有芯片开发的一套linux 系统的发布、开发平台。该工程是应用于智能门禁、智能道闸、二维码等市场的软件解决方案。该工程主要由成熟的开源工程u-boot、linux、buildroot 构造完整的系统。

编译步骤(通用配置):

①在完成源码同步后,开始进行编译,首先是安装依赖库(注意:在安装有些依赖包时因系统版本不一致会提示没有这个库,可针对系统版本安装同类型的库。在安装依赖包后请先make clean 后再次编译。)

$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 lsb-release pkg-config po-debconf

②进入编译脚本所在目录

$cd x1021/build/configs

君正linux全开发平台整体编译步骤(通用配置)——以君正X1021为例

③选择配置文件,因为我准备使用的是x1021开发板,选择的是x1021_nand_defconfig配置文件。

make x1021_nand_defconfig

④返回上级build菜单,再整体编译(编译期间可能会有让你选yes/no之类的,不用管直接回车,回车,回车)

$cd ../ $make

编译完成后,生成的文件在build/ouput下, 1.u-boot-with-spl.bin 2.xImage 3.rootfs.squashfs

编译常见问题及解决方法:

问题: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 libusb-1.0-0:i386 libusb-1.0-0-dev:i386 texinfo uuid-dev:i386

原帖链接:https://blog.csdn.net/qq_33624125/article/details/107659450

猜你喜欢