1. devicetree的解析过程
解析的是存在镜像文件中的config
从start_kernel到unflatten_dt_note
![](https://app.yinxiang.com/shard/s32/res/bf7a082c-26d0-4004-b633-7d6c7f698a25.png)
启动log信息
![](https://app.yinxiang.com/shard/s32/res/dd50f471-3a8c-432e-91d8-61502130eb9e.png)
2.platform根据dts解析后的结点,增加device的流程
![](https://app.yinxiang.com/shard/s32/res/faf0eabf-3792-439c-b625-4b002f58749d.png)
参考启动log
![](https://app.yinxiang.com/shard/s32/res/884d9da5-79ed-4bc4-9381-22ec4ac00264.png)
mt7620a.dtsi 的设备结点:
cpus这个结点在platform之前就已经使用,early_init_devtree函数
![](https://app.yinxiang.com/shard/s32/res/d9c3fc8f-d4ad-4ef4-9a12-37b209ef6c1f.png)
所以从cpuintc开始
![](https://app.yinxiang.com/shard/s32/res/b97fbec5-31b9-4302-ab91-d38419ed558b.png)
关键函数 platform_driver_register
__driver_attach
![](https://app.yinxiang.com/shard/s32/res/bca48d81-5e0d-4dc2-acfe-7a8b4788045a.png)
加载log
![](https://app.yinxiang.com/shard/s32/res/b3bccf91-c648-4502-8b04-f51a1810a92b.png)