阅读:46921回复:203
(结贴)看了很多人对WINCE60感兴趣,我开个贴来研究2440从WINCE5.0升到WINCE6.0(公开源码-在23楼)
公开讨论群号:暂时关闭
2443的BSP有6.0的,不过我们不用2443,现在想把2440从WINCE5.0升到WINCE6.0,有想做的朋友我们一起来吧 这两天有点时间,我总结一下。 我的平台条件:UBOOT+WINCE50BSP+800×480(7寸屏),因为用UBOOT,所以我没有升级BOOTLOADER 请大家参考一下本贴的一些问题,链接等等,基本就OK了,伧促记之,错误在所难免,望高手指正。 如果大家有什么高招,请一定分享,饮水思源,来了论坛总得有点贡献嘛! 总结: 一:OAL.H修改 1)在OAL.H中注释掉下面两个头文件 #include "oal_profiler.h" #include "oal_nkxp.h" 2)在OAL.H中加入下面两个头文件 #include <nkexport.h> #include "oemglobal.h" 二:watchdog.c 修改 注释掉下面的语句 extern void (* pfnOEMRefreshWatchDog) (void); // function pointer to refresh watchdog extern DWORD dwOEMWatchDogPeriod; // watchdog period extern DWORD dwNKWatchDogThreadPriority; // watchdog thread priority, default is 100, set by kernel. OEM can adjust as desired 三:init.C修改 注释掉下面的语句 extern DWORD CEProcessorType; 四:SMDK2440A\Src\Common\Smartmedia\Dll中的sources文件修改 在SOURCELIBS语句段中原有的两个库的基础上增加下面的库 $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fmdhooklib.lib \ 五:显示驱动修改 修改内容较多,请把附件中的驱动复制过去就可以用了 本驱是是800×480的,如果你的屏参数不一样的话请自行修改 六:OAL-KERNEL修改 1:在\WINCE600\PLATFORM\SMDK2440A\Src目录下新建个Oal文件夹 2:将Src目录下的DIR文件中的Kernel语句改成Oal,使编译系统识别并编译Oal文件夹 3:将\WINCE600\PLATFORM\SMDK2440A\Src\Kernel目录下Oal文件夹复制到新建的Oal目录下,并更名为Oallib 4:将\WINCE600\PLATFORM\SMDK2440A\Src\Kernel目录下Kern文件夹复制到新建的Oal目录下,并更名为Oalexe 5:在Oal文件夹下新建一个dir文件 将下面语句加入dir文件中 DIRS=Oallib \ Oalexe \ 6:Oalexe修改 1):在\WINCE600\PLATFORM\SMDK2440A\Src\Oal\Oalexe目录下的sources文件找到下面语句 SOURCES=\ kitl.c 修改为 NOLIBC=1 SOURCES= 2):打开\WINCE600\PLATFORM\SMDK2440A\Src\Oal\Oalexe目录下的sources文件 在TARGETLIBS= \语句段中去掉下面的库 $(_COMMONOAKROOT)\lib\$(_CPUDEPPATH)\nk.lib \ 并新增下面三个库 $(_COMMONOAKROOT)\lib\$(_CPUDEPPATH)\nkstub.lib \ $(_COMMONOAKROOT)\lib\$(_CPUDEPPATH)\nkldr.lib \ $(_COMMONOAKROOT)\lib\$(_CPUDEPPATH)\oemmain.lib \ 7:Oallib修改 打开\WINCE600\PLATFORM\SMDK2440A\Src\Oal\Oallib目录下的sources文件 找到下面几句,删掉 kitl.c \ kitlser.c \ kitlusbser.c \ 8:先编译一下,可能会出现g_oalLogMask报错,找出并修改 1):debug.c文件修改 找到VOID OEMInitDebugSerial()函数中的下面两句 logMask = g_oalLogMask; g_oalLogMask = 0; 将其修改为 logMask = dpCurSettings.ulZoneMask; dpCurSettings.ulZoneMask = 0; 找到VOID OEMInitDebugSerial()函数中末尾的这句 g_oalLogMask = logMask; 将其修改为 dpCurSettings.ulZoneMask = logMask; 2):Oal_log.h文件修改 找到#define OALZONE(n) (g_oalLogMask&(1<<n))语句 将其修改为下面两句 extern DBGPARAM dpCurSettings; #define OALZONE(n) (dpCurSettings.ulZoneMask&(1<<n)) 找到extern UINT32 g_oalLogMask;将其注释掉 9:OALIoCtlVBridge错误的修改 1):找到Ioctl_tab.h中下面的语句,将其注释掉 { IOCTL_VBRIDGE_802_3_MULTICAST_LIST, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_ADD_MAC, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_CURRENT_PACKET_FILTER, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_ETHERNET_MAC, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_RX_PACKET, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_RX_PACKET_COMPLETE, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_TX_PACKET, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_TX_PACKET_COMPLETE, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_SHARED_ETHERNET, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_WILD_CARD, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_WILD_CARD_RESET_BUFFER, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_WILD_CARD_VB_INITIALIZED, 0, OALIoCtlVBridge }, 2):找到Oal_Ioctl_tab.h中下面的语句,将其注释掉 { IOCTL_VBRIDGE_802_3_MULTICAST_LIST, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_ADD_MAC, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_CURRENT_PACKET_FILTER, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_ETHERNET_MAC, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_RX_PACKET, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_RX_PACKET_COMPLETE, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_TX_PACKET, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_GET_TX_PACKET_COMPLETE, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_SHARED_ETHERNET, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_WILD_CARD, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_WILD_CARD_RESET_BUFFER, 0, OALIoCtlVBridge }, { IOCTL_VBRIDGE_WILD_CARD_VB_INITIALIZED, 0, OALIoCtlVBridge }, 七:sc2440pdd.cpp修改 找到下面语句将其注释掉,共有两处 SetProcPermissions(pTransfer->dwCallerPermissions); 八:sdiocontrollerbase.cpp修改 1):找到下面两句注释掉,他们是成对出现的,共有四处共八句 SD_SET_PROC_PERMISSIONS_FROM_REQUEST( pRequest ) { } SD_RESTORE_PROC_PERMISSIONS(); 九:Dma.h与S3c2440a_dmatransfer.h的修改 找到两个文件中的下面语句注释掉即可,每个文件中有一处 #define DMA_TRANSFER_IN_PROGRESS 0x00100000 |
|
|
沙发#
发布于:2008-06-30 10:03
从此以后WINCE就成了VS系列的一个插件了
先下PB60(3.7G)和VS2005(1.54G) |
|
|
板凳#
发布于:2008-06-30 12:59
BUILD: [01:0000000462:ERRORE] I:\WINCE600\PLATFORM\SMDK2440A\Src\Kernel\Oal\.\init.c(54) : error C2065: 'dwNKDrWatsonSize' : undeclared identifier
我在升级2440-WINCE6.0,编译遇到的第一个问题,请问怎么一回事 |
|
|
地板#
发布于:2008-06-30 13:04
BUILD: [01:0000001983:ERRORE] NMAKE : U1073: don't know how to make 'I:\WINCE600\OSDesigns\OSDesign1\OSDesign1\Wince600\smdk2440a_ARMV4I\cesysgen\oak\lib\ARMV4I\debug\nk.lib'
BUILD: [01:0000001985:ERRORE] NMAKE.EXE TargetExeFiles -i -c BUILDMSG=Stop. BUILDROOT=I:\WINCE600\PLATFORM\SMDK2440A CLEANBUILD=1 LINKONLY=1 NOPASS0=1 failed - rc = 2 第二个错误 |
|
|
地下室#
发布于:2008-06-30 15:40
两周前已经完成2440从CE5.0到6.0的升级,
第一个问题,因为ce6.0的内核设计与ce5.0完全不同,把5.0的kern.exe分解成oal.exe和kernel.dll,所以5.0里面直接外部引用的全局变量,在6.0里不能用了,而是通过platform/common/src/inc/oal.h->public/common/oak/inc/oemglobal.h->public/common/oak/inc/bcoemglobal.h #define dwNKDrWatsonSize g_pOemGlobal->cbErrReportSize 在6.0里把extern DWORD dwNKDrWatsonSize去掉就可以了,extern DWORD CEProcessorType;有这个定义的话也去掉。 你的第二个问题在帮助文档里都可以找到答案, Creating and Building Oal.exe and OalKitl.exe To create and build Oal.exe Modify the sources file in the Kernel\Kern folder. To do this, do the following tasks: Change TARGETNAME from kern to oal. Add the following TARGETLIBS: NkLdr.lib and OEMMain_StaticKitl.lib Replace Nk.lib with NkStub.lib. Replace the call to OalKitlStart in OEMInit with the following function call: Copy Code KITLIoctl(IOCTL_KITL_STARTUP, NULL, 0, NULL, 0, NULL); Replace all calls to EdbgOutputDebugString with KITLOutputDebugString. Rename SC_GetTickCount to OEMGetTickCount. Run the build command and verify that Oal.exe builds without any errors. |
|
5楼#
发布于:2008-07-01 08:46
高手出手就是不一样啊,我先看看,有问题再贴上来,谢谢
|
|
|
6楼#
发布于:2008-07-01 09:42
大概改了一下,又出现了下面的错误,请问为什么
BUILD: [01:0000000112:ERRORE] oal_ioctl_s3c2440a.lib(deviceinfo.obj) : error LNK2019: unresolved external symbol OALArgsQuery referenced in function "int __cdecl GetBootMeName(void *,unsigned int,unsigned int *,unsigned short const * *)" (?GetBootMeName@@YAHPAXIPAIPAPBG@Z) BUILD: [01:0000000113:ERRORE] oal_ioctl_s3c2440a.lib(uuid.obj) : error LNK2001: unresolved external symbol OALArgsQuery BUILD: [01:0000000114:ERRORE] I:\WINCE600\platform\smdk2440a\target\ARMV4I\debug\oal.exe : fatal error LNK1120: 1 unresolved externals BUILD: [01:0000000119:ERRORE] EDITBIN : fatal error LNK1104: cannot open file 'I:\WINCE600\platform\smdk2440a\target\ARMV4I\debug\oal.exe' |
|
|
7楼#
发布于:2008-07-01 10:16
你没有实现OALArgsQuery函数,按说ce5.0里smdk2440a/src/kernel/oal/args.c这个文件会实现这个函数。没有的话,参考platform/deviceemulator/src/oal/oallib/args.c把它添加到你的smdk2440a/src/kernel/oal/目录下。
|
|
8楼#
发布于:2008-07-01 10:38
OALEXE文件部分如下,是参考2443的不知是否有错
TARGETLIBS= \ $(_TARGETPLATROOT)\lib\$(_CPUDEPPATH)\oal.lib \ $(_COMMONOAKROOT)\lib\$(_CPUDEPPATH)\nkstub.lib \ $(_COMMONOAKROOT)\lib\$(_CPUDEPPATH)\nkldr.lib \ $(_COMMONOAKROOT)\lib\$(_CPUDEPPATH)\oemmain.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_abort_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_cache_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_memory_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_timer_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_intr_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_power_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_rtc_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_ioctl_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\oal_profiler_s3c2440a.lib \ $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\s3c2440a_args.lib \ $(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_io.lib \ $(_PLATCOMMONLIB)\$(_CPUDEPPATH)\oal_other.lib \ $(_PLATCOMMONLIB)\$(_CPUDEPPATH)\oal_log.lib \ $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fulllibc.lib |
|
|
9楼#
发布于:2008-07-01 11:56
OAL.EXE生成了,看了看WINC60自带的BSP,好像还要生成个KITL.DLL
|
|
|
10楼#
发布于:2008-07-01 12:00
不用KITL的话,可以不用care。我是没有使用KITL,所以也没去移植KITL。
|
|
11楼#
发布于:2008-07-01 15:15
插了下USB,机器重启了一下变成这样了
NMAKE : fatal error U1073: don't know how to make 'I:\WINCE600\public\common\oak\lib\ARMV4I\retail\pcc_tipccard32.def' Stop. NMAKE : fatal error U1077: 'I:\WINCE600\sdk\bin\i386\nmake.exe' : return code '0x2' Stop. |
|
|
12楼#
发布于:2008-07-01 16:43
正弦×嵌入式(413602481) 16:38:24
有用过WINCE6.0的朋友吗 正弦×嵌入式(413602481) 16:38:50 注删表编辑后要重新编译? 正弦×嵌入式(413602481) 16:38:56 太浪费时间了 正弦×嵌入式(413602481) 16:39:15 有什么不浪费时间的方法吗,像5.0一样 |
|
|
13楼#
发布于:2008-07-01 17:09
在高手的指导下,到这里了,接下去就停了,不知道什么原因,明天接着搞
Windows CE Kernel for ARM (Thumb Enabled) Built on Sep 6 2006 at 19:14:27 DCache: 8 sets, 64 ways, 32 line size, 16384 size ICache: 8 sets, 64 ways, 32 line size, 16384 size +OALArgsInit() Arguments area is initialized -OALArgsInit() |
|
|
14楼#
发布于:2008-07-01 17:19
原来是调试信息没打开
#define OALZONE(n) 1//james(dpCurSettings.ulZoneMask&(1<<n)) 找到这个强制打开后出现 -OEMGetRealTime(rc = 1) +OEMGetRealTime(pTime = 0xd068fe00) -OEMGetRealTime(rc = 1) Exception 'Data Abort' (4): Thread-Id=03e00002(pth=83bd4b1c), Proc-Id=00400002(pprc=82008308) 'NK.EXE', VM-active=00400002(pprc=82008308) 'NK.EXE' PC=c0191124(gwes.dll+0x00051124) RA=c019110c(gwes.dll+0x0005110c) SP=d066fddc, BVA=00000104 +OEMGetRealTime(pTime = 0xd066fd54) -OEMGetRealTime(rc = 1) +OEMGetRealTime(pTime = 0xd063fb8c) -OEMGetRealTime(rc = 1) +OEMGetRealTime(pTime = 0xd063f870) -OEMGetRealTime(rc = 1) |
|
|
15楼#
发布于:2008-07-01 17:22
挺不错的. 期待你的总结
----- 我的博客:WinCE6.0移植之OAL http://chenyq2008.spaces.live.com/blog/cns!F73164AC8D0D8D50!200.entry |
|
16楼#
发布于:2008-07-01 17:26
你的博客很不错,十分感谢
|
|
|
17楼#
发布于:2008-07-01 17:49
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fmdhooklib.lib \
对了我看你的:我的博客:WinCE6.0移植之OAL写FLASH那两个错误时写得好像不很清楚,在SOURCELIBS栏加上上面那条应该就可以了 WINCE600\PLATFORM\SMDK2440A\Src\Common\Smartmedia\Dll的SOURCES TARGETNAME=smflash TARGETTYPE=DYNLINK RELEASETYPE=PLATFORM WINCEOEM=1 DEFFILE=smflash.def TARGETLIBS=$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \ SOURCELIBS=$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fal.lib \ $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\fmdhooklib.lib ///add by james $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\smflash_lib.lib SOURCES= |
|
|
18楼#
发布于:2008-07-01 18:22
Exception 'Data Abort' (4): Thread-Id=03e00002(pth=83bd4b1c), Proc-Id=00400002(pprc=82008308) 'NK.EXE', VM-active=00400002(pprc=82008308) 'NK.EXE'
PC=c0191124(gwes.dll+0x00051124) RA=c019110c(gwes.dll+0x0005110c) SP=d066fddc, BVA=00000104 6.0和5.0一个显著差别,参考deviceemulator的platform.bib,知道要把驱动放到内核中去, 如: S3C2440DISP.dll $(_FLATRELEASEDIR)\S3C2440DISP.dll NK SHK 以前5.0是 S3C2440DISP.dll $(_FLATRELEASEDIR)\S3C2440DISP.dll NK SH 现在多一个K标志,从msdn可以得知: The “K” flag indicates whether the DLL will run in the kernel space, which is above 0x80000000, or user space, which is below 0x80000000. |
|
19楼#
发布于:2008-07-01 23:30
这是个好帖
|
|
|
上一页
下一页