This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL1271 Daugther Card with LogicPD Am1808 eXperimenter Kit

Other Parts Discussed in Thread: AM1808, WL1271, OMAP-L138

I am using Mistral's WL1271 Daughter Card for AM18xx/OMAPL13x as an add-on for LogigPD's AM1808 eXperimenter Kit.

The Mobile SD card included in the WL1271 package was empty and needed to be formatted and updated with the AM18x SDK.

I followed the steps in:

http://processors.wiki.ti.com/index.php/AM18x_Wireless_Connectivity_Getting_Started_Guide

but that did not result in a working SD card. In AM18x Preparing SD Card two partitions are created, one for the kernel image (BOOT) and one for the filesystem (ROOT). The booloader that was shipped with the eXperimenter Kit does not seem to support this as the u-boot "mmc ..." commands are not available (e.g. "mmc rescan 0" or "fatload mmc ...").

So I tried to reflash the bootloader according to installing the u-boot. It suggests to flash u-boot.bin and arm-mmcsd-ais.bin with sfh_OMAP-L138.exe. I found sfh_OMAP-L138.exe (in the OMAP-L138_FlashAndBootUtils_2_23\OMAP-L138\GNU folder) and u-boot.bin (probably u-boot-am180x-evm-2009.11-psp03.20.00.13-r3.bin in am180x-sdk-bin-04.01.00.00.tar.gz).
According to http://processors.wiki.ti.com/index.php/Community_Linux_PSP_for_DA8x/OMAP-L1/AM1x the file arm-mmcsd-ais.bin is part of the DaVinci-PSP-SDK-#.#.#.# archive (images\boot-strap\omapl1x8\). But the DaVinci-PSP-SDK-03.20.00.12 folder of my AM1808 SDK (AM1x-1_10_00_01.tar.gz) does not contain this file (only the three files arm-spi/nand/nor-ais.bin).

Where do I get this arm-mmcsd-ais.bin file from?

At the moment as a workaround I load the kernel via TFTP and only the filesystem from the SD-card. This works and the "Matrix Application Launcher p1" appears but I would prefer the SD card only solution.

 

  • Hi,

    we will add the relevant missing files in the WiKi, and update the e2e with the relevant links to the WiKi

    Regards,

    Eyal

  • 0068.OMAP-L138-flash-tools.zip

    Inserted zip file contains:

    u-boot.bin

    arm-mmcsd-ais.bin

    sfh_OMAP-L138.exe

     

    to flash on the board:

    linux: sudo mono sfh_OMAP-L138.exe -flash arm-mmcsd-ais.bin u-boot.bin

    windows: sfh_OMAP-L138.exe -flash "FULL PATH\arm-mmcsd-ais.bin" "FULL PATH\u-boot.bin"

    the order of the files in the command line is important. 

     

    Regards,

    Vita.

  • Thanks for the files. I flashed the bootloader and now the "mmc" command works.

    Unfortunately the bootloader is not able to read the FAT filesystem of the card so I get the error message:

    Hit any key to stop autoboot:  0
    reading boot.scr
     [ ST0 ERROR 8]
    block read failed: -18

    ** Unable to read "boot.scr" from mmc 0:1 **
    ** Can't read from device 0 **

    ** Unable to use mmc 0:1 for fatload **
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!

    I used the default "bootcmd" and "bootargs" parameters:
    bootargs=mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=off
    bootcmd=if mmc rescan 0; then if fatload mmc 0 0xc0600000 boot.scr; then source 0xc0600000; else fatload mmc 0 0xc0700000 uImage; bootm c0700000; fi; else sf probe 0; sf read 0xc0700000 0x80000 0x220000; bootm 0xc0700000; fi

    I thought the problem was that boot.scr is not available in the BOOT partition as there are only uImage and u-boot.bin so I modified "bootcmd" to
    bootcmd=if mmc rescan 0; then fatload mmc 0 0xc0700000 uImage; bootm c0700000; else sf probe 0; sf read 0xc0700000 0x80000 0x220000; bootm 0xc0700000; fi

    Now I get the error:

    Hit any key to stop autoboot:  0
    reading uImage
     [ ST0 ERROR 8]
    block read failed: -18

    ** Unable to read "uImage" from mmc 0:1 **
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!

    At least the Mobile SD card is detected:

    U-Boot > mmcinfo 0
    Device: davinci
    Manufacturer ID: 6f
    OEM: 0
    Name: SMI
    Tran Speed: 20000000
    Rd Block Len: 512
    MMC version 4.0
    High Capacity: Yes
    Capacity: 1990197248
    Bus Width: 4-bit

    The output of "fatinfo" (same for "fatls") is either:

    U-Boot > fatinfo mmc 0
    ** Can't read from device 0 **

    ** Unable to use mmc 0:1 for fatinfo **

    or

    U-Boot > fatinfo mmc 0
    Interface:  MMC
      Device 0: Vendor: Man 6f0000 Snr 10000002 Rev: 2.0 Prod: SMI
                Type: Removable Hard Disk
                Capacity: 1898.0 MB = 1.8 GB (3887104 x 512)
     [ ST0 ERROR 8]
    block read failed: -18

    No valid FAT fs found

    The card is correctly partitioned (output of fdisk):

       Gerät  boot.     Anfang        Ende     Blöcke   Id  System
    /dev/sdd1               1         100      192169    b  W95 FAT32
    /dev/sdd2             101        1011     1750942   83  Linux

    sdd1 was formatted with mkfs.vfat (version 3.0.9). Linux and Windows show the contents of the FS correctly:

    $ ls -l /media/BOOT/
    -rw-r--r-- 1 user user  171500 2010-10-29 16:10 u-boot.bin
    -rw-r--r-- 1 user user 2187532 2011-03-15 21:57 uImage

    I already tried to format sdd1 with Windows (FAT) but that did not fix the problem.

     

  • Tobias,

    What SD card and board are you using? Please, pay attention that boards of revision A are capable to work only with 1.8V SD cards only (MMC mobile). The format of  such cards has to be done with appropriate SD card reader/writer.

     

     

    Regards,

    Vita Preskovsky

  • Vita,

    sorry, it is a 1.8V capable Mobile MMC card and not a Mobile SD card. It was part of the WL1271 Daugther Board package.

    The 1.8V mode was and is still activated on the eval-board and the card works correctly if the kernel (uImage) is transferred via TFTP and only the filesystem (partition 2 = ROOT) is used from the MMC card, so the card itself should not be problem. The problem only occurs if the kernel should be loaded from partition 1 (BOOT) via the bootloader.

    None of the labels of the WL1271 board mentions that it is either revision A or B. As the quick start guide contains a warning notice that the DIP switches of the eval-board have to be set to 1.8V I guess it is revision A.

    The card seems to be formatted correctly too. If I start Linux (in 1.8V mode of course) with TFTP with the bootloader settings

    bootargs=mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait initrd=0xc1180000,4M ip=off eth=${ethaddr}
    bootcmd=tftp 0xc0700000 uImage; bootm 0xc0700000

    the contents of partition 1 is displayed correctly:

    root@am180x-evm:~# ls /media/mmcblk0p1/
    u-boot.bin  uImage

    To check whether it is a problem with the SD/MMC card reader I now formatted the MMC Mobile card with the eval-board directly (after boot-up with TFTP) in 1.8V mode.

    I did the following steps after unmounting partition 1:

    root@am180x-evm:~# mkfs.vfat /dev/mmcblk0p1
    mkfs.vfat 2.11 (12 Mar 2005)

    Then I mounted the partition and copied the two files (uImage and u-boot.bin) to the partition. After that fsck shows:

    root@am180x-evm:~# fsck /dev/mmcblk0p1
    fsck from util-linux-ng 2.17
    dosfsck 2.11, 12 Mar 2005, FAT32, LFN
    /dev/mmcblk0p1: 2 files, 577/47991 clusters

    Then I set the bootloader settings back to be able to boot from MMC (see last post). Still the same error messages.

    Does the parition have to be marked as "bootable"? It was not mentioned in the wiki and I don't think that a non-bootable flag will invalidate the filesystem.

     

  • Tobias,

    I think it's worth to try to set bootable flag to the boot partition. Also, I think to try to rewrite uImage i u-boot files in the exact order of u-boot is first and uImage is second. In any way, I'll continue to investigate the problem.

     

    Regards,

    Vita.

  • Hello,

    I am traying to boot the kernel from the MMC and i am having exactly the same problem, i am also using the WL1271 MMC card. Did you solve the problem?

    By the way, how should i set the bootable flag to the boot partition?

     

    Many thanks

  • Alberto,

    Can you send a screen shot ot the errors you are getting?

    To toggle boot flag of the partition you should do as follows:

    sudo fdisk /dev/sdc - instead of sdc give your disk name

    in the menu of fdisk type a command and the number of patition (1 in our case). This toggles boot flag.

    Command (m for help): a
    Partition number (1-2): 1

    Vita.

  • Hello Alberto,

    No, the problem is not solved yet.

    Today I retried it with the Bootloader from the new 5.02 AM1808 SDK (UBL_AM1808_MMC.bin and u-boot-am180x-evm.bin). The MMCmobile card still does not work. I already tried it with the partition marked as bootable.

    Apart from that I am able to read an SD card's FAT filesystem with U-Boot. So the problems mentioned above (fatinfo, fatls, ...) for the MMCmobile card do not occur when an SD card is used. It is just a problem with the MMCmobile card no matter if the board is in 1.8 or 3.3V mode.

    As the MMCmobile card works correctly when Linux is started in 1.8V it seems to be a problem in u-boot's MMC implementation. I guess the timing of the MMC(mobile) card is a bit different. I haven't tried a non mobile MMC card to check if there is a general problem with MMC cards.

    I tried some (micro)SD cards but none of them worked in 1.8V mode. So it seems is not possible to boot the board from MMC when it is in 1.8V mode. It would be nice if someone could take a look into the u-boot source and try to fix (or simply update) the MMC driver for the Davinci controller.