qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Andrew Curtis' PCNet Patch built on MingW
@ 2004-08-11  4:03 Garth Dahlstrom
  2004-08-11  4:07 ` [Qemu-devel] " Garth Dahlstrom
  2004-08-11  9:32 ` [Qemu-devel] " Antony T Curtis
  0 siblings, 2 replies; 5+ messages in thread
From: Garth Dahlstrom @ 2004-08-11  4:03 UTC (permalink / raw)
  To: qemu-devel

Hi All, 

It took me some time, but I was finally able to compile Andrew Curtis
PCNet patch against QEMU 0.6.0 on MingW...

The good news is it almost works... that is to say it compiles and
detects under a guest linux when using the -nic-pcnet commandline
parameter for qemu.

The bad news is it's broken, it does not actually dhcp down the
10.0.2.15 address and produces 'Bad SWSTYLE=0x04' on the console.

I suspect my brutal handling of the PACKED attribute in pcnet.h is the
cause of this problem, but am unsure.  I should proably warn you all
that, I'm not a C programmer and haven't coded it for about 7 years,
so it's rather a hack job that it compiles... :)

If anyone who builds on Windows would have a go at seeing if they can
figure out what's messed up, I'd really appreciated it.

Cheers,

-G

-- 
Northern.CA ===--
http://www.northern.ca/
Canada's Search Engine

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: Andrew Curtis' PCNet Patch built on MingW
  2004-08-11  4:03 [Qemu-devel] Andrew Curtis' PCNet Patch built on MingW Garth Dahlstrom
@ 2004-08-11  4:07 ` Garth Dahlstrom
  2004-08-11  9:32 ` [Qemu-devel] " Antony T Curtis
  1 sibling, 0 replies; 5+ messages in thread
From: Garth Dahlstrom @ 2004-08-11  4:07 UTC (permalink / raw)
  To: qemu-devel

Of course, it would help if I included the url to get the stuff, eh?. :)

Here it is: http://www.northern.ca/projects/qemu/

-- 
Northern.CA ===--
http://www.northern.ca/
Canada's Search Engine

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Andrew Curtis' PCNet Patch built on MingW
  2004-08-11  4:03 [Qemu-devel] Andrew Curtis' PCNet Patch built on MingW Garth Dahlstrom
  2004-08-11  4:07 ` [Qemu-devel] " Garth Dahlstrom
@ 2004-08-11  9:32 ` Antony T Curtis
  1 sibling, 0 replies; 5+ messages in thread
From: Antony T Curtis @ 2004-08-11  9:32 UTC (permalink / raw)
  To: qemu-devel

On Wed, 2004-08-11 at 05:03, Garth Dahlstrom wrote:
> Hi All, 
> 
> It took me some time, but I was finally able to compile Andrew Curtis
> PCNet patch against QEMU 0.6.0 on MingW...
> 
> The good news is it almost works... that is to say it compiles and
> detects under a guest linux when using the -nic-pcnet commandline
> parameter for qemu.
> 
> The bad news is it's broken, it does not actually dhcp down the
> 10.0.2.15 address and produces 'Bad SWSTYLE=0x04' on the console.

There is no such SWSTYLE as 0x04 on the PC-Net chip I emulated. You
should be able to safely ignore this message.

> I suspect my brutal handling of the PACKED attribute in pcnet.h is the
> cause of this problem, but am unsure.  I should proably warn you all
> that, I'm not a C programmer and haven't coded it for about 7 years,
> so it's rather a hack job that it compiles... :)

maybe the PACKED name conflicts with some existing symbol if you are
having to undef it... Can you find what the original definition of it
is? And perhaps I should call it PCN_PACKED maybe...

> If anyone who builds on Windows would have a go at seeing if they can
> figure out what's messed up, I'd really appreciated it.
> 
> Cheers,
> 
> -G
-- 
Antony T Curtis, BSc.                   UNIX, Linux, *BSD, Networking
antony.t.curtis@ntlworld.com            C++, J2EE, Perl, MySQL, Apache
                                        IT Consultancy.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Andrew Curtis' PCNet Patch built on MingW
       [not found] <-3725715442654674811@unknownmsgid>
@ 2004-08-11 12:17 ` Garth Dahlstrom
  2004-08-11 13:03   ` Antony T Curtis
  0 siblings, 1 reply; 5+ messages in thread
From: Garth Dahlstrom @ 2004-08-11 12:17 UTC (permalink / raw)
  To: qemu-devel

Antony T Curtis wrote:

> There is no such SWSTYLE as 0x04 on the PC-Net chip I emulated. You
> should be able to safely ignore this message.
>
> maybe the PACKED name conflicts with some existing symbol if you are
> having to undef it... Can you find what the original definition of it
> is? And perhaps I should call it PCN_PACKED maybe...

I'm just taking a guess that's the cause, PACKED is defined in
/includes/windef.h as the following:
#ifdef __GNUC__
#define PACKED __attribute__((packed))

The line in pcnet.h:
#define PACKED(A) A __attribute__ ((packed))
throws a PACKED redefined warning if I leave it as is... 

So in http://www.northern.ca/projects/qemu/qemu-0.6.0-mingw-pcnet-no_dhcp.zip
I did:
#ifdef __GNUC__
  #ifdef __MINGW32__ //GED
    #undef PACKED
  #endif
  #define PACKED(A) A __attribute__ ((packed))
#else
  #error FixMe
#endif

which gets rid of the warnings, but may also break the code.
 
-- 
Northern.CA ===--
http://www.northern.ca/
Canada's Search Engine

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] Andrew Curtis' PCNet Patch built on MingW
  2004-08-11 12:17 ` Garth Dahlstrom
@ 2004-08-11 13:03   ` Antony T Curtis
  0 siblings, 0 replies; 5+ messages in thread
From: Antony T Curtis @ 2004-08-11 13:03 UTC (permalink / raw)
  To: qemu-devel

On Wed, 2004-08-11 at 13:17, Garth Dahlstrom wrote:
> Antony T Curtis wrote:
> 
> > There is no such SWSTYLE as 0x04 on the PC-Net chip I emulated. You
> > should be able to safely ignore this message.
> >
> > maybe the PACKED name conflicts with some existing symbol if you are
> > having to undef it... Can you find what the original definition of it
> > is? And perhaps I should call it PCN_PACKED maybe...
> 
> I'm just taking a guess that's the cause, PACKED is defined in
> /includes/windef.h as the following:
> #ifdef __GNUC__
> #define PACKED __attribute__((packed))
> 
> The line in pcnet.h:
> #define PACKED(A) A __attribute__ ((packed))
> throws a PACKED redefined warning if I leave it as is... 
> 
> So in http://www.northern.ca/projects/qemu/qemu-0.6.0-mingw-pcnet-no_dhcp.zip
> I did:
> #ifdef __GNUC__
>   #ifdef __MINGW32__ //GED
>     #undef PACKED
>   #endif
>   #define PACKED(A) A __attribute__ ((packed))
> #else
>   #error FixMe
> #endif
> 
> which gets rid of the warnings, but may also break the code.

At the start of pci_pcnet_init(), can you enable the printf() statement
which reports the size of the pcnet_RMD and pcnet_TMD structures?

They should both be 16 bytes.

-- 
Antony T Curtis, BSc.                   UNIX, Linux, *BSD, Networking
antony.t.curtis@ntlworld.com            C++, J2EE, Perl, MySQL, Apache
                                        IT Consultancy.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-08-11 13:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-11  4:03 [Qemu-devel] Andrew Curtis' PCNet Patch built on MingW Garth Dahlstrom
2004-08-11  4:07 ` [Qemu-devel] " Garth Dahlstrom
2004-08-11  9:32 ` [Qemu-devel] " Antony T Curtis
     [not found] <-3725715442654674811@unknownmsgid>
2004-08-11 12:17 ` Garth Dahlstrom
2004-08-11 13:03   ` Antony T Curtis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).