i.MX6 core-image-base-imx6qsabresd.sdcard won't boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6 core-image-base-imx6qsabresd.sdcard won't boot

4,689 Views
jpe1313
Contributor II

I'm using the i.MX6  SABRE MCIMX6Q-SDB   out of the box the Android boots from the SC card but I need to use Yocto and I need a "core-image-base."

So, I utilized the MOST CURRENT (I think) Freescale Yocto Project User's Guide, Rev. 0, 04/2016 and successfully got a "core-image-base-imx6qsabresd.sdcard"   which is an 84.0 MB file.

When I image the SD card with dd as per section 6.1 Flashing an SD card image, I can see the following:

Boot imx6qs 8.4 MB FAT  - and that has  the "zImage" and the "imx6q-sabresd.dtb" file(s)     on /dev/sdd1

and /dev/sdd2   has the root file system. 

Here is the boot :

_____________________________________________________________________________

U-Boot 2015.04imx_v2015.04_4.1.15_1.2.0_ga+gede7538 (Sep 06 2016 - 17:19:19)

 

CPU: Freescale i.MX6Q rev1.5 at 792 MHz

CPU: Temperature 24 C

Reset cause: POR

Board: MX6-SabreSD

I2C: ready

DRAM: 1 GiB

PMIC: PFUZE100 ID=0x10

MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2

*** Warning - bad CRC, using default environment

 

No panel detected: default to Hannstar-XGA

Display: Hannstar-XGA (1024x768)

In: serial

Out: serial

Err: serial

switch to partitions #0, OK

mmc1 is current device

Net: FEC [PRIME]

Normal Boot

Hit any key to stop autoboot: 0

switch to partitions #0, OK

mmc1 is current device

reading boot.scr

** Unable to read file boot.scr **

reading zImage

Error reading cluster

** Unable to read file zImage **

Booting from net ...

FEC Waiting for PHY auto negotiation to complete......... TIMEOUT !

BOOTP broadcast 1

BOOTP broadcast 2

BOOTP broadcast 3

BOOTP broadcast 4

_____________________________________________________________________________

Oh, yes I checked and the SW6 on the board and it is set correctly - I.MX 6 SABRE-SD boards in the Linux User's Guide, Rev. L4.1.15_1.0.0-ga, 03/2016 Table 8  -- which I expected because the Android boots from the SD card. 

I REALLY NEED HELP SOLVING THIS - THANKS in ADVANCE

Labels (3)
0 Kudos
Reply
12 Replies

2,840 Views
sandeep_yenugul
Contributor III

Hi What is the last solution for this issue.

0 Kudos
Reply

2,840 Views
keno
Contributor II

I also experienced a similar problem and found a solution in a commit message for the u-boot project from April 2016.  The text of that commit message is

mx6ul_evk does not come with a eMMC populated, so we should not
define CONFIG_SUPPORT_EMMC_BOOT as it causes SPL to not be able
to boot some brands of SD cards, such as SanDisk microSD HC - 8GB:

U-Boot SPL 2016.05-rc1-28384-g108f841 (Apr 19 2016 - 11:19:11)
Trying to boot from MMC1
spl: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

When CONFIG_SUPPORT_EMMC_BOOT is defined spl_boot_mode() returns
MMCSD_MODE_EMMCBOOT, so remove this option to have a reliable boot
via SD card.

This referenced a different board than I was using, but the problem was the same.  The microSD card I experienced the problem with was a SanDisk 4GB.

The CONFIG_SUPPORT_EMMC_BOOT is defined in /include/configs/mx6xxxxx.h in the u-boot source and is specific to your board configuration.

Hope that helps.

0 Kudos
Reply

2,840 Views
timlapsley
Contributor I

Janet, we've just experienced similar pain flashing an image on two different 8GB Patriot SD cards, both yielding the same error as you:

reading zImage

Error reading cluster

After seeing your post we decided to try a 16GB Kingston and suddenly it was ok. All cards were class 10.

0 Kudos
Reply

2,840 Views
jpe1313
Contributor II

So,turns out that I tried 3 other SD cards and same story.  I tried a SanDisk from my QP board and it boots!

What's up with SD cards and u-boot?

0 Kudos
Reply

2,840 Views
Balaji_ng
Contributor III

Hi Janet,

    You could try to compare the partition table of your failed SD Cards with the working ones and check if you can recover any of them.

BTW, these days even I am encountering many faulty (inconsistent) SD cards.

Regards,

Balaji

2,840 Views
jpe1313
Contributor II

Balaji,

Thanks for the advice.  The weird thing is that on a regular PC I can see all the files.  Do you have a SD card brand that seems to be most reliable?

0 Kudos
Reply

2,840 Views
jpe1313
Contributor II

So, from looking more at the u-boot and what "printenv" has which is above, u-boot FIRST tries to boot from the SD card, I think, but the commands are unsuccessful so then it tries the net:

So, does that mean the SD card is not correct?  

WHEN I DO THINGS MANUALLY I GET

=> mmc dev 1

switch to partitions #0, OK                                        

mmc1 is current device

COMMENT -- this seems fine to me because /dev/sdd1 was where I saw the zImage and .dtb

=> mmc rescan

=> fatload mmc 1:1 0x12000000 boot.src

reading boot.src

** Unable to read file boot.src **

COMMENT -- so here I'm in trouble !! 

=> fatload mmc 1:1 0x12000000 zImage

reading zImage

Error reading cluster

** Unable to read file zImage **

COMMENT -- so here I'm in MORE Trouble !!

SO, IF I CAN SEE THE FILES ON THE SD-CARD what can cause this problem??

THANKS IN ADVANCE

0 Kudos
Reply

2,840 Views
jpe1313
Contributor II

I can also do:

=> mmc rescan

=> fatls mmc 1

6618968   zimage

45464      imx6q-sabresd.dtb

 -- other .dtb files --

6 file(s), 0 dir(s)

=>

SO THAT LEADS ME TO BELIEVE that the "zimage" is ???   with the Error reading cluster ???

0 Kudos
Reply

2,840 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Please check U-boot environment - if it is set properly for SD boot.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

2,840 Views
jpe1313
Contributor II

Yuri,

What does that mean? How do I check that?

Thanks

Janet

0 Kudos
Reply

2,840 Views
Balaji_ng
Contributor III

Hi Janet,

   On the terminal, when the string "Hit any key to stop autoboot:" appears, just press any key. You will be presented with a terminal. You need to enter "printenv" command.  You need to pay more attention to "bootcmd" environment variable.

For further details on environment variables, you could refer to the following link:

UBootEnvVariables < DULG < DENX 

Regards,

Balaji.V

0 Kudos
Reply

2,840 Views
jpe1313
Contributor II

Balaji,

O.K. so here is what "printenv" shows with the u-boot.

------------------------------------------------------------------------------------------------------

=> printenv

baudrate=115200

boot_fdt=try

bootcmd=mmc dev ${mmcdev};if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimi

bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};

bootdelay=1

bootscript=echo Running bootscript from mmc ...; source

console=ttymxc0

emmcdev=2

epdc_waveform=epdc_splash.bin

ethact=FEC

ethaddr=00:04:9f:04:18:c2

ethprime=FEC

fdt_addr=0x18000000

fdt_file=imx6q-sabresd.dtb

fdt_high=0xffffffff

image=zImage

initrd_addr=0x12C00000

initrd_high=0xffffffff

ip_dyn=yes

loadaddr=0x12000000

loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};

loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}

loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}

mfgtool_args=setenv bootargs console=ttymxc0,115200 rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.re

mmcargs=setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot}

mmcautodetect=yes

mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if;

mmcdev=1

mmcpart=1

mmcroot=/dev/mmcblk2p2 rootwait rw

netargs=setenv bootargs console=${console},${baudrate} ${smp} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfp

netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else sete;

script=boot.scr

update_emmc_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if ${gi

update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if mmc di

 

Environment size: 2678/8188 bytes

=>

---------------------------------------------------------------------------------------------------------------------------------------------------

So, being new to this, how do I get this default to booting to the SD card?  I believe the variables are all ready for me so that if I booted from the "=>" prompt it might work, but I'm not sure of the syntax.

THANKS !!!

0 Kudos
Reply