u-boot error: "switch failed"

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


The error message “switch failed” that you are seeing in U-Boot 2020.04-5.7.6+git.e72d2f7c00a1 before jumping to the Linux kernel on the internal MMC is not present in the newer BSP 6.7.0. This suggests that the issue might have been resolved in the newer BSP version.

Analysis:

  1. Error Message: The “switch failed” messages indicate that U-Boot is attempting to switch something (likely MMC partitions or devices) and failing to do so.
  2. BSP Version Difference: The absence of the error in BSP 6.7.0 suggests that there have been fixes or changes in the U-Boot code or configuration that address this issue.

Potential Causes:

  • MMC Initialization: There might be an issue with how the MMC is initialized or accessed in the older U-Boot version.
  • Device Tree Overlays: The application of device tree overlays might be causing issues in the older version.
  • Kernel Compatibility: There might be compatibility issues between the U-Boot version and the Linux kernel version being used.

Recommendations:

  1. Upgrade to BSP 6.7.0: Since the issue is not present in BSP 6.7.0, it is recommended to upgrade to this version if possible. This will ensure you have the latest fixes and improvements.
  2. Check U-Boot Configuration: Compare the U-Boot configuration (defconfig) between the two BSP versions to identify any significant changes that might be related to MMC handling.
  3. Review Device Tree Overlays: Ensure that the device tree overlays being applied are correct and compatible with your hardware setup.

Harmfulness for Production:

  • Potential Impact: If the “switch failed” errors are related to MMC initialization or partition switching, it could potentially lead to issues with accessing the MMC, which might affect booting or data integrity.
  • Testing: Thoroughly test the system to ensure that the error does not cause any functional issues. If the system boots and operates correctly despite the error, it might be benign, but this cannot be guaranteed without detailed testing.

Conclusion:

While the error might not immediately appear harmful if the system boots and operates correctly, it is advisable to upgrade to BSP 6.7.0 to avoid potential issues in production. If upgrading is not feasible, further investigation into the U-Boot configuration and device tree overlays for BSP 5.7.6 is necessary to identify and resolve the root cause of the error.

Please, also check if these links can help you solve your problem:

Verdin iMX8M Plus: Enabling ecspi1 in u-boot.