导航:首页 > 器材知识 > bootcmd设备树的怎么写

bootcmd设备树的怎么写

发布时间:2021-02-11 11:46:01

㈠ 如何设置uboot环境变量bootcmd

直接 setenv bootcmdtftp;
setenv 既可以增加变量,也可以修改,也可以删除。
setenv bootcmdtftp 20008000,是修改和增加
setenv bootcmdtftp是删除

㈡ 编译linux内核设备树文件使用什么命令

Linux源码的arch/powerpc/boot/dts/目录下存放了很多dts文件,可以作为参考文件。另外dtc编译器在内核专源码2.6.25版本之后已经被属包含进去。在2.6.26版本之后,生成blob的简单规则已经加入makefile,如下命令:
$ make ARCH=powerpc canyonlands.dtb

也可以根据自己的硬件修改好dts文件后,用下面类似命令生成dtb文件。
$ dtc -f -I dts -O dtb -R 8 -S 0x3000 test.dts > mpc836x_mds.dtb

$ mkimage -A ppc -O Linux -T flat_dt -C none -a 0x300000 -e 0 -d mpc836x_mds.dtb mpc836x_mds.dtu

㈢ u-boot使用make编译出现找不到dtc命令,如何解决啊

dtc是device-tree-compiler的缩写,来即设备树自编译器,说明系统中没有安装这个编译器,如多用的是apt-get install device-tree-compiler安装后就可以成功编译了。

㈣ 如何编译高通kernal设备树

DTS (device tree source)
.dts文件是一种ASCII 文本格式的Device
Tree描述,此文本格式非常人性化,适合人类的阅读习惯。基本上,在ARM
Linux在,一个。dts文件对应一个ARM的machine,一般放置在内核的arch/arm/boot/dts/目录。由于一个SoC可能对应多个machine(一个SoC可以对应多个产品和电路板),势必这些。dts文件需包含许多共同的部分,Linux内核为了简化,把SoC公用的部分或者多个machine共同的部分一般提炼为。dtsi,类似于C语言的头文件。其他的machine对应的。dts就include这个。dtsi。譬如,对于VEXPRESS而言,vexpress-v2m.dtsi就被vexpress-v2p-ca9.dts所引用,
vexpress-v2p-ca9.dts有如下一行:
/include/
“vexpress-v2m.dtsi”
当然,和C语言的头文件类似,。dtsi也可以include其他的。dtsi,譬如几乎所有的ARM
SoC的。dtsi都引用了skeleton.dtsi。
.dts(或者其include的。dtsi)基本元素即为前文所述的结点和属性:
[plain] view
plainprint?
/ {
node1 {
a-string-property = “A string”;
a-string-list-property = “first string”, “second string”;
a-byte-data-property = [0x01 0x23 0x34 0x56];
child-node1 {
first-child-property;
second-child-property = <1>;
a-string-property = “Hello, world”;
};
child-node2 {
};
};
node2 {
an-empty-property;
a-cell-property = <1 2 3 4>; /* each number (cell) is a uint32 */
child-node1 {
};
};
};
/ {
node1 {
a-string-property = “A string”;
a-string-list-property = “first string”, “second string”;
a-byte-data-property = [0x01 0x23 0x34 0x56];
child-node1 {
first-child-property;
second-child-property = <1>;
a-string-property = “Hello, world”;
};
child-node2 {
};
};
node2 {
an-empty-property;
a-cell-property = <1 2 3 4>; /* each number (cell) is a uint32 */
child-node1 {
};
};
};
上述。dts文件并没有什么真实的用途,但它基本表征了一个Device
Tree源文件的结构:
1个root结点“/”;
root结点下面含一系列子结点,本例中为“node1” 和
“node2”;
结点“node1”下又含有一系列子结点,本例中为“child-node1” 和
“child-node2”;
各结点都有一系列属性。这些属性可能为空,如“
an-empty-property”;可能为字符串,如“a-string-property”;可能为字符串数组,如“a-string-list-property”;可能为Cells(由u32整数组成),如“second-child-property”,可能为二进制数,如“a-byte-data-property”。
下面以一个最简单的machine为例来看如何写一个。dts文件。假设此machine的配置如下:
1个双核ARM
Cortex-A9 32位处理器;
ARM的local bus上的内存映射区域分布了2个串口(分别位于0x101F1000 和
0x101F2000)、GPIO控制器(位于0x101F3000)、SPI控制器(位于0x10170000)、中断控制器(位于0x10140000)和一个external
bus桥;
External bus桥上又连接了SMC SMC91111
Ethernet(位于0x10100000)、I2C控制器(位于0x10160000)、64MB NOR
Flash(位于0x30000000);
External bus桥上连接的I2C控制器所对应的I2C总线上又连接了Maxim
DS1338实时钟(I2C地址为0x58)。
其对应的。dts文件为:
[plain] view
plainprint?
/ {
compatible = “acme,coyotes-revenge”;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
compatible = “arm,cortex-a9”;
reg = <0>;
};
cpu@1 {
compatible = “arm,cortex-a9”;
reg = <1>;
};
};
serial@101f0000 {
compatible = “arm,pl011”;
reg = <0x101f0000 0x1000 >;
interrupts = < 1 0 >;
};
serial@101f2000 {
compatible = “arm,pl011”;
reg = <0x101f2000 0x1000 >;
interrupts = < 2 0 >;
};
gpio@101f3000 {
compatible = “arm,pl061”;
reg = <0x101f3000 0x1000
0x101f4000 0x0010>;
interrupts = < 3 0 >;
};
intc: interrupt-controller@10140000 {
compatible = “arm,pl190”;
reg = <0x10140000 0x1000 >;
interrupt-controller;
#interrupt-cells = <2>;
};
spi@10115000 {
compatible = “arm,pl022”;
reg = <0x10115000 0x1000 >;
interrupts = < 4 0 >;
};
external-bus {
#address-cells = <2>
#size-cells = <1>;
ranges = <0 0 0x10100000 0x10000 // Chipselect 1, Ethernet
1 0 0x10160000 0x10000 // Chipselect 2, i2c controller
2 0 0x30000000 0x1000000>; // Chipselect 3, NOR Flash
ethernet@0,0 {
compatible = “smc,smc91c111”;
reg = <0 0 0x1000>;
interrupts = < 5 2 >;
};
i2c@1,0 {
compatible = “acme,a1234-i2c-bus”;
#address-cells = <1>;
#size-cells = <0>;
reg = <1 0 0x1000>;
interrupts = < 6 2 >;
rtc@58 {
compatible = “maxim,ds1338”;
reg = <58>;
interrupts = < 7 3 >;
};
};
flash@2,0 {
compatible = “samsung,k8f1315ebm”, “cfi-flash”;
reg = <2 0 0x4000000>;
};
};
};
/ {
compatible = “acme,coyotes-revenge”;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
compatible = “arm,cortex-a9”;
reg = <0>;
};
cpu@1 {
compatible = “arm,cortex-a9”;
reg = <1>;
};
};
serial@101f0000 {
compatible = “arm,pl011”;
reg = <0x101f0000 0x1000 >;
interrupts = < 1 0 >;
};
serial@101f2000 {
compatible = “arm,pl011”;
reg = <0x101f2000 0x1000 >;
interrupts = < 2 0 >;
};
gpio@101f3000 {
compatible = “arm,pl061”;
reg = <0x101f3000 0x1000
0x101f4000 0x0010>;
interrupts = < 3 0 >;
};
intc: interrupt-controller@10140000 {
compatible = “arm,pl190”;
reg = <0x10140000 0x1000 >;
interrupt-controller;
#interrupt-cells = <2>;
};
spi@10115000 {
compatible = “arm,pl022”;
reg = <0x10115000 0x1000 >;
interrupts = < 4 0 >;
};
external-bus {
#address-cells = <2>
#size-cells = <1>;
ranges = <0 0 0x10100000 0x10000 // Chipselect 1, Ethernet
1 0 0x10160000 0x10000 // Chipselect 2, i2c controller
2 0 0x30000000 0x1000000>; // Chipselect 3, NOR Flash
ethernet@0,0 {
compatible = “smc,smc91c111”;
reg = <0 0 0x1000>;
interrupts = < 5 2 >;
};
i2c@1,0 {
compatible = “acme,a1234-i2c-bus”;
#address-cells = <1>;
#size-cells = <0>;
reg = <1 0 0x1000>;
interrupts = < 6 2 >;
rtc@58 {
compatible = “maxim,ds1338”;
reg = <58>;
interrupts = < 7 3 >;
};
};
flash@2,0 {
compatible = “samsung,k8f1315ebm”, “cfi-flash”;
reg = <2 0 0x4000000>;
};
};
};
上述。dts文件中,root结点“/”的compatible 属性compatible =
“acme,coyotes-revenge”;定义了系统的名称,它的组织形式为:<manufacturer>,<model>。Linux内核透过root结点“/”的compatible
属性即可判断它启动的是什么machine。
在。dts文件的每个设备,都有一个compatible
属性,compatible属性用户驱动和设备的绑定。compatible
属性是一个字符串的列表,列表中的第一个字符串表征了结点代表的确切设备,形式为“<manufacturer>,<model>”,其后的字符串表征可兼容的其他设备。可以说前面的是特指,后面的则涵盖更广的范围。如在arch/arm/boot/dts/vexpress-v2m.dtsi中的Flash结点:
[plain] view
plainprint?
flash@0,00000000 {
compatible = “arm,vexpress-flash”, “cfi-flash”;
reg = <0 0x00000000 0x04000000>,
<1 0x00000000 0x04000000>;
bank-width = <4>;
};
flash@0,00000000 {
compatible = “arm,vexpress-flash”, “cfi-flash”;
reg = <0 0x00000000 0x04000000>,
<1 0x00000000 0x04000000>;
bank-width = <4>;
};
compatible属性的第2个字符串“cfi-flash”明显比第1个字符串“arm,vexpress-flash”涵盖的范围更广。
再比如,Freescale
MPC8349 SoC含一个串口设备,它实现了国家半导体(National Semiconctor)的ns16550
寄存器接口。则MPC8349串口设备的compatible属性为compatible = “fsl,mpc8349-uart”,
“ns16550”。其中,fsl,mpc8349-uart指代了确切的设备, ns16550代表该设备与National Semiconctor
的16550
UART保持了寄存器兼容。
接下来root结点“/”的cpus子结点下面又包含2个cpu子结点,描述了此machine上的2个CPU,并且二者的compatible
属性为“arm,cortex-a9”。
注意cpus和cpus的2个cpu子结点的命名,它们遵循的组织形式为:<name>[@<unit-address>],<>中的内容是必选项,[]中的则为可选项。name是一个ASCII字符串,用于描述结点对应的设备类型,如3com
Ethernet适配器对应的结点name宜为ethernet,而不是3com509。如果一个结点描述的设备有地址,则应该给出@unit-address。多个相同类型设备结点的name可以一样,只要unit-address不同即可,如本例中含有cpu@0、cpu@1以及serial@101f0000与serial@101f2000这样的同名结点。设备的unit-address地址也经常在其对应结点的reg属性中给出。ePAPR标准给出了结点命名的规范。

㈤ 用win7刷入recoery cmd命令怎么写急!!!

在开机状态下:装好驱动,运行cmd,切到adb命令工具箱的目录
adbrebootbootloader
以上命令会让手机进入fastboot模式(有时可能一次进不了),进入fastboot模式后
fastbootdevives
这个是查看fastboot是否进入成功,有的话会显示你的设备名称
把recovery.img文件放到adb工具箱目录,执行以下命令
fastbootflashrecoveryrecovery.img
刷入recovery到recovery分区。(一般只要几秒,有两个KO字样表进成功)
刷完后,执行以下命令重启
fastbootreboot


如果已经进入fastboot模式,可忽略第一个命令

以下介绍一些其他命令

adb reboot recovery 重启到recovery模式,我手机重启10次只有不到5次的成功率,不知道为什么

adb reboot devices 查看设备,驱动正确情况下会出名一串英文,对应你的cpu型号

各机型可以手动进入各种模式,手动方式最稳定。由于按法不固定,所以在这不介绍

以下练字可以全部复制到txt,另存为bat执行,前提保证驱动安装正确,recovery.img和adb工具箱和bat文件放同一个目录



adb devices

adb reboot bootloader

fastboot flash recovery recovery.img && echo 写入成功 || echo 写入失败,请检查驱动是否正确或一条条执行

echo 按任意键重启手机

pause>nul

fastboot reboot && echo 已重启 || echo 重启失败

ping -n 3 127.1>nul

㈥ bootcmd=setenv bootlinux 'cp 200000 30800000 140000 是什么意思。

这个是uboot里面的东西吧。不过我觉得你贴出来的肯定有问题。
setenv 设置环境回变量
cp 就是拷贝, 地址跟硬答件相关, 不是从内存到flash,就是从flash 到 内存
200000 应该是内存地址
30800000 应该是flash地址
140000 是拷贝的长度

㈦ bootcmd怎么设置从nfs启动内核

-Boot环境变量的解释说明
环 境 变 量
解 释 说 明
bootdelay
定义执行自动启动的等候秒数
baudrate
定义串口控制台的波特率
netmask
定义以太网接口的掩码
ethaddr
定义以太网接口的MAC地址
bootfile
定义缺省的下载文件
bootargs
定义传递给Linux内核的命令行参数
bootcmd
定义自动启动时执行的几条命令
serverip
定义tftp服务器端的IP地址
ipaddr
定义本地的IP地址
stdin
定义标准输入设备,一般是串口
stdout
定义标准输出设备,一般是串口
stderr
定义标准出错信息输出设备,一般是串口
参考U-boot,其环境变量设置如下:
Uboot> printenv
bootdelay=3
baudrate=115200
ethaddr=00:12:34:56:78:9a
ipaddr=192.168.0.9 ①
serverip=192.168.0.1 ②
netmask=255.255.255.0
rootpath=/home/zht/rfsys ③
stdin=serial
stdout=serial
stderr=serial
bootcmd=tftp 21000000 uImage;bootm 21000000 ④
bootargs=root=/dev/nfs rw nfsroot=192.168.0.1:/home/zht/rfsys nfsaddrs=192.168.0.48: 192.168.0.1:192.168.0.1:255.255.255.0 console=ttyS0,115200 mem=32M ⑤
① 设置目标板IP地址
② 设置服务器IP地址
③ 设置根文件系统在服务器上的路径,注意该路径一定要设定为服务器上的nfs目录。
④ bootcmd是u-boot启动后执行的命令,命令之间用分号分隔。
tftp 21000000 uImage 表示通过tftp 将内核映像下载到RAM中地址为0x21000000;
bootm 21000000 启动linux操作系统
⑤ 定义u-boot传送给linux内核的命令行参数,该命令行指定以网络文件系统作为根文件系统。
其中root=/dev/nfs,并非真的设备,而是一个告诉内核经由网络取得根文件系统的旗标。
参数nfsroot这个参数告诉内核以那一台机器,那个目录以及那个网络文件系统选项作为根文件系统使用。参数的格式如下:
nfsroot=[:][,]
如果指令列上没有给定 nfsroot 参数,则将使用‘/tftpboot/%s’预设值。其它选项如下:
--指定网络文件系统服务端的互联网地址(IP address)。如果没有给定此栏位,则使用由 nfsaddrs 变量(见下面)所决定的值。此参数的用途之一是允许使用不同机器作为反向地址解析协议(RARP) 及网络文件系统服务端。通常你可以不管它(设为空白)。
-- 服务端上要作为根挂入的目录名称。如果字串中有个‘%s’ 符记(token),此符记将代换为客户端互联网地址之 ASCII 表示法。
-- 标准的网络文件系统选项。所有选项都以逗号分开。如果没有给定此选项栏位则使用下列的预设值:
port = as given by server portmap daemon
rsize = 1024
wsize = 1024
timeo = 7
retrans = 3
acregmin = 3
acregmax = 60
acdirmin = 30
acdirmax = 60
flags = hard, nointr, noposix, cto, ac
参数nfsaddrs设定网络通讯所需的各种网络接口地址。如果没有给定这个参数,则内核核会试著使用反向地址解析协议以及/或是启动协议(BOOTP)以找出这些参数。其格式如下:
nfsaddrs=::::::
-- 客户端的互联网地址。如果没设,此地址将由反向地址解析协议或启动协议来决定。使用何种协议端视配置核心时打开的选项以及 参数而定。如果设定此参数,就不会使用反向地址解析协议或启动协议。
-- 网络文件系统服务端之互联网地址。如果使用反向地址解析协议来决定客户端地址并且设定此参数,则只接受从指定之服务端传来的回应。要使用不同的机器作为反向地址解析与网络文件系统服务端的话,在此指定你的反向地址解析协议服务端(保持空白)并在 nfsroot 参数(见上述)中指定你的网络文件系统服务端。如果此项目空白则使用回答反向地址解析协议或启动协议之服务端的地址。
-- 网关(gateway)之互联网地址,若服务端位於不同的子网络上时。如果此项目空白则不使用任何网关并假设服务端在本地的(local)网络上,除非由启动协议接收到值。
-- 本地网络界面的网络掩码。如果为空白,则网络掩码由客户端的互联网地址导出,除非由启动协议接收到值。
-- 客户端的名称。如果空白,则使用客户端互联网地址之 ASCII-标记法,或由启动协议接收的值。
-- 要使用的网络设备名称。如果为空白,所有设备都会用来发出反向地址解析请求,启动协议请求由最先找到的设备发出。网络文件系统使用接收到反向地址解析协议或启动协议回应的设备。如果你只有一个设备那你可以不管它。
-- 用以作为自动配置的方法。如果是 `rarp' 或是 `bootp' 则使用所指示的协议。如果此值为 `both' 或空白,若配置核心时有打开这两种协议则都使用。 `none' 表示不使用自动配置。这种情况下你必须指定前述栏位中所有必要的值。
此 参数可以作为 nfsaddrs 的参数单独使用(前面没有任何 `:` 字符),这种情况下会使用自动配置。然而,此种情况不能使用 `none'作为值。
说明:这只是网上的一种说法,但是没有启动起来。因为我的kernel没有cs8900网卡驱动,烧录后可正常启动,但无法挂载NFS,我在想是否可以通过命令行参数设置,来设置uboot给kernel传递的地址参数,这样间接驱动nfs服务。我先前通过vivi这样搞过,也是可行的。
现在可以这样理解就是说,之前的kernel内核已经配置好了各个基本模块的驱动,这样就可以用了

㈧ 如何使用dtc编译设备树 devicetree

DTS (device tree source)
.dts文件是一种ASCII 文本格式的Device
Tree描述,此文本格式非常人性化,适合人类的阅读习惯。基本上,在ARM
Linux在,一个.dts文件对应一个ARM的machine,一般放置在内核的arch/arm/boot/dts/目录。由于一个SoC可能对应多个machine(一个SoC可以对应多个产品和电路板),势必这些.dts文件需包含许多共同的部分,Linux内核为了简化,把SoC公用的部分或者多个machine共同的部分一般提炼为.dtsi,类似于C语言的头文件。其他的machine对应的.dts就include这个.dtsi。譬如,对于VEXPRESS而言,vexpress-v2m.dtsi就被vexpress-v2p-ca9.dts所引用,
vexpress-v2p-ca9.dts有如下一行:
/include/
"vexpress-v2m.dtsi"
当然,和C语言的头文件类似,.dtsi也可以include其他的.dtsi,譬如几乎所有的ARM
SoC的.dtsi都引用了skeleton.dtsi。
.dts(或者其include的.dtsi)基本元素即为前文所述的结点和属性:

[plain] view
plainprint?

/ {

node1 {

a-string-property = "A string";

a-string-list-property = "first string", "second string";

a-byte-data-property = [0x01 0x23 0x34 0x56];

child-node1 {

first-child-property;

second-child-property = <1>;

a-string-property = "Hello, world";

};

child-node2 {

};

};

node2 {

an-empty-property;

a-cell-property = <1 2 3 4>; /* each number (cell) is a uint32 */

child-node1 {

};

};

};
/ {
node1 {
a-string-property = "A string";
a-string-list-property = "first string", "second string";
a-byte-data-property = [0x01 0x23 0x34 0x56];
child-node1 {
first-child-property;
second-child-property = <1>;
a-string-property = "Hello, world";
};
child-node2 {
};
};
node2 {
an-empty-property;
a-cell-property = <1 2 3 4>; /* each number (cell) is a uint32 */
child-node1 {
};
};
};
上述.dts文件并没有什么真实的用途,但它基本表征了一个Device
Tree源文件的结构:
1个root结点"/";
root结点下面含一系列子结点,本例中为"node1" 和
"node2";
结点"node1"下又含有一系列子结点,本例中为"child-node1" 和
"child-node2";
各结点都有一系列属性。这些属性可能为空,如"
an-empty-property";可能为字符串,如"a-string-property";可能为字符串数组,如"a-string-list-property";可能为Cells(由u32整数组成),如"second-child-property",可能为二进制数,如"a-byte-data-property"。
下面以一个最简单的machine为例来看如何写一个.dts文件。假设此machine的配置如下:
1个双核ARM
Cortex-A9 32位处理器;
ARM的local bus上的内存映射区域分布了2个串口(分别位于0x101F1000 和
0x101F2000)、GPIO控制器(位于0x101F3000)、SPI控制器(位于0x10170000)、中断控制器(位于0x10140000)和一个external
bus桥;
External bus桥上又连接了SMC SMC91111
Ethernet(位于0x10100000)、I2C控制器(位于0x10160000)、64MB NOR
Flash(位于0x30000000);
External bus桥上连接的I2C控制器所对应的I2C总线上又连接了Maxim
DS1338实时钟(I2C地址为0x58)。
其对应的.dts文件为:

[plain] view
plainprint?

/ {

compatible = "acme,coyotes-revenge";

#address-cells = <1>;

#size-cells = <1>;

interrupt-parent = <&intc>;cpus {

#address-cells = <1>;

#size-cells = <0>;

cpu@0 {

compatible = "arm,cortex-a9";

reg = <0>;

};

cpu@1 {

compatible = "arm,cortex-a9";

reg = <1>;

};

};serial@101f0000 {

compatible = "arm,pl011";

reg = <0x101f0000 0x1000 >;

interrupts = < 1 0 >;

};serial@101f2000 {

compatible = "arm,pl011";

reg = <0x101f2000 0x1000 >;

interrupts = < 2 0 >;

};gpio@101f3000 {

compatible = "arm,pl061";

reg = <0x101f3000 0x1000

0x101f4000 0x0010>;

interrupts = < 3 0 >;

};intc: interrupt-controller@10140000 {

compatible = "arm,pl190";

reg = <0x10140000 0x1000 >;

interrupt-controller;

#interrupt-cells = <2>;

};spi@10115000 {

compatible = "arm,pl022";

reg = <0x10115000 0x1000 >;

interrupts = < 4 0 >;

};external-bus {

#address-cells = <2>

#size-cells = <1>;

ranges = <0 0 0x10100000 0x10000 // Chipselect 1, Ethernet

1 0 0x10160000 0x10000 // Chipselect 2, i2c controller

2 0 0x30000000 0x1000000>; // Chipselect 3, NOR Flashethernet@0,0 {

compatible = "smc,smc91c111";

reg = <0 0 0x1000>;

interrupts = < 5 2 >;

};i2c@1,0 {

compatible = "acme,a1234-i2c-bus";

#address-cells = <1>;

#size-cells = <0>;

reg = <1 0 0x1000>;

interrupts = < 6 2 >;

rtc@58 {

compatible = "maxim,ds1338";

reg = <58>;

interrupts = < 7 3 >;

};

};flash@2,0 {

compatible = "samsung,k8f1315ebm", "cfi-flash";

reg = <2 0 0x4000000>;

};

};

};
/ {
compatible = "acme,coyotes-revenge";
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;

cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
compatible = "arm,cortex-a9";
reg = <0>;
};
cpu@1 {
compatible = "arm,cortex-a9";
reg = <1>;
};
};

serial@101f0000 {
compatible = "arm,pl011";
reg = <0x101f0000 0x1000 >;
interrupts = < 1 0 >;
};

serial@101f2000 {
compatible = "arm,pl011";
reg = <0x101f2000 0x1000 >;
interrupts = < 2 0 >;
};

gpio@101f3000 {
compatible = "arm,pl061";
reg = <0x101f3000 0x1000
0x101f4000 0x0010>;
interrupts = < 3 0 >;
};

intc: interrupt-controller@10140000 {
compatible = "arm,pl190";
reg = <0x10140000 0x1000 >;
interrupt-controller;
#interrupt-cells = <2>;
};

spi@10115000 {
compatible = "arm,pl022";
reg = <0x10115000 0x1000 >;
interrupts = < 4 0 >;
};

external-bus {
#address-cells = <2>
#size-cells = <1>;
ranges = <0 0 0x10100000 0x10000 // Chipselect 1, Ethernet
1 0 0x10160000 0x10000 // Chipselect 2, i2c controller
2 0 0x30000000 0x1000000>; // Chipselect 3, NOR Flash

ethernet@0,0 {
compatible = "smc,smc91c111";
reg = <0 0 0x1000>;
interrupts = < 5 2 >;
};

i2c@1,0 {
compatible = "acme,a1234-i2c-bus";
#address-cells = <1>;
#size-cells = <0>;
reg = <1 0 0x1000>;
interrupts = < 6 2 >;
rtc@58 {
compatible = "maxim,ds1338";
reg = <58>;
interrupts = < 7 3 >;
};
};

flash@2,0 {
compatible = "samsung,k8f1315ebm", "cfi-flash";
reg = <2 0 0x4000000>;
};
};
};
上述.dts文件中,root结点"/"的compatible 属性compatible =
"acme,coyotes-revenge";定义了系统的名称,它的组织形式为:<manufacturer>,<model>。Linux内核透过root结点"/"的compatible
属性即可判断它启动的是什么machine。
在.dts文件的每个设备,都有一个compatible
属性,compatible属性用户驱动和设备的绑定。compatible
属性是一个字符串的列表,列表中的第一个字符串表征了结点代表的确切设备,形式为"<manufacturer>,<model>",其后的字符串表征可兼容的其他设备。可以说前面的是特指,后面的则涵盖更广的范围。如在arch/arm/boot/dts/vexpress-v2m.dtsi中的Flash结点:

[plain] view
plainprint?

flash@0,00000000 {

compatible = "arm,vexpress-flash", "cfi-flash";

reg = <0 0x00000000 0x04000000>,

<1 0x00000000 0x04000000>;

bank-width = <4>;

};
flash@0,00000000 {
compatible = "arm,vexpress-flash", "cfi-flash";
reg = <0 0x00000000 0x04000000>,
<1 0x00000000 0x04000000>;
bank-width = <4>;
};
compatible属性的第2个字符串"cfi-flash"明显比第1个字符串"arm,vexpress-flash"涵盖的范围更广。
再比如,Freescale
MPC8349 SoC含一个串口设备,它实现了国家半导体(National Semiconctor)的ns16550
寄存器接口。则MPC8349串口设备的compatible属性为compatible = "fsl,mpc8349-uart",
"ns16550"。其中,fsl,mpc8349-uart指代了确切的设备, ns16550代表该设备与National Semiconctor
的16550
UART保持了寄存器兼容。
接下来root结点"/"的cpus子结点下面又包含2个cpu子结点,描述了此machine上的2个CPU,并且二者的compatible
属性为"arm,cortex-a9"。
注意cpus和cpus的2个cpu子结点的命名,它们遵循的组织形式为:<name>[@<unit-address>],<>中的内容是必选项,[]中的则为可选项。name是一个ASCII字符串,用于描述结点对应的设备类型,如3com
Ethernet适配器对应的结点name宜为ethernet,而不是3com509。如果一个结点描述的设备有地址,则应该给出@unit-address。多个相同类型设备结点的name可以一样,只要unit-address不同即可,如本例中含有cpu@0、cpu@1以及serial@101f0000与serial@101f2000这样的同名结点。设备的unit-address地址也经常在其对应结点的reg属性中给出。ePAPR标准给出了结点命名的规范。

㈨ uboot中的bootcmd 命令中的movi read是什么意思

就是从sd/mmc里读数据到内存里。比如
bootcmd=movi read kernel 30008000;
就是从sd/mmc读偏移量为kernel的地方版读权数据到内存30008000中去。
movi read rootfs 30B00000 300000;
同样是从sd/mmc读偏移量为 rootfs的地方读数据到内存30B00000中去。
后面300000是读数据的多少。

㈩ linux 设备树 需要更新uboot吗

一般不需要,但是如果修改过设备树中跟启动有关的信息,那就需要修改uboot的
环境变量

阅读全文

与bootcmd设备树的怎么写相关的资料

热点内容
电热水器阀门那里滴水怎么回事 浏览:79
农残200项检测用什么仪器 浏览:910
库房阀门类怎么摆放 浏览:702
笔记本机械内存什么意思 浏览:860
地球是球体的模拟实验装置 浏览:212
洗车电机轴承怎么拆卸 浏览:230
夜晚餐饮用什么器材好 浏览:286
物流企业需要的设备有哪些 浏览:883
二手机械设备在哪个网站上找 浏览:729
溧阳制冷机服务方案多少钱 浏览:211
全自动半自动钩缓装置 浏览:633
排气阀门关不死怎么办 浏览:799
煤气阀门1000 浏览:495
仪表盘加电阻有什么用 浏览:441
健身器材怎么练后背 浏览:844
ecu在仪表中是什么意思 浏览:266
为什么逍客车空调不制冷 浏览:602
改装阀门有什么作用 浏览:819
什么设备需三相电 浏览:421
受损车辆制动性能检测装置 浏览:221