Debian系统编译
软件配置
安装环境包
sudo apt update
sudo apt-get install git ssh make gcc libssl-dev liblz4-tool \
expect g++ patchelf chrpath gawk texinfo chrpath diffstat binfmt-support \
qemu-user-static live-build bison flex fakeroot cmake gcc-multilib g++-multilib \
unzip device-tree-compiler libncurses-dev
sudo pip install python-pip pyelftools
SDK获取
发送邮件至 support@neardi.com 获取相关开发资料
下载完成后,在解压前先查看 MD5 码和Neardi-LBA3588S-SDK-Linux-${Version}.tar.gz.md5sum中是否一致:
$ md5sum Neardi-LBA3588S-SDK-Linux-${Version}.tar.gz
******************************** Neardi-LBA3588S-SDK-Linux-${Version}.tar.gz
解压:
tar zxvf Neardi-LBA3588S-SDK-Linux-${Version}.tar.gz
提取:
cd Neardi-LBA3588S-SDK-Linux-${Version}
git reset --hard
编译 SDK
选择配置
./build.sh lunch BoardConfig-rk3588s-neardi-linux-lb170.mk
编译Debian
./build.sh debian
打包固件
RK 固件,是以 Rockchip 专有格式打包的固件,使用 Rockchip 提供的工具可以烧写到 eMMC 或者 SD 卡中(注:若无特殊说明,WIKI 上提及的固件默认为 RK 固件)。
# 打包 RK 固件
./build.sh updateimg
生成的完整固件会保存到 rockdev/update.img
。
FAQ
编译错误
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....
解决方法,重新手动安装lz4:
git clone https://github.com/lz4/lz4.git
cd lz4
make
sudo make install