在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → 设备树学习资料

设备树学习资料

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:1.10M
  • 下载次数:7
  • 浏览次数:223
  • 发布时间:2020-07-24
  • 实例类别:一般编程问题
  • 发 布 人:robot666
  • 文件格式:.zip
  • 所需积分:2
 

实例介绍

【实例简介】
device tree的绝好学习材料。简明扼要,举例恰当。深入学习device tree的话还需要配合源码,入门使用的话,本材料足以。该文档出自网站:http://free-electrons.com/ 该网站也是linux内核、android、嵌入式学习的很好网站
A genda User perspective: booting with the Device Tree Basic device Tree syntax and compilation Simple example of Device Tree fragment Overall organization of a device tree Examples of device Tree usage General considerations about the device tree in linux FreeElectrons.Kernel,driversandembeddedLinuxdevelopmentconsultingtrainingandsupporthttp://free-electrons.com User perspective: before the Device Tree The kernel contains the entire description of the hardware The bootloader loads a single binary, the kernel image, and executes it e iMage or zImage The bootloader prepares some additional information, called ATAGS, which address is passed to the kernel through register r2 Contains information such as memory size and location, kernel command line, etc The bootloader tells the kernel on which board it is being booted through a machine type integer, passed in register r1 U-Boot command: bootm <kernel img addr> Barebox variable: bootm image FreeElectrons.Kernel,driversandembeddedLinuxdevelopmentconsultingtrainingandsupporthttp://free-electrons.com User perspective: before the Device Tree ATAGS RAM lmage 1 = <machine type> r2= <pointer to atags> FreeElectrons.Kernel,driversandembeddedLinuxdevelopmentconsultingtrainingandsupporthttp://free-electrons.com 5/1 User perspective: booting with a Device Tree The kernel no longer contains the description of the hardware it is located in a separate binary the device tree blob The bootloader loads two binaries: the kernel image and the DTB Kernel image remains uImage or zImage DTB located in arch/arm/boot/dts, one per board s The bootloader passes the dtb address through r 2. It is supposed to adjust the dtb with memory information, kernel command line and potentially other info No more machine type U-Boot command bootm <kernel img addr>- <dtb addr> Barebox variables: bootm image, bootm oftree FreeElectrons.Kernel,driversandembeddedLinuxdevelopmentconsultingtrainingandsupporthttp://free-electrons.com 6/1 User perspective: booting with a Device Tree DTB RAM lmage 1= don 't care r2 <pointer to DTB> FreeElectrons.Kernel,driversandembeddedLinuxdevelopmentconsultingtrainingandsupporthttp://free-electrons.com User perspective: compatibility mode for dT booting Some bootloaders have no specific support for the device Tree, or the version used on a particular device is too old to have this support To ease the transition, a compatibility mechanism was added CONFIG ARM APPENDED DTB It tells the kernel to look for a dtB right after the kernel mage there is no built-in Makefile rule to produce such kernel so one must manually do cat arch/arm/boot/zImage arch/arm/boot/dts/myboard dtb > my-zImage mkimage -d my-zImage my-uImage In addition the additional option CONFIG ARM ATAG DTB coMPAT tells the kernel to read the ATAGS information from the bootloader, and update the dt using them FreeElectrons.Kernel,driversandembeddedLinuxdevelopmentconsultingtrainingandsupporthttp://free-electrons.com 8/1 o'h What is the Device Tree? Quoted from the Power. org Standard for Embedded Power Architecture Platform Requirements(ePAPR) The ePaPr specifies a concept called a device tree to describe system hardware. a boot program loads a device tree into a client program's memory and passes a pointer to the device tree to the client ba device tree is a tree data structure with nodes that describe the physical devices in a system An ePAPR-compliant device tree describes device information in a system that cannot be dynamically detected by a client progra FreeElectrons.Kernel,driversandembeddedLinuxdevelopmentconsultingtrainingandsupporthttp://free-electrons.com Basic Device Tree syntax Node name Unit address roperty name /{ Property value node@θ a-string-property ="A string"; Properties of node@o a-string-list-property ="first string","second string a-byte-data-property =[0x01 0x23 0x34 0x56] child-node@o t first-child-property i Bytestring second-child-property a-reference-to-something =<&nodel>: child-node@l t (reference to another node Label nodel: node@l t an-empty-property a-cell-property = <1 2 3 4>; child-node@θ Four cells (32 bits values) FreeElectrons.Kernel,driversandembeddedLinuxdevelopmentconsultingtrainingandsupporthttp://free-electrons.com 【实例截图】
【核心代码】

标签:

实例下载地址

设备树学习资料

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警