Embedded Linux
Embedded Linux
1) Buildroot: Oldest build system since 2001, very easy to use but you
cannot scale it, share data of it thus it is not made for complex tasks,
can employ ARM, RISC-V, PowerPC, it has more than 250
configurations. Root Filesystem can also build toolchain, bootloader,
kernel
2) OpenEmbedded: Inroduced after Buildroot, contain meta layers which
has “recipes”, recipe is something to cuild something, recipes are
processed by a task scheduler named BitBake, layers allow you to
move chunk of recipes from one environment to another, you can
share with different environment and organizations, in other words
OpenEmbedded is a tool to create custom Linux Distribution
3) OpenEmbedded Core: Use to build other build systems such as
OpenEmbedded itself, Poky(part of Yocto Project), ELDK from Denx,
Mentor Graphics Linux
4) Yocto Project: Alinux foundation sponsored project, commonly used
to build reliable embedded systems, it consist of
Oe-core and BitBake also shared with OpenEmbedded
Poky
Ref. BSP’s include BeagleBone
Scheduler prefers to run SCHED_FIFO threads. Only when we have left with
no threads then algorithm runs Real-time threads always preempts
SCHED_NORMAL
You can change the behavior of linux by setting kernel preemption, that
means kernel is now preemptable, that means if we get an interrupt while
running interrupt code we will go that interrupt and do re-schedule and run
high priority thread using CONFIG_PREEMPT
Raspberry Pi altogh not good embedded processor and even you should
use it in grand scehem of thing s but it is commonly used and well
supported, but running an OS on RaspberryPi is not a good idea
YACTO PROJECT:
1) Embedded Hardware:
a. Commodity Hardware: Plugin-play(PC, x86, Rapsberry PI but not
industry spec(see RPi CM)
b. Bespoke Hardware: Custom design board, cheaper less power
dissipation, mostly ARM and now RISC-V is catching up
c. Semi-Bespoke: Single Board computer, System On Board
2) Yocto Project: allows you to create your own distro, Yocto project and
OpenEmbedded has been used to create the software running on many
many millions of devices, WebOS used in LG is running Yocto,
Automotive Grade Linux used by Toyota manufacturers in their engine,
Oniro used in IoT and based on eclipse based projects, Oniro has
integration Zephyr which is used for remot sensors, Yocto use as a
gateway, about 100 million plus devices are running by Yocto
now
Little History: 2003 OpenEmbedded born because Linux now can run
small devices, 2004 Poky Linux born at building WebPad N770 by a guy
called Richard Perdy, Intel and Linux Foundation create a Ypcto project
in 2010
i) Yocto project versions: releses twice a year with named like
Rocko Zeus and Thud, each version is maintained by 12 months
to 12 months, everyone chooses a version called LTS(Long Term
Support) and they supported for 24 months
ii) Getting Yocto Project:
$ git clone -b scarthgap https://github.com/yoctoproject/poky
//initialize your shell by sourcing your source script and variables
that are need by Yocto build systems
$ source ./oe-init-build-env <builddir>
git