2024年4月3日发(作者:花静姝)
NUC980系列资料之DeviceTree的使用 Organized by Tanshi
NUC980系列资料之Devicetree的使用
1 设备树的编译
安装编译工具
#sudo apt-get install dtc
编译命令举例:
#dtc –I dts ./ –O dtb –o ./
2. kernel配置设备树支持
配置:CONFIG_OF
3.u-boot配置支持设备树
nuc980_defconfig使能下面两个配置
CONFIG_FIT=y
CONFIG_OF_LIBFDT=y
4. 通过设备树引导系统
举例:
Kernel:
980uimage:放在nand flash的0x200000位置
设备树文件
:0xB00000
u-boot 用设备树启动:
nand read 0x7fc0 0x200000 0xA00000
nand read 0x1400000 0xB00000 0x80000
bootm 0x7fc0 - 0x1400000
Copyright by Tanshi Li
1
NUC980系列资料之DeviceTree的使用 Organized by Tanshi
5.打包成itb文件引导系统
准备好相关文件:
Kernel:980image
Ramdisk文件系统:
Its文件:
设备树文件:
的内容如下:
* U-boot uImage source file with kernel, ramdisk and FDT blob
*/
/dts-v1/;
/ {
description = "1";
#address-cells = <1>;
images {
kernel@1 {
description = "default";
data = /incbin/("./980image");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x0008000>;
entry = <0x0008000>;
signature@1 {
algo = "sha1,rsa2048";
key-name-hint = "dev";
};
};
ramdisk@1 {
description = "default";
data = /incbin/("./");
type = "ramdisk";
arch = "arm";
os = "linux";
compression = "gzip";
load = <0x00000000>;
entry = <0x00000000>;
signature@1 {
algo = "sha1,rsa2048";
Copyright by Tanshi Li
2
2024年4月3日发(作者:花静姝)
NUC980系列资料之DeviceTree的使用 Organized by Tanshi
NUC980系列资料之Devicetree的使用
1 设备树的编译
安装编译工具
#sudo apt-get install dtc
编译命令举例:
#dtc –I dts ./ –O dtb –o ./
2. kernel配置设备树支持
配置:CONFIG_OF
3.u-boot配置支持设备树
nuc980_defconfig使能下面两个配置
CONFIG_FIT=y
CONFIG_OF_LIBFDT=y
4. 通过设备树引导系统
举例:
Kernel:
980uimage:放在nand flash的0x200000位置
设备树文件
:0xB00000
u-boot 用设备树启动:
nand read 0x7fc0 0x200000 0xA00000
nand read 0x1400000 0xB00000 0x80000
bootm 0x7fc0 - 0x1400000
Copyright by Tanshi Li
1
NUC980系列资料之DeviceTree的使用 Organized by Tanshi
5.打包成itb文件引导系统
准备好相关文件:
Kernel:980image
Ramdisk文件系统:
Its文件:
设备树文件:
的内容如下:
* U-boot uImage source file with kernel, ramdisk and FDT blob
*/
/dts-v1/;
/ {
description = "1";
#address-cells = <1>;
images {
kernel@1 {
description = "default";
data = /incbin/("./980image");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x0008000>;
entry = <0x0008000>;
signature@1 {
algo = "sha1,rsa2048";
key-name-hint = "dev";
};
};
ramdisk@1 {
description = "default";
data = /incbin/("./");
type = "ramdisk";
arch = "arm";
os = "linux";
compression = "gzip";
load = <0x00000000>;
entry = <0x00000000>;
signature@1 {
algo = "sha1,rsa2048";
Copyright by Tanshi Li
2