Colibri iMX6 won't boot after flashing Linux

Hello!

I have erased everything​ in eMMC from U-Boot with mmc erase 0 0x400. After that I have flashed Linux image using ./update -d but the module will not boot into Linux.
Without ./update.sh -d it will now no longer boot.

and this are infos from ./update.sh -d u boot

U-Boot 2016.11+fslc+g22e68cb (Jan 25 2017 - 11:15:17 +0100)

CPU:   Freescale i.MX6SOLO rev1.1 at 792 MHz
Reset cause: POR
I2C:   ready
DRAM:  256 MiB
PMIC:  device id: 0x10, revision id: 0x11, programmed
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
**CACHE: Misaligned operation at range [1ffb8035, 1ffb8835]
CACHE: Misaligned operation at range [1ffb8035, 1ffb8835]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x1ffb8035
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x1ffb8835
CACHE: Misaligned operation at range [1ffb8035, 1ffb8835]
CACHE: Misaligned operation at range [1ffb8035, 1ffb8835]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x1ffb8035
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x1ffb8835**
** First descriptor is NOT a primary desc on 0:1 **
auto-detected panel vga-rgb
Display: vga-rgb (640x480)
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6 Solo 256MB IT V1.0A, Serial# 04868013
Net:   using PHY at 0
FEC [PRIME]
Hit any key to stop autoboot:  0 
Colibri iMX6 #

Hi

It could have to do with the fuses or SPL.

Either you didn’t allow fusing the module or the SPL got not installed.

Did you follow the instructions on screen when migrating from the older image and did you answer yes when it wants to fuse the SoC to fast boot mode?

e.g. what is the output of the U-Boot command fuse read 0 5?

Starting with image V2.7 we use U-Boot together with an SPL to boot from eMMC. The SPL gets loaded by the bootrom into the SoC’s SRAM, executes and initializes the DDR RAM according to module type, then it loads U-Boot to DDR and executes it.

Maybe the update procedure did think it needn’t installing the SPL due to the randomly deleted areas on the eMMC.

You could try if booting into U-Boot from recovery mode (./update.sh -d) and doing a run setupdate followed by run update_spl fixes your issue.

Max

This is what an update from an ex. factory Colibri iMX6 could look like:

U-Boot 2015.04 (May 18 2015 - 14:17:54)

CPU:   Freescale i.MX6DL rev1.3 at 792 MHz
Reset cause: POR
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

auto-detected panel vga-rgb
Display: vga-rgb (640x480)
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6 DualLite 512MB V1.0A, Serial# 05051051
Net:   using phy at 0
FEC [PRIME]
Hit any key to stop autoboot:  0 
Colibri iMX6 # fuse read 0 5
Reading bank 0:

Word 0x00000005: 00005062


Colibri iMX6 # run setupdate
reading flash_blk.img
710 bytes read in 13 ms (52.7 KiB/s)
## Executing script at 10800000
reading colibri_imx6/flash_blk.img
4415 bytes read in 24 ms (178.7 KiB/s)
## Executing script at 12000000
enter "run update" to update the entire module
Colibri iMX6 # run update
mmc - MMC sub system

Usage:
mmc info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc hwpartition [args...] - does hardware partitioning
  arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
  WARNING: Partitioning is a write-once setting once it is set to complete.
  Power cycling is required to initialize partitions after set to complete.
mmc setdsr <value> - set DSR register value

switch to partitions #1, OK
mmc0(part 1) is current device

MMC read: dev # 0, block # 8191, count 1 ... MMC: block number 0x2000 exceeds max(0x1000)
0 blocks read: ERROR

MMC read: dev # 0, block # 4095, count 1 ... 1 blocks read: OK
byte at 0x10800001 (0x14) != byte at 0x12000009 (0x0)
Total of 1 byte(s) were the same
switch to partitions #1, OK
mmc0(part 1) is current device

MMC read: dev # 0, block # 8191, count 1 ... MMC: block number 0x2000 exceeds max(0x1000)
0 blocks read: ERROR

MMC read: dev # 0, block # 4095, count 1 ... 1 blocks read: OK
byte at 0x10800001 (0x14) != byte at 0x12000009 (0x0)
Total of 1 byte(s) were the same
switch to partitions #0, OK
mmc0(part 0) is current device

MMC read: dev # 0, block # 1280, count 1 ... 1 blocks read: OK
Total of 3 byte(s) were the same
switch to partitions #1, OK
mmc0(part 1) is current device

MMC write: dev # 0, block # 4095, count 1 ... 1 blocks written: OK
reading colibri_imx6/SPL
35840 bytes read in 21 ms (1.6 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

MMC write: dev # 0, block # 2, count 70 ... 70 blocks written: OK
reading colibri_imx6/u-boot.imx-spl
366544 bytes read in 44 ms (7.9 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

MMC write: dev # 0, block # 138, count 716 ... 716 blocks written: OK
successfully updated U-Boot, power-cycle and enter "run setupdate; run migrate" to complete update
Colibri iMX6 #


Commercial temperature grade DDR3 timings, 64bit bus width.
Trying to boot from MMC1


U-Boot 2016.11+fslc+g22e68cb (Jan 11 2017 - 22:25:19 +0100)

CPU:   Freescale i.MX6DL rev1.3 at 792 MHz
Reset cause: POR
I2C:   ready
DRAM:  512 MiB
PMIC:  device id: 0x10, revision id: 0x21, programmed
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

auto-detected panel vga-rgb
Display: vga-rgb (640x480)
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6 DualLite 512MB V1.0A, Serial# 05051051
Net:   using PHY at 0
FEC [PRIME]
Hit any key to stop autoboot:  0 


Colibri iMX6 # run setupdate; run migrate
reading flash_blk.img
710 bytes read in 14 ms (48.8 KiB/s)
## Executing script at 12000000
reading colibri_imx6/flash_blk.img
4415 bytes read in 24 ms (178.7 KiB/s)
## Executing script at 12000000
enter "run update" to update the entire module
switch to partitions #1, OK
mmc0(part 1) is current device

MMC read: dev # 0, block # 8191, count 1 ... MMC: block number 0x2000 exceeds max(0x1000)
0 blocks read: ERROR

MMC read: dev # 0, block # 4095, count 1 ... 1 blocks read: OK
Total of 3 byte(s) were the same
switch to partitions #0, OK
mmc0(part 0) is current device

MMC read: dev # 0, block # 1280, count 1 ... 1 blocks read: OK
Total of 3 byte(s) were the same
switch to partitions #1, OK
mmc0(part 1) is current device

MMC write: dev # 0, block # 4095, count 1 ... 1 blocks written: OK
switch to partitions #1, OK
mmc0(part 1) is current device

MMC read: dev # 0, block # 138, count 1 ... 1 blocks read: OK
reading colibri_imx6/SPL
35840 bytes read in 21 ms (1.6 MiB/s)
switch to partitions #1, OK
mmc0(part 1) is current device

MMC write: dev # 0, block # 2, count 70 ... 70 blocks written: OK
reading colibri_imx6/u-boot.imx-spl
366544 bytes read in 44 ms (7.9 MiB/s)
switch to partitions #1, OK
mmc0(part 1) is current device

MMC write: dev # 0, block # 138, count 716 ... 716 blocks written: OK
Fuse 0, 5:     5062
Warning: Programming fuses is an irreversible operation!
         Updating to fast boot mode prevents easy
         downgrading to previous BSP versions.

Really perform this fuse programming? <y/N>
y
Fusing fast boot mode...
done.
reading colibri_imx6/mbr.bin
512 bytes read in 15 ms (33.2 KiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

MMC write: dev # 0, block # 0, count 1 ... 1 blocks written: OK
reading colibri_imx6/boot.vfat
16777216 bytes read in 825 ms (19.4 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

MMC write: dev # 0, block # 8192, count 32768 ... 32768 blocks written: OK
reading colibri_imx6/uImage
4966856 bytes read in 259 ms (18.3 MiB/s)
writing uImage
4966856 bytes written
reading colibri_imx6/imx6dl-colibri-eval-v3.dtb
45168 bytes read in 26 ms (1.7 MiB/s)
writing imx6dl-colibri-eval-v3.dtb
45168 bytes written
reading colibri_imx6/root.ext3-100
67108864 bytes read in 3250 ms (19.7 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

MMC write: dev # 0, block # 40960, count 131072 ... 131072 blocks written: OK
reading colibri_imx6/root.ext3-101
67108864 bytes read in 3246 ms (19.7 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

...

MMC write: dev # 0, block # 827392, count 131072 ... 131072 blocks written: OK
reading colibri_imx6/root.ext3-107
** colibri_imx6/root.ext3-107 shorter than offset + len **
22020096 bytes read in 1084 ms (19.4 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device

MMC write: dev # 0, block # 958464, count 43008 ... 43008 blocks written: OK
resetting ...


Commercial temperature grade DDR3 timings, 64bit bus width.
Trying to boot from MMC1


U-Boot 2016.11+fslc+g22e68cb (Jan 11 2017 - 22:25:19 +0100)

CPU:   Freescale i.MX6DL rev1.3 at 792 MHz
Reset cause: WDOG
I2C:   ready
DRAM:  512 MiB
PMIC:  device id: 0x10, revision id: 0x21, programmed
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

auto-detected panel vga-rgb
Display: vga-rgb (640x480)
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6 DualLite 512MB V1.0A, Serial# 05051051
Net:   using PHY at 0
FEC [PRIME]
Hit any key to stop autoboot:  0 
Booting from internal eMMC chip...
reading imx6dl-colibri-eval-v3.dtb
45168 bytes read in 18 ms (2.4 MiB/s)
reading uImage
4966856 bytes read in 148 ms (32 MiB/s)
## Booting kernel from Legacy Image at 11000000 ...
   Image Name:   Linux-4.1.35-v2.7b1+gc117783
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4966792 Bytes = 4.7 MiB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 12000000
   Booting using the fdt blob at 0x12000000
   Loading Kernel Image ... OK
   Using Device Tree in place at 12000000, end 1200e06f

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.1.35-v2.7b1+gc117783 (linuxdev@linuxdev.toradex.int) (gcc version 5.2.1 20151005 (Linaro GCC 5.2-2015.11-2) ) #4 SMP Thu Jan 12 00:49:26 CET 2017
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
...

Hello!
the run update_spl did fix the issue but i have a question. can i put u boot on SD card and make the module boot completely from SD card?
I have read this article but the u boot must be on the eMMC.

i forget to give you information about fuse read 0 5

Colibri iMX6 # fuse read 0 5 Reading
bank 0:

Word 0x00000005: 00005072

Can i put U-Boot on SD card and make the module boot completely from SD card?

No, that is not possible due to all our modules being factory fused for eMMC boot.

I have read this article but the U-Boot must be on the eMMC.

Yes. The only thing one could potentially do is putting only a tiny shim into the eMMC which instructs the boot ROM to then continue booting off an SD card. You may actually find that discussion in the following question already.

Hello

the u boot always puts this errors if i select a partition

Colibri iMX6 # mmc dev 0
CACHE: Misaligned operation at range [1ffb8035, 1ffb8835]
CACHE: Misaligned operation at range [1ffb8035, 1ffb8835]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x1ffb8035
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x1ffb8835
CACHE: Misaligned operation at range [1ffb8035, 1ffb8835]
CACHE: Misaligned operation at range [1ffb8035, 1ffb8835]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x1ffb8035
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x1ffb8835
** First descriptor is NOT a primary desc on 0:1 **
switch to partitions #0, OK
mmc0(part 0) is current device

I think that happens if you don’t have a valid MBR on said eMMC.

What happens if you write one?
e.g.

run setupdate
run update_1

that’s right. I didn’t have a valid MBR on eMMC

output after giving update_1

Colibri iMX6 # run update_1
reading colibri_imx6/mbr.bin
512 bytes read in 14 ms (35.2 KiB/s)
CACHE: Misaligned operation at range [1ffb7db5, 1ffb85b5]
CACHE: Misaligned operation at range [1ffb7db5, 1ffb85b5]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x1ffb7db5
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x1ffb85b5
CACHE: Misaligned operation at range [1ffb7db5, 1ffb85b5]
CACHE: Misaligned operation at range [1ffb7db5, 1ffb85b5]
ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x1ffb7db5
ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x1ffb85b5
** First descriptor is NOT a primary desc on 0:1 **
switch to partitions #0, OK
mmc0(part 0) is current device

MMC write: dev # 0, block # 0, count 1 ... 1 blocks written: OK

but now i’m thinking about update_1 where can i found this script?
I have showed in colibri_imx6.h but it does not contain it

Run setupdate sets a bunch of U-Boot environment variables, among them update_1.

@Zanam please note that doing ./update.sh -d won’t flash anything. You would need to enter run setupdate; run update as well as explained here.

Alternatively you may try our new Toradex Easy Installer.

Hello,
I’m having the same problem ( BSP 2.4 )
After recovery a Colibril DualLite iMX6 (running all possible run update_ functions) , the u-boot is showing
U-Boot 2015.04 (May 04 2017 - 10:54:57)

CPU: Freescale i.MX6DL rev1.3 at 792 MHz
Reset cause: POR
I2C: ready
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1

This occurs after update the module using the recovery procedure, after remove the jumper the u-boot shows this message
Reset cause: POR

Hardware: Col IMX6DL 512MB V1.0A
BSP: 2.4

Regards,

Caio Pereira

Hi

If you really have the same problem, then the same solutions apply.

So what did you do, what are you trying to achieve and how does the system behave differently to what you expect.

Max