概述
- 一个好的安装教程能够帮助开发者完成更便捷、更快速的开发。
- 书山有路勤为径,学海无涯苦作舟。我是秋知叶i、期望每一个阅读了我的文章的开发者都能够有所成长。
开发环境
开发环境:ubuntu18
文章目录
- 概述
- 开发环境
- 一、选择型号
- 二、全自动编译
- 三、IO电源选择
- 三、编译命令详解
- 五、各模块编译
- 1、U-boot编译
- 2、Kernel编译
- 3、Recovery编译
一、选择型号
板级配置 | 说明 |
---|---|
BoardConfig-rk3566-evb2-lp4x-v10-32bit.mk | 适用于 RK3566 EVB 搭配 LPDDR4 开发板,运行32位根文件系统 |
BoardConfig-rk3566-evb2-lp4x-v10.mk | 适用于 RK3566 EVB 搭配 LPDDR4 开发板 |
BoardConfig-rk3568-evb1-ddr4-v10-32bit.mk | 适用于 RK3568 EVB 搭配 LPDDR4 开发板,运行32位根文件系统 |
BoardConfig-rk3568-evb1-ddr4-v10-spi-nor-64M.mk | 适用于 RK3568 EVB 搭配 DDR4/SPI NOR 开发板 |
BoardConfig-rk3568-evb1-ddr4-v10.mk | 适用于 RK3568 EVB 搭配 DDR4 开发板 |
BoardConfig-rk3568-nvr-spi-nand.mk | 适用于 RK3568 NVR 搭配SPI NAND 开发板 |
BoardConfig-rk3568-nvr.mk | 适用于 RK3568 NVR 开发板 |
BoardConfig-rk3568-uvc-evb1-ddr4-v10.mk | 适用于 RK3568 UVC 开发板 |
BoardConfig.mk | 默认配置 |
根据开发板型号,在SDK根目录执行 ./build.sh lunch ,选择对应的型号,在这里我选择的是 5
qiuwenxiong@Avd-System-Builder:~/rockchip/rk3568x_linux$ ./build.sh lunch
processing option: lunch
You're building on Linux
Lunch menu...pick a combo:
0. default BoardConfig.mk
1. BoardConfig-rk3566-evb2-lp4x-v10-32bit.mk
2. BoardConfig-rk3566-evb2-lp4x-v10.mk
3. BoardConfig-rk3568-evb1-ddr4-v10-32bit.mk
4. BoardConfig-rk3568-evb1-ddr4-v10-spi-nor-64M.mk
5. BoardConfig-rk3568-evb1-ddr4-v10.mk
6. BoardConfig-rk3568-nvr-spi-nand.mk
7. BoardConfig-rk3568-nvr.mk
8. BoardConfig-rk3568-uvc-evb1-ddr4-v10.mk
9. BoardConfig.mk
Which would you like? [0]: 5
switching to board: /home/qiuwenxiong/rockchip/rk3568x_linux/device/rockchip/rk356x/BoardConfig-rk3568-evb1-ddr4-v10.mk
二、全自动编译
直接执行 ./build.sh 编译并且打包成固件
./build.sh all # 只编译模块代码(u-Boot,kernel,Rootfs,Recovery)
# 需要再执行./mkfirmware.sh 进行固件打包
./build.sh # 在./build.sh all基础上
# 1. 增加固件打包 ./mkfirmware.sh
# 2. update.img打包
# 3. 复制rockdev目录下的固件到IMAGE/***_RELEASE_TEST/IMAGES目录
# 4. 保存各个模块的补丁到IMAGE/***_RELEASE_TEST/PATCHES目录
# 注:./build.sh 和 ./build.sh allsave 命令一样
三、IO电源选择
根据硬件的实际IO电压来选择,我这里全部都是选择 3.3V
三、编译命令详解
qiuwenxiong@Avd-System-Builder:~/rockchip/rk3568x_linux$ ./build.sh -help
Usage: build.sh [OPTIONS]
Available options:
BoardConfig*.mk -switch to specified board config
lunch -list current SDK boards and switch to specified board config
uboot -build uboot
spl -build spl
loader -build loader
kernel -build kernel
modules -build kernel modules
toolchain -build toolchain
rootfs -build default rootfs, currently build buildroot as default
buildroot -build buildroot rootfs
ramboot -build ramboot image
multi-npu_boot -build boot image for multi-npu board
yocto -build yocto rootfs
debian -build debian10 buster/x11 rootfs
distro -build debian10 buster/wayland rootfs
pcba -build pcba
recovery -build recovery
all -build uboot, kernel, rootfs, recovery image
cleanall -clean uboot, kernel, rootfs, recovery
firmware -pack all the image we need to boot up system
updateimg -pack update image
otapackage -pack ab update otapackage image (update_ota.img)
sdpackage -pack update sdcard package image (update_sdcard.img)
save -save images, patches, commands used to debug
allsave -build all & firmware & updateimg & save
check -check the environment of building
info -see the current board building information
app/<pkg> -build packages in the dir of app/*
external/<pkg> -build packages in the dir of external/*
Default option is 'allsave'.
五、各模块编译
1、U-boot编译
./build.sh uboot
2、Kernel编译
./build.sh kernel
3、Recovery编译
./build.sh recovery
注:Recovery是非必需的功能,有些板级配置不会设置