Second Stage Das U-Boot Port

The ARM-9 based Mity CPU's are provided with a port of the Das U-Boot bootloader application commonly used to start embedded linux systems. The source for the port for the MityDSP-L138 and MityARM-1808 platforms can be obtained at the git repository link above. This port is based on an initial port for an OMAP-L138 EVM module developed by TI at the Arago project site.

U-Boot configures a variety of interfaces before the Linux kernel starts, such as the serial ports, ethernet ports, and the MMC interface. It also provides the ability to load the FPGA. U-Boot is configured to allow the user to abort the boot process and access a simplistic console that allows for configuration of these settings.

Users requiring the source code may access the code here at the git repo above. The u-Boot code is licensed under the Gnu General Public License, Version 2. There is one main branch on the repository:

  • master - represents the tested stable build that has been / will be released as part of a board support package delivery


The modifications to the mainline u-Boot are fairly small and contained within the boards/davinci/mityomapl138 directory. The list below captures the main differences between the local git repository and the mainline (when the snapshot was made).

  1. Add support for mityomapl138 board type (Makefile targets and board files).
  2. Add support for configuring factory data in onboard I2C FLASH:
    - Serial Number
    - MAC address
    - Board Type identification
  3. Add support for dynamic peripheral configuration using a sector in onboard SPI FLASH:
    - UART configuration
    - LCD configuration
    - Network configuration
    - MMC configuration
    - SPI/McBSP configuration
  4. Add commands to support programming on-board FPGA at boot-time.
  5. Add make ubl image tool to add UBL header to front of u-boot.bin image for UBL strapping.
  6. Add bootdsp command to load-and-launch a DSP program stored in a COFF image.
  7. Add capability to deal with multiple PHYs reporting on the MDIO interface.

Building u-Boot

To download your own copy of u-boot run:

#bash> git clone git:// u-boot-mitydspl138
#bash> cd u-boot-mitydspl138

This will download the repository and create a "master" branch from the server. Please note that if you intend to make changes, etc., you will need to become moderately familiar with the git tool (see Information on git).

For MDK from or newer than August 2017

In order to build the u-boot, you need to have first installed a valid version of the Yocto based GCC Toolchain. Go to the files section then download and install the latest MDK.

#bash> source /opt/criticallink/mityomapl138_20170818/environment-setup-arm926ejste-criticallink-linux-gnueabi
#bash> unset LDFLAGS
#bash> alias makearm="make ARCH=arm CROSS_COMPILE=arm-criticallink-linux-gnueabi-" 

Skip to "For all MDK versions" section.

For MDK older than August 2017

In order to build the u-boot, you need to have first installed a valid version of the angstrom GCC Toolchain.

#bash> source /usr/local/oecore-i686/environment-setup-armv5te-angstrom-linux-gnueabi
#bash> alias makearm="make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi-" 

For all MDK versions

#bash> makearm mityomapl138_config
#bash> makearm

If successful, there should be a u-boot.bin file (usable with the serial downloader tool for a dead board alongside the First Stage User Boot Loader) as well as a u-boot-ubl.bin file suitable for reprogramming U-Boot from within an already running U-Boot.

UBL Header Tool and u-boot-ubl.bin

The UBL Header Tool, genublimg, takes a u-boot.bin file generated by these build instructions and appends proper header information to it. This header information is used by the UBL to pass control of the system over to U-Boot. In the default factory configuration, or when reprogramming a dead or bricked board, this header information is automatically added by the serial flashing tool. However, when attempting to reprogram or update the U-Boot program from within the U-Boot console, this header information must be included with the U-Boot binary by genublimg. genublimg does not include any data from the UBL itself, and only allows for the reprogramming of U-Boot from within an already running instance of the program.

Note: By default, the build process for U-Boot creates a suitable u-boot-ubl.bin file. This tool is only needed if a custom U-Boot binary is being used from outside the build process.

Reflashing U-Boot

If you need to reflash the u-boot image to your board, you can follow the instructions below. WARNING: failure to perform this step correctly will "brick" your board, and you'll need to use an emulator or a serial based loader to recover functionality (or return it to Critical Link for servicing).

U-Boot > tftp 0xc0700000 myserver:/path/to/u-boot-ubl.bin; 
U-Boot > sf probe 0; 
U-Boot > sf erase 0x10000 0x80000; 
U-Boot > sf write 0xc0700000 0x10000 ${filesize}

When you reset, if you get any messages about invalid configurations, you will need to rerun the configuration routines (e.g., "config set" followed by "config save" or "factoryconfig set" followed by "factoryconfig save"). Contact Critical Link for assistance in this situation.

Binary Images

The u-Boot images are included in the board support packages. We've made a couple of images available here for convenience only. Check the repository for latest version history (build it yourself to ensure the latest-and-greatest...).

Add picture from clipboard (Maximum size: 600 MB)