Embedded Open Source Experts
Linux, Yocto and FPGAs
Integrating Linux and Yocto builds into different SoCs
From a Linux software perspective:
➤ Increased demand for Linux on FPGAs
➤ Many things to mange, both technical and practical
➤ FPGAs with integrated CPU cores – very similar many other SoCs
Here are some experiences and observations...
© Codiax 2019 ● Page 2 Why use Linux?
➤ De-facto standard
➤ Huge HW support
➤ FOSS
➤ Flexible
➤ Adaptable
➤ Stable
➤ Scalable
➤ Royalty free
➤ Vendor independent
➤ Large community
➤ Long lifetime
Why not Linux?
➤ Too big
➤ Real-time requirements
➤ Certification
➤ Boot time
➤ Licensing
➤ Too open?
Linux system example
Widgets for Desktop widgets 2D Application Media Application 3D Application Unity and Plasma possibly adaptations to Wayland/Mir possibly adaptations to Wayland/Mir possibly adaptations to Wayland/Mir Desktop Shells: User Interface Toolkits (in the form of libraries): Ubuntu Android l l 9 GNUstep e k 1 n 2 c h
R GTK+
o
o wxWidgets S a D y
m
D Pango ATK t . E i - m a
t Qt EFL SDL FLTK n s o M n Clutter h
r libwayland-client libwayland-client libwayland-client a i U n l g O ... i i a Cairo (Xr) l P N
C libwayland-client C n libwayland / COGL
G libX/libXCB E Display server: System libraries: System daemons: Alternative display servers: n n d o
weston, clayton, mutter, KWin d libmir-serv o r -
) t
e libxserver SF i v o
k window g m i e m d k a GLib r mir
s SurfaceFlinger d e n e d u
e X-Server o manager window a k window
GObject m mir libwayland-server a s glibc a u g M s X.Org metacity n w e i
Glib i k D d manager A manager t r t a a - Wayland Compositor - Xfree86 mutter d t µClibc o
GModule i s e k e Compiz
s AWM n w
u KWin s t o X-Win32 GThread y h c n u l c e ( s a a Compiz
GIO u N X11.app u B v - p
libinput P a D evdev kms (Kernel Mode Setting) ? kdbus ? kmod-fs-ext4 SELinux libhybris libbionic drm (Direct Rendering Manager) netfilter TOMOYO binder ashmem pmem Linux kernel, device drivers & other modules Smack wakelocks logger ... AppArmor radeon nouveau lima etna_viv freedreno tegra-re ALSA: emu20k1, ctxfi, hda... kmod-ltq-atm-vr9 ath9k Linux kernel Keyboard & Mouse CPU & GPU UMTS/CDMA/LTE Ethernet (Android-forked) Touch-Screen cache coherent L2-Caches Hardware GPS-receiver 802.11-(abc) BrailleDisplay main memory G-sensor Bluetooth
Source: https://en.wikipedia.org/wiki/File:Free_and_open-source-software_display_servers_and_UI_toolkits.svg + development tools = a lot of source code!
© Codiax 2019 ● Page 5 Linux system open source code
● Linux kernel ~ 20 MLOC + Bootloader + Libraries + System services + FOSS applications + Development tools
How to select, integrate, build and maintain?
© Codiax 2019 ● Page 6 OpenEmbedded / Yocto - A build system for embedded Linux
● What does such a build system do? – Automates the process of building a target system – Downloads, patches, configures, compiles/cross- compiles
● The Linux kernel ● Applications for a Linux root filesystem – Packages applications – Keeps track of application dependencies – Deploys generated images – Provides an SDK – Provides tools
© Codiax 2019 ● Page 7 What is OpenEmbedded?
● OE is the basis for many build systems, including Poky (and e.g. Ångström)
● Is the origin of Bitbake and OpenEmbedded- Core, that are now also part of Yocto Project ● Provides meta data, recipes and layers, for thousands of open source applications (not part of OpenEmbedded-Core) – http://layers.openembedded.org
© Codiax 2019 ● Page 8 Build system overview
Source: Yocto Project Quick Start manual
© Codiax 2019 ● Page 9 OpenEmbedded / Yocto
● Builds all – long build times
● Build caches ● Depends on external archives – Rebuilding old builds? – Local source code storage? – Local meta data mirrors ● FOSS Compliance
© Codiax 2019 ● Page 10 FOSS – Free and Open Source Software
FOSS licenses (typically) ensure and regulate
➤ The four basic freedoms – Freedom to use – Freedom to study – Freedom to redistribute – Freedom to modify
➤ Handling of derived works
➤ Proper attribution to copyright owners
➤ And more...
The Open Source Definition – http://opensource.org/docs/osd The Free Software Definition – https://www.gnu.org/philosophy/free-sw.html
HW oriented adaptations
Applications
Boot loader Kernel Init Services
FS
➤ HW specific BOOT
➤ Device tree (DTS) for boot loader and kernel
➤ Boot loader and kernel drivers
➤ Boot loader and kernel configuration
➤ Mapping of memory areas from kernel to user space process
➤ Real-time configuration + potential RT patches
Trends
● Linux and real-time - again
● Virtualization ● Security
© Codiax 2019 ● Page 13
? ? ? ? ? ?
Questions?
[email protected] www.codiax.se
© Codiax 2019 ● Page 14