Toradex easy installer from SD card

I am following the article Linux - Distro Boot to load Toradex Easy Installer on my Colibri iMX7D. However, when I run the command:

# run distro_bootcmd,  

the loading fails. The output is shown below.

I am unsure where the problem is. I have compiled the image using the guide: OpenEmbedded (core) - Toradex System/Computer on Modules.
I am using the Viola carrier board, with console connected through serial (i.e. no screen attached).

Output:

Colibri iMX7 # run distro_bootcmd                                                                                                                           
switch to partitions #0, OK                                                                                                                                 
mmc0(part 0) is current device                                                                                                                              
Scanning mmc 0:1...                                                                                                                                         
Found U-Boot script /boot.scr                                                                                                                               
reading /boot.scr                                                                                                                                           
2173 bytes read in 14 ms (151.4 KiB/s)                                                                                                                      
## Executing script at 87000000                                                                                                                             
445 bytes read in 89 ms (4.9 KiB/s)                                                                                                                         
** File not found /boot/ostree/torizon-82d4156fb4e2bf886241b9d3269f47e12ba2c3a2470529367fda9de4c7e1a5eb/devicetree- **                                      
7528960 bytes read in 277 ms (25.9 MiB/s)                                                                                                                   
2809234 bytes read in 155 ms (17.3 MiB/s)                                                                                                                   
Kernel image @ 0x81000000 [ 0x000000 - 0x72e200 ]                                                                                                           
ERROR: Did not find a cmdline Flattened Device Tree                                                                                                         
Could not find a valid device tree                                                                                                                          
SCRIPT FAILED: continuing...                                                                                                                                
switch to partitions #0, OK                                                                                                                                 
mmc1 is current device                                                                                                                                      
Scanning mmc 1:1...                                                                                                                                         
Found U-Boot script /boot.scr                                                                                                                               
reading /boot.scr                                                                                                                                           
464 bytes read in 12 ms (37.1 KiB/s)                                                                                                                        
## Executing script at 87000000                                                                                                                             
reading /tezi.itb                                                                                                                                           
21374744 bytes read in 935 ms (21.8 MiB/s)                                                                                                                  
## Loading kernel from FIT Image at 82100000 ...                                                                                                            
   Using 'config@imx7d-emmc' configuration                                                                                                                  
   Trying 'kernel@1' kernel subimage                                                                                                                        
     Description:  Linux Kernel 4.1                                                                                                                         
     Type:         Kernel Image                                                                                                                             
     Compression:  uncompressed                                                                                                                             
     Data Start:   0x821000dc                                                                                                                               
     Data Size:    5308472 Bytes = 5.1 MiB                                                                                                                  
     Architecture: ARM                                                                                                                                      
     OS:           Linux                                                                                                                                    
     Load Address: 0x81000000                                                                                                                               
     Entry Point:  0x81000000                                                                                                                               
     Hash algo:    md5                                                                                                                                      
     Hash value:   910fc4bfe6325ca943e1af0824a15957                                                                                                         
   Verifying Hash Integrity ... md5+ OK                                                                                                                     
## Loading ramdisk from FIT Image at 82100000 ...                                                                                                           
   Using 'config@imx7d-emmc' configuration                                                                                                                  
   Trying 'ramdisk@1' ramdisk subimage                                                                                                                      
     Description:  SquashFS RAMdisk                                                                                                                         
     Type:         RAMDisk Image                                                                                                                            
     Compression:  uncompressed                                                                                                                             
     Data Start:   0x826101fc                                                                                                                               
     Data Size:    15929344 Bytes = 15.2 MiB                                                                                                                
     Architecture: ARM                                                                                                                                      
     OS:           Linux                                                                                                                                    
     Load Address: unavailable                                                                                                                              
     Entry Point:  unavailable                                                                                                                              
     Hash algo:    md5                                                                                                                                      
     Hash value:   bf0a406d6fa572c48f601023ca980bd2                                                                                                         
   Verifying Hash Integrity ... md5+ OK                                                                                                                     
## Loading fdt from FIT Image at 82100000 ...                                                                                                               
   Using 'config@imx7d-emmc' configuration                                                                                                                  
   Trying 'fdt@imx7d-emmc' fdt subimage                                                                                                                     
     Description:  Colibri iMX7 Dual 1GB eMMC Device Tree                                                                                                   
     Type:         Flat Device Tree                                                                                                                         
     Compression:  uncompressed                                                                                                                             
     Data Start:   0x83557184                                                                                                                               
     Data Size:    45372 Bytes = 44.3 KiB                                                                                                                   
     Architecture: ARM                                                                                                                                      
     Hash algo:    md5                                                                                                                                      
     Hash value:   b34140d2c5400aef8309a51bb7486030                                                                                                         
   Verifying Hash Integrity ... md5+ OK                                                                                                                     
   Booting using the fdt blob at 0x83557184                                                                                                                 
   Loading Kernel Image ... OK                                                                                                                              
   Loading Device Tree to 8fff1000, end 8ffff13b ... OK                                                                                                     
                                                                                                                                                            
Starting kernel ...                                                                                                                                         
                                                                                                                                                            
[    1.000304] CPU1: failed to come online                                                                                                                  
[    1.296782] imx_usb 30b10000.usb: Can't register ci_hdrc platform device, err=-517                                                                       
[    1.467665] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.504300] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.537008] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.570746] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.607876] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.642015] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.677144] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.714246] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.748320] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.782398] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.816468] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.850577] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.884650] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.918731] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.952802] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    1.986873] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.019979] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.055088] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.090198] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.122252] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.154320] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.186392] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.218496] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.251590] caam 30900000.caam: failed to acquire DECO 0                                                                                                 
[    2.256915] caam 30900000.caam: failed to instantiate RNG                                                                                                
[    2.262623] Trying to vfree() nonexistent vm area (b4063000)                                                                                             
[    2.270158] Unable to handle kernel NULL pointer dereference at virtual address 00000004                                                                 
[    2.278259] pgd = 80004000                                                                                                                               
[    2.281033] [00000004] *pgd=00000000                                                                                                                     
[    2.284638] Internal error: Oops: 805 [#1] SMP ARM                                                                                                       
[    2.289435] Modules linked in:                                                                                                                           
[    2.292517] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W       4.1.44-1.8.0+gf3637519a6aa #1                                                        
[    2.301393] Hardware name: Freescale i.MX7 Dual (Device Tree)                                                                                            
[    2.307147] task: b407c000 ti: b4062000 task.ti: b4062000                                                                                                
[    2.312555] PC is at caam_sm_startup+0x8c/0x3cc                                                                                                          
[    2.317094] LR is at device_add+0x150/0x568                                                                                                              
[    2.321286] pc : [<804c03dc>]    lr : [<8037504c>]    psr: a0000113                                                                                      
[    2.321286] sp : b4063ec8  ip : 00000000  fp : 00000000                                                                                                  
[    2.332770] r10: 00000000  r9 : 808f4624  r8 : 00000000                                                                                                  
[    2.338002] r7 : 808dab9c  r6 : b779d838  r5 : b4176a10  r4 : b4211840                                                                                   
[    2.344536] r3 : b5386400  r2 : b5386410  r1 : 00000000  r0 : b5386400                                                                                   
[    2.351072] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel                                                                          
[    2.358388] Control: 10c5387d  Table: 8000406a  DAC: 00000015                                                                                            
[    2.364140] Process swapper/0 (pid: 1, stack limit = 0xb4062210)                                                                                         
[    2.370154] Stack: (0xb4063ec8 to 0xb4064000)                                                                                                            
[    2.374522] 3ec0:                   804d476c 808dab9c 00000000 b5386400 b4176a10 8090b920                                                                
[    2.382711] 3ee0: 8090b920 b5370b00 808dab9c 00000000 808f4624 00000007 00000000 808dabec                                                                
[    2.390899] 3f00: 8090b920 80009678 80911c64 808f4600 00000000 80141aac 80911d00 b4113700                                                                
[    2.399087] 3f20: 00000000 809105c4 80885748 000000ac b7fffb3f 800453a4 00000000 80822284                                                                
[    2.407276] 3f40: 00000006 00000006 b7fffb4a 807d11a4 809105ac 000000ac 80951000 000000ac                                                                
[    2.415464] 3f60: 80951000 80951000 808fe0e4 808f461c 808f4624 808b4db8 00000006 00000006                                                                
[    2.423652] 3f80: 808b45a0 80654750 00000000 80654750 00000000 00000000 00000000 00000000                                                                
[    2.431841] 3fa0: 00000000 80654758 00000000 8000f3a8 00000000 00000000 00000000 00000000                                                                
[    2.440029] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                                                
[    2.448217] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff 80020000                                                                
[    2.456413] [<804c03dc>] (caam_sm_startup) from [<808dabec>] (caam_sm_init+0x50/0x58)                                                                    
[    2.464259] [<808dabec>] (caam_sm_init) from [<80009678>] (do_one_initcall+0x8c/0x1d0)                                                                   
[    2.472190] [<80009678>] (do_one_initcall) from [<808b4db8>] (kernel_init_freeable+0x144/0x1d4)                                                          
[    2.480904] [<808b4db8>] (kernel_init_freeable) from [<80654758>] (kernel_init+0x8/0xe8)                                                                 
[    2.489009] [<80654758>] (kernel_init) from [<8000f3a8>] (ret_from_fork+0x14/0x2c)                                                                       
[    2.496590] Code: e59d300c e2832010 e5843008 e5834068 (e58a2004)                                                                                         
[    2.502733] ---[ end trace f68425b0a7de93ab ]---                                                                                                         
[    2.507376] mmc0: MAN_BKOPS_EN bit is not set                                                                                                            
[    2.511837] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b                                                                      
[    2.511837]                                                                                                                                              
[    2.520984] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Hi @petternorgren and Welcome to the Toradex Community!

Which version of Toradex Easy Installer are you using?

I am unsure where the problem is. I have compiled the image using the guide: https://developer.toradex.com/knowledge-base/board-support-package/openembedded-(core)

Which version and image (console, lxde, …) did you compile?
Could you try to use a regular Bsp 2.8b6?

Thanks and best regards,
Jaski

Hello @jaski.tx

I am using the Toradex Easy Installer v1.8 for Colibri iMX7 (https://docs.toradex.com/104570-colibri-imx7-toradexeasyinstaller.zip). The image I have compiled is the console image v3.0 (Colibri-iMX7-eMMC_Console-image-Tezi_3.0b2). I also tried using the console image from the Easy Installer article (https://docs.toradex.com/106596-colibri-imx7-dual-1gb-(emmc)-linux-console-image-beta-tezi.tar) and I also tried the 2.8 image with GUI (https://docs.toradex.com/104970-colibri-imx7-dual-1gb-(emmc)-linux-lxde-image-tezi.tar), but they both resulted in the same error as shown above.

In my latest test, the structure of my SD card is as follows (ext4-format):

sd-card-root

  1. Colibri-iMX7-eMMC_LXDE-Image-Tezi_2.8b6.184 (folder with all Image files)
  2. (all easy installer files)
  3. image_list.json

The content of my image_list.json is:
{
“config_format”: 1,
“images”: [
“Colibri-iMX7-eMMC_LXDE-Image-Tezi_2.8b6.184/image.json”
]
}

The only command I run after booting into u-boot is: run distro_bootcmd

Thanks.

Best regards,
Petter Norgren

Hi @petternorgren

Thanks for your Information.

Did you follow up these instructions to correctly partition the SD card?

Best regards,
Jaski

Hello @jaski.tx

I have tested with the boot and rootfs partitioning (with both a custom compiled image and using the precompiled Colibri-iMX7-eMMC_LXDE-Image-Tezi_2.8b6.184 image). All results in kernel panic after running ‘run distro_bootcmd’.

Any further suggestions for debugging?

Thanks.

Best regards,
Petter Norgren

An update:

If I try to boot from the SD-card, the process hangs at ‘Starting kernel …’.

See the full output in attached file.

U-boot output

File not found /boot/ostree/torizon-82d4156fb4e2bf886241b9d3269f47e12ba2c3a2470529367fda9de4c7e1a5eb/devicetree-

Did you have some Torizon stuff installed and are still using their U-Boot? Most likely that is not compatible with anything else I’m afraid. Please make sure to have either the Toradex Easy Installer’s U-Boot or the one from a recent regular Embedded Linux BSP Image installed.

BTW:

sd-card-root

  1. Colibri-iMX7-eMMC_LXDE-Image-Tezi_2.8b6.184 (folder with all Image files)

  2. (all easy installer files)

  3. image_list.json

No such image_list.json would be required as this is for network type stuff only.

Thank you, that might be the problem. I have a second iMX7 that I unpacked and tested, and the SD card was working fine.

How do I install a new U-boot on the iMX7 with the wrong U-boot?

Thanks.

How do I install a new U-boot on the iMX7 with the wrong U-boot?

You just need to install Bsp 2.8b or Toradex Easy installer using Toradex Easy Installer in recovery mode as explained here.

Best regards,
Jaski

Thanks! Will the USB OTG approach work from a Viola carrier board?

One more thing I am again trying to install a new disto to the second iMX7 (the one that I installed Colibri-iMX7-eMMC console image v3.0b using the Toradex Easy Installer). However, when I try to load the Toradex Easyinstaller using the same SD card I used previosly, I get the following u-boot output from the “run distro_bootcmd” (complaining about wrong image format for source command).

Yes, you need to have Viola Plus Carrier Board.

However, when I try to load the Toradex Easyinstaller using the same SD card I used previosly, I get the following u-boot output from the “run distro_bootcmd” (complaining about wrong image format for source command).

Did this work with Bsp 2.8b6?

Hello @jaski.tx

On the first SoC I can now flash a new OS by inserting the SD card (after loading Toradex Easy Installer over USB OTG). However, on the second SoC I get the error I showed above when running the “distro_bootcmd” (I flashed the same OS on both boards using the USB OTG approach).

So you mean, you installed the exact same image on both modules and the distro_boot_cmd is woking on one module?
Could you provide the serial boot log of regular boot of both modules (without distro_cmd) and with distro_cmd?

Thanks and best regards,
Jaski

Yes, I installed the exact same image on both, and the distro_bootcmd only worked on one. I had to run a recovery of the first SoC today (I managed to erase the eMMC through Toradex Easy Installer), and now they are both failing on the distro_bootcmd. Attached is the boot logs from both SoC (normal and failed distro_bootcmd).

boot-logs

Thanks for the log. What is content of your boot.scr?
Did you try to run sdboot from U-Boot?

Attached is my easy installer boot.scr.

It doesn’t work to use the sdboot, since I ended up with only using a single partition for the sdcard. I can repartition it and try again.

When I issue: “run sdboot” I get the following output:

  • Colibri iMX7 # run sdboot
  • Booting from MMC/SD card…
  • 5799240 bytes read in 264 ms (20.9 MiB/s)
  • Colibri iMX7 #

Nothing more happens.

HI @petternorgren

Sorry for the delayed answer. I did not have time to look into this issue. I will come back to you next week.

Best regards,
Jaski

Dear @petternorgren,

I did following steps to boot from sd card testing, instructions almost same from here but with slight changes.

  1. Download Colibri-iMX7-eMMC_LXDE-Image-Tezi_2.8b6.184 image
  2. Make two partitions in sd card with ext4 format. Don’t format FAT32.
  3. Copy boot files and rootfs files into the respective directory.
  4. cp imx7d-colibri-emmc-aster.dtb imx7d-colibri-eval-v3.dtb
  5. Insert SD card into carrier board and power ON the board.
  6. goto u-boot prompt, enter mmc dev 1 and then run sdboot.

I am working on your other reported issues. Meanwhile, could you test sd boot with 2.8B6 image and let us know the feedback.

Hello @petternorgren,

I had the same issue as you these days ago. The easiest way to solve this issue is by using the Toradex Easy Installer 2.0b2 version.

Just unpack the Toradex Easy Installer 2.0b2 and the image you want to install on a FAT32 flash device, plug it into your board and run the run distro_bootcmd command.

Have in mind that this Easy Installer version doesn’t have a VNC server by standard, however, you can connect using RDP.

Best regards,
Daniel Morais