Your SlideShare is downloading. ×
Building Embedded Linux
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Building Embedded Linux


Published on

Published in: Education

1 Like
No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Embedded Linux Training Facebook group: Learn To Be Official website: Prepared By: SHATRIX E-Mail: eng.shatrix@gmail.comLearn To Be Embedded Linux Training
  • 2. 2Overview • Embedded Linux is the use of Linux in embedded computer systems such as mobile phones, personal digital assistants, media players, set-top boxes, networking equipment, machine control, industrial automation, navigation equipment and medical instruments. • Creating an Embedded Linux based system is like a puzzle. Putting the right pieces together will create the final image.Learn To Be Embedded Linux Training
  • 3. 3Basic embedded Linux arch. • Boot Loader (grub, Lilo, Uboot) • Kernel (Normal or Real-Time) • FileSystem • C Library • User application(s)Learn To Be Embedded Linux Training
  • 4. 4Host & Target Host Target Croos-Platform BootLoader Toolchain Kernel Filesystem GCC Libraries ApplicationsLearn To Be Embedded Linux Training
  • 5. 5To Do List • Cross-compilation toolchain ▫ Compiler that runs on the development machine, but generates binary files for the target machine • Bootloader ▫ Started by the hardware, responsible for basic initialization, loading and executing the kernel • Linux Kernel ▫ Contains the process and memory management, network stack, device drivers and provides services to userspace applications • C library ▫ The interface between the kernel and the userspace applications • Filesystem ▫ Contains Linux commands, libraries and other needed scripts • Other libraries and applicationsLearn To Be Embedded Linux Training
  • 6. 6Whats next? • System integration ▫ Integrate all the components, bootloader, kernel, third- party libraries and applications and our applications into a working system • Development of applications ▫ Normal Linux applications, but using specifically chosen librariesLearn To Be Embedded Linux Training
  • 7. 7Root filesystem • The root filesystem, is mounted as / System Contents • On embedded systems, this root filesystem contains all the libraries, applications and data of the system BootLoader • Therefore, building the root Kernel filesystem is one of the main tasks of integrating embedded Linux Root components into a device Filesystem • The kernel is usually kept separateLearn To Be Embedded Linux Training
  • 8. 8Cross-compiling Toolchain • The usual development tools available on a GNU/Linux workstation is a native toolchain • This toolchain runs on your workstation and generates code for your workstation, usually x86 • For embedded system development, it is usually impossible or not interesting to use a native toolchain ▫ The target is too restricted in terms of storage and/or memory ▫ The target is very slow compared to your workstation ▫ You may not want to install all development tools on your target. • Therefore, cross-compiling toolchains are generally used. They run on your workstation but generate code for yourLearn target. To Be Embedded Linux Training
  • 9. 9Cross-compiling Toolchain Source Code X86 Native Toolchain Cross Toolchain X86 Binary Target Binary X86 Target CPULearn To Be Embedded Linux Training
  • 10. 10Cross Toolchain components • Binutils is a set of tools to generate and manipulate binaries for a given CPU architecture ▫ as, ld, ar, ranlib, strip ▫ • Kernel headers ▫ Available system calls and their numbers, Constant definitions, Data structures. • C/C++ libraries ▫ Interface between the applications and the kernel ▫ glibc, uClibc • GCC compiler • GDB debuggerLearn To Be Embedded Linux Training
  • 11. 11Booting sequence • Bootloader ▫ Executed by the hardware at a fixed location in ROM / Flash ▫ Initializes support for the device where the kernel image is found (local storage, network, removable media) ▫ Loads the kernel image in RAM ▫ Executes the kernel image (with a specified command line) • Kernel ▫ Uncompresses itself ▫ Initializes the kernel core and statically compiled drivers (needed to access the root filesystem) ▫ Mounts the root filesystem (specified by the root kernel parameter) ▫ Executes the first userspace program (specified by the init kernel parameter) • First userspace program Configures userspace and starts up system servicesLearn To Be Embedded Linux Training
  • 12. 12Linux Kernel app A app B User C Library Space Call Event a service Handler Linux Kernel Manage Event Hardware notification HardwareLearn To Be Embedded Linux Training
  • 13. 13Linux Kernel • The official version of the Linux kernel, as released by Linus Torvalds is available at • Incremental patches between versions ▫ It assumes you already have a base version and you apply the correct patches in the right order ▫ Quick to download and apply • The patch command applies changes to files in the current directory: ▫ Making changes to existing files ▫ Creating or deleting files and directoriesLearn To Be Embedded Linux Training
  • 14. Thank You Facebook group: Learn To Be Official website: Prepared By: SHATRIX E-Mail: eng.shatrix@gmail.comLearn To Be Embedded Linux Training