1. 1/41
Advancement on
Embedded System
Design (Linux)
Professor Dr R. Badlishah Ahmad
Universiti Malaysia Perlis (UniMAP)
2014
http://www.researchgate.net/profile/RBadlishah_Ahmad
2. 2/41
Contents
Embedded Operating System
FOSS
Embedded System
Embedded Operating System (OS)
Advantages For Developers
Hardware: Single Board Computer (SBC)
Advantages of using SBC
GNU/Linux – Advantages & Samples
Example – Smart Camera
Challenges for New Developers
Conlusion
3. 3/41
Embedded Systems
Embedded System Definition: Wikipedia definition: “a
special-purpose computer system, which is completely
encapsulated by the device it controls”
– Never meant to be traditional, general purpose
computers
– Examples: mobile phones, home multimedia, network
appliances, transportation or industrial control...
– Use a general purpose processor (most popular ones:
arm, x86, ppc) or even a much simpler
microcontroller.
See http://en.wikipedia.org/wiki/Embedded_system
4. 4/41
Embedded Market
In embedded systems,
Free/Open Source
Software (FOSS)
systems ate a significant
portion of the market of
traditional proprietary
systems.
5. 5/41
Embedded Operating System
Embedded Operating System (EOS) is a software
program that manages all other programs in
embedded devices
EOS is a small OS designed to operate with
embedded devices to perform certain tasks which
control effectively all the hardware components
~50MB http://www.damnsmalllinuxdamnsmalllinux.org/
6. 6/41
Embedded Operating System
Real-Time & Non Real-Time (commercial!!)
QNX, DOS, Windows CE, LynxOS
VxWorks
PSOS
RTLinux
Other Choices?? FOSS based OS
create your own? Yes, modify GNU/Linux
kernel!!!! FREE
7. 7/41
Linux
The most popular.
Very big and active developer community
Supports many architectures, devices and
protocols
Minimum requirements: 32 bit processor, 2 MB of
RAM, 1 MB of storage space (can even fit in 500
KB!)
License: GNU GPL
Kernel code: use with care to avoid license
violations.
Great for Linux users though (more free code!)
8. 8/41
NetBSD
http://netbsd.org
Highly portable BSD system.
Supports many architectures and embedded boards!
Smaller community but very active too!
Minimum RAM and storage requirements should be similar to
those of Linux
License: BSD. No worries with license violations, but doesn't
require driver code to be free (some drivers kept proprietary?)
See http://foss.in/2005/slides/netbsd-linux.pdf
for a very nice comparison between Linux and NetBSD
9. 9/41
eCos
http://ecos.sourceware.org/
Very lightweight real-time embedded system
contributed by Red Hat / Cygnus solutions.
Compatible with most Unix and Linux applications.
For extremely small systems: supports 16 bit processors, and a few
hundreds of KB of RAM and storage (like 300 KB) are more than
enough.
Kernel + applications can even fit within 50 KB (minimalistic
system)!
License: GPL (with minor adjustments)
10. 10/41
uClinux
http://uclinux.org/ (pronounce “You See Linux”)
Linux for micro controllers, processors with no MMU
Mainly used for very small and low cost
embedded systems
Kernel: originally a Linux kernel derivative.
Now more and more closely integrated in mainstream
Linux
Applications: standard embedded Linux applications with
patches to address special memory constraints
11. Computer vs. Embedded Linux
Linux kernel
GNU C library
libjpeg, libstdc++, libxml, libvorbis...
ls, vi, wget, ssh, httpd, gcc...
Web browser, office, multimedia...
Command
line utilities
Kernel
C library
Shared
libraries
User
interface
Traditional GNU/Linux system Embedded Linux system
uClibc
Much lighter
than GNU libc!
libjpeg, libstdc++, libxml, libvorbis...
busybox
(ls, vi, wget, httpd...)
dropbear (ssh)...
Much lighter
implementations!
No development tools
Linux kernel
Custom interface
Lightweight kernel
with only needed
features and drivers
Full kernel with most features
and with drivers for all kinds
of PC hardware on the planet!
Graphics,
web browser,
web server...
13. 13/41
Innovation and Added Value
Lots of ready-to-use components for most parts of the system
Focus on the innovative part of your product, what
differentiates it
No need to wait for months or years for some features to be
implemented by others
– can implement the critical ones that you need
Constant innovation
Features brought in at a quick pace, sometimes even before
you need them!
Possible to port Linux to a new innovative architecture
(processors)
18. 18/41
When & Why to use SBC
Faster Time to Market
Proven design by vendor -> reliable design and
reduce risk of defect
More vendor choices (different size, functions and
price options
Lack of resources (hardware designer)
Lack of manufacturing capabilities
19. 19/41
Advantages of using SBC & FOSS
Faster speed development
Reduce development speed
Increasing clock speed
Capabilities of using Open Source Software
(OSS)/Free Software (FS)
Support high level programming
20. 20/41
When & Why to use SBC
Faster Time to Market
Proven design by vendor -> reliable design and
reduce risk of defect
More vendor choices (different size, functions and
price options
Lack of resources (hardware designer)
Lack of manufacturing capabilities
21. 21/41
FOSS
Free Software/Open Source Software
A type of software defined by its collaborative
development model, accessibility of code and
distribution models.
– Examples of FOSS: GNU/Linux kernel,
GNU Compiler Collection (GCC), Open Office,
GIMP (Image Editor), Wireshark etc.
In contrast with proprietary software which is only
available in a binary “closed” format & typically
carries a licence fee
– Examples : M$
22. 22/41
FOSS
Free Software grants the below 4
freedoms to the user:
The freedom to run the program, for any
purpose
The freedom to study how the program
works,
and adapt it to one's needs
The freedom to redistribute copies to
help others
The freedom to improve the program,
and release one's improvements to the
public
See
http://www.gnu.org/philosophy/free-sw.html
23. FOSS - Unix family tree
Time1970 19901980 2000
Bell Labs (AT&T)
Ken Thompson
Dennis Ritchie (C language
created to implement a portable OS)
BSD (Berkeley Software Distribution)
Sun Solaris
SunOS (Stanford University Network)
NetBSD
NextStep
AIX (IBM)
HPUX
IRIX (SGI)
SRV5
OpenBSD
FreeBSD
MacOS X
Bill Joy
Richard Stallman Linus Torvalds
BSD family
System V family
Ritchie, Thompson
GNU
Bill Joy
GNU / Linux
24. 24/41
GNU/Linux
Unix-based OS originally developed for Intel-
compatible PC's
Modern OS -> include features such as virtual
memory, memory protection and preemptive
multitasking
Support TCP/IP for de-facto Networking
Good Thing!!!! Source code available!!! (Open
Source/Free Software)
25. 25/41
GNU/Linux
Embedded Linux is increasing due to ability to
modify subsystem code to suit their designs
Support Portable Operation Interface (POSIX) ->
easy to port existing code to different processor
architecture
NOW!! GNU/Linux are available for x86, SPARC,
ARM, PowerPC, MIPS etc....
26. 26/41
GNU/Linux Advantages
Robust Features – multi-threaded, multi-functions
Scalability – can run on flash cards and boards to
PCs and larger system
Widespread acceptance – community of
programmers available
Low Cost – NO ROYALTIES!!!!
30. 30/41
Example : Smart Camera
A sample of Embedded GNU/Linux developed in
UniMAP potential for projects such as:
✔ Video Wireless Sensor Network (VWSN) for
Traffic Surveillance System
Using GNU/Linux & Free Software tools (GCC)
Using TS5500 SBC Board
Development tasks:
✔ Integrating Web Camera
✔ Developing software for image capture, image
conversion, image manipulations and socket
programming
31. 31/41
Smart Camera
Situation awareness is the key to security and safety
Traffic operators are assigned the task of visual
monitoring and threat detection process which is
tedious and error prone for a human investigator
32. Introduction
Problems: Inefficient network monitoring
●
traffic operators are burden with visual monitoring task, therefore a
threat detection process would be ineffective, unreliable and prone to
error
●
the presence of stationary vehicle on the road, especially at a critical
places could cause a secondary crashes, traffic congestion and other
traffic incident.
Therefore, there is a NEED of a vision system to give earlier
detection and notification of stationary vehicle to the
security personnel or traffic operator on the events
33. Objective
To develop, integrate, configure and analyze the performance of
Embedded Vision System for stationary vehicle detection utilizing
GNU/Linux and Single Board Computer
34. System Overview
Network
SBC
Monitor
Alarm
USB Webcam
Supervision Center
Smart Camera
utilizing SBC as a processor and
Logitech Quickcam Pro 4000 web
camera as an image sensor.
Task : to monitor road conditions
and detect stationary vehicle
inside the monitoring area.
If the object of interest is
detected on the scene, the
system will notify the operators
by transmitting the image to the
supervision center.
35. Hardware
SENSING UNIT
LOGITECHQUICKCAMPRO4000
●
VGA-sized (640x480 pixel) CCDsensor
●
capture video at maximum 30 frames
persecond.
●
driverused : pwc-8.8 &usb-pwcx-8.2.2
PROCESSING &COMMUNICATION UNIT
TS-5500 SINGLEBOARDCOMPUTER
AMDElan 520 processor (133 Mhz)
32 MBRAM
10/100 Base-TEthernet port
36. Software Module
Divided into 3 modules:
✔ Module1: ImageAcquisition
✔ Module2: ImageProcessing and Object Detection
✔ Module3: DataTransmission
38. Performance Analysis
Specification Desktop PC SBC
Processor Type Intel(R) Pentium(R) 4 CPU AMD Elan 520
Processor Speed 2.66 GHz 133 MHz
RAM Size 512 MB 32 MB
Operating System Mandriva 2006 TS-Linux
Smart Camera Operation
Platform
Overall Processing
(s)
Desktop PC 6.09
TS-5500 SBC 38.82
39. 39/41
Challenges for Developers
Understanding system & file structure
Revising programming skill in C/C++ for socket
programming, shell programming & database
Ability to do various system configuration using CLI
Understanding cross compiling process & techniques
Difficulties to integrate external devices such as Webcam,
touchscreen etc.. :Kernel version mismatch!!
Difficulties to compile on the SBC!! programming are done
on a host PC
Execution problem on SBC board due to library mismatch
between host PC and SBC
Limited/No Technical support
40. 40/41
Conclusion
Embedded GNU/Linux and the use of SBC can be extended
into many more fields such as automation, robotic, firewall,
intrusion detection system, carried grade telecommunication
and network devices
The availability of FOSS, Linux kernel and GNU application
development tools, ANY applications or system can be
build!!!!
Wide opportunities for other embedded system development
Exercise your FREEDOM by using FOSS
Technology is HERE, Human Resource?