WB Solo stuck in u-boot

You have a problem with your Wandboard and want to ask the community for help.

WB Solo stuck in u-boot

Postby sbr15 » Fri Jul 01, 2016 1:36 pm

Hi,

I am trying to use the Wandboard for the first time and failing miserably. I can't even get the thing to boot.

I tried multiple images from wandboard.org (Ubuntu 15.10, Yocto 1.5 QT5), writing them to three different SD cards using the Win32DiskImager.
Power supply is a lab supply that can supply 3A, current limit is set to 3A.

I do not have any other cables connected exept for power and RS-232.

On the serial console I get one or two lines from u-boot but no kernel booting and no u-boot commandline. These are the complete contents of my console (putty) window after multiple attempts:
Code: Select all
U-Boot SPL 2013.10 (Dec 10 2014 - 13:13:38)
Boot Device: UNKNOWN
### ERROR ### Please RESET the board ###

U-Boot SPL 2013.10 (Dec 10 2014 - 13:13:38)
Boot Device: UNKNOWN
### ERROR ### Please RESET the board ###

U-Boot SPL 2014.10-01206-g8cc2739 (Nov 06 2015 - 15:54:21)

U-Boot SPL 2014.10-01206-g8cc2739 (Nov 06 2015 - 15:54:21)

U-Boot SPL 2013.10-00006-g6cbc41c (Feb 12 2015 - 18:54:16)
Boot Device: SD0

U-Boot SPL 2016.07-rc2-00082-gff6e156 (Jul 01 2016 - 14:52:52)
Trying to boot from MMC1


I even tried using imx_usb -- producing the same result. I tried three different SD cards. I tried compiling my own u-boot (the 2016* version), but that didn't change anything, either.

Any suggestions on what I might be doing wrong?

Sebastian
sbr15
 
Posts: 6
Joined: Fri Jul 01, 2016 1:26 pm

Re: WB Solo stuck in u-boot

Postby ClayMontgomery » Fri Jul 01, 2016 3:24 pm

Be sure you are using the version of u-boot for wandboard solo, not dual or quad versions.

Regards, Clay
ClayMontgomery
 
Posts: 70
Joined: Tue Nov 19, 2013 9:14 pm

Re: WB Solo stuck in u-boot

Postby sbr15 » Fri Jul 01, 2016 7:31 pm

Hi Clay,

I read that for a u-boot with SPL, the processor variant should not matter. Also, all images on wandboard.org (except Ubuntu 12.04) say "WB All", so I assumed that they work for the WB Solo.

Do I need to change anything to get the "WB All" images to work on the WB Solo?

Sebastian

PS: Found the source again for SPL: http://www.wandboard.org/index.php/58-20140117-video-playback-part1
sbr15
 
Posts: 6
Joined: Fri Jul 01, 2016 1:26 pm

Re: WB Solo stuck in u-boot

Postby sbr15 » Mon Jul 04, 2016 7:06 am

Hi,

I seems that the 1-2 lines of output are coming from the SPL (stage1?) and nothing is coming from stage2/u-boot.img. Makes sense to me that I did something wrong when writing the u-boot I compiled to the SD card. I don't understand why the same thing happens using the stock images.

Code: Select all
~/u-boot$ strings SPL | grep "U-Boot SPL"
U-Boot SPL 2016.07-rc2-00082-gff6e156 (Jul 01 2016 - 14:52:52)
~/u-boot$ strings u-boot.img | grep "U-Boot SPL"
~/u-boot$
sbr15
 
Posts: 6
Joined: Fri Jul 01, 2016 1:26 pm

Re: WB Solo stuck in u-boot

Postby Tapani » Mon Jul 04, 2016 8:38 am

Code: Select all
U-Boot SPL 2013.10 (Dec 10 2014 - 13:13:38)


That looks a bit .. old?

Have you tried a another SD card with a newer image? (Try that just to debug what is going wrong)
Tapani
Site Admin
 
Posts: 705
Joined: Tue Aug 27, 2013 8:32 am

Re: WB Solo stuck in u-boot

Postby sbr15 » Mon Jul 04, 2016 9:44 am

Hi,

look a bit further down in the terminal log. I tried numerous different U-Boot versions and images... all with the same result. I compiled my own U-boot: same result. They all hang after showing the version of the U-boot SPL.

Sebastian
sbr15
 
Posts: 6
Joined: Fri Jul 01, 2016 1:26 pm

Re: WB Solo stuck in u-boot

Postby sbr15 » Mon Jul 04, 2016 1:48 pm

Hi,

I still don't understand what's going on. I tried sprinkling some puts() on the U-boot SPL code to see where it hangs. Here is the console output I get from my Wandboard loading the newly compiled U-boot:

Code: Select all
U-Boot SPL 2016.07-rc2-dirty (Jul 04 2016 - 15:40:43)
Trying to boot from MMC1
fsl_esdhc_mmc_init()
fsl_esdhc_mmc_init(): calloc returned NULL


The code apparently never reaches the return from fsl_esdhc_mmc_init().
Does this help to track down the problem?

I am using the U-boot repository from denx.de. This are the only changes to the code:

Code: Select all
$ git remote show origin
* remote origin
  Fetch URL: http://git.denx.de/u-boot.git
  Push  URL: http://git.denx.de/u-boot.git
  HEAD branch: master
  Remote branches:
    master           tracked
    next             tracked
    origin           tracked
    u-boot-2009.11.y tracked
    u-boot-2013.01.y tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (local out of date)
$ git diff
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index b7b4f14..7fde021 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -829,9 +829,20 @@ int fsl_esdhc_mmc_init(bd_t *bis)
 {
        struct fsl_esdhc_cfg *cfg;
 
+       puts("fsl_esdhc_mmc_init()\n");
+
        cfg = calloc(sizeof(struct fsl_esdhc_cfg), 1);
+
+       if(cfg == NULL)
+       {
+               puts("fsl_esdhc_mmc_init(): calloc returned NULL\n");
+       }
+
        cfg->esdhc_base = CONFIG_SYS_FSL_ESDHC_ADDR;
        cfg->sdhc_clk = gd->arch.sdhc_clk;
+
+
+       puts("fsl_esdhc_mmc_init(): 1\n");
        return fsl_esdhc_initialize(bis, cfg);
 }
sbr15
 
Posts: 6
Joined: Fri Jul 01, 2016 1:26 pm

Re: WB Solo stuck in u-boot

Postby sbr15 » Thu Jul 07, 2016 11:58 am

Hi all,

I played around a bit more and found out that -- at least in the U-boot I compiled myself -- all calls to malloc/calloc return NULL. This causes the SPL to crash when initializing the SD card because the return value of calloc() is not checked in fsl_esdhc_mmc_init().

I don't know how to check if the same thing is happening in the precompiled images from wandboard.org. In any case it doesn't make sense to me why this would only fail on my wandboard using the same binaries everyone else is using.
Is there any kind of hardware defect that could cause this behaviour? Failing DDR RAM initialization or something like that? Unfortunately I currently don't have a second Wandboard to verify any of these unlikely theories...

The wandboard I work with s fairly old, at least 2 or 3 years from what I'm told. The i.MX6 module is rev. A1, the baseboard rev. C1.

Sebastian
sbr15
 
Posts: 6
Joined: Fri Jul 01, 2016 1:26 pm


Return to Getting started

Who is online

Users browsing this forum: mukeiei and 13 guests