Things are getting a lot easier for software developers who want to use open source Linux in their real time embedded designs, particularly on the ARM architecture. That’s the message from two speakers – Khem Raj and Hai Shalom – at the Arm Technology Conference this week in Santa Clara, Ca.
In his class at the conference,– Embedded Linux on Arm with OpenEmbedded (ATC-137) – Khem Raj provides an update on the OpenEmbeddedcross-compilation infrastructure using the Bitbake utility with a particular focus on how it can be used in embedded applications using the ARM 32 instruction set, Thumb 16 instruction subset, or a mix of both.
Raj is a developer and maintainer for tool chains and various other packages for the OpenEmbedded project. He is also a developer and one of maintainers of the uClibc project, working on porting the Native Posix Thread Library (NPTL) to MIPS, ARM, PPC architectures. Among other embedded Linux efforts, Khem worked for MontaVista as a project lead for tools. His work there involved, among other things, maintaining and enhancing GNU compiler tool chains and debuggers, work on software optimization and performance measurement tools such as gprof, and mpatrol.
According to Raj,Bitbake is a generic task execution tool and OpenEmbedded has metadata which presents a set of rules to cross-compile, package and install software.
He says the metadata serves as input to Bitbake which then drives the build, whereas OpenEmbedded is used to produce any of several commercial and non-commercial Embedded Linux Distributions. With the help of metadata, Bitbake builds the correct set of task dependencies needed to drive the build and executes it in the correct sequence.
The idea behind OpenEmbedded, says Raj, is to present a seamless cross-building infrastructure mechanism to compute correct package dependencies, emits packages in few popular formats e.g. rpm, deb, ipk or plain tar.
Using these packages it can create root file system images and feeds for on device updates. OpenEmbedded is highly configurable and flexible enough to support many machines and different distribution policies, he said.
In another class at Arm TechCon – “A process control daemon (PCD) for embedded Linux platforms (ATC-146),” – Hai Shalom, a senior software engineer at Texas Instruments, goes into detail about the structure and use of the PCD. He also describes how he came up with the idea for the PCD, which he calls an “open source , light-weight system level process manager” for Embedded-Linux based projects use in such applications as consumer electronics and network-connected devices.
According to Shalom, it is designed to provide a complementary service for any Embedded Linux driven product and is specialized for the needs of embedded products. Not only do embedded Linux distributions not provide such a tool, he said, other similar tools available are not suited for embedded products in terms of compatibility, performance and limitations.
PCD came into being, he says, out of a need that emerged at TI on one if its broadband platforms (the ARM1176 running MV-Linux Pro-5.00 ).
“The system was originally started with scripts, where the init process starts the /etc/init.d/rcS script, and it starts some other scripts,” he said. “Due to the rapid development process of the system’s software, more processes and tasks were added, and the scripts became too long, unreadable and hard to maintain.
“There was no efficient way to control the startup process of the system. Synchronizing inter-process dependency was difficult and determining the order of initialization required a lot of effort.”
For example, said Shalom, a daemon which listens on a socket must precede any clients that send data on the socket. With scripts, though, there is no efficient way to verify this condition. As a result, he said, a service with a complex state machine that needs to arrive at a specific state before it is ready has no standard means to synchronize with its clients.
“Monitoring the system’s health was another issue,” he said. “There was no entity that monitored and controlled the processes in the system, therefore, in case of a crash, the system became unstable or unusable until the crashed process was manually detected.
“At that time, the runtime debugging capabilities were very limited. In case of a process crash, there was no debug information available, unless compiling a special version that supports low optimizations, debug symbols and a GDB server.”
As part of his work at TI, Shalomproposed the PCD concept, designed and implemented it, and then integrated it in the product. “The final results showed great improvements in the startup time and in the system’s robustness, reliability and availability,” he said. “The debugging and remote debugging capabilities were also improved due to the extended debug information which was available in case of a crash.”
Originally, the PCD code was proprietary software, he said. However, as part of the final research of Shalom’s Master’s degree in Computer Science – and as a gesture to the Open Source movement – Texas Instruments has agreed to publish his work as an Open Source project.
For more information, developers can go to the PCD Home Page. For project management and source code developers can go to the PCD page on SourceForge, where a support forum is also maintained. Other Linux and open source classes at Arm TechCon worth checking out include:
[ATC-139] Improving ARM Application Performance with GCC
[ATC-142] A Source Based Approach to Embedded Linux Development
[ATC-140] Android and Linux for Embedded Systems Acceleration
[ATC-141] Building Open-Source Software with the ARM Compiler
[ATC-163] Why Embedded Linux Needs ARM
(I would like to hear more from developers who use of Linux tools such as PCD and BitBake, in the form of blogs on EET/Embedded.com, design articles or as feedback to this and other blogs on the site: how you are using them, what projects you are using them on, features that you like and don’t like, and features you would like to see added. – EET/Embedded.com Editor Bernard Cole, email@example.com, 928-525-9087 )