Colibri iMX6D won't boot Torizon, how to recover?

I apparently did something wrong in an overlay file:

Applying Overlay: colibri-imx6_invertcd_overlay.dtbo
269 bytes read in 32 ms (7.8 KiB/s)

Even though the file is found, something throws an error and the device tree won’t load. How can I recover without a doing a full reinstall? I can’t find a way to delete or edit files in the ext4fs in the boot folder from within Uboot. There are FAT tools that allow such actions…

The complete boot to the freeze:

U-Boot 2020.07-5.5.0+git.421a6ba683f9 (Jan 01 1970 - 00:00:00 +0000)

CPU:   Freescale i.MX6DL rev1.4 at 792MHz
CPU:   Industrial temperature grade (-40C to 105C) at 29C
Reset cause: POR
DRAM:  512 MiB
PMIC:  wait_for_sr_state: Arbitration lost sr=93 cr=80 state=2020
i2c_init_transfer: failed for chip 0x8 retry=0
wait_for_sr_state: Arbitration lost sr=93 cr=80 state=2020
i2c_init_transfer: failed for chip 0x8 retry=1
wait_for_sr_state: Arbitration lost sr=93 cr=80 state=2020
i2c_init_transfer: failed for chip 0x8 retry=2
i2c_init_transfer: give up i2c_regs=0x21a4000
failed to get device for PMIC at address 0x8
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6 DualLite 512MB IT V1.1A, Serial# 10784400
Net:   eth0: ethernet@2188000
Hit any key to stop autoboot:  0
MMC: no card present
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
1182 bytes read in 12 ms (95.7 KiB/s)
## Executing script at 17000000
5374 bytes read in 22 ms (238.3 KiB/s)
62518 bytes read in 30 ms (2 MiB/s)
147 bytes read in 23 ms (5.9 KiB/s)
Applying Overlay: colibri-imx6_parallel-rgb_overlay.dtbo
766 bytes read in 32 ms (22.5 KiB/s)
Applying Overlay: colibri-imx6_stmpe-ts_overlay.dtbo
402 bytes read in 30 ms (12.7 KiB/s)
Applying Overlay: display-vga_overlay.dtbo
807 bytes read in 31 ms (25.4 KiB/s)
Applying Overlay: colibri-imx6_invertcd_overlay.dtbo
269 bytes read in 32 ms (7.8 KiB/s)
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
8376832 bytes read in 238 ms (33.6 MiB/s)
8051416 bytes read in 232 ms (33.1 MiB/s)
ERROR: Did not find a cmdline Flattened Device Tree
   Loading Ramdisk to 1f852000, end 1ffffad8 ... OK

Starting kernel ...

Greetings @mmccullotn,

Well if you are trying to avoid recovering and re-installing the system then there’s one method I can think of that might work.

First interrupt the boot process so you have access to the U-Boot prompt. Then in that prompt run ums 0 mmc 0. What this command does is turns the internal eMMC into a mountable USB-like device. Via USB OTG you can then edit the overlays.txt file from your development PC, and remove your bad overlay to allow the system to boot again.

Best Regards,
Jeremias

Thank you, can you elaborate on how to use the USB OTG with an Aster carrier with either a Windows or Linux host? I tried connecting to the X10 on the Aster to a Windows 11 host and I get a device (USB download gadget) that is “operating normally”, but I don’t know what to use to access it.

My Linux installs are all VMWare-based and I’m not getting any accessible media device when I switch the X10 connection from the Windows host to the Linux VM, although the udevadm monitor shows activity.

Do I treat this like an ADB device?

Ok, I finally got it to work after trying a half dozen different tools to try to access.

  • Had to remove all devices from X9 to get X10 to mount properly on my Windows 11 computer as a device.
  • Windows assigned a drive letter “J:”.
  • Of course, J: is not readable in Windows. Tried DiskInternals Linux Reader (free). It could read the drive, but could not edit.
  • Tried connecting the “USB download gadget” device in a Linux Mint 20.3 in VMWare. Never could get a “/media” device.
  • Started VMWare with Admin privileges on Windows and created a Hard Disk device on the “Physical Device” which was drive 3 in Windows, and connected it to the Linux Mint VM.
  • This drive mounted in /media in Linux Mint. With sudo privileges I was able to edit the overlays.txt file and recover the module.

Maybe this helps someone else!

Glad you were able to recover your device from this bad state.

Does “ums 0 mmc 0” work for the Verdin imx8mp as well? U-boot doesn’t have any problem with the command but nothing gets mounted in the host either. I don’t get any indicators from windows or ubuntu that it even detects a USB device.

@rlushster Are you sure that command works on Verdin i.MX8M Plus? When I run it on my setup I get a bad device error, which makes sense since the device “mmc 0” is not the internal eMMC on the i.MX8M Plus.

For the internal eMMC on this module you instead want to run ums 0 mmc 2, I believe. Also make sure you’re using the USB OTG port as that is what the mountable USB device will be instantiated on.

Best Regards,
Jeremias

Well I did try ums 0 mmc 2 a few times but didn’t have any luck until now. I must not have been waiting long enough. It works as expected now. Maybe I wasn’t plugged into the OTG port the first time I tried it.

Thank you!

Glad to hear it’s working now for you.