Loading TEZI from SD-Card on BSP 6

Hello All,

I have an Apalis iMX6Q module on a custom carrier board running BSP 6. The Apalis module is running a custom OpenEmbedded Linux build.

root@dev-acu3:~# uname -a
Linux dev-acu3 6.1.46-rt13-6.4.0-devel+git.d50b0124e9a2 #1 SMP PREEMPT_RT Fri Aug 18 15:43:54 UTC 2023 armv7l armv7l armv7l GNU/Linux

I am trying to get it to boot in to TEZI from the SD-Card. I have downloaded the latest TEZI 6.5 (it also doesn’t work with TEZI 5). The boot process sees the SD-Card but does nothing with it. I have tried booting in to recovery mode and running

run bootcmd_mmc1

This states that no kernel can be found

Apalis iMX6 # run bootcmd_mmc1
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
2076 bytes read in 4 ms (506.8 KiB/s)
## Executing script at 18280000
80 bytes read in 3 ms (25.4 KiB/s)
35076228 bytes read in 1658 ms (20.2 MiB/s)
Bootargs: console=ttymxc0,115200 quiet video=DPI-1:640x480D video=HDMI-A-1:640x480-16@60D video=LVDS-1:d video=VGA-1:640x480-16@60D rootfstype=squashfs root=/dev/ram autoinstall
## Loading kernel from FIT Image at 14420000 ...
Could not find configuration node
ERROR: can't get kernel image!
SCRIPT FAILED: continuing...
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image

So is there some kind of magic trick to getting the Apalis module with BSP 6 to boot TEZI from the SD-Card. A long time ago, back in the BSP 2.8 days, this wasn’t ever an issue and just worked.

Thanks in advance for any assistance.

To add some additional information. I have been able to get the boot process to recognize the SD-Card and it appears to be attempting to do something. But fails with errors “can’t get kernel image”. It also appears to be attempting to connect to a TFTP server which I do not have something like that set up. The plan is to boot in to TEZI, swap the SD-Card with one that has the new OS image, then install. Any thoughts?

The output below is from an attempt to upgrade a module with BSP 5, but the result is the same on BSP 6.

Industrial temperature grade DDR3 timings.
Trying to boot from MMC1

U-Boot 2020.07-5.3.0-devel+git.0d93ac5de8b4 (May 30 2021 - 10:44:45 +0000)

CPU:   Freescale i.MX6Q rev1.6 at 792MHz
CPU:   Industrial temperature grade (-40C to 105C) at 28C
Reset cause: WDOG
DRAM:  2 GiB
PMIC:  device id: 0x10, revision id: 0x21, programmed
MMC:   FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Apalis iMX6 Quad 2GB IT V1.1C, Serial# 10618849
Net:   eth0: ethernet@2188000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
2478 bytes read in 18 ms (133.8 KiB/s)
## Executing script at 17000000
33013280 bytes read in 1580 ms (19.9 MiB/s)
170 bytes read in 14 ms (11.7 KiB/s)
Bootargs: console=ttymxc0,115200 quiet video=DPI-1:640x480D video=HDMI-A-1:640x480-16@60D video=LVDS-1:d video=VGA-1:640x480-16@60D rootfstype=squashfs root=/dev/ram autoinstall
## Loading kernel from FIT Image at 12200000 ...
Could not find configuration node
ERROR: can't get kernel image!
SCRIPT FAILED: continuing...
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
5769 bytes read in 14 ms (402.3 KiB/s)
## Executing script at 17000000
Loading DeviceTree: imx6q-apalis-acu3.dtb
Booting from mmc failed!
SCRIPT FAILED: continuing...
74092 bytes read in 21 ms (3.4 MiB/s)
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.125.44 (1004 ms)
Using ethernet@2188000 device
TFTP from server 192.168.125.24; our IP address is 192.168.125.44
Filename 'boot.scr'.
Load address: 0x17000000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
BOOTP broadcast 1
DHCP client bound to address 192.168.125.44 (2 ms)
Using ethernet@2188000 device
TFTP from server 192.168.125.24; our IP address is 192.168.125.44
Filename 'boot.scr'.
Load address: 0x11000000
Loading: T T T T T T T T T T
Retry count exceeded; starting again

Does anyone have any thoughts on this? Our carrier board does not have any USB, so really the only option for re-installing the OS is using the SD-Card and TEZI. As it stands now, we have to replace the Toradex module with one that has TEZI installed from the factory and that is a very painful process.

Here is the output from ‘tdx-info’

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.1.46-rt13-6.4.0-devel+git.d50b0124e9a2 #1 SMP PREEMPT_RT Fri Aug 18 15:43:54 UTC 2023
Kernel command line:      enable_wait_mode=off vmalloc=400M root=PARTUUID=8b7315e4-02 ro rootwait fec_mac=00:14:2d:a2:07:e0 consoleblank=0 no_console_suspend=1 console=tty1 console=ttymxc0,115200n8 mxc_hdmi.only_cea=1 fbmem=32M
Distro name:              NAME="Orbital Systems ACU-3 RT Distro"
Distro version:           VERSION_ID=3.1.1
Hostname:                 dev-acu3
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Apalis iMX6Q/D Module on ACU-3 Carrier Board
Toradex version:          0028 V1.1D
Serial number:            10618848
Processor arch:           armv7l
------------------------------------------------------------

You can order one of the Toradex carrier boards (Ixora, for example) and use it for OS reinstallation. If you need to reinstall or update the image on a regular basis, I would recommend using a solution like Over-The-Air (OTA) updates.

@alex.tx

Thank you for the response. So the issue is that we already have units deployed in the field. To do what you suggested would involve each customer sending their unit back from wherever in the world to get an upgrade. We are trying to avoid this by using TEZI. However I can’t seem to get TEZI to load from the SD-Card at boot. The OS update will include the ability to do remote updates so this problem is really a one time thing. But we have quite a few units deployed so we would like to avoid doing a swap for everyone.

Is there some trick to getting TEZI to load from an SD-Card? I have downloaded and extracted it as per the Toradex instructions. But U-Boot seems to not be able to recognize or is unable to do anything with it (see above messages).

Thank you for any additional assistance you can provide

Hi @morgan1361

Strangely, you are getting an error decoding the FIT image here. Perhaps unhelpfully, this all works for me on an Apalis i.MX6 with an Ixora carrier board and an SDCard.

Where are you downloading your TEZI image from? I don’t believe there is a TEZI 6.5 for the Apalis-imx6 and I 5.7.3+build.17 in my setup.

Drew

Links for TEZI downloads available here. The latest TEZI release version for Apalis iMX6 is 5.7.5+build.19

Though TEZI boot from an SD card not officially supported by Toradex it still works as expected.
I’ve tested it with an Apalis IMX6 D 512MB v1.1B module and Ixora carrier board.

Repro steps:

  • Install the Apalis-iMX6_Reference-Minimal-Image-upstream (TDX Wayland with XWayland Upstream 6.5.0+build.9 (kirkstone) apalis-imx6-0509527 ) using pre-flashed TEZI.
  • Reboot module to check if it boots to installed image correctly
  • Download 5.7.5+build.19 TEZI for Apalis iMX6
  • Format an SD card as FAT32
  • prepare it as described here.
  • Insert the SD card into Ixora board
  • Reboot
  • Module boots to TEZI.

@alex.tx @drew.tx

So I followed the above procedure exactly. Here was the outcome

Industrial temperature grade DDR3 timings.
Trying to boot from MMC1

U-Boot 2022.07-6.4.0-devel+git.e092e3250270 (Jul 11 2022 - 13:42:58 +0000)

CPU:   Freescale i.MX6Q rev1.6 at 792MHz
CPU:   Industrial temperature grade (-40C to 105C) at 42C
Reset cause: WDOG
DRAM:  2 GiB
PMIC:  device id: 0x10, revision id: 0x21, programmed
Core:  112 devices, 18 uclasses, devicetree: separate
MMC:   FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial@2020000
Out:   serial@2020000
Err:   serial@2020000
Model: Toradex 0028 Apalis iMX6Q 2GB IT V1.1C
Serial#: 10618848
Net:   eth0: ethernet@2188000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
2478 bytes read in 3 ms (806.6 KiB/s)
## Executing script at 18280000
33098964 bytes read in 1902 ms (16.6 MiB/s)
170 bytes read in 2 ms (83 KiB/s)
Bootargs: console=ttymxc0,115200 quiet video=DPI-1:640x480D video=HDMI-A-1:640x480-16@60D video=LVDS-1:d video=VGA-1:640x480-16@60D rootfstype=squashfs root=/dev/ram autoinstall
## Loading kernel from FIT Image at 18400000 ...
Could not find configuration node
ERROR: can't get kernel image!
SCRIPT FAILED: continuing...
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
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
5998 bytes read in 3 ms (1.9 MiB/s)
## Executing script at 18280000
Loading DeviceTree: imx6q-apalis-acu3.dtb
Failed to load 'imx6q-apalis-acu3.dtb'
Booting from mmc failed!
SCRIPT FAILED: continuing...
71170 bytes read in 5 ms (13.6 MiB/s)
BootOrder not defined
EFI boot manager: Cannot load any image
starting USB...
Bus usb@2184000: USB EHCI 1.00
Bus usb@2184200: USB EHCI 1.00
scanning bus usb@2184000 for devices... 1 USB Device(s) found
scanning bus usb@2184200 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
ethernet@2188000 Waiting for PHY auto negotiation to complete..... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.125.48 (1005 ms)
Using ethernet@2188000 device
TFTP from server 192.168.125.24; our IP address is 192.168.125.48
Filename 'boot.scr'.
Load address: 0x18280000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
BOOTP broadcast 1
DHCP client bound to address 192.168.125.48 (2 ms)
Using ethernet@2188000 device
TFTP from server 192.168.125.24; our IP address is 192.168.125.48
Filename 'boot.scr'.
Load address: 0x14200000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
## Error inserting "stdout" variable, errno=22
## Error inserting "stdin" variable, errno=22

Hi @morgan1361

Are you sure you followed the listed steps exactly? If you flash the Apalis-iMX6_Reference-Minimal-Image-upstream (TDX Wayland with XWayland Upstream 6.5.0+build.9 (kirkstone) apalis-imx6-0509527), the U-Boot output should display:
U-Boot 2022.07-6.5.0+git.e092e3250270 (Jul 11 2022 - 13:42:58 +0000)
while your boot logs shows:
U-Boot 2022.07-6.4.0-devel+git.e092e3250270 (Jul 11 2022 - 13:42:58 +0000)

@alex.tx

Well, I am using my own custom built OpenEmbedded distribution.

So is it possible that I have something configured wrong in my build (local.conf or somewhere else) that would prevent it from booting to TEZI?

I’d recommend flashing a Toradex-built image and trying to load the TEI from an SD card to ensure the SD card is prepared correctly and your hardware functions as expected. Afterward, comparing the U-Boot environment variable settings between your image and the Toradex images could provide insights into any discrepancies.

My best guess is that you are using a version of UBoot that may not have all the same configs as ours. Since you are using a newer UBoot version, it is likely that you are using the Yocto kirkstone upstream and may need to compare the defconfigs to see what is missing.

But the suggestion from @alex.tx would be a good first step to make sure it is not a hardware issue.

Drew

@drew.tx

Are the defconfigs for the OS and UBoot different? I have compared the one for the OS with mine and there doesn’t seem to be anything that would cause this (I can post them if desired).

Hi @morgan1361,

Sorry for the delay; for some reason I did not get a notification even with the at-mention. Weird.

It’s hard to say with certainty but I would expect the defconfigs to be different. Our BSP defconfigs are suitable for building with our layers, including meta-toradex-bsp-common and friends. In your case, it’s not clear why you are getting a different version of U-Boot. Can you share the steps showing how you created your repo config, the git hashes of your repos, and your conf/*.conf files? Sharing the linux and u-boot config would be good as well.

Drew