firefly AIO-RK3399J Linux SDK编译报错解决

本文档详细记录了在Ubuntu 2020环境下编译Firefly AIO-RK3399J Linux SDK时遇到的编译问题及其解决方案,包括kernel的-Wall警告、需要安装'unbuffer'、不建议以root身份运行configure、gdbus相关错误、syscall和ioctls.h的错误等,并提供了相应的代码修改建议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Firefly AIO-RK3399J Linux SDK编译报错解决

Zhang-Zhen 2020-09-30 22:01:04  收藏

分类专栏: RK3399工作记录 文章标签: linux kernel uboot

版权

 

目录

 

一、Ubuntu2020 下编译:

1、编译kernel:去掉-Wall警告报错

android编译Kernel时,从高版本GCC起,就开始把warning作为error对待,比如出现错误:
error, forbidden warning --等等
这样处理对于想快速见到结果的快速迭代模式来说有点碍手,怎样取消呢?
在Kernel\Makefile中找到下面的语句
KBUILD_CFLAGS :=
之后添加上这个参数:
-Wno-error, 如果还不起作用的话,就使用下面最强的开关
-w , 注意w小写
比如添加之后是这样的:

KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
  -fno-strict-aliasing -fno-common \
  -Werror-implicit-function-declaration \
  -Wno-format-security \
  -Wno-error \
  -w \                                                  //上面不起作用时可以使用这个
  -fno-delete-null-pointer-checks
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

2、编译rockdev:you need to install ‘unbuffer‘

解决办法:
命令行输入: unbuffer
会得到以下提示:sudo apt install expect
直接在命令行输入提示内容即可。

3、编译rockdev:error: you should not run configure as root

解决办法:

export FORCE_UNSAFE_CONFIGURE=1
export FORCE=1
  • 1
  • 2

4、编译rockdev:gdbusauth.c:1305:11: error: ‘%s’

修改buildroot/output/rockchip_rk3399_recovery/build/host-libglib2-2.54.2/gio/gdbusauth.c

  debug_print ("SERVER: WaitingForBegin, read '%s'", line);
  if (line == NULL)
    goto out;
  • 1
  • 2
  • 3

  if (line == NULL)
    goto out;
  debug_print ("SERVER: WaitingForBegin, read '%s'", line);
  • 1
  • 2
  • 3

5、编译rockdev:gdbusmessage.c:2700:30: error: ‘%s’ directive argument is null

前屏蔽掉

6、编译rockdev:syscall.c:259:16: error: static declaration of ‘gettid’

前屏蔽掉

7、编译rockdev:ioctls.h:174:9: error: ‘SIOCGSTAMPNS’ undeclared here

前屏蔽掉

8、编译buildroot,也会遇到编译rockdev的问题,处理方法一样。

 

 

//

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.

Post navigation

← [ZZ]v4l2的学习建议和流程解析

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值