Unit OS 9: Embedded Systems with Windows XP Embedded
Download
Report
Transcript Unit OS 9: Embedded Systems with Windows XP Embedded
Unit OS9:
Real-Time and Embedded Systems
9.3. Embedded Systems with Windows XP Embedded
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze
Copyright Notice
© 2000-2005 David A. Solomon and Mark Russinovich
These materials are part of the Windows Operating
System Internals Curriculum Development Kit,
developed by David A. Solomon and Mark E.
Russinovich with Andreas Polze
Microsoft has licensed these materials from David
Solomon Expert Seminars, Inc. for distribution to
academic organizations solely for use in academic
environments (and not for commercial use)
NOTE: slides in this module are based on the Windows
XP Embedded Training course materials from the
Microsoft Curriculum Repository; see:
http://www.msdnaacr.net/curriculum/Default.aspx?I
D=6217
2
Roadmap for Section 9.3
Windows XP Embedded Design Goals
Development Tool Support
OS Configuration Process Overview
XP Embedded vs. Windows CE
XP Embedded Enabling Features
3
Windows XP Embedded Design Goals
Binary Compatibility with Windows XP
Rich Operating System Functionality
Small Operating System Size
Modular and Compact
Embedded Enabling Features
Development Tool Support
4
Binary Compatibility with Windows XP
Windows API Support
By including the proper components in a build, any application
that can run on Windows XP can also run on Windows XP
Embedded
Windows Driver Model (WDM)
Allows the use of existing Windows XP drivers on a Windows
XP Embedded build
Componentized XP Functionality
Includes a database containing components
Components contain all the necessary information required for
the development tools to include their specific functionality
into the operating system
5
Rich Operating System Functionality
Features of Windows XP - built on Windows
NT/2000/XP code base
Protected Memory Model
Scalable Memory / SMP Support
Security
Multimedia support
Management
Communications / Networking support
6
Small Operating System Size
Kernel Baseline Configuration
Kernel, No Network, No Explorer Shell
~5 MBytes of Disk Space
Minlogin
Networking Support, Shell
~15 MBytes of Disk Space (12MBytes NTFS compressed)
Winlogon
~56 MBytes of Disk Space (37MBytes NTFS compressed)
7
Modular and Compact
Componentized Windows XP
Components created during development
What is a component?
The smallest individually selectable piece of functionality that can be
included or excluded from a run-time image.
10,000+ Components in Component Database
Example of Components:
MatroxMillennium G400 (Display Adapter)
Basic TCP/IP Networking (Networking and Communication)
Explorer Shell (User Interface)
Component Groups
Display Adapters
Network Protocols
Network Adapters
Tools and Utilities
8
Development Tool Support Windows Embedded Studio
Target Designer
Builds custom operating system
Component Designer
Customize and expand the capabilities of the operating system
Component Database Manager
Provides management functions for the component database and
the repositories
Development Utilities
Target Analyzer
Used to discover target hardware
BootPrep
Used to prepare target media
9
Windows Embedded Studio
Installation Options
Supported Installation Scenarios
Standalone User Install
Tools Only Install
Shared Component Database Install
The complete product is contained in two separate
installation packages
1.
Tools Installation Package
2.
Component Database Installation Package
10
Windows Embedded Studio
Detecting Target Hardware
TAP.exe
Most functional Target Analyzer probe
Runs only on Windows 2000 or XP
Generates a small hardware definition file
TA.exe
Basic Target Analyzer probe
Runs on MS DOS (via boot floppy disk)
Generates a small hardware definition file
11
Windows Embedded Studio
Component Designer
Primary tool used to author custom components
Generates a ‘Component Definition’ file (.SLD)
Captures file, registry, and dependency information for a
discrete set of functionality
Importing of .INF files is supported for easy creation of
driver components
12
Windows Embedded Studio
Component Database Manager
Provides functionality to allow management of the
component collection
Allows importing of .SLD files into the database (for Target
Designer use)
Management of Repository locations
Management of Component Packages
View complete database contents
Change the Component Database Server name
13
Windows Embedded Studio
Target Designer
Target Designer is the tool used to build runtime images
Generates a ‘Configuration’ file (.SLX)
Import a hardware definition file
Matches components in the database with PnP IDs found by
TAP/TA and adds them to the configuration
Disable non-critical devices in the configuration
Can significantly reduce footprint by removing devices (and their
associated dependencies) from the runtime image
14
Design Templates
Project Starting Points
Advanced Set Top Box
Basic Set Top Box
Digital Set Top Box
Home Gateway
Information Appliance
Kiosk/Gaming Console
Network Attached Storage
Retail Point of Sale Terminal
Windows Based Terminal Professional
15
Target Analyzer
Process Overview
Target Designer
Base OS configuration
Auto-generated
Add Features to
Base OS Config
Add your components:
Component Designer
>10,000 individual
components
Macro Components
Design Templates
.SLD’s contain information for
component to “build itself”:
Properties, Resources, etc.
Auto-conversion of .INF’s
Check
Dependencies
Verify relationships,
add/delete components
Build order established
Task Lists
Build Process
Ensures components built in
right order
Allows special case logic and
fully scripted build process
Runtime
OS
Image
16
XP Embedded vs. Windows CE 3.0
Feature
Windows XP
Embedded
Windows CE 3.0
Disk Space
5MB -56MB
500 k –16MB
API Support
Full Windows API
Best of Windows API
plus CE Specific
enhancements
CPU Support
x86
x86, MIPS, SHx, ARM,
PPC
Device Drivers
100% compatibility with
XP Professional
Fine-tuned for size
derivative of NT Driver
Real-Time
Required 3rdParty AddOns
Yes
Development Tools
Target Designer and
Component Designer /
Visual Studio
Platform Builder / eMVT
17
XP Embedded Target System Requirements
Intel Pentium II or higher CPU required
ACPI PnP BIOS recommended
Storage
Flash / DiskOnChip/ CD-ROM
5 MB Minimum (depends upon functionality)
Memory Requirements
64 MB Minimum (depends upon functionality)
18
Application Development
Utilize existing off-the-shelf applications
Full Windows API support
Little or no porting required
Rapid application development
Use familiar tools to write applications
19
Embedded Enabling Features
Alternative Non-Volatile Boot Media
CD-ROM, DiskOnChip, Flash
Enhanced Write Filter Technology
Allows the Windows XP Embedded operating system to boot from
any read-only media
Remote Management
Facility that can be used to acknowledge system error dialogs without
requiring user interaction
Headless Operation
Install, configure, maintain and run diagnostics on the system in a
manner that does not require user intervention
Custom Shell
Allows the default shell to be replaced with another application
20
Headless Operation
A system without Display, Keyboard, Mouse
Null Driver required
Must be supported by BIOS
Replace user input from the console with another input method
Operating system and Applications may still create message boxes
Solution: System Message Interception
Management
Solution: Remote Administration
Required Components:
Headless VGA Driver -or- Terminal Services Core
VGA Boot Driver Component
21
System Message Interception
Acknowledges message box
Selection of default reply
Re-direct to Event Log
Custom Application
22
System Message Interception
(Continued)
Intercept message boxes only
Provided by User32.dll
Requires proper registry settings
Write a custom service to monitor all windows
Build a Windows Service to scan desktop
23
Enhanced Write Filter
Allows booting from readonly media
Protects operating system
partition
Not necessary to redesign
applications
Enhanced Write Filter Overlays
EWF redirects information from the disk to overlays
If the information redirected to the overlay is later
requested, it is obtained from the overlay instead of from the
actual protected media
Enhanced Write Filter Components
24
Overlay Options
EWF can be configured by applying to multiple volumes,
each of which may have multiple overlays
Disk Overlay
Using EWF Volume
EWF Master Volume Table, Overlay stack and Overlay data are
stored in the EWF volume
After reboot information retained
RAM Overlay
Enables stateless operation –After reboot all changes lost
Run without any read/write storage
25
Enhanced Write Filter Settings
EWF Volume Settings
Specify the number of protected volumes, the maximum
number of overlay levels, the EWF partition size, and whether
overlay configurations are stored in the system registry or in
the EWF partition
Protected Volume Settings
Enable Lazy Write
Optimal Performance
Use less overlay space
Use less overlay space & less writes
26
Bootable CD-ROM & Flash Media
Bootable CD-ROM appears as a hard-drive
Requires:
A BIOS which supports the El Torito Spec.
El Torito Component
Enhanced Write Filter Component
DiskOnChip
Requires: “M-Systems DiskOnChip2000” Component
CompactFlashTM, PCMCIA Flash cards, flash drives
Appear as an ATA drive
Requires no special components
Enhanced Write Filter / FAT File System recommended
27
Remote Management
Telnet Server
Provides a gateway for Telnet clients
When Telnet Server is running on a computer, users can use Telnet clients to
connect to it from a remote computer
FTP Server
Used to copy files to and from remote computer systems on a network using
TCP/IP, such as the Internet
Remote Desktop –Terminal Services
Provides remote access for the desktop of a computer that is running Terminal
Services
Windows Management Instrumentation (WMI)
Provides management information and control in an enterprise environment
Simple Network Management Protocol (SNMP)
Configures remote devices, monitor network performance, audit network
usage, and detect network faults or inappropriate access
28
Shell Customization
Windows XP Embedded allows you to have the
system use a custom shell
Explorer Shell
Command Shell
Task Manager Shell
Building Custom Shell Components
29
Further Reading
James Beau Cseri, Windows XP Embedded Step by
Step: Hands-On Exercises for Real World Engineering,
Annabooks/RTC Books, 2003.
Sean D. Liming, Windows XP Embedded Advanced,
Annabooks/RTC Books, 2003.
Mark E. Russinovich and David A. Solomon,
Microsoft Windows Internals, 4th Edition, Microsoft
Press, 2004.
Chapter 2 - System Architecture (from pp. 35)
30
Source Code References
Windows Research Kernel sources do not
include Embedded XP-specific components
However, since Embedded XP uses the same
kernel image (Ntoskrnl.exe) as XP, the kernel
sources in \base\ntos are applicable
For more specific source code references, see the
last slide in the relevant CRK units
31