20240703在Ubuntu22.04上编译RK3588的Buildroot的时候出现问题you need to install 'unbuffer' (from package expect or expect-dev)
2024/7/3 16:10
rootroot@rootroot-virtual-machine:~/SDK$ ./build.sh lunch
5. BoardConfig-rk3588-evb7-lp4-v10.mk
Which would you like? [0]: 5
switching to board: /home/rootroot/SDK/device/rockchip/rk3588/BoardConfig-rk3588-evb7-lp4-v10.mk
rootroot@rootroot-virtual-machine:~/SDK$ ./build.sh
编译环境:已经在Ubuntu22.04下安装编译RK3588的Android12的全套工具链。
百度:AIO-3588Q WIKI
https://wiki.t-firefly.com/zh_CN/iCore-3588Q/android_prepare_compile_android.html
iCore-3588Q产品规格书
Docs ? 2. 编译环境搭建View page source
2. 编译环境搭建
sudo apt-get install git
sudo apt-get install gnupg
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install gperf
sudo apt-get install libsdl1.2-dev
sudo apt-get install libesd-java
sudo apt-get install libwxgtk3.0-dev【异常了】
sudo apt-get install squashfs-tools
sudo apt-get install build-essential
sudo apt-get install zip
sudo apt-get install curl
sudo apt-get install libncurses5-dev
sudo apt-get install zlib1g-dev
sudo apt-get install pngcrush
sudo apt-get install schedtool
sudo apt-get install libxml2
sudo apt-get install libxml2-utils
sudo apt-get install xsltproc
sudo apt-get install lzop
sudo apt-get install libc6-dev
sudo apt-get install schedtool
sudo apt-get install g++-multilib
sudo apt-get install lib32z1-dev
sudo apt-get install lib32ncurses5-dev
sudo apt-get install lib32readline-dev
sudo apt-get install gcc-multilib
sudo apt-get install libswitch-perl
sudo apt-get install libssl-dev
sudo apt-get install unzip
sudo apt-get install zip
sudo apt-get install device-tree-compiler
sudo apt-get install liblz4-tool
sudo apt-get install python-pyelftools【异常了】
sudo apt-get install python3-pyelftools
首先在虚拟机VMware17.5中安装Ubuntu22.04完成之后,限制性的操作:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssh-server
sudo apt-get install nethogs
sudo apt-get install net-tools
rootroot@rootroot-virtual-machine:~$ sudo apt install python2
rootroot@rootroot-virtual-machine:/usr/bin$ sudo ln -s python2 python
rootroot@rootroot-virtual-machine:~$ sudo apt install samba
rootroot@rootroot-virtual-machine:~$ sudo smbpasswd -a rootroot
rootroot@rootroot-virtual-machine:~/SDK$
rootroot@rootroot-virtual-machine:~/SDK$ ./build.sh lunch
processing option: lunch
You're building on Linux
Lunch menu...pick a combo:
0. default BoardConfig.mk
1. BoardConfig-ab-base.mk
2. BoardConfig-nvr.mk
3. BoardConfig-rk3588-evb1-lp4-v10.mk
4. BoardConfig-rk3588-evb3-lp5-v10.mk
5. BoardConfig-rk3588-evb7-lp4-v10.mk
6. BoardConfig-rk3588s-evb1-lp4x-v10.mk
7. BoardConfig-security-base.mk
8. BoardConfig.mk
Which would you like? [0]: 5
switching to board: /home/rootroot/SDK/device/rockchip/rk3588/BoardConfig-rk3588-evb7-lp4-v10.mk
rootroot@rootroot-virtual-machine:~/SDK$
rootroot@rootroot-virtual-machine:~/SDK$
rootroot@rootroot-virtual-machine:~/SDK$ ./build.sh
Image 2 (resource)
Description: unavailable
Created: Tue Jul 2 15:13:53 2024
Type: Multi-File Image
Compression: uncompressed
Data Size: 202752 Bytes = 198.00 KiB = 0.19 MiB
Hash algo: sha256
Hash value: b9a7d384729eb496fc8907acaa478320643c52aa031bf40f25d94eddeb239c71
Default Configuration: 'conf'
Configuration 0 (conf)
Description: unavailable
Kernel: kernel
FDT: fdt
Not Found io-domains in /home/rootroot/SDK/kernel/arch/arm64/boot/dts/rockchip/rk3588-evb7-lp4-v10-linux.dts
Running build_kernel succeeded.
Skipping build_toolchain for missing configs: RK_CFG_TOOLCHAIN.
==========Start building buildroot==========
TARGET_BUILDROOT_CONFIG=rockchip_rk3588
=========================================
Top of tree: /home/rootroot/SDK
===========================================
#TARGET_BOARD=rk3588
#OUTPUT_DIR=output/rockchip_rk3588
#CONFIG=rockchip_rk3588_defconfig
===========================================
make: Entering directory '/home/rootroot/SDK/buildroot'
mkdir -p /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
obj=/home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config -C support/kconfig -f Makefile.br conf
/usr/bin/gcc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config -DCONFIG_=\"\" -MM *.c > /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/.depend 2>/dev/null || :
/usr/bin/gcc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config -DCONFIG_=\"\" -c conf.c -o /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/conf.o
/usr/bin/gcc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config -DCONFIG_=\"\" -I. -c /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/zconf.tab.c -o /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/zconf.tab.o
/usr/bin/gcc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config -DCONFIG_=\"\" /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/conf.o /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/zconf.tab.o -o /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/conf
rm /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/zconf.tab.c
GEN /home/rootroot/SDK/buildroot/output/rockchip_rk3588/Makefile
/home/rootroot/SDK/buildroot/build/defconfig_hook.py -m /home/rootroot/SDK/buildroot/configs/rockchip_rk3588_defconfig /home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig
BR2_DEFCONFIG='' KCONFIG_AUTOCONFIG=/home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/tristate.config BR2_CONFIG=/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.config HOST_GCC_VERSION="9" BASE_DIR=/home/rootroot/SDK/buildroot/output/rockchip_rk3588 SKIP_LEGACY= BR2_DEFCONFIG=/home/rootroot/SDK/buildroot/configs/rockchip_rk3588_defconfig /home/rootroot/SDK/buildroot/output/rockchip_rk3588/build/buildroot-config/conf --defconfig=/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig Config.in
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:203:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_MPP
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:204:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_MPP_ALLOCATOR_DRM
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:206:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_RGA
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:231:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTP
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:232:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTPMANAGER
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:233:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:239:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEORATE
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:240:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VORBIS
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:241:warning: override: reassigning to symbol BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OGG
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:282:warning: override: reassigning to symbol BR2_PACKAGE_RKWIFIBT
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:297:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_MALI
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:298:warning: override: reassigning to symbol BR2_PACKAGE_WAYLAND
/home/rootroot/SDK/buildroot/output/rockchip_rk3588/.rockchipconfig:310:warning: override: reassigning to symbol BR2_PACKAGE_ROCKCHIP_TEST
#
# configuration written to /home/rootroot/SDK/buildroot/output/rockchip_rk3588/.config
#
make: Leaving directory '/home/rootroot/SDK/buildroot'
you need to install 'unbuffer' (from package expect or expect-dev)
log saved on /home/rootroot/SDK/br.log
tail: cannot open '/home/rootroot/SDK/br.log' for reading: No such file or directory
Command exited with non-zero status 1
you take 0:04.71 to build builroot
ERROR: Running build_buildroot failed!
ERROR: exit code 1 from line 715:
/usr/bin/time -f "you take %E to build builroot" $COMMON_DIR/mk-buildroot.sh $BOARD_CONFIG
rootroot@rootroot-virtual-machine:~/SDK$
rootroot@rootroot-virtual-machine:~/SDK$
rootroot@rootroot-virtual-machine:~/SDK$ sudo apt install expect
[sudo] password for rootroot:
Sorry, try again.
[sudo] password for rootroot:
Sorry, try again.
[sudo] password for rootroot:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libwpe-1.0-1 libwpebackend-fdo-1.0-1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
tcl-expect
Suggested packages:
tk8.6
The following NEW packages will be installed:
expect tcl-expect
0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
Need to get 242 kB of archives.
After this operation, 549 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 tcl-expect amd64 5.45.4-2build1 [105 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 expect amd64 5.45.4-2build1 [137 kB]
Fetched 242 kB in 24s (10.0 kB/s)
Selecting previously unselected package tcl-expect:amd64.
(Reading database ... 179468 files and directories currently installed.)
Preparing to unpack .../tcl-expect_5.45.4-2build1_amd64.deb ...
Unpacking tcl-expect:amd64 (5.45.4-2build1) ...
Selecting previously unselected package expect.
Preparing to unpack .../expect_5.45.4-2build1_amd64.deb ...
Unpacking expect (5.45.4-2build1) ...
Setting up tcl-expect:amd64 (5.45.4-2build1) ...
Setting up expect (5.45.4-2build1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
rootroot@rootroot-virtual-machine:~/SDK$
rootroot@rootroot-virtual-machine:~/SDK$
rootroot@rootroot-virtual-machine:~/SDK$
rootroot@rootroot-virtual-machine:~/SDK$ ./build.sh
参考资料:
you need to install 'unbuffer' (from package expect or expect-dev)
https://blog.youkuaiyun.com/it_rensheng/article/details/108441786
you need to install ‘unbuffer‘ (from package expect or expect-dev)
http://www.360doc.com/content/21/1124/16/17302338_1005707985.shtml
解决RV1126-1109、RK3399 编译出错:you need to install 'unbuffer' (from package expect or expect-dev)