From loureiro@talgo.uvigo.es  Fri Aug  3 10:34:17 2001
Date: Fri, 3 Aug 2001 11:34:17 +0200 (CEST)
From: Gonzalo Gonzalez Rodriguez loureiro@talgo.uvigo.es
Subject: [pxc] Installation problem with "make"

Hi!

Maybe any of the subscribers can help me with this little problem...

I just got the Linux driver for the card, uncompressed, ran "make", and an
error like this showed up:

/usr/src/linux/include/asm/pgtable.h: In function `get_pgd_slow':
/usr/src/linux/include/asm/pgtable.h:409: `PAGE_OFFSET_RAW' undeclared
(first use in this function)

...several times.

I'm using RH7.0 with a 2.2.16-22 kernel. I tried also to make a .rpm
package from Alessandro's .deb, and install... it seemed ok, but when I
run pxc_load,

Loading pxc200 device driver (pxc)...insmod: pxc: no module by that name
found failed

I'm not very familiar with this stuff, and I'd really appreciate any help

Thanks
-- 


			Gonzalo González Rodríguez
			loureiro@talgo.uvigo.es





From rubini@gnu.org  Thu Aug  9 17:22:16 2001
Date: Thu, 9 Aug 2001 18:22:16 +0200
From: Alessandro Rubini rubini@gnu.org
Subject: [pxc] Installation problem with "make"

Hello Gonzalo.

> I just got the Linux driver for the card, uncompressed, ran "make", and an
> error like this showed up:
> 
> /usr/src/linux/include/asm/pgtable.h: In function `get_pgd_slow':
> /usr/src/linux/include/asm/pgtable.h:409: `PAGE_OFFSET_RAW' undeclared
> (first use in this function)

Interesting. Looks like 2.2.16 doesn't define that symbol. While you
are always suggested to runn the latest or next-to-latest 2.2.x version,
I might add a default define for older kernels.

Hmm.... looking in the patches, it was added in 2.2.11, so you must
have it. You might try to add

	#include <asm/page.h>

in the relevant source file.

> [...] but when I run pxc_load,
> 
> Loading pxc200 device driver (pxc)...insmod: pxc: no module by that name
> found failed

did you "depmod -a" after installing the modules? Actually, you'd
better compile from sources and not rely on my badly designed .deb
packages.

Hope this helps, though somehow late
/alessandro




From loureiro@talgo.uvigo.es  Mon Aug 13 17:36:54 2001
Date: Mon, 13 Aug 2001 18:36:54 +0200 (CEST)
From: Gonzalo Gonzalez Rodriguez loureiro@talgo.uvigo.es
Subject: [pxc] Installation problem with "make"

Hi!

I've been following your advices:
>
> Hmm.... looking in the patches, it was added in 2.2.11, so you must
> have it. You might try to add
>
> 	#include <asm/page.h>
>
> in the relevant source file.

That asm/page.h is included in your "main.c". The definition for
PAGE_OFFSET_RAW is found in .../asm/page_offset.h, which was not included.

Then, I added to "main.c" an #include <asm/page_offset.h>, but I've got
the same error again.

This file is quite simple, three defines in a conditional statement:

#include <linux/config.h>
#ifdef CONFIG_1GB
#define PAGE_OFFSET_RAW 0xC0000000
#elif defined(CONFIG_2GB)
#define PAGE_OFFSET_RAW 0x80000000
#elif defined(CONFIG_3GB)
#define PAGE_OFFSET_RAW 0x40000000
#endif

I don't want to mess up the code, by starting to add #defines and
#includes which I don't really know much about. Maybe this is simpler.
What do you think?

Thanks for your support. I guess we are close to the solution :)

-- 


			Gonzalo González Rodríguez
			loureiro@talgo.uvigo.es





From rubini@gnu.org  Wed Aug 15 14:38:55 2001
Date: Wed, 15 Aug 2001 15:38:55 +0200
From: Alessandro Rubini rubini@gnu.org
Subject: [pxc] Installation problem with "make"

> That asm/page.h is included in your "main.c". The definition for
> PAGE_OFFSET_RAW is found in .../asm/page_offset.h, which was not included.

But that header is included by asm/page.h:

	ostro:2% cd /usr/src/linux-2.2
	/usr/src/linux-2.2
	ostro:2% grep asm/page_offse include/*/*.h
	include/asm-i386/page.h:#include <asm/page_offset.h>
	include/asm/page.h:#include <asm/page_offset.h>

> Then, I added to "main.c" an #include <asm/page_offset.h>, but I've got
> the same error again.

Are you compiling against the right kernel headers? Did you specify
KERNELDIR in the environment or the command line of "make"?

> I don't want to mess up the code, by starting to add #defines and
> #includes which I don't really know much about. Maybe this is simpler.
> What do you think?

I agree messing up doesn't lead much far. Usually these problems are
just due to a mismatc between current kernel and headers being
included (i.e., the headers don't belong to a supported kernel
version; mismatches with the current version are only relevant later,
when you try to load the module).

Hope this helps
/alessandro




From loureiro@talgo.uvigo.es  Mon Aug 20 18:08:24 2001
Date: Mon, 20 Aug 2001 19:08:24 +0200 (CEST)
From: Gonzalo Gonzalez Rodriguez loureiro@talgo.uvigo.es
Subject: [pxc] Installation problem with "make"

Hi!

Now my driver compiles and installs :)

I made a clean-up in my kernel, and tried to start from scratch. I'd been
trying to put down to work the bttv driver at the same time, and maybe
something collides between them.

The only problem I have now is that I got no display (neither any error )
when I run pxc_xgrab... seems it is waiting for something to happen, no X
window at all :?

But I guess I have to work this out... it's hard to be a newbie :)

Thanks for your patience,
-- 


			Gonzalo González Rodríguez
			loureiro@talgo.uvigo.es





From rubini@gnu.org  Mon Aug 27 10:43:52 2001
Date: Mon, 27 Aug 2001 11:43:52 +0200
From: Alessandro Rubini rubini@gnu.org
Subject: [pxc] Installation problem with "make"

> The only problem I have now is that I got no display (neither any error )
> when I run pxc_xgrab...

Then, probably, you are not getting any data from the device. Thus
the X application is stuck in the read() system call. You can check
that by running
	cat /dev/pxc0 > /tmp/pxc.pgm
or anything similar. If the "cat" command doesn't complete than that
is the problem.

You could also use "strace" to diagnose these problems (this is a generic
suggestion, not specific to this issue.

Also, you'll probably find some information in /var/log/kern.log or
equivalent file. And pxc_test may help as well.

Hope this helps, though late
/alessandro



