I’m trying to patch the u-boot device tree for a verdin imx8mp board. The image builds fine, but my change is not reflected. Here is what I tried.
I built the tdx-reference-minimal image using Yocto. I added a bbappend in the workspace layer. I can see that the bbappend is being picked up by Yocto.
arah@ubuntu:/media/sarah/drive/build/tmp/work/verdin_imx8mp-tdx-linux$ bitbake-layers show-appends u-boot-toradex
/usr/lib/python3/dist-packages/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
from collections import Mapping
NOTE: Starting bitbake server...
WARNING: You have included the meta-tpm layer, but 'tpm or tpm2' has not been enabled in your DISTRO_FEATURES. Some bbappend files and preferred version setting may not take effect. See the meta-tpm README for details on enabling tpm support.
Loading cache: 100% |########################################################################################################| Time: 0:00:03
Loaded 4751 entries from dependency cache.
WARNING: No recipes in default available for:
/media/sarah/drive/build/../layers/meta-toradex-nxp/recipes-bsp/imx-mkimage/imx-mkimage_1.0.bbappend
/media/sarah/drive/build/../layers/meta-toradex-nxp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.0.imx.bbappend
Summary: There were 2 WARNING messages.
=== Matched appended recipes ===
u-boot-toradex_2022.07.bb:
/media/sarah/drive/build/../layers/workspace/appends/u-boot-toradex_%.bbappend
u-boot-toradex_2022.04.bb:
/media/sarah/drive/build/../layers/workspace/appends/u-boot-toradex_%.bbappend
Here is my bbappend:
SRC_URI:append = " file://0001-change-gpio-mode.patch "
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
And my patch
From 827387a090b43573c2004c7dd5e01d0d70f88ef8 Mon Sep 17 00:00:00 2001
From: sarah
Date: Tue, 12 Mar 2024 09:27:28 -0700
Subject: [PATCH] change gpio mode
---
arch/arm/dts/imx8mp-verdin.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/dts/imx8mp-verdin.dts b/arch/arm/dts/imx8mp-verdin.dts
index 19ce3ee193..d61bf989e9 100644
--- a/arch/arm/dts/imx8mp-verdin.dts
+++ b/arch/arm/dts/imx8mp-verdin.dts
@@ -374,7 +374,7 @@
pinctrl_ctrl_sleep_moci: ctrlsleepmocigrp {
fsl,pins = <
- MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x1c4 /* SODIMM 256 */
+ MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x104 /* SODIMM 256 */
>;
};
--
2.25.1
After the image is built, I can go to the build directory and see that the imx8mp-verdin.dts file does reflect my change.
I then put my board into recovery mode and used the easy installer to install the image. The installation succeeded, but the git hash of u-boot was not updated to reflect my patch. It still shows
ver=U-Boot 2022.04-6.6.0-devel+git.ef90b0f339f2 (Jan 31 2024 - 17:51:48 +0000)
I also checked in u-boot to see what dtb was being used, and then extracted the tezi image generated by my yocto build and decompiled the corresponding dtb file with this command
dtc -I dtb -O dts -o devicetree.dts imx8mp-verdin-wifi-dev.dtb
I checked the resulting devicetree.dts file and saw that my change was not applied (the value was still 0x1c4, not 0x104).
Is there something different I should be doing to get my patch applied? Should I be patching a different file? Is u-boot-toradex not the right recipe to be appending?