Re: SYSGEN variable
- From: voidcoder <voidcoder@xxxxxxxxx>
- Date: Thu, 22 Feb 2007 10:03:50 +0100
Well, I haven't cloned the ATAPI myself yet :) Generally
the steps are more or less identical for the most of
the PUBLIC\ drivers:
1. Goto your platform dir and locate the drivers branch.
Normally it is under ...\WINCExxx\PLATFORM\<PLATFORMNAME>\DRIVERS\*
or ...\WINCExxx\PLATFORM\<PLATFORMNAME>\SRC\DRIVERS\*.
Now open ...\DRIVERS\dirs file and add a new dir to the
build, say "ATAPI":
DIRS= \
SOMEDRIVER1 \
...
SOMEDRIVERx \
ATAPI
2. Next create a subdir named ATAPI. Now you have
...\DRIVERS\ATAPI\
3. Now copy the ATPI sources from the ...\PUBLIC\COMMON\OAK\DRIVERS\BLOCK\ATAPI\*
to your local ...\DRIVERS\ATAPI\ dir.
At this point you are about to decide what exactly you
want to modify in the original ATAPI driver. Note it is
very modular so you can either change a small piece of
it and leave the rest as is by linking to the corresponding
static libs, or rebuild completely from the scratch.
I'd suggest you the first way, I'm sure you are not going
to modify every piece in the original driver.
So once you are ready, copy the pieces to be modified
to your local ATAPI folder.
4. Now create a text file named "makefile" and place it
to the same driver folder. It has a single line in it:
!INCLUDE $(_MAKEENVROOT)\makefile.def
5. Create a file named "sources" and place it to the same
driver folder. For example, you decided to modify
atapipcicd.cpp
cdaudio.cpp
cdio.cpp
dvdioctl.cpp
You copied these files to your local ATAPI dir and
your "sources" file will look something like this
(actually it is a little bit modified original ATAPI
sources file):
RELEASETYPE=PLATFORM
TARGETNAME=atapi
TARGETTYPE=DYNLINK
DLLENTRY=DllMain
PREPROCESSDEFFILE=1
DEFFILE=$(_PUBLICROOT)\common\oak\drivers\block\atapi\atapi.def
WINCETARGETFILE0=$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\atapi.def
TARGETLIBS=\
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
SOURCELIBS=\
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\atapi_common_lib.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\atapi_pcio_lib.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\atapi_pcip_pdc20262_lib.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\atapi_pcmcia_lib.lib \
INCLUDES=\
$(INCLUDES); \
$(_PUBLICROOT)\common\oak\drivers\block\atapi; \
SOURCES=\
atapipcicd.cpp \
cdaudio.cpp \
cdio.cpp \
dvdioctl.cpp \
spticd.cpp \
Now you should be able to build it among the rest of your
platform specific drivers.
Finally, you may want also to add the corresponding catalog
entry to your BSP catalog file to be able to include/remove
your driver to the design from PB GUI or by the corresponding
environment var, add the dependencies, add the necessary *.bib/*.reg
entries etc.
TorbenPedersen wrote:
Hi.
Tanks for you repley, I'm not sure how to do the first approach. Could you perhaps explain it to a dummy? ;-)
I've tried to make a copy of the ATAPI directory to <my platform>\src\atapi
changed / added "dirs" and "sources" files
added a WINCEOEM=1 in the sources file
I've build the "new" atapi driver from command prompt and got som *.lib files
my compiled *.lib and *.pdb files ends in <my workspace>Wince500\<my platform>\OAK\lib\x86\debug ( I dont think I have specified this?)
where the other *.lib files goes into the <my workspace>Wince500\<my platform>\cesysgen\OAK\lib\x86\debug ( cesysgen in different)
Then I've tried to "make run time image" and tried to do a "sysgen" from platform builder, but its the "old" atapi driver that gets included. If I change the atapi driver in its default location, I gets my changes included...
I've tried to include and exclude atapi.dll in the platform.bib file and include the registry in the platform.reg.
Perhaps its because I dont understand how the platform builder goes from the *.lib file to the *.dll file?
Any suggestions on what I can look for?
Tanks in advance.
Torben
"voidcoder" wrote:
It is not clear whether your clone is not built or
is not included into image. What exactly is the problem?
As far as you removed the ATAPI item from your design,
it is not sysgened any more and the corresponding *.bib
and *.reg entries are skipped.
You can either leave the ATAPI component in your OS design
or redefine the required entries in your platform.bib/reg
files. I'd suggest you the first approach, your own atapi.dll
will overwrite the default and you don't have to worry about
the rest of things like *.reg/*.bib entries and ATAPI
dependencies.
TorbenPedersen wrote:Hi
Perhaps I should give a short intro to what I’m trying to do.
I’m having problems with the ATAPI driver on my CEPC, So I would make some changes to the source file, and to a registry file. So to do it correct, I thought that I should make a copy of the ATAPI driver, put it into my BSP catalog, change what I like to change, and be happy ;-)
But somehow it does not seam like I’m getting the new ATAPI included in my build. Sysgen complains if there is compiler/linker error, so I hope that I’ve made the dirs and sources files correctly. I’ve removed the catalog item ATAPI, as I have the impression that my ATAPI should be in-cluded automatic, is this correct?
Tanks in advance for any help
Torben
- Follow-Ups:
- Re: SYSGEN variable
- From: Remi de Gravelaine
- Re: SYSGEN variable
- References:
- Re: SYSGEN variable
- From: voidcoder
- Re: SYSGEN variable
- From: TorbenPedersen
- Re: SYSGEN variable
- Prev by Date: Configuring VMINI
- Next by Date: Re: Direct Draw Driver in CE 6.0
- Previous by thread: Re: SYSGEN variable
- Next by thread: Re: SYSGEN variable
- Index(es):
Relevant Pages
|
|