Hi all,

I wonder how you clone code from public driver to your own platform code?

Ive tried using tips from other threads without success.

Lets say i want to modify
"WINCE600\public\common\oak\drivers\display\emulrotate". How do I do this?

I guess this lib is linked into some module using makefile.def? If I clone
it and build it in my platform the .lib file will end up in my platform\lib
directory. How do I get the build system to use this .lib instead of the
public one?


I would be glad if someone could explain how the makefile.def works and how
the cloning is done.


Best regards!

Re: Question about cloning in WinCE 6.0 by Paul

Paul
Tue Apr 08 08:48:28 PDT 2008

Well, the party line is: copy the files themselves for the component you
want to clone (to your platform\drivers folder, often), open a build window
from Platform Builder, navigate to the folder where you copied things, use

sysgen_capture -p common <nameofthecomponent>

combine the resulting SOURCES.xyz file generated by sysgen_capture with the
SOURCES file that built the original component library (the sources file
that you copied earlier), changing the RELEASETYPE, TARGETTYPE items to
build the actual target component (typically a DLL for a driver like this
one). There are variations, depending on what exactly you're building, so
cloning the shell isn't usually done by making a single SOURCES file that
does everything, but by building the libraries (with RELEASETYPE set to
PLATFORM, maybe), and then having an extra folder in the directory structure
(EXE, usually), which contains a new SOUCES file built based on the
SOURCES.xyz file and which uses the libraries generated in the platform
folders, rather than the public ones, to build the replacement driver,
application or whatever.

This is what you did? And it didn't work? That would surprise me.

Paul T.

"Bjorn Hall" <BjornHall@discussions.microsoft.com> wrote in message
news:DAC8BC49-30F8-4B03-B5CC-051E99312A2B@microsoft.com...
> Hi all,
>
> I wonder how you clone code from public driver to your own platform code?
>
> Ive tried using tips from other threads without success.
>
> Lets say i want to modify
> "WINCE600\public\common\oak\drivers\display\emulrotate". How do I do this?
>
> I guess this lib is linked into some module using makefile.def? If I clone
> it and build it in my platform the .lib file will end up in my
> platform\lib
> directory. How do I get the build system to use this .lib instead of the
> public one?
>
>
> I would be glad if someone could explain how the makefile.def works and
> how
> the cloning is done.
>
>
> Best regards!



Re: Question about cloning in WinCE 6.0 by Bradley

Bradley
Tue Apr 08 09:44:17 PDT 2008

On Apr 8, 8:20=A0am, Bjorn Hall <BjornH...@discussions.microsoft.com>
wrote:
> I wonder how you clone code from public driver to your own platform code?

I used the following guide when I had to clone some public code
(http://msdn2.microsoft.com/en-us/library/aa459163.aspx). It was
originally written for Windows CE 4.2 but I used it in my Windows CE
6.0 BSP.

> Ive tried using tips from other threads without success.
>
> Lets say i want to modify
> "WINCE600\public\common\oak\drivers\display\emulrotate". How do I do this?=


It would involve copying the directory emulrotate into your PLATFORM
\YOUR_BSP\SRC\DRIVERS directory and running a Sysgen_capture on
emulrotate. It's all detailed in the link above.

The only thing is if I remember correctly, the guide above will
require you to have two directories one for a .lib and one for
a .dll. This isn't really required, just it's default configuration,
you should be able to . The files you copied over will likely build
itself into a lib, the Sysgen_capture will provide you with a sources
file to build it into a .dll.

> I guess this lib is linked into some module using makefile.def? If I clone=

> it and build it in my platform the .lib file will end up in my platform\li=
b
> directory. How do I get the build system to use this .lib instead of the
> public one?
>
> I would be glad if someone could explain how the makefile.def works and ho=
w
> the cloning is done.

I've never used a makefile.def file, but following the link above
should allow you to clone your component.

Re: Question about cloning in WinCE 6.0 by Paul

Paul
Tue Apr 08 10:26:36 PDT 2008

Every time you build *anything* in Windows CE, you're using makefile.def ;-)
It's the file that describes the basic rules (what does RELEASETYPE mean?
what does TARGETTYPE mean? where are include files found for a given build
type? etc.), that you then use when building your components using SOURCES
file. You can find the file itself in \PUBLIC\COMMON\OAK\MISC, if you need
to look at.

Paul T.

"Bradley Remedios" <bremedios@gmail.com> wrote in message
news:3be6b2de-5dd9-43b1-bb05-e1a69acb20f1@1g2000prf.googlegroups.com...
On Apr 8, 8:20 am, Bjorn Hall <BjornH...@discussions.microsoft.com>
wrote:
> I wonder how you clone code from public driver to your own platform code?

I used the following guide when I had to clone some public code
(http://msdn2.microsoft.com/en-us/library/aa459163.aspx). It was
originally written for Windows CE 4.2 but I used it in my Windows CE
6.0 BSP.

> Ive tried using tips from other threads without success.
>
> Lets say i want to modify
> "WINCE600\public\common\oak\drivers\display\emulrotate". How do I do this?

It would involve copying the directory emulrotate into your PLATFORM
\YOUR_BSP\SRC\DRIVERS directory and running a Sysgen_capture on
emulrotate. It's all detailed in the link above.

The only thing is if I remember correctly, the guide above will
require you to have two directories one for a .lib and one for
a .dll. This isn't really required, just it's default configuration,
you should be able to . The files you copied over will likely build
itself into a lib, the Sysgen_capture will provide you with a sources
file to build it into a .dll.

> I guess this lib is linked into some module using makefile.def? If I clone
> it and build it in my platform the .lib file will end up in my
> platform\lib
> directory. How do I get the build system to use this .lib instead of the
> public one?
>
> I would be glad if someone could explain how the makefile.def works and
> how
> the cloning is done.

I've never used a makefile.def file, but following the link above
should allow you to clone your component.



Re: Question about cloning in WinCE 6.0 by BjornHall

BjornHall
Wed Apr 09 07:59:01 PDT 2008

Thanks for your answers!

Ive tried the sysgen_capture method but I didn't get a sources.xyz file.

I guess Im doing something wrong here but Im in hurry and I need to quickly
modify emulrotate and do some test. This is however a slow task since I need
to build emulrotate and then do a full rebuild to get my changes linked in.
(aprox 30mins build time for each change).

I know this isn't the way to go and I need to fix it later but is there a
faster way to get my changes linked into the image?

Re: Question about cloning in WinCE 6.0 by Valter

Valter
Wed Apr 09 08:42:52 PDT 2008

=?Utf-8?B?Qmpvcm4gSGFsbA==?= <BjornHall@discussions.microsoft.com>
wrote in news:200BF68E-327D-4B5D-ADA1-A259DC313603@microsoft.com:

> Thanks for your answers!
>
> Ive tried the sysgen_capture method but I didn't get a sources.xyz
> file.
>
> I guess Im doing something wrong here but Im in hurry and I need
> to quickly modify emulrotate and do some test. This is however a
> slow task since I need to build emulrotate and then do a full
> rebuild to get my changes linked in. (aprox 30mins build time for
> each change).
>
> I know this isn't the way to go and I need to fix it later but is
> there a faster way to get my changes linked into the image?

The fastest way sometimes is also the right one.
Try to clone that component and if you don't get a sources.* file,
sysgen_capture should report an error message or write something
inside build.err or build.log, check what's happening or post some
meaninful error information here.


--
Valter Minute
www.fortechembeddedlabs.it
Training, support and development for Windows CE
(the reply address of this message is invalid)

Re: Question about cloning in WinCE 6.0 by Paul

Paul
Wed Apr 09 08:57:44 PDT 2008

Being in a hurry to replace a public component in your Windows CE operating
system is a major problem. It's likely to take days to get it right,
especially since this is your first time. Each public component builds a
little differently and you can't plug any of them into a formula and expect
the answer to pop out in ten minutes.

What was the current directory in your MS-DOS window when you did the
sysgen_capture? That folder is where the resulting sources.xyz is placed,
so, if you didn't navigate to a different folder, you might check the flat
release directory for the output sources.xyz file(s).

I suppose that you might be able to back up the public source, make your
changes there directly, and do a build of that one folder from the MS-DOS
prompt, then do a clean sysgen of the OS (note that I didn't say build and
sysgen). I think that will get the right things in the right places.
However, as Valter indicated, this is a slippery slope and once you start
sliding, there's a reasonable chance you're going to end up at the bottom in
a pile of mud.

Paul T.

"Bjorn Hall" <BjornHall@discussions.microsoft.com> wrote in message
news:200BF68E-327D-4B5D-ADA1-A259DC313603@microsoft.com...
> Thanks for your answers!
>
> Ive tried the sysgen_capture method but I didn't get a sources.xyz file.
>
> I guess Im doing something wrong here but Im in hurry and I need to
> quickly
> modify emulrotate and do some test. This is however a slow task since I
> need
> to build emulrotate and then do a full rebuild to get my changes linked
> in.
> (aprox 30mins build time for each change).
>
> I know this isn't the way to go and I need to fix it later but is there a
> faster way to get my changes linked into the image?



Re: Question about cloning in WinCE 6.0 by Bruce

Bruce
Wed Apr 09 09:53:29 PDT 2008

sysgen_capture isn't going to work becuase the targettype is library.

You should just copy the folder to you platform and make some small changes
to the sources file.

RELEASETYPE=PLATFORM

which may already be set in your source.cmn

But now you will need to do more to link with your library. Presumably,
your display driver is linking with the library in COMMONOAKROOT, but you
will be building it in your platform now. Also, you may be linking with one
of the libraries that link in emulrotate.lib. You may have more layers of
this onion to peel.

While that 30 minute build is running, take the time to read about the build
system in PB help. You should be able to drop that down to a few minutes,
but it requires that you understand the tools that you are using.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"Bjorn Hall" <BjornHall@discussions.microsoft.com> wrote in message
news:200BF68E-327D-4B5D-ADA1-A259DC313603@microsoft.com...
> Thanks for your answers!
>
> Ive tried the sysgen_capture method but I didn't get a sources.xyz file.
>
> I guess Im doing something wrong here but Im in hurry and I need to
> quickly
> modify emulrotate and do some test. This is however a slow task since I
> need
> to build emulrotate and then do a full rebuild to get my changes linked
> in.
> (aprox 30mins build time for each change).
>
> I know this isn't the way to go and I need to fix it later but is there a
> faster way to get my changes linked into the image?