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

在学了在学了! 2020-08-10 19:44:10 5884

源码同步教程: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

③选择配置文件,因为我准备使用的是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

声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
红包 1 1 评论 打赏
评论
0个
内容存在敏感词
手气红包
    易百纳技术社区暂无数据
相关专栏
置顶时间设置
结束时间
删除原因
  • 广告/SPAM
  • 恶意灌水
  • 违规内容
  • 文不对题
  • 重复发帖
打赏作者
易百纳技术社区
在学了在学了!
您的支持将鼓励我继续创作!
打赏金额:
¥1易百纳技术社区
¥5易百纳技术社区
¥10易百纳技术社区
¥50易百纳技术社区
¥100易百纳技术社区
支付方式:
微信支付
支付宝支付
易百纳技术社区微信支付
易百纳技术社区
打赏成功!

感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~

举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

审核成功

发布时间设置
发布时间:
是否关联周任务-专栏模块

审核失败

失败原因
备注
拼手气红包 红包规则
祝福语
恭喜发财,大吉大利!
红包金额
红包最小金额不能低于5元
红包数量
红包数量范围10~50个
余额支付
当前余额:
可前往问答、专栏板块获取收益 去获取
取 消 确 定

小包子的红包

恭喜发财,大吉大利

已领取20/40,共1.6元 红包规则

    易百纳技术社区