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.

Need to re-flash AM1808 Experimenter's board back to original factory Linux Demo

Other Parts Discussed in Thread: AM1808, OMAP-L138, DA8XX, PMP

 I needed to re-flash my AM1808 Experimenter's board in order to help a customer with Windows CE on his AM1808 board, now I want to restore it back to its original condition.

I've read about using sfh_OMAP138.exe to re-flash the UBL and even u-boot, but I haven't found how to re-flash those AND uImage.

Can someone enlighten me on loading ubl_AM1808_SPI_MEM.bin, u-boot.bin, and uImage using sfh_OMAP138.exe?

  • LogicPD was able to help me out on this, and I thought I would post the solution here:

    This procedure has you program the UBL and u-boot into the Serial Flash first. Then, using u-boot and either a TFTP server of SD Card, loading the kernel into SDRAM, then programming it into Serial Flash. This will restore your AM1808 board back to the factory Demo.

    The files you need can be obtained from the AM1X_sdk_1_10_XX_XX Board support package. You will need:

        arm-spi-ais.bin        AM1X_sdk_1_10_XX_XX/DaVinci-PSP-SDK-03.20.00.12/images/boot-strap/omapl1x8
        u-boot.bin               AM1X_sdk_1_10_XX_XX/DaVinci-PSP-SDK-03.20.00.12/images/u-boot/omapl1x8
        uImage                   AM1X_sdk_1_10_XX_XX/DaVinci-PSP-SDK-03.20.00.12/images/kernel/omapl1x8

    The SPI flash utility, sfh_OMAP-L138.exe is in Am1X_sdk_1_10_XX_XX/OMAP-L138_FlashAndBootUtils_2_23/OMAP-L138/GNU.

    First, you will need to erase the SPI flash. You need to get your board into serial boot mode. Set switches S7-7 and S7-8 to ON. When you power on the board, you will see a BOOT ME prompt show up on the serial port (using HyperTerm, Teraterm, or some other Terminal emu.) If you verified the BOOT ME prompt, make sure you disconnect your Terminal program.

    Bring up a Command Prompt (cmd.exe) and cd to the folder with your image files. To erase the flash:

        sfh_OMAP-L138.exe -erase -p COM1 (or whatever your instantiated serial port is.)

    You should see that the flasher program is connected to your respective COM port. You should also see a waiting for BOOT ME prompt. Turn on your board. You should see it loading the erase program into the board and start the erase cycle. Sometimes turning the board Off/On will get you past the BOOT ME message.

    Once the flash is erased, you can program the UBL and u-boot bootstraps into flash.

        sfh_OMAP-L138.exe -flash -p COM1 arm-api-ais.bin u-boot.bin

    You should see the flasher program connect to your board, download the flashing program into the board, and then the programming and verifying of each boot strap. Once you see it completed, you can power off your board and turn switches S7-7 and S7-8 to the OFF position. Turn your board on, and you should see the UBL boot and u-boot boot (via a Terminal Emulator program.)

    When you see the "Hit any key to stop autoboot:" go ahead and hit a key.

    Now, programming the uImage kernel into flash is a bit more complex. The kernel needs to be downloaded to the board via a TFTP server. You can obtain a free TFTP server from www.solarwinds.com. Since you erased the SPI flash, only the default environment variables are set. You will need to set the following to get ethernet communications up:
                U-Boot > setenv ethaddr 00:08:EE:03:5B:40   (this address is printed on your SOM-M1 module)
                U-Boot > setenv ipaddr 192.168.1.1
                U-Boot > setenv    netmask 255.255.255.0
                U-Boot > setenv serverip 192.168.1.2          (address of your TFTP server)
                U-Boot > saveenv                                       (save your environment to flash)
                U-Boot > ping 192.168.1.2                           (verify your ethernet connection)

    You can now download the kernel into SDRAM via TFTP:
                U-Boot > tftp 0xC0700000 uImage

    NOTE! Please note the size of the kernel loaded in hex bytes (e.g. 0x21FA056)

    Now, you can flash the kernel into SPI flash memory. Erase first:
                U-Boot > sf probe 0
                U-Boot > sf erase 0x80000 0x220000    (the 0x220000 block should be larger than the kernel you loaded.)       

    Now program:
                U-Boot > sf write 0xC0700000 0x80000 0x220000

    Once completed, you should be all set to install the AM18x Linux Demo SD Card, and re-boot your board!

    One last thing. I noticed that the kernel supplied in the AM1X BSP may be newer than the one originally shipped with the board, and some of the loadable kernel modules might need to be updated on the SD Card. These modules are located in: AM1X_sdk_1_10_XX_XX/DaVinci-PSP-SDK-03.20.00.12/images/kernel/omapl1x8/modules. I would update them all.

    Enjoy!!!

  • Hello Gerry, Am18xx Champs,

     

    I do not have an Am1808 Logic PD SD Card. I want to create one.

     

    Can you please share a link/procedure?

     

    Thanks!

     

     best

    Feroz

  • It's reasonably simple. For the AM1808 EVM from Logic PD, the only thing is that the SD Card only contains the mountable the root file system. If you have a Linux system, all you need to do is format the SD Card with an ext3 filesystem and copy over the rfs from the Linux Software Development kit provided by TI.

    http://focus.ti.com/docs/toolsw/folders/print/linuxsdk-am1x.html

    If you are trying to program the UBL, U-boot, and the Kernel into SPI flash on the board, Logic PD has a great Lab on how to do this. You'll need to register your AM1808 EVM with Logic to gain access to the documents and archives. Once you do, it's under the Bootloader/Monitor section and is called "1015906A_OMAP-L138_AM1808_U-Boot_Labs.zip"

     

  • Hello Gerry,

     

    That was very useful. 

     

    I have got the AM1808 Exp kit along with the SD Card. But the kernel is not able to detect/initilaize the SD Card

     

    Issue is that the Card does not seem to be getting initialized. I am seeing an error mounting SD Card on LogicPD Exerimenter Kit. 

    waiting for root device /dev/mmcblk0p1..

    mmc0: error whilst initialising SD Card

    mmc0: error whilst initialising SD Card

    mmc0: error whilst initialising SD Card

    mmc0: error whilst initialising SD Card

    mmc0: error whilst initialising SD Card

    mmc0: error whilst initialising SD Card

    mmc0: error whilst initialising SD Card

     

    I tried with 2 SD Cards shipped by LOgic PD but same issue on both.

     

    Any ideas?

     

    Thanks & Best Regards

    Feroz

  • Hello Gerry,

     

    I conncted the SD Card to the ubuntu machine. I see that the file system is intact.

     

    One funny thing is, now I do nto see the 

     

    mmc0: error whilst initialising SD Card

     

    The boot hangs at

    waiting for root device /dev/mmcblk0p1..


    Any ideas on this?

     

    Best Regards

    Feroz 


  • Full log:

     

    best

    Feroz

     

    Booting with TI UBL

    Device OPP (300MHz, 1.2V)

     

    U-Boot 2009.11 (Mar 25 2010 - 14:39:42)

     

    I2C:   ready

    DRAM:  64 MB

    *** Warning - bad CRC, using default environment

     

    In:    serial

    Out:   serial

    Err:   serial

    ARM Clock : 300000000 Hz

    DDR Clock : 132000000 Hz

    Net:   Ethernet PHY: GENERIC @ 0x00

     

    Hit any key to stop autoboot:  0 

    8192 KiB M25P64 at 0:0 is now current device

     

    Booting with TI UBL

    Device OPP (300MHz, 1.2V)

     

    U-Boot 2009.11 (Mar 25 2010 - 14:39:42)

     

    I2C:   ready

    DRAM:  64 MB

    *** Warning - bad CRC, using default environment

     

    In:    serial

    Out:   serial

    Err:   serial

    ARM Clock : 300000000 Hz

    DDR Clock : 132000000 Hz

    Net:   Ethernet PHY: GENERIC @ 0x00

     

    Hit any key to stop autoboot:  0 

    U-Boot > 

    U-Boot > 

    U-Boot > 

    U-Boot > printenv

    bootargs=mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw rootwait ip=off

    bootcmd=sf probe 0;sf read 0xc0700000 0x80000 0x220000;bootm 0xc0700000

    bootdelay=3

    baudrate=115200

    bootfile="uImage"

    stdin=serial

    stdout=serial

    stderr=serial

    ethaddr=00:08:ee:04:34:23

    ver=U-Boot 2009.11 (Mar 25 2010 - 14:39:42)

     

    Environment size: 308/65532 bytes

    U-Boot > boot

    8192 KiB M25P64 at 0:0 is now current device

    ## Booting kernel from Legacy Image at c0700000 ...

       Image Name:   Linux-2.6.33-rc4

       Image Type:   ARM Linux Kernel Image (uncompressed)

       Data Size:    2113680 Bytes =  2 MB

       Load Address: c0008000

       Entry Point:  c0008000

       Verifying Checksum ... OK

       Loading Kernel Image ... OK

    OK

     

    Starting kernel ...

     

    Uncompressing Linux... done, booting the kernel.

    Linux version 2.6.33-rc4 (x0029463@psplinux051) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 PREEMPT Thu Mar 25 15:06:29 IST 2010

    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177

    CPU: VIVT data cache, VIVT instruction cache

    Machine: DaVinci DA850/OMAP-L138/AM18xx EVM

    Memory policy: ECC disabled, Data cache writeback

    DaVinci da850/omap-l138 variant 0x0

    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128

    Kernel command line: mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw rootwait ip=off

    PID hash table entries: 128 (order: -3, 512 bytes)

    Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

    Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

    Memory: 32MB = 32MB total

    Memory: 27972KB available (4012K code, 315K data, 148K init, 0K highmem)

    SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

    Hierarchical RCU implementation.

    NR_IRQS:245

    Console: colour dummy device 80x30

    Calibrating delay loop... 149.50 BogoMIPS (lpj=747520)

    Mount-cache hash table entries: 512

    CPU: Testing write buffer coherency: ok

    DaVinci: 144 gpio irqs

    regulator: core version 0.5

    NET: Registered protocol family 16

    bio: create slab <bio-0> at 0

    SCSI subsystem initialized

    usbcore: registered new interface driver usbfs

    usbcore: registered new interface driver hub

    usbcore: registered new device driver usb

    regulator: VDCDC1: 3200 <--> 3300 mV at 3300 mV 

    regulator: VDCDC2: 1750 <--> 3300 mV at 3300 mV 

    regulator: VDCDC3: 950 <--> 1375 mV at 1200 mV 

    regulator: LDO1: 1800 mV 

    regulator: LDO2: 1150 <--> 1300 mV at 1200 mV 

    pca953x 1-0020: failed reading register

    i2c-gpio i2c-gpio.1: using pins 20 (SDA) and 21 (SCL)

    Switching to clocksource timer0_1

    musb_hdrc: version 6.0, cppi4.1-dma, host, debug=0

    Waiting for USB PHY clock good...

    musb_hdrc: USB Host mode controller at fee00000 using DMA, IRQ 58

    musb_hdrc musb_hdrc: MUSB HDRC host driver

    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1

    hub 1-0:1.0: USB hub found

    hub 1-0:1.0: 1 port detected

    NET: Registered protocol family 2

    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

    TCP established hash table entries: 1024 (order: 1, 8192 bytes)

    TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

    TCP: Hash tables configured (established 1024 bind 1024)

    TCP reno registered

    UDP hash table entries: 256 (order: 0, 4096 bytes)

    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

    NET: Registered protocol family 1

    RPC: Registered udp transport module.

    RPC: Registered tcp transport module.

    RPC: Registered tcp NFSv4.1 backchannel transport module.

    EMAC: MII PHY configured, RMII PHY will not be functional

    JFFS2 version 2.2. (NAND) .. 2001-2006 Red Hat, Inc.

    msgmni has been set to 54

    io scheduler noop registered (default)

    da8xx_lcdc da8xx_lcdc.0: GLCD: Found Sharp_LK043T1DG01 panel

    Console: switching to colour frame buffer device 60x34

    Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled

    serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A

    serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A

    serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A

    console [ttyS2] enabled

    brd: module loaded

    ahci ahci: forcing PORTS_IMPL to 0x1

    ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode

    ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc 

    scsi0 : ahci

    ata1: SATA max UDMA/133 irq 67

    spi_davinci spi_davinci.1: DaVinci SPI driver in EDMA mode

    Using RX channel = 18 , TX channel = 19 and event queue = 1

    m25p80 spi1.0: m25p64 (8192 Kbytes)

    Creating 4 MTD partitions on "m25p80":

    0x000000000000-0x000000040000 : "U-Boot"

    0x000000040000-0x000000050000 : "U-Boot Environment"

    0x000000050000-0x0000007f0000 : "Linux"

    0x0000007f0000-0x000000800000 : "MAC Address"

    Read MAC addr from EEPROM: 00:08:ee:04:34:23

    spi_davinci spi_davinci.1: Controller at 0xfef0e000 

    console [netcon0] enabled

    netconsole: network logging started

    ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

    ohci ohci.0: DA8xx OHCI

    ohci ohci.0: new USB bus registered, assigned bus number 2

    ohci ohci.0: irq 59, io mem 0x01e25000

    hub 2-0:1.0: USB hub found

    hub 2-0:1.0: 1 port detected

    Initializing USB Mass Storage driver...

    usbcore: registered new interface driver usb-storage

    USB Mass Storage support registered.

    input: TPS6507x Touchscreen as /devices/platform/i2c-gpio.1/i2c-1/1-0048/input/input0

    omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0

    omap_rtc: RTC power up reset detected

    omap_rtc: already running

    i2c /dev entries driver

    Linux video capture interface: v2.00

    usbcore: registered new interface driver uvcvideo

    USB Video Class driver (v0.1.0)

    watchdog watchdog: heartbeat 60 sec

    cpuidle: using governor ladder

    cpuidle: using governor menu

    davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode

    usbcore: registered new interface driver usbhid

    usbhid: USB HID core driver

    Advanced Linux Sound Architecture Driver Version 1.0.21.

    usbcore: registered new interface driver snd-usb-audio

    No device for DAI tlv320aic3x

    asoc: tlv320aic3x <-> davinci-i2s mapping ok

    ALSA device list:

      #0: DA850/OMAP-L138 EVM (tlv320aic3x)

    TCP cubic registered

    NET: Registered protocol family 17

    Clocks: disable unused emac

    Clocks: disable unused aemif

    Clocks: disable unused spi0

    ata1: SATA link down (SStatus 0 SControl 300)

    regulator_init_complete: incomplete constraints, leaving LDO2 on

    regulator_init_complete: incomplete constraints, leaving LDO1 on

    regulator_init_complete: incomplete constraints, leaving VDCDC3 on

    regulator_init_complete: incomplete constraints, leaving VDCDC2 on

    regulator_init_complete: incomplete constraints, leaving VDCDC1 on

    emac-mii: probed

    omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)

    Waiting for root device /dev/mmcblk0p1...

     

     

  • One thing that might be happening is there may be a faulty connection between the AM1808 SOM and the EVM causing the connection to the SD Card to be less than optimal. You might try gently lifting the SOM up and off the board and carefully re-seating it, and see if that has an effect.

    I've reached out to a LogicPD friend of mine to see if he can shed some light here as well.

  • Hello Gerry,

     

    That's so nice of you!

     

    I did that and now I see that the error has changed, Any idea? Perhaps the logicPD person will have some more inputs?

     

    Waiting for root device /dev/mmcblk0p1...

    mmc0: new high speed SD card at address b368

    mmcblk0: mmc0:b368 SD    1.88 GiB (ro)

     mmcblk0: p1

    VFS: Cannot open root device "mmcblk0p1" or unknown-block(179,1)

    Please append a correct "root=" boot option; here are the available partitions:

    1f00             256 mtdblock0 (driver?)

    1f01              64 mtdblock1 (driver?)

    1f02            7808 mtdblock2 (driver?)

    1f03              64 mtdblock3 (driver?)

    b300         1981440 mmcblk0 driver: mmcblk

      b301         1930680 mmcblk0p1

    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,1)

    Backtrace:

    [<c0031730>] (dump_backtrace+0x0/0x114) from [<c0320420>] (dump_stack+0x18/0x1c)

     

    Best Regards

    Feroz

  • Hello Gerry,

     

    I did press it a lottle too hard and now lo it works!

     

    Thanks a lot!

     

    Best Regards

    Feroz

  • Hello!

    Gerry Simmons said:

    The SPI flash utility, sfh_OMAP-L138.exe is in Am1X_sdk_1_10_XX_XX/OMAP-L138_FlashAndBootUtils_2_23/OMAP-L138/GNU.

    Apparently this flash utility is a windows program. Is there anything similar running on Linux?

    Thanks,

    Pascal