Project

General

Profile

Reprogramming the Bootloader

Reprogramming a Dead/Bricked Board

This procedure will allow you to reprogram the User Boot Loader (UBL) and u-Boot image on a MityDSP-L138/MityARM-1808 module via the serial port AIS bootloader (via UART1, the console port for MityDSP-L138). The AIS bootloader is entered by holding the boot-option button down while resetting (or powering up) a board installed on the Industrial I/O board.

This procedure should only be needed if a user has corrupted the base of the SPI-NOR FLASH containing the factory installed user-boot-loader and boot image.

This procedure should not be used if a user can boot to the U-Boot prompt. If U-Boot still runs on the board and needs to be updated or repaired, the instructions on the Das U-Boot page should be used instead.

This procedure does not restore kernel/FPGA or root filesystem/NAND data.

Requirements:
  1. Industrial I/O board or host board with capability to pull ext-boot pin option low.
  2. PC running Windows XP/Vista/7/10 with a serial port (Note: Utility can be run from Linux using mono)

Procedure:

  1. Extract the latest files in this zip file (Dead Board Programming Files) to a directory on your PC.
    1. The readme.txt file within details the files included and MD5sums for verification
    2. Alternatively, follow the steps outlined in First Stage User Boot Loader and Second Stage Das U-Boot Port to generate the necessary UBL_SPI_MEM.ais and u-boot.bin files.
  2. Connect the PC serial port to the console port of the MityDSP-L138 host board.
  3. Start a command line on the PC with Start-->Run "cmd"
  4. Change directories to the location of the files extracted from the zip file
  5. Run the command:
    c:\yourlocation> sfh_OMAP-L138 -flash -v -p COMx UBL_SPI_MEM.ais u-boot.bin
    

    In the command, COMx should be replaced with the proper COM port number (e.g., COM1, COM3, etc.) of the serial port attached to the MityDSP-L138 host board.
    Linux: mono sfh_OMAP-L138.exe -flash -v -p /dev/ttyUSB0 UBL_SPI_MEM.ais u-boot.bin
  6. While holding the 'boot me' button, apply power or reset the MityDSP-L138 host board. If successful, you should see text on the console similar to:
    (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 8484-Byte section to address 0x80000000.
    (AIS Parse): Processing command 1: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 716-Byte section to address 0x80002124.
    (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_SPI_MEM.ais (8396 bytes) at 0x00000000
            Target:         INFO: SPI Memory Initialization passed.
            Target: Flashing UBL...
            Target: SENDIMG
            Target:   BEGIN
     100% [ ████████████████████████████████████████████████████████████ ]
                      Image data transmitted over UART.
            Target:    DONE
     100% [ ████████████████████████████████████████████████████████████ ]
                           UBL programming complete
            Target: Doing block erase.SENDING
            Target: SENDING
            Target: SENDING
            Target: UBL flashed correctly.
            Target:    DONE
    Flashing application u-boot.bin (254972 bytes) at 0x00010000
            Target: SENDIMG
            Target:   BEGIN
     100% [ ████████████████████████████████████████████████████████████ ]
                      Image data transmitted over UART.
            Target:    DONE
     100% [ ████████████████████████████████████████████████████████████ ]
                       Application programming complete
            Target: Doing block erase.Doing block erase.Doing block erase.Doing block erase.SENDING
            Target: SENDING
            ...
            Target: SENDING
            Target: Finished writing to SPI, now verifying.
            Target:    DONE
            Target:    DONE
    
    Operation completed successfully.
    

At this point, the user-boot-loader and the u-Boot image should be reprogrammed into the SPI-NOR flash. You should be able to launch your terminal program and reset the host board and see the u-Boot prompt as expected.

If you get a message:

*** Warning - bad CRC, using default environment

in the u-Boot startup, then the u-Boot environment has been reset. You will need to restore any environment settings you had added to your system, and the save the environment using "saveenv".

If you get a message

Error - Checksum on MityDSP-L138 Config Block Checksum Invalid.
You must set the config to FLASH to make permanent

in the u-Boot startup, then the OMAP peripheral configuration block (which selects which emac interface to use, ports to configure, etc.) must be reset and saved. For the industrial I/O board, the default settings should be OK. You can apply the settings be running (and just hitting return for all the prompts):
U-Boot > config set
Ethernet Config : 2  [default]
UART - 0 Configuration ---
Enable UART : 0  [default]
UART - 1 Configuration ---
Enable UART : 1  [default]
Baud : 115200  [default]
HW Flow Control : 0  [default]
Is Console : 1  [default]
UART - 2 Configuration ---
Enable UART : 0  [default]
SPI - 0 Configuration ---
Enable SPI : 0  [default]
SPI - 1 Configuration ---
Enable SPI : 1  [default]
CLK is Output : 1  [default]
Chip Select [0] Enable : 01  [default]
Chip Select [1] Enable : 00  [default]
Chip Select [2] Enable : 00  [default]
Chip Select [3] Enable : 00  [default]
Chip Select [4] Enable : 00  [default]
Chip Select [5] Enable : 00  [default]
Chip Select [6] Enable : 00  [default]
Chip Select [7] Enable : 00  [default]
ENA ENable : 0  [default]
CLK Rate : 30000000  [default]
LCD Configuration  [default]
LCD Enable : 0  [default]
U-Boot > config save
Configuration Saved

Finally, to get the board to boot off of flash:

run flashbootargs

Note: Serial flash programming utilities can be found in the MDK ( see http://support.criticallink.com/redmine/projects/arm9-platforms/files )

To restore the u-Boot default environment, execute the following commands from u-Boot:

sf probe 0
sf erase 0x90000 0x10000

uBoot Date and Programming Files Download Link
Jan 05 2024 - 14:10:19
Jan 03 2018 - 11:30:43
Mar 31 2011 - 19:39:18

Go to top
Add picture from clipboard (Maximum size: 1 GB)