Embedded Linux provides a standardized operating system solution for embedded systems through the Linux kernel. The Linux kernel abstracts the underlying hardware and provides drivers to interface with hardware peripherals. This allows application developers to focus on their code without needing to manage low-level hardware interactions. A bootloader initializes the hardware and loads the Linux kernel from memory. The kernel then loads and runs programs stored in the filesystem. Cross-compilers allow the same source code to target different processor architectures. Libraries and drivers help share code and resources across applications and hardware.
Linux is a widely used open source operating system kernel that can also refer to full operating system distributions. It is commonly used in embedded systems due to its portability, modularity, and ability to run on hardware with limited resources. Device drivers can be dynamically loaded and unloaded from the Linux kernel as modules, allowing new functionality to be added without rebooting the system. This makes Linux well-suited for embedded device development.
A device driver allows operating systems and programs to interact with hardware devices. This document discusses device drivers in Linux, including that drivers are loaded as kernel modules, communicate between user and kernel space, and have character, block, and network classes. It provides examples of initializing and removing a sample "memory" driver that allows reading from and writing to a character device memory buffer.
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B KuteTushar B Kute
Recent And Future Trends In Os
Linux Kernel Module Programming, Embedded Operating Systems: Characteristics of Embedded Systems, Embedded Linux, and Application specific OS. Basic services of NACH Operating System.
Introduction to Service Oriented Operating System (SOOS), Introduction to Ubuntu EDGE OS.
Designed By : Tushar B Kute (http://tusharkute.com)
* Know the reasons why various operating systems exist and how they are functioned for dedicated purposes
* Understand the basic concepts while building system software from scratch
• How can we benefit from cheap ARM boards and the related open source tools?
- Raspberry Pi & STM32F4-Discovery
This document provides an overview of embedded Linux. It defines embedded Linux as porting the Linux kernel to run on a specific CPU and board that will be placed in an embedded device. It discusses common embedded Linux distributions and components like bootloaders, kernels, and file systems. It also outlines the process for building an embedded Linux system, developing applications for it using common free tools, and emulating or testing on real hardware.
This document discusses embedded systems and the MSP430 microcontroller. It begins with an introduction to embedded systems that defines them, lists their applications, and describes their classification based on generation and complexity. Next, it covers the typical features and architecture considerations of embedded systems, including the CPU, memory, I/O, and common peripherals. The document then discusses the MSP430 microcontroller family, providing details on the MSP430F2013 model, its memory map, CPU architecture and instruction set. It concludes with an overview of the variants in the MSP430 family.
The document discusses RISC design philosophy and how it relates to ARM processors. It aims to deliver simple but powerful instructions that execute in a single cycle at a high clock rate with reduced complexity handled by hardware. This allows for greater flexibility and intelligence to be provided in software rather than hardware. RISC follows four major design rules - reduced number of instructions, single cycle execution, fixed length instructions, and separate load/store architecture.
F9 is a new open source microkernel designed for deeply embedded systems like IoT devices. It aims to provide efficiency, security, and a flexible development environment. F9 follows microkernel principles with minimal kernel functionality and isolates components as user-level processes. It uses capabilities for access control and focuses on performance through techniques like tickless scheduling and adaptive power management.
Introduction to embedded linux device driver and firmwaredefinecareer
This document provides an introduction to embedded Linux and device drivers. It defines an embedded system as a special-purpose computer designed to perform dedicated functions with real-time constraints, often embedded as part of a complete device. Linux is commonly used in embedded systems due to advantages like reuse of existing components, community support, and low cost. The document outlines the typical hardware and software requirements for developing embedded Linux systems, and provides an overview of the Linux kernel architecture for device drivers, including the unified device model, bus drivers, and platform devices.
This document provides an overview of the CSC204 module on computer architecture and assembly language. It covers the module description, assessment criteria, objectives, and content including computer components, the Von Neumann model, CPU organization, and functional units. The key topics are computer architecture, assembly language programming, computer organization, and how computers work at different levels of abstraction from the digital logic level to the user level.
Linux device drivers provide an interface between hardware devices and user programs running in userspace. They present devices as files to user programs through the kernel's virtual file system interface. Device drivers are loaded kernel modules that communicate with hardware through interrupts and direct memory access. They implement read, write and other functions to transfer data between memory and devices.
Linux device drivers act as an interface between hardware devices and user programs. They communicate with hardware devices and expose an interface to user applications through system calls. Device drivers can be loaded as kernel modules and provide access to devices through special files in the /dev directory. Common operations for drivers include handling read and write requests either through interrupt-driven or polling-based I/O.
This document discusses platform technologies and provides information on computing platforms and operating systems. It defines a platform as the combination of hardware, software, and networks. It then summarizes the generations of computing from vacuum tubes to modern mobile computers. It also provides details on operating systems, describing them as software that manages computer resources and provides services for other programs. It discusses operating system concepts such as processes, memory, files, input/output, and protection.
The document discusses operating system concepts including:
1. The operating system controls computer resources and provides an interface between applications and hardware.
2. It hides hardware complexity and manages resources like processors, memory, and devices.
3. Key OS components include processes, files, pipes, and system calls that allow programs to request services from the OS kernel.
Building Embedded Linux Systems IntroductionSherif Mousa
This document provides an introduction to embedded Linux. It defines embedded Linux as using the Linux kernel and customizing user-space libraries and utilities for applications in consumer electronics, military, medical, and other industries. Creating an embedded Linux system involves selecting the right components to build the final system. A cross-compiler is used to build code for the target platform on the host development machine. Key components of an embedded Linux system include the bootloader, Linux kernel, filesystem, configuration files, C library, commands, and user applications.
This document provides an overview of walking around the Linux kernel. It begins with a brief history of Linux starting with Richard Stallman founding GNU in 1984. It then discusses why an operating system is needed and what a kernel is. The document outlines the basic facilities a kernel provides including process management, memory management, and device management. It describes different kernel design approaches such as monolithic kernels, microkernels, and hybrid kernels. Finally, it provides some tips for hacking the Linux kernel such as installing development packages, configuring and compiling the kernel, checking hardware, and loading modules.
This document discusses the history and components of computers over several generations. It describes how computers have progressed from using vacuum tubes to integrated circuits, microprocessors, and advances like parallel computing. The key points are:
- Computers have advanced through five generations from vacuum tubes to artificial intelligence. Each generation brought improvements in speed, size, cost, and capabilities.
- A computer system has hardware and software layers, with hardware consisting of the CPU, memory, and I/O systems. Software includes operating systems and programs.
- There is a hierarchy of abstraction levels within a computer from the user level to the digital logic level, with each level building on the one below. This separation of levels simplifies design and
An operating system provides an interface between users and computer hardware. It implements a virtual machine that is easier and safer to program than raw hardware. The key functions of an operating system include resource management, coordination of applications and users, and providing protection between processes. Operating systems abstract away hardware complexity and provide standard services to applications through virtualization layers. They juggle resources to provide the illusion of dedicated hardware and protect users from each other through mechanisms like address translation and dual mode operation.
The document discusses device drivers and kernel modules in Linux. It describes the role of device drivers in providing abstraction between hardware and software. Device drivers require low-level access to hardware and operate in a privileged environment. The document also covers loading kernel modules dynamically at runtime using insmod and rmmod. It discusses different types of devices, modules, and the initialization and cleanup functions required for modules.
This document discusses embedded systems and the MSP430 microcontroller. It begins with an introduction to embedded systems that defines them, lists their applications, and describes their classification based on generation and complexity. Next, it covers the typical features and architecture considerations of embedded systems, including the CPU, memory, I/O, and common peripherals. The document then discusses the MSP430 microcontroller family, providing details on the MSP430F2013 model, its memory map, CPU architecture and instruction set. It concludes with an overview of the variants in the MSP430 family.
The document discusses RISC design philosophy and how it relates to ARM processors. It aims to deliver simple but powerful instructions that execute in a single cycle at a high clock rate with reduced complexity handled by hardware. This allows for greater flexibility and intelligence to be provided in software rather than hardware. RISC follows four major design rules - reduced number of instructions, single cycle execution, fixed length instructions, and separate load/store architecture.
F9 is a new open source microkernel designed for deeply embedded systems like IoT devices. It aims to provide efficiency, security, and a flexible development environment. F9 follows microkernel principles with minimal kernel functionality and isolates components as user-level processes. It uses capabilities for access control and focuses on performance through techniques like tickless scheduling and adaptive power management.
Introduction to embedded linux device driver and firmwaredefinecareer
This document provides an introduction to embedded Linux and device drivers. It defines an embedded system as a special-purpose computer designed to perform dedicated functions with real-time constraints, often embedded as part of a complete device. Linux is commonly used in embedded systems due to advantages like reuse of existing components, community support, and low cost. The document outlines the typical hardware and software requirements for developing embedded Linux systems, and provides an overview of the Linux kernel architecture for device drivers, including the unified device model, bus drivers, and platform devices.
This document provides an overview of the CSC204 module on computer architecture and assembly language. It covers the module description, assessment criteria, objectives, and content including computer components, the Von Neumann model, CPU organization, and functional units. The key topics are computer architecture, assembly language programming, computer organization, and how computers work at different levels of abstraction from the digital logic level to the user level.
Linux device drivers provide an interface between hardware devices and user programs running in userspace. They present devices as files to user programs through the kernel's virtual file system interface. Device drivers are loaded kernel modules that communicate with hardware through interrupts and direct memory access. They implement read, write and other functions to transfer data between memory and devices.
Linux device drivers act as an interface between hardware devices and user programs. They communicate with hardware devices and expose an interface to user applications through system calls. Device drivers can be loaded as kernel modules and provide access to devices through special files in the /dev directory. Common operations for drivers include handling read and write requests either through interrupt-driven or polling-based I/O.
This document discusses platform technologies and provides information on computing platforms and operating systems. It defines a platform as the combination of hardware, software, and networks. It then summarizes the generations of computing from vacuum tubes to modern mobile computers. It also provides details on operating systems, describing them as software that manages computer resources and provides services for other programs. It discusses operating system concepts such as processes, memory, files, input/output, and protection.
The document discusses operating system concepts including:
1. The operating system controls computer resources and provides an interface between applications and hardware.
2. It hides hardware complexity and manages resources like processors, memory, and devices.
3. Key OS components include processes, files, pipes, and system calls that allow programs to request services from the OS kernel.
Building Embedded Linux Systems IntroductionSherif Mousa
This document provides an introduction to embedded Linux. It defines embedded Linux as using the Linux kernel and customizing user-space libraries and utilities for applications in consumer electronics, military, medical, and other industries. Creating an embedded Linux system involves selecting the right components to build the final system. A cross-compiler is used to build code for the target platform on the host development machine. Key components of an embedded Linux system include the bootloader, Linux kernel, filesystem, configuration files, C library, commands, and user applications.
This document provides an overview of walking around the Linux kernel. It begins with a brief history of Linux starting with Richard Stallman founding GNU in 1984. It then discusses why an operating system is needed and what a kernel is. The document outlines the basic facilities a kernel provides including process management, memory management, and device management. It describes different kernel design approaches such as monolithic kernels, microkernels, and hybrid kernels. Finally, it provides some tips for hacking the Linux kernel such as installing development packages, configuring and compiling the kernel, checking hardware, and loading modules.
This document discusses the history and components of computers over several generations. It describes how computers have progressed from using vacuum tubes to integrated circuits, microprocessors, and advances like parallel computing. The key points are:
- Computers have advanced through five generations from vacuum tubes to artificial intelligence. Each generation brought improvements in speed, size, cost, and capabilities.
- A computer system has hardware and software layers, with hardware consisting of the CPU, memory, and I/O systems. Software includes operating systems and programs.
- There is a hierarchy of abstraction levels within a computer from the user level to the digital logic level, with each level building on the one below. This separation of levels simplifies design and
An operating system provides an interface between users and computer hardware. It implements a virtual machine that is easier and safer to program than raw hardware. The key functions of an operating system include resource management, coordination of applications and users, and providing protection between processes. Operating systems abstract away hardware complexity and provide standard services to applications through virtualization layers. They juggle resources to provide the illusion of dedicated hardware and protect users from each other through mechanisms like address translation and dual mode operation.
The document discusses device drivers and kernel modules in Linux. It describes the role of device drivers in providing abstraction between hardware and software. Device drivers require low-level access to hardware and operate in a privileged environment. The document also covers loading kernel modules dynamically at runtime using insmod and rmmod. It discusses different types of devices, modules, and the initialization and cleanup functions required for modules.
This document discusses digital signal processors and customizable processors. It notes that digital signal processors are evolving to handle next generation needs, while customizable processors allow customization of processor cores for system-on-chip designs. The document also outlines several challenges with designing system-on-chip circuits, including rising costs of bugs, complexity of verification, and difficulty integrating hardware and software. It advocates for using extensible microprocessor cores that allow customizing the instruction set, memory, and interfaces to improve performance for data-intensive applications.
The document discusses coarse-grained reconfigurable architectures and compares them to fine-grained FPGAs. It describes two example coarse-grained architectures: PACT XPP and Morphosys. PACT XPP uses a packet-switched interconnect between its heterogeneous processing elements. Morphosys couples a RISC core to a coarse-grained reconfigurable cell array that operates in SIMD fashion. The document concludes that key parameters for evaluating reconfigurable processors as IP include the reconfigurable fabric design, the application mapping flow, and core-fabric interaction.
Digital signal processors (DSPs) were originally developed in universities in the 1960s for signal processing research. DSPs became commercially viable in the 1980s with the introduction of cost-effective processors. DSPs are optimized for intensive math operations and real-time processing through features like loop hardware, data memory management, and saturation logic. Common DSP applications include digital communications, audio processing, and image processing. DSPs have had a significant impact on technologies like digital cellular phones, the internet, entertainment, and are now used widely.
This document discusses digital signal processors and customizable processors. It begins by describing digital signal processors, noting they are used for digital signal processing tasks like filtering, estimation, and data manipulation in real time. It then discusses customizable processors and the benefits of customization, as well as using microprocessor cores in system-on-chip designs. The rest of the document provides details on digital signal processing, including digital to analog conversion, applications of DSP like finite impulse response filtering using general purpose and digital signal processors, and features of the TMS32010 digital signal processor.
This document discusses customizable processors and processor customization. It describes how customizable processors incorporate task-specific hardware acceleration into the processor's execution pipeline rather than using external accelerators. This improves efficiency by bringing the acceleration hardware into close contact with the processor's registers and interfaces. The document also discusses the benefits of using microprocessor cores in system-on-chip designs, such as improving flexibility so new systems don't require new chip designs and simplifying the design process.
The document discusses input/output (I/O) in operating systems. It covers how the OS controls I/O devices by issuing commands, handling interrupts and errors. There are two types of I/O devices - block and character. Block devices can read blocks independently, like hard disks, while character devices accept characters without regard to structure, like printers. The CPU communicates with device registers and buffers using memory-mapped I/O. Direct memory access (DMA) allows devices to access memory directly to transfer data without CPU involvement. Interrupts are used to notify the CPU when I/O is complete. Device drivers and layers of I/O software manage interactions with different devices.
Lect 2a Direct Current Motor Drives.pptxVarsha506533
This document compares DC and AC motor drives. DC drives have the advantage of simple speed and torque control but DC motors require more maintenance and are heavier. AC drives use AC motors which are less expensive and require less maintenance than DC motors. While AC drives were predicted to replace DC drives, DC drives still have a strong presence due to their easy control capabilities. The document then discusses DC motors and their operation, including torque-speed characteristics and various methods of speed control like armature voltage control using phase-controlled rectifiers and switch-mode converters.
Lecture 1b Selection of Motor Rating.pptxVarsha506533
The document discusses motor power ratings and thermal modeling of motors. It covers:
1) A thermal model that treats the motor as a homogeneous body to determine ratings. The model accounts for heat developed, dissipated, weight, specific heat, cooling area, heat transfer coefficient, and temperature rise over time.
2) Classes of motor duty including continuous, short-time, and intermittent periodic duty. Continuous duty involves constant loading while intermittent duty has periodic loading and resting cycles.
3) Methods for determining motor ratings for different duty cycles including equivalent current, torque, and power methods for fluctuating loads and intermittent duty. The rating selected should ensure temperature does not exceed safe limits.
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfMohamedAbdelkader115
Glad to be one of only 14 members inside Kuwait to hold this credential.
Please check the members inside kuwait from this link:
https://www.rics.org/networking/find-a-member.html?firstname=&lastname=&town=&country=Kuwait&member_grade=(AssocRICS)&expert_witness=&accrediation=&page=1
its all about Artificial Intelligence(Ai) and Machine Learning and not on advanced level you can study before the exam or can check for some information on Ai for project
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYijscai
With the increased use of Artificial Intelligence (AI) in malware analysis there is also an increased need to
understand the decisions models make when identifying malicious artifacts. Explainable AI (XAI) becomes
the answer to interpreting the decision-making process that AI malware analysis models use to determine
malicious benign samples to gain trust that in a production environment, the system is able to catch
malware. With any cyber innovation brings a new set of challenges and literature soon came out about XAI
as a new attack vector. Adversarial XAI (AdvXAI) is a relatively new concept but with AI applications in
many sectors, it is crucial to quickly respond to the attack surface that it creates. This paper seeks to
conceptualize a theoretical framework focused on addressing AdvXAI in malware analysis in an effort to
balance explainability with security. Following this framework, designing a machine with an AI malware
detection and analysis model will ensure that it can effectively analyze malware, explain how it came to its
decision, and be built securely to avoid adversarial attacks and manipulations. The framework focuses on
choosing malware datasets to train the model, choosing the AI model, choosing an XAI technique,
implementing AdvXAI defensive measures, and continually evaluating the model. This framework will
significantly contribute to automated malware detection and XAI efforts allowing for secure systems that
are resilient to adversarial attacks.
The role of the lexical analyzer
Specification of tokens
Finite state machines
From a regular expressions to an NFA
Convert NFA to DFA
Transforming grammars and regular expressions
Transforming automata to grammars
Language for specifying lexical analyzers
π0.5: a Vision-Language-Action Model with Open-World GeneralizationNABLAS株式会社
今回の資料「Transfusion / π0 / π0.5」は、画像・言語・アクションを統合するロボット基盤モデルについて紹介しています。
拡散×自己回帰を融合したTransformerをベースに、π0.5ではオープンワールドでの推論・計画も可能に。
This presentation introduces robot foundation models that integrate vision, language, and action.
Built on a Transformer combining diffusion and autoregression, π0.5 enables reasoning and planning in open-world settings.
Raish Khanji GTU 8th sem Internship Report.pdfRaishKhanji
This report details the practical experiences gained during an internship at Indo German Tool
Room, Ahmedabad. The internship provided hands-on training in various manufacturing technologies, encompassing both conventional and advanced techniques. Significant emphasis was placed on machining processes, including operation and fundamental
understanding of lathe and milling machines. Furthermore, the internship incorporated
modern welding technology, notably through the application of an Augmented Reality (AR)
simulator, offering a safe and effective environment for skill development. Exposure to
industrial automation was achieved through practical exercises in Programmable Logic Controllers (PLCs) using Siemens TIA software and direct operation of industrial robots
utilizing teach pendants. The principles and practical aspects of Computer Numerical Control
(CNC) technology were also explored. Complementing these manufacturing processes, the
internship included extensive application of SolidWorks software for design and modeling tasks. This comprehensive practical training has provided a foundational understanding of
key aspects of modern manufacturing and design, enhancing the technical proficiency and readiness for future engineering endeavors.
We introduce the Gaussian process (GP) modeling module developed within the UQLab software framework. The novel design of the GP-module aims at providing seamless integration of GP modeling into any uncertainty quantification workflow, as well as a standalone surrogate modeling tool. We first briefly present the key mathematical tools on the basis of GP modeling (a.k.a. Kriging), as well as the associated theoretical and computational framework. We then provide an extensive overview of the available features of the software and demonstrate its flexibility and user-friendliness. Finally, we showcase the usage and the performance of the software on several applications borrowed from different fields of engineering. These include a basic surrogate of a well-known analytical benchmark function; a hierarchical Kriging example applied to wind turbine aero-servo-elastic simulations and a more complex geotechnical example that requires a non-stationary, user-defined correlation function. The GP-module, like the rest of the scientific code that is shipped with UQLab, is open source (BSD license).
2. Linux Features
UNIX-like operating system.
Features:
Preemptive multitasking.
Virtual memory (protected memory,
paging).
Shared libraries.
Demand loading, dynamic kernel modules.
Shared copy-on-write executables.
TCP/IP networking.
SMP support.
Open source.
3. What’s a Kernel?
AKA: executive, system monitor.
Controls and mediates access to hardware.
Implements and supports fundamental
abstractions:
Processes, files, devices etc.
Schedules / allocates system resources:
Memory, CPU, disk, descriptors, etc.
Enforces security and protection.
Responds to user requests for service (system
calls).
Etc…etc…
4. Kernel Design Goals
Performance: efficiency, speed.
Utilize resources to capacity with low
overhead.
Stability: robustness, resilience.
Uptime, graceful degradation.
Capability: features, flexibility, compatibility.
Security, protection.
Protect users from each other & system
from bad users.
Portability.
Extensibility.
5. Kernel Architecture
Applications
System Libraries (libc)
System Call Interface
Hardware
Architecture-Dependent Code
I/O Related Process Related
Scheduler
Memory Management
IPC
File Systems
Networking
Device Drivers
Modules
7. Linux Source Tree Layout
/usr/src/linux
Documentation
arch
fs
init kernel
include
ipc
drivers
net
mm
lib
scripts
alpha
arm
i386
ia64
m68k
mips
mips64
ppc
s390
sh
sparc
sparc64
acorn
atm
block
cdrom
char
dio
fc4
i2c
i2o
ide
ieee1394
isdn
macintosh
misc
net
…
adfs
affs
autofs
autofs4
bfs
code
cramfs
devfs
devpts
efs
ext2
fat
hfs
hpfs
…
asm-alpha
asm-arm
asm-generic
asm-i386
asm-ia64
asm-m68k
asm-mips
asm-mips64
linux
math-emu
net
pcmcia
scsi
video …
adfs
affs
autofs
autofs4
bfs
code
cramfs
devfs
devpts
efs
ext2
fat
hfs
hpfs …
802
appletalk
atm
ax25
bridge
core
decnet
econet
ethernet
ipv4
ipv6
ipx
irda
khttpd
lapb
…
8. linux/arch
Subdirectories for each current port.
Each contains kernel, lib, mm, boot and other
directories whose contents override code stubs in
architecture independent code.
lib contains highly-optimized common utility routines
such as memcpy, checksums, etc.
arch as of 2.4:
alpha, arm, i386, ia64, m68k, mips, mips64.
ppc, s390, sh, sparc, sparc64.
9. linux/drivers
Largest amount of code in the kernel tree (~1.5M).
device, bus, platform and general directories.
drivers/char – n_tty.c is the default line discipline.
drivers/block – elevator.c, genhd.c, linear.c, ll_rw_blk.c, raidN.c.
drivers/net –specific drivers and general routines Space.c and net_init.c.
drivers/scsi – scsi_*.c files are generic; sd.c (disk), sr.c (CD-ROM), st.c (tape),
sg.c (generic).
General:
cdrom, ide, isdn, parport, pcmcia, pnp, sound, telephony, video.
Buses – fc4, i2c, nubus, pci, sbus, tc, usb.
Platforms – acorn, macintosh, s390, sgi.
10. linux/fs
Contains:
virtual filesystem (VFS) framework.
subdirectories for actual filesystems.
vfs-related files:
exec.c, binfmt_*.c - files for mapping new process images.
devices.c, blk_dev.c – device registration, block device support.
super.c, filesystems.c.
inode.c, dcache.c, namei.c, buffer.c, file_table.c.
open.c, read_write.c, select.c, pipe.c, fifo.c.
fcntl.c, ioctl.c, locks.c, dquot.c, stat.c.
12. linux/init
Just two files: version.c, main.c.
version.c – contains the version banner that prints at boot.
main.c – architecture-independent boot code.
start_kernel is the primary entry point.
13. linux/ipc
System V IPC facilities.
If disabled at compile-time, util.c exports stubs that simply return –ENOSYS.
One file for each facility:
sem.c – semaphores.
shm.c – shared memory.
msg.c – message queues.
14. linux/kernel
The core kernel code.
sched.c – “the main kernel file”:
scheduler, wait queues, timers, alarms, task queues.
Process control:
fork.c, exec.c, signal.c, exit.c etc…
Kernel module support:
kmod.c, ksyms.c, module.c.
Other operations:
time.c, resource.c, dma.c, softirq.c, itimer.c.
printk.c, info.c, panic.c, sysctl.c, sys.c.
15. linux/lib
kernel code cannot call standard C library routines.
Files:
brlock.c – “Big Reader” spinlocks.
cmdline.c – kernel command line parsing routines.
errno.c – global definition of errno.
inflate.c – “gunzip” part of gzip.c used during boot.
string.c – portable string code.
Usually replaced by optimized, architecture-dependent routines.
vsprintf.c – libc replacement.
19. What are embedded
systems?
• Embedded systems are self contained intelligent electronic
control systems.
• They contain a microcontroller / microprocessor and
peripherals interfaced to perform a particular series of tasks.
• Embedded systems today run almost every electronic device
imaginable from TV’s to washing machine.
• Embedded systems also can be used for self-contained
intelligent automated systems.
20. Simple Embedded
Example
• An AVR microcontroller. Atmega328.
• Contains all hardware necessary to perform computational tasks
onboard provided power is given to it.
• Communicates with the outside world via gpio pins.
• Can be used to read data from a sensor connected to it and analyze
that. (e.g.: IR
• Can be interfaces to motors and set to control the movement of the
motors depending on the sensor input.
• Then, the microcontroller can be put on-board a bot and be asked
to
perform line following!
21. Programming simple
MC’s
• Microcontrollers are defined by their architecture and bus bit
width.
• The atmega is an 8 bit AVR series microcontroller.
• To program the atmega we need
• A Compiler to compile C code for the atmega328
• A Flash/EPROM burning device
• The cross compiler convers our code from C to the hex op
code that can be placed in the atmega’s internal memory.
• The atmega executes each instruction sequentially!
22. Hardware
available
• Hardware manufactures keep increasing complexity and
system performance.
• The higher processing power comes with the price of too
much registers with individual internal controlling
methodology
• Hardware manufacturers needed to abstract their hardware to
be able to support easier development.
• Software developers needed a generalized framework where
they cab build their applications without worrying about their
hardware.
23. Hardware v/s
software
• Objective : Getting your code to sense / control external devices.
• The more complex your hardware is, the more requirements it will have
in respect to code to write control mechanism.
• If a stand-alone application is required to be developed
• Multiple (internal / external) devices have to be managed in the background
• I/O of different devices must be managed and processed as per demand.
• Interrupts / clocks / power must be managed to keep the microcontroller
running.
• This calls for increased debugging / non portability and results in
increased development time / bugs in the system.
• If hardware is as complicated and powerful as a computer (SBC) then we
need code comparable to that of an Operating System (DOS) to be able
to run it!!
24. Line between HW/
SW
• Very few processors can be programmed by flash burning with
ICSP. (e.g: ARM5)
• Modern communication standards are replacing “legacy”
RS- 232 with USB, I2C ,Ethernet etc.
• The software control of these protocols in the Atmega register
level way is too complex.
• Harware manufacturers release “Drivers” or libraries for
controlling their hardware to software developers which
allows for more efficient usage of the underlying hardware.
26. Embedded
Linux
Hardware
• Processor
• RAM
• GPIO
• Clocks
• UART
• I2C
Kernel
• Kernel
developers
work on
hardware
control of
the devices.
Userland
• This is
where user
level
application
programs
are written.
27. Embedded
Linux
• In 1990s, an underground software movement consisting of the
worlds leading developers and programmers wrote a completely
free Operating System!
• As more people used it with the FOSS philosophy, improvements,
fixes and support for multiple processors creeped in!
• This resulted in Linux (the very same kernel ) to run on many
processors and provide a similar level of functionality.
• A Global collaborative effort for improvements and upgrades
make
linux so popular with hardware developers
• Most of the time, linux gets fixes and support for new hardware as
soon as they are available!
28. Linux -> Embedded
Linux
• Linux for x86 and amd64 (desktop architectures) require
almost 100 - 500mb.
• Embedded Devices have more strict requirements in terms of
memory and processing power.
• Embedded Linux kernels can go as low of 11Mb when placed
in RAM.
• A non distribtion based linux – with only kernel and a minimal
filesystem for a “dos” – like usage is usually run.
• Any custom linux libraries for hardware / software can be
installed to help with application development.
29. Starting the
Hardware
• When the hardware is switched on, the OS is present in some
onboard memory peripheral.
• First there is code called a bootloader that initializes all the
required hardware on the board.
• Bootloaders are small programs (4 – 16K) written for and
compiled for specific hardware to be executed immediately
after start.
• The bootloader starts the board and loads the kernel from
where-ever it is into RAM.
• Once the Kernel starts executing from RAM, it takes over and
starts a linux session!
30. Types of
Bootloaders
• Intel Motherboard : PHOENIX BIOS :
• This bootloader is present on most intel based laptops.
• It starts the laptop hardware and loads “NTLDR” the
windows bootmanager.
• This code is hardwired into the mother board.
• Embedded Hardware
• Bootloader is usually places in a NAND Flash memory.
• Bootloaders are very small.
• They load, uncompress the linux kernel and relenquish
control..
31. Kerne
l• Designed as a Finnish UG (B.tech eq) student’s hobby project.
• First was made as a UNIC port for a motorola 64Kb machine that
made Linux designed for Portability.
• The groundwork and FOSS nature allowed the kernel to be ported to
(and thus support) almost every hardware platform on/off the
market.
• The base for extending the kernel through “Device Drivers” have
hardware manufactures / driver developers to release support for
any hardware available.
• Kernel is just a runtime HAL! It just has instructions for running the
hardware – something has to give it instructions -> RootFS..
33. Filesystem
(UserLand)
• Filesystem : Collection of directories
• These directories follow a tree heirarchy and contain
• Executable files or programs that the kernel loads into memory
• Libraries for application to link to at run-time
• User Application that can be simply installed onto it
• Setting files that control the Linux OS’s behaviour.
• Hardware devices are also linked as special file nodes in the
filesystem to connect them to the Kernel’s HAL.
• USB drives / HDDs / SD cards are mounted onto the filesystem
and can be browsed as usual.
35. Cross Compilers and Toolchains
• Different Hardware – Same Source code?
• Cross Compilers are called the translators to machine language for
different architectures.
• Hardware manufactures and developers develop a toolchain for
their architectures.
• The toolchain contain all the utilities required to compile, debug
code and link for the processor.
• There is a GNU toolchain for AVR and ARM architectures.
• The same source code when used with different cross compilers
allow for targeting different platforms.
• The changes in code required for a particular hardware is managed
with localised “patches”.
36. Application
s
• Headless units : Devices without the need for a graphical display
• Routers
• Set Top Box
• GUI based Applications
• Touch Smartphones
• GPS car navigation multimedia systems.
• Application developers have:
• System level functionality if required
• Shared libraries for efficient management of resources
• Linux kernel provided complete HAL
• Same code workable of various devices
• Android is a Linux Kernel and FS example!
• Android will run on any phone that linux can work in.
• Phone developers have a unified Free OS to work with.
• Cheaper and more wide variety of applications!
37. Driver
s
• Run time modules attached to the linux kernel to manage hardware
peripherals
• USB Wifi
• Camera
• GPS
• Unified driver API that makes it easy to write Driver Code that
integrated to the main Kernel.
• Hardware that is accepted to the main repository (upstream) means
that everybody has access to the driver for that hardware!
• Linux drivers need not be released as source – which means
hardware manufactures can release their driver in binary format.
(becomes proprietary)
38. Librarie
s
• C library
• Provides an interface to the kenel functions via calls from
userland.
• Stripped down minimal C libraries are there for use in
embedded devices.
• GlibC (Full Featured)
• uCibC (Minimal Variant)
• POSIX support
• Allows for communication job sceduling,
multiprocessing and IPC
in a unified framework.
• ALSA
• Advanced Linux Sound Architecture for Hardware DSP
support
39. Custom
Applications
• Compiled with appropriate cross-compiler as UNIX / POSIX
Compliant applications
• BusyBox
• Provides an embedded shell functionality in embedded
devices
• cd ls mkdir echo cat and all standard linux commands all work
• I/O can be managed over a serial line
• Can be thought of as a terminal equivalent
• Commands allow for direct control of the kernel
• Helps navigate the filesystem
• Qt GUI applications can also be built if LCD is present.
40. Run Time
Linux
• Serial Console
• Apps that can be autostarted
• Daemons or “services” that provide background
application functionality
• Kernel Threads for Real-Time interrupt management
• RTOS supprt in RT-Linux Project.
41. Memory
Considerations
• Linux works primarily on processors with a hardware MMU.
(memory management unit)
• MMU enforces copy and access violation protection in RAM
between kernel, hardware and user application to make sure
system can be kept stable at all times.
• Virtual Memory allows for run-time linking and delinking of un
responsive kernel modules / application to keep the system
functioning even in the event of a crash.
42. Try for
yourself
• devmem2
• Memory inspector
• ps
• Running processors
• cat files in /proc
• Gives you current system information
43. Open source
Licenses
• Basic funda
• Us at your own Risk
• No guarantee
• We’ll help if we CAN. We don’t need to.
• GPLv2
• GNU Public Licence
• Source must accompany binary
• Linkng to non GPL software not possible.
• LGPL
• Link to non GPL software possible
• To provide for non open source driver development
• LGPL source must be provided
• Modified Free-BSD
• No source delivery required
• For proprietary kernels
• Broken and non FOSS supported Forks
Editor's Notes
#5: Stephen Tweedie claims “All kernel code executes in a process context (except during startup)”. He also says that it is possible for an interrupt to occur during a context switch.
So it is uncommon for there to be no user process mapped. The real problem is not knowing what process is mapped. Kernel mode, system context activities occurs asynchronously and may be entirely unrelated to the current process.