How to add generated "padvoltage.dtsi" , "pinmux.dtsi" and "gpio.dtsi" file in yocto-build system to refelct the changes in final image

Hi Team,

I need to update minor change in gpio and pinmuxing and regenerate the dtsi file for the same.

I have checked that thing in this link:- Jetson Orin NX and Nano Series — NVIDIA Jetson Linux Developer Guide 1 documentation

Now i need to add this file into yocto-build system (OE4T/meta-tegra) and update the gpio and pinmux change on board. How do i integrate in yocto-recipe for MB1 (Micro-Bootloader) and create final full image of nvme which include my all the latest gpio and pinmux changes?

I am using NVIDIA Jetson orin Nano EVK and JetPack Version 6.2.0.

Machine :- MACHINE=“jetson-orin-nano-devkit-nvme”

Thanks,

Nisarg

Hi Nisarg,

The process is fairly similar:

  1. Generate the pinmux, gpio and padvoltage files, as the documentation states.

  2. In your yocto build, create a custom layer to append the add these modified files:

bitbake-layers create-layer ../meta-custom
bitbake-layers add-layer ../meta-custom

3. Create the .bbappend file and move the custom .dtsi files to the layer:

mkdir -p ../meta-custom/recipes-bsp/tegra-binaries/files
touch ../meta-custom/recipes-bsp/tegra-binaries/tegra-binaries_%.bbappend

cp tegra234-mb1-bct-pinmux-p3767-custom.dtsi
../meta-custom/recipes-bsp/tegra-binaries/files/

cp tegra234-mb1-bct-padvoltage-p3767-custom.dtsi
../meta-custom/recipes-bsp/tegra-binaries/files/

cp tegra234-mb1-bct-gpio-p3767-custom.dtsi
../meta-custom/recipes-bsp/tegra-binaries/files/

4. Add the following content to the .bbappend:

FILESEXTRAPATHS:prepend := “${THISDIR}/files:”

SRC_URI:append = "
file://tegra234-mb1-bct-pinmux-p3767-custom.dtsi
file://tegra234-mb1-bct-padvoltage-p3767-custom.dtsi
file://tegra234-mb1-bct-gpio-p3767-custom.dtsi
"

do_install:append() {
install -m 0644 ${WORKDIR}/tegra234-mb1-bct-pinmux-p3767-custom.dtsi
${D}${datadir}/tegraflash/bootloader/generic/BCT/

install -m 0644 ${WORKDIR}/tegra234-mb1-bct-padvoltage-p3767-custom.dtsi \
${D}${datadir}/tegraflash/bootloader/generic/BCT/

install -m 0644 ${WORKDIR}/tegra234-mb1-bct-gpio-p3767-custom.dtsi \
${D}${datadir}/tegraflash/bootloader/

}

5, In the local.conffor your machine, or in the local configuration file, add the following override lines:

TEGRA_FLASHVAR_PINMUX_CONFIG = “tegra234-mb1-bct-pinmux-p3767-custom.dtsi”
TEGRA_FLASHVAR_PMC_CONFIG = “tegra234-mb1-bct-padvoltage-p3767-custom.dtsi”

6. Clean and build the image:

bitbake -c cleansstate tegra-binaries

bitbake

After that, flash the board as usual and verify that the change was applied by running the following command in the board:

sudo cat /sys/kernel/debug/gpio
gpioinfo

If you have any other questions, I will be pleased to help. I hope you find this helpful!

Fabian Munoz
Embedded SW Engineer at RidgeRun

Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

Hi,
Please try Fabian’s suggestion. Also we suggest use Jetpack 7.2:
GitHub - OE4T/meta-tegra: BSP layer for NVIDIA Jetson platforms, based on L4T · GitHub

Hi Fabian, Thanks for the response.

We created a .bbappend from the steps you have provided and also bitbake the full-image;

 tegra-binaries_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 
SRC_URI:append = " \
file://pinmux.dtsi \
file://padvoltage.dtsi \
file://pinmux-gpio1.dtsi \
"
 
do_install:append() {
        install -m 0644 ${WORKDIR}/pinmux.dtsi
        ${D}${datadir}/tegraflash/bootloader/generic/BCT/
 
        install -m 0644 ${WORKDIR}/padvoltage.dtsi \
        ${D}${datadir}/tegraflash/bootloader/generic/BCT/
 
        install -m 0644 ${WORKDIR}/pinmux-gpio1.dtsi \
        ${D}${datadir}/tegraflash/bootloader/
 
}
tree meta-myboard/
meta-myboard/
├── conf
│   └── layer.conf
├── COPYING.MIT
├── README
├── recipes-bsp
│   └── tegra-binaries
│       ├── files
│       │   ├── padvoltage.dtsi
│       │   ├── pinmux.dtsi
│       │   └── pinmux-gpio1.dtsi
│       └── tegra-binaries_%.bbappend
└── recipes-example
    └── example
        └── example_0.1.bb
 
6 directories, 8 files

In local.conf file we have added below lines

TEGRA_FLASHVAR_PINMUX_CONFIG = "pinmux.dtsi"
TEGRA_FLASHVAR_PMC_CONFIG = "padvoltage.dtsi"

We have extracted the final “*devkit-nvme.rootfs-20260630052822.tegraflash.tar.gz” file and observed that “flashvar” file having variable updated as per the mentioned file in local.conf but the custom .dtsi file not availalable in the “.tar” file image.

From that point it seems that custom-dtsi file not included in final image file and it seems that do install doesn’t install at below location for custom-dtsi file. (Kindly provide proper solution on this)

build/tmp/work-shared/L4T-tegra-36.4.3-r0 /Linux_for_Tegra/bootloader/generic/BCT

Hi Nisarg,

Before making any changes, I’d like to verify that the .bbappend is applied correctly, that the custom DTSI files are present in SRC_URI, and that tegra-bootfiles exists in your build:

bitbake-layers show-appends | grep -A5 -E “tegra-binaries|tegra-bootfiles”

bitbake -e tegra-binaries | grep -E “SRC_URI=|pinmux.dtsi|padvoltage.dtsi|pinmux-gpio1.dtsi”

bitbake -e tegra-bootfiles | grep ^PN=

bitbake -e tegra-bootfiles | grep -E “SRC_URI=|pinmux.dtsi|padvoltage.dtsi|pinmux-gpio1.dtsi”

Fabian Munoz
Embedded SW Engineer at RidgeRun

Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com