Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Building Custom Windows Embedded Xp Operating System using Windows Embedded Studio

0.00/5 (No votes)
14 Dec 2005 1  
This Article discuss about windows embedded Studio and how to develop custom windows embedded xp operating system for a device using Microsoft Embedded Studio

1. Introduction

This article discuss about windows embedded SDK and how develop custom windows embedded xp operating system (Evaluation copy) for a device using Microsoft Embedded Studio (Windows Embedded XP SDK). (In my case I have choosen my desktop system as device and build the windows embedded operating system for it). The Desktop window for the embedded xp os is as follows.

2. Installation

We can download Microsoft Windows Embedded Xp SDK using following link

http://www.microsoft.com/windows/embedded/eval/default.mspx

3. About Windows Embedded XP SDK

Windows Embedded Studio contains following tools.

  • 3.1  Component Database
  • 3.2 Target Designer
  • 3.3 Component Designer
  • 3.4 Component Database Manager

3.1 Component Database:

  • A database containing component definitions and other supporting data.
  • The component database contains the definitions of platforms, components, and their supporting data. It is implemented as a SQL Server database and can reside on the local development machine or on a server to be shared by multiple Windows Embedded Studio users.
  • Data for the component database is created by using Component Designer to create an .sld file. An .sld file contains component and related definitions. Data is entered into the component database by using Component Database Manager to read the contents of the .sld file and insert the component definitions. This procedure is known as importing data into the component database or simply importing an .sld file.

3.2 Target Designer

  • A tool to customize run-time images using components selected from the database and to assemble the actual run-time image.
  • Target Designer is the tool you use to customize and produce the run-time image that is deployed on the embedded device. An image is customized using a configuration. A configuration is essentially a bill-of-materials that defines the exact contents of a custom run-time image. When a configuration is completed, it can be built into a run-time image. The build process does not actually compile any source files; it creates the directory structure in a specified location and copies the exact binary files needed for the run-time image. The contents of the directory structure can then be moved to the target device and booted.
  • A configuration is customized by selecting components from the database and then resolving any dependencies on other components. Target Designer can automate most of the dependency resolution and will only require manual intervention to resolve ambiguities. For example, you may be prompted to choose one of several available display drivers. Some components also allow setting parameters to determine their exact feature set in the run-time image.
  • A configuration is stored in an .slx file that can be loaded and edited as needed. Once a configuration is complete, it can always be used to rebuild the same target image.

3.3 Component Designer

  • A tool to create component definitions.
  • Component Designer is the tool you use to create new component definitions for your own software and store them in an .sld file. You use Component Designer to create and edit components and their resources and dependencies, groups, and repositories.

3.4 Component Database Manager

  • A tool to import component definitions into the database.
  • Component Database Manager is the tool you use to import component definitions and related data into the database, browse the database, and delete components from the database.

4. Build the Run Time Image

Following major steps to create a run-time image:

  • 4.1  Set up the Development System
  • 4.2 Create a Component for Target Devices
  • 4.3  Create a New Configuration
  • 4.4  Update Configuration Settings
  • 4.5  Check Dependencies
  • 4.6  Build the Windows XP Embedded Run-Time Image
  • 4.7  Deploy the Windows XP Embedded Run-Time Image

4.1 Set up the Development System

4.1 Set up the Development System

you configure your system to support the deployment of a Windows XP Embedded image by adding a second hard disk or another partition to your system. The first disk is for Windows XP Professional and the Windows XP Embedded tools. The second disk or another partition is where your Windows XP Embedded OS image will be deployed.

  1. After installing Windows XP Professional and Windows XP Embedded tools, turn off the system.
  2. Right-click My Computer and choose Manage. The Computer Management window opens.
  3. Select Disk Management from the Computer Management console tree. The Logical Disk Manager displays the available media on your system.
  4. Right-click the unallocated space of the new hard disk (disk1) and select New Partition. Use the New Partition Wizard to create a primary partition, formatted for NTFS.
  5. Access and edit your Boot.ini file, adding a line for the second hard disk. The Boot ARC path changes according to the IDE port to which the hard disk is configured. The Boot ARC path to add for this tutorial is multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect. For example, see the following Boot.ini file:
        [boot loader] 
    
        timeout=30 
    
        default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS 
    
        [operating systems] 
    
        multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=
           "Microsoft Windows XP Professional" /fastdetect 
    
    multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect

4.2 Create a Component for Target Devices

After your system is configured to support the deployment of a Windows XP Embedded image, you can create a devices component. The device component includes support for all the hardware attached to your system, including device drivers for video, networking, and so on.

  1. Navigate to the Program Files\Windows Embedded\Utilities direcotry
  2. Run Tap.exe.  ( tap.exe -à 32 bit support  ; ta.exe -à 16 bit support)
  3. Run Component Designer.
  4. From the File menu, choose Import.

    The Choose File for Import dialog box appears.

  5. In the file list, choose Devices.pmq file and then choose Open.

    The Import File dialog box appears.

  6. Choose the Start button to import the Devices.pmq file into Component Designer.

    It can take several minutes for the entries in the Devices.pmq file to be matched with the device drivers available in the database.

  7. Choose the Close button when the import finishes.

    The Devices.sld file appears in the SLD browser pane.

  8. From the File menu, choose Save to save the .sld file.
  9. From the Tools menu, choose Component Database Manager.

    The Component Database Manager opens.

  10. Choose the Database tab, and then choose Import.

    The Import SLD dialog box appears.

  11. Browse to the Devices.sld file, choose it, and choose Open.
  12. Choose Import.

    The .sld file is added to the database and the devices component is added to the database.

  13. Close the Import SLD dialog box and the Component Database Manager.
  14. Close Component Designer.

You are now ready to create a new configuration.

4.3 Create a New Configuration

After creating a devices component, you can start building your run-time image. In Target Designer, you add components to your configuration. A configuration is a collection of components that constitutes a Windows XP Embedded OS image.

After creating a devices component, you can start building your run-time image. In Target Designer, you add components to your configuration. A configuration is a collection of components that constitutes a Windows XP Embedded OS image.

  1. Run Target Designer.
  2. From the File menu, choose New.

    The New Configuration dialog box appears.

  3. Type in a configuration name, for example, MySystem, and choose OK.

    The MySystem.slx configuration appears in the configuration editor.

  4. From the Component Browser, drag the devices component to the configuration editor pane.

    The devices component is added to the configuration.

  5. In the Search box, type Explorer Shell and choose the Search icon.

    The Explorer Shell component, located in the Software\System\User Interface\Shells\ node, is highlighted in the component browser.

  6. Drag the Explorer Shell component to the configuration editor pane. The Explorer shell is added to the configuration.
  7. Using the same technique, add the following components:

    Note   Search starts from your last selected node in the component browser, and searches down from there. Select the top-level node in the component before choosing the Search icon.

    • NTFS (Software\System\System Services\Base node)
    • NT Loader (Software\System\System Services\Base node)
    • NTFS Format (Software\System\Storage & File Systems\Applications node)
    • Language Support to choose a default language component (Software\System\International\Infrastructure node)
    • User Interface Core (Software\System\User Interface\Shells\Windows Shell)

You are now ready to update the configuration settings

4.4 Update Configuration Settings

After creating your run-time image, there are several configuration settings that you must update, depending on the requirements of your run-time image and the target device.

  1. Expand the User Interface Core component in the configuration browser and choose Settings.

    The User Interface settings appear in the details pane.

  2. Select the following check boxes:
    • Show My Computer on Start Menu
    • Show Desktop icons
    • Show Help and Support on Start Menu
    • Show Control Panel on Start Menu
    • Show Network Connections on Start Menu
    • Show Search on Start Menu
    • Show Run on Start Menu
    • Show Log Off on Start Menu (default)
    • Show Shut Down on Start Menu (default)
    • Show Internet Explorer on Start Menu
    • Show All Programs list on Start Menu
    • Lock Task bar (default)
    • Use Windows Classic folders (default)
    • Enable Drag and Drop on Start Menu (default)
  3. At the top of the MySystem node in the configuration browser, choose Settings.

    The configuration settings appear in the details pane.

  4. Under Target Device Settings, choose Show.
  5. Type the correct values for the second hard disk where the Windows XP Embedded OS will be deployed. For example, a second hard disk, with the letter D: and boot arc path of rdisk(1)partition(1) would require the following values:
    • Boot drive: D:
    • Windows folder: D:\WINDOWS
    • Program Files folder: D:\Program Files
    • Documents and Settings folder D:\Documents and Settings
    • Boot ARC path: multi(0)disk(0)rdisk(1)partition(1) (default)
    • Boot partition size (MB): 5000
    • Partition cluster size (bytes): 4096 (default)

You are now ready to check the dependencies of your configuration.

4.5 Check Dependencies

After configuring your run-time image, check its dependencies before building.

  1. From the Configuration menu, choose Check Dependencies.

    The dependency check may run for a few minutes or longer, depending on the performance capabilities of your computer.

  2. When the dependency check has completed, choose Close.

    A task is added to the Tasks tab whenever more than one component is available to resolve a dependency.

  3. If there are no tasks, proceed to Step 6: Build the Windows XP Embedded Run-Time Image.

    - or -

    Double-click a task on the Tasks tab.

    The Resolve Dependency dialog box appears, and describes how many components must be selected to resolve the dependency, and listing the components available to do so.

  4. Select components to resolve this dependency and choose Add.
  5. Resolve all of the dependencies listed on the Tasks tab.

    Note   Resolving dependencies may introduce new dependencies.

  6. Run the dependency check again, resolving any additional tasks.

    Do this until no tasks appear on the Tasks tab.

  7. After resolving all dependencies, close the Dependency Check dialog box.

You now have a complete configuration that is ready to build into a run-time image.

4.6 Build the Windows XP Embedded Run-Time Image

After resolving all dependency issues for your configuration, you are ready to build it.

  1. In Target Designer, choose the Configuration menu, and then choose Build Target Image.

    The Build MySystem.slx dialog box appears.

  2. Verify that the build type is set to Release, and then choose Build.

    A message may be displayed about overwriting the contents of the Windows Embedded Images directory. Choose Yes to delete the directory contents.

    Build progress is displayed in the Build MySystem.slx dialog box.

  3. After the build completes, choose Close.
  4. On the File menu, choose Save.
  5. Close Target Designer when finished.

You are now ready to deploy your run-time image.

4.7 Deploy the Windows XP Embedded Run-Time Image

After the run-time image is built, it can be deployed.

  1. In Windows Explorer, navigate to your run-time build directory, for example, C:\Windows Embedded Images.
  2. Copy the contents of the build directory to your second hard disk.

    For example, select all the files and directories in the build directory and drag them to the D: drive.

  3. Restart your system.
  4. At the Microsoft Windows OS Selection prompt, select your second hard disk. For example, select Microsoft Windows XP Embedded.

    The Microsoft Windows XP Embedded splash screen is displayed and FBA starts.

  5. FBA reboots your system. At the Microsoft Windows OS Selection prompt, select to boot the second hard disk to complete the First Boot Agent phase.

    After the First Boot Agent phase is complete, you are automatically logged onto your Microsoft Windows XP Embedded system as administrator.

    You have successfully deployed a run-time image. Using the steps and examples provided in this tutorial, you can create a run-time image for a specific target device.

5. Errors

To solve errors during building the runtime image,follow these tips.

  1. Give the sharing permissions to"repositories" directory.
  2. In most of the cases using FBAlog.txt we solve the problems. here is the path opent the FBAlog.txt file.  " .\windows\fba\. " 
  3. Try these two tip articles, let us know if they help you discover and fix  the problem with the runtime:

6. Links

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here