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
已解决! 转到解答。