U-Boot

Important Notice

We're not using U-Boot in this release. But during the R&D phase, the U-Boot is very convenient to use. The information below is left here just for your reference.

Introduction

Das U-Boot - the Universal Boot Loader WIKI Website is the main entry point for this bootloader / debugging tool available on several processors. It is of course available for AT91 ARM processors.

Details of U-Boot are available in http://www.at91.com/linux4sam/bin/view/Linux4SAM/U-Boot , where you can find the guide on how to use U-Boot.

Pre-built Images

U-Boot 1.3.4 (1.3.4-exp.5.patch)
Board Description Binary
at91sam9m10-g45-ek U-Boot binary for AT91SAM9M10 MCU u-boot-1.3.4-exp.5-at91sam9m10g45ek-sam9m10_nandflash.bin
at91sam9m10-g45-ek U-Boot binary for AT91SAM9G45 MCU u-boot-1.3.4-exp.5-at91sam9m10g45ek-sam9g45_nandflash.bin

Load U-Boot on AT91EK Boards

This section describes how to load U-Boot into the boot media with SAM-BA on AT91SAM9M10-G45-EK.

  • Connect the USB Device Interface to your host machine using the USB Device Cable
  • Make sure that the chip can execute the bootROM monitor SAM-BA-boot :
  • Check and conform to the Default Jumpers Settings
  • JP8 must be opened (BMS=1) to boot from the on-chip Boot ROM
  • Remove NAND Flash Jumper (JP10)
  • Power up the board
  • Verify that the USB connection is established (ATMEL AT91xxxxx Test Board appears in taskbar notification area)
  • Close NAND Flash Jumper (JP10)
  • Start SAM-BA GUI Application
  • Select the the board in the drop-down menu and choose the USB Connection

    sam-ba_2.10_startup.PNG

  • Eventually plug back a jumper to access the media on which U-Boot must be loaded to
  • In the main SAM-BA window :

    sam-ba_2.10_uboot_burnning_notes.PNG

  1. Choose the proper media tab (NandFlash.) in the SAM-BA GUI interface
  2. Initialize the media choosing the Enable action in the Scripts rolling menu and press Execute
  3. Press on Send File Name Browse button
  4. Choose u-boot.bin binary file and press Open
  5. Enter the proper address on media in the Address text field. You can find a media map for each product in Android4SAM NandFlash demo Memory
  6. Press Send File button
  7. Close SAM-BA, remove the USB cable
Now you should have a running U-Boot flashed on your board. To verify, you can have a look at the DBGU serial interface once you have reset the board.

Build U-Boot From Source Code

To build U-Boot from source code, please go through the following steps.

Getting U-Boot Source Code

Dedicated page on U-Boot wiki : http://www.denx.de/wiki/U-Boot/SourceCode

To get the U-Boot bootloader sources for AT91 products, let's take U-Boot 1.3.4 as an example

  • Download the u-boot sources from the link in the second below and extract it:
      wget ftp://ftp.denx.de/pub/u-boot/u-boot-1.3.4.tar.bz2
      tar xvjf u-boot-1.3.4.tar.bz2
      cd u-boot-1.3.4

Get ATMEL U-Boot Patch

  • Take the corresponding AT91 U-Boot patch set
      wget ftp://www.at91.com/pub/uboot/u-boot-1.3.4-exp.5/u-boot-1.3.4-exp.5.diff

  • Apply it on top of the original U-Boot code
      cat u-boot-1.3.4-exp.5.diff | patch -p1

Get Android U-Boot Patch

  • Download U-boot patch for Android set
    wget ftp://ftp.linux4sam.org/pub/Android4SAM/9m10g45/v1.1/patches/u-boot-1.3.4-exp.5-Android-2.1_r2-ver1.1.diff
  • Apply it on top of the original U-Boot code
      cat u-boot-1.3.4-exp.5-android-2.1_r2-ver1.1.diff | patch -p1

Choosing Proper Configuration

Modify the location of the U-Boot environmen to your needs :

Please go to the top-level Makefile or read the README.at91 file in the doc directory of U-Boot to find the exact target when invoking make.

To put environment variables in nandflash:

   make at91sam9xxxek_nandflash_config

Please go to the top-level Makefile or read the README.at91 file in the doc directory of U-Boot to find the exact target when invoking make.

Cross-compiling U-Boot

Once the AT91 u-boot sources available, cross-compile U-Boot is made in two steps : configuration and compiling. Check the Configuration chapter in U-Boot reference manual.

Note that both arm-elf- and arm-linux- ARM GCC cross-compiler types are suitable for U-Boot building.

  make distclean
For AT91SAM9M10-G45-EK board with AT91SAM9G45 MCU:
  make at91sam9g45ekes_nandflash_config
  make CROSS_COMPILE=<path_to_cross-compiler/cross-compiler-prefix->

For AT91SAM9M10-G45-EK board with AT91SAM9M10 MCU

  make at91sam9m10g45ek_nandflash_config
  make CROSS_COMPILE=<path_to_cross-compiler/cross-compiler-prefix->

path_to_cross-compiler is only needed if it is not in your PATH.
Usually cross-compiler-prefix- looks like arm-linux- or arm-elf-

The result includes several binary files. Two import files are

  • u-boot.bin is the file you should store on the board
  • u-boot is the ELF format binary file you may use to debug U-Boot through a JTag link for instance.

See also: LinuxKernel_old

Load U-Boot on AT91EK Boards

This section describes how to load U-Boot into the boot media with SAM-BA on AT91SAM9M10-G45-EK.

r8 - 30 Jul 2014 - 08:25:09 - VoiceShen
 
Android4SAM

Copyright by the contributing authors. All material on the platform is the property of the contributing authors.

Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions

Atmel and others, are registered trademarks or trademarks of Atmel or its subsidiaries.This site is powered by the TWiki collaboration platform

ARM and others are registered trademarks or trademarks or ARM Ltd. Other terms and product names may be trademarks of others.

Under the terms of the Creative Commons Attribution License

Syndicate this siteRSS ATOM