Linux Appliance Design

Book description

Modern appliances are complex machines with processors, operating systems, and application software. While there are books that will tell you how to run Linux on embedded hardware, and books on how to build a Linux application, Linux Appliance Design is the first book to demonstrate how to merge the two and create a Linux appliance. You'll see for yourself why Linux is the embedded operating system of choice for low-cost development and a fast time to market. Linux Appliance Design shows how to build better appliances-appliances with more types of interfaces, more dynamic interfaces, and better debugged interfaces. You'll learn how to build backend daemons, handle asynchronous events, and connect various user interfaces (including web, framebuffers, infrared control, SNMP, and front panels) to these processes for remote configuration and control. Linux Appliance Design also introduces the Run-Time Access library, which provides a uniform mechanism for user interfaces to communicate with daemons.

Learn to:

  • Separate your user interfaces from your daemons

  • Give user interfaces run time access to configuration, status, and statistics

  • Add professional network management capabilities to your application

  • Use SNMP and build a MIB

  • Build a web-based appliance interface

  • Build a command line interface (CLI)

  • Build a framebuffer interface with an infrared control as input

  • Manage logs and alarms on an appliance

Companion CD includes a prototype appliance-a home alarm system-that supports the book's lessons.

Table of contents

  1. Copyright
  2. ACKNOWLEDGMENTS
  3. INTRODUCTION
    1. What This Book Is About
    2. What This Book Is Not About
    3. Who Should Read This Book
    4. Why Use Linux?
    5. Linux Appliance Design
  4. APPLIANCE ARCHITECTURE
    1. UIs and Daemons
    2. The Architecture of the Laddie Appliance
    3. Summary
  5. MANAGING DAEMONS
    1. Common Approaches to Managing Daemons
    2. Control and Status Protocols
    3. Summary
  6. USING RUN-TIME ACCESS
    1. RTA Appliance Architecture
    2. RTA Daemon Architecture
    3. Telling RTA About Your Columns and Tables
    4. Building Your First RTA Program
    5. A Little SQL
    6. Introduction to RTA's Built-in Tables
    7. The RTA Table Editor
    8. Summary
  7. BUILDING AND SECURING DAEMONS
    1. How to Build a Daemon
    2. How to Secure a Daemon
    3. A Prototype Daemon
    4. Summary
    5. Further Reading
  8. THE LADDIE ALARM SYSTEM: A SAMPLE APPLIANCE
    1. Introduction to Alarm Systems
    2. A Functional Specification for Laddie
    3. Laddie's Hardware Design
    4. Laddie's Software Design
    5. Building and Testing ladd
    6. Summary
  9. LOGGING
    1. Do You Need Logging?
    2. Architecture of a Logging System
    3. syslog
    4. On-Demand Logging
    5. Summary
  10. LADDIE EVENT HANDLING
    1. Rationale for a New Event-Handling System
    2. Features and Capabilities of logmuxd
    3. Configuring logmuxd
    4. Examples Using logmuxd
    5. Summary
  11. DESIGNING A WEB INTERFACE
    1. Web Basics
    2. Establishing Requirements
    3. Choosing a Webserver
    4. UI Design
    5. Implementation
    6. Improving Our Design
    7. Resources
    8. Summary
  12. DESIGNING A COMMAND LINE INTERFACE
    1. Why You Need a CLI
    2. Types of CLIs
    3. Giving Users Access to a CLI
    4. The Laddie CLI
    5. Code Review for the test Command
    6. Summary
  13. BUILDING A FRONT PANEL INTERFACE
    1. Buttons, LEDs, and LCDs
    2. Designing a Front Panel UI
    3. The Laddie Front Panel
    4. Improving Our Design
    5. Summary
  14. DESIGNING A FRAMEBUFFER INTERFACE
    1. How Video Memory Works
    2. The Linux Framebuffer Device Driver
    3. Graphics Libraries
    4. "Hello, world!" with SDL
    5. Graphical UI Toolkits
    6. The Laddie Framebuffer UI
    7. Summary
  15. INFRARED REMOTE CONTROL
    1. Communicating with Infrared Light
    2. Hardware for Remote Control Receivers
    3. Installing and Configuring LIRC for the Laddie Appliance
    4. Summary
  16. HANDS-ON INTRODUCTION TO SNMP
    1. A Quick Note on Terminology
    2. The Software
    3. Installing SNMP
    4. Exploring with SNMP
    5. Writing Values with SNMP
    6. SNMP Traps
    7. Summary
  17. DESIGNING AN SNMP MIB
    1. Our Goal
    2. Your Enterprise Number
    3. The MIB Files
    4. LADDIE-GROUP-SMI
    5. Creating the LAD-MIB
    6. Validating Your MIB
    7. Summary
  18. IMPLEMENTING YOUR SNMP MIB
    1. The Net-SNMP Agent
    2. The MIB Skeleton: mib2c
    3. The Header File: ladProject.h
    4. The Code File: ladProject.c
    5. Makefile Revisited
    6. Debugging
    7. Traps
    8. Summary
  19. RTA REFERENCE
    1. Overview of RTA
    2. RTA Constants
    3. Data Structures
    4. API Subroutines
    5. SELECT and UPDATE Syntax
    6. Internal RTA Tables
    7. Debug Configuration
    8. Error Messages
    9. Callback Routines
  20. REVIEW OF SNMP
    1. Why SNMP?
    2. Agents and Managers
    3. Namespace, Grammar, and Protocol
    4. The MIB
    5. The OID
    6. MIB-2
    7. The SMI
    8. The SNMP Protocol
    9. SNMPv1, SNMPv2, and SNMPv3
    10. SNMP Data Types
    11. SNMP Tables
    12. Defining New Types
    13. Structure of a MIB File
    14. Summary
  21. INSTALLING A FRAMEBUFFER DEVICE DRIVER
    1. Finding Framebuffer Device Drivers for Your Video Card
    2. Configuring the Framebuffer Device Driver
  22. A DB-TO-FILE UTILITY
    1. Overview
    2. Table Definitions
    3. A tbl2filed Example
    4. Security Notes
  23. THE LADDIE APPLIANCE BOOTABLE CD
    1. Running the Laddie Appliance
    2. Exploring the CD Contents
    3. Rebuilding the Laddie Appliance
  24. COLOPHON
  25. Index

Product information

  • Title: Linux Appliance Design
  • Author(s): Bob Smith, John Hardin, Graham Phillips, Bill Pierce
  • Release date: March 2007
  • Publisher(s): No Starch Press
  • ISBN: 9781593271404