Atmel announced its new ARM Cortex-A5-based SoC on October 1, the SAMA5D4. Compared to the previous Cortex-A5 SoC from Atmel, the SAMA5D3, this new version brings a L2 cache, NEON, a slightly different clock tree, a hardware video decoder, and Trustzone support.
Bootlin engineers have worked since several months with Atmel engineers to prepare and submit the support for this new SoC to the mainline Linux kernel. We have actually submitted the patches on September, 11th, almost a month before the official release of the new chip! This means that most of the support for this new SoC will already be part of the upcoming 3.18 kernel release. Meanwhile, it is already possible to test it out by using the linux-next repository.
There are however a few pieces missing pieces to support all aspects of the chip:
- A few patches are needed to get proper NAND flash controller support.
- The DMA controller is brand new in this SAMA5D4 SoC, and the DMA controller driver has not yet been merged, even though the patches have been posted a long time ago, and are currently in their sixth iteration.
- Display support, through a DRM/KMS driver, is also being reviewed. The driver, written by Bootlin engineer Boris Brezillon, was initially designed for the sam9x5 and sam5d3, but will be compatible with sama5d4 as well. The patch series is currently in its seventh iteration.
The last big missing part is support for non-secure mode: for the moment, the system always runs in secure mode. Running the kernel in non-secure mode will require some more work but an initial version will probably be pushed during the next development cycle.
Besides this work on SAMA5D4 support ahead of its public release, Bootlin is also doing a lot of maintenance work on all the Atmel ARM platforms in the Linux kernel: migration to the Device Tree, to the clock framework, to several other new subsystems, etc. See the summary of our kernel contributions to 3.16, 3.15 and 3.14.
Through this work, the Bootlin engineering team has a very deep knowledge of the Linux support for Atmel ARM processors. Do not hesitate to contact us if you need help to bring up the bootloader or kernel on your custom Atmel ARM platform! It is also worth mentioning that Free-Electrons is part of the Atmel partner ecosystem.
We are happy to announce that we have published a significant update of our Embedded Linux training course. As all our training materials, this update is freely available for everyone, under a Creative Commons (CC-BY-SA) license.
This update brings the following major improvements to the training session:
- The hardware platform used for all the practical labs is the Atmel SAMA5D3 Xplained platform, a popular platform that features the ARMv7 compatible Atmel SAMA5D3 processor on a board with expansion headers compatible with Arduino shields. The fact that the platform is very well supported by the mainline Linux kernel, and the easy access to a wide range of Arduino shields makes it a very useful prototyping platform for many projects. Of course, as usual, participants to our public training sessions keep their board after the end of the course! Note we continue to support the IGEPv2 board from ISEE for customers who prefer this option.
- The practical labs that consist in Cross-compiling third party libraries and applications and Working with Buildroot now use a USB audio device connected to the Xplained board on the hardware side, and various audio libraries/applications on the software side. This replaces our previous labs which were using DirectFB as an example of a graphical library used in a system emulated under QEMU. We indeed believe that practical labs on real hardware are much more interesting and exciting.
- Many updates were made to various software components used in the training session: the toolchain components were all updated and we now use a hard float toolchain, more recent U-Boot and Linux kernel versions are used, etc.
The training materials are available as pre-compiled PDF (slides, labs, agenda), but their source code in also available in our Git repository.
If you are interested in this training session, see the dates of our public training sessions, or order one to be held at your location. Do not hesitate to contact us at firstname.lastname@example.org for further details!
It is worth mentioning that for the purpose of the development of this training session, we did a few contributions to open-source projects:
Thanks a lot to our engineers Maxime Ripard and Alexandre Belloni, who worked on this major update of our training session.
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 can be:
storage can be:
df for DataFlash
nf for NAND flash
sd for SD card
- our main interest will be in
boot_strategy which 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.
The real time page I wrote for Atmel was finally released on the Linux4Sam Atmel Wiki. The purpose of this page was to help new comers to use real time features with Atmel CPUs and to present the state of the real time support.
Here are some figures associated to this work:
On this page I present the results of more than 300 hours of benchmarks!
During the setup and the tuning tests ran for more than 600 hours.
Analysis and formatting took a few dozen hours of work.
The benchmarks have been run on 3 boards, 3 flavors of Linux (vanilla, PREEMPT-RT patches, Xenomai co-kernel approach), and 2 kinds of tests (timer-based and GPIO-based)