这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » 国产MCU » 怎样去解决RK3588编译kernel的问题呢

共3条 1/1 1 跳转至

怎样去解决RK3588编译kernel的问题呢

工程师
2023-10-10 18:15:30     打赏

1.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





关键词: RK3588     kernel     arm64    

助工
2023-10-10 18:15:48     打赏
2楼

此问题由于是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


工程师
2023-10-10 18:16:16     打赏
3楼

谢谢,已经解决

PS:
. build/envsetup.sh
mmm external/lz4/
还是会报错,懒得去解决

按这个思路,我是直接

git clone https://github.com/lz4/lz4.git
make
sudo make install


共3条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]