AT91Bootstrap
Introduction
AT91Bootstrap is a first step bootloader which provides a set of algorithms to manage hardware initialization (GPIO, Clock, SDRAM, etc), to download your main application from specified FLASH media to main memory and to start it.
In the Android4SAM pre-built demo it is used to configure the hardware and to load and start the Linux kernel directly.
For more information, Please goto
the AT91Bootstrap application note.
Pre-built Binaries
Load AT91Bootstrap on SAM9 Boards
This section describes how to load AT91Bootstrap into the boot media with
SAM-BA.
- 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
- Start SAM-BA GUI Application
- Select the the board in the drop-down menu and choose the USBSerial connection

- Click connect to start SAM-BA UI
- In the main SAM-BA window :

- Choose the proper media tab (NandFlash) in the SAM-BA GUI interface
- Initialize the media choosing the Enable action in the Scripts rolling menu and press Execute
- Choose Enable OS PMECC is only for sam9x5 and the default PMECC parameters shall be kept
- Choose Send boot file, press Execute
- Select the at91bootstrap binary file and press Open ; the media is written down
- Close SAM-BA, remove the USB cable
Build AT91Bootstrap
For SD Card Booting
- Get the source code of AT91Bootstrap
$ wget ftp://ftp.linux4sam.org/pub/Android4SAM/v2.0/patches/bootstrap-3.1.tar.gz
- Decompress the package
$ tar zxvf bootstrap-3.1.tar.gz && cd bootstrap-3.1
- Configure AT91Bootstrap
$ make mrproper && cp board/at91sam9m10ek/at91sam9m10sd_android_defconfig .config
You may need to run
make menuconfig
to configure other parameters such as Linux kernel command line.
- Build AT91Bootstrap
$ make CROSS_COMPILE=(path_to_cross-compiler/cross-compiler-prefix-)
- Format one SD Card to FAT32
- Copy binaries/at91sam9m10ek-sdcardboot-3.1.bin to SD card and rename it to boot.bin

For the board with AT91SAM9G45 MCU
step 3 will be
$ make mrproper && cp board/at91sam9g45ekes/at91sam9g45sd_android_defconfig .config
Step 6 will be,
Copy
binaries/at91sam9g45ekes-sdcardboot-3.1.bin to SD card and rename it to
boot.bin

For the board with AT91SAM9X5 MCU
step 3 will be
$ make mrproper && cp board/at91sam9x5ek/at91sam9x5sd_android_defconfig .config
Step 6 will be,
Copy
binaries/at91sam9x5ek-sdcardboot-3.1.bin to SD card and rename it to
boot.bin

In Linux environment, you may need to name the booting image as
BOOT.BIN

In order to boot from SD card, the MCU ROM code has two assumptions,
- The first partition of the SD Card is formated with FAT or FAT32
- The bootstrap file shall be named with "boot.bin" and is copied into the first partition
For NandFlash Booting
- Get the source code of AT91Bootstrap
$ wget ftp://ftp.linux4sam.org/pub/Android4SAM/v2.0/patches/bootstrap-3.1.tar.gz
- Decompress the package
$ tar zxvf bootstrap-3.1.tar.gz && cd bootstrap-3.1
- Configure AT91Bootstrap
$ make mrproper && cp board/at91sam9m10ek/at91sam9m10nf_android_defconfig .config
- Build AT91Bootstrap
$ make CROSS_COMPILE=(path_to_cross-compiler/cross-compiler-prefix-)
- The final image can be found as binaries/at91sam9m10ek-nandflashboot-3.1.bin
- Flash the final image to your EK board, as mentioned above

For the board with AT91SAM9G45 MCU
step 3 will be
$ make mrproper && cp board/at91sam9g45ekes/at91sam9g45nf_android_defconfig .config
Step 5 will be,
The final image can be found as
binaries/at91sam9g45ekes-nandflashboot-3.1.bin

For the board with AT91SAM9X5 MCU
step 3 will be
$ make mrproper && cp board/at91sam9x5ek/at91sam9x5nf_android_defconfig .config
Step 5 will be,
The final image can be found as
binaries/at91sam9x5ek-nandflashboot-3.1.bin
See also: U-Boot