A build environment for creating a custom Linux distribution for train information system devices : Creating a Linux distribution with the Yocto Project
Takalo, Juhani (2021)
Takalo, Juhani
2021
Master's Programme in Electrical Engineering
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2021-07-05
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202106306146
https://urn.fi/URN:NBN:fi:tuni-202106306146
Tiivistelmä
The objective of this work was to investigate the possibility of using the open source tools provided by The Yocto Project, especially the task and build engine BitBake, to replace the old device image toolchain called Imagetools, which is created by Teleste for its train information system devices. While Imagetools mainly use Debian Linux distribution as the base for device images, the build environment created in this work is capable of building a fully working custom Linux distribution named Teleste Sky Blue for Teleste’s embedded device DCU40, which is the main controller unit for Teleste’s train passenger information systems.
The work begun by inspecting the Yocto recipes and instructions for DCU40’s processor card by Seco, which is the manufacturer of the card. These recipes covered the GPIO expanders, SPI and I²C. First of all, these few recipes were updated to support the newest stable Yocto Project version 3.1, codenamed Dunfell. Builds were tested by installing them on DCU40’s internal eMMC memory with the live USB flash drive image, which was generated with the BitBake, with network boot and in virtual environments. An automation script was written for pushing the cache items generated by the BitBake builds to Teleste’s company network file share which made subsequent builds faster.
In the next phase, more features were added to the build to produce an image which would have the same base functionalities than the "base image" produced by Imagetools. These include kernel and software configurations, and Teleste’s platform packages which enabled a full support for DCU40’s features. The base software of a "base image" includes a Python interpreter with necessary packages, Java Runtime Environment with public and Teleste’s libraries, PostgreSQL with default database, and Lighttpd HTTP-server with Teleste’s Update Manager Web interface. New BitBake recipes were written for Teleste’s platform components and existing recipes from Yocto’s reference distribution named Poky and OpenEmbedded Layer Index were modified to match the existing Imagetools "base image".
After the base features of DCU40 were added to the build, recipes were written for the rest of Teleste’s platform components, which are used in customer projects. Customer device images are also created with Imagetools, together with update packages uploaded from the Update Manager. However, with BitBake it is possible to automate the whole customer image creation process so that no other extra steps are needed to be taken in production for the customer project images. Also, the rest of the Imagetools features were added to the build environment, such as fully automated live USB flash drive image creation and VirtualBox image creation. In addition, more features were implemented to the build environment including Qemu virtualisation on command line for automated software tests, network booting of DCU40 with iPXE, and virtual machine images with nested virtualization support for virtual machine development and usage on DCU40.
During the work, the environment was used in investigation of DCU40’s processor card’s Intel microcode update performance degradation related to Meltdown and Spectre vulnerability mitigations. Eventually more and more thought and planning was put in to the build environment itself so that it would be scalable and useful on developers PCs to CI servers. The build environment created in this work is a clean and portable Git repository, with documented features which could eventually supersede Imagetools and overcome the challenges and problems it has.
The work begun by inspecting the Yocto recipes and instructions for DCU40’s processor card by Seco, which is the manufacturer of the card. These recipes covered the GPIO expanders, SPI and I²C. First of all, these few recipes were updated to support the newest stable Yocto Project version 3.1, codenamed Dunfell. Builds were tested by installing them on DCU40’s internal eMMC memory with the live USB flash drive image, which was generated with the BitBake, with network boot and in virtual environments. An automation script was written for pushing the cache items generated by the BitBake builds to Teleste’s company network file share which made subsequent builds faster.
In the next phase, more features were added to the build to produce an image which would have the same base functionalities than the "base image" produced by Imagetools. These include kernel and software configurations, and Teleste’s platform packages which enabled a full support for DCU40’s features. The base software of a "base image" includes a Python interpreter with necessary packages, Java Runtime Environment with public and Teleste’s libraries, PostgreSQL with default database, and Lighttpd HTTP-server with Teleste’s Update Manager Web interface. New BitBake recipes were written for Teleste’s platform components and existing recipes from Yocto’s reference distribution named Poky and OpenEmbedded Layer Index were modified to match the existing Imagetools "base image".
After the base features of DCU40 were added to the build, recipes were written for the rest of Teleste’s platform components, which are used in customer projects. Customer device images are also created with Imagetools, together with update packages uploaded from the Update Manager. However, with BitBake it is possible to automate the whole customer image creation process so that no other extra steps are needed to be taken in production for the customer project images. Also, the rest of the Imagetools features were added to the build environment, such as fully automated live USB flash drive image creation and VirtualBox image creation. In addition, more features were implemented to the build environment including Qemu virtualisation on command line for automated software tests, network booting of DCU40 with iPXE, and virtual machine images with nested virtualization support for virtual machine development and usage on DCU40.
During the work, the environment was used in investigation of DCU40’s processor card’s Intel microcode update performance degradation related to Meltdown and Spectre vulnerability mitigations. Eventually more and more thought and planning was put in to the build environment itself so that it would be scalable and useful on developers PCs to CI servers. The build environment created in this work is a clean and portable Git repository, with documented features which could eventually supersede Imagetools and overcome the challenges and problems it has.