Compiling kernel IEGD 10.x module for any Linux distribution
Intel has put great effort to put complete open-source drivers into recent kernels for its devices. Only device that is clearly missing there is GMA500 (aka Poulsbo, aka US15 chipset, aka Atom Z5xx family). This is understood as it does relay on Imagination Technologies PowerVR core licensed out by Intel to produce GMA500, so most of the driver parts cannot go open-source as it would imply of violation of some agreement between ImgTec and Intel.
Fortunately Intel provides binary driver set called Intel® Embedded Graphics Driver (IEGD) supporting all embedded video chipsets, containing binary form of video driver libraries for latest Xorg, OpenGL and VA.
While most of the work you need to do is to have IEGD_10_3_Linux.tgz file (in case of IEGD 10.3) extracted onto the target box and to copy various .so files in proper places (follow IEGD documentation). Yet there is one more complicated thing extra – IEGD Kernel Module (IKM) iegd_mod.ko that has to be compiled out of the source shipped with IEGD.
Linux Kernel module
IEGD documentation clearly states that only few distributions are supported by this driver, and those are i.e. Fedora 8 & 10, some older Ubuntu 8.x and finally Moblin. But what about others, such as Debian, newer Ubuntu. You think you are unlucky running other distro? You shall understand word “supported” here as “tested”.
Reading the documentation, in all cases your are supposed to enter IKM folder of extracted drivers and launch install.sh script. This script shall compile and install without any hassle IKM on “supported” distributions. Surprisingly trying that on your distribution even it is not supported may work too! With one important exception it produces bogus driver that will crash your kernel.
Finding the proper way for your distribution
This recipe will save some few hours upto few days of struggling with fancy errors trying to compile and run the IKM module on your system
Investigating the driver and install.sh first thing to notice is that it checks you Kernel version, it also takes (false) assumption that your are running one of the “supported” distros, so i.e 2.6.27 may mean Fedora version of the 2.6.27 Kernel not any 2.6.27 kernel.
Linux distributions have this fancy characteristic that they usually come with heavily patched kernel, so when you take 2.6.xx driver module from one distro and try to run it on the same version kernel on the other distro it will likely crash your kernel. Why? Incompatible ABI.
What Intel (Tungsten?) did in IKM is prepared IKM/val subfolder with headers extracted from several kernel sources of “supported” distributions. And what install.sh does, it tries to guess which one of DRM and AGP kernel module headers placed in that subfolder are OK for your Kernel.
In case you are running on the “unsupported” distribution the answer in 95% cases is NONE! Even you will be able to compile the iegd_mod.ko using Makefile produced by install.sh the module will crash you kernel as soon you will try to use it. Since your kernel has incompatible ABI (different structures) with the ABI provided inside IKM/val subfolder.
Preparing for compilation of IKM for your own kernel
If you are running “unsupported” distribution you should avoid then using headers in IKM/val subfolder. The right way is to take AGP and DRM headers out of your running kernel sources (you don’t have to compile the whole kernel of course).
So go to IEGD_10_3_Linux folder and launch:
sudo apt-get install linux-headers-x.y.zz apt-get source linux-image-x.y.zz
Where x.y.zz is your running kernel version. (Use your own distro command to grab kernel source if you don’t run on Debian or Ubuntu)
This will install kernel headers and scripts to build kernel modules and also produce linux-x.y.zz folder containing source code of your running Kernel. The whole trick if to place (replace) Makefile in IKM folder as below:
KERNELVER ?= $(shell uname -r)
KERNELDIR ?= /lib/modules/$(KERNELVER)/build
INSTALLDIR ?= /lib/modules/$(KERNELVER)/kernel/drivers/char/agp
PWD ?= $(realpath .)
EXTRA_CFLAGS += -I$(PWD)/include
EXTRA_CFLAGS += -I$(PWD)/../linux-$(KERNELVER)/drivers/char/agp
EXTRA_CFLAGS += -I/lib/modules/$(KERNELVER)/build/include/drm
@echo $(PWD)
@$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
install -o root -g root -m 755 -d $(INSTALLDIR)
install -o root -g root -m 744 iegd_mod.ko $(INSTALLDIR)
/sbin/depmod -a
rm -rf $(INSTALLDIR)/iegd_mod.ko
/sbin/depmod -a
@rm -f *.o iegd*.ko iegd*.mod.c iegd*.o agp/*.o drm/*.o Module.symvers
@rm -fr .intel* .tmp* .*.cmd agp/.*.cmd drm/.*.cmd
obj-m := iegd_mod.o
iegd_mod-objs := agp/pci.o agp/global.o agp/drv_alm.o agp/drv_nap.o agp/drv_plb.o agp/drv_cmn.o agp/drv_gn4.o drm/iegd_drv.o drm/iegd_interface.o drm/iegd_interface_265.o drm/iegd_interface_2611.o drm/iegd_interface_2615.o drm/iegd_interface_2624.o drm/psb_irq.o
You don’t need to launch install.sh at all. Just paste the file as above.
As you see now, this Makefile references to ../linux-$(KERNELVER) for your running Kernel source AGP & DRM headers. Yet however you may still need to do few tweaks in your Makefile, see notes below:
Note (1) In case you are running older kernel, /lib/modules/$(KERNELVER)/build/include/drm may not exist, then $(PWD)/../linux-$(KERNELVER)/drivers/char/drm should be right path to put in the Makefile instead.
Note (2) The Kernel source code folder you downloaded (i.e. via apt-get source) may not actually match exactly linux-$(KERNELVER), so you may change that EXTRA_CFLAGS setting manually:
- In case of Ubuntu `uname -r` is 2.6.31-19-generic while the extracted source folder name has no -generic suffix and it is just linux-2.6.31-19.
- In case of Debian `uname -r` is 2.6.26-21 while the extracted source folder name is linux-2.6-2.6.26-21. Weird huh?
Final fixes before compilation
There is a file still missing if you try now to `make`. It is file that exists in IKM/val/agp but does not exist in your $(PWD)/../linux-$(KERNELVER)/drivers/char/agp. It is called interface_abs.h.
Wonder why the heck it is NOT in IKM/include!? This is a little lack of consequence from Intel here.
Anyway just copy interface_abs.h into IKM/include out of IKM/val/agp/agpm0vmob2 if you are running on >= 2.6.30 Kernel or from IKM/val/agp/agpm0v103 otherwise. The only difference between interface_abs.h from agpm0vmob2 and agpm0v103 is one macro definition.
Finally we need two little extra fixes.
(1) Trying to compile on Debian Lenny we will get many nasty errors from kernel headers for IKM/drm/iegd_interface.c. Moving igd_abs.h inclusion in this source file little down fixes the issue. Edit IKM/drm/iegd_interface.c as below:
#include "iegd.h" -#include "igd_abs.h" #include "drmP.h" #include "drm.h" +#include "igd_abs.h" #include "iegd_drm.h" #include "iegd_drv.h" #include "psb_intregs.h"
(2) IKM/drm/iegd_drv.c tries to include linux/config.h at the very begining of the file. This is not actually necessary, and anyway does not exist, so you may comment that out:
-#include <linux/config.h> +/* #include <linux/config.h> */
Compiling at last
Now you are ready to so `make` and `sudo make install`. This time iegd_mod.ko should be ABI compatible with your kernel.
I have tested this method on Debian 5.0 Lenny and Ubuntu 9.10 Karmic Koala.
To ensure everything works fine after driver installation try:
sudo modprobe iegd_mod
And try to go into IKM/agp and compile and run agp_test.c:
gcc -o agp_test agp_test.c sudo ./agp_test
Next try the same with IKM/drm compiling and running drm_test.c.
If those two test won’t fail and won’t blow your kernel it means you have fully working IEGD module on your own Linux distro.
Notes for users of old psb-modules or psb-kernel-source Ubuntu package
Older psb-modules and psb-kernel-source Ubuntu packages install their own incompatible drm.ko module at /lib/modules/`uname -r`/updates/char/drm.
Check find /lib/modules/`uname -r` -type f -name 'drm*' you should have only one: /lib/modules/`uname -r`/kernel/drivers/gpu/drm/drm.ko
In case if you find other drm.ko, probably in updates/char/drm delete it. That one came from psb-kernel-source and is causing you a trouble. You may ensure you got only valid drm.ko reinstalling your kernel image with:
apt-get install --reinstall linux-image-`uname -r`
Notes for curious
The difference of Makefile of mine and Makefile produced of install.sh is the beginning:
KERNELVER ?= $(shell uname -r)
KERNELDIR ?= /lib/modules/$(KERNELVER)/build
INSTALLDIR ?= /lib/modules/$(KERNELVER)/kernel/drivers/char/agp
PWD ?= $(realpath .)
EXTRA_CFLAGS += -I$(PWD)/include
EXTRA_CFLAGS += -I$(PWD)/../linux-$(KERNELVER)/drivers/char/agp
EXTRA_CFLAGS += -I/lib/modules/$(KERNELVER)/build/include/drm
If you try to run install.sh EXTRA_CFLAGS will include two of IKM/val folders which contain some Kernel source extracted header definitions that are likely not compatible with your Kernel.
I use also PWD ?= $(realpath .) here instead of PWD ?= $(shell pwd) because with some Linux headers versions $(shell pwd) resolves to /lib/modules path not the path where IKM sources are.
Notes for Intel
It would be nice for next IEGD release if IKM source tree would be made for readable and clear:
- IKM/val should be renamed to IKM/kernel-headers (what the heck “val” means here ?!) and this should be noted somewhere in docs that files here are NOT made by Intel but extracted of “supported” Linux distributions Kernel sources
- interface_abs.h should moved away from IKM/val (IKM/kernel-headers) to avoid confusion (with point 1) and placed into IKM/includes (and there should be #ifdef for this one macro that makes it different for across 2.6.30)
- IKM/drm/iegd_interface.c should be fixed as described above (moving iegd_abs.h inclusion little bit down).
- IKM/drm/iegd_drv.c inclusion of <include/config.h> is not necessary, may be removed.
- Finally install.sh should contain case when running on “unsupported” distribution.
So it shall make SURE if running on “supported” distributions and then and only then use files from IKM/kernel-headers, OTHERWISE ask for a path for your own Linux distribution Kernel source’s to find a path for your own kernel/drivers/char/agp and kernel/drivers/char/drm (include/drm) i.e. by showing:Your Linux distribution and Kernel version was untested, however you may try to compile and run driver on your own risk. Please provide your running kernel sources extracted i.e. on Debian or Ubuntu using apt-get source linux-image-2.6-686: [path to your kernel]:

@ishu: Thanks for the feedback! I updated my recipe and added one extra point for Intel consideration – IKM/drm/iegd_drv.c inclusion of <include/config.h> is not necessary, may be removed.
@denis:
Let me know if you succeeded and thanks for you comment.
@ishu: Oh wow… I totally missed http://edc.intel.com/Download.aspx?id=2796&returnurl=/Software/Downloads/IEGD/default.aspx document at EDC site. Indeed it clarifies a lot, I will read it trough later on.
[...] the article here: nanoANT » Blog Archive » Compiling kernel IEGD 10.x module for any … Posted in: Kernels ADD [...]
Adam,
You really need to post links to this on all the forums discussing IEGD. I have spent 4 days trying to get the kernel module to compile on kernel 2.6.32.8 and xserver 1.6.3.901. I finally got it compiled but crashed. Then I came across this instrution. You perfectly explained the problem and the solution. Within 30min I had it up and running. I owe you big time.
I have an Acer AO751h with the US15W/GMA500 chipset.
thank you, thank you, thank you!
Hi Adam,
after removing #include <linux/config.h> things look very promising and the module will be compiled without errors. make install runs fine, too but:
root@schirin-nb:/usr/local/IEGD_10_3_Linux/IKM# modprobe iegd_mod
FATAL: Error inserting iegd_mod (/lib/modules/2.6.31-14-generic/kernel/drivers/char/agp/iegd_mod.ko): Unknown symbol in module, or unknown parameter
dmesg output:
[ 2585.757960] iegd_mod: disagrees about version of symbol drm_open
[ 2585.757973] iegd_mod: Unknown symbol drm_open
[ 2585.758366] iegd_mod: disagrees about version of symbol drm_fasync
[ 2585.758378] iegd_mod: Unknown symbol drm_fasync
[ 2585.759268] iegd_mod: disagrees about version of symbol drm_poll
[ 2585.759281] iegd_mod: Unknown symbol drm_poll
[ 2585.760336] iegd_mod: Unknown symbol drm_ut_debug_printk
[ 2585.760605] iegd_mod: disagrees about version of symbol drm_core_get_reg_ofs
[ 2585.760611] iegd_mod: Unknown symbol drm_core_get_reg_ofs
[ 2585.761601] iegd_mod: disagrees about version of symbol drm_irq_uninstall
[ 2585.761608] iegd_mod: Unknown symbol drm_irq_uninstall
[ 2585.762196] iegd_mod: disagrees about version of symbol drm_ioctl
[ 2585.762202] iegd_mod: Unknown symbol drm_ioctl
[ 2585.762819] iegd_mod: disagrees about version of symbol drm_exit
[ 2585.762825] iegd_mod: Unknown symbol drm_exit
[ 2585.763239] iegd_mod: disagrees about version of symbol drm_core_get_map_ofs
[ 2585.763245] iegd_mod: Unknown symbol drm_core_get_map_ofs
[ 2585.763846] iegd_mod: disagrees about version of symbol drm_init
[ 2585.763852] iegd_mod: Unknown symbol drm_init
[ 2585.765555] iegd_mod: disagrees about version of symbol drm_irq_install
[ 2585.765571] iegd_mod: Unknown symbol drm_irq_install
[ 2585.769033] iegd_mod: disagrees about version of symbol drm_mmap
[ 2585.769048] iegd_mod: Unknown symbol drm_mmap
[ 2585.771250] iegd_mod: disagrees about version of symbol drm_core_reclaim_buffers
[ 2585.771260] iegd_mod: Unknown symbol drm_core_reclaim_buffers
[ 2585.772001] iegd_mod: disagrees about version of symbol drm_release
[ 2585.772010] iegd_mod: Unknown symbol drm_release
I tried with 2.6.31-19-generic and with 2.6.31-14-generic. Does it matter that I already have the psb-kernel-source packages installed? They change some drm stuff, iirc.
regards
denis
@denis: Indeed old psb-kernel-source package installs its own incompatible drm.ko at /lib/modules/2.6.31-19-generic/updates/char/drm. Check find /lib/modules/2.6.31-19-generic -type f -name 'drm*' you should have only one: /lib/modules/2.6.31-19-generic/kernel/drivers/gpu/drm/drm.ko
In case if you find other drm.ko, probably in updates/char/drm delete it. That one came from psb-kernel-source and is causing you a trouble.
You may ensure you got only valid drm.ko reinstalling apt-get install --reinstall linux-image-2.6.31-19-generic
@cgriffith: Thanks for kind words. If you are registered on any of such forums treating about IEGD installation on some Linux distributions please feel free to post link to this instruction. I have posted links myself on Intel‘s EDC forums and libva mailing list.
Hi Adam,
I am trying to install IEGD 10.3 on Ubunut 9.10 following the instruction you have put up here.
But when I do a “make” I am getting the following error.
# sudo make
/home/sambhav/IEGD_10_3_Linux/IKM
make[1]: Entering directory `/usr/src/linux-headers-2.6.31-14-generic’
CC [M] /home/sambhav/IEGD_10_3_Linux/IKM/agp/pci.o
In file included from /home/sambhav/IEGD_10_3_Linux/IKM/agp/pci.c:29:
/home/sambhav/IEGD_10_3_Linux/IKM/include/global.h:132: warning: parameter names (without types) in function declaration
CC [M] /home/sambhav/IEGD_10_3_Linux/IKM/agp/global.o
In file included from /home/sambhav/IEGD_10_3_Linux/IKM/agp/global.c:24:
/home/sambhav/IEGD_10_3_Linux/IKM/include/global.h:132: warning: parameter names (without types) in function declaration
CC [M] /home/sambhav/IEGD_10_3_Linux/IKM/agp/drv_alm.o
In file included from /home/sambhav/IEGD_10_3_Linux/IKM/agp/drv_alm.c:24:
/home/sambhav/IEGD_10_3_Linux/IKM/include/global.h:132: warning: parameter names (without types) in function declaration
/home/sambhav/IEGD_10_3_Linux/IKM/agp/drv_alm.c:67: error: ‘iegd_cmn_mask_memory’ undeclared here (not in a function)
/home/sambhav/IEGD_10_3_Linux/IKM/agp/drv_alm.c: In function ‘iegd_alm_insert_entries’:
/home/sambhav/IEGD_10_3_Linux/IKM/agp/drv_alm.c:396: error: ‘struct agp_memory’ has no member named ‘memory’
make[2]: *** [/home/sambhav/IEGD_10_3_Linux/IKM/agp/drv_alm.o] Error 1
make[1]: *** [_module_/home/sambhav/IEGD_10_3_Linux/IKM] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-14-generic’
make: *** [modules] Error 2
Could you please help me in resolving the error?
Regards,
Sambhav
@Sambhav: Ensure you got interface_abs.h copied to IKM/include from IKM/val/agp/agpm0vmob2 not other IKM/val/agp/...
@ Sambhav
I had the same problem. I sobstituted line 594 of drv_cmn.c with this :
unsigned long address = page_to_phys(addr);
(see http://ubuntuforums.org/showpost.php?p=8479406&postcount=6)
and I was able to compile the driver. However that solution could be complitely wrong and I was unable to test the driver becouse dmesg says:
drm_psb: exports duplicate symbol drm_order
And now is time to go to bad
@Adam:
I forgot: THANK YOU!:)
Hi Adam,
Thanks. I was able to compile IKM and install IEGD 10.3 on Ubunut 9.10
My app is not decoding P frames properly in IEGD 10.3.
Proper decoding was happening on IEGD 10.2.
After switching to 10.3 only I frame is getting decoded properly. My decoder support only I and P frames.
Is there any change in the interpretation of the data between the 2 versions ?
Regards,
Sambhav
@Sambhav: I have absolutely not idea what has changed between 10.2 and 10.3. I am not Intel’s employee, and can’t tell anything about VA (or GL) drivers that are available only in binary form, even I wish to. I have also hit few showstoppers with IEGD drivers that made me stuck with my application. One of them is latest IEGD VA drivers are unable to handle multithreaded apps. Application simply crashes everytime you try to access VA driver from multiple threads.
While it was working fine with so called PSB drivers from 2008, it doesn’t work anymore with latest IEGD.
I think you can post about your problems here: http://community.edc.intel.com/
From my side I am trying to apply for some CNDA trough EDC site, so I can have some support ticket for my problems. I think this is most resonable solution there.
Adam,
Thank you.
I have posted the problem in Intel Support.
I see my multithreaded app crash after I switched to Ubuntu 9.10 and Moblin IVI 2.1 (both with X-server 1.6.x) with IEGD 10.2 and 10.3.
My suspicion is on the X-server version (not sure)
But the same multithreaded app used to run fine with Ubuntu 8.04 with IEGD 10.2.
Thanks again for the article.
Regards,
Sambhav
Adam,
As with the rest of the posters here, I’d like to take a moment to thank you for this walk through.
Because I am a Acer Aspire One 751h owner I’ve been wrestling with the psb-modules and psb-kernel-source
packages since day one and as such am seriously looking forward to testing these new Intel supported drivers.
Have you noticed any improvements performance wise after making the move to IEGD?
Regards,
JoshG
JoshG,
I have to say that the 10.3 drivers do show increased performance in a very non-emperical way. Before I used these drivers, I was unable to watch movies because frame dropping made it unbearable. Now I can. However, there are serious instability issues. I can not suspend or hibernate, If I switch between X and virtual terminal, I get a kernel panic. If my desktop goes into powersave mode, I am unable to recover. And under some (non-reproducible) circumstances, the system just hangs. Not sure it is worth it.
I look forward to hearing how others mileage turns out. FYI, I am using an AO751h, with kernel 2.6.32.8 and xserver 1.6.3.901.
Does this driver work with xserver 1.7?
@billiob: Probably not since IEGD is shipped with Xorg drivers up to 1.6.4 version, so Xorg gonna complain about incompatible release number.
Hi Adam,
I am trying to install IEGD 10.3 on Ubunut Remix 9.10 following the instruction
But I am getting the following error. Can you help me to fix it?
/usr/src/IEGD_10_3_Linux/IKM
make[1]: 正在进入目录 `/usr/src/linux-2.6.31′
CC [M] /usr/src/IEGD_10_3_Linux/IKM/agp/pci.o
CC [M] /usr/src/IEGD_10_3_Linux/IKM/agp/global.o
CC [M] /usr/src/IEGD_10_3_Linux/IKM/agp/drv_alm.o
CC [M] /usr/src/IEGD_10_3_Linux/IKM/agp/drv_nap.o
CC [M] /usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.o
/usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.c: In function ‘iegd_plb_insert_entries’:
/usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.c:692: error: implicit declaration of function ‘dec_mm_counter’
/usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.c:692: error: ‘file_rss’ undeclared (first use in this function)
/usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.c:692: error: (Each undeclared identifier is reported only once
/usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.c:692: error: for each function it appears in.)
/usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.c: In function ‘iegd_plb_remove_entries’:
/usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.c:801: error: ‘file_rss’ undeclared (first use in this function)
make[2]: *** [/usr/src/IEGD_10_3_Linux/IKM/agp/drv_plb.o] 错误 1
make[1]: *** [_module_/usr/src/IEGD_10_3_Linux/IKM] 错误 2
make[1]:正在离开目录 `/usr/src/linux-2.6.31′
make: *** [modules] 错误 2
Hi
I use Sidux with 2.6.33 kernel.
Unfortunatelly I got error message:
root@sidux751:~/IEGD_10_3_Linux/IKM# make
/root/IEGD_10_3_Linux/IKM
make[1]: Entering directory `/usr/src/linux-headers-2.6.33-0.slh.4-sidux-686′
CC [M] /root/IEGD_10_3_Linux/IKM/agp/pci.o
CC [M] /root/IEGD_10_3_Linux/IKM/agp/global.o
CC [M] /root/IEGD_10_3_Linux/IKM/agp/drv_alm.o
/root/IEGD_10_3_Linux/IKM/agp/drv_alm.c:67: warning: initialization from incompatible pointer type
/root/IEGD_10_3_Linux/IKM/agp/drv_alm.c: In function ‘iegd_alm_insert_entries’:
/root/IEGD_10_3_Linux/IKM/agp/drv_alm.c:396: warning: passing argument 2 of ‘agp_bridge->driver->mask_memory’ makes integer from pointer without a cast
/root/IEGD_10_3_Linux/IKM/agp/drv_alm.c:396: note: expected ‘long unsigned int’ but argument is of type ‘struct page *’
CC [M] /root/IEGD_10_3_Linux/IKM/agp/drv_nap.o
/root/IEGD_10_3_Linux/IKM/agp/drv_nap.c:63: warning: initialization from incompatible pointer type
CC [M] /root/IEGD_10_3_Linux/IKM/agp/drv_plb.o
/root/IEGD_10_3_Linux/IKM/agp/drv_plb.c:76: warning: initialization from incompatible pointer type
/root/IEGD_10_3_Linux/IKM/agp/drv_plb.c: In function ‘iegd_plb_insert_entries’:
/root/IEGD_10_3_Linux/IKM/agp/drv_plb.c:625: warning: passing argument 2 of ‘agp_bridge->driver->mask_memory’ makes integer from pointer without a cast
/root/IEGD_10_3_Linux/IKM/agp/drv_plb.c:625: note: expected ‘long unsigned int’ but argument is of type ‘struct page *’
/root/IEGD_10_3_Linux/IKM/agp/drv_plb.c:637: warning: passing argument 2 of ‘agp_bridge->driver->mask_memory’ makes integer from pointer without a cast
/root/IEGD_10_3_Linux/IKM/agp/drv_plb.c:637: note: expected ‘long unsigned int’ but argument is of type ‘struct page *’
/root/IEGD_10_3_Linux/IKM/agp/drv_plb.c:639: warning: passing argument 2 of ‘agp_bridge->driver->mask_memory’ makes integer from pointer without a cast
/root/IEGD_10_3_Linux/IKM/agp/drv_plb.c:639: note: expected ‘long unsigned int’ but argument is of type ‘struct page *’
CC [M] /root/IEGD_10_3_Linux/IKM/agp/drv_cmn.o
/root/IEGD_10_3_Linux/IKM/agp/drv_cmn.c: In function ‘iegd_cmn_mask_memory’:
/root/IEGD_10_3_Linux/IKM/agp/drv_cmn.c:594: error: implicit declaration of function ‘phys_to_gart’
/root/IEGD_10_3_Linux/IKM/agp/drv_cmn.c: In function ‘iegd_cmn_insert_entries’:
/root/IEGD_10_3_Linux/IKM/agp/drv_cmn.c:642: warning: passing argument 2 of ‘agp_bridge->driver->mask_memory’ makes integer from pointer without a cast
/root/IEGD_10_3_Linux/IKM/agp/drv_cmn.c:642: note: expected ‘long unsigned int’ but argument is of type ‘struct page *’
make[2]: *** [/root/IEGD_10_3_Linux/IKM/agp/drv_cmn.o] Error 1
make[1]: *** [_module_/root/IEGD_10_3_Linux/IKM] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.33-0.slh.4-sidux-686′
make: *** [modules] Error 2
Could you help me?
Regards
[...] nanoANT » Blog Archive » Compiling kernel IEGD 10.x module for any Linux distribution [...]
Hello All!!!
Could someone tell me Where can I get the package IEGD_10_3_Linux.tgz Please???
Thankyou!!!
Hi
Thanks to your howto, I made a package for openSUSE :
http://download.opensuse.org/repositories/home:/vlj:/IEGD/standard/
I would like to get a working xorg.conf ; mine is not optimal, for instance I cannot get vt switch to work (when i hit ctrl alt f1 my display freeze),
compiz/kwin dont work, and openarena is very very slow (5 fps at min settings…on windowsseven it’s around 30fps at max settings with IEGD 10.3).
I get 2500 frame in 5 sec under glxgears.
I pretend to compile IEGD 10.3.1 on my Ubuntu 9.10
I have downloaded the moblin version (because I think this is the most similar to Ubuntu) but I obtain just what seems to be a Windows version!
Any hints on how to download the Linux version of the IEGD?
Hi,
I have same error as at Charles. I have solved the problem with driver on my Ubuntu 9.10 (2.6.31-20) on this link
https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo/
[...] files is basically OK. However to build the kernel module I followed instructions on nanoANT: Compiling kernel IEGD 10.x module for any Linux distribution. Except that I hardcoded most path in the makefile and used the linux-source-2.6.32 package and not [...]
Hi,
As IEGD require xserver 1.6, I did rebuild the debian package of the old xserver 1.6 with the rest of xorg 7.5 basically unmodified. And this worked !
The explanations and debian (squeese) packages are on my blog:
http://silicone.homelinux.org/2010/04/11/building-xserver-1-6-for-xorg-7-5/
This blog was a great help for building the IKM, so thanks a lot !
Sometime X freezes, I wonder wether my xorg build is bad or if other IEGD users experienced the same (this would be an intel bug then).
Can you just fix my name in my previous comment while moderating it. Thanks.
Also I probably should have written: “Your blog was a great help for building the IKM, so thanks a lot !” instead…
[...] Compile IEGD on any Linux Kernel [...]
Great guide!!!
The 10.3.1 IEGD Driver has a quite good performance (glxgears) compared to previous releases. However, I’ve some problems in my virtual terminals.
When I switch to a virtual terminal (Ctrl + Alt + F1), it uses a resolution that my display does not support. Is there any way to change it???
@jsabater
I had seen a similar issue (I think). When I switched to a virtual terminal, I saw eight small versions of the console. I rebooted and added vga=792 to boot parameters and now it works fine. I surmised that something got confused and did not know what resolution to use, but since I explicitly stated it, it now knows.
Hi Adam,
I found your site and am trying to compile IKM for a 2.6.32.11-kernel.
I did all step steps you wrote above, but get the following error:
make[1]: Betrete Verzeichnis ‘/usr/src/linux-2.6.32.11′
CC [M] /root/Desktop/IKM/agp/pci.o
/root/Desktop/IKM/agp/pci.c:28:17: error: agp.h: No such file or directory
In file included from /root/Desktop/IKM/include/global.h:31,
from /root/Desktop/IKM/agp/pci.c:29:
/root/Desktop/IKM/include/igd_gart.h:76: error: field ‘driver_func’ has incomplete type
In file included from /root/Desktop/IKM/agp/pci.c:29:
/root/Desktop/IKM/include/global.h:50: error: array type has incomplete element type
/root/Desktop/IKM/include/global.h:51: error: array type has incomplete element type
/root/Desktop/IKM/include/global.h:52: error: array type has incomplete element type
/root/Desktop/IKM/include/global.h:53: error: array type has incomplete element type
/root/Desktop/IKM/include/global.h:54: error: array type has incomplete element type
/root/Desktop/IKM/include/global.h:55: error: array type has incomplete element type
/root/Desktop/IKM/include/global.h:56: error: array type has incomplete element type
/root/Desktop/IKM/include/global.h:66: error: array type has incomplete element type
/root/Desktop/IKM/agp/pci.c: In function ‘iegd_intel_probe’:
/root/Desktop/IKM/agp/pci.c:239: error: implicit declaration of function ‘agp_alloc_bridge’
/root/Desktop/IKM/agp/pci.c:239: warning: assignment makes pointer from integer without a cast
/root/Desktop/IKM/agp/pci.c:246: error: implicit declaration of function ‘agp_put_bridge’
/root/Desktop/IKM/agp/pci.c:256: error: dereferencing pointer to incomplete type
/root/Desktop/IKM/agp/pci.c:263: error: dereferencing pointer to incomplete type
/root/Desktop/IKM/agp/pci.c:272: error: dereferencing pointer to incomplete type
/root/Desktop/IKM/agp/pci.c:273: error: dereferencing pointer to incomplete type
/root/Desktop/IKM/agp/pci.c:274: error: dereferencing pointer to incomplete type
/root/Desktop/IKM/agp/pci.c:295: error: dereferencing pointer to incomplete type
/root/Desktop/IKM/agp/pci.c:296: error: dereferencing pointer to incomplete type
/root/Desktop/IKM/agp/pci.c:301: error: implicit declaration of function ‘agp_add_bridge’
make[2]: *** [/root/Desktop/IKM/agp/pci.o] Fehler 1
make[1]: *** [_module_/root/Desktop/IKM] Fehler 2
make[1]: Verlasse Verzeichnis ‘/usr/src/linux-2.6.32.11′
make: *** [modules] Fehler 2
Any idea what I am doing wrong and how to fix?
Running this on Ubuntu 9.10..
thank you!
Hmm, I want to try IEGD, but can I just follow these instructions straightforward? I’m on Ubuntu 9.10 and I have beginner to slight intermediate linux skills lol
Hi – just looked at the intel site for the download and its a wopping 130meg! This is ludicrous for a kernel and X module. Add to that i have no windows box and no desire to install wine. Can anybody provide a link to the tar.gz required? i would be most greatful.
@gforums: Make sure your Makefiles EXTRA_CFLAGS is pointing to existing directories (one of them should contain agp.h)
@Espionage724: Well this is main distro I have used for IEGD compilation. Try, if you have any trouble please post below.
@mangodan: I am afraid we can’t give you any link to that TGZ that is contained in IEGD installer. Only thing you can do is ask Intel at their forums at edc.intel.com. Those are their drivers and software so distributing it without their permissions can have legal consequences.
Hi !
Thanks for this article, it is really useful.
I’ve got a problem. I’ve compiled the driver correctly but when I insert it with insmod or modprobe, I’ve got this error : iegd_mod : Unknow symbol drm_irq_install.
I’ve tested to unload drm.ko and to reload it, but I’ve the same error…
Thanks for your help!
@RH: Can you check you don’t have somewhere in modules directory another drm.ko file hanging around, like older one coming with Poulsbo driver?
I’ve checked and there is no drm.ko in the directory. DRM is integrated in the kernel (not in module mode). Is it the reason why it doesn’t work?
I have externalized the drm driver, and there is no problem with it. The iegd driver has the same problem with the drm externalized driver…
Ok I know the problem :
- In the file iegd_interface.c, the function drm_irq_install is declared only if you have a kernel < 2.6.27.7. But I have a 2.6.27.7 kernel and in the include file (drm.h and drmP.h) of the kernel, this function is not declared. So I modified each test to kernel <= 2.6.27.7
But yet I have another problem… Other functions are not declared in my drm version.. Do you know if it is possible to upgrade the drm version of the kernel? If yes, do you have link where I can download a newer version? Or am I obliged to change the entire kernel version?
Thanks for yout help
I have a Dell mini 12 with GMA 500 on which Karmic Koala i386 is loaded ; I never installed psb* DEB packages on this box.
I have carefully followed the instructions with IEGD 10.3.1 and I managed to compile, load and install the drivers without problem. Then, I installed the Xserver librairies provided by IEGD for Xserver-1.6. I wrote an xorg.conf file with samples I found on the net… but my Xserver segfaults, and I don’t find anything relevant in Xorg.0.log apart from the backtrace. My kernel logs display one error :
[IEGD]: Registering iegd gart module
[IEGD]: Initialize IEGD agpgart and drm
[IEGD]: Intel US15 chipset detected
[IEGD]: Detected 7932K stolen memory.
iegd-intel 0000:00:00.0: AGP aperture is 256M @ 0x3f800000
[IEGD]: Registering iegd drm module
Initializing DRM for Intel US15 SCH
pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
pci 0000:00:02.0: setting latency timer to 64
[drm:drm_fill_in_dev] *ERROR* Cannot initialize the agpgart module.
DRM: Fill_in_dev failed.
I have uploaded at this address http://people.via.ecp.fr/~alexis/mini12 all the relevant information : Xlog.0.log (which includes backtrace), dmesg, xorg.conf, lspci, lsmod, etc….
Any ideas ?
I’m running into a similar compile problem as Charles.
Complete make results at: http://pastebin.com/kWzvfVSK
But here are the relevant bits (I think):
/src/gma500/IEGD_10_3_Linux/IKM/agp/drv_plb.c:692:40: error: ‘file_rss’ undeclared (first use in this function)
/src/gma500/IEGD_10_3_Linux/IKM/agp/drv_plb.c:692:40: note: each undeclared identifier is reported only once for each function it appears in
/src/gma500/IEGD_10_3_Linux/IKM/agp/drv_plb.c: In function ‘iegd_plb_remove_entries’:
/src/gma500/IEGD_10_3_Linux/IKM/agp/drv_plb.c:801:40: error: ‘file_rss’ undeclared (first use in this function)
make[2]: *** [/src/gma500/IEGD_10_3_Linux/IKM/agp/drv_plb.o] Error 1
make[1]: *** [_module_/src/gma500/IEGD_10_3_Linux/IKM] Error 2
make[1]: Leaving directory `/src/linux-2.6.34′
make: *** [modules] Error 2
I can’t find “file_rss” anywhere outside of those 2 mentions. Help?
Ugh… sorry guys, but I haven’t tested this stuff with latest kernels, neither did Intel I guess, so if you want those drivers running you need max 2.6.32 I suppose.
Does suspend to ram and vaapi acceleration work for any of you with the IEGD 10.3? In windows suspend only works with 10.2 for me.
Thank you for this great tutorial! I am almost there. Trying to get this to work on WindRiver linux kernel 2.6.27.39 after running make i get:
make[1]: Entering directory `/home/volcano/WindRiver/workspace/ABC_Base_Xorg_prj/build/linux-common_pc-standard-build’
make -C /home/volcano/WindRiver/workspace/ABC_Base_Xorg_prj/build/linux O=/home/volcano/WindRiver/workspace/ABC_Base_Xorg_prj/build/linux-common_pc-standard-build/. modules
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/agp/pci.o
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/agp/global.o
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/agp/drv_alm.o
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/agp/drv_nap.o
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/agp/drv_plb.o
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/agp/drv_cmn.o
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/agp/drv_gn4.o
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/drm/iegd_drv.o
CC [M] /home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/drm/iegd_interface.o
/home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/drm/iegd_interface.c: In function ‘intel_drm_plb_interrupts’:
/home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/drm/iegd_interface.c:847: error: implicit declaration of function ‘drm_irq_install’
make[4]: *** [/home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM/drm/iegd_interface.o] Error 1
make[3]: *** [_module_/home/volcano/Desktop/IEGD_10_3_Linux/IEGD_10_3_Linux/IKM] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/volcano/WindRiver/workspace/ABC_Base_Xorg_prj/build/linux-common_pc-standard-build’
make: *** [modules] Error 2
can someone help? thanks!
Got this error when trying to compile the code on Arch Linux running 2.6.27-lts.
/mnt/USB/IEGD_10_3_Linux/IKM/agp/drv_alm.c:67:2: warning: initialization from incompatible pointer type
/mnt/USB/IEGD_10_3_Linux/IKM/agp/drv_alm.c: In function iegd_alm_insert_entries:
/mnt/USB/IEGD_10_3_Linux/IKM/agp/drv_alm.c:396:10: error: struct agp_memory has no member named pages
make[2]: *** [/mnt/USB/IEGD_10_3_Linux/IKM/agp/drv_alm.o] Error 1
make[1] *** [_module_/mnt/USB/IEGD_10_3_Linux/IKM] Error 2
make[1] *** Leaving directory ‘/usr/src/linux-2.6.27-lts’
make: *** [modules] Error 2
This is definately not your fault, but I wonder what I can do to fix it?
Feel like an idiot for not trying to start fresh over with IEGD. Problem solved.
Could you please explain this part to a newbie:
Note (2) The Kernel source code folder you downloaded (i.e. via apt-get source) may not actually match exactly linux-$(KERNELVER), so you may change that EXTRA_CFLAGS setting manually:
In case of Ubuntu `uname -r` is 2.6.31-19-generic while the extracted source folder name has no -generic suffix and it is just linux-2.6.31-19.
In case of Debian `uname -r` is 2.6.26-21 while the extracted source folder name is linux-2.6-2.6.26-21. Weird huh?
I am running Ubuntu. I get a failure to compile similar to another Q here.
Lets say I am running 2.6.31-22-generic and want to compile the IKD. What edits to the makefile do I need to do. I have tried a bunch of stuff and am not having any luck. Could you provide an example?
also, I cannot install the kernel source as you describe above. This may be because I am not running the latest kernel, but still, it errors out:
apt-get source linux-image-2.6.22
$> sudo apt-get source linux-image-2.6.31-22
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to find a source package for linux-image-2.6.31-22
My compile error looks like this:
#make
/usr/local/src/IKM
make[1]: Entering directory `/usr/src/linux-headers-2.6.31-22-generic’
CC [M] /usr/local/src/IKM/agp/pci.o
/usr/local/src/IKM/agp/pci.c:28:17: error: agp.h: No such file or directory
In file included from /usr/local/src/IKM/include/global.h:31,
from /usr/local/src/IKM/agp/pci.c:29:
…
make[2]: *** [/usr/local/src/IKM/agp/pci.o] Error 1
make[1]: *** [_module_/usr/local/src/IKM] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-22-generic’
make: *** [modules] Error 2
any help?
I get this with 10.1 and 10.3
Would you please teach me that I can compile and install the driver on Ubuntu 9.10, but when I ran “modprobe iegd_mod” command, it always crash. Am I lose something when I compile driver? I have tried IEGD 10.2 & 10.3, and have the same question. Please teach me, thank you.
It is possible to build it under Debian sid with kernel 2.6.32-trunk-686 (linux-2.6.32-5-686 (20)) [iegd 10.3.1]
Additional point for the instructions above have to be added:
agp/drv_cmn.c:#define phys_to_gart(x) (x)
Xorg 1.6.5 works good
Videos in h262 are much better to see then under psb driver.