How to Build your own Embedded Linux Distribution

Transcrição

How to Build your own Embedded Linux Distribution
Eine Einführung in das
Embedded Computing Conference 1. Juli 2014, © Markus Kappeler
Yocto Project Agenda
●
yocto project auf einer Seite
●
Embedded Linux
●
Wer, was, warum und wie
●
Layers, Rezepte, bitbake
●
Zusammenfassung
yocto
●
●
●
The yocto project is not a embedded linux distribution
– It creates a custom one for you!
Das yocto Projekt ist nicht ein einzelnes open source
Projekt – es ist ein Ecosystem.
yocto ist eine Kombination von ready to run LinuxDistro mit der Flexibilität eines custom Linux-OS.
Embedded Linux Challenge
●
●
●
RyO Roll your Own
●
Langzeit Maintenance aufwendig
●
Upstream Patches nicht einfach integrierbar
●
Build System und Toolchain ...
Commercial Distro
●
Viele Varianten
●
Nicht kompatible build Systeme
●
Lizenzgebühren
Mainline Distro
●
Lizenz
Embedded Linux Distros
2. Your use of Ubuntu
●
●
●
●
●
You can download, install and receive updates to Ubuntu for free.
Ubuntu is freely available to all users for personal, or in the case
of organisations, internal use. It is provided for this use without
warranty. All implied warranties are disclaimed to the fullest
extent permitted at law.
You can modify Ubuntu for personal or internal use
You can make changes to Ubuntu for your own personal use or
for your organisation’s own internal use.
You can redistribute Ubuntu, but only where there has been no
modification to it.
Source: http://www.ubuntu.com/legal/terms-and-policies/intellectual-property-policy
Embedded Linux Status
●
200 Mio WiFi Router pro Jahr
●
250 Mio Settop-Boxen und Smart-TV pro Jahr
●
Android
●
1.5 Mio Aktivierungen pro Tag
●
1 Milliarde Installationen
Embedded Linux ist das default OS.
Embedded Linux Start
●
●
1991 Linux Version 0.01
●
Linus Torvald veröffentlicht Linux am 17.9.1991
●
GPL
1995 busybox
●
Debian Installer auf einer Floppy Disk 1.44MB
●
Ideal für embedded Devices
Embedded Linux Portabilität
●
1995 MIPS
●
1996 m68k, ppc
●
1998 uClinux für Dragonball Palm Pilot
●
1999 ARM
●
1999 Flash MTD und JFFS (AXIS Webcam)
Source: C. Simmonds, A timeline for embedded Linux
Linux goes mobile
●
2000 handhelds.org
●
2001 iPAQ Prototype (Touch, Cam, GSM, WiFi, BT, 1GB)
●
2001 Sharp Zaurus PDA Linux 2.4.10
●
2003 Motorola A760 Monta Vista Linux
●
2005 Nokia N770 Internet Tablet
Source: C. Simmonds, A timeline for embedded Linux
Embedded Linux build-tools
●
2001 buildroot von uCLinux
●
2003 Open embedded für Linux, OpenZaurus
●
●
2004 OpenHand kreiert Poky Linux basierend
auf Open Embedded
2010 Intel spin-off Poky Linux in yocto Project
Source: C. Simmonds, A timeline for embedded Linux
Was ist das yocto project
●
Opensource Projekt mit aktiver Community
●
Ein Sammlung von embedded Projekten und Tools:
●
●
Board Support Packages
●
Application Development Tools (Eclipse Plugins)
Referenz Distro Poky
●
●
Kompletes Build-System basierend auf bitbake
Release alle 6 Monate (April und Oktober) mit aktuellem
Kernel LTS, Toolchain und Package Versionen.
It's not an embedded Linux distribution,
It creates a custom one for you.
Warum yocto
●
Sie brauchen weniger Zeit für Dinge die kein Geld bringen!
●
Embedded Industrie brauchte eine Basis für build Systeme
●
●
●
Open embedded und bitbake
Vorteile:
●
Designed für Langzeit Support
●
Lizenzen Klarheit
●
Designed für Embedded
●
Transparente Upstream Changes
●
Verschiedene Package Formate: ipk, opk, dep, rpm
●
Kommerzieller Support
Es bleibt mehr Zeit für die Dinge die Geld bringen!
yocto und open embedded
●
●
Open embedded
●
Entstanden aus Open Zaurus
●
Grosses Community Projekt
●
Fokus an viel Software auf vielen Platformen
●
Riesige Sammlung an build Rezepten
●
Neuste vom neusten - bleading edge technology
yocto project
●
Verschiedene Projekte für die Entwicklung von Linux Geräten
●
Support durch Chip Hersteller
●
Basiert auf OE, mit verbesserter Qualität
●
Bessere Integration
●
Refernz Distro poky
Wer ist beim yocto project dabei
AMD, LG Electronics, Renesas, Long Term Support Initiative
(LTSI), Juniper Networks, O.S. Systems,
Huawei, Mentor Graphics, Texas Instruments, Sakoman, Inc.,
OpenEmbedded eV, MontaVista Software,
LSI Corporation, Intel Corporation, Freescale Semiconductor,
Enea AB, Wind River Systems, Dell,
Dynamic Devices, SDG Systems, Silica, GENIVI Alliance,
Nefedia, Eukr´ea Electromatique,
minnowboard.org, NetModule AG, Move Innovation, DENX
Software Engineering, ChargeStorm AB,
Qtechnology, KOAN, The Angstrom Distribution, Sidebranch,
Gumstix, Timesys, Tilera, Secret Lab
Technologies, RidgeRun, NetLogic Microsystems, Panasonic,
Mindspeed, Cavium Networks, bytes at work
Wer steuert das yocto project
●
Advisory Board und Technical Leadership
●
Linux Fundation
●
Chip Hersteller: Intel, TI, Freescale, etc.
●
Embedded OS Hersteller: Wind River, Monta Vista
●
Embedded HW Firmen
●
Private Entwickler
yocto community
yocto project Familie
●
Poky: Referenz Distribution
●
Bitbake: Build Engine
●
Hob: GUI für bitbake
●
Open embedded core: Basis Layer
●
Application Development Toolkit: Tools für Applikationsentwickler
●
Eclipse IDE Plugin: Integration von ADT in Eclipse
●
EGLIBC: embedded glibc
●
Autobuilder: Automatisierte Build Test und QA
●
Qt: Layer für Qt Integration
●
Pseudo: System administration Simulation
●
Toaster: Web GUI
Voraussetzungen
●
Linux Host System
●
Debian, Ubuntu, Fedora, Gentoo
●
git 1.7.5
●
tar 1.24
●
python 2.7.3 (nicht python3)
●
gcc für Host System
●
Internet Zugang
yocto build Prozess
$ git clone http://git.yoctoproject.org/git/poky
$ cd poky
$ git checkout -b daisy origin/daisy
$ source oe-init-build-env
yocto braucht ca. 50 GB Disc-space
source yocto project
yocto build process
source yocto project
yocto Configuration *.conf
●
●
build/conf/local.conf: was baut man
●
BB_NUMBER_THREADS = "8"
●
PARALLEL_MAKE = "-j 8"
●
MACHINE ?= "bytepanel"
●
DISTRO settings
build/conf/bblayers.conf: von wo werden die Rezepte
gelesen
●
Eigene Layer oder von anderen Providern
●
Default: meta (oe core), meta-yocto und meta-yoctobsp
yocto Layers
Layers beinhalten Rezepte
● Layers können bestehende Rezepte erweitern, ändern
● Layers nach Funktionen gruppieren
●
Developer Specific
Commercial
UI-Specific
Hardware Specific BSP
yocto Layer (meta-yocto)
Open embedded core Layer (meta)
yocto Layers
yocto bitbake Rezepte
●
Build Instruction <name>.bb
●
●
Patches und zusätzliche Files
●
●
meta/recipes-core/busybox_1.20.2.bb
meta/recipes-core/busybox/busybox-1.20.2
Einfach erweiterbar durch append-files von bestehenden
Rezepten <name>.bbappend
●
Rezepte können vererbt werden: bbclass und inherit
●
yocto und openembedded Rezepte sind kompatibel
yocto bitbake Rezept
DESCRIPTION = "Tuxnes Nintendo (8bit) Emulator"
HOMEPAGE = "http://prdownloads.sourceforge.net/tuxnes/"
LICENSE = "GPLv2"
SECTION = "x/games"
PRIORITY = "optional"
PR = "r1"
SRC_URI =
"http://heanet.dl.sourceforge.net/sourceforge/tuxnes/tuxnes0.75.tar.gz"
inherit autotools
inherit autotools zieht bbclass autotools an, welche
die Tasks configure, compile und install hinzufügt.
yocto build steps
bitbake <package-name>
●
fetch: Download von Sourcen(git, svn, zip, bz, tar)
●
unpack: unzip, etc.
●
patch: diff Format, Lokale Anpassungen
●
configure: Package spezifische Konfiguration
●
compile: Mit Crosstoolchain Kompilieren/Linken
●
install: Läuft unter pseudo um Permission und
owner/group zu setzen
yocto build process
source yocto project
yocto Toolchain
●
Toolchain Generierung aus yocto
●
bitbake -c populate_sdk dev-image
●
Toolchain angepasst an eigenes Image
●
Toolchain beinhaltet sysroot
●
Toolchain kann auf anderen Host-Systemen
installiert werden
●
Eclipse Plugin generieren
●
Aktuelle Toolchain
yocto hob
yocto project
●
●
●
The yocto project is not a embedded linux distribution
– It creates a custom one for you!
The yocto project is not a single open source project
– it is an ecosystem.
Yocto ist eine Kombination von ready to run LinuxDistro mit der Flexibilität eines custom Linux-OS.
yocto project auf den Punkt gebracht
1) yocto von yoctoproject.org herunterladen
git clone http://git.yoctoproject.org/git/poky
2) source oe-init-build-env
3) Herunterladen weiterer Layer (meta-bytesatwork)
layers.openembedded.org
4) Layer in conf/bblayers.conf eintragen
5) Anpassen von conf/local.conf (MACHINE=”bytepanel”)
6) Starte build Prozess
bitbake dev-image
7) Kaffee trinken, Mittag essen
Weitere Infos
●
Website: https://www.yoctoproject.org/
●
Wiki: https://wiki.yoctoproject.org/wiki/Main_Page
●
●
Quick Start:
https://www.yoctoproject.org/docs/current/yoctoproject-qs/yocto-project-qs.html
Git: http://git.yoctoproject.org
Vielen Dank an
- yocto project: https://www.yoctoproject.org
- Chris Simmonds :
http://2net.co.uk/slides/csimmonds-embedded-linux-timeline-2014.pdf
[email protected]
http://www.bytesatwork.ch

Documentos relacionados