How to get a Yocto .sdcard to work properly

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

How to get a Yocto .sdcard to work properly

Jump to solution
13,949 Views
nestle
Contributor III

Guys,

I need some help.  I've been trying for the past couple of weeks to create a bootable image on an sdcard for the Sabre Lite board (i.MX6q).

I've downloaded Yocto Dizzy and followed the instructions to bitbake an image (core-image-minimal).

I've got the .sdcard file generate.

But when I flash the .sdcard file onto an sdcard :

sudo dd if=core-image-minimal.imx6qsabrelite.sdcard of=/dev/sdX bs=1M

..and put the sdcard into the Sabre Lite board, it does not boot.  Nothing happens.


Am I doing something wrong?


The card generates 4 partitions : unallocated (4MB), /dev/sdg1 (fat 16, 8MB) , /dev/sdg2 (ext3, 8MB), unallocated (4MB)

Of the above, 4.57MB of /dev/sdg1 is used and listed with the lba flag.   Meanwhile 5.98MB of /dev/sdg2 is used.

I had thought the the flashing of the .sdcard above would be sufficient to generate a fully booting image on the Sabre Lite.  Do I have to do anything extra?  Like copy the u-boot.imx and Image file to the /boot directory or something?

Please help me.  Thanks for your help

Labels (3)
0 Kudos
1 Solution
5,835 Views
nestle
Contributor III

Steve, I think I finally got it booting with a Yocto image!

Your explanation above helped put me on the right track.

Before I go on any further, I'd like to thank you for all your efforts.  You were the only one here who was willing to lend your time to help me.  I wish I could buy you a beer.  The best I can do for now is draw you this beer glass as a sign of my gratitude.

\_/   <-- yea that's it :smileysad:

Please send me your email address if you can as I would like to stay in touch with you. (not for bugging you about Linux I promise)

To cut a long story short, I ended up doing 2 things to get the Sabre Lite board to boot :

1) Downgrading the bootloader from 2014-07 to 2009

2) Upgrading the bootloader from 2008 back to 2014-07

I'm sure a more experienced person could have come up with a better solution.  But this seems to have worked its magic.

I'm gonna catalog what I did below as best I can remember.  That way some poor lost soul may find his way out of this mess without trekking through the muck I had to go through.  Please remember these are notes I scribbled down in a hurry so there may be errors in them.  Check the webpages I mention in my description below for a more accurate description and syntax of commands.

Here goes :

HOW I RESTORED MY SABRE LITE BOARD TO WORKING CONDITION (after going through hell)

1) To get the Sabre Lite board back to operational form with a proper bootloader I decided to downgrade the bootloader to 2009 and then upgrade the bootloader back to 2014-07.

2) I visited the webpage on element14 website called "Getting Started with Sabre Lite (i.MX6)".  To unbrick a Sabre Lite board, set the jumpers as shown on that page.  The jumper closest to the word "Boot" on the board should be near the B (of Boot).  The next jumper should be in the opposite direction close to the chip.

3) Then download a program called imx_usb from boundary devices.

4) Download also the 2009 bootloader from the element 14 webpage mentioned in #2.

5) Download the latest U-boot 2014-07 from Boundary Devices webpage (for later use in upgrading the bootloader).  It comes as a zipped/tarred file with all kinds of u-boot related goodies in there.  I forgot the name of the file but just look for the latest u-boot in the search on the webpage and you should find it.  In my case, the file of interest was u-boot.nitrogen6q which is the 2014-7 bootloader for the Sabre Lite board.  Also compatible with Nitrogen boards. 

6) I formatted a micro sdcard to ext2 format.  From the downloaded zip file in #5, I extracted a file called "6x_upgrade" and some file which I renamed to "u-boot.imx".  I put both "6x_upgrade" and "u-boot.imx" on the micro sdcard and put it in the board's micro sdcard slot.

7) I set the jumpers as described in #2 and connected the microUSB connector to the Sabre Lite board & computer.

8) I then powered up the Sabre Lite board.  You should see something that says "Freescale SE..blah blah ARIK" show up under the USB devices in your Virtual Box or VMware.  Tick it to ensure its selected.  If you dont' see it show up, your jumpers are probably set incorrectly.  Unplug the power, reset the jumpers properly and repeat this process.

9) I then typed the following command in the desktop Ubuntu Linux terminal program :

sudo ./imx_usb u-boot.nitrogen6q

That produced a bunch of stuff on the screen.  Basically it means the U-boot file u-boot.nitrogen6q has been loaded into the Sabre Lite's RAM.  Note its not in its EEPROM yet, its just in RAM. 

10) I then followed the U-boot downgrade (to 2009) procedure on eewiki.net web page named "i.MX6 SABRE LITE Mainline U-Boot".  In the serial UART terminal program, type the following at the prompt (which I signify with a $ sign below)

$ set env mmcdev 1

$ mmc dev ${mmcdev}

$ ext2load mmc ${mmcdev}:1 0x10800000 u-boot.imx

$ sf probe

$ sf write 0x10800000 0x400 ${filesize}

After each line you should see some positive confirmation.  The U-boot on your Sabre Lite board has now been downgraded to 2009.

11) Now format another SD card to FAT32.  Frmo the latest U-boot zip I had downloaded earlier in step #5, I extracted "u-boot.nitrogen6q" and "6q_upgrade".  I put both files on the micro sdcard and put it into the Sabre Lite board.

12) Now set the jumpers so that the jumper closest to the Ethernet connector is set towards the i.MX6 chip.  The other jumper should be set the opposite way (away from the i.MX6).  Remove the microUSB and power on/off. 

13) I then followed a similar procedure as described in step #10 but this time to upgrade the U-boot from 2009 to
2014-07.  After the Sabre Lite's 2009 bootloader fires up, press a key to interrupt it and in the UART terminal
program type the following :

$ setenv mmcdev 1
$ mmc dev ${mmcdev}
$ ext2load mmc ${mmcdev}:1 0x10800000 u-boot.nitrogen6q
$ sf probe 1 27000000
$ sf erase 0 0xc000
$ sf write 0x10800000 0x400 ${filesize}

You'll see a load of BS on the screen.... at one point you will see a countdown from 5,4,3,2,1 like something is about to blast off.  Its all good if it ends off with the word SUCCESS.  At the very end, it will say "--UBoot upgraded. reset". 

14) Reset the jumpers so that both jumpers face away from the chip.  Power the board off/on. 

15) What you should see in the first few lines on power up is the bootloader version is 2014-07.  That's it, you
have the latest U-boot.

16) Please remember to check all of the above on the webpages described.  These are notes I scribbled hurriedly
so it may have mistakes here and there.  I did the best I could to document it.

View solution in original post

0 Kudos
13 Replies
5,835 Views
steveanderson
Contributor II

M T - Did you get this working?

0 Kudos
5,835 Views
nestle
Contributor III

Hell no.

I'm still stuck trying to figure this out.

I don't think its a problem with the image I've flashed onto the sdcard.

I've tried a pre-built image and it does not fire up after the bootloader launches on power-up either.

So I'm wondering if I'm have to reflash the "shim" on my Sabre Lite board.  From what little I understand :

1) Power up

2) Bootloader in Sabre Lite's flash launches

3) It passes control to the "shim" in the board

4) The shim passes control to the sdcard

5) The kernel on the sdcard launches.

So perhaps I'm missing the "shim" that's supposed to be flashed somehow onto the board.

Its all confusing as hell.

Are you able to launch your stuff?

0 Kudos
5,835 Views
steveanderson
Contributor II

OK, so let's try to take this problem apart a bit further...

I am out of the office today, and don't have access to my board for experimenting.

In this one I see what may be the root cause of your problem.  To confirm this, I'd like you to repeat a couple steps here:

Use imx_usb to load the known correct u-boot like you did yesterday.

Either interrupt the 1 second delay, or wait for u-boot to fail finding the kernel and, either way, enter the following command at the prompt:

In u-boot try the command 'sf probe' and it should discover the NOR FLASH device.

If it fails to do so, then you need to contact the board manufacturer for support, not Freescale.

That problem is on the Boundary Devices board, so you will have to contact them for support on that problem.

I am attaching a whitepaper I wrote for my client to update the NOR FLASH.  I did not use the upgradeu script, and I think it was because of the fact it didn't work right - which is your problem.  So if you think that your u-boot is not properly stored in NOR FLASH then try what I outlined in the attached document.

Looking at YOUR environment, it wanted to run the 6q_upgrade script - mine wanted to run 6x_upgrade.  That is why I renamed the script in the steps I outlined yesterday.

It looks like the u-boot environment is also in NOR FLASH, and here is, I think, possibly the root cause of your problem:

It looks like the sf probe function failed, meaning you might have a defective FOR FLASH part.

How it got defective doesn't matter to you just now, but look in my attached white paper.

As for why all this is 'necessary' and a couple other things you asked/mentioned:

I am just sharing my thinking on what to do next, hoping you might get inspired...

--------------- SabreLite's boot switches

Let me try to answer about the switches and why these steps are 'necessary' for your case:

Here is an almost completely useless excerpt from the unbricking instructions website.  What I don't see on my board is any notation indicating their use, per the website:

    00 – Fuses

    01 – USB

    10 – Internal

So, I'll take 00 to be both switches toward the CPU, but then which is 01 and which is 10?

When in the position YOU describe, I got the board trying to boot to a USB device. so I presume that is '01'

When in the position I describe, I got the Freescale Blank ARIK device on my PC USB bus, so I presume that is '10'

Ahh well, it looks like you MAY have gotten u-boot loaded and running, but not saved...

Now, so let's take that victory and move on with the experiment I described above.

I apologize for not capturing the console log for my boot update, it seemed to have worked and I moved on...

My bad there.

But I started this post off with what I think may be the problem you are having...

So, if that was NOT the problem, I'll see if I can come up with some next steps.

--------------- Hide the u-boot

Boundary Devices has made this what I would consider unnecessarily complex...

They put u-boot and its environment into a serial NOR FLASH device on an SPI port.

They also require your use of a boot script in the 'boot partition' of the 'boot' device.  That way u-boot and its environment don't need to know so much about the target system - in their minds, anyway.

So your 'boot' device only has its own partition table, the kernel and device trees, and the root filesystem.

- That is the new-traditional arrangement, anyway...

So, you need to be able to update NOR FLASH to get a compatible u-boot loaded.  When you do this, it may break the system for the media you originally got.

My attached paper, or the unbricking instructions, can be used to get you back to the older u-boot, if you really want to do so.  You should be able to get older u-boot builds from Boundary Devices for their boards.

To figure out what they are doing, read and analyse the 'helper' scripts they provide like upgradeu and bootcmd.  This is a complex process, and 'they' really have tried to make it as 'simpler' as they can.

--------------- partitioning in the 'boot' device

Long Long ago, in Linux land, about 2 years for us in the real world, they did not use the device tree for embedded linux systems.  They put u-boot, environment, and kernel into unpartitioned space and the root filesystem into a data partition, and it was good -- for then...  but too many people wanted to make their own boards, so it got bad...

But someone invented the 'device tree' to 'simplify' the board support process, and Linux saw that it was even better, and so they changed everything - because they can do that...  So, now, we traditinoally have u-boot in the unpartitioned space, and then a small FAT32 partition with the kernel and a variety of device tree blobs, and maybe a script or two, and then a Linux partition with the root filesystem for Linux.

If you want to know more, google for information on the migration to the device tree and the Linus Torvalds rant on how too many people are designing boards and it's just getting too complex to manage everything...  It's really kind of funny since he is complaining about the comparative success of his own ideas...

Eventually - perhaps sooner than you like - you will probably need to learn about it.

0 Kudos
5,836 Views
nestle
Contributor III

Steve, I think I finally got it booting with a Yocto image!

Your explanation above helped put me on the right track.

Before I go on any further, I'd like to thank you for all your efforts.  You were the only one here who was willing to lend your time to help me.  I wish I could buy you a beer.  The best I can do for now is draw you this beer glass as a sign of my gratitude.

\_/   <-- yea that's it :smileysad:

Please send me your email address if you can as I would like to stay in touch with you. (not for bugging you about Linux I promise)

To cut a long story short, I ended up doing 2 things to get the Sabre Lite board to boot :

1) Downgrading the bootloader from 2014-07 to 2009

2) Upgrading the bootloader from 2008 back to 2014-07

I'm sure a more experienced person could have come up with a better solution.  But this seems to have worked its magic.

I'm gonna catalog what I did below as best I can remember.  That way some poor lost soul may find his way out of this mess without trekking through the muck I had to go through.  Please remember these are notes I scribbled down in a hurry so there may be errors in them.  Check the webpages I mention in my description below for a more accurate description and syntax of commands.

Here goes :

HOW I RESTORED MY SABRE LITE BOARD TO WORKING CONDITION (after going through hell)

1) To get the Sabre Lite board back to operational form with a proper bootloader I decided to downgrade the bootloader to 2009 and then upgrade the bootloader back to 2014-07.

2) I visited the webpage on element14 website called "Getting Started with Sabre Lite (i.MX6)".  To unbrick a Sabre Lite board, set the jumpers as shown on that page.  The jumper closest to the word "Boot" on the board should be near the B (of Boot).  The next jumper should be in the opposite direction close to the chip.

3) Then download a program called imx_usb from boundary devices.

4) Download also the 2009 bootloader from the element 14 webpage mentioned in #2.

5) Download the latest U-boot 2014-07 from Boundary Devices webpage (for later use in upgrading the bootloader).  It comes as a zipped/tarred file with all kinds of u-boot related goodies in there.  I forgot the name of the file but just look for the latest u-boot in the search on the webpage and you should find it.  In my case, the file of interest was u-boot.nitrogen6q which is the 2014-7 bootloader for the Sabre Lite board.  Also compatible with Nitrogen boards. 

6) I formatted a micro sdcard to ext2 format.  From the downloaded zip file in #5, I extracted a file called "6x_upgrade" and some file which I renamed to "u-boot.imx".  I put both "6x_upgrade" and "u-boot.imx" on the micro sdcard and put it in the board's micro sdcard slot.

7) I set the jumpers as described in #2 and connected the microUSB connector to the Sabre Lite board & computer.

8) I then powered up the Sabre Lite board.  You should see something that says "Freescale SE..blah blah ARIK" show up under the USB devices in your Virtual Box or VMware.  Tick it to ensure its selected.  If you dont' see it show up, your jumpers are probably set incorrectly.  Unplug the power, reset the jumpers properly and repeat this process.

9) I then typed the following command in the desktop Ubuntu Linux terminal program :

sudo ./imx_usb u-boot.nitrogen6q

That produced a bunch of stuff on the screen.  Basically it means the U-boot file u-boot.nitrogen6q has been loaded into the Sabre Lite's RAM.  Note its not in its EEPROM yet, its just in RAM. 

10) I then followed the U-boot downgrade (to 2009) procedure on eewiki.net web page named "i.MX6 SABRE LITE Mainline U-Boot".  In the serial UART terminal program, type the following at the prompt (which I signify with a $ sign below)

$ set env mmcdev 1

$ mmc dev ${mmcdev}

$ ext2load mmc ${mmcdev}:1 0x10800000 u-boot.imx

$ sf probe

$ sf write 0x10800000 0x400 ${filesize}

After each line you should see some positive confirmation.  The U-boot on your Sabre Lite board has now been downgraded to 2009.

11) Now format another SD card to FAT32.  Frmo the latest U-boot zip I had downloaded earlier in step #5, I extracted "u-boot.nitrogen6q" and "6q_upgrade".  I put both files on the micro sdcard and put it into the Sabre Lite board.

12) Now set the jumpers so that the jumper closest to the Ethernet connector is set towards the i.MX6 chip.  The other jumper should be set the opposite way (away from the i.MX6).  Remove the microUSB and power on/off. 

13) I then followed a similar procedure as described in step #10 but this time to upgrade the U-boot from 2009 to
2014-07.  After the Sabre Lite's 2009 bootloader fires up, press a key to interrupt it and in the UART terminal
program type the following :

$ setenv mmcdev 1
$ mmc dev ${mmcdev}
$ ext2load mmc ${mmcdev}:1 0x10800000 u-boot.nitrogen6q
$ sf probe 1 27000000
$ sf erase 0 0xc000
$ sf write 0x10800000 0x400 ${filesize}

You'll see a load of BS on the screen.... at one point you will see a countdown from 5,4,3,2,1 like something is about to blast off.  Its all good if it ends off with the word SUCCESS.  At the very end, it will say "--UBoot upgraded. reset". 

14) Reset the jumpers so that both jumpers face away from the chip.  Power the board off/on. 

15) What you should see in the first few lines on power up is the bootloader version is 2014-07.  That's it, you
have the latest U-boot.

16) Please remember to check all of the above on the webpages described.  These are notes I scribbled hurriedly
so it may have mistakes here and there.  I did the best I could to document it.

0 Kudos
5,835 Views
steveanderson
Contributor II

I've been in the same sort of situations.  I really don't like their 'assumed answered' status.

But this sounded like one I could help with since I had figured out similar problems.

I'm glad to have gotten you on-track.

I'll accept your virtual beverage, and we can call it good.

Steve Anderson

consulting@starqst.com

0 Kudos
5,835 Views
steveanderson
Contributor II

I haven't used by SabreLite board in a while, so here's what I have done to nearly excruciating detail:

I use an ubuntu 14.4 install hosted by VMWare Workstation 10.
I use an almost pristine install of FSL Yocto BSP release "Dizzy"
I normally use layers for customization, but I created a new project 'bdsl' for Boundary Devices Sabre Lite.
So I did not touch the bblayers.conf file and only modified the local.conf to build machine="imx6qsabrelite"

Therefore, with the exception of a minor change in sources noted next, you should end up with exactly the same results.

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

Starting from a (fairly) fresh install of Dizzy (set up early June)

My only mod to the source recipes is:
./fsl-dizzy/sources/meta-fsl-arm/conf/machine/include/imx-base.inc

Here I change the last 3 lines from "=" to "?="

SERIAL_CONSOLE ?= "115200 ttymxc0"
KERNEL_IMAGETYPE ?= "uImage"
MACHINE_FEATURES ?= "apm usbgadget usbhost vfat alsa touchscreen"

------------------ Unbricking the SabreLite board

I had installed software to run u-boot from the SD Card since I was doing some work modifying u-boot for a custom board.

I followed the instructions for "Unbricking a Nitrogen6X or Sabre Lite i.MX6 board"
http://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/

I installed the USB library and built the imx_usb tool.
- I also copied it and the related conf files into /usr/local/bin

I downloaded the u-boot binaries from boundary devices:
http://commondatastorage.googleapis.com/boundarydevices.com/u-boot-production.tar.gz

I used a brand new SD Card with  an ordinary FAT32 partition.
I copied "6q_upgrade" to the SD Card and renamed to "6x_upgrade"
I copied "u-boot.nitrogen6q" and renamed it to "u-boot.imx"

I ran "sudo imx_usb u-boot.nitrogen6q" and with the console ran "upgradeu"

Attached PIC of setup - note DIP switch configured for 'blank' boot.
- The DIP Switch which is AWAY from the Ethernet/USB Block is AWAY from the CPU.

After programming the NOR FLASH with u-boot, I move both DIP switches toward the CPU.
- BOTH DIP Switches are set TOWARD the CPU.

I reboot and find the version of u-boot I just installed running as expected.
I reset to the default environment and saved it.

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

I then flattened that very same SD Card and copied the image to it:
sudo dd if=tmp/deploy/images/imx6qsabrelite/core-image-minimal-imx6qsabrelite.sdcard of=/dev/sdd bs=512

49152+0 records in
49152+0 records out
25165824 bytes (25 MB) copied, 53.6372 s, 469 kB/s

I connected the SD Card, as in the photo, and applied power...
To my utter shock and amazement, the thing booted and allowed me to login as root.
Truly I was at least surprized to have not made any unforgivable mistakes along the way.

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

Now, my SD Card is a micro-SD with an adapter.
When I put the micro-SD card into the micro slot, I end up stuck in u-boot...
I kind of expected it to just enumerate the other card as mmcblk0, but it didn't.

If that is not your problem I would back off the Yuri's suggestion to try a canned image from Boundary Devices.
I presume you have also tried contacting Boundary Devices support?

I used the 'dizzy' release of Freescale Yocto Community BSP.
I made only the above referenced default-assignment changes in the sources.
I build core-image-minimal with machine="imx6qsabrelite" in the local.conf file.
My SD Card is allocated a bit differently:

unallocated 4Mb
/dev/sdd1 8Mb (4.57 used)  Labeled "Boot imx6qs"
/dev/sdd2 8Mb (5.99 used)  Not Labeled
unallocated 1.82Gb

DOH!  OK, you gave allocations for core-image-sato, which I did not build, so oranges are, indeed, not kiwis.

So, my core-image-minimal is clearly not quite the same as yours...
Now I re-baked this with machine="nitrogen6x" which should be "the same thing" according to Boundary Devices...
This one copied as "sudo dd bs=512 of=/dev/sdd if=tmp/deploy/images/nitrogen6x/core-image-minimal-nitrogen6x.sdcard"
There are 2 immediate differences, the label is now "Boot nitrog" and only 5.98Mb is used in the root filesystem...

This, also, boots to a login and allows me to login as root.

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

So, I would ask myself the next few questions:
Does the board you have boot with the original media which I presume came with it?
Does (another) canned build from the manufacturer (Boundary Devices) boot?
If the answer to either of those is no, then I would contact them next.

0 Kudos
5,835 Views
nestle
Contributor III

So, I would ask myself the next few questions:
Does the board you have boot with the original media which I presume came with it?
Does (another) canned build from the manufacturer (Boundary Devices) boot?
If the answer to either of those is no, then I would contact them next.

I am able to boot with the original media - which has U-boot 2009 version on it and a rather different looking partition structure (just 2 partitions - a raw partition of 31+MB and an ext3 partition containing the rootfs and image)

When I try to boot a self-built or manufactuer built Yocto image from the U-boot 2014-07 that I currently have on the board, all I get is what you see below.


I also cannot seem to "run clearenv" or "run upgradeu" successfully.

I'm ready to tear my hair out at this point.

Something is wrong with my bootloader or my environment variable.  If I can just figure out how to set this damn thing up right, I'm sure the Yocto image will boot.

U-Boot 2014.07-00136-gf870252 (Sep 22 2014 - 09:16:34)

CPU:   Freescale i.MX6Q rev1.0 at 792 MHz
Reset cause: WDOG
Board: SABRE Lite
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected SST25VF016B with page size 256 Bytes, erase size 4 KiB, total 2 MiB
No panel detected: default to HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   using phy at 6
FEC, usb_ether
Hit any key to stop autoboot:  0
MMC Device 2 not found
no mmc device at slot 2
MMC: no card present
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot >

0 Kudos
5,835 Views
nestle
Contributor III

Anderson my man,

"I ran sudo imx_usb u-boot.nitrogen6q"

Strangely to get the above working, I had to put my jumper settings the opposite of what you had in your picture.

i.e. The DIP Switch which is closet to the Ethernet/USB Block is flicked towards the edge of the board.  The DIP Switch that is further away from the Ethernet/USB Block is flicked away from the edge of the board and towards the IMX6 chip.

Having the DIPS in that configuration was the only way to get the Freescale Semiconductor SE Blank ARIK (i.e. micro-usb connection) to show up when the Sabre Lite was powered on.  It would not show up with your dip configuration even though I tried it a few times.

Anyway the above imx_usb stuff succeeded and the sabre lite booted.  But that's where my luck ran out.

I tried to "run upgradeu" in the console but got the load of BS below.  The sdcard with u-boot.imx and 6x_upgrade was on an sdcard formatted with FAT32 and inserted into the Sabre lite board.. so I don't understand why it would not read it.

U-Boot > run upgradeu

MMC: no card present

MMC: no card present

** Bad device mmc 0 **

MMC: no card present

** Bad device mmc 0 **

switch to partitions #0, OK

mmc1 is current device

reading /6q_upgrade

** Unable to read file /6q_upgrade **

Failed to mount ext2 filesystem...

** Unrecognized filesystem type **

U-Boot >

Frankly I don't understand why I need to do any of the above.  When I bootup, it says I have the latest U-boot

U-Boot 2014.07-00136-gf870252 (Sep 22 2014 - 09:16:34)

So what really is all this imx_usb and upgradeu stuff for.  What am I updating I don't understand.  Am I updating the "shim" or something.

One troubling issue is that the command "run clearenv" to reset the default environment.  When I type it in, it says :

U-Boot > run clearenv

SF: Unsupported flash IDs: manuf 00, jedec 0000, ext_jedec 0000

Failed to initialize SPI flash at 0:1

This is getting exhausting.  Why cant Freescale make things a little easier to use.  Im stuck in a rut and about to give up.

0 Kudos
5,835 Views
nestle
Contributor III

Here is a listing of the partition on the sdcard after I've flashed it with a pre-built image.

Does the partition on your sdcard look like this when you flash it?

The 4 partition of my sdcard with core-image-sato on it looks as follows :

unallocated, unallocated. 4MB, flags : none

/dev/sdb1, fat16, 8MB (3.34MB used), flags : lba

/dev/sdb2, ext3, 928MB (751.8MB used), flags : none

unallocated, unallocated, 2.77GB, flags : none

The /dev/sdb1 is labelled "Boot nitrog" and contains the following files :

6x_bootscript, imx6dl-nitrogen6_max.dtb, imx6dl-nitrogen6.dtb, imx6q-nitrogen6_max.dtb, imx6q-nitrogen6x.dtb,  imx6q-sabrelite.dtb, uImage

The /dev/sdb2 contains the root file system.  The /boot directory of the root file system contains :

uImage, uImage-3.10.17-1.0.1_ga+yocto+g9710da

0 Kudos
5,835 Views
Yuri
NXP Employee
NXP Employee

The .sdcard image is full one, basically, there is no need to add

more data to it.

  Have You tried recommendations in the following tread ?

"imx6 board bringup"

https://community.freescale.com/thread/357674

In particular - is it possible to boot any SD image ?


Have a great day,
Yuri

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

0 Kudos
5,835 Views
nestle
Contributor III

Hello,


Thank you for your reply.  I'll try to convey the problem further in this message and hopefully you can spot what I'm doing incorrectly.

I am able to boot the Sabre Lite board with the sdcard that came with the board.  I am also able to boot the board with an image that is created by a script + code provided by Freescale during its training sessions.  Both I believe use the 2009 U-boot although I'm not sure if that has anything to do with it.

When I try to build an image myself using Yocto however, it does not boot.

I've followed the steps provided here :

Yocto Training - HOME

for building an image using Yocto.

I'm using Ubuntu 14.04 on my desktop and I have tried with both Yocto Dizzy and Fido with the same result.

When I use Yocto to build it on my own, I change the MACHINE name in /build/local.conf to the following :

MACHINE ?= 'imx6qsabrelite'

After I do "bitbake core-image-minimal", it generates the .sdcard file as expected.  But the board does not boot after I have sudo dd the .sdcard file to the sdcard.

I notice that there are 4 partitions create after I have sudo dd the .sdcard file onto the card.  I notice there are only 2 partitions created by the freescale script which does boot correctly.  I'm not sure if this has anything to do with why the board won't boot.

I also notice there is no .imx bootloader file created in the directory by yocto.  So as an additional step, I have to "bitbake u-boot-boundary" to create a u-boot.imx file in the directory.  But why isn't it generated automatically when I use bitbake core-image-minimal?  Are there some additional lines I have to add to my local.conf file?

I am able to get the board to boot somewhat by doing :

sudo dd if=u-boot.imx of=/dev/sdf bs=512 seek=2

to add the .imx bootloader file onto the card after I've sudo dd the .sdcard file onto the card.  But when I try to boot with that, the bootloader stops wiith the message :

"ERROR : Can't get kernel image!"     

What really is the problem?  I have a feeling I need to upgrade the bootloader in the Sabre Lite board itself from 2009 to 2014.  But its not clear to me how to accomplish this as I'm new to Linux.

If you need me to post any screen captures of stuff to help figure out what might be wrong, please let me know.  I'm exhausted trying all kinds of stuff.

0 Kudos
5,835 Views
nestle
Contributor III

I'm still having no luck getting the .sdcard image generated by Yocto to boot on my Sabre Lite board.

So far I've figure out one thing on my own - my Sabre Lite board had no bootloader in its flash memory!  When powered up, the bootloader is supposed to launch with or without an sdcard.  But it was not doing jack.    

So I followed the instructions on here to re-flash the board with the latest 2014.07 u-boot.

https://eewiki.net/display/linuxonarm/i.MX6x+SABRE+Lite+SPI+Flash+Recovery

I would sure it would work after that as it would explain why Yocto builds did not include a u-boot.imx file.

So with great excitement, I downloaded a pre-built "core-image-sato" from Boundary Devices website (especially made for the Sabre Lite board).  I flashed it onto an sdcard.  I popped the sdcard into the Sabre Lite board and...... nothing.  NOTHING!!!!! Damn you all!!!!!!!!!!!!!!!

Well I did get something but the something was "Error : can't get kernel image"

0 Kudos
5,835 Views
nestle
Contributor III

I did a printenv in case anyone can spot what I'm doing wrong. 


Perhaps the kernel cannot be found because the bootloader is setup to look for it at the wrong memory location or something.

Some setenv related stuff perhaps?

Please help me someone.  I've been dumping in a ton of effort & time just to get the Sabre Lite to boot properly

U-Boot 2014.07 (Jun 21 2015 - 15:22:10)

CPU:   Freescale i.MX6Q rev1.0 at 792 MHz
Reset cause: WDOG
Board: SABRE Lite
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected SST25VF016B with page size 256 Bytes, erase size 4 KiB, total 2 MiB
No panel detected: default to HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   using phy at 6
FEC
Warning: failed to set MAC address
, usb_ether
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device

MMC read: dev # 1, block # 2048, count 8192 ... 8192 blocks read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot >
U-Boot >
U-Boot > printenv
autoload=no
baudrate=115200
board=sabrelite
bootargs=console=ttymxc1,115200 video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 root=/dev/mmcblk0p1 rootwait rw
bootargs_base=setenv bootargs console=ttymxc1,115200 ${bootargs_lcd}
bootargs_lcd=video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666
bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootwait rw
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=${ipaddr} nfsroot=${serverip}:${nfsroot}
bootcmd=run bootcmd_mmc
bootcmd_mmc=run bootargs_base bootargs_mmc; mmc dev 1; mmc read ${loadaddr} 0x800 0x2000; bootm
bootcmd_net=run bootargs_nfs;tftpboot ${loadaddr} ${kernel}; bootm
bootcmd_nfs=run bootargs_base bootargs_nfs; mmc dev 1; mmc read ${loadaddr} 0x800 0x2000; bootm
bootcmd_tftp=run bootargs_base bootargs_mmc; tftpboot ${loadaddr} ${serverip}:${kernel}; bootm
bootdelay=3
clearenv=sf probe 1 && sf erase 0xc0000 0x2000 && echo restored environment to factory default
cpu=6Q
ethact=FEC
ethprime=FEC0
filesize=5cc00
ipaddr=192.168.234.3
kernel=uImage
loadaddr=0x10800000
mmcargs=setenv bootargs console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24
mmcdev=0
netdev=eth0
netmask=255.255.255.0
nfsroot=/home/freescale/Eclipse/
rd_loadaddr=0x11000000
serverip=192.168.234.2
stderr=serial
stdin=serial
stdout=serial
uboot=u-boot.bin
upgradeu=for disk in 0 1 ; do mmc dev ${disk} ;for fs in fat ext2 ; do ${fs}load mmc ${disk}:1 10008000 /6q_upgrade && source 10008000 ; done ; done

Environment size: 1549/8188 bytes
U-Boot >

0 Kudos