20221218解决在Ubuntu18.04下编译Firefly的Core-3588J出现lz4的问题
Posted 南棱笑笑生
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了20221218解决在Ubuntu18.04下编译Firefly的Core-3588J出现lz4的问题相关的知识,希望对你有一定的参考价值。
20221218解决在Ubuntu18.04下编译Firefly的Core-3588J出现lz4的问题
2022/12/18 15:37
解决方法:编译最新的lz4的dev分支!
https://wiki.t-firefly.com/zh_CN/Core-3588J/android_compile_android12.0_firmware.html
Core-3588J产品规格书
3. 编译 Android12.0 固件
同样的操作方法,Ubuntu22.04下编译Android12完全正常,但是Ubuntu22.04下编译Buildroot异常!
看Firefly是推荐Ubuntu18.04下编译,于是切换回来了!
编译指令:
3.2. Core-3588J 产品编译方法
3.2.1. 整体编译
3.2.1.1. HDMI 固件编译
./FFTools/make.sh -d rk3588-firefly-itx-3588j -j8 -l rk3588_firefly_itx_3588j-userdebug
./FFTools/mkupdate/mkupdate.sh -l rk3588_firefly_itx_3588j-userdebug
于是分步骤编译,确认时编译内核的时候出错的!
3.2.2. 分步编译
编译 uboot:
cd ~/proj/RK3588_Android12.0/u-boot/
./make.sh rk3588
编译 kernel:
cd ~/proj/RK3588_Android12.0/kernel-5.10
export PATH=../prebuilts/clang/host/linux-x86/clang-r416183b/bin:$PATH
alias msk='make CROSS_COMPILE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1'
msk ARCH=arm64 firefly_defconfig android-11.config pcie_wifi.config
msk ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3588_firefly_itx_3588j/boot.img rk3588-firefly-itx-3588j.img -j8
AS .tmp_vmlinux.kallsyms2.S
LD vmlinux
SORTTAB vmlinux
SYSMAP System.map
OBJCOPY arch/arm64/boot/Image
MODPOST modules-only.symvers
GEN Module.symvers
CC [M] drivers/media/usb/gspca/gspca_main.mod.o
CC [M] drivers/net/ethernet/realtek/r8168/r8168.mod.o
CC [M] drivers/net/phy/realtek.mod.o
CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmdhd.mod.o
LZ4C arch/arm64/boot/Image.lz4
Incorrect parameters
Usage :
lz4 [arg] [input] [output]
input : a filename
with no FILE, or when FILE is - or stdin, read standard input
Arguments :
-1 : Fast compression (default)
-9 : High compression
-d : decompression (default for .lz4 extension)
-z : force compression
-f : overwrite output without prompting
-h/-H : display help/long help and exit
arch/arm64/boot/Makefile:31: recipe for target 'arch/arm64/boot/Image.lz4' failed
make[2]: *** [arch/arm64/boot/Image.lz4] Error 1
make[2]: *** Deleting file 'arch/arm64/boot/Image.lz4'
arch/arm64/Makefile:170: recipe for target 'Image.lz4' failed
make[1]: *** [Image.lz4] Error 2
make[1]: *** Waiting for unfinished jobs....
LD [M] drivers/media/usb/gspca/gspca_main.ko
LD [M] drivers/net/ethernet/realtek/r8168/r8168.ko
LD [M] drivers/net/phy/realtek.ko
LD [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmdhd.ko
arch/arm64/Makefile:214: recipe for target 'rk3588-firefly-itx-3588j.img' failed
make: *** [rk3588-firefly-itx-3588j.img] Error 2
rootroot@rootroot-MS-7885:~/proj/RK3588_Android12.0$ ll
分步骤编译,确认出错的地方:
rootroot@rootroot-MS-7885:~/proj/RK3588_Android12.0/kernel-5.10$
rootroot@rootroot-MS-7885:~/proj/RK3588_Android12.0/kernel-5.10$ msk ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3588_firefly_itx_3588j/boot.img rk3588-firefly-itx-3588j.img -j8
SYNC include/config/auto.conf.cmd
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/kheaders_data.tar.xz
LZ4C arch/arm64/boot/Image.lz4
Incorrect parameters
Usage :
lz4 [arg] [input] [output]
input : a filename
with no FILE, or when FILE is - or stdin, read standard input
Arguments :
-1 : Fast compression (default)
-9 : High compression
-d : decompression (default for .lz4 extension)
-z : force compression
-f : overwrite output without prompting
-h/-H : display help/long help and exit
arch/arm64/boot/Makefile:31: recipe for target 'arch/arm64/boot/Image.lz4' failed
make[2]: *** [arch/arm64/boot/Image.lz4] Error 1
make[2]: *** Deleting file 'arch/arm64/boot/Image.lz4'
arch/arm64/Makefile:170: recipe for target 'Image.lz4' failed
make[1]: *** [Image.lz4] Error 2
make[1]: *** Waiting for unfinished jobs....
arch/arm64/Makefile:214: recipe for target 'rk3588-firefly-itx-3588j.img' failed
make: *** [rk3588-firefly-itx-3588j.img] Error 2
rootroot@rootroot-MS-7885:~/proj/RK3588_Android12.0/kernel-5.10$
rootroot@rootroot-MS-7885:~/proj/RK3588_Android12.0/kernel-5.10$
rootroot@rootroot-MS-7885:~/proj/RK3588_Android12.0/kernel-5.10$ msk ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3588_firefly_itx_3588j/boot.img rk3588-firefly-itx-3588j.img -j8
CALL scripts/atomic/check-atomics.sh
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/kheaders_data.tar.xz
LZ4C arch/arm64/boot/Image.lz4
Image: resource.img (with rk3588-firefly-itx-3588j.dtb logo.bmp logo_kernel.bmp) is ready
Image: boot.img (with Image resource.img) is ready
Image: zboot.img (with Image.lz4 resource.img) is ready
rootroot@rootroot-MS-7885:~/proj/RK3588_Android12.0/kernel-5.10$
百度搜索:arch/arm64/boot/Makefile:31: recipe for target 'arch/arm64/boot/Image.lz4' failed
https://developer.huawei.com/consumer/cn/forum/topic/0203856559232120103
云司机
编译新问题 arch/arm64/Makefile:206: recipe for target 'rk3568-toybrick-x0-linux.img' failed
开发板套件
OpenHarmony
HarmonyOS开发板
开发板
发表于 2022-04-18 09:18427查看
[OHOS ERROR] arch/arm64/Makefile:206: recipe for target 'rk3568-toybrick-x0-linux.img' failed
[OHOS ERROR] make: *** [rk3568-toybrick-x0-linux.img] Error 2
[OHOS INFO] ---------------------------------------------
[OHOS INFO] ccache summary:
是路径没设置好吗?
本帖最后由 社区小助手 于 2022-04-18 09:40 编辑
鸿联
遇到同样问题,是在ubuntu18下,安装下面两个工具,报错消除
sudo apt-get install liblz4-tool
sudo apt-get install genext2fs
升级到ubuntu20.04后编译,没有这个报错了
https://blog.csdn.net/qq_38664089/article/details/125870510
RK3588编译问题集
蓝色卡布达
于 2022-07-19 13:53:30 发布
本文档内容主要记录了在编译RK3588工程时所遇到的一些问题,相关的问题可能也会发生在其他的工程编译里面,该文档的解决方法仅供参考
1、编译kernel出现 arch/arm64/boot/Makefile:31: recipe for target ‘arch/arm64/boot/Image.lz4’ failed 报错
原因:lz4不存在或者版本过低。
解决办法1:系编译环境缺少lz4组件导致,执行如下命令安装
sudo apt-get update
apt-get install liblz4-tool
若update执行失败,可参考如下链接,替换镜像源
http://3ms.huawei.com/km/blogs/details/11561033
但大概率即使把源更新了,编译依然会报错,原因是因为官方的软件源为了稳定不会提供版本很新的代码,所以你通过apt-get install去下载安装的代码不是现在最新的版本。但有些编译又指定要很新的版本,这就产生了矛盾。所以可以通过去github上拉取最新版本的代码安装。如下,安装包见附件。
解决办法2:下载最新lz4源码,安装
$ git clone https://github.com/lz4/lz4.git
$ make
$ sudo make install
<<lz4-dev.zip>>
本项目,法1不能解决该问题,推荐法2。
看博文是lz4的版本问题!
rootroot@rootroot-MS-7885:~$
rootroot@rootroot-MS-7885:~$ lz4 -version
Incorrect parameters
Usage :
lz4 [arg] [input] [output]
input : a filename
with no FILE, or when FILE is - or stdin, read standard input
Arguments :
-1 : Fast compression (default)
-9 : High compression
-d : decompression (default for .lz4 extension)
-z : force compression
-f : overwrite output without prompting
-h/-H : display help/long help and exit
rootroot@rootroot-MS-7885:~$
rootroot@rootroot-MS-7885:~$
rootroot@rootroot-MS-7885:~$ lz4 --version
*** LZ4 command line interface 64-bits r128, by Yann Collet (May 20 2021) ***
rootroot@rootroot-MS-7885:~$
由于新安装的WIN10系统,上github异常:https://github.com/lz4/lz4.git
来不及配置HOSTS了,直接使用备用的镜像链接了,直接下载dev分支:
https://gitcode.net/mirrors/lz4/lz4?utm_source=csdn_github_accelerator
mirrors / lz4 / lz4
rootroot@rootroot-MS-7885:~/lz4$ unzip lz4-dev.zip
Archive: lz4-dev.zip
299daf03acd9b8084ca3fc53403e1fd4c3cbeacd
creating: lz4-dev/
creating: lz4-dev/.circleci/
inflating: lz4-dev/.circleci/config.yml
creating: lz4-dev/.circleci/images/
creating: lz4-dev/.circleci/images/primary/
inflating: lz4-dev/.circleci/images/primary/Dockerfile
inflating: lz4-dev/.cirrus.yml
inflating: lz4-dev/.gitattributes
creating: lz4-dev/.github/
creating: lz4-dev/.github/ISSUE_TEMPLATE/
inflating: lz4-dev/.github/ISSUE_TEMPLATE/bug_report.md
inflating: lz4-dev/.github/ISSUE_TEMPLATE/feature_request.md
inflating: lz4-dev/.github/dependabot.yaml
creating: lz4-dev/.github/workflows/
inflating: lz4-dev/.github/workflows/README.md
inflating: lz4-dev/.github/workflows/ci.yml
inflating: lz4-dev/.gitignore
inflating: lz4-dev/.travis.yml
inflating: lz4-dev/INSTALL
inflating: lz4-dev/LICENSE
inflating: lz4-dev/Makefile
inflating: lz4-dev/Makefile.inc
inflating: lz4-dev/NEWS
inflating: lz4-dev/README.md
inflating: lz4-dev/appveyor.yml
creating: lz4-dev/build/
inflating: lz4-dev/build/.gitignore
inflating: lz4-dev/build/README.md
creating: lz4-dev/build/VS2010/
creating: lz4-dev/build/VS2010/datagen/
inflating: lz4-dev/build/VS2010/datagen/datagen.vcxproj
creating: lz4-dev/build/VS2010/frametest/
inflating: lz4-dev/build/VS2010/frametest/frametest.vcxproj
creating: lz4-dev/build/VS2010/fullbench-dll/
inflating: lz4-dev/build/VS2010/fullbench-dll/fullbench-dll.vcxproj
creating: lz4-dev/build/VS2010/fullbench/
inflating: lz4-dev/build/VS2010/fullbench/fullbench.vcxproj
creating: lz4-dev/build/VS2010/fuzzer/
inflating: lz4-dev/build/VS2010/fuzzer/fuzzer.vcxproj
creating: lz4-dev/build/VS2010/liblz4-dll/
inflating: lz4-dev/build/VS2010/liblz4-dll/liblz4-dll.rc
inflating: lz4-dev/build/VS2010/liblz4-dll/liblz4-dll.vcxproj
creating: lz4-dev/build/VS2010/liblz4/
inflating: lz4-dev/build/VS2010/liblz4/liblz4.vcxproj
inflating: lz4-dev/build/VS2010/lz4.sln
creating: lz4-dev/build/VS2010/lz4/
inflating: lz4-dev/build/VS2010/lz4/lz4.rc
inflating: lz4-dev/build/VS2010/lz4/lz4.vcxproj
creating: lz4-dev/build/VS2017/
creating: lz4-dev/build/VS2017/datagen/
inflating: lz4-dev/build/VS2017/datagen/datagen.vcxproj
creating: lz4-dev/build/VS2017/frametest/
inflating: lz4-dev/build/VS2017/frametest/frametest.vcxproj
creating: lz4-dev/build/VS2017/fullbench-dll/
inflating: lz4-dev/build/VS2017/fullbench-dll/fullbench-dll.vcxproj
creating: lz4-dev/build/VS2017/fullbench/
inflating: lz4-dev/build/VS2017/fullbench/fullbench.vcxproj
creating: lz4-dev/build/VS2017/fuzzer/
inflating: lz4-dev/build/VS2017/fuzzer/fuzzer.vcxproj
creating: lz4-dev/build/VS2017/liblz4-dll/
inflating: lz4-dev/build/VS2017/liblz4-dll/liblz4-dll.rc
inflating: lz4-dev/build/VS2017/liblz4-dll/liblz4-dll.vcxproj
creating: lz4-dev/build/VS2017/liblz4/
inflating: lz4-dev/build/VS2017/liblz4/liblz4.vcxproj
inflating: lz4-dev/build/VS2017/lz4.sln
creating: lz4-dev/build/VS2017/lz4/
inflating: lz4-dev/build/VS2017/lz4/lz4.rc
inflating: lz4-dev/build/VS2017/lz4/lz4.vcxproj
creating: lz4-dev/build/VS2022/
creating: lz4-dev/build/VS2022/datagen/
inflating: lz4-dev/build/VS2022/datagen/datagen.vcxproj
creating: lz4-dev/build/VS2022/frametest/
inflating: lz4-dev/build/VS2022/frametest/frametest.vcxproj
creating: lz4-dev/build/VS2022/fullbench-dll/
inflating: lz4-dev/build/VS2022/fullbench-dll/fullbench-dll.vcxproj
creating: lz4-dev/build/VS2022/fullbench/
inflating: lz4-dev/build/VS2022/fullbench/fullbench.vcxproj
creating: lz4-dev/build/VS2022/fuzzer/
inflating: lz4-dev/build/VS2022/fuzzer/fuzzer.vcxproj
creating: lz4-dev/build/VS2022/liblz4-dll/
inflating: lz4-dev/build/VS2022/liblz4-dll/liblz4-dll.rc
inflating: lz4-dev/build/VS2022/liblz4-dll/liblz4-dll.vcxproj
creating: lz4-dev/build/VS2022/liblz4/
inflating: lz4-dev/build/VS2022/liblz4/liblz4.vcxproj
inflating: lz4-dev/build/VS2022/lz4.sln
creating: lz4-dev/build/cmake/
inflating: lz4-dev/build/cmake/.gitignore
inflating: lz4-dev/build/cmake/CMakeLists.txt
extracting: lz4-dev/build/cmake/lz4Config.cmake.in
creating: lz4-dev/contrib/
creating: lz4-dev/contrib/debian/
inflating: lz4-dev/contrib/debian/changelog
extracting: lz4-dev/contrib/debian/compat
inflating: lz4-dev/contrib/debian/control
inflating: lz4-dev/contrib/debian/copyright
extracting: lz4-dev/contrib/debian/dirs
extracting: lz4-dev/contrib/debian/docs
inflating: lz4-dev/contrib/debian/liblz4-dev.install
inflating: lz4-dev/contrib/debian/liblz4.install
inflating: lz4-dev/contrib/debian/rules
creating: lz4-dev/contrib/djgpp/
inflating: lz4-dev/contrib/djgpp/LICENSE
inflating: lz4-dev/contrib/djgpp/Makefile
inflating: lz4-dev/contrib/djgpp/README.MD
creating: lz4-dev/contrib/gen_manual/
extracting: lz4-dev/contrib/gen_manual/.gitignore
inflating: lz4-dev/contrib/gen_manual/Makefile
inflating: lz4-dev/contrib/gen_manual/README.md
inflating: lz4-dev/contrib/gen_manual/gen-lz4-manual.sh
inflating: lz4-dev/contrib/gen_manual/gen_manual.cpp
creating: lz4-dev/contrib/meson/
inflating: lz4-dev/contrib/meson/GetLz4LibraryVersion.py
inflating: lz4-dev/contrib/meson/README.md
inflating: lz4-dev/contrib/meson/meson.build
creating: lz4-dev/contrib/meson/meson/
creating: lz4-dev/contrib/meson/meson/contrib/
creating: lz4-dev/contrib/meson/meson/contrib/gen_manual/
inflating: lz4-dev/contrib/meson/meson/contrib/gen_manual/meson.build
inflating: lz4-dev/contrib/meson/meson/contrib/meson.build
creating: lz4-dev/contrib/meson/meson/examples/
inflating: lz4-dev/contrib/meson/meson/examples/meson.build
creating: lz4-dev/contrib/meson/meson/lib/
inflating: lz4-dev/contrib/meson/meson/lib/meson.build
inflating: lz4-dev/contrib/meson/meson/meson.build
creating: lz4-dev/contrib/meson/meson/ossfuzz/
inflating: lz4-dev/contrib/meson/meson/ossfuzz/meson.build
creating: lz4-dev/contrib/meson/meson/programs/
inflating: lz4-dev/contrib/meson/meson/programs/meson.build
creating: lz4-dev/contrib/meson/meson/tests/
inflating: lz4-dev/contrib/meson/meson/tests/meson.build
inflating: lz4-dev/contrib/meson/meson_options.txt
creating: lz4-dev/contrib/snap/
inflating: lz4-dev/contrib/snap/README.md
inflating: lz4-dev/contrib/snap/snapcraft.yaml
creating: lz4-dev/doc/
inflating: lz4-dev/doc/lz4_Block_format.md
inflating: lz4-dev/doc/lz4_Frame_format.md
inflating: lz4-dev/doc/lz4_manual.html
inflating: lz4-dev/doc/lz4frame_manual.html
creating: lz4-dev/examples/
inflating: lz4-dev/examples/.gitignore
inflating: lz4-dev/examples/COPYING
inflating: lz4-dev/examples/HCStreaming_ringBuffer.c
inflating: lz4-dev/examples/Makefile
inflating: lz4-dev/examples/README.md
inflating: lz4-dev/examples/blockStreaming_doubleBuffer.c
inflating: lz4-dev/examples/blockStreaming_doubleBuffer.md
inflating: lz4-dev/examples/blockStreaming_lineByLine.c
inflating: lz4-dev/examples/blockStreaming_lineByLine.md
inflating: lz4-dev/examples/blockStreaming_ringBuffer.c
inflating: lz4-dev/examples/compress_functions.c
inflating: lz4-dev/examples/dictionaryRandomAccess.c
inflating: lz4-dev/examples/dictionaryRandomAccess.md
inflating: lz4-dev/examples/fileCompress.c
inflating: lz4-dev/examples/frameCompress.c
inflating: lz4-dev/examples/printVersion.c
inflating: lz4-dev/examples/simple_buffer.c
inflating: lz4-dev/examples/streaming_api_basics.md
creating: lz4-dev/lib/
extracting: lz4-dev/lib/.gitignore
inflating: lz4-dev/lib/LICENSE
inflating: lz4-dev/lib/Makefile
inflating: lz4-dev/lib/README.md
creating: lz4-dev/lib/dll/
creating: lz4-dev/lib/dll/example/
inflating: lz4-dev/lib/dll/example/Makefile
inflating: lz4-dev/lib/dll/example/README.md
inflating: lz4-dev/lib/dll/example/fullbench-dll.sln
inflating: lz4-dev/lib/dll/example/fullbench-dll.vcxproj
inflating: lz4-dev/lib/liblz4-dll.rc.in
inflating: lz4-dev/lib/liblz4.pc.in
inflating: lz4-dev/lib/lz4.c
inflating: lz4-dev/lib/lz4.h
inflating: lz4-dev/lib/lz4file.c
inflating: lz4-dev/lib/lz4file.h
inflating: lz4-dev/lib/lz4frame.c
inflating: lz4-dev/lib/lz4frame.h
inflating: lz4-dev/lib/lz4frame_static.h
inflating: lz4-dev/lib/lz4hc.c
inflating: lz4-dev/lib/lz4hc.h
inflating: lz4-dev/lib/xxhash.c
inflating: lz4-dev/lib/xxhash.h
creating: lz4-dev/ossfuzz/
inflating: lz4-dev/ossfuzz/.gitignore
inflating: lz4-dev/ossfuzz/Makefile
inflating: lz4-dev/ossfuzz/compress_frame_fuzzer.c
inflating: lz4-dev/ossfuzz/compress_fuzzer.c
inflating: lz4-dev/ossfuzz/compress_hc_fuzzer.c
inflating: lz4-dev/ossfuzz/decompress_frame_fuzzer.c
inflating: lz4-dev/ossfuzz/decompress_fuzzer.c
inflating: lz4-dev/ossfuzz/fuzz.h
inflating: lz4-dev/ossfuzz/fuzz_data_producer.c
inflating: lz4-dev/ossfuzz/fuzz_data_producer.h
inflating: lz4-dev/ossfuzz/fuzz_helpers.h
inflating: lz4-dev/ossfuzz/lz4_helpers.c
inflating: lz4-dev/ossfuzz/lz4_helpers.h
inflating: lz4-dev/ossfuzz/ossfuzz.sh
inflating: lz4-dev/ossfuzz/round_trip_frame_fuzzer.c
inflating: lz4-dev/ossfuzz/round_trip_frame_uncompressed_fuzzer.c
inflating: lz4-dev/ossfuzz/round_trip_fuzzer.c
inflating: lz4-dev/ossfuzz/round_trip_hc_fuzzer.c
inflating: lz4-dev/ossfuzz/round_trip_stream_fuzzer.c
inflating: lz4-dev/ossfuzz/standaloneengine.c
inflating: lz4-dev/ossfuzz/travisoss.sh
creating: lz4-dev/programs/
inflating: lz4-dev/programs/.gitignore
inflating: lz4-dev/programs/COPYING
inflating: lz4-dev/programs/Makefile
inflating: lz4-dev/programs/README.md
inflating: lz4-dev/programs/bench.c
inflating: lz4-dev/programs/bench.h
inflating: lz4-dev/programs/datagen.c
inflating: lz4-dev/programs/datagen.h
inflating: lz4-dev/programs/lz4-exe.rc.in
inflating: lz4-dev/programs/lz4.1
inflating: lz4-dev/programs/lz4.1.md
inflating: lz4-dev/programs/lz4cli.c
inflating: lz4-dev/programs/lz4io.c
inflating: lz4-dev/programs/lz4io.h
inflating: lz4-dev/programs/platform.h
inflating: lz4-dev/programs/util.h
creating: lz4-dev/tests/
inflating: lz4-dev/tests/.gitignore
inflating: lz4-dev/tests/COPYING
inflating: lz4-dev/tests/Makefile
inflating: lz4-dev/tests/README.md
inflating: lz4-dev/tests/abiTest.c
inflating: lz4-dev/tests/checkFrame.c
inflating: lz4-dev/tests/checkTag.c
inflating: lz4-dev/tests/check_liblz4_version.sh
inflating: lz4-dev/tests/datagencli.c
inflating: lz4-dev/tests/decompress-partial-usingDict.c
inflating: lz4-dev/tests/decompress-partial.c
inflating: lz4-dev/tests/frametest.c
inflating: lz4-dev/tests/freestanding.c
inflating: lz4-dev/tests/fullbench.c
inflating: lz4-dev/tests/fuzzer.c
creating: lz4-dev/tests/goldenSamples/
inflating: lz4-dev/tests/goldenSamples/skip.bin
inflating: lz4-dev/tests/roundTripTest.c
inflating: lz4-dev/tests/test-lz4-abi.py
inflating: lz4-dev/tests/test-lz4-basic.sh
inflating: lz4-dev/tests/test-lz4-contentSize.sh
inflating: lz4-dev/tests/test-lz4-dict.sh
inflating: lz4-dev/tests/test-lz4-fast-hugefile.sh
inflating: lz4-dev/tests/test-lz4-frame-concatenation.sh
inflating: lz4-dev/tests/test-lz4-list.py
inflating: lz4-dev/tests/test-lz4-multiple-legacy.sh
inflating: lz4-dev/tests/test-lz4-multiple.sh
inflating: lz4-dev/tests/test-lz4-opt-parser.sh
inflating: lz4-dev/tests/test-lz4-skippable.sh
inflating: lz4-dev/tests/test-lz4-sparse.sh
inflating: lz4-dev/tests/test-lz4-speed.py
inflating: lz4-dev/tests/test-lz4-testmode.sh
inflating: lz4-dev/tests/test-lz4-versions.py
inflating: lz4-dev/tests/test-lz4hc-hugefile.sh
inflating: lz4-dev/tests/test_custom_block_sizes.sh
inflating: lz4-dev/tests/test_install.sh
inflating: lz4-dev/tests/unicode_lint.sh
rootroot@rootroot-MS-7885:~/lz4$ ll
total 472
drwxrwxr-x 3 rootroot rootroot 4096 12月 18 13:02 ./
drwxr-xr-x 24 rootroot rootroot 4096 12月 18 12:59 ../
drwxrwxr-x 12 rootroot rootroot 4096 12月 5 11:57 lz4-dev/
-rwx------ 1 rootroot rootroot 469710 12月 18 13:01 lz4-dev.zip*
rootroot@rootroot-MS-7885:~/lz4$ cd lz4-dev/
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$ ll
total 124
drwxrwxr-x 12 rootroot rootroot 4096 12月 5 11:57 ./
drwxrwxr-x 3 rootroot rootroot 4096 12月 18 13:02 ../
-rw-rw-r-- 1 rootroot rootroot 6098 12月 5 11:57 appveyor.yml
drwxrwxr-x 6 rootroot rootroot 4096 12月 5 11:57 build/
drwxrwxr-x 3 rootroot rootroot 4096 12月 5 11:57 .circleci/
-rw-rw-r-- 1 rootroot rootroot 99 12月 5 11:57 .cirrus.yml
drwxrwxr-x 7 rootroot rootroot 4096 12月 5 11:57 contrib/
drwxrwxr-x 2 rootroot rootroot 4096 12月 5 11:57 doc/
drwxrwxr-x 2 rootroot rootroot 4096 12月 5 11:57 examples/
-rw-rw-r-- 1 rootroot rootroot 348 12月 5 11:57 .gitattributes
drwxrwxr-x 4 rootroot rootroot 4096 12月 5 11:57 .github/
-rw-rw-r-- 1 rootroot rootroot 353 12月 5 11:57 .gitignore
-rw-rw-r-- 1 rootroot rootroot 630 12月 5 11:57 INSTALL
drwxrwxr-x 3 rootroot rootroot 4096 12月 5 11:57 lib/
-rw-rw-r-- 1 rootroot rootroot 635 12月 5 11:57 LICENSE
-rw-rw-r-- 1 rootroot rootroot 9319 12月 5 11:57 Makefile
-rw-rw-r-- 1 rootroot rootroot 3304 12月 5 11:57 Makefile.inc
-rw-rw-r-- 1 rootroot rootroot 17331 12月 5 11:57 NEWS
drwxrwxr-x 2 rootroot rootroot 4096 12月 5 11:57 ossfuzz/
drwxrwxr-x 2 rootroot rootroot 4096 12月 5 11:57 programs/
-rw-rw-r-- 1 rootroot rootroot 5154 12月 5 11:57 README.md
drwxrwxr-x 3 rootroot rootroot 4096 12月 5 11:57 tests/
-rw-rw-r-- 1 rootroot rootroot 814 12月 5 11:57 .travis.yml
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$ git clone https://github.com/lz4/lz4.git
Cloning into 'lz4'...
^C
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$ make
compiling static library
compiling dynamic library 1.9.4
creating versioned links
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$ sudo make install
[sudo] password for rootroot:
creating pkgconfig
Installing libraries in /usr/local/lib
Installing headers in /usr/local/include
lz4 libraries installed
Installing binaries in /usr/local/bin
Installing man pages in /usr/local/share/man/man1
lz4 installation completed
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$ lz4
refusing to read from a console
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$ lz4 --version
*** LZ4 command line interface 64-bits v1.9.4, by Yann Collet ***
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$ lz4
refusing to read from a console
rootroot@rootroot-MS-7885:~/lz4/lz4-dev$
安卓webrtc在ubuntu 2004下编译使用
文章目录
- 安卓webrtc在ubuntu 2004下编译使用
- 相关网址链接
- Http 全局代理配置
- android webrtc 编译
- boto 代理配置
- Unable to reach the snap store 问题解决
- ERROR: The installation of the Chrome OS default fonts failed.
- WebRTC里用的c++库是libc++,而目前Android中使用的c++库是libstdc++
- Exception: Missing licenses for following third_party targets: openh264, ffmpeg
- 相关命令说明
- 编译静态库 libwebrtc.a 和 libwebrtc.jar
- 编译 libwebrtc.aar
- webrtc release 分支相关信息
安卓webrtc在ubuntu 2004下编译使用
相关资料太多、分散了,本文来学习过程中笔记,添加一些摘要和索引
本文首发地址 https://blog.csdn.net/CSqingchen/article/details/120016697
最新更新地址 https://gitee.com/chenjim/chenjimblog
相关网址链接
WebRTC Android development
https://webrtc.googlesource.com/src/+/refs/heads/main/docs/native-code/android/index.md
google webrtc source code
https://github.com/chenjim/webrtc-mirror 已同步到4610
https://github.com/haiyangwu/webrtc-mirror
https://webrtc.googlesource.com/src/
Http 全局代理配置
# 修改shell配置文件 `~/.bashrc` `~/.zshrc`等
export http_proxy="http://127.0.0.1:7890"
export https_proxy=$http_proxy
以上地址需要替换为自己的地址
如果不能访问Google,很多相关的文件无法正常下载,也就没有后文的正常编译使用
android webrtc 编译
官方文档 https://webrtc.github.io/webrtc-org/native-code/development/
安卓相关的编译只能在Linux,推荐ubuntu,也不支持Windows的Linux子系统(WSL),本文采用的是Ubuntu 2004
-
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
-
在
~/.bashrc
添加目录depot_tools
到环境变量,后续会用其中的命令
export PATH=$PATH:你的路径/depot_tools
-
mkdir webrtc_android && cd webrtc_android
后续命令在webrtc_android
目录执行 -
fetch --nohooks webrtc_android
-
gclient sync
-
更新系统的已安装软件,安装
python
、openjdk-8-jdk
sudo apt update && sudo apt upgrade && sudo apt install python openjdk-8-jdk
-
cd src/ && ./build/install-build-deps.sh --no-chromeos-fonts
可能会出现boto
、snap
、fonts
等相关异常参见后文章节
后续命令在src
目录执行 -
切换到所需分支
git branch -r
显示所有分支
git checkout -bm79 branch-heads/m79
切换到分支branch-heads/m79
更多Git相关命令 -
执行
tools_webrtc/android/build_aar.py
编译
最好带上参数,如:
./tools_webrtc/android/build_aar.py --extra-gn-args 'is_debug=true is_clang=true rtc_include_tests=false rtc_use_h264=true rtc_enable_protobuf=false use_rtti=true use_custom_libcxx=false' --build-dir ./out/release-build/ --arch "arm64-v8a"
从build_aar.py
可以看到,最终采用了 gn 和 ninja 构建编译
参考自 Compile_WebRTC_Library_For_Android
boto 代理配置
错误提示
NOTICE: You have PROXY values set in your environment, but gsutilin depot_tools does not (yet) obey them.
Also, --no_auth prevents the normal BOTO_CONFIG environmentvariable from being used.
To use a proxy in this situation, please supply those settingsin a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environmentvariable.
解决方案:
- Create ~/.boto config file
[Boto]
proxy = 127.0.0.1
proxy_port = 7890
ca_certificates_file = /path/to/certificate.crt
-
Export NO_AUTH_BOTO_CONFIG
在~/.bashrc中添加export NO_AUTH_BOTO_CONFIG=~/.boto
再执行source ~/.bashrc
-
Finally run sync the sources
gclient sync
参考自 https://gist.github.com/nickdiego/2b2faa35f5ab48e7438ee434d2756765
Unable to reach the snap store 问题解决
Interacting with snapd is not yet supported on Windows Subsystem for Linux.
Windows的Linux子系统(WSL)暂不支持snap
。。。。
-
snap
安装
$ sudo apt install snapd -
snap
代理配置
sudo systemctl edit snapd
在显示页面输入如下,ip及端口号按自己的配置[Service] Environment="http_proxy=http://127.0.0.1:7890" Environment="https_proxy=http://127.0.0.1:7890"
-
载入新配置
sudo systemctl daemon-reload
-
重启
snap
服务
sudo systemctl restart snapd
-
测试
snap
连接状态
snap debug connectivity
参考自
https://blog.csdn.net/qq_26975799/article/details/111411238
ERROR: The installation of the Chrome OS default fonts failed.
Failed to connect to commondatastorage.googleapis.com port 443: Connection refused
subprocess.CalledProcessError: Command ‘[‘curl’, ‘-L’, ‘https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/notofonts-20161129.tar.bz2’, ‘-o’, ‘/usr/local/share/fonts/chromeos/notofonts-20161129.tar.bz2’]’ returned non-zero exit status 7
解决方案:
sudo ./build/install-build-deps.sh --no-chromeos-fonts
WebRTC里用的c++库是libc++,而目前Android中使用的c++库是libstdc++
错误提示
../../rtc_base/checks.cc:108: error: undefined reference to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*)'
解决方案:
WebRTC使用libstdc++库,在执行gn命令时
加入 use_custom_libcxx=false
这个参数
如 gn gen out/Debug --args='target_os="android" target_cpu="arm" use_custom_libcxx=false'
参考自
[编译WebRTC APM模块静态库 For Android] https://juejin.cn/post/6844904104427421704
Exception: Missing licenses for following third_party targets: openh264, ffmpeg
解决方案:
修改 tools_webrtc/libs/generate_licenses.py
如下,添加 LICENSE
--- a/tools_webrtc/libs/generate_licenses.py
+++ b/tools_webrtc/libs/generate_licenses.py
@@ -69,6 +69,8 @@ LIB_TO_LICENSES_DICT =
'g722': ['modules/third_party/g722/LICENSE'],
'fft4g': ['common_audio/third_party/fft4g/LICENSE'],
'spl_sqrt_floor': ['common_audio/third_party/spl_sqrt_floor/LICENSE'],
+ 'openh264':['third_party/openh264/src/LICENSE'],
+ 'ffmpeg':['third_party/ffmpeg/LICENSE.md'],
# TODO(bugs.webrtc.org/1110): Remove this hack. This is not a lib.
# For some reason it is listed as so in _GetThirdPartyLibraries.
引用自
https://blog.jianchihu.net/webrtc-android-native-code-build-error.html
相关命令说明
-
安装编译 WebRTC 所需的依赖
./build/install-build-deps.sh
./build/install-build-deps-android.sh
-
可以查看有哪些编译参数
./tools_webrtc/android/build_aar.py -h
去掉-h
使用默认参数编译
./tools_webrtc/android/build_aar.py --build-dir ./out/release-build/ --arch "arm64-v8a"
-
查看库中包含的符号
nm -C -g --defined-only libjingle_peerconnection_so.so
nm -C -g --defined-only libwebrtc.a
编译静态库 libwebrtc.a 和 libwebrtc.jar
在 ./tools_webrtc/android/build_aar.py
中,我们可以看到如下
TARGETS = [
'sdk/android:libwebrtc',
'sdk/android:libjingle_peerconnection_so',
]
我们需要在 []
中加入 ':webrtc',
默认不会编译 webrtc
模块
再次编译
./tools_webrtc/android/build_aar.py --extra-gn-args 'is_debug=false is_component_build=false is_clang=true rtc_include_tests=true rtc_use_h264=true rtc_enable_protobuf=false use_rtti=true use_custom_libcxx=false' --build-dir ./out/release-build/ --arch "armeabi-v7a"
即可在输出目录 ./out/release-build/
找到 libwebrtc.a
如 out/release-build/armeabi-v7a/obj/libwebrtc.a
在 out/release-build/armeabi-v7a/lib.java/sdk/android/libwebrtc.jar
可以找打 libwebrtc.jar
以下命令可以看到支持的所有 TARGETS
ninja -C out/release-build/armeabi-v7a/ -t targets all
编译 libwebrtc.aar
./tools_webrtc/android/build_aar.py --build-dir ./out/release-build/ --output "out/libwebrtc.aar" --arch "arm64-v8a"
加上 --output "out/libwebrtc.aar"
指定aar输出位置,默认在 src
目录
解压 out/libwebrtc.aar
可以看到只有如下内容
extracting: AndroidManifest.xml
extracting: classes.jar
extracting: jni/arm64-v8a/libjingle_peerconnection_so.so
webrtc release 分支相关信息
-
webrtc-android-build中
libwebrtc.a
当前(2021年8月18日)是基于分支branch-heads/m79
-
之后为啥没找到
m
开头的branch-heads
在目录webrtc_android/src
执行
git log --oneline --all --graph --decorate|grep M8
从结果中可以看到还是有M8*
相关的信息
m78 m79 同步与chromium大版本,webrtc后来用自己的小版本了,如4610等chromium 当前 计划 https://chromiumdash.appspot.com/schedule
chromium release 时间表 https://chromiumdash.appspot.com/releases -
当前(2021年8月18日)最新release是
branch-heads/4610
webrtc 更新日志 https://webrtc.github.io/webrtc-org/release-notes/ -
查看所有release分支信息Linux命令
git log --oneline --all --graph --decorate |grep branch-heads
-
切换到对应的分支并同步代码
git checkout -b m85 branch-heads/4183
cd .. && gclient sync
其它相关文档
-
mediasoup 录制MP4,采用‘MP4 Fast-Start’,将‘metadata ’写在文件头
https://github.com/Kurento/mediasoup-demos/tree/master/mediasoup-recording -
WebRTC – SDP格式解析
https://www.jianshu.com/p/94d6defc8e27 -
安卓webrtc在ubuntu 2004下编译使用
https://blog.csdn.net/CSqingchen/article/details/120016697 -
Android 断点调试 webrtc、 medieasoup
https://blog.csdn.net/CSqingchen/article/details/120156900 -
安卓增加 mediasoup webrtc 日志输出
https://blog.csdn.net/CSqingchen/article/details/120156669 -
安卓 Mediasoup V3 基于webrtc 分支m84 的编译
https://blog.csdn.net/CSqingchen/article/details/120163087 -
安卓 webrtc 开启h264 软编解码
https://blog.csdn.net/CSqingchen/article/details/120199702 -
安卓mediasoup输出H264流(支持H264编码)
https://blog.csdn.net/CSqingchen/article/details/120218832 -
安卓mediasoup webrtc h264 软编解码相关源码分析
https://blog.csdn.net/CSqingchen/article/details/120218923
以上是关于20221218解决在Ubuntu18.04下编译Firefly的Core-3588J出现lz4的问题的主要内容,如果未能解决你的问题,请参考以下文章
解决ubuntu下编译报错/usr/include/linux/errno.h:1:10: fatal error: asm/errno.h #yyds干货盘点#
解决ubuntu下编译报错/usr/include/linux/errno.h:1:10: fatal error: asm/errno.h #yyds干货盘点#