Advanced Building of a Windows CE Image - PowerPoint PPT Presentation

1 / 54
About This Presentation
Title:

Advanced Building of a Windows CE Image

Description:

Advanced Building of a Windows CE Image – PowerPoint PPT presentation

Number of Views:109
Avg rating:3.0/5.0
Slides: 55
Provided by: jwk4
Category:

less

Transcript and Presenter's Notes

Title: Advanced Building of a Windows CE Image


1
Advanced Building of a Windows CE Image
2
?? ??
  • Platform Builder ???? ??
  • Platform Builder??? Build Process
  • Configuration File ??
  • ??? component ?? ? ??

3
Platform Builder Directory Structure
  • Platform Directory
  • Hardware specific file ??
  • Public Directory
  • Platform? ???? component ? WINCE ?? ?? ??
  • SDK Directory
  • Platform ??? ?? tool? binary
  • Others Directory
  • ??? runtime, sample component ???
  • Private Directory
  • Windows CE .NET OS? source code ??

4
Platform directory (1)
  • Platform? ???? Board Support Package (BSP) file
  • _WINCEROOT\Platform
  • ?? directory? ??? reference platform ??
  • ARM?? ?? ?? ??
  • CEPC / EMULATOR / GEODE / SMDK2410 / MAINSTONE ??
    ??
  • ? directory? .dirs file, SOURCE file, .bat file?
    ??

5
Platform directory (2)
  • CESYSGEN
  • Platform? ??? sysgen ??? ??? makefile
  • DRIVERS
  • platform? ?? driver? driver source file
  • EBOOT
  • platform? Ethernet boot loader? ?? source file
  • FILES
  • image? build?? ?? platform ??? configuration file
  • GWE
  • display, Battery, LED ?? GWE module? hardware
    ???? ??

6
Platform directory (3)
  • INC
  • CPU register? ?? device? address? platform ????
    header file
  • KERNEL
  • OEM Adaptation Layer (OAL) function ?? file
  • LIB
  • Platform ???? static libraries (.LIB)
  • Build process? ???
  • TARGET
  • DRIVER dynamic link library? ?? platform ????
    modules
  • GWE.EXE? NK.EXE? ?? system executable
  • Build process? ???

7
Platform directory (4)
  • CPU Support Package(CSP)
  • \WINCE420\PUBLIC\COMMON\OAK\CSP ? ??
  • ? CPU type? ?? common driver, OAL? driver?
    library component ? ??

8
Public directory (1)
  • Platform? ???? Component? configuration? ?? ??
  • WINCEROOT\PUBLIC ? ??
  • 3?? ??? ?? ???? ??
  • module, component? configuration ?? directory
    Wceshellfe, Wceappsfe, IE, MSMQ
  • Reference configuration ?? directory IABase,
    HLBase
  • Custom configuration ?? directory

9
Public directory (2)
  • Module? Component ??directory
  • COMMON
  • DATASYNC Device ??? communication component
  • DCOM COM? ???? ?? ?? ? component
  • DIRECTX
  • IE
  • MSMQ
  • RDP Windows ??? terminal? ?? Remote Desktop
    Protocol
  • SCRIPT JavaScript, VBScript engines
  • SERVERS Web Server ??
  • WCEAPPSFE Pocket Word/Outlook ?????? ??
  • WCESHELLFE task manager, control panel
    component shell ??

10
Public directory (3)
  • ?? ?? directory? directory structure
  • CESYSGEN
  • directory build? ?? makefile ??
  • OAK
  • OAL Device Driver Kit? module? component ??
  • SDK
  • Software Development Kit(SDK)? module? component
    ??
  • ??? DDK directory? ??
  • Device Driver Kit(DDK)? module? component ??

11
Public directory (4)
  • Reference Configuration ?? directory
  • ? ?? reference configuration
  • IABase(Internet Appliance Base Configuration)
  • _WINCEROOT\PUBLIC\IABase
  • HLBase(Headless Base Configuration)
  • _WINCEROOT\PUBLIC\HLBase
  • ? ?? directory? ??? ??? ????
  • ??? pre-made configuration? build? ?,
    Batch(.bat) file? collection? ??
  • Batch file? Platform? ??? ?? control?? ?? ??? ??
  • Batch file? ?? ?? HLBase_minkern.bat ??
    Electoronic_Payment_Terminal.bat
  • OAK
  • Files configuration file? configuration?
    default registry? ????
  • Misc OS? ??? module? component? ???
    CESYSGEN.BAT file ??

12
Public directory (5)
  • Custom Configuration ?? directory
  • configuration? ??? ?, public directory? ???
    directory ??
  • _WINCEROOT/Public/Myplat
  • RelDir
  • OS image? build?? ?? ???? ?? file? ???? Release
    directory? module, default registry, default
    database, memory setting? ??
  • WINCE420
  • _WINCEROOT directory? ??? custom configuration?
    ??
  • CESYSGEN
  • Common, Wceshell, Wceapps, IE, MSMQ? ?? Project?
    ?? module? component? ??
  • OAK(OAL Device Driver Kit)
  • platform file? cesysgen.bat file??
  • Sysgen ???? ??
  • Platform? ??? Workspace file, project file? ????.

13
SDK Directory
  • Platform Builder?? ???? tool
  • ???, Image? build ?? ?? ???? Tool? ???? ??
  • _WINCEROOT_\SDK
  • Processor compilers
  • Platform? ???? cross compiler / assembler ??
  • Development tools
  • Error lookup, GuidGen, Link, Nmake
  • Miscellaneous utilites
  • Zoomin, Windiff

14
Others Directory
  • ?? Windows CE runtime libraries ? headers ??
  • .NET Compact Frameworks? component? ATL? MFC?
    Samples ??
  • WINCEROOT\OTHERS
  • ATL
  • Debugging? ?? ATL source code, libraries, headers
  • DOTNET
  • .NET processor specific binaries? portable .NET
    Compact Framework file
  • MFC
  • Debugging? ?? MFC source code, libraries, headers
  • SAMPLES
  • MFC? ATL sample application? ??
  • WCETK
  • Windows CE Test Kit(CETK) processor specific
    binaries
  • CETK? ??? Driver class? test? ??

15
Private Directory
  • core operating system? ?? source code
  • ?? ???? source ?? ??? ??? check?? ??.
  • source code
  • Kernel
  • GWES component
  • file system manager component
  • _WINCEROOT\PRIVATE

16
Build Process (1)
..\CESYSGEN\DDK ..\CESYSGEN\OAK ..\CESYSGEN\SDK \t
arget, \files
COMMON DATASYNC DIRECTX IE MSMQ RDP SCRIPT SERVERS
WCEAPPSFE WCESHELLFE
Step 1.System Generation
Step 2.Feature Build
..\platform\.. \target, \files
Step 3.Building the Release Directory
Step 4.Making an Image
C\WINCE420\PUBLIC\_TGTPROJRelDir\_TGTPLAT_X86
Debuggt
NK.BIN
17
Build Process (2)
  • System generation (Sysgen or CESYSGEN)
  • ??? ?? feature list??? platform? ?? ??? feature?
    ???? ???? ??
  • C/WINCE420/PUBLIC/myplat/WINCE420/cesysgen
  • OS header file? platform? header file? include ??
    ?? filtering
  • Feature build (build or BSP)
  • Device driver, OAL, Bootloader? ?? BSP? ???
    elements? building, compiling, linking
  • C\WINCE420\PLATFORM\
  • User feature, projectfile(.pbp)? build, compile,
    link?? ??? dirs, source, makefiles? built??.

18
Build Process (3)
  • Building the release directory (buildrel or
    BUILDREL)
  • 1, 2 ????? file? ?? directory? copy??.
  • PB Build Open Build Release Directory
  • Making an image (Makeimg or MAKEIMG)
  • Build release directory??? ?? ??? ???, ?? file?
    merge??.
  • ? ?? file? reference platform hardware? download
    ??.
  • NK.BIN / NK.SRE / NK.nb0

19
Build Process (4)
Catalog Items
1
Build
Sysgen Filter
2
OS Design
BSP / project Source Code
? Build Release (BUILDREL)    Release Directory
(_FLATRELEASEDIR) ??? ???? ????? ?? ? Make
Image ???? OS Run-Time Image(NK.BIN)? ??? ?? ??
? SYSGEN OS Design?? ??? ??? ??????
??(Filtering) ??? ?? ? Build OS Design? BSP?
?? ???? compile?? ??
3
_FLATRELEEASEDIR
4
Run-Time Image
20
Step 1. System generation
Filtering / Link
.exe / .dll
.h / .lib for Device Driver / OEM Application
21
Step 2. Feature Build
Build
22
Step 3. Building the Release Directory
Copy
Component / Configuration File
23
Step 4. Making an Image
Makeimg
24
System generation (1)
  • ?? component? ?? library
  • Module? ?? expose? ?? function? ?? header file
  • Module definition file(.def)
  • IDE?? sysgen? ??? ?, ??? module? component
    library? link
  • Header file? system function export file? Custom
    version? OS ??? ?? ??
  • Makefile? CESYSGEN.BAT? ?? ??? ???
  • Makefile? ??? component? ???? library? link??.
  • Build -gt Generate Platform Headers

25
System generation (2)
Complete header and source code files
System-specific header files
SYSGEN.BAT
Complete system libraries
Linked libraries
Module definitions(.def)
Specific .def files
Cesysgen.bat
26
Feature Build (1)
  • Source code? complie
  • Dirs? ??, ?? directory compile?? ??
  • SOURCES file? ??, ?? file? compile?? ??
  • Object module? compile ?? link?? ?? NMAKE.EXE ??
  • .exe, .dll? ?? target folder? binary file ??
  • Example Target\ARMV4I\Debug
  • .lib? ?? lib folder? binary file ??
  • Example Lib\ARMV4I\Debug

27
Feature Build (2)
  • DIRS file? ????
  • DIRS? list? ??? directory? build
  • DIRS file? ?? ?? ????
  • build.exe? SOURCES file? ??? ??? ??? ?? C, C?
    assembly file? compile??.
  • Build.exe? ?? ??? NMAKE.exe? .exe? .dll, .lib
    file? build??, link
  • build.exe? ?? ???? ??
  • .exe ? .dll files
  • Target\_TGTCPUTYPE\WINCEDEBUG
  • Example target\ARMV4I\Debug
  • .lib files
  • Lib\_TGTCPUTYPE\WINCEDEBUG
  • Example Lib\ARMV4I\Debug

28
Feature Build (3)
  • DIRS file
  • ?? directory? build?? ?? list
  • ?? directory? DIRS file? ??? ? ??.
  • DIRS?? DIRS_CE? OPTIONAL_DIRS? ??? ? ??.
  • DIRS_CE
  • ?? Windows CE? ?? building ? ?? build ??
    directory? ??
  • OPTIONAL_DIRS
  • build.exe command line?? ???? ??? BUILD_OPTION
    ????? directory? ????? ???, build ? ? ??.

DIRS \ Display\ Mouse\ Keyboard\ Ethernet
29
Feature Build (4)
  • SOURCES files? ??? ??? ??? macro
  • TARGETNAME
  • build? module? ??
  • TARGETTYPE
  • type? ??(.lib/.dll/.exe)
  • DLLENTRY
  • .dll file? ?? entry type
  • EXEENTRY
  • .exe file? ?? entry type
  • TARGETLIBS
  • link??? ?? .lib file
  • INCLUDES
  • Header file? ?? ?? path
  • SOURCES
  • compile? ?? source file
  • ??? makefile? ??? ??.

30
Feature Build (5)
MAKEFILE
31
Feature Build (6)
  • SOURCE file ?
  • build.exe? IOPORT.CPP? VGAPORT.CPP? compile
  • COREDLL.LIB? ??? link
  • entry? DllMain
  • kbdmouse.dll?? dynamic link library ??

TARGETNAME Kbdmouse TARGETTYPE DYNKINK DLLNTRY
DllMain TARGETLIBS \ (_COMMONSDKROOT)\Lib\
(_CPUNDPATH)\Coredll.bib INCLUDES (COMMONSDKRO
OT)\Inc SOURCES \ iport.cpp
\ vgaports.cpp\
32
Building the Release Directory (1)
  • buildrel tool? ?? directory??? ??? copy
  • _PROJECTROOT/Cesysgen/Oak/Files
  • _PROJECTROOT/Oak/Files
  • _PLATFORMROOT/_TGTPLAT/\Files
  • _PROJECTROOT/Cesysgen/Oak/Target/_TGTCPUTYPE/
    WINCEDEBUG
  • _PROJECTROOT/Oak/Target/_TGTCPUTYPE/WINCEDEBU
    G
  • _PLATFORMROOT/_TGTPLAT/Target/_TGTCPUTYPE/
    WINCEDEBUG/

33
Building the Release Directory (2)
  • Makeimg.exe? ?? ?? ? ?? file? binary?
    _FLATRELEASEDIR? ?? ?? ??.
  • CE version 3.0 ???? _FLATRELEASEDIR? file? copy??
    ?? Buildrel? ??
  • ??? Windows CE .NET??? _FLATRELEASEDIR? NTFS
    partition? ??? Buildrel? original file? ??? ????
    ???? ???? hard link? ????? ??
  • Hard linking? ??? ?? ??? ???? ?????? disk space?
    ???? ??

34
Building the Release Directory (3)
  • buildrel? ????? hard link? ?????? ??
    flatreleasedir?? original? update? file? writing
  • Hard linking? ?? ?? feature(e.g. automatic bib
    update)? ???? ?? IDE? _FLATRELEASEDIR? file? ??
    management? original? update?? ?? ?? ?? ??.
  • IDE? ?? ?? ??? ???? ?? _FLATRELEASEDIR? ??
    file(e.g. project.bib)? ????? _FLATRELEASEDIR?
    private version? file?? copy?? ??? ??

35
Making an Image (1)
  • Makeimg? Fmerge tool? ???? build process?? ???
    configuration file? merge
  • ?? .bib file? unique file(CE.BIB)? merge
  • Binary image build
  • ?? .reg file? unique file(reginit.ini)? merge
  • ?? .dat file? unique file(INITOBJ.DAT)? merge
  • ?? .db file? image? default database? ??? unique
    file(initdb.ini)? merge
  • reginit.ini file? binary file(DEFAULT.FDF)? ??
  • ??? language? ?? ?? module? resource?
    ??(language? LOCALE?? ??? ?? ???)

36
Making an Image (2)
  • makeimg? file? binary? CE.BIB? ??
  • ce.bib??? binary? file? windows CE image? ????.
  • Windows CE image? ??
  • Build -gt Make Image

37
Explaining Build Errors (1)
  • Error during the Sysgen phase
  • ????? file? ?? ??
  • Operating system feature? ??
  • Sysgen ??? application build ?? ??
  • Build.log? ???? ??
  • \Public directory? component? ??? ??
  • Error during the feature build phase
  • Compilation syntax error / Unresolved link error
  • Build.err ??
  • Error during the building the release directory
    phase
  • Disk space? ?? / locked file / read only file ?
    ??
  • Hard driver? ?? ??
  • Build.log ??

38
Explaining Build Errors (2)
  • Errors during the making an image phase
  • Flat release directory? file? ?? ??
  • ?? error / bib file error?? ??
  • Build.log / build.err ??
  • Romimage.exe failed in CE.BIB
  • Bib? ??? file? Flat release directory? ?? ??
  • Romimage.exe failed in reginit.ini
  • CE Registry? syntax error? ??? ??
  • ErrorImage exceeds
  • Config.bib? ??? NK space?? ? ? image? building ??
    ??

39
Integrated Development Environment (1)
  • Feature View
  • Platform? ??? ?? ???? / OS component ??
  • ??? WebPad, Media Appliance? ?? configuration ???
    OS component? ??
  • IABASE ?? HLBASE ? base configuration ??
  • Third party? ?? driver? BSP ?? platform root node
    ??? list??.
  • IDE?? ??? OS component? SYGEN ?? ??? ???? ??.
  • Feature View?? Sysgen feature? component? ?? / ??
    ? ? ??.

40
Integrated Development Environment (2)
  • Resolve Features
  • feature group? Unresolved? platform? ??? feature?
    ???? ?? feature group? ????.
  • platform build ?? unresolved? feature group?
    resolve ?? ??.
  • platform? unresolved? feature group? ?????,
    Resolve Features dialog box? platform? BSP?
    feature? ????? ??.
  • Resolve Features dialog box? ?? resolve? feature
    group? ??? remove ?? modify ? ? ??? ??.

41
Integrated Development Environment (3)
  • Build option? ???? Windows CE? image? build? ?,
    full build mechanism? ?? ??? feature? build???
    ??.
  • ??? feature? ?? ??? ??? ??? ??? ???? ?? feature?
    ????? build??.
  • ??? ??? ???? ?? ?? platform building process ???
    ???.
  • Building a Selected Component
  • FeatureView window?? build? item??
  • Right-click??, Build Selected Component click
  • Making the Image
  • Build -gt Make Image
  • Environment Variables
  • Platform Environment Variable Window?? ?? ??? ???
    ??, ?? platform? rebuild ??.
  • CE component(CEC) file?? ?? ??? ????
    programmatically?? trigger??.

42
Modifying Configuration Files
  • ?? configuration file? image? ???? ?? build
    process?? ????
  • .BIB files
  • .REG files
  • .DAT files
  • .DB files

43
The Configuration Files .BIB Files
  • OS ???? ?????? ? ??? ???? ??? ?? ???? ??? ????
    ??? ??
  • Make a Image ???? ? ???? ??? ?? ?? .bib? ??
    ce.bib ??? ???? ?? ???? OS ?? ???? ????.
  • BIB ??? ?? ? ?? ???? ??? ????.
  • Memory
  • Config
  • Modules
  • Files

44
The Configuration Files .BIB Files
  • MEMORY OS / Object Store? ?? ? ?? ??
  • Data memory ROM ?? RAM memory ??
  • Program memory memory application? ?? ??? RAM??
  • NK
  • Nk??? 800000 hex byte(8388608 byte)? ??? / ?? ??
    8C800000
  • Data memory? ?? ROM? ???.
  • RAM
  • RAM??? 7AFFFF hex bytes? ??? / ?? ?? 8C050000
  • Program memory? ?? RAM? ???.

Name Start address Size(bytes) Type NK 8C800000 0
0800000 RAMIMAGE RAM 8C050000 007AFFFF RAM
Config.bib
45
The Configuration Files .BIB Files
  • Memory (cont)
  • MEMORY section memory type
  • RAM
  • program memory? RAM file system? ???? RAM? ????
    ?? Memory?? ??
  • ? ???? ?????? ??, ??? ???? ???? ???.
  • ???? ????? RAM base file system? ?? ??
  • RAMIMAGE
  • ROM?? ??? ?? memory ??? ?? / system? unique?? ?
  • ??? ????? ?
  • RESERVED
  • kernel?? ???? ?? application?? ??
  • RAM?? ??, ?? ??? ??? ???(????? ?).

46
The Configuration Files .BIB Files
  • CONFIG OS image? ?? / NK.nb0 ?? ?? ? ??
  • Compression ?? ROM size? ?? ??? ??? ?? ??
  • ROMFLAGS ??? ???? ?? ?? ??? ??
  • ROMFLAGS0x0001 ??? ?? ??
  • ROMFLAGS0x0002 ??? ??? ?? ?? ?? ??
  • ROMFLAGS0x0010 ROMIMAGE? ??? ?? ??? ??? ????
    ???? ??

CONFIG AUTOSIZEON COMPRESSIONON
ROMFLAGS0
Config.bib
47
The Configuration Files .BIB Files
  • MODULES memory? load? object module
    ??(.exes/.dll)
  • Example TASKMAN.EXE
  • Taskman.exe (_FALATRELEASEDIR)\Taskman.exe NK
    SH
  • S to define it as a system file
  • H to define it as a hidden file
  • R to compress resources
  • C to compress everything
  • D to prevent a debugger from running
  • N to mark a module as non-trusted
  • P to ignore the CPU type on a per-module basis
  • K to signal that ROMIMAGE has to fixup the DLL to
    run properly
  • PLATFORM.BIB / PROJECT.BIB / CONFIG.BIB

48
The Configuration Files .BIB Files
  • FILES static data? memory partition? ????.
  • Example Tahoma.ttf
  • (_FALATRELEASEDIR)\Tahoma.ttf NK SHU
  • S System file
  • H Hidden file
  • U Uncompressed file

49
The Configuration Files .REG Files
  • default registry setting? ???? ?? ??
  • HKEY_LOCAL_MACHINE root key?? Init key
  • Launch10 ? Launch20? 2?? string entry
  • Launch10? Launch20? ?? ?? SHELL.EXE ? DEVICE.EXE?
    ?? ?
  • ? entry? kernel? startup? ? ????? SHELL.EXE ?
    DEVICE.EXE ????? ??.
  • COMMON.REG, DATASYNC.REG, DCOM.REG, DIRECTX.REG
    IE.REG, MSMQ.REG, RDP.REG, SCRIPT.REG
    WCEAPPS.REG? WCESHELL.REG
  • PLATFORM.REG
  • PROJECT.REG

HKEY_LOCAL_MACHINE\Init Launch10SHELL.EXE
Launch20DEVICE.EXE
.reg
Reginit.ini
??
??
Default.fdf
50
The Configuration Files .DAT Files
  • image? folder ??? ??
  • ?? ??? ?? ? ??? ?? ??
  • Program Files ? My Documents?? 2?? directory? ??
  • Windows CE?? root directory(\)? ??
  • Program Files? ??? My Project ?? directory? ??
  • My Document directory? MyFile.doc?? file? ??
  • ?? ??? ??? ?? ??.
  • MyFile.doc? .BIB file? ????? image? ????.
  • COMMON.DAT, IE.DAT, MSMQ WCEAPPS.DAT?
    WCESHELL.DAT
  • PLATFORM.DAT
  • PROJECT.DAT
  • .dat ? iniobj.dat

Root-Directory(Program Files) Directory(\Progr
am Files)-Directory(My Projects) Root-Directo
ry(My Documents) Directory(\ My
Documents)-File(MyFile.doc,\ Windows\Myfile.do
c)
51
The Configuration Files .DB Files
  • default database table? ????? ???? ??
  • Windows CE ??? ? Application? ??? ??????
  • .DB file? ???? image ???? ??
  • COMMON.DB, WCEAPPS.DB? WCESHELL.DB
  • PLATFORM.DB
  • PROJECT.DB
  • .db ? initdb.ini

52
Creating a Component (1)
  • CEC CE component file
  • OAL, device driver ?? ?? component? ?????, ??
    Component File(.cec)? ?? Platform Builder
    Catalog? ??? ? ??.
  • Platform Builder environment? ??? component?
    importing? ? ??.
  • .CEC file? catalog? ????? component? ??? test
    file??.

53
Creating a Component (2)
  • .CEC file? 4?? ?? type? block? ???
  • CECInfo Block ???? ??? ??
  • ComponentType block ?? ?? ??? Catalog ?? ??
  • MaxResolvedImpsAllowed
  • (Optional)OS Design? ???? ?? ?? ??? ??? ?? ?? ??
    ???? Element
  • ????? 1? ??
  • RequiredCEModules
  • (Optional)OS Design? ??? ????? ?? ??? ????
    Element

54
Creating a Component (3)
  • .CEC file? 4?? ?? type? block? ???
  • Implementation block component ?? ??
  • Variable
  • (Optional) Catalog Item? ?? ????? ?? ??? ??
    ??    EXgt Variable( , )
  • BuildMethod block ??? ??? ?? ??
  • Step Build Step? ????.
  • BSP Feature Build Step
  • BUILDREL Release Copy Step
  • MAKEIMG Make Image Step
  • CESYSGEN Cesysgen Step
  • Action
  • ?? ???? Platform Builder? ?? ??? ??? ??
  • ?, SOURCES ?? DIRS ???? ??? ??? ??? ??
  • SRCCODE ????? ??? IDE??? ???? Element (IDE???
    ?? ?? ??? ?? ? ?? ??)
Write a Comment
User Comments (0)
About PowerShow.com