Hi,
We’re currently migrating from WinCE to Linux, using Toradex’ provided BSPs based on Yocto.
My current test module is a Colibri IMX8QXP 2GB (No Wifi), existing module is the Colibri T30.
For now, all the development and testing takes place on the IMX8 module (Using BSP 5.7), but keep in mind that at a later time the existing T30 should be ported from CE to Linux as well (BSP 2.8). It’s preferable to keep the changes between the two images as small as possible (That’s why device tree overlays are not used on the imx8, for example).
We’re using a custom carrier board, that has already undergone some hardware revisions, and more are likely. That’s why the IMX8 should be backwards compatible to eralier (but still active) revisions as well.
To determine the current board’s revision, we’re using Digital Inputs, which are binary coded: SODIMM 138,140 and 142. Further SODIMM 129 and 135.
Now my idea would be to create different device trees when required and decide which one to use depending on the revision. As far as I’ve seen, that should be possible from within u-boot, because it’s possible to read the GPIOs there.
However, the problem is that all this pins should be configured to pull down for proper detection, which most aren’t by default. Probably other configuration might be required as well, e.g. changing the default UART for debugging.
I’ve read that it’s possible to modify u-boot to change the pin layout and other hardware configuration. I’ve seen the file “imx8qxp_mek.c” has been mentioned in a few related discussions, most notably here: A step-by-step guide to bringing up your NXP i.MX8 - PathPartnerTech
I think I’ve also found the file on the related git for toradex: imx8qxp_mek.c « imx8qxp_mek « freescale « board - u-boot-toradex.git - U-Boot bootloader for Apalis and Colibri modules
Related files/directories on the site:
- configs/imx8qxp_mek_defconfig
- arch/arm/dts/fsl-imx8qxp-mek.dts
- board/freescale/imx8qxp_mek/
It seems that u-boot is not checked out as source code in yocto, I can’t find the “imx8qxp_mek.c” or other related files in the build/ directory.
Now my questions:
- Is the approach using u-boot to detect the revision & select dtb sensible? If not, what’s best practice?
- Where can I find or add the u-boot source in yocto to make my modifications?
- What’s the best way to modify these files? using a .patch or duplicate the files with a different name?
If something is unclear or more information is required, let me know.
Regards,
Simon