Dynamically load device tree before U-Boot loads

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynamically load device tree before U-Boot loads

Jump to solution
285 Views
TechTreeSelector
Contributor I

I've been tasked with dynamically selecting a device tree for U-Boot during factory testing. We test various product variants based on NXP i.MX8x, each with different GPIO and peripherals. The PCB variant isn't known to the processor but I need to select the correct device tree before U-Boot loads.

I have 3 device tree variants:

1. Base variant for general product startup and Linux boot.
2. Factory tests: variant 1 (inherits from DTS 1).
3. Factory tests: variant 2 (also inherits from DTS 1).

I've looked for ways to dynamically choose the device tree for U-Boot but found only methods for Linux (fdt_file/fdt_config). U-Boot's device tree seems fixed in the binary.

Ideas to solve this, listed by preference:

1. Use 8 dipswitches on all PCBs to determine the correct device tree and boot to U-Boot console.
2. Select the device tree manually in the U-Boot console then reload the U-Boot console with the new device tree selected.
3. Use UUU to load the correct dtb file during testing.

We use NXP's AHAB Secure boot, maybe I'm overlooking something and can load the correct device tree for U-Boot somewhere in AHAB?

Thanks for any help,
Taylor

0 Kudos
1 Solution
240 Views
Harvey021
NXP TechSupport
NXP TechSupport

Our default BSP doesn't support the operations and default image is uboot and kernel that are packaged in a CONTAINER. 

 

Regards

Harvey

View solution in original post

0 Kudos
4 Replies
177 Views
TechTreeSelector
Contributor I

These are very interesting and will probably be very helpful if we get time to revisit this in the future. I've bookmarked both links. Thanks for the help!

0 Kudos
241 Views
Harvey021
NXP TechSupport
NXP TechSupport

Our default BSP doesn't support the operations and default image is uboot and kernel that are packaged in a CONTAINER. 

 

Regards

Harvey

0 Kudos
178 Views
TechTreeSelector
Contributor I

That's what I was expecting. Thanks for verifying.

0 Kudos