What is Yocto?
Introduction to Yocto
The smallest 10-24 in the unit of measurement, followed by millimeter, micro, and nano, is called Yocto. The Yocto Project, from which it takes its name, is a project under the umbrella of the Linux Foundation that was launched to standardize embedded Linux distributions by integrating a build tool called BitBake and a recipe for building OSS packages.
The catchphrase “Don’t Build a Frankenstein OS” expresses the idea of standardizing the operating system, rather than building it in succession for each device.
For more on Frankenstein, see See also the wiki here!
Who is developing Yocto?
Let’s see who has written the code for the Yocto Project in the past year.
BitBake, a build tool; Poky, a collection of recipes as a reference distribution; OpenEmbedded Core, a collection of recipes for basic OSS packages; and a collection of recipes for OSS packages, such as features for high reliability. OpenEmbedded, in all, Intel and its subsidiary Wind River contribute a lot. Overall, as with Kernel, chip vendors and Linux distributors contribute a lot, but keep in mind that Fujitsu is Fujitsu in the Collection of OpenEmbedded.
Ranks | Organization | Number of fixes | As a percentage of total |
---|---|---|---|
1 | Intel | 681 | 67.1% |
2 | Linux Foundation | 169 | 16.7% |
3 | Wind River | 25 | 2.5% |
4 | Mentor Graphics | 22 | 2.2% |
5 | Axis Communications | 9 | 0.9% |
Ranks | Organization | Number of fixes | As a percentage of total |
---|---|---|---|
1 | Intel | 3062 | 49.7% |
2 | Wind River | 686 | 11.1% |
3 | Linux Foundation | 525 | 8.5% |
4 | Mentor Graphics | 101 | 1.6% |
5 | Axis Communications | 73 | 1.2% |
Ranks | Organization | Number of fixes | As a percentage of total |
---|---|---|---|
1 | Intel | 2245 | 48.3% |
2 | Wind River | 647 | 13.9% |
3 | Linux Foundation | 344 | 7.4% |
4 | Mentor Graphics | 79 | 1.7% |
5 | Axis Communications | 64 | 1.4% |
Ranks | Organization | Number of fixes | As a percentage of total |
---|---|---|---|
1 | Wind River | 282 | 17.7% |
2 | Intel | 104 | 6.5% |
3 | Fujitsu | 71 | 4.5% |
4 | Mentor Graphics | 40 | 2.5% |
5 | O.S. Systems | 38 | 2.4% |
Ranks | Organization | Number of fixes | As a percentage of total |
---|---|---|---|
1 | Wind River | 309 | 22.8% |
2 | Fujitsu | 160 | 11.8% |
3 | Intel | 82 | 6.0% |
4 | Mentor Graphics | 34 | 2.5% |
5 | O.S. Systems | 24 | 1.8% |
Where is Yocto used?
Many of the Linux SDKs provided by chip vendors are based on Yocto. Many Linux distributions for embedded systems, such as Wind River and Mentor Graphics, are also based on Yocto.
Angstrom, which is pre-installed on the Atlas board we are using, is also based on Yocto. By the way, Angstrom is 100 picometres long, so it is 1014 times larger than Yocto.
Build a Linux system with Yocto
The Atlas board comes pre-installed with Angstrom for ready-to-use Linux, but in order to understand how to use Yocto, let’s build 2.1.1, the latest release of the Yocto Project as of September 2016.
We’ll use Ubuntu 14.04.5 as the host OS to build.
Once Ubuntu 14.04 is installed, install the software required for the build.
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm make xsltproc docbook-utils fop dblatex xmlto autoconf automake libtool libglib2.0-dev libarchive-dev python-git
Next, download the Yocto Project.
$ git clone https://git.yoctoproject.org/git/poky
※If you have a firewall, set the proxy in advance.
$ git config --global http.proxy http://User Name:Password@Proxy Server Name:Port Number
Set the version of Yocto to 2.1.1.
$ cd poky $ git checkout -b yocto-2.1.1 yocto-2.1.1
Apply a patch for the latest version of the SMART package management system.
https://github.com/ubinux/smart2/tree/master-next/patches-yocto/for_2.1.1 Download the following patch for 0001-rpm-The-config-file-of-rpm-will-be-installed-into-SD.patch 0002-python-smartpm-change-smart-to-smart2.patch 0003-smart2-add-dependences-of-smart2.patch Apply the downloaded patch. $ patch –p1 < 0001-rpm-The-config-file-of-rpm-will-be-installed-into-SD.patch $ patch –p1 < 0002-python-smartpm-change-smart-to-smart2.patch $ patch –p1 < 0003-smart2-add-dependences-of-smart2.patch
Initialize to build.
$ source oe-init-build-env build.armv7 Make sure that build.armv7 is generated and moved to build.armv7.
Set the target.
conf/local.conf line 38, add MACHINE ??= "qemux86" to MACHINE ??= "beaglebone" Change to ※We won't be using a Yocto-built kernel, so we'll be using the same Armv7 architecture as the Cyclone V SoC, but with Poky's standard support.
We’re ready to go. Now it’s time to build! I think it will take a few hours to download and build, so if you can’t wait, please consider cloudinghere… lol
Build the OSS package.
$ bitbake core-image-sato
Build toolchains (GCC, Glibc, etc.).
$ bitbake core-image-sato -c populate_sdk
If it finishes without errors, the build is complete.
It was easier to build than I thought it would be, wasn’t it?Read here to learn more!Read here to learn more and more about it!
Manage packages with SMART
SMART is the package management system used by the Yocto Project, a version of Red Hat/CentOS/Fedora’s DNF and Yum, and Debian/Ubuntu’s apt-get for Yocto. This time we’ll use SMART2 (https://github.com/ubinux/smart2), a forked and improved version of the original SMART.
So let’s build a system using SMART from a package built in Yocto!
… For the rest of the story, go back up once and watch the video! (Pressing the |^| button in the lower right corner of the browser is faster!)
$ sudo ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-sato-cortexa8hf-neon-toolchain-2.1.1.sh $ . /opt/poky/2.1.1/environment-setup-cortexa8hf-neon-poky-linux-gnueabi $ export RPM_USRLIBRPM=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/lib/rpm/ $ export RPM_ETCRPM=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/etc/rpm $ export RPM_LOCALEDIR=/opt/poky/2.1.1/sysroots/cortexa8hf-neon-poky-linux-gnueabi/usr/share/locale $ mkdir rootfs $ . /opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/enviroment-smart.sh $ smart --rootfs-dir=$PWD/rootfs --interface=tgui
Board with Cyclone V SoC from Altera
The Altera SoC integrates an Arm-based hard processor system (HPS) consisting of a processor, peripherals and memory interface with a customizable FPGA fabric in a high-bandwidth interconnector backbone. The hard IP includes PCI Express Gen2, multiple memory ports, ECC, memory protection and high-speed serial transceivers, and combines features of low performance, low power consumption and programmable logic flexibility. It significantly reduces the system board size, which previously consisted of a CPU and FPGA. In this course, the DE0-Nano-SoC Kit/Atlas-SoC Kit from Terasic will be used.
Japan Altera Corporation
Roterbach TRACE32
The world’s most used hardware-assisted debugger, TRACE32, supports more than 70 processor architectures, not to mention Arm as well as Nios II. multicore support in SMP systems allows multiple cores to be controlled simultaneously and reference cores to be Debugging can proceed seamlessly while switching between them. Another feature is the OS recognition function that supports the debugging of Linux and other SMP-compatible operating systems as a standard feature. This allows users to smoothly debug programs running in user space without having to worry about which core the task to be debugged is assigned to.
Japanese Roterbach Inc.
Introduction and Development Support Service for Embedded Linux
We provide new value to our customers’ equipment development with embedded Linux.
Fujitsu Computer Technologies Ltd.
こちらも是非
“もっと見る” カテゴリーなし
Mbed TLS overview and features
In this article, I'd like to discuss Mbed TLS, which I've touched on a few times in the past, Transport …
What is an “IoT device development platform”?
I started using Mbed because I wanted a microcontroller board that could connect natively to the Internet. At that time, …
Mbed OS overview and features
In this article, I would like to write about one of the components of Arm Mbed, and probably the most …