Firefly开源社区

12
发表新贴
打印 上一主题 下一主题

[技术讨论] buildroot编译问题

76

积分

0

威望

0

贡献

技术小白

积分
76

buildroot编译问题

发表于 2022-6-26 16:57:51      浏览:18099 | 回复:31        打印      只看该作者   [复制链接] 楼主
问题描述及复现步骤:
编译 Buildroot,envsetup.sh 是终端环境变量设置脚本:
source buildroot/build/envsetup.sh
You're building on LinuxLunch menu...pick a combo:
0. non-rockchip boards
1. firefly_rk3288
3. firefly_rk3288_demo
4. firefly_rk3308_pcba
5. firefly_rk3308_qt_release
6. firefly_rk3308_recovery
7. firefly_rk3308_release
Which would you like? [0] 7
Which would you like? [0]: 7
===========================================


#TARGET_BOARD=rk3308
#OUTPUT_DIR=output/firefly_rk3308_release
#CONFIG=firefly_rk3308_release_defconfig


===========================================
make: Entering directory '/home/firefly/proj/buildroot'
  GEN     /home/firefly/proj/buildroot/output/firefly_rk3308_release/Makefile
/home/firefly/proj/buildroot/build/defconfig_hook.py -m /home/firefly/proj/buildroot/configs/firefly_rk3308_release_defconfig /home/firefly/proj/buildroot/output/firefly_rk3308_release/.rockchipconfig
BR2_DEFCONFIG='' KCONFIG_AUTOCONFIG=/home/firefly/proj/buildroot/output/firefly_rk3308_release/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/firefly/proj/buildroot/output/firefly_rk3308_release/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/firefly/proj/buildroot/output/firefly_rk3308_release/build/buildroot-config/tristate.config BR2_CONFIG=/home/firefly/proj/buildroot/output/firefly_rk3308_release/.config HOST_GCC_VERSION="7" BUILD_DIR=/home/firefly/proj/buildroot/output/firefly_rk3308_release/build SKIP_LEGACY= BR2_DEFCONFIG=/home/firefly/proj/buildroot/configs/firefly_rk3308_release_defconfig /home/firefly/proj/buildroot/output/firefly_rk3308_release/build/buildroot-config/conf --defconfig=/home/firefly/proj/buildroot/output/firefly_rk3308_release/.rockchipconfig Config.in
#
# configuration written to /home/firefly/proj/buildroot/output/firefly_rk3308_release/.config
#
make: Leaving directory '/home/firefly/proj/buildroot'
root@ubuntu:~/proj# make
umask 0022 && make -C /home/firefly/proj/buildroot O=/home/firefly/proj/buildroot/output/firefly_rk3308_release
/usr/bin/make -j1 O=/home/firefly/proj/buildroot/output/firefly_rk3308_release HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" silentoldconfig
  GEN     /home/firefly/proj/buildroot/output/firefly_rk3308_release/Makefile
>>> rkwifibt 1.0.0 Building
mkdir -p /home/firefly/proj/buildroot/output/firefly_rk3308_release/target/system/lib/modules/
/home/firefly/proj/buildroot/../build.sh modules
processing option: modules
============Start building kernel modules============
TARGET_ARCH          =arm64
TARGET_KERNEL_CONFIG =firefly-rk3308b_linux_defconfig
TARGET_KERNEL_CONFIG_FRAGMENT =
==================================================
make[2]: *** No rule to make target 'firefly-rk3308b_linux_defconfig'.  Stop.
ERROR: Running build_modules failed!
ERROR: exit code 2 from line 695:
    make ARCH=$RK_ARCH $RK_KERNEL_DEFCONFIG $RK_KERNEL_DEFCONFIG_FRAGMENT
package/pkg-generic.mk:247: recipe for target '/home/firefly/proj/buildroot/output/firefly_rk3308_release/build/rkwifibt-1.0.0/.stamp_built' failed
make[1]: *** [/home/firefly/proj/buildroot/output/firefly_rk3308_release/build/rkwifibt-1.0.0/.stamp_built] Error 2
/home/firefly/proj/buildroot/output/firefly_rk3308_release/Makefile:16: recipe for target '_all' failed
make: *** [_all] Error 2

简单描述:
之前是选择全编译,发现无法通过
然后:先后编译uboot、kernel都可以,到buildroot这里无法通过编译

另:QT开发那里的
buildroot配置文件使能QT相关选项所指的配置文件是否device/rockchip/rk3308/roc-rk3308b-cc-plus-buildroot.mk?
在这个文件后面增加那些内容吗?
谢谢!





br.log.tar.gz

20 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

76

积分

0

威望

0

贡献

技术小白

积分
76
发表于 2022-7-8 08:22:01        只看该作者  沙发
source buildroot/build/envsetup.sh
Top of tree: /home/firefly/proj

You're building on Linux
Lunch menu...pick a combo:

0. non-rockchip boards
1. firefly_rk3288
2. firefly_rk3288_demo
3. firefly_rk3308_minigui_release
4. firefly_rk3308_pcba
5. firefly_rk3308_qt_release
6. firefly_rk3308_recovery
7. firefly_rk3308_release
Which would you like? [0]: 7
bash: /home/firefly/proj/device/rockchip/.BoardConfig.mk: No such file or directory
有时还会有这个提示,是啥情况?
回复

使用道具 举报

76

积分

0

威望

0

贡献

技术小白

积分
76
发表于 2022-7-8 08:51:13        只看该作者  板凳
但是make能过
制作固件的时候,就无法通过了:
# ./mkfirmware.sh
./mkfirmware.sh: line 18: /home/firefly/proj/device/rockchip/.BoardConfig.mk: No such file or directory
回复

使用道具 举报

76

积分

0

威望

0

贡献

技术小白

积分
76
发表于 2022-7-8 08:55:14        只看该作者  地板
选择5的时候,
make会提示找不到libQt5Quick.so.5.9.4,查了下SDK里面确实没有
回复

使用道具 举报

696

积分

0

威望

0

贡献

技术大神

Rank: 3Rank: 3

积分
696
发表于 2022-7-8 08:55:50        只看该作者  5#
dlinli 发表于 2022-7-8 08:51
但是make能过
制作固件的时候,就无法通过了:
# ./mkfirmware.sh

请按照如下方式编译:

./build.sh roc-rk3308b-cc-plus_rgb-4.0inch_qt_release_BoardConfig.mk
或者
./build.sh roc-rk3308b-cc-plus_rgb-7.0inch_qt_release_BoardConfig.mk

然后直接运行./build.sh,不需要带参数,就可以把uboot,kernel,buildroot全部编译完成
回复

使用道具 举报

76

积分

0

威望

0

贡献

技术小白

积分
76
发表于 2022-7-9 16:34:14        只看该作者  6#
Firefly_Javier 发表于 2022-7-8 08:55
请按照如下方式编译:

./build.sh roc-rk3308b-cc-plus_rgb-4.0inch_qt_release_BoardConfig.mk

我们下载的SDK目录中看到的是:
roc-rk3308b-cc-plus-rgb-4.0inch-qt.mk

roc-rk3308b-cc-plus-rgb-7.0inch-qt.mk
另外,需要在文档中增加以下配置吗?
#使能QT相关选项
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_WIDGETS=y
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
BR2_PACKAGE_QT5CONNECTIVITY=y
BR2_PACKAGE_QT5MULTIMEDIA=y
BR2_PACKAGE_QT5QUICKCONTROLS=y
BR2_PACKAGE_QT5QUICKCONTROLS2=y
BR2_PACKAGE_QT5WAYLAND=y
BR2_PACKAGE_QT5BASE_JPEG=y
BR2_PACKAGE_QT5BASE_PNG=y
BR2_PACKAGE_QT5SVG=y
BR2_PACKAGE_QT5TOOLS=y
BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS=y
BR2_PACKAGE_DEJAVU=y
#使能GDB相关选项
BR2_PACKAGE_HOST_GDB=y
BR2_PACKAGE_HOST_GDB_PYTHON=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_GDB_SERVER=y
#使能SSH相关选项
#openssh包
BR2_PACKAGE_OPENSSH=y
#配置登录的账户密码
BR2_TARGET_ENABLE_ROOT_LOGIN=y
BR2_TARGET_GENERIC_ROOT_PASSWD="123"(这里会改成真实的密码)
谢谢!

点评

Firefly_Javier,感谢您的指导!  发表于 2022-7-10 08:05
不需要加的,已经默认加了的  发表于 2022-7-9 17:18
回复

使用道具 举报

76

积分

0

威望

0

贡献

技术小白

积分
76
发表于 2022-7-9 17:01:33        只看该作者  7#
./build.sh roc-rk3308b-cc-plus-rgb-7.0inch-qt.mk
./build.sh 提示如下错误:(跟source buildroot/build/envsetup.sh选择5进行make的错误类似)
2022-07-09T16:48:51 qtquick2.cpp:(.text+0x418): undefined reference to `QQuickItemsModule::defineModule()'
2022-07-09T16:48:51 collect2: error: ld returned 1 exit status
2022-07-09T16:48:51 Makefile:868: recipe for target '../../lib/libQt5Quick.so.5.9.4' failed
2022-07-09T16:48:51 make[4]: *** [../../lib/libQt5Quick.so.5.9.4] Error 1
2022-07-09T16:48:51 Makefile:95: recipe for target 'sub-quick-make_first-ordered' failed
2022-07-09T16:48:51 make[3]: *** [sub-quick-make_first-ordered] Error 2
2022-07-09T16:48:51 Makefile:47: recipe for target 'sub-src-make_first' failed
2022-07-09T16:48:51 make[2]: *** [sub-src-make_first] Error 2
2022-07-09T16:48:51 package/pkg-generic.mk:247: recipe for target '/home/firefly/proj/buildroot/output/firefly_rk3308_qt_release/build/qt5declarative-5.9.4/.stamp_built' failed
2022-07-09T16:48:51 make[1]: *** [/home/firefly/proj/buildroot/output/firefly_rk3308_qt_release/build/qt5declarative-5.9.4/.stamp_built] Error 2
2022-07-09T16:48:51 /home/firefly/proj/buildroot/output/firefly_rk3308_qt_release/Makefile:16: recipe for target '_all' failed
2022-07-09T16:48:51 make: *** [_all] Error 2
Command exited with non-zero status 1
you take 0:12.27 to build builroot
ERROR: Running build_buildroot failed!
ERROR: exit code 1 from line 743:
    /usr/bin/time -f "you take %E to build builroot" $COMMON_DIR/mk-buildroot.sh $BOARD_CONFIG

排查发现,目录中能找到 libQt5Quick.so.5.9.4库文件的
# find ./ |grep libQt5Quick.so.5.9.4
./firefly-rk3308b-aarch64/aarch64/usr/lib/libQt5Quick.so.5.9.4
./firefly-rk3308b-aarch64/host/aarch64-rockchip-linux-gnu/sysroot/usr/lib/libQt5Quick.so.5.9.4

请问如何处理,谢谢!

点评

默认配置到哪个文件?好像没看到?  发表于 2022-7-9 20:19
不需要追加QT配置的,已经配置好了的,ssh也都有加的,我们那个wiki是说明我们加了什么东西来支持QT,已经默认加了的  发表于 2022-7-9 19:44
roc-rk3308b-cc-plus-buildroot.mk文件内容吗? 在原来的文档内容基础上增加了使能QT选项的相关增加部分内容  发表于 2022-7-9 17:47
提供下你buildroot的config,我这边看看  发表于 2022-7-9 17:23
回复

使用道具 举报

76

积分

0

威望

0

贡献

技术小白

积分
76
发表于 2022-7-9 19:49:42        只看该作者  8#
roc-rk3308b-cc-plus-buildroot.mk

#!/bin/bash
  
CMD=`realpath $BASH_SOURCE`
CUR_DIR=`dirname $CMD`

source $CUR_DIR/BoardConfig_RK3308B_firefly.mk

# Uboot defconfig
# SDK 提供两个配置,rk3308(使用kernel dtb), evb-rk3308(使用uboot dtb)
export RK_UBOOT_DEFCONFIG=firefly-rk3308-debug-uart4
# Kernel defconfig
# SDK 提供两个配置,rk3308_linux_debug_defconfig rk3308_linux_defconfig
export RK_KERNEL_DEFCONFIG=firefly-rk3308b_linux_defconfig
# Kernel dts
export RK_KERNEL_DTS=rk3308b-roc-cc-plus-amic_emmc
# parameter for GPT table
# 分区表配置,修改分区表参考文档 Rockchip-Parameter-File-Format-Version1.4.pdf
export RK_PARAMETER=parameter-64bit-emmc.txt
# packagefile for make update image
export RK_PACKAGE_FILE=rk3308-package-file
# Buildroot config
export RK_CFG_BUILDROOT=firefly_rk3308_release
# Recovery config
export RK_CFG_RECOVERY=firefly_rk3308_recovery
#使能QT相关选项
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_WIDGETS=y
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
BR2_PACKAGE_QT5CONNECTIVITY=y
BR2_PACKAGE_QT5MULTIMEDIA=y
BR2_PACKAGE_QT5QUICKCONTROLS=y
BR2_PACKAGE_QT5QUICKCONTROLS2=y
BR2_PACKAGE_QT5WAYLAND=y
BR2_PACKAGE_QT5BASE_JPEG=y
BR2_PACKAGE_QT5BASE_PNG=y
BR2_PACKAGE_QT5SVG=y
BR2_PACKAGE_QT5TOOLS=y
BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS=y
BR2_PACKAGE_DEJAVU=y
#使能GDB相关选项
BR2_PACKAGE_HOST_GDB=y
BR2_PACKAGE_HOST_GDB_PYTHON=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_GDB_SERVER=y
#使能SSH相关选项
#openssh包
BR2_PACKAGE_OPENSSH=y
#配置登录的账户密码
BR2_TARGET_ENABLE_ROOT_LOGIN=y
BR2_TARGET_GENERIC_ROOT_PASSWD="123"

roc-rk3308b-cc-plus-rgb-7.0inch-qt.mk

#!/bin/bash

CMD=`realpath $BASH_SOURCE`
CUR_DIR=`dirname $CMD`

source $CUR_DIR/BoardConfig_RK3308B_firefly.mk

# Uboot defconfig
export RK_UBOOT_DEFCONFIG=firefly-rk3308-debug-uart4-logo
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=firefly-rk3308b_linux_defconfig
# Kernel dts
export RK_KERNEL_DTS=rk3308b-roc-cc-plus-amic-rgb_7.0inch_emmc
# parameter for GPT table
export RK_PARAMETER=parameter-64bit-emmc-qt.txt
# packagefile for make update image
export RK_PACKAGE_FILE=rk3308-package-file
# Buildroot config
export RK_CFG_BUILDROOT=firefly_rk3308_qt_release
# Recovery config
export RK_CFG_RECOVERY=firefly_rk3308_recovery
#使能QT相关选项
#BR2_PACKAGE_QT5=y
#BR2_PACKAGE_QT5BASE_WIDGETS=y
#BR2_PACKAGE_QT5BASE_FONTCONFIG=y
#BR2_PACKAGE_QT5CONNECTIVITY=y
#BR2_PACKAGE_QT5MULTIMEDIA=y
#BR2_PACKAGE_QT5QUICKCONTROLS=y
#BR2_PACKAGE_QT5QUICKCONTROLS2=y
#BR2_PACKAGE_QT5WAYLAND=y
#BR2_PACKAGE_QT5BASE_JPEG=y
#BR2_PACKAGE_QT5BASE_PNG=y
#BR2_PACKAGE_QT5SVG=y
#BR2_PACKAGE_QT5TOOLS=y
#BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS=y
#BR2_PACKAGE_DEJAVU=y
#使能GDB相关选项
#BR2_PACKAGE_HOST_GDB=y
#BR2_PACKAGE_HOST_GDB_PYTHON=y
#BR2_PACKAGE_GDB=y
#BR2_PACKAGE_GDB_SERVER=y
#使能SSH相关选项
#openssh包
#BR2_PACKAGE_OPENSSH=y
#配置登录的账户密码
#BR2_TARGET_ENABLE_ROOT_LOGIN=y
#BR2_TARGET_GENERIC_ROOT_PASSWD="123"
回复

使用道具 举报

76

积分

0

威望

0

贡献

技术小白

积分
76
发表于 2022-7-9 19:56:03        只看该作者  9#
重新删除output/firefly_rk3308_qt_release
运行:
./build.sh roc-rk3308b-cc-plus-rgb-7.0inch-qt.mk
./build.sh 提示如下错误:

2022-07-09T19:45:54 ============Start building kernel modules============
2022-07-09T19:45:54 TARGET_ARCH          =arm64
2022-07-09T19:45:54 TARGET_KERNEL_CONFIG =firefly-rk3308b_linux_defconfig
2022-07-09T19:45:54 TARGET_KERNEL_CONFIG_FRAGMENT =
2022-07-09T19:45:54 ==================================================
2022-07-09T19:45:54 /home/firefly/proj/buildroot/../build.sh: line 694: cd: kernel: No such file or directory
2022-07-09T19:45:54 ERROR: Running build_modules failed!
2022-07-09T19:45:54 ERROR: exit code 1 from line 694:
2022-07-09T19:45:54 cd kernel
2022-07-09T19:45:54 package/pkg-generic.mk:247: recipe for target '/home/firefly/proj/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/.stamp_built' failed
2022-07-09T19:45:54 make[1]: *** [/home/firefly/proj/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/.stamp_built] Error 1
2022-07-09T19:45:54 /home/firefly/proj/buildroot/output/firefly_rk3308_qt_release/Makefile:16: recipe for target '_all' failed
2022-07-09T19:45:54 make: *** [_all] Error 2
Command exited with non-zero status 1
you take 0:19.86 to build builroot
ERROR: Running build_buildroot failed!
ERROR: exit code 1 from line 743:
    /usr/bin/time -f "you take %E to build builroot" $COMMON_DIR/mk-buildroot.sh $BOARD_CONFIG
回复

使用道具 举报

76

积分

0

威望

0

贡献

技术小白

积分
76
发表于 2022-7-9 22:39:55        只看该作者  10#
dlinli 发表于 2022-7-9 19:56
重新删除output/firefly_rk3308_qt_release
运行:
./build.sh roc-rk3308b-cc-plus-rgb-7.0inch-qt.mk

但是单独执行下面语句,又是成功的哦
./build.sh kernel

执行语句
./build.sh
就提示上面错误

点评

配置文件也都去掉了使能QT的那部分内容 重新删除output/firefly_rk3308_qt_release 运行: ./build.sh roc-rk3308b-cc-plus-rgb-7.0inch-qt.mk ./build.sh 然后能够编译成功了,谢谢Firefly_Javier的指导  发表于 2022-7-10 07:57
直接改 cd kernel 为 cd /home/firefly/proj/kernel 就能神奇地编译通过! /home/firefly/proj/rockdev/pack/ROC-RK3308B-CC-PLUS-RGB-7.0INCH-QT_Linux_v1.5.0a_220709.img Running build_updateimg succee   发表于 2022-7-9 23:40
回复

使用道具 举报

返回列表
12
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表