还有一个强人的移植笔记
一:OAL.H修改
1)在OAL.H中注释掉下面两个头文件
#include "oal_profiler.h"
#include "oal_nkxp.h"
2)在OAL.H中加入下面两个头文件
#include
#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<
将其修改为下面两句
extern DBGPARAM dpCurSettings;
#define OALZONE(n) (dpCurSettings.ulZoneMask&(1<
找到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