Intro to Embedded Linux
Mohamed Saied
Agenda
• What is Embedded Linux?
• What is Real time System?
• Is Linux a real time OS?
• Scheduling
• Multi-tasking
• Linux Architecture
Introduction to Operating Systems.pptx
Embedded Linux
Architecture
• The embedded system build
process is usually done on the
host PC using cross-compilation
tools. Because target hardware
does not have enough resources
to run tools that are used to
generate a binary image for
target embedded hardware. The
process of compiling code on
one system ( host system) and
generated source code runs on
the other system is known as
cross-compilation.
Bootloader
• Followings are the main roles of a bootloader:
• Target hardware initialization
• Load the application binary ( operating system, root file system,
device tree ) from the non-volatile external storage to the RAM
memory
• RAM connects externally to the SOC and it stores run-time
data, operating system, root file system, application software,
and stack/heap.
• After that execute the main operating system code from the
RAM memory
Embedded linux Process flow
Linux Kernel
• It is a software or operating system
kernel that manages resources of
embedded processors optimally and
efficiently. The main core component of
embedded Linux is the Linux Kernel. It is
a layered operating system architecture
that means it divides into two layers
such as user space and kernel space
memory space.
Device Tree
• A device tree is a tree data structure that
provides information about the connected
hardware devices that are not discoverable
themself and other on-chip peripherals of an
SoC. Some of the automatically non-
discoverable on-chip peripherals are I2C, UART,
SP, ethernet, etc. On the contrary, the USB
device has the capability or intelligence to inform
its presence to the operating system dynamically
Device Tree Cont’
• DT describes these devices using a special hardware
description language. It decides which drivers to initialize and
configure the device parameters such as registers addresses
and IRQs. A DT source is combined with the Device Tree Blob
and combines with the kernel during the embedded hardware
booting process. The bootloader also loads the Device Tree
Blob into RAM memory along with the Kernel and it runs before
the kernel. In short, DT manages hardware resources of
embedded Linux based systems.
Introduction to Operating Systems.pptx
Root File System
In Linux, the filesystem provides a structural way to store and access our files from the system storage.
Linux follows the Filesystem Hierarchy Standard (FHS) as a reference.
The FHS defines the structure of the filesystem. In other words,
it defines the main directories and their contents.
Linux has various types of filesystems:
Ext (Extended Filesystem), Ext2, Ext3, Ext4
JFS (Journaling Filesystem)
ReiserFS
XFS (Extent Filesystem)
Btrfs (B Tree Filesystem)
Swap
Boot Process in linux
BIOS:
Performs some system integrity checksSearches, loads,
and executes the boot loader program.
MBR stands for Master Boot Record.It is located in the 1st sector
of the bootable disk. Typically /dev/hda, or /dev/sda
MBR is less than 512 bytes in size. This has three components 1)
primary boot loader info in 1st 446 bytes 2) partition table info in
next 64 bytes 3) mbr validation check in last 2 bytes.
It contains information about GRUB (or LILO in old systems).So,
in simple terms MBR loads and executes the GRUB boot loader.
GRUB
GRUB stands for Grand Unified Bootloader.
If you have multiple kernel images installed on your system, you can choose which one to be executed.
GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file.
GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem).
Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The following is sample grub.conf of CentOS.
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5PAE)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/
initrd /boot/initrd-2.6.18-194.el5PAE.img
Init
Looks at the /etc/inittab file to decide the Linux run level.
Following are the available run levels
0) halt
1 ) Single user mode
2 ) Multiuser, without NFS
3 ) Full multiuser mode
4 ) unused
5 ) X11
6 )reboot
Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program.
Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level
If you want to get into trouble, you can set the default run level to 0 or 6.
Since you know what 0 and 6 means, probably you might not do that.
Typically you would set the default run level to either 3 or 5.
Runlevel programs
When the Linux system is booting up, you might see various services getting started. For example, it might say restarting sendmail.
Those are the runlevel programs, executed from the run level directory as defined by your run level.
Depending on your default init level setting, the system will execute the programs from one of the following directories.
Run level 0 -“ /etc/rc.d/rc0.d/
Run level 1 -“ /etc/rc.d/rc1.d/
Run level 2 -“ /etc/rc.d/rc2.d/
Run level 3 -“ /etc/rc.d/rc3.d/
Run level 4 -“ /etc/rc.d/rc4.d/
Run level 5 -“ /etc/rc.d/rc5.d/
Run level 6 -“ /etc/rc.d/rc6.d/
Please note that there are also symbolic links available for these directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/rc0.d.
Under the /etc/rc.d/rc*.d/ directories, you would see programs that start with S and K.
Programs starts with S are used during startup. S for startup.
Programs starts with K are used during shutdown. K for kill.
There are numbers right next to S and K in the program names. Those are the sequence number in which the programs should be started or killed.
For example, S12syslog is to start the syslog deamon, which has the sequence number of 12. S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So,
syslog program will be started before sendmail.
Kernel
Mounts the root file system as specified in the “root=―
in grub.conf
Kernel executes the /sbin/init program
Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid.
initrd stands for Initial RAM Disk.
initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside,
which helps it to access the hard drive partitions, and other hardware.

More Related Content

PPTX
Linux startup
PPTX
Linux basics
PPTX
Linux basics
PPT
Linux Booting Procedure system and networking.ppt
DOC
6 stages of linux boot process
PPTX
Linux booting process - Linux System Administration
DOCX
6 stages of linux boot process
PPTX
introduction to computer Linux essential.pptx
Linux startup
Linux basics
Linux basics
Linux Booting Procedure system and networking.ppt
6 stages of linux boot process
Linux booting process - Linux System Administration
6 stages of linux boot process
introduction to computer Linux essential.pptx

Similar to Introduction to Operating Systems.pptx (20)

PPT
Ch1 linux basics
PPT
Unix Administration 2
PPT
Linux filesystemhierarchy
PPT
Basic Linux Internals
PDF
Red Hat Training
PPT
Linux Booting Process
PDF
Linux admin course
PPT
Edubooktraining
DOCX
6 stages of linux boot process
DOCX
6 stages of linux boot process
PDF
Lecture1 Introduction
PPT
Tutorial 2
PDF
Android memory analysis Debug slides.pdf
PPT
LinuxTraining_26_Sept_2021.ppt
PDF
linux installation.pdf
PDF
Linux booting procedure
PDF
File system discovery
PDF
Linux directory structure by jitu mistry
PPT
Linux booting procedure
PPT
Ch04 system administration
Ch1 linux basics
Unix Administration 2
Linux filesystemhierarchy
Basic Linux Internals
Red Hat Training
Linux Booting Process
Linux admin course
Edubooktraining
6 stages of linux boot process
6 stages of linux boot process
Lecture1 Introduction
Tutorial 2
Android memory analysis Debug slides.pdf
LinuxTraining_26_Sept_2021.ppt
linux installation.pdf
Linux booting procedure
File system discovery
Linux directory structure by jitu mistry
Linux booting procedure
Ch04 system administration
Ad

Recently uploaded (20)

PPTX
Presentation by Samna Perveen And Subhan Afzal.pptx
PDF
Internet Download Manager IDM Crack powerful download accelerator New Version...
PDF
IDM Crack 6.42 Build 42 Patch Serial Key 2025 Free New Version
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
PDF
infoteam HELLAS company profile 2025 presentation
PDF
PDF-XChange Editor Plus 10.7.0.398.0 Crack Free Download Latest 2025
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PPTX
Streamlining Project Management in the AV Industry with D-Tools for Zoho CRM ...
PDF
Crypto Loss And Recovery Guide By Expert Recovery Agency.
PPTX
HackYourBrain__UtrechtJUG__11092025.pptx
PPTX
Chapter 1 - Transaction Processing and Mgt.pptx
PPTX
Folder Lock 10.1.9 Crack With Serial Key
PDF
What Makes a Great Data Visualization Consulting Service.pdf
PPTX
Chapter_05_System Modeling for software engineering
PPTX
Human Computer Interaction lecture Chapter 2.pptx
PPTX
4Seller: The All-in-One Multi-Channel E-Commerce Management Platform for Glob...
PDF
AI-Powered Fuzz Testing: The Future of QA
PPT
3.Software Design for software engineering
PPTX
Download Adobe Photoshop Crack 2025 Free
PPTX
Python is a high-level, interpreted programming language
Presentation by Samna Perveen And Subhan Afzal.pptx
Internet Download Manager IDM Crack powerful download accelerator New Version...
IDM Crack 6.42 Build 42 Patch Serial Key 2025 Free New Version
Understanding the Need for Systemic Change in Open Source Through Intersectio...
infoteam HELLAS company profile 2025 presentation
PDF-XChange Editor Plus 10.7.0.398.0 Crack Free Download Latest 2025
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
Streamlining Project Management in the AV Industry with D-Tools for Zoho CRM ...
Crypto Loss And Recovery Guide By Expert Recovery Agency.
HackYourBrain__UtrechtJUG__11092025.pptx
Chapter 1 - Transaction Processing and Mgt.pptx
Folder Lock 10.1.9 Crack With Serial Key
What Makes a Great Data Visualization Consulting Service.pdf
Chapter_05_System Modeling for software engineering
Human Computer Interaction lecture Chapter 2.pptx
4Seller: The All-in-One Multi-Channel E-Commerce Management Platform for Glob...
AI-Powered Fuzz Testing: The Future of QA
3.Software Design for software engineering
Download Adobe Photoshop Crack 2025 Free
Python is a high-level, interpreted programming language
Ad

Introduction to Operating Systems.pptx

  • 1. Intro to Embedded Linux Mohamed Saied
  • 2. Agenda • What is Embedded Linux? • What is Real time System? • Is Linux a real time OS? • Scheduling • Multi-tasking • Linux Architecture
  • 4. Embedded Linux Architecture • The embedded system build process is usually done on the host PC using cross-compilation tools. Because target hardware does not have enough resources to run tools that are used to generate a binary image for target embedded hardware. The process of compiling code on one system ( host system) and generated source code runs on the other system is known as cross-compilation.
  • 5. Bootloader • Followings are the main roles of a bootloader: • Target hardware initialization • Load the application binary ( operating system, root file system, device tree ) from the non-volatile external storage to the RAM memory • RAM connects externally to the SOC and it stores run-time data, operating system, root file system, application software, and stack/heap. • After that execute the main operating system code from the RAM memory
  • 7. Linux Kernel • It is a software or operating system kernel that manages resources of embedded processors optimally and efficiently. The main core component of embedded Linux is the Linux Kernel. It is a layered operating system architecture that means it divides into two layers such as user space and kernel space memory space.
  • 8. Device Tree • A device tree is a tree data structure that provides information about the connected hardware devices that are not discoverable themself and other on-chip peripherals of an SoC. Some of the automatically non- discoverable on-chip peripherals are I2C, UART, SP, ethernet, etc. On the contrary, the USB device has the capability or intelligence to inform its presence to the operating system dynamically
  • 9. Device Tree Cont’ • DT describes these devices using a special hardware description language. It decides which drivers to initialize and configure the device parameters such as registers addresses and IRQs. A DT source is combined with the Device Tree Blob and combines with the kernel during the embedded hardware booting process. The bootloader also loads the Device Tree Blob into RAM memory along with the Kernel and it runs before the kernel. In short, DT manages hardware resources of embedded Linux based systems.
  • 11. Root File System In Linux, the filesystem provides a structural way to store and access our files from the system storage. Linux follows the Filesystem Hierarchy Standard (FHS) as a reference. The FHS defines the structure of the filesystem. In other words, it defines the main directories and their contents. Linux has various types of filesystems: Ext (Extended Filesystem), Ext2, Ext3, Ext4 JFS (Journaling Filesystem) ReiserFS XFS (Extent Filesystem) Btrfs (B Tree Filesystem) Swap
  • 12. Boot Process in linux BIOS: Performs some system integrity checksSearches, loads, and executes the boot loader program. MBR stands for Master Boot Record.It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda MBR is less than 512 bytes in size. This has three components 1) primary boot loader info in 1st 446 bytes 2) partition table info in next 64 bytes 3) mbr validation check in last 2 bytes. It contains information about GRUB (or LILO in old systems).So, in simple terms MBR loads and executes the GRUB boot loader.
  • 13. GRUB GRUB stands for Grand Unified Bootloader. If you have multiple kernel images installed on your system, you can choose which one to be executed. GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file. GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem). Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The following is sample grub.conf of CentOS. #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-194.el5PAE) root (hd0,0) kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/ initrd /boot/initrd-2.6.18-194.el5PAE.img
  • 14. Init Looks at the /etc/inittab file to decide the Linux run level. Following are the available run levels 0) halt 1 ) Single user mode 2 ) Multiuser, without NFS 3 ) Full multiuser mode 4 ) unused 5 ) X11 6 )reboot Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program. Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level If you want to get into trouble, you can set the default run level to 0 or 6. Since you know what 0 and 6 means, probably you might not do that. Typically you would set the default run level to either 3 or 5.
  • 15. Runlevel programs When the Linux system is booting up, you might see various services getting started. For example, it might say restarting sendmail. Those are the runlevel programs, executed from the run level directory as defined by your run level. Depending on your default init level setting, the system will execute the programs from one of the following directories. Run level 0 -“ /etc/rc.d/rc0.d/ Run level 1 -“ /etc/rc.d/rc1.d/ Run level 2 -“ /etc/rc.d/rc2.d/ Run level 3 -“ /etc/rc.d/rc3.d/ Run level 4 -“ /etc/rc.d/rc4.d/ Run level 5 -“ /etc/rc.d/rc5.d/ Run level 6 -“ /etc/rc.d/rc6.d/ Please note that there are also symbolic links available for these directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/rc0.d. Under the /etc/rc.d/rc*.d/ directories, you would see programs that start with S and K. Programs starts with S are used during startup. S for startup. Programs starts with K are used during shutdown. K for kill. There are numbers right next to S and K in the program names. Those are the sequence number in which the programs should be started or killed. For example, S12syslog is to start the syslog deamon, which has the sequence number of 12. S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So, syslog program will be started before sendmail.
  • 16. Kernel Mounts the root file system as specified in the “root=― in grub.conf Kernel executes the /sbin/init program Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid. initrd stands for Initial RAM Disk. initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware.