Documente Academic
Documente Profesional
Documente Cultură
Embedded Systems
and
Embedded Linux
Executors: Trn Trng Tun MSSV: 0620098 Nguyn Anh Tun MSSV: 0620094 Guide: M.S. Nguyn Duy Mnh Thi
Contents
INTRODUCTION
EMBEDDED LINUX
CONCLUSION
1.
INTRODUCTION
1.3 Examples
1.2 Characteristics Of ES
1. INTRODUCITON
1.1 What & Why Embedded Systems? 1st: Information processing systems embedded into enclosing products [1] 2nd: A special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints [wiki] 3rd: System that consists of input/output (I/O) and control logic stored in system firmware [2]
WHY?
To make hardware devices more flexible: + Cost + Connectivity + Pervasive Computing + Hardware Combination
1.2
Real-time: + hard real-time (time critical constraints) + soft real-time (time sensitive constraints) x86, Power PC, ARM, MIPS, 8051hard-core or soft-core? Dedicated to specific tasks Wide range of Hardware and Processors Software failure severity Real-time constraints Power constraints Operating under extreme environmental conditions
Fewer system resources than Desktop systems Specialized tools and Design methods Dedicated debugging circuitry
etc
1.3
EXAMPLES
TELECOMMUNICATIONS
CONSUMER ELECTRONICS
MEDICAL
Embedded Systems
AUTOMOTIVE
USERS DESIGNS
INDUSTRY
Managing various system hardware and software resources Provide more features
Embedded Systems & Embedded Linux
OPEN SOURCE
- Vendor Independence - Thousands of developers provide & enhance Linux kernel and other applications - Global support
POSIX Standards (IEEE) Compliance (Portable Operating System Interface) Increasing of supported hardware & software
1.5
UnixWare
Solaris
FreeBSD
OpenBSD
MINIX
IRIX
LINUX
Mac OS X
AIX
1.5
1.5
GNU
A Unix-like operating system Created with free software Recursive acronym for GNU's Not Unix (contain no UNIX code) GNU General Public License (GPL) GNU Lesser General Public License (LGPL ) GNU Free Documentation License (FDL) GNU Compiler Collection (gcc) GNU C Library (glibc)
1.5
Debian (GNU/Linux)
Mandriva
SUSE
Ret Hat
Embedded Systems & Embedded Linux
1.5
1999 Support
BlueCat LynuxWorks
New wave
2000
BusyBox 0.43
1.5
Linux
AMIRIX, Coollogic: Coollinux, Coventive: Xlinux, Klinux, Esfia: RedBlue Linux, KYZO: PizzaBox Linux, Lineo: Embedix, LynuxWorks: BlueCat, Neoware: NeoLinux, TimeSys: Linux GPL, MontaVista Linux
NonLinux
eCos , VxWorks, Win CE, Lynyos, BSD, Green Hills, QNX DOS
Embedded Systems & Embedded Linux
1.5
Newest: 2.6.27.9-rc2
1.5
Past
General-purposes OS: NO REAL-TIME AT ALL! (Differences in deterministic timing behavior of all the OS services) 1st Dual-kernel (Co-kernel) approach : hard real-time 2nd Fully Preemptive Kernel Approach: Patches supported to make soft real-time Linux
NOW
2.
EMBEDDED LINUX
INTRODUCTION
EMBEDDED LINUX
CONCLUSION
2.
EMBEDDED LINUX
2.3 Prospects
2.2 Implementation
2.5 Challenges
2.1
2.1
PAST
NOW
2.2
IMPLEMENTATION
2.2
Examine . . .
IMPLEMENTATION
HOW TO BUILD A PARTICULAR EMBEDDED LINUX SYSTEM? Step 1: Product specifications / System requirements
-Build a Linux-based platform on a specific hardware - Which hardware to choose (to order)? + Which development board? Compatible with Linux or not? + Which processor? - Which Linux distro? (that supports the chosen hardware) - Which software and toolchain(s) to design? Eclipse-based IDE(Integrated Development Environment) - Which software application(s) to run?
Embedded Systems & Embedded Linux
2.2
Examine . . .
IMPLEMENTATION
HOW TO BUILD A PARTICULAR EMBEDDED LINUX SYSTEM? Step 2: Overall Architecture / Models
- Understand hardwares architecture Basic concepts - Understand the Linux kernel - Choosing hardware components - Design block diagrams (at high level) + hardware connecting and behavior + application(s) - Understand the cross-platform concept
Embedded Systems & Embedded Linux
2.2
Examine . . .
IMPLEMENTATION
HOW TO BUILD A PARTICULAR EMBEDDED LINUX SYSTEM? EXAMPLE: + Board + CPU Step 2: Overall Architecture / Models
- Understand hardwares architecture - Understand the Linux kernel - Choosing hardware components - Design block diagrams (at high level) + hardware connecting and behavior + application(s) - Understand the cross-platform concept
Embedded Systems & Embedded Linux
2.2
IMPLEMENTATION
HOW TO BUILD A PARTICULAR EMBEDDED LINUX SYSTEM? Step 2: Overall Architecture / Models
2.2
IMPLEMENTATION
HOW TO BUILD A PARTICULAR EMBEDDED LINUX SYSTEM? Step 2: Overall Architecture / Models
Memory manager Scheduler File system I/O subsystem Networking subsystem IPC (Inter-process communication)
Embedded Systems & Embedded Linux
2.2
IMPLEMENTATION
HOW TO BUILD A PARTICULAR EMBEDDED LINUX SYSTEM? Step 2: Overall Architecture / Models
- Understand hardwares architecture - Understand the Linux kernel - Choosing hardware components - Design block diagrams (at high level) + hardware connecting and behavior + application(s) - Understand the cross-platform concept
Embedded Systems & Embedded Linux
2.2
IMPLEMENTATION
Host
C libraries
Desktop (Linux-x86)
Target
Boot loader
2.2
Examine . . .
IMPLEMENTATION
HOW TO BUILD A PARTICULAR EMBEDDED LINUX SYSTEM? Step 3: Hardware and Software configurations HARDWARE: (Work becomes more easier with powerful tools) - Configure the CPU parameters + processor clock frequency, bus clock frequency + Cache/ debug mode/ On-chip memory? - Configure the peripherals + Using own designs (verilog .v or .vhdl files) + Using supported / licensed IP cores (Intellectual Properties) + Enabled / Disabled interrupt or not?
Embedded Systems & Embedded Linux
2.2
IMPLEMENTATION
Step 3: Hardware and Software configurations HARDWARE: (Work becomes more easier with powerful tools)
- Configure Software setting + Give more detailed information to the System Wizard + Choose the embedded OS + Connected peripherals
- Build and generate file Netlist + bitstream (will be uploaded to the FPGA ) - Generate software Libraries and BSP (Board Support Packages) BSP includes: + drivers + header files + device ID number +system address map
2.2
IMPLEMENTATION
Step 3: Hardware and Software configurations SOFTWARE: (need to deal a lot with the Linux command console) -Preparations for cross-compilation of the kernel
Create a cross-compiler environment (to compile CPU kernel and Linux root file system) Crosstool: reliable & easy-to-use toolchain generator (by Dan Kegel) Linux kernel headers C libraries Crosstool Proper toolchain (suitable versions (GCC GNU Compiler Collection ) (scripts) for target hardware) (glibc) Binutils(manipulate binary object files)
2.2
IMPLEMENTATION
Step 3: Hardware and Software configurations SOFTWARE: (need to deal a lot with the Linux command console) - Build the Linux kernel (cont)
Compile the kernel make kernels image (.elf executable and linking format) Test the kernel without Root file system (optional)
Top-level directories Directory Contents bin Binary executables, usable by all users on the system dev Device nodes
2.2
IMPLEMENTATION
Step 3: Hardware and Software configurations SOFTWARE: (need to deal a lot with the Linux command console) - Port kernel image into hardware
Format CF card (flash card):
Partition 1: Type = FAT16 (6) (contains created .ace file) Partition 2: Type = Linux Swap (82) Size = 1 ~ 1.5 main memory Partition 3: Type = Linux (83), Size = Remainder disk space (contains NFS files) Copy .ace file
2.2
IMPLEMENTATION
- Similar to programming applications in desktop + Assembly, Pascal, C, C++, Java + Block diagram + Coding (on host PC) + + Cross-compile executable files in target device - Copy into /bin on root file system of target. SYSTEM COMPLETED!!!
2.2
IMPLEMENTATION
LINUX KERNEL PORTED TO IPHONE (iPhone-Dev.org) - Hardware: Iphone (fixed) 1st & 2nd generation + Touch Processor: ARM - Bootloader: OpeniBoot - Linux kernel: 2.6
2.2
IMPLEMENTATION
www.mtemag.com Hardware: Airbus380 25 PowerPC processors OS: LynxOS (Linux-based real-time OS)
2.2
IMPLEMENTATION
ANDROID FUTURES HAND HELD OS android.com - Developers: Open Handset Alliance (Google, Intel, Motorola, T-mobile ) on November 2007 - Hardware: mobile devices - OS: Android (Linux kernel (monolithic)) - Software development kit: Android SDK
2.3
PROSPECTS
2.4
FUTURES EXAMPLES
- SoC evolutions NoC (Network on Chip) Spidergon Topology + IPU (Interconnect Processing Unit) Spidergon STNoC: an innovative technology
2.4
FUTURES EXAMPLES
NoC
Using GALS (Globally Asynch. Locally Sync.)
2.4
FUTURES EXAMPLES
Ambient Intelligence:
Many networked devices are integrated into the environment.
2.5
- Difficulties in HW/SW co-design. - Multi-careers co-ordination - Linux: + Open source + Unfamiliar with Windows users
Viet Nams reality: - Hardwares un-afordable (software only)
3.
SUMMARY
REFERENCE
[1] Arnold S. Berger - Embedded Systems Design- An Introduction to Processes, Tools and Techniques (CMP Books - 2002) [2] Craig Hollabaugh - Embedded Linux- Hardware, Software and Interfacing (Addison Wesley) 2002 [3] Auerbach - Embedded Linux System Design and Development (2006) [4] Newnes - Embedded Software - Know it all - Sep 2007 [5] Karim Yaghmour Building Embedded Linux Systems - 2nd edition - Aug.2008 (OReilly) [6] O'Reilly - Understanding The Linux Kernel (2000) [7] Prentice Hall - Embedded Linux Primer - a Practical RealWorld Approach 2006 [8] Prentice Hall- The Linux Kernel Primer A Top Down Approach for x86 and PowerPC Architectures 2005 [9] PETER MARWEDEL - Embedded System Design - Peter Marwedel -2006 (Springer) [10] Embedded System WEEK08_tutorial Slides [11] J. W. Donaldson - Porting MontaVista Linux to the XUP Virtex-II Pro development board - 2006 Embedded Systems & Embedded Linux