본문 바로가기

device tree5

device tree 참조 device tree를 작성 할 때 참조를 사용한다 정확하게 참조를 하면 어떤것이 어떤것을 참조하여 컴파일하면서 어떻게 되는지 확인해보자 라즈베리파이 3b+ 에서 fdtdump를 사용해 device tree를 덤프 하고 dtb와 비교해보자 linux/arch/arm/boot/dts/bcm2710-rpi-3-b.dts &mmcnr { pinctrl-names = "default"; pinctrl-0 = ; bus-width = ; status = "okay"; }; 여래 부분에서 참조하는 것으로 분석하면 헷갈리니 하나만 참조하는것으로 확인하자 참조되는 파일은 아래이다 bcm270x.dtsi mmcnr: mmcnr@7e300000 { compatible = "brcm,bcm2835-mmc", "brcm,bc.. 2023. 11. 19.
unflatten_device_tree -> __unflatten_device_tree 분석 device tree 파일을 자료구조에 넣는 함수이다 /** * unflatten_device_tree - create tree of device_nodes from flat blob * * unflattens the device-tree passed by the firmware, creating the * tree of struct device_node. It also fills the "name" and "type" * pointers of the nodes so the normal device-tree walking functions * can be used. */ void __init unflatten_device_tree(void) { __unflatten_device_tree(initial_b.. 2023. 5. 17.
디버깅 방법 1. device tree를 컴파일한 bcm2710-rpi-3-b.dtb를 hexdump를 사용하여 아스키코드로 확인 가능하다 hexdump bcm2710-rpi-3-b.dtb -C 00000000 d0 0d fe ed 00 00 80 ab 00 00 00 48 00 00 73 d4 |...........H..s.| 00000010 00 00 00 28 00 00 00 11 00 00 00 10 00 00 00 00 |...(............| 00000020 00 00 0c d7 00 00 73 8c 00 00 00 00 00 00 00 00 |......s.........| 00000030 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 |............ 2023. 5. 12.
Linux and the Device tree 문서 정리 아래에 있는 문서에서 중요한 내용을 정리해보자 Kernel Devicetree Usage Linux and the Devicetree Linux에서 device tree를 사용하는 방법은 아래 사이트에서 문서를 보면 알 수 있다. https://www.devicetree.org/specifications/ Specifications Devicetree.org is a community effort by many companies and individuals to facilitate the future evolution of the Devicetree Standard. www.devicetree.org binding이라는 용어는 gpio, interrupt, data buss 등 물리적 하드웨어를 표현하는.. 2023. 5. 9.