问题现象
 在ubuntu上编译 rk3588 的kernel时,报如下错误:
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....
解决方法
 根据相关资料说明,安装lz工具。下载地址 : https://github.com/lz4/lz4/releases
进入解压后的目录
make
make install
但是编译内核依然报同样的错误
分析
 查看系统中ll /usr/bin 目录下lz*文件信息
 看日期,并没有2023年的,说明实际并没有安装到这个目录。
分析lz源码make,发现它的二进制文件和库文件安装到了/usr/local/bin /usr/local/lib下面
知道这个后,我们设置PATH环境变量,将/usr/local/bin放到PATH的最前面
export PATH=/usr/local/bin:$PATH
 此时我们再进行编译则正常。
                         
 原文链接:https://blog.csdn.net/proware/article/details/129331057