본문 바로가기
device tree

device tree 연대기

by jsh91 2023. 5. 9.

임베디드 분야에서 일을 하면서 항상 궁금했던 device tree에 대한 내용을 정리하기 위한 공간이다

device tree를 알아야 gpio, spi, i2c 등등 많은 것들을 이해할 수 있다고 생각이 된다.

1. linux/of.h

2. drivers/of/하위 파일

Kconfig address.c configfs.c dynamic.c fdt_address.c kexec.c of_numa.c of_reserved_mem.c pdt.c property.c unittest-data Makefile base.c device.c fdt.c irq.c kobj.c of_private.h overlay.c platform.c resolver.c unittest.c

위 파일들이 내가 생각했을때 device tree에 대해 많은 정보를 가지고 있는 것으로 추측된다.

예상되는 시나리오는 아래와 같다

fdt parsing 하여 자료구조에 삽입 -> 자료구조에서 data를 가져와서 동작

이렇게만 보면 어려운게 없어 보이지만.. 나는 쉽지많은 않은거 같다

나에게 나름.. 긴 연대기를 이제 시작하려한다.. 화이팅

우선 아래 공식 linux kernel size에서 device tree에 대한 개념과 api가 있다 아래 순서대로 분석해 보자

https://docs.kernel.org/devicetree/index.html#kernel-devicetree-usage

 

Open Firmware and Devicetree — The Linux Kernel documentation

 

docs.kernel.org

Open Firmware and Devicetree

Kernel Devicetree Usage

Devicetree Overlays

Devicetree Bindings

'device tree' 카테고리의 다른 글

device tree 참조  (0) 2023.11.19
unflatten_device_tree -> __unflatten_device_tree 분석  (0) 2023.05.17
디버깅 방법  (0) 2023.05.12
Linux and the Device tree 문서 정리  (0) 2023.05.09

댓글