由于要看下某块板子烧的是哪个版本的nk,所以到“我的电脑”里看了下文件的创建时间。无意中发现 "application data", "my documents", "program files", "temp", "windows", "control panel"这几个文件夹和快捷方式的创建时间(也就是在wince系统的所说的修改时间,都是比系统的时间早8个小时。
     也难怪这几个文件夹和快捷方式都是在系统启动的时候根据initobj.dat动态创建的。为了验证这个时间,特别的编译了一个eng版本的,在启动之后查看以上几个文件夹的时间竟然又比系统时间晚了8个小时。
     原因是,在系统起来的时候filesys.exe要mount fat到ram上去,这样就要创建以上几个文件夹并从rom中拷贝文件到相应的文件夹下。由于在此时filesys.exe还没有设置时区,所以就默认使用格林制时间(),也就是说这个时候从外部时钟读出的日期和时间被认为是格林制时间。在系统启动完成并设置了时区之后,从外部读出的时间就被直接认为是当地时间并把上面的几个文件夹的修改时间(格林制)修改成了现在的时区时间。也就是为什么,在中文的情况下以上几个文件夹的时间要比当前的系统时间早8个小时(北京时间为GMT+8);英文的情况下以上几个文件夹的时间要比当前的系统时间晚8个小时(美国时间为GMT-8)。
 
To boot Filesys.exe
 
1.Detect if this is a cold or warm boot.
On a cold boot, all the object store memory is initialized and then mapped for Filesys.exe. On a warm boot, memory is not initialized before being mapped for Filesys.exe.
 
2.If this is a cold boot, call pNotifyForceCleanboot to let the OEM know that this is a cold boot.
 
3.On a cold boot call OEMIoControl with IOCTL_HAL_INIT_RTC.
 
4.Initialize the database subsystem and application programming interfaces (APIs).
 
5.Initialize the file system APIs.
 
6.Initialize the point-to-point message queue APIs.
 
7.If the RAM files system is part of the OS p_w_picpath, view the Initobj.date file and create a RAM file system
 
8.Initialize the registry.
 
9.If Device.exe is not started, and if HKEY_LOCAL_MACHINE\System\StorageManager points to a DLL that can be loaded, load the storage manager.
 
10.If storage manager is loaded, create a thread to initialize it. The thread exits when it is completed.
 
11.Initialize the national language support (NLS) data.
 
12.Set the locale to use with the database engine by calling CeChangeDatabaseLCID
 
13.Populate the object store databases by loading data from Initdb.ini.
 
14.Open event SYSTEM/FSReady and set the event.
This action communicates to the kernel and other applications that Filesys.exe is ready. Filesys.exe now waits for the kernel to signal that it can boot the rest of the operating system (OS).
 
15.Create named events for all event names in the registry at location
HKEY_LOCAL_MACHINE\System\Events. These events are set by the processes that own  them.
Filesys.exe reads from HKEY_LOCAL_MACHINE\Init and runs the applications listed.
 
16.If Device.exe is in the list and it has already started, open event
SYSTEM/BOOTPHASE2 and signal it.
This action enables Device.exe to reread the registry and perform the final driver initialization. Any driver can also wait on the same event, to be notified when the real registry comes online. By doing so, the driver can reread registry data, if necessary.
 
17.Initialize the time zone and set daylight savings time (DST), if necessary.