平台 | U-Boot 版本 | Linux SDK 版本 |
---|---|---|
RK356x | 2017.09 | v1.2.3 |
一、背景
U-Boot 的原生架构要求一块板子必须对应一份 U-Boot dts,并且U-Boot dts生成的dtb是打包到U-Boot自己的镜像中的。这样就会出现各SoC平台上,N块板子需要N份U-Boot镜像。
不难发现,其实一个SoC平台不同的板子之间主要是外设的差异,SoC核心部分是一致的。RK平台为了实现一个SoC平台仅需要一份U-Boot镜像,因此增加了 kernel DTB 机制。本质就是在较早的阶段切到kernel DTB,用它的配置信息初始化外设。
RK356x 平台通过支持 kernel DTB 可以达到兼容板子差异,如:display、pmic/regulator、pinctrl、clk等。
kernel DTB 的启用需要依赖 OF_LIVE(live device tree,简称:live-dt)。
config USING_KERNEL_DTB
bool "Using dtb from Kernel/resource for U-Boot"
depends on RKIMG_BOOTLOADER && OF_LIVE
default y
help
This enable support to read dtb from resource and use it for U-Boot,
the uart and emmc will still using U-Boot dtb, but other devices like
reg