Friday, September 12, 2008

How to add a 3rd Party driver..

There are two methods of adding a 3rd party driver in a workspace to be used on a specific platform.

a. Using a .cab file.
b. Manually modifying workspace files to include the driver into a platform build.

For our examples, we will assume that a fundamental knowledge of building a standard image is already known and that we are working with an existing workspace.

*Using a .cab file:

· Often times the 3rd party vender will provide the driver files and registry entries in the form of a .cab file. This allows the user to double click the .cab file to install all necessary drivers, resource files, and registry entries into their appropriate location.

a. Key Notes about .cab files:

i. Usually disappear upon implementation (make a copy!)

ii. Created using Visual Studio

iii.To use in your platform, CAB File Installer/Uninstaller must be added to the workspace in Platform builder.

*Manually adding in a 3rd party driver:

1) 3rd party vendor will provide the necessary driver .dll file, .reg file, and .bib file to be added to your workspace.

2) Once you have the necessary files from the vendor, open the workspace that will have the 3rd party driver added to it.

3) You will need to add the driver file in question into the workspace release folder (In this example we will use a touch screen driver):

Ex:\WINCE600\OSdesign\ABC\RelDir\ABC_ARMV4I_Release

(Our touch screen driver in this case will called “touch_ce.dll”)

4) Open the platform.bib file and add the following entry provided by the vendor:

touch_ce.dll $(_FLATRELEASEDIR)\touch_ce.dll NK SH

Save and exit text editor

5) Open the platform.reg file and add the following entry provided by the vendor:

[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH] "DriverName"="Touch_CE.dll"
"CalibrationData"="2161,2497 701,1418 693,3573 3542,3545 3516,1399"
"MaxCalError"=dword:10

Save and exit text editor

6) Go back to workspace that will have the 3rd party driver added and select “Make Run-Time Image" from the Build OS drop down menu.


  

Thursday, September 4, 2008

How to Auto Run an application after bootup

1) In our example we will get Platform Settings (MyConfigurator.exe) to Auto Run as soon as our system boots
2) There are two ways to get the application to run depending on at what point you want the application to run.
a. Before anything else runs (ie. explorer)
b. After system has settled at the desktop.

*Before Anything else runs:
· Open platform.reg and add the following line:


[HKEY_LOCAL_MACHINE\init]
"Launch50"="MyConfigurator.exe"
"Depend50"=hex:14,00,1E,



Save the changes and exit. The LaunchXX key (where XX is a numeric value) simply points at the executable to launch and gives it it’s order (50 is usually explorer.exe). In the above case, the registry launches three processes, Shell, Device, and GWES. Device.exe (Launch20) has a dependency on Hex:0a (10 decimal). This equates to Launch10, or shell.exe, so the Shell process needs to signal the operating system that it's up and running so that any dependencies (in this case device.exe) can then be started. The same is also true of gwes.exe (launch30), device.exe depends on hex:14 (20 decimal), so GWES can't run until device.exe calls SignalStarted.
You can have multiple dependencies; for our case the dependencies will be on hex:14,00,1e,00 (Launch20 and Launch30), so both Device and GWES need to be up and running before the shell starts.
Go back to workspace that will have the Auto Run application added and select “Make Run-Time Image from the Build OS drop down menu.
* After system has settled at the desktop
· You simply need to change the code previously added in the platform.reg file to the following:


[HKEY_LOCAL_MACHINE\init]
"Launch79"="MyConfigurator.exe"
"Depend79"=hex:14,00,1E,00



· The above entry will no longer override the launch number that is originally used by explorer.exe and launch the application with the same dependencies as our example seen in “Before anything else runs”.