Here is an update for our previous article on booting linux directly from AT91bootstrap. On newer ATMEL platforms, you will have to use AT91bootstrap 3. It now has a convenient way to be configured to boot directly to Linux.
You can check it out from github:
git clone git://github.com/linux4sam/at91bootstrap.git
That version of AT91bootstrap is using the same configuration mechanism as the Linux kernel. You will find default configurations, named in the form:
<board_name><storage>_<boot_strategy>_defconfig
board_name
can be:at91sam9260ek
,at91sam9261ek
,at91sam9263ek
,at91sam9g10ek
,at91sam9g20ek
,at91sam9m10g45ek
,at91sam9n12ek
,at91sam9rlek
,at91sam9x5ek
,at91sam9xeek
orat91sama5d3xek
storage
can be:df
for DataFlashnf
for NAND flashsd
for SD card
- our main interest will be in
boot_strategy
which can be:uboot
: start u-boot or any other bootloaderlinux
: boot Linux directly, passing a kernel command linelinux_dt
: boot Linux directly, using a Device Treeandroid
: boot Linux directly, in an Android configuration
Let’s take for example the latest evaluation boards from ATMEL, the SAMA5D3x-EK. If you are booting from NAND flash:
make at91sama5d3xeknf_linux_dt_defconfig
make
You’ll end up with a file named at91sama5d3xek-nandflashboot-linux-dt-3.5.4.bin
in the binaries/
folder. This is your first stage bootloader. It has the same storage layout as used in the u-boot
strategy so you can flash it and it will work.
As a last note, I’ll had that less is not always faster. On our benchmarks, booting the SAMA5D31-EK using AT91bootstrap, then Barebox was faster than just using AT91bootstrap. The main reason is that barebox is actually enabling the caches and decompresses the kernel(see below, the kernel is also enaling the caches before decompressing itself) before booting.