3. 28.05.18 3
Architectures
●
MIPS
– 1981
– HDTV, wireless networks, VoIP
●
Power Architecture
– Networking and telecommunications-related embedded
applications
●
x86
●
ARM
– Sony PlayStation Portable (PSP), Apple iPhone
5. 28.05.18 5
Embedded Linux
●
Why linux?
– Supports a vast variety of hardware devices
– Supports a huge variety of applications and networking
protocols
– Linux is scalable
– Linux can be deployed without the royalties
– Linux has attracted a huge number of active developers
– An increasing number of hardware and software vendors
– Supports many programming languages
6. 28.05.18 6
Busybox
The Swiss Army Knife of Embedded Linux
●
Tiny versions of many common UNIX utilities
●
Small and efficient single executable file
●
Can use as init process
●
Useful for cross compile
●
Multi call Binary‐call Binary
8. 28.05.18 8
Real Time Linux
●
Real-Time kernel patch – by Ingo Molnar
– PREEMPT_NONE
– PREEMPT_VOLUNTARY
– PREEMPT_DESKTOP
– PREEMPT_RT
9. 28.05.18 9
Storage Options
●
NOR flash (few MB to a GB)
– Expensive
– Mapped into the CPU address space
– Useful for bootloader
●
NAND flash (tens of MB to tens of GB)
– Much cheaper than NOR
– Higher capacities
– Needs a lot of hardware and software support
13. 28.05.18 13
Bootloaders...
Name Main architectures supported
Das U-Boot ARC, ARM, Blackfin, Microblaze, MIPS, Nios2, OpenRiec, PowerPC, SH
Barebox ARM, Blackfin, MIPS, Nios2, PowerPC
GRUB 2 X86, X86_64
Little Kernel ARM
RedBoot ARM, MIPS, PowerPC, SH
CFE Broadcom MIPS
YAMON MIPS
14. 28.05.18 14
UEFI
●
Universal Extensible Firmware Interface
●
The processor loads the platform initialization
firmware
●
load an EFI boot manager from the EFI System
Partition (ESP)
●
UEFI boot manager
– systemd-boot
– Tummiboot
15. 28.05.18 15
Initramfs
●
Ramfs is a very simple filesystem that exports
Linux's disk caching mechanisms
●
A dynamically resizable RAM-based filesystem
●
gzipped "cpio" format archive
●
Linked into the linux kernel image
16. 28.05.18 16
Device Tree
●
ARM does not come with any hardware
information
●
A flexible way to define the hardware
components
●
Loaded by the bootloader and passed to the
kernel
19. 28.05.18 19
Pinmux
●
Different embedded projects deal with different
components
●
We cannot attach an I2C device to a pin that
follows the protocol of the SPI bus
●
We cannot attach an analog sensor to the
GPIO pin
●
It is not possible to have that many CPU pins
●
share the functionalities of available pins
20. 28.05.18 20
Toolchains
●
Set of tools that compiles source code into executables
– Compiler
– Linker
– Run-time libraries
●
Standard GNU toolchain components:
– Binutils: A set of binary utilities including the assembler and the linker
– GNU Compiler Collection (GCC): compilers for C, C++, Objective-C, Java, Fortran,
Ada, Go
– C library: A standardized application program interface (API) based on the POSIX
specification
21. 28.05.18 21
Toolchains...
●
Native: toolchain runs on the same type of system
●
Cross: toolchain runs on a different type of system
than the target
Linaro, ( h t t p s ://w w w . l i n a r o . o r g / )
crosstool-NG
22. 28.05.18 22
Application Binary Interface (ABI)
●
Guarantees that the libraries exist on all compliant
machines
●
Ensures the integrity of the interface
23. 28.05.18 23
Application Program Interface (API)
●
glibc: it is the most complete implementation of the
POSIX API
●
musl libc: a small and standards-compliant
alternative to GNU libc
●
uClibc-ng: developed to work with uClinux
27. 28.05.18 27
Yocto
●
Tools and methods to help you create custom Linux-
based systems
●
The Yocto Project is more than a distribution
●
Main Components:
– glibc
– BusyBox
– matchbox (for the windowing system)