3.1.1 AT91Bootstrap

Perform the following steps to build the AT91Bootstrap.

  1. Setup ARM Cross Compiler:
    • In Ubuntu, install the ARM Cross Compiler by using the following command:
      $ sudo apt-get install gcc-arm-gnueabi
    • Export the cross compiler path to terminal by using the following command:

      $ export CROSS_COMPILER=arm-linux-gnueabi-
  2. To get the source code, clone the repository by using the following command:
    $ git clone git://github.com/linux4sam/at91bootstrap.git
  3. After downloading the at91bootstrap move to the cloned directory by using the following command:
    $ cd at91bootstrap/
  4. After moving into the AT91Bootstrap root directory, you will find a board/sama5d2_xplained folder which contains several default configurations files. To make the bootstrap to load the u-boot from the eMMC, configure the bootstrap with the sama5d2_xplainedemmc_uboot_defconfig file.
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- sama5d2_xplainedemmc_uboot_defconfig

    After successful completion of the configuration process the .config file is available in AT91Bootstrap root directory.

  5. Build the Bootstrap binary by executing the following code:
    $ make

    This generates the sama5d2_xplained-sdcardboot-uboot-3.9.1.bin file in the binaries directory.

  6. For the boot ROM code to recognize the valid boot code in the SD card or eMMC, rename the sama5d2_xplained-sdcardboot-uboot-3.9.1.bin AT91bootstrap file to BOOT.BIN