embedded linux

31
Ascendco Scientific, Inc. www.ascendco.com page 1 Embedded Linux Using Pee Wee Linux Presented by Randy Torgerson Ascendco Scientific, Inc for Linux System Administrators June 3, 2002

Upload: umnainar

Post on 20-Nov-2014

83 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 1

Embedded LinuxUsing Pee Wee Linux

Presented by

Randy Torgerson

Ascendco Scientific, Incfor

Linux System Administrators

June 3, 2002

Page 2: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 2

Who is Ascendco Scientific, Inc?We are engineering consultants that design hardware and software for embedded systems products. Our expertise is in x86, PowerPC, ColdFire, ARM, and microcontroller systems running Linux, VxWorks, or custom software.

Page 3: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 3

Embedded Linux What is an Embedded System? An Embedded System is any computer system

or computing device that performs a dedicated function or is designed for use with a specific embedded software application Examples: ATM, Microwave, Tivo

May or may not have an operating system Designed to run specific tasks Generally has just enough resources for the

tasks that are to be run

Page 4: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 4

Embedded Linux Definitions

RTOS ­ Real Time Operating System

Deterministic ­ The ability to respond to an event within a specific amount of time

Preemptible ­ The ability to have a process interrupted by a higher priority process

Task Scheduler ­ The part of the kernel that determines what other processes will run and when

Page 5: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 5

Embedded Linux RTOS

Hard Real Time Deterministic

Missed events can have catastrophic results

Soft Real Time Not deterministic

Can tolerate missed events

Real Fast High throughput

Linux is not Real Time . . . yet

Page 6: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 6

Embedded Linux Linux is not Real Time

Kernel is not preemptible

Task scheduling is not priority based

RTLinux and RTAI runs Linux as a process under a proprietary real time kernel

Hardhat Linux uses the preemptible Kernel

Preemptible Kernel maybe integrated into Kernel release 2.6

Page 7: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 7

Embedded Linux Embedded Linux Toolkits

Pee Wee Linux

HardHat Linux from Monta Vista

BlueCat Linux from Lynux Works

The Embedded Debian Project

Embedded DevKit from Red Hat

Linux Router Project

Page 8: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 8

Home Automation Project Objectives

Lighting Controller using X­10 powerline interface

AC Energy Monitoring using custom energy monitoring board

Security Camera

Web Interface for remote access and control

Learn Embedded Linux

Page 9: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 9

Home Automation Project Why LxSA and Embedded Linux

Most problems have been with configuring the development station and not on the client

With Embedded Linux you will get a good understanding of the internals of Linux

Working on the small Linux system allows for in-depth understanding of the boot process and file system

Page 10: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 10

Home Automation Project Development System

Dell 866 MHz Pentium III with 128MB

Redhat Linux 7.1 with KDE desktop

USB CompactFlash Adapter ­ Allows for quick update of target file system

Page 11: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 11

Home Automation Project ABIA Tech FB2310 All­In­One

PC/104 single board computer. 386SX, 40MHz, 4MB RAM

64MB CompactFlash Disk on a IDE to CompactFlash adapter board

Two Serial Ports, Parallel Port 10baseT Ethernet Sockets for 1.5MB Flash Video is provided by an

Orchid Prodesigner IIS ISA card and a PC/104 to ISA Adapter

Page 12: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 12

Home Automation Project Target Software

PeeWee Linux with Kernel 2.2.17

The web server is thttp

The current image is 3.9MB and will be reduced as unneeded tools are removed

The Kernel will also be compiled to run in place and put in the 1.5MB Flash sockets

Page 13: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 13

Home Automation Project Problems

gcc 2.96 with Redhat 7.1 cannot compile the 2.2 kernel, must use kgcc

Must use the compatibility libraries: compat­glibc, compat­egcs, compat­libs, compat­libstdc and run script before compiling

Path on development system get corrupted during boot and prevents proper compiles PATH=/usr/kerberos/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bi

n:/home/randy/bin _=/usr/bin/env

Page 14: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 14

Pee Wee Linux Based on Redhat 6.2

Kernel 2.2.17­13

Can run on Redhat 7.1 or other systems with a little work.

Actively maintained and has an email group

i386, i486, Pentium I, II, and III targets only.

Uses Ncurses character interface.

Page 15: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 15

Pee Wee Linux Development Process

Write down what you want to accomplish

Select the Embedded Linux Tool kit that fits your needs

Install the tool kit on your development system

Proof the build process with a minimal project

Down load to the target and test

Add features and test

Page 16: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 16

Pee Wee Linux Project Development Process

Create custom kernel package

Configure custom file system

Extract the file system for project

Configure target hardware

Load file system onto target

Test features on target

Page 17: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 17

Pee Wee LinuxSystem Menu

Page 18: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 18

Pee Wee Linux Project Creation

Start with one of the examples

Use pre­compiled or custom kernel

Custom Kernel Run Menuconfig and select the options as necessary

Get the Linux Kernel HOWTO

Compile the kernel

Create the custom kernel package

Page 19: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 19

Pee Wee LinuxConfigure Files Menu

Page 20: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 20

Pee Wee Linux Packages

Select the packages to build into the system Kernel or custom kernel

Networking

Shells

System Administration

X Windows

System files

Page 21: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 21

Pee Wee LinuxConfiguring Project File System

Page 22: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 22

Pee Wee Linux Extract the file system for the target

Can include custom files

Custom files have preference over default files for the same target location and file name

Page 23: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 23

Pee Wee LinuxResults from Extract File System for Project

Page 24: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 24

Pee Wee Linux

Extract the file system to target

Can be a hard disk or CompactFlash

For small systems can be floppy disk

CompactFlash is the easiest to use

Easy to experiment to find what works best

Page 25: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 25

Pee Wee LinuxConfigure Target Hardware

Page 26: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 26

Embedded Linux What have I learned

4MB RAM is barely enough memory for Linux with networking

8 or 16 MB RAM would allow for the less efficient, memory wise, 2.4 kernel

Network boot would speed up development but CompactFlash is very easy to set up and use

All the tool kits have some rough edges

Page 27: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 27

Embedded Linux Resources

Embedded Linux by John Lombardo

New Riders Publishing

Good introduction to Embedded Linux, doesn't make a lot of assumptions

Projects are too simplistic

Page 28: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 28

Embedded Linux Resources

Embedded Linux: Hardware, Software, and Interfacing by Craig Hollabaugh

Assumes you know what you are doing

Many gross errors that makes all material suspect

Page 29: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 29

Embedded Linux Resources

Practical Linux Programming: Device Drivers, Embedded systems, and the Internetby Ashfaq A. Khan

Includes CD­ROM and runs under Redhat 7.1 or higher

Page 30: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 30

Embedded Linux Resources

Embedded Linux Journal

Interesting articles

Will no longer be published as a standalone magazine. Will be a section in Linux Journal

Articles are available at embedded.linuxjournal.com

Page 31: Embedded Linux

Ascendco Scientific, Inc.www.ascendco.com page 31

Embedded Linux Resources

Web sites

linuxdevices.com

embedded.linuxjournal.com

google.com/linux

embedded.adis.on.ca for Pee Wee Linux