2020-10-24

本文详细记录了解决Rockchip Linux SDK中使用RK3399时遇到的编译错误,包括源代码调整和必要的库文件修改,适用于Rockchip Linux SDK新手和开发者。

rk3399 编译报错

src/appi18n.cpp:31:83: error: no match for ‘operator+’ (operand types are ‘QStringRef’ and ‘const char [9]’)
   QString lang= tmp->value("LANG",defaultLang).toString().leftRef(langTokenLength)+"/appName";

QString lang= (tmp->value("LANG",defaultLang).toString().leftRef(langTokenLength)).toString()+QString(QLatin1String("/appName"));

总共有两处修改,之后此处报错编译通过

参考文章:

Rockchip linux sdk buildroot使用记录

Posted on 2019年11月2日 by seteuid0

Rockchip Linux SDK里面的buildroot可以制作一个简洁的rootfs,但按照文档还是有一些问题,以下是使用时大致的一个记录及代码修改记录。

SDK从 http://opensource.rock-chips.com/wiki_Linux_SDK 获取。http://opensource.rock-chips.com/wiki_Source 里面有使用方法。

先要获取repo

git clone https://github.com/rockchip-linux/repo
mkdir linux
cd linux

而后同步代码,我这里使用的是RK3399的代码,由于网络原因可能会有超时发生,可以使用后面的脚本进行多次获取。

../repo/repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -b master -m rk3399_linux_release.xml 
../repo/repo sync
#!/bin/sh
../repo/repo sync -c

while [ $? -ne 0 ] ;
do
        ../repo/repo sync -c;
done

代码就绪后就可以开始动手编译了。

#cd u-boot
#./make.sh evb-rk3399
$ source buildroot/build/envsetup.sh
You're building on Linux
Lunch menu...pick a combo:
1. rockchip_rk3308_release
2. rockchip_rk3308_debug
3. rockchip_rk3308_robot_release
4. rockchip_rk3308_robot_debug
5. rockchip_rk3308_mini_release
Which would you like? [1]  #这里选择硬件对应的配置
$make
$./build.sh rootfs
$ls rockchip/3399/linux/buildroot/output/rockchip_rk3399/images/rootfs.ext4

在编译的过程中由于语法问题有多处错误,大致需要修改以下内容(有些内容遗漏了)

./buildroot/output/rockchip_rk3399/build/host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/squashfs-tools/mksquashfs.c
添加#include <sys/sysmacros.h>
./output/rockchip_rk3399/build/host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/squashfs-tools/Makefile
LIBS = -lpthread -lm -lc
./rockchip_rk3399/build/settings-1.0/wlan/wlanlisttable.cpp ifiStateItem::operator < 函数做下面的修改
} else if (state == WIFI_STATE_SAVED || this->text().toInt() == WIFI_STATE_AUTH_FAILED) {
./rockchip_rk3399/build/QLauncher-1.0/src/appi18n.cpp 文件 字符串处修改成如下内容
 QString lang= (tmp->value("LANG",defaultLang).toString().leftRef(langTokenLength)).toString()+QString(QLatin1String("/appName"));
./output/rockchip_rk3399/build/host-libglib2-2.54.2/gio/Makefile


END

This entry was posted in ARM, linux and tagged buildroot, linux, rockchip, sdk. Bookmark the permalink.

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值