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.

Writing Kernel to NOR Flash ?

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

I have been testing NOR Flash boot mode using AM1808 EVM. (LogicPD)

I write pre-builded arm-nor-ais.bin and u-boot.bin to NOR flash of UI board using norflash_writer

And I tired following command to flash NOR the uImage.

  1. Download uImage and copy it to the NOR partition:

    U-Boot> tftp 0xc0700000 uImage
    U-Boot> protect off 60080000 +200000
    U-Boot> erase 60080000 +200000
    U-Boot> cp.b c0700000 60080000 200000

http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot#NOR_Flash

But uboot don't support 'protect' command.

The uboot I worte print the below message.

Booting with TI UBL
Device OPP (300MHz, 1.2V)

U-Boot 2009.11 (Mar 23 2011 - 13:13:04)

I2C:   ready
DRAM:  64 MB
In:    serial
Out:   serial
Err:   serial
ARM Clock : 300000000 Hz
DDR Clock : 132000000 Hz
Net:   Ethernet PHY: GENERIC @ 0x00

What is the version that supports 'protect' command?

 

 

  • This is an error in the documentation. The "protect" command is not necessary, as the NOR is unlocked by default.

    Jeff

  • Thank you your relpy.

    likewise, 'erase' command is not supported in uboot.

  • Remony said:

    Thank you your relpy.

    likewise, 'erase' command is not supported in uboot.

    I am trying to do the same thing (program u-boot and kernel into NOS Flash on the AM1808evm board).

    Did this question ever get answered or did you switch to a different processor?

    I am new to embedded LINUX so I'm sure to be missing something.

  • Actually the erase and protect command are supported. By default U-boot is built to support SPI Flash, so you will have to recompile for NOR flash support. Instructions are here:

    http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_U-Boot

    Once you change the #define to NOR_FLASH both commands are available.

    Jeff

  • jc-ti said:

    Actually the erase and protect command are supported. By default U-boot is built to support SPI Flash, so you will have to recompile for NOR flash support. Instructions are here:

    http://processors.wiki.ti.com/index.php/GSG:_Building_Software_Components_for_OMAP-L1#Rebuilding_U-Boot

    Once you change the #define to NOR_FLASH both commands are available.

    Jeff

    I have already built u-boot with the NOR Flash support (Emil Lenchak told me how) but how does one program it into the NOR Flash

    when the only u-boot in the target doesn't support NOR Flash and the XDS100v2 emulator doesn't work?

    For now, Emil has succeeded in putting an updated u-boot in my NOR Flash (my XDS100v2 emulator still doesn't work, we used his XDS510) but it seems the AM1808EVM

    development kit is not as useful as it is advertised to be.

  • Mellissa,

    If you don't have a working emulator, then you can use the serial flasher and write the UBL and U-Boot to the NOR flash.

    http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138

    Jeff

  • I tried that too (didn't work), but only last Friday did I find out that you cannot access the NOR Flash with the SD card pushed in.

    I hope to get a chance to try it all again with the SD card pulled out.

  • Mellissa Dalby said:

    I tried that too (didn't work), but only last Friday did I find out that you cannot access the NOR Flash with the SD card pushed in.

    I hope to get a chance to try it all again with the SD card pulled out.

    I tried doing this again this time with the SD card pulled out and it failed.  That is, the working u-boot image that Emil Lenchak programmed into the NOR Flash using his laptop and his XDS510 eumlator has now been obliterated by this action so now I'm no longer booting from NOR Flash.

    Here I have copied the console session that claimed to be successful but in reality was NOT successful.

    C:\Shared_Space\uBoot-in_NOR_experiment>sfh_OMAP-L138.exe -p COM8 -flash -flashType NOR -v ubl_AM1808_NOR_2.bin u-boot.bin
    -----------------------------------------------------
       TI Serial Flasher Host Program for OMAP-L138
       (C) 2011, Texas Instruments, Inc.
       Ver. 1.67
    -----------------------------------------------------


          [TYPE] UBL and application image
           [UBL] ubl_AM1808_NOR_2.bin
     [APP IMAGE] u-boot.bin
        [TARGET] OMAPL138
        [DEVICE] NOR

    Attempting to connect to device COM8...
    Press any key to end this program at any time.

    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME... (power on or reset target now)
    (AIS Parse): BOOTME received!
    (AIS Parse): Performing Start-Word Sync...
    (AIS Parse): Performing Ping Opcode Sync...
    (AIS Parse): Processing command 0: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 10932-Byte section to address 0x80000000.
    (AIS Parse): Processing command 1: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 1112-Byte section to address 0x80002AB4.
    (AIS Parse): Processing command 2: 0x58535906.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Performing jump and close...
    (AIS Parse): AIS complete. Jump to address 0x80000000.
    (AIS Parse): Waiting for DONE...
    (AIS Parse): Boot completed successfully.

    Waiting for SFT on the OMAP-L138...
            Target: BOOTUBL
            Target:    DONE

    Flashing UBL ubl_AM1808_NOR_2.bin (11248 bytes) at 0x00000000

            Target: CFI Query...passed.
            Target: NOR Initialization:
            Target:         Command Set: Intel
            Target:         Manufacturer: INTEL
            Target:         Size: 0x00000008 MB
            Target: SENDIMG
            Target:   BEGIN
     100% [ ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ ]
                      Image data transmitted over UART.

            Target:    DONE
     100% [ ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ ]
                           UBL programming complete

            Target: Erasing the NOR Flash
            Target: Erased through 0x60020000
            Target: Erase Completed
            Target: Writing the NOR Flash
            Target: NOR Write OK through 0x60001000.
            Target: SENDING
            Target: Writing the NOR Flash
            Target: NOR Write OK through 0x60002000.
            Target: SENDING
            Target: Writing the NOR Flash
            Target: NOR Write OK through 0x60002BF0.
            Target: SENDING
            Target:    DONE

    Flashing application u-boot.bin (183860 bytes)

            Target: SENDIMG
            Target:   BEGIN
     100% [ ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ ]
                      Image data transmitted over UART.

            Target:    DONE
       0% [ ------------------------------------------------------------ ]
                    Programming application into flash...

            Target: Erasing the NOR Flash
            Target: Erased through 0x60040000
            Target: Erased through 0x60060000
            Target: Erase Completed
            Target: Writing APP to NOR flash
            Target: Writing the NOR Flash
            Target: NOR Write OK through 0x60020010.
       0%   Target: Writing the NOR Flash
            Target: NOR Write OK through 0x60021010.
            Target: SENDING
       2%   ¦arget: Writing the NOR Flash
            Target: NOR Write OK through 0x60022010.
            Target: SENDING
       4%   ¦¦rget: Writing the NOR Flash
            Target: NOR Write OK through 0x60023010.
            Target: SENDING
       6%   ¦¦¦¦et: Writing the NOR Flash
            Target: NOR Write OK through 0x60024010.
            Target: SENDING
       9%   ¦¦¦¦¦t: Writing the NOR Flash
            Target: NOR Write OK through 0x60025010.
            Target: SENDING
      11%   ¦¦¦¦¦¦: Writing the NOR Flash
            Target: NOR Write OK through 0x60026010.
            Target: SENDING
      13%   ¦¦¦¦¦¦¦¦Writing the NOR Flash
            Target: NOR Write OK through 0x60027010.
            Target: SENDING
            Target: Writing the NOR Flash
      15%   ¦¦¦¦¦¦¦¦¦OR Write OK through 0x60028000.
            Target: NOR Write OK through 0x60028010.
            Target: SENDING
      18%   ¦¦¦¦¦¦¦¦¦¦iting the NOR Flash
            Target: NOR Write OK through 0x60029010.
            Target: SENDING
      20%   ¦¦¦¦¦¦¦¦¦¦¦¦ing the NOR Flash
            Target: NOR Write OK through 0x6002A010.
            Target: SENDING
      22%   ¦¦¦¦¦¦¦¦¦¦¦¦¦ng the NOR Flash
            Target: NOR Write OK through 0x6002B010.
            Target: SENDING
      25%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ the NOR Flash
            Target: NOR Write OK through 0x6002C010.
            Target: SENDING
      27%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦the NOR Flash
            Target: NOR Write OK through 0x6002D010.
            Target: SENDING
      29%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦he NOR Flash
            Target: NOR Write OK through 0x6002E010.
            Target: SENDING
      31%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ NOR Flash
            Target: NOR Write OK through 0x6002F010.
            Target: SENDING
            Target: Writing the NOR Flash
      34%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ through 0x60030000.
            Target: NOR Write OK through 0x60030010.
            Target: SENDING
      36%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦OR Flash
            Target: NOR Write OK through 0x60031010.
            Target: SENDING
      38%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ Flash
            Target: NOR Write OK through 0x60032010.
            Target: SENDING
      40%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦Flash
            Target: NOR Write OK through 0x60033010.
            Target: SENDING
      43%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦lash
            Target: NOR Write OK through 0x60034010.
            Target: SENDING
      45%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦sh
            Target: NOR Write OK through 0x60035010.
            Target: SENDING
      47%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦h
            Target: NOR Write OK through 0x60036010.
            Target: SENDING
      50%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60037010.
            Target: SENDING
            Target: Writing the NOR Flash
      52%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦60038000.
            Target: NOR Write OK through 0x60038010.
            Target: SENDING
      54%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60039010.
            Target: SENDING
      56%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6003A010.
            Target: SENDING
      59%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6003B010.
            Target: SENDING
      61%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6003C010.
            Target: SENDING
      63%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6003D010.
            Target: SENDING
      65%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6003E010.
            Target: SENDING
      68%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6003F010.
            Target: SENDING
            Target: Writing the NOR Flash
      70%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60040010.
            Target: SENDING
      72%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60041010.
            Target: SENDING
      75%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60042010.
            Target: SENDING
      77%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60043010.
            Target: SENDING
      79%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60044010.
            Target: SENDING
      81%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60045010.
            Target: SENDING
      84%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60046010.
            Target: SENDING
      86%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60047010.
            Target: SENDING
            Target: Writing the NOR Flash
      88%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60048010.
            Target: SENDING
      90%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x60049010.
            Target: SENDING
      93%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6004A010.
            Target: SENDING
      95%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6004B010.
            Target: SENDING
      97%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
            Target: NOR Write OK through 0x6004C010.
            Target: SENDING
     100%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
     100%   ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
                       Application programming complete
            Target:    DONE
            Target:    DONE

    Operation completed successfully.

  • I finally succeeded in writing to NOR Flash by myself using:

    sfh_OMAP-L138.exe -p COM8 -flash -flashType NOR -v arm-nor-ais.bin u-boot-nor.bin

    The two things that made the difference are:

    (1) doing this with the SD card OUT!!

    (2) using the AIS file "arm-nor-sia.bin" made for me by Emil Lenchak.

    I still need to know how to make a proper AIS file for myself.

    I have played with AISgen for D800K006 to some length and have yet to be successful with that.

  • You don't need a custom AIS UBL, you can use the one that comes with the PSP. The source code is also there if you want to make modifications.

    Also the newest revisions of the EVM have a hardware fix for the NOR/SDMMC issue, but in your case you must remove the card in order to boot from NOR.

    Jeff