瑞芯微Rockchip开发者社区
直播中

陈敏

7年用户 1294经验值
私信 关注
[问答]

ubuntu18.04编译kernel出错请问是什么原因?

2.jpg

问题描述及复现步骤:

ubuntu18.04编译环境按wiki配置好

sdk无修改,下载后解压、git reset --hard均正常

按wiki编译,整体编译和分步编译,编译到kernel部分时均出现以下错误
(网上有说liblz4-tool没安装,实际上已经安装)

请问是什么问题?

~/firefly_rk3588/kernel-5.10$ msk ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3588_firefly_itx_3588j/boot.img rk3588-firefly-itx-3588j.img -j32
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
arch/arm64/Makefile:214: recipe for target 'rk3588-firefly-itx-3588j.img' failed
make: *** [rk3588-firefly-itx-3588j.img] Error 2

附wiki编译方法
Core-3588J 产品编译方法整体编译
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

10.1 寸 MIPI DSI0 固件编译:

./FFTools/make.sh -d rk3588-firefly-itx-3588j-mipi101-M101014-BE45-A1 -j8 -l rk3588_firefly_itx_3588j-userdebug./FFTools/mkupdate/mkupdate.sh -l rk3588_firefly_itx_3588j-userdebug

分步编译
编译前执行如下命令配置环境变量:

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64export PATH=JAVA_HOME/bin:PATHexport CLASSPATH=.:JAVA_HOME/lib:JAVA_HOME/lib/tools.jar

编译 kernel:

cd ~/path/to/sdk/kernel-5.10export PATH=../prebuilts/clang/host/linux-x86/clang-r416183b/bin:$PATHalias msk='make CROSS_COMPILE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1'msk ARCH=arm64 firefly_defconfig android-11.config pcie_wifi.configmsk ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3588_firefly_itx_3588j/boot.img rk3588-firefly-itx-3588j.img -j8


回帖(1)

陈丽

2023-2-22 16:20:28
此问题由于是ubuntu18.04 版本lz4版本太低导致,修改方式如下
1.拷贝附件lz4文件到对应目录
sudo cp lz4 /usr/bin/lz4
[url=]lz4.zip[/url]
2.编译Android下面的lz4
mmm external/lz4/
sudo cp out/host/linux-x86/bin/lz4 /usr/bin/lz4
举报

更多回帖

发帖
×
20
完善资料,
赚取积分