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:
nffor NAND flash
sdfor SD card
- our main interest will be in
boot_strategywhich can be:
uboot: start u-boot or any other bootloader
linux: boot Linux directly, passing a kernel command line
linux_dt: boot Linux directly, using a Device Tree
android: 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:
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.