How to make changes to device tree of imx8mp-hummingboard-mate

Hello there, I’m new to Solidrun’s HummingBoard-mate and Yocto Builds.

I want to Enable UART-3 and UART-4, and it seems that I need to update device tree to Enable them, but so far I’m not able to do so.

I’m using hardknott-imx8mp branch from github - SolidRun / meta-solidrun-arm-imx8

After 1st build i.e. bitbake core-image-minimal, I’ve tried editing the imx8mp-ab2.dts and imx8mp-evk.dtb files, to do the changes in the final dtb file, but the changes are not reflecting.

Could anyone please guide me with this.??

Thanks and Warm Regards,
lokesh

The changes for the iMX8MP on our boards need to be done in the hummingboard-pulse device-tree files. It is easiest to just create a new patch with your changes on top of ours and then add it to our meta-layer in the .bbappend. All our hummingboards for the iMX8MP use the same device-tree.

Hi @jnettlet ,

As you said, I did the same. I’ve created a patch for imx8mp-hummingboard-pulse.dts, by using following command and I’ve updated respective bbappend file. After that I’ve cleaned the build and re-build the core-image-minimal, but the build get failed with the **[quote=“jnettlet, post:2, topic:463, full:true”]
The changes for the iMX8MP on our boards need to be done in the hummingboard-pulse device-tree files. It is easiest to just create a new patch with your changes on top of ours and then add it to our meta-layer in the .bbappend. All our hummingboards for the iMX8MP use the same device-tree.

The changes for the iMX8MP on our boards need to be done in the hummingboard-pulse device-tree files. It is easiest to just create a new patch with your changes on top of ours and then add it to our meta-layer in the .bbappend. All our hummingboards for the iMX8MP use the same device-tree.
[/quote]

** Could you please help me with this.?? My project development is gated by this.

[ERROR]: Application of .kernel-meta//patches//./0012-uart3-uart4-pinctrl.patch failed.
| Patch needs to be refreshed. Sample resolution script:
| .git/rebase-apply/resolve_rejects
| ERROR: Could not apply patches for imx8mpsolidrun.
| ERROR: Patch failures can be resolved in the linux source directory

Below is the Terminal Logs -

DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are ['virtual:native:/Users1/lokesh/MVIGS/imx-yocto1/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', '/Users1/lokesh/MVIGS/imx-yocto1/sources/poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot']
NOTE: Installed into sysroot: []
NOTE: Skipping as already exists in sysroot: ['patch-native', 'kern-tools-native', 'attr-native', 'automake-native', 'autoconf-native', 'libtool-native', 'quilt-native', 'gettext-minimal-native', 'texinfo-dummy-native', 'gnu-config-native', 'm4-native']
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_patch
(1/12) 0001-dt-ar803x-document-SmartEEE-properties.patch
(2/12) 0002-net-phy-at803x-add-support-for-configuring-SmartEEE.patch
(3/12) 0003-gpio-vf610-Fix-missing-include-for-pinctrl_.patch
(4/12) 0004-drm-bridge-it6161-Build-fix-for-a10ae796.patch
(5/12) 0005-ASoC-SOF-Add-missing-include-for-arm_smccc_smc.patch
(6/12) 0006-ASoC-fsl-Break-the-audio-cpu-dai-into-its-own-module.patch
(7/12) 0007-regulator-pca9450-Add-dt-property-pca-i2c-lt-en.patch
(8/12) 0008-net-rfkill-gpio-add-device-tree-support.patch
(9/12) 0009-regulator-userspace-consumer-add-DT-support.patch
(10/12) 0010-ARM64-dts-imx8mp-Add-SolidRun-iMX8MP-SOM-based-platf.patch
(11/12) 0011-ARM64-dts-imx8mp-Minor-dts-fixups.patch
(12/12) 0012-uart3-uart4-pinctrl.patch
[INFO]: check of .kernel-meta//patches//./0012-uart3-uart4-pinctrl.patch with "git am" did not pass, trying reduced context.
[INFO]: Context reduced git-am of .kernel-meta//patches//./0012-uart3-uart4-pinctrl.patch with "git am" did not work, trying "apply".
error: arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse.dts b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse.dts: does not exist in index
[ERROR]: Application of .kernel-meta//patches//./0012-uart3-uart4-pinctrl.patch failed.
         Patch needs to be refreshed. Sample resolution script:
             .git/rebase-apply/resolve_rejects
ERROR: Could not apply patches for imx8mpsolidrun.
ERROR: Patch failures can be resolved in the linux source directory /Users1/lokesh/MVIGS/imx-yocto1/build/tmp/work/imx8mpsolidrun-poky-linux/linux-imx/5.10.72+gitAUTOINC+a68e31b63f-r0/git)
WARNING: /Users1/lokesh/MVIGS/imx-yocto1/build/tmp/work/imx8mpsolidrun-poky-linux/linux-imx/5.10.72+gitAUTOINC+a68e31b63f-r0/temp/run.do_patch.125485:217 exit 1 from 'exit 1'
WARNING: Backtrace (BB generated script): 
	#1: bbfatal_log, /Users1/lokesh/MVIGS/imx-yocto1/build/tmp/work/imx8mpsolidrun-poky-linux/linux-imx/5.10.72+gitAUTOINC+a68e31b63f-r0/temp/run.do_patch.125485, line 217
	#2: do_patch, /Users1/lokesh/MVIGS/imx-yocto1/build/tmp/work/imx8mpsolidrun-poky-linux/linux-imx/5.10.72+gitAUTOINC+a68e31b63f-r0/temp/run.do_patch.125485, line 163
	#3: main, /Users1/lokesh/MVIGS/imx-yocto1/build/tmp/work/imx8mpsolidrun-poky-linux/linux-imx/5.10.72+gitAUTOINC+a68e31b63f-r0/temp/run.do_patch.125485, line 230
ERROR: Execution of '/Users1/lokesh/MVIGS/imx-yocto1/build/tmp/work/imx8mpsolidrun-poky-linux/linux-imx/5.10.72+gitAUTOINC+a68e31b63f-r0/temp/run.do_patch.125485' failed with exit code 1

It looks like your patch is failing to apply cleanly, or causing a conflict with the existing patches. I recommend you reference Yocto’s documentation regarding using devtool to manage your patches. 7 devtool Quick Reference — The Yocto Project ® 4.0.999 documentation

@jnettlet
Hi, I’ve recreated the patch and it got added into the system.
If we want to change aything inside the existing patch, we need to disable it first, then build the image, then create new patch with new changes and use the patch and rebuild. The changes will get updated.