[meta-freescale] How to build & boot

Gary Thomas samoht.yrag at gmail.com
Tue Nov 27 02:30:41 PST 2012


On 2012-11-26 17:30, Fabio Estevam wrote:
> On Mon, Nov 26, 2012 at 10:26 PM, Gary Thomas <samoht.yrag at gmail.com> wrote:
>
>> Sadly, this doesn't boot at all.  I can tell that the SD image does not have
>> U-Boot on
>> it, so the board is booting U-Boot from FLASH which is quite old:
>>    U-Boot 2009.08 (Jul 05 2012 - 15:37:27)
>
> There is a workaround that allows you to boot from the SD card and it
> is described at:
> http://git.denx.de/?p=u-boot.git;a=blob;f=board/freescale/mx6qsabrelite/README;h=6f2f5343de29a539c11dbe59181d96c4e1dfde93;hb=HEAD

I followed these instructions, but sadly my board is now a brick :-(

I think the .zip archive at https://wiki.linaro.org/Boards/MX6QSabreLite?action=AttachFile&do=view&target=iMX6DQ_SPI_to_SD_loader_binaries_rev1.0.zip
is damaged.  Here's what I got when I unpacked it:
   gthomas at zeus:/tmp/iMX6DQ_SPI_to_SD_loader_rev1.0$ ls -l
   total 44
   -rw-rw-r-- 1 gthomas gthomas  1647 Feb  4  2012 COPYING_BSD.txt
   -rw-rw-r-- 1 gthomas gthomas  1136 Jan  5  2012 iMX6DQ_SPI_to_uSDHC3.bin
   -rw-rw-r-- 1 gthomas gthomas 11656 Jan  5  2012 iMX6DQ_SPI_to_uSDHC3.elf
   -rw-rw-r-- 1 gthomas gthomas  1136 Jan  5  2012 iMX6DQ_SPI_to_uSDHC4.bin
   -rw-rw-r-- 1 gthomas gthomas 11656 Jan  5  2012 iMX6DQ_SPI_to_uSDHC4.elf
   -rw-rw-r-- 1 gthomas gthomas   740 Feb  4  2012 Readme.txt

Notice that the iMX6DQ_SPI_to_uSDHC3.bin is TINY compared to the .elf file.
Looking at the headers:
   gthomas at zeus:/tmp/iMX6DQ_SPI_to_SD_loader_rev1.0$ readelf -e iMX6DQ_SPI_to_uSDHC3.elf
   ELF Header:
     Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
     Class:                             ELF32
     Data:                              2's complement, little endian
     Version:                           1 (current)
     OS/ABI:                            UNIX - System V
     ABI Version:                       0
     Type:                              EXEC (Executable file)
     Machine:                           ARM
     Version:                           0x1
     Entry point address:               0x90a42c
     Start of program headers:          52 (bytes into file)
     Start of section headers:          10236 (bytes into file)
     Flags:                             0x5000002, has entry point, Version5 EABI
     Size of this header:               52 (bytes)
     Size of program headers:           32 (bytes)
     Number of program headers:         1
     Size of section headers:           40 (bytes)
     Number of section headers:         16
     Section header string table index: 13

   Section Headers:
     [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
     [ 0]                   NULL            00000000 000000 000000 00      0   0  0
     [ 1] .ivt_start        PROGBITS        0090a000 002000 00042c 00  AX  0   0  1
     [ 2] .text.main        PROGBITS        0090a42c 00242c 000044 00  AX  0   0  4
     [ 3] .debug_abbrev     PROGBITS        00000000 002470 000064 00      0   0  1
     [ 4] .debug_info       PROGBITS        00000000 0024d4 00009f 00      0   0  1
     [ 5] .debug_line       PROGBITS        00000000 002573 000052 00      0   0  1
     [ 6] .debug_pubnames   PROGBITS        00000000 0025c5 00001b 00      0   0  1
     [ 7] .debug_aranges    PROGBITS        00000000 0025e0 000020 00      0   0  1
     [ 8] .debug_ranges     PROGBITS        00000000 002600 000010 00      0   0  1
     [ 9] .debug_str        PROGBITS        00000000 002610 0000b5 01  MS  0   0  1
     [10] .comment          PROGBITS        00000000 0026c5 00002a 01  MS  0   0  1
     [11] .ARM.attributes   ARM_ATTRIBUTES  00000000 0026ef 000035 00      0   0  1
     [12] .debug_frame      PROGBITS        00000000 002724 000020 00      0   0  4
     [13] .shstrtab         STRTAB          00000000 002744 0000b5 00      0   0  1
     [14] .symtab           SYMTAB          00000000 002a7c 000230 10     15  30  4
     [15] .strtab           STRTAB          00000000 002cac 0000dc 00      0   0  1
   Key to Flags:
     W (write), A (alloc), X (execute), M (merge), S (strings)
     I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
     O (extra OS processing required) o (OS specific), p (processor specific)

   Program Headers:
     Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
     LOAD           0x000000 0x00908000 0x00908000 0x02470 0x02470 R E 0x8000

    Section to Segment mapping:
     Segment Sections...
      00     .ivt_start .text.main

So, the .bin file should be 9238 (0x2470) bytes long, not just 1136.

Now I get to try and figure out the black magic involved in restoring the boot
loader environment to my board :-(  Any help gladly accepted (the note at
https://wiki.linaro.org/Boards/MX6QSabreLite says to "write me" for help,
but I've not figured out yet where/who that is!)




More information about the meta-freescale mailing list