2.1.2.4 Creating an OEM Adaptation Layer (OAL)
An OEM adaptation layer is a layer of code that resides between the Microsoft Windows CE Kernel and the hardware of target device.
Physically OAL is linked with kernel libraries to create the kernel libraries to create the kernel executable files. It also facilitates communication between the Operating System and the target device. It includes code to handle the following:
1. Interrupts
2. Timers
3. Power Management
4. Bus abstraction
5. Generic I/O control codes (IOCTL)
Creating the OAL is one of the more complex tasks in the process of getting a Windows CE Operating System to run on a new hardware platform.
Easiest way to create an OAL:
1. Copy the OAL implementation from a working platform and then modify it to suit the specific requirements of the platform under consideration.
2. If a new OAL must be created from beginning (similar implementations are not there) then it’s more useful to approach the development process in stages.
Each stage adds a little more functionality than the previous one and provides a convenient separation point where new features can be fixed and validated.
Steps of creating a new OAL:
1. Preparing BSP files for building the kernel.
a) Put the necessary directories and files to build the OAL and kernel image in place.
b) config.bib will be created or modified in this step.
2. Creating a Base OAL
a) Initialize the platform at startup.
b) Enable the serial port for debugging.
c) Initialize the communication settings.
d) Goal is to provide basic system initialization code that will support further debugging and to ensure that basic initialization code is complete and consistent with target device.
3. Enhancing OAL functionalities:
a) Enhance the Interrupt Service Subroutines.
b) Manage clock and timers.
c) There are alternate debugging options for
1. Ethernet.
2. Enable power management.
3. Provide platform information for applications.
Goal:
-
Implement the remainder of platform support functions.
-
Ensure the fact that full Operating System boot is possible.
4. Completing an OAL: Implement any additional features that the developer want to add to it.
|