I have downloaded the updated ebuilds and patches for psb-kmod and xf86-video-psb, but the new kernel seems to have had some changes:
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1 ...
make -j15 -l8 DRM_MODULES=psb
make -C /usr/src/linux SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
make: Entering directory `/usr/src/linux-2.6.37-gentoo'
Makefile:546: /usr/src/linux-2.6.37-gentoo/arch/amd64/Makefile: No such file or directory
make: *** No rule to make target `/usr/src/linux-2.6.37-gentoo/arch/amd64/Makefile'. Stop.
make: Leaving directory `/usr/src/linux-2.6.37-gentoo'
make: *** [modules] Error 2
--- okay. The old arch/amd64 directory is gone, the x86 folder now is unified for both i386 and x86_64.
I added a symlink from x86 to amd64 and tried again:
Second try: (Warning! For some riddle of a reason I do not understand, I can't get the output to something else but german. Even exporting LANG and LC_ALL with "C" does not change it. So here is a google translated log. Sorry about that!)
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.c: compat_drm_version In function ':
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.c: 106:200: warning: passing argument 1 of 'drm_ioctl 'from incompatible pointer type
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drmP.h: 947:13: Note: expected 'struct file *, "but argument is of type 'struct inode *'
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.c: 106:200: warning: passing argument 2 of 'drm_ioctl 'makes integer from pointer without a cast
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drmP.h: 947:13: Note: expected 'unsigned int' but argument is of type "struct file *"
/ Var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.c: 106:200: error: 'drm_ioctl too many arguments to function "
(... and a lot more such messages until finally:)
make : *** [/ var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1/drm_ioc32.o] Error 1
make : *** [_module_/var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1] Error 2
make : Leaving directory `/ usr/src/linux-2.6.37-gentoo '
make: *** [modules] Error 2
* ERROR: x11-drivers/psb-kmod-4.41.1_p10-r3 failed:
* (No error message)
* Call stack:
* Ebuild.sh, line 56: Called src_compile
* Environment, line 3662: Called die
* The specific snippet of code:
* LINUXDIR = / usr / src / linux emake DRM_MODULES = psb | | die
* If you need support, post the output of 'emerge - info = x11-drivers/psb-kmod-4.41.1_p10-r3'
* The complete build log and the output of 'emerge-PQV = x11-drivers/psb-kmod-4.41.1_p10-r3'.
* This ebuild is from an overlay named 'SED-local': '/ usr / local / portage /'
* The complete build log is located at '/ var/log/portage/x11-drivers: psb-kmod 4.41.1_p10-r3 :20110202-115 748 log.'.
* The ebuild environment file is located at '/ var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/temp/environment'.
* S: '/ var/tmp/portage/x11-drivers/psb-kmod-4.41.1_p10-r3/work/psb-kernel-source-4.41.1'
I'll add the full (translated) logs as attachment.
It seems only drmP.h and drm_ioc32.c are involved.
P.S.: Getting a brand new laptop with 4GiB RAM and an Intel i7 is awesome. Noticing that it has a wretched GMA500 Poulsbo chipset is awful. :-(
Created attachment 261344 [details]
Log of the first try
This is the log before adding a symlink in /usr/src/linux/arch from x86 to amd64
Created attachment 261345 [details]
Log of the second try
This is the log after adding said symlink
Unfortunately I get the same errors when trying to build against 2.6.36 kernel.
Okay. The first error happens, because linux-mod_pkg_setup does not set ARCH to x86 with a recent kernel, but amd64. Adding a call to set_arch_to_kernel fixed that.
The second set of errors, well, I fixed them and added a patch, and everything compiles now on my old dev machine. (The one I have to wipe tomorrow, this is why I am in such a hurry and have hijacked at least three other bugs. Sorry about that!)
Created attachment 261376 [details]
Updated ebuild, adding right arch and patchin drm_ioc32.c
This is the updated ebuild that (with the following patch) fixes the reported errors on my test machine.
I can test the stuff on the target machine tomorrow, when I am back at work.
Created attachment 261377 [details, diff]
Fixes calls to psb_drm_ioctl() on amd64 machines
I do not know whether this works out tomorrow. The patched file has a header saying it is about "32bit compatibility". For what on a 64bit machine? Maybe it gets compiled but not linked in? I'll see tomorrow.
I just learned from Peter John Hartman in Bug 274184 comment 53, that there is a new advance on the Poulsbo at launchpad.net/emgd. Besides this new ebuild and patch, I'll give those Ubuntu people a try tomorrow.
My patched ebuild compiles fine, the module loads without problems into the kernel, and X exits with "(EE) No devices detected"
First: I used this site here http://www.cs.bham.ac.uk/~axs/laptop/#config as a reference which states:
"Graphics: Intel. HD Graphics With Express Card, Often referred to as Intel GMA 500 (or Poulsbo)"
The author has the same laptop, a dell latitude e6410, like me. So I took that information for granted. (Big mistake)
But the above message from X let me take a closer look at all those specs out there.
I couldn't find any of the chipset identifiers for GMA500 in what lspci tells me. ( http://en.wikipedia.org/wiki/Intel_GMA#Specifications ) So I took a closer look at /proc/cpuinfo, and it seems that Dell send over a more polished model of the Latitude E6410 than we expected. The CPU is said to be an Intel Core i7 640M, which has not "Poulsbo", but "Arrandale" (Aka GMA HD) built in. (And the reference to GMA500 on the website above was due to an "Express Card", a detail I didn't notice on first sight.)
So nicely enough I made this ebuild compile, install and load fine on amd64 with gentoo-sources-2.6.37, but I can't use it.
However, it got me some nice insights into kernel and driver development last night. ;)