1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-06-02 17:01:04 +00:00

linux-ti-*: Add filtering for which dtb/dtbo to include

We often carry more dtbs/dtbos in our kernel than we have upstreamed.
The inclusion of all of the dtb/dtbo in the KERNEL_DEVICETREE has become
problematic as we start testing the linux-next and 6.1 as part of our
LTS migration.  To address this issue we are adding in two step method
for managing the KERNEL_DEVICETREE.

Going forward we will only accept dtb/dtbo in KERNEL_DEVICETREE if it is
available in upstream.  This way we ensure that the variable is more
accurate for whichever kernel you might be looking at.  We have also
added a new variable KERNEL_DEVICETREE_PREFIX which our kernel recipes
will use to auto set KERNEL_DEVICETREE based on what files are in the
kernel and not a fixed list in the conf files.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
This commit is contained in:
Ryan Eatmon
2023-03-17 10:20:53 -05:00
parent 2d5d741f9b
commit 4baa0cbd9b
20 changed files with 115 additions and 189 deletions
@@ -39,34 +39,11 @@ SRC_URI += " \
SRCREV_ti-upstream-tools = "0f60697843bba6f8d721b14da92b1652563ccb95"
SRCREV_FORMAT = "linux"
KERNEL_DEVICETREE = ""
kernel_do_compile:append() {
oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
oe_runmake -C ${S}/ti-upstream-tools LINUX=${S} DTC=${B}/scripts/dtc/dtc O=${B} CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
}
do_install:append() {
for dtbf in `find arch/${ARCH}/boot/dts/ \( -name '*.dtb' -or -name '*.dtbo' \)`; do
dtb="$dtbf"
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
install -m 0644 $dtbf ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
done
}
do_deploy:append() {
for dtbf in `find arch/${ARCH}/boot/dts/ \( -name '*.dtb' -or -name '*.dtbo' \) -printf '%P\n'`; do
dtb="$dtbf"
dtb_ext=${dtb##*.}
dtb_base_name=`basename $dtb .$dtb_ext`
dtb_dir=`dirname $dtb`
install -d ${DEPLOYDIR}
install -m 0644 ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext ${DEPLOYDIR}/$dtb_base_name.$dtb_ext
done
}
do_shared_workdir:prepend() {
cd ${B}
echo >> Module.symvers