
하드웨어의 구조와 특성을 운영체제나 소프트웨어가 이해할 수 있도록 기술한 데이터 구조
보드의 하드웨어 정보를 리눅스 커널에 전달하기 위한 텍스트 기반의 데이터 구조
arch/arm/boot/dts 또는 arch/arm64/boot/dts 경로에 있음실제 로드되는 파일

compatible 속성을 읽고, 자신과 호환된다는 것을 확인reg 주소와 interrupts 정보를 사용하여 이더넷 통신을 시작전체 데이터 포맷
/dts-v1/;
/ {
node1 {
a-string-property = "A string";
a-string-list-property = "first string", "second string";
// hex is implied in byte arrays. no '0x' prefix is required
a-byte-data-property = [01 23 34 56];
child-node1 {
first-child-property;
second-child-property = <1>;
a-string-property = "Hello, world";
};
child-node2 {
};
};
node2 {
an-empty-property;
a-cell-property = <1 2 3 4>; /* each number (cell) is a uint32 */
child-node1 {
};
};
};
/ “node1” 및 “node2”child-node1” 및 “child-node2”/home/smjeon/yocto/sources/meta-ma35d1
recipe-core recipe-devtools recipes-graphics recipes-image recipes-kernel ...
/home/smjeon/shared/yocto/sources/meta-ma35d1/recipes-kernel/linux/linux-ma35d1_5.4.181.bb
# Copyright (C) 2019-2020
# Copyright 2019-2020 Nuvoton
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "Linux Kernel provided and supported by Nuvoton"
DESCRIPTION = "Linux Kernel provided and supported by Nuvoton ma35d1"
inherit kernel
# We need to pass it as param since kernel might support more then one
# machine, with different entry points
ma35d1_KERNEL_LOADADDR = "0x80080000"
KERNEL_EXTRA_ARGS += "LOADADDR=${ma35d1_KERNEL_LOADADDR}"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
SRCBRANCH = "linux-5.4.y"
LOCALVERSION = "-${SRCBRANCH}"
KERNEL_SRC ?= "git://github.com/OpenNuvoton/MA35D1_linux-5.4.y.git;protocol=https"
SRC_URI = "${KERNEL_SRC}"
SRC_URI += " \
file://optee.config \
file://cfg80211.config \
"
SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', '88x2bu', ' file://88x2bu.ko', '', d)}"
SRCREV="${KERNEL_SRCREV}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
DEPENDS += "openssl-native util-linux-native libyaml-native"
DEFAULT_PREFERENCE = "1"
# =========================================================================
# Kernel
# =========================================================================
# Kernel image type
KERNEL_IMAGETYPE = "Image"
do_configure_prepend() {
bbnote "Copying defconfig"
cp ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
cat ${WORKDIR}/cfg80211.config >> ${WORKDIR}/defconfig
if ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}; then
cat ${WORKDIR}/optee.config >> ${WORKDIR}/defconfig
fi
}
do_deploy_append() {
for dtbf in ${KERNEL_DEVICETREE}; do
dtb=`normalize_dtb "$dtbf"`
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
ln -sf $dtb_base_name.dtb ${DEPLOYDIR}/Image.dtb
done
}
do_install_append() {
if [ -e ${WORKDIR}/88x2bu.ko ]; then
install -d ${D}/${base_libdir}/modules/${PV}
install -m 0644 ${WORKDIR}/88x2bu.ko ${D}/${base_libdir}/modules/${PV}/88x2bu.ko
fi
}
FILES_${PN} += "${base_libdir}/modules/${PV}/${@bb.utils.contains('DISTRO_FEATURES', '88x2bu', '88x2bu.ko', '', d)}"
COMPATIBLE_MACHINE = "(ma35d1)"


meta-layer/recipe-kernel/linux 디렉토리에 <보드명>.bbappend 와 같은 파일 생성SRC_URI += file://<보드명>.dts" 와 같이 새로운 <보드명>.dts 파일 추가하고, FILESEXTRAPATHS_prepend := "${DIR}/${PN}:"을 설정하여 빌드 시스템이 이 파일을 인식할 있도록 함로컬 소스 수정 : .dts 파일을 열어 수정
git patch 생성 : 변경 사항을 git 패치 파일로 만듦
git add arch/arm64/boot/dts/git commit -m "Add my dts changes"git format-patch HEAD-1패치 적용 : 생성된 패치 파일을 Yocto 레시피에 추가하여 다음에 빌드할 때 자동으로 수정사항 적용토록 함