OP-TEE gains a clock framework contributed by Bootlin
Introduction

OP-TEE is a popular open-source reference implementation of a Trusted Execution Environment that relis on the Arm Trustzone technology. While working on the OP-TEE port for an ARM 32-bit system-on-chip, the Microchip SAMA5D2, we needed to add support for the complete clock tree of this SoC. OP-TEE did not have any generic clock support at all and we felt the need to add such a framework. Thanks to this framework, support the 10+ clocks of the Microchip SAMA5D2 was easily imported from Linux with less work than a complete rewrite of the clock tree. Using generic subsystems allows to lower the maintenance cost and easily add new clocks.

In this blog post, we will describe in more details this clock framework, and the contributions we are doing to the OP-TEE project.

Clock framework

The clock framework that we contributed to OP-TEE allows to register clocks and represent a full clock tree with parents. Device Tree support has been added to allows parsing the clocks and their relationships from Device Tree. It provides a consumer API that allows device drivers to query clocks from their Device Tree node, enable or disable them, and get or set the needed clock rates.

assigned-clock-parents and assigned-clock-rates Device Tree properties are also supported and will apply the clock parents and rates described in these properties. A fixed-clock driver matching the "fixed-clock" compatible string has also been added since this one is often present in SoC Device Trees.

Peripheral drivers in OP-TEE can now use the functions provided by the clock framework to get clocks from the Device Tree using clk_dt_get_by_name() and then enable/disable them at will with clk_enable() and clk_disable() . Rates can also be set and retrieved using clk_set_rate() and clk_get_rate().

The pull request was made on OP-TEE github and contained the following commits, which have now been merged in the official upstream OP-TEE project:

drivers: add type field to dt_driver structdrivers: clk: add generic clock frameworkdrivers: clk: add devicetree supportdrivers: clk: add fixed-clock driverMAINTAINERS: add clock driver interface entryFuture work

With this clock framework in place, we are soon going to contribute support for the Microchip SAMA5D2, which will make use of the new clock framework. Some other platforms will also gain cleaner clock support thanks to this framework: for example, the existing STM32MP1 clock support is expected to be migrated to this clock framework.

In addition, based on this clock framework, SCMI (System Control and Management Interface) clock support has also been added. While OP-TEE already has support for exposing SCMI clocks to clients, the actual callbacks have to be implemented by platform-specific code. This additional support will allow exposing clocks registered within the clock framework to a SCMI client without any custom platform code. A Device Tree description will allow matching SCMI clock identifiers with clocks provided by clock drivers.

We have already submitted a pull request for this support, which is currently under review: Provide plat_scmi_clock_* using clock framework.

Posted on Categories TechnicalTags microchip, opteeLeave a comment on OP-TEE gains a clock framework contributed by Bootlin
New training course: Real-Time Linux with PREEMPT_RT

In the field of embedded systems, a number of applications need real-time guarantees, and the Linux ecosystem has been offering for a long time a number of solutions to address those needs, either by improving the Linux kernel itself using the PREEMPT_RT approach, or by using a co-kernel approach such as the one offered by Xenomai. Bootlin trainings portfolio already has an initial coverage of these topics in our Embedded Linux system development course.

Today, we are happy to announce a brand new Real-Time Linux with PREEMPT_RT, which is specifically focused on the PREEMPT_RT solution. This solution made a vast amount of progress in recent times in terms of integration into the official Linux kernel, which makes it even more relevant for a number of projects which need real-time guarantees.

The main topics covered by the course are:

What is a real-time and deterministic operating systemHow to configure, build and setup a PREEMPT_RT enabled Linux kernelHow to identify and benchmark the hardware platform in terms of real-time characteristicsHow to configure and tune the Linux kernel and the system for deterministic behaviorHow to develop and debug real-time user-space Linux applications as well as analyze latencies

The course is illustrated by practical labs or demonstrations made on the BeagleBone Black platform. It has been developed and is taught by Bootlin engineer Maxime Chevallier, who is an experienced embedded Linux and Linux kernel engineer and trainer.

As usual our training materials are fully open-source, including the ones for this brand new session. You can read the Slides and Practical lab instructions. Bootlin is one of the very few companies delivering training courses to make its training materials open-source: by choosing to work with Bootlin for your trainings, you support our work on developing and publishing freely available training materials.

If youre interested in getting this new Real-Time Linux with PREEMPT_RT training course, you have three options:

Public on-line sessions, opened to individual registration. The course lasts 3 sessions of 4 hours. We have scheduled a first session on January 19-21, 2022, and registration is open, for 399 EUR at the Early bird rate, of 449 EUR at the Regular rate.Dedicated on-line sessions, which we organize at the date/time of your choice. The course also lasts 3 sessions of 4 hours. Contact us to request a quote.Dedicated on-site sessions, where our trainer travels to your location to deliver the training course. In this case, the course lasts two full days. Contact us to request a quote.
Posted on Categories trainingTags preempt-rt, real timeLeave a comment on New training course: Real-Time Linux with PREEMPT_RT
Maintaining Yocto Project Documentation

For many years, Bootlin has been a strong user and a contributor to the Yocto Project, delivering numerous customized embedded Linux distributions and Board Support Packages based on Yocto Project and OpenEmbedded to its customers, for a wide range of hardware platforms and architectures.

In 2021, we have been able to bring this engagement further, as Bootlin engineer Michael Opdenacker has been given the opportunity to work as a maintainer for Yocto Projects documentation, thanks to funding from the Linux Foundation. Since the mourning of Scott Rifenbark, the former maintainer, in early 2020, the project was in need for someone to fill this role.

Yocto Project developers and contributors did their best in the meantime though, in particular by migrating the documentation sources from the DocBook format to reStructuredText, to generate documentation using Sphinx. This migration was also done by the Linux kernel community, as reStructuredText seems to make it easier for developers to contribute to documentation.

For Michael Opdenacker, the interest of getting back to Yocto Project and OpenEmbedded was strong: he was one of the early users, over 15 years ago, of BitBake and OpenEmbedded. Many things have changed since Michael was generating his own OPIE and GPE Palmtop Environment images for handheld devices back in 2004 and 2005.

Indeed, since that time, under the Yocto Project umbrella, BitBake and OpenEmbedded have formed whats probably the smartest, most versatile and most powerful embedded Linux build system. This build system takes a pretty steep learning curve though, and thats why maintaining high quality documentation was a key focus from the start.

In addition to acting as a maintainer (reviewing and merging patches from contributors, encouraging contributions, managing documentation bugs, keeping the documentation current with the evolution of the code), we have so far also managed to:

Create brand new documentation, thanks to studying the source code and to knowledge from core developers. In particular, we documented vulnerability (CVE) management and drafted a first description of Hash Equivalence.Implement a new infrastructure to generate diagrams from SVG sources. Currently, most graphics are bitmaps and do not render well in PDF and EPUB output. The next step is to migrate all diagrams to SVG.Implement styling improvements, trying to eliminate unnecessarily complex sentences and make the documents easier to read.Propose a Documentation standards document in markdown format, together with a diagram template with reusable shapes, text boxes and clipart, so that new documentation and diagrams are created in a way thats consistent with existing documents.Find bugs and improvement opportunities, and implement some of them, thanks to testing the software and reading the code.

Here are our contributions to the project so far, as of Oct. 20, 2021:

Yocto Project documentation: 71 commitsBitbake documentation: 10 commitsopenembedded-core: 11 commitsmeta-openembedded: 5 commits

Yocto Project is a very welcoming open-source project, in which core developers are keen to help users and contributors. This makes it a real pleasure to participate to this project, in addition to the satisfaction to contribute to the progress of Embedded Linux.

If you are interested in studying Yocto Project and Bitbakes documentation and contributing to it, you will be most welcome! The best is to get in touch with our community through the docs mailing list or chat with us on IRC. See our mailing lists and chat page for details.

If youre interested in using Yocto Project for your embedded Linux projects, we also recommend you to check out our Yocto Project and OpenEmbedded system development training course, and its freely available training materials. We recently announced new dates for our upcoming online training classes on the Yocto Project:

January 31, February 1, 2, 3, 2022 from 09:00 to 13:00 UTC+1, which is a time zone suitable for participants in Europe, Middle East and Asia.March 7, 8, 9, 10, 2022 from 18:00 to 22:00 UTC+1, which is a time zone for participants in America.
Posted on Categories TechnicalTags yoctoLeave a comment on Maintaining Yocto Project Documentation
Bootlin at the SIDO event in Paris, November 10

The SIDO is a large event dedicated to IoT, AI, robotics in Paris, and it takes place next to the Open Source Experience event, which as the name suggest is dedicated to all things related to open-source. For Bootlin whose activity is precisely at the junction between embedded systems/IoT and open-source, being present at this combined event made complete sense.

Therefore, Bootlin CEO Thomas Petazzoni will be present at SIDO on November 10, 2021. If youre interested in discussing with Bootlin about:

Engineering services, and how Bootlin can help you with Embedded Linux development, Linux kernel development and upstreaming, boot time optimization, real-time, Yocto, Buildroot, and anything related to Embedded Linux;Training services, and how Bootlin can help your company, team and engineers grow their skills in the field of Embedded Linux;Career opportunities, both full-time positions and internships

Then feel free to contact us to schedule a meeting!

Posted on Categories ConferenceTags sidoLeave a comment on Bootlin at the SIDO event in Paris, November 10
Embedded Linux Boot time optimization: training and webinar

Bootlin has been helping its customers optimize the boot time of embedded Linux systems for many years, ensuring that these systems meet their startup time requirements. Thanks to this, Bootlin has accumulated a significant experience in this field.

Next week, Bootlin is organizing or participating to two events related to Embedded Linux boot time optimization:

We are organizing an online public session of our Embedded Linux Boot Time Optimization training course, proposed over 4 sessions of 4 hours each, and taught by Michael Opdenacker. We do have a few seats left, for 619 EUR each, and registration is possible directly online through Eventbrite. The session starts on October 25 at 2:00 PM UTC+2.We are participating to the Improving Linux® Boot Time in Your Embedded Application webinar organized by Microchip, one of our silicon vendor partner. The webinar takes place at 08:00 AM PST, 05:00 PM UTC+2 and participation is free, only registration is required.

In addition, if you need help and support to optimize the boot time of your Embedded Linux systems, do not hesitate to as we offer engineering services, thanks to which we can take your existing Embedded Linux system, and significantly reduce its startup time to meet your requirements.

Posted on Categories TechnicalTags boot time, microchip, training, webinarLeave a comment on Embedded Linux Boot time optimization: training and webinar