Linux内核启动流程中设备树相关内容
Linux 内核启动流程
----设备树的识别 曹忠明
ARM Linux 内核在 Linux-3.x 内核有了很大的变化,对一些新的平台的支持取消了传统的
设备文件而用设备树取代,这里以 FS4412 设备树识别为例说明 Linux 是如何识别设备树的。
1、 设备树文件
FS4412 设备树文件(exynos4412-fs4412.dts)部分内容:
/*
1
* Insignal's Exynos4412 based Origen board device tree source
2
*
3
* Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4
*
5
*
6
* Device tree source file for Insignal's Origen board which is based on
7
* Samsung's Exynos4412 SoC.
8
*
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License version 2 as
11
* published by the Free Software Foundation.
12
*/
13
14
/ dts - v1 /;
15
#include "exynos4412.dtsi"
16
17
/
18
{
19
model = "Insignal Origen evaluation board based on Exynos4412";
20
compatible = "insignal,origen4412", "samsung,exynos4412";
21
22
memory {
23
reg = <00;
24
};
25
26
chosen {
27
bootargs = "root=/dev/nfs nfsroot=20:/source/rootfs init=/linuxrc console=ttySAC2,115200
28
};
29
30
firmware@0203F000 {
31
compatible = "samsung,secure-firmware";
32 reg = <0x0203F000 0x1000>;
33 };
34
35 srom - cs1@5000000 {
36 compatible = "simple-bus";
37 #address-cells = <1>;
38 #size-cells = <1>;
39 reg = <0x5000000 0x1000000>;
40 ranges;
41
42 ethernet@5000000 {
43 compatible = "davicom,dm9000";
44 reg = <0x5000000 0x2 0x5000004 0x2>;
45 interrupt - parent = ;