- 了解 uboot device tree 宏定义(README.fdt-control)
1.CONFIG_OF_CONTROL
To enable this device tree feature, add CONFIG_OF_CONTROL to your board config file.
2.CONFIG_DEFAULT_DEVICE_TREE
To set the filename of the device tree source.
#define CONFIG_DEFAULT_DEVICE_TREE "<name>"
Example:
configs/trats2_defconfig:
CONFIG_DEFAULT_DEVICE_TREE="exynos4412-trats2"
编译之后,在arch/arm/dts目录下生成exynos4412-trats2.dtb, dts/Makefile定义有:
8 DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%)
9 ifeq ($(DEVICE_TREE),)
10 DEVICE_TREE := unset
11 endif
12
13 ifneq ($(EXT_DTB),)
14 DTB := $(EXT_DTB)
15 else
16 DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
17 endif
3.CONFIG_OF_EMBED
If CONFIG_OF_EMBED is defined, then it will be picked up and built into the U-Boot image (including u-boot.bin). This is suitable for debugging and development only and is not recommended for production devices.
详细查看: dts/Kconfig