summaryrefslogtreecommitdiffstats
path: root/patches/svgalib-1.9.25
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2011-06-16 16:55:46 +0200
committerRobert Schwebel <r.schwebel@pengutronix.de>2011-06-16 16:55:46 +0200
commit6b11471a43bf44d6d768d8eccd35f66683da1dee (patch)
treeb93cfe146808f1d6f8a20882bf35ca4cc99bfa2a /patches/svgalib-1.9.25
parenta14c29d8f1de49f178f56b073e755af8168ec25b (diff)
downloadptxdist-6b11471a43bf44d6d768d8eccd35f66683da1dee.tar.gz
ptxdist-6b11471a43bf44d6d768d8eccd35f66683da1dee.tar.xz
svgalib: added new package
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'patches/svgalib-1.9.25')
-rw-r--r--patches/svgalib-1.9.25/0001-svgalib-disable-obsolete-drivers.patch156
-rw-r--r--patches/svgalib-1.9.25/0002-svgalib-patch-taken-from-open-embedded.patch419
-rw-r--r--patches/svgalib-1.9.25/0003-svgalib-search-also-in-local-sharedlib-dir.patch25
-rw-r--r--patches/svgalib-1.9.25/series3
4 files changed, 603 insertions, 0 deletions
diff --git a/patches/svgalib-1.9.25/0001-svgalib-disable-obsolete-drivers.patch b/patches/svgalib-1.9.25/0001-svgalib-disable-obsolete-drivers.patch
new file mode 100644
index 000000000..dd628f4cc
--- /dev/null
+++ b/patches/svgalib-1.9.25/0001-svgalib-disable-obsolete-drivers.patch
@@ -0,0 +1,156 @@
+From 60de25f20cfe9516a1cf77e717c463f4668bc264 Mon Sep 17 00:00:00 2001
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+Date: Thu, 16 Jun 2011 15:52:02 +0200
+Subject: [PATCH 1/3] svgalib: disable obsolete drivers
+
+We only use fbdev and svga drivers in ptxdist.
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+---
+ Makefile.cfg | 116 +++++++++++++++++++++++++++++-----------------------------
+ 1 files changed, 58 insertions(+), 58 deletions(-)
+
+diff --git a/Makefile.cfg b/Makefile.cfg
+index 6bc93d1..46c409c 100644
+--- a/Makefile.cfg
++++ b/Makefile.cfg
+@@ -151,78 +151,78 @@ INSTALLMODULE = installmodule
+
+ # End of obsolete drivers.
+
+-INCLUDE_CHIPS_DRIVER = y
++#INCLUDE_CHIPS_DRIVER = y
+
+-INCLUDE_APM_DRIVER = y
+-INCLUDE_NV3_DRIVER = y
+-INCLUDE_G400_DRIVER = y
+-INCLUDE_R128_DRIVER = y
++#INCLUDE_APM_DRIVER = y
++#INCLUDE_NV3_DRIVER = y
++#INCLUDE_G400_DRIVER = y
++#INCLUDE_R128_DRIVER = y
+ INCLUDE_VESA_DRIVER = y
+-INCLUDE_MX_DRIVER = y
+-INCLUDE_RENDITION_DRIVER = y
+-INCLUDE_RAGE_DRIVER = y
+-INCLUDE_BANSHEE_DRIVER = y
+-INCLUDE_SIS_DRIVER = y
+-INCLUDE_I740_DRIVER = y
+-INCLUDE_I810_DRIVER = y
+-INCLUDE_LAGUNA_DRIVER = y
+-INCLUDE_TRIDENT_DRIVER = y
+-INCLUDE_SAVAGE_DRIVER = y
+-INCLUDE_MILLENNIUM_DRIVER = y
++#INCLUDE_MX_DRIVER = y
++#INCLUDE_RENDITION_DRIVER = y
++#INCLUDE_RAGE_DRIVER = y
++#INCLUDE_BANSHEE_DRIVER = y
++#INCLUDE_SIS_DRIVER = y
++#INCLUDE_I740_DRIVER = y
++#INCLUDE_I810_DRIVER = y
++#INCLUDE_LAGUNA_DRIVER = y
++#INCLUDE_TRIDENT_DRIVER = y
++#INCLUDE_SAVAGE_DRIVER = y
++#INCLUDE_MILLENNIUM_DRIVER = y
+ ##INCLUDE_G450C2_DRIVER = y
+-INCLUDE_PM2_DRIVER = y
+-INCLUDE_UNICHROME_DRIVER = y
++#INCLUDE_PM2_DRIVER = y
++#INCLUDE_UNICHROME_DRIVER = y
+
+-INCLUDE_NEO_DRIVER = y
+-INCLUDE_ET6000_DRIVER = y
++#INCLUDE_NEO_DRIVER = y
++#INCLUDE_ET6000_DRIVER = y
+ INCLUDE_FBDEV_DRIVER = y
+
+ # These drivers are obsolete, but most likely still work:
+
+-INCLUDE_PARADISE_DRIVER = y
+-INCLUDE_ARK_DRIVER = y
+-INCLUDE_S3_DRIVER = y
+-INCLUDE_CIRRUS_DRIVER = y
+-INCLUDE_TVGA_DRIVER = y
+-INCLUDE_ALI_DRIVER = y
++#INCLUDE_PARADISE_DRIVER = y
++#INCLUDE_ARK_DRIVER = y
++#INCLUDE_S3_DRIVER = y
++#INCLUDE_CIRRUS_DRIVER = y
++#INCLUDE_TVGA_DRIVER = y
++#INCLUDE_ALI_DRIVER = y
+
+
+ #
+ # Comment out any adapter you don't want to autodetect.
+ #
+ #INCLUDE_ET4000_DRIVER_TEST = y
+-INCLUDE_CIRRUS_DRIVER_TEST = y
+-INCLUDE_TVGA_DRIVER_TEST = y
+-INCLUDE_OAK_DRIVER_TEST = y
+-INCLUDE_EGA_DRIVER_TEST = y
+-INCLUDE_MACH32_DRIVER_TEST = y
+-INCLUDE_GVGA6400_DRIVER_TEST = y
+-INCLUDE_S3_DRIVER_TEST = y
+-INCLUDE_ET3000_DRIVER_TEST = y
+-INCLUDE_ARK_DRIVER_TEST = y
+-INCLUDE_ATI_DRIVER_TEST = y
+-INCLUDE_ALI_DRIVER_TEST = y
+-INCLUDE_CHIPS_DRIVER_TEST = y
+-INCLUDE_APM_DRIVER_TEST = y
+-INCLUDE_NV3_DRIVER_TEST = y
+-INCLUDE_G400_DRIVER_TEST = y
+-INCLUDE_R128_DRIVER_TEST = y
+-INCLUDE_ET6000_DRIVER_TEST = y
+-INCLUDE_MX_DRIVER_TEST = y
+-INCLUDE_TRIDENT_DRIVER_TEST = y
+-INCLUDE_PARADISE_DRIVER_TEST = y
+-INCLUDE_RAGE_DRIVER_TEST = y
+-INCLUDE_BANSHEE_DRIVER_TEST = y
+-INCLUDE_SIS_DRIVER_TEST = y
+-INCLUDE_I740_DRIVER_TEST = y
+-INCLUDE_I810_DRIVER_TEST = y
+-INCLUDE_LAGUNA_DRIVER_TEST = y
+-INCLUDE_NEO_DRIVER_TEST = y
+-INCLUDE_SAVAGE_DRIVER_TEST = y
+-INCLUDE_MILLENNIUM_DRIVER_TEST = y
+-INCLUDE_RENDITION_DRIVER_TEST = y
+-INCLUDE_PM2_DRIVER_TEST = y
+-INCLUDE_UNICHROME_DRIVER_TEST = y
++#INCLUDE_CIRRUS_DRIVER_TEST = y
++#INCLUDE_TVGA_DRIVER_TEST = y
++#INCLUDE_OAK_DRIVER_TEST = y
++#INCLUDE_EGA_DRIVER_TEST = y
++#INCLUDE_MACH32_DRIVER_TEST = y
++#INCLUDE_GVGA6400_DRIVER_TEST = y
++#INCLUDE_S3_DRIVER_TEST = y
++#INCLUDE_ET3000_DRIVER_TEST = y
++#INCLUDE_ARK_DRIVER_TEST = y
++#INCLUDE_ATI_DRIVER_TEST = y
++#INCLUDE_ALI_DRIVER_TEST = y
++#INCLUDE_CHIPS_DRIVER_TEST = y
++#INCLUDE_APM_DRIVER_TEST = y
++#INCLUDE_NV3_DRIVER_TEST = y
++#INCLUDE_G400_DRIVER_TEST = y
++#INCLUDE_R128_DRIVER_TEST = y
++#INCLUDE_ET6000_DRIVER_TEST = y
++#INCLUDE_MX_DRIVER_TEST = y
++#INCLUDE_TRIDENT_DRIVER_TEST = y
++#INCLUDE_PARADISE_DRIVER_TEST = y
++#INCLUDE_RAGE_DRIVER_TEST = y
++#INCLUDE_BANSHEE_DRIVER_TEST = y
++#INCLUDE_SIS_DRIVER_TEST = y
++#INCLUDE_I740_DRIVER_TEST = y
++#INCLUDE_I810_DRIVER_TEST = y
++#INCLUDE_LAGUNA_DRIVER_TEST = y
++#INCLUDE_NEO_DRIVER_TEST = y
++#INCLUDE_SAVAGE_DRIVER_TEST = y
++#INCLUDE_MILLENNIUM_DRIVER_TEST = y
++#INCLUDE_RENDITION_DRIVER_TEST = y
++#INCLUDE_PM2_DRIVER_TEST = y
++#INCLUDE_UNICHROME_DRIVER_TEST = y
+
+ #INCLUDE_FBDEV_DRIVER_TEST = y
+
+--
+1.7.5.3
+
diff --git a/patches/svgalib-1.9.25/0002-svgalib-patch-taken-from-open-embedded.patch b/patches/svgalib-1.9.25/0002-svgalib-patch-taken-from-open-embedded.patch
new file mode 100644
index 000000000..ae41680cd
--- /dev/null
+++ b/patches/svgalib-1.9.25/0002-svgalib-patch-taken-from-open-embedded.patch
@@ -0,0 +1,419 @@
+From 0f014aa5cfea99e48365a7c9c83b192f34faf114 Mon Sep 17 00:00:00 2001
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+Date: Thu, 16 Jun 2011 16:30:29 +0200
+Subject: [PATCH 2/3] svgalib: patch taken from open embedded
+
+... with the usual bad patch quality. Needs to be cleaned up.
+
+ - get rid of warning when linux/device.h doesnt exist
+ - touch up the Makefile to let the ebuild handle the module details
+ - fix support with io remap stuff in newer kernels
+ - dont include headers that dont exist in 2.4.x kernels
+ - use module_param() for 2.6.x and MODULE_PARM() for all others
+ - dont declare all_devices as static since it is exported
+ - dont include <linux/config.h> as the build system does it for us
+ - in lrmi, map old flag names to new names for versions >= 2.6.26
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+---
+ kernel/svgalib_helper/Makefile | 2 +-
+ kernel/svgalib_helper/Makefile.alt | 9 ++--
+ kernel/svgalib_helper/Makefile.alt.orig | 84 +++++++++++++++++++++++++++++++
+ kernel/svgalib_helper/kernel26compat.h | 42 ++++++++++++++--
+ kernel/svgalib_helper/main.c | 30 ++++++++---
+ lrmi-0.6m/lrmi.c | 8 +++
+ lrmi-0.9/lrmi.c | 7 +++
+ src/lrmi.6.c | 7 +++
+ src/lrmi.9.c | 7 +++
+ 9 files changed, 179 insertions(+), 17 deletions(-)
+ create mode 100644 kernel/svgalib_helper/Makefile.alt.orig
+
+diff --git a/kernel/svgalib_helper/Makefile b/kernel/svgalib_helper/Makefile
+index f81511e..f9f4b4c 100644
+--- a/kernel/svgalib_helper/Makefile
++++ b/kernel/svgalib_helper/Makefile
+@@ -25,7 +25,7 @@ else
+ endif
+
+
+-CLASS_SIMPLE := $(shell grep class_simple_create $(KDIR)/include/linux/device.h)
++CLASS_SIMPLE := $(shell grep -s class_simple_create $(KDIR)/include/linux/device.h)
+
+ ifneq ($(CLASS_SIMPLE),)
+ CLASS_CFLAGS = -DCLASS_SIMPLE=1
+diff --git a/kernel/svgalib_helper/Makefile.alt b/kernel/svgalib_helper/Makefile.alt
+index c78c169..778a35d 100644
+--- a/kernel/svgalib_helper/Makefile.alt
++++ b/kernel/svgalib_helper/Makefile.alt
+@@ -37,7 +37,7 @@ CFLAGS += $(INCLUDES)
+ CFLAGS += -DSVGALIB_HELPER_MAJOR=$(SVGALIB_HELPER_MAJOR)
+
+ ifeq (1,$(findstring 1,$(MODVER)))
+- CFLAGS += -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.h
++ CFLAGS += -DMODVERSIONS -DCONFIG_MODVERSIONS=1
+ endif
+
+ TARGET = svgalib_helper
+@@ -50,7 +50,8 @@ ifeq (2,$(VER_MAJOR))
+ endif
+ endif
+
+-all: .depend $(OBJS)
++modules: $(OBJS)
++all: .depend modules
+
+ $(TARGET).o: $(SRC:.c=.o)
+ $(LD) -r $^ -o $@
+@@ -61,8 +62,8 @@ $(TARGET).ko: $(TARGET).o
+ install: device modules_install
+
+ modules_install: $(OBJS)
+- mkdir -p /lib/modules/$(VER)/kernel/misc
+- install -m 0644 -c $(OBJS) /lib/modules/$(VER)/kernel/misc
++ mkdir -p $(TOPDIR)/lib/modules/$(VER)/kernel/misc
++ install -m 0644 -c $(OBJS) $(TOPDIR)/lib/modules/$(VER)/kernel/misc
+
+ device:
+ rm -f /dev/svgalib_helper* /dev/svga_helper* /dev/svga /dev/svga?
+diff --git a/kernel/svgalib_helper/Makefile.alt.orig b/kernel/svgalib_helper/Makefile.alt.orig
+new file mode 100644
+index 0000000..c78c169
+--- /dev/null
++++ b/kernel/svgalib_helper/Makefile.alt.orig
+@@ -0,0 +1,84 @@
++include ../../Makefile.cfg
++
++
++ifndef INCLUDEDIR
++INCLUDEDIR = /lib/modules/$(shell uname -r)/build/include
++endif
++
++MODVER = $(shell grep CONFIG_MODVERSIONS $(INCLUDEDIR)/linux/autoconf.h)
++
++ifeq ($(MODVER),)
++ @echo INCLUDEDIR is not set up correctly
++ exit 1
++endif
++
++# Extract version number from headers.
++VER = $(shell awk -F\" '/REL/ {print $$2}' $(INCLUDEDIR)/linux/version.h 2>/dev/null)
++
++# Use version of current running kernel
++ifeq ($(VER),)
++ VER = $(shell uname -r)
++endif
++
++VER_MAJOR = $(shell echo $(VER) | cut -d. -f1)
++VER_MINOR = $(shell echo $(VER) | cut -d. -f2)
++
++INCLUDES += -I$(INCLUDEDIR)
++INCLUDES += -I$(INCLUDEDIR)/asm/mach-default
++
++CFLAGS = -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE $(DEBFLAGS)
++ifeq (2,$(VER_MAJOR))
++ ifeq (6,$(VER_MINOR))
++ CFLAGS += -DKBUILD_MODNAME="svgalib_helper"
++ endif
++endif
++
++CFLAGS += $(INCLUDES)
++CFLAGS += -DSVGALIB_HELPER_MAJOR=$(SVGALIB_HELPER_MAJOR)
++
++ifeq (1,$(findstring 1,$(MODVER)))
++ CFLAGS += -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.h
++endif
++
++TARGET = svgalib_helper
++OBJS = $(TARGET).o
++SRC = main.c interrupt.c i810.c virtual.c displaystart.c
++
++ifeq (2,$(VER_MAJOR))
++ ifeq (6,$(VER_MINOR))
++ OBJS = $(TARGET).ko
++ endif
++endif
++
++all: .depend $(OBJS)
++
++$(TARGET).o: $(SRC:.c=.o)
++ $(LD) -r $^ -o $@
++
++$(TARGET).ko: $(TARGET).o
++ $(LD) -d -r $^ -o $@
++
++install: device modules_install
++
++modules_install: $(OBJS)
++ mkdir -p /lib/modules/$(VER)/kernel/misc
++ install -m 0644 -c $(OBJS) /lib/modules/$(VER)/kernel/misc
++
++device:
++ rm -f /dev/svgalib_helper* /dev/svga_helper* /dev/svga /dev/svga?
++ mknod -m 666 /dev/svga c $(SVGALIB_HELPER_MAJOR) 0
++ mknod -m 666 /dev/svga1 c $(SVGALIB_HELPER_MAJOR) 1
++ mknod -m 666 /dev/svga2 c $(SVGALIB_HELPER_MAJOR) 2
++ mknod -m 666 /dev/svga3 c $(SVGALIB_HELPER_MAJOR) 3
++ mknod -m 666 /dev/svga4 c $(SVGALIB_HELPER_MAJOR) 4
++
++clean:
++ rm -f *.ko *.o *~ core .depend *.bak *.orig
++
++depend .depend dep:
++ $(CC) $(CFLAGS) -M *.c > $@
++
++
++ifeq (.depend,$(wildcard .depend))
++include .depend
++endif
+diff --git a/kernel/svgalib_helper/kernel26compat.h b/kernel/svgalib_helper/kernel26compat.h
+index 01c3ab7..d671e12 100644
+--- a/kernel/svgalib_helper/kernel26compat.h
++++ b/kernel/svgalib_helper/kernel26compat.h
+@@ -10,7 +10,7 @@
+ # define PCI_GET_CLASS pci_find_class
+ # define PCI_GET_DEVICE pci_find_device
+
+-# if defined (PG_chainlock)
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,3)
+ # define my_io_remap_page_range(vma, start, ofs, len, prot) \
+ io_remap_page_range(vma,start,ofs,len,prot)
+ # else
+@@ -70,6 +70,7 @@ typedef void* devfs_handle_t;
+
+ /* These are also not present in 2.6 kernels ... */
+ #if (!defined _LINUX_DEVFS_FS_KERNEL_H) || (defined KERNEL_2_6)
++#include <linux/fs.h>
+ static inline int devfs_register_chrdev (unsigned int major, const char *name,
+ struct file_operations *fops)
+ {
+@@ -77,7 +78,12 @@ static inline int devfs_register_chrdev (unsigned int major, const char *name,
+ }
+ static inline int devfs_unregister_chrdev (unsigned int major,const char *name)
+ {
+- return unregister_chrdev (major, name);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
++ return unregister_chrdev (major, name);
++#else
++ unregister_chrdev (major, name);
++ return 0;
++#endif
+ }
+ #endif
+
+@@ -99,7 +105,8 @@ static inline int devfs_unregister_chrdev (unsigned int major,const char *name)
+ class_device_create(svgalib_helper_class, \
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ &sh_pci_devs[_minor]->dev->dev, _name);
+-#else /* 2.6.15 changed class_device_create */
++/* 2.6.15 changed class_device_create */
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
+ # define SLH_SYSFS_ADD_CONTROL \
+ class_device_create(svgalib_helper_class, NULL, \
+ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
+@@ -109,7 +116,30 @@ static inline int devfs_unregister_chrdev (unsigned int major,const char *name)
+ class_device_create(svgalib_helper_class, NULL, \
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ &sh_pci_devs[_minor]->dev->dev, _name);
+-#endif /* 2.6.15 */
++/* 2.6.26 changed class_device_create to device_create */
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
++# define SLH_SYSFS_ADD_CONTROL \
++ device_create(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
++ "svga");
++
++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
++ device_create(svgalib_helper_class, &sh_pci_devs[_minor]->dev->dev, \
++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
++ _name);
++/* 2.6.27 changed device_create to device_create_drvdata */
++#else
++# define SLH_SYSFS_ADD_CONTROL \
++ device_create_drvdata(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
++ "%s%d", "svga", 0);
++
++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
++ device_create_drvdata(svgalib_helper_class, \
++ &sh_pci_devs[_minor]->dev->dev, \
++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
++ "%s%d", _name, _minor);
++#endif
+
+ # define SLH_SYSFS_REMOVE_DEVICE(i) \
+ class_destroy(svgalib_helper_class);
+@@ -161,3 +191,7 @@ static inline int devfs_unregister_chrdev (unsigned int major,const char *name)
+ #ifndef PCI_VENDOR_ID_RENDITION
+ #define PCI_VENDOR_ID_RENDITION 0x1163
+ #endif
++
++#ifndef IRQF_SHARED
++# define IRQF_SHARED SA_SHIRQ
++#endif
+diff --git a/kernel/svgalib_helper/main.c b/kernel/svgalib_helper/main.c
+index 1a7cdf1..36a4e56 100644
+--- a/kernel/svgalib_helper/main.c
++++ b/kernel/svgalib_helper/main.c
+@@ -1,5 +1,3 @@
+-#include <linux/config.h>
+-
+ #if defined (CONFIG_MODVERSIONS) && !defined (MODVERSIONS)
+ # define MODVERSIONS
+ #endif
+@@ -17,15 +15,22 @@
+ #include <linux/ioport.h>
+ #include <linux/interrupt.h>
+ #include <linux/pci.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+ #include <linux/devfs_fs_kernel.h>
++#endif
+ #include <linux/mm.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ #include <linux/thread_info.h>
++#endif
+ #include <linux/smp.h>
+ #include <linux/smp_lock.h>
+
+ #include <linux/sched.h>
+ #include <linux/wait.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ #include <linux/syscalls.h>
++#endif
+
+ #define __KERNEL_SYSCALLS__
+ #include <linux/unistd.h>
+@@ -50,7 +55,7 @@ asmlinkage long (*s_ioperm)(unsigned long from, unsigned long num, int turn_on);
+ #include "displaystart.h"
+
+ int debug=0;
+-static int all_devices=0;
++int all_devices=0;
+ int num_devices=0;
+
+ static char *sdev_id="svgalib_helper";
+@@ -98,7 +103,11 @@ static int get_dev(int pcipos, int minor) {
+ static volatile int vsync=0;
+ static wait_queue_head_t vsync_wait;
+
+-static irqreturn_t vsync_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++static irqreturn_t vsync_interrupt(int irq, void *dev_id
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++, struct pt_regs *regs
++#endif
++)
+ {
+ struct sh_pci_device *dev = (struct sh_pci_device *)dev_id;
+
+@@ -355,7 +364,7 @@ static int svgalib_helper_ioctl( struct inode *inode, struct file *filp,
+ vsync=1;
+ i=0;
+ while(irqs[i]!=-1)
+- request_irq(irqs[i++], vsync_interrupt, SA_SHIRQ, "svgalib_helper", sdev_id);
++ request_irq(irqs[i++], vsync_interrupt, IRQF_SHARED, "svgalib_helper", sdev_id);
+ vga_enable_vsync((void *)sdev_id);
+ wait_event_interruptible(vsync_wait, !vsync);
+ i=0;
+@@ -443,7 +452,7 @@ static int svgalib_helper_open( struct inode *inode, struct file * filp) {
+ int i=sh_pci_devs[minor]->dev->irq;
+ sh_pci_devs[minor]->opencount++;
+ if(sh_pci_devs[minor]->opencount==1 && i!=0 && i!=-1 && i!=255)
+- request_irq(i, vsync_interrupt, SA_SHIRQ, "svgalib_helper", sh_pci_devs[minor]);
++ request_irq(i, vsync_interrupt, IRQF_SHARED, "svgalib_helper", sh_pci_devs[minor]);
+ }
+
+ #ifndef KERNEL_2_6
+@@ -763,10 +772,15 @@ void cleanup_module(void)
+
+ }
+
++#ifdef KERNEL_2_6
++module_param(debug, int, 0);
++module_param(all_devices, int, 0);
++#else
+ MODULE_PARM(debug, "i");
+-MODULE_PARM_DESC(debug, "Debug output level.");
+-
+ MODULE_PARM(all_devices, "i");
++#endif
++
++MODULE_PARM_DESC(debug, "Debug output level.");
+ MODULE_PARM_DESC(all_devices, "Give access to all PCI devices, regardless of class.");
+
+
+diff --git a/lrmi-0.6m/lrmi.c b/lrmi-0.6m/lrmi.c
+index 8ed72f6..1a48045 100644
+--- a/lrmi-0.6m/lrmi.c
++++ b/lrmi-0.6m/lrmi.c
+@@ -170,6 +170,14 @@ LRMI_free_real(void *m)
+ }
+
+
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#define IF_MASK X86_EFLAGS_IF
++#define IOPL_MASK X86_EFLAGS_IOPL
++#define VIF_MASK X86_EFLAGS_VIF
++#define VIP_MASK X86_EFLAGS_VIP
++#endif
++
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #define DEFAULT_STACK_SIZE 0x1000
+ #define RETURN_TO_32_INT 255
+diff --git a/lrmi-0.9/lrmi.c b/lrmi-0.9/lrmi.c
+index 892a63a..a299d69 100644
+--- a/lrmi-0.9/lrmi.c
++++ b/lrmi-0.9/lrmi.c
+@@ -203,6 +203,13 @@ LRMI_free_real(void *m)
+
+
+ #if defined(__linux__)
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#define IF_MASK X86_EFLAGS_IF
++#define IOPL_MASK X86_EFLAGS_IOPL
++#define VIF_MASK X86_EFLAGS_VIF
++#define VIP_MASK X86_EFLAGS_VIP
++#endif
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ #define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL)
+diff --git a/src/lrmi.6.c b/src/lrmi.6.c
+index 75df7df..f713172 100644
+--- a/src/lrmi.6.c
++++ b/src/lrmi.6.c
+@@ -169,6 +169,13 @@ LRMI_free_real(void *m)
+ }
+ }
+
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#define IF_MASK X86_EFLAGS_IF
++#define IOPL_MASK X86_EFLAGS_IOPL
++#define VIF_MASK X86_EFLAGS_VIF
++#define VIP_MASK X86_EFLAGS_VIP
++#endif
+
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #define DEFAULT_STACK_SIZE 0x1000
+diff --git a/src/lrmi.9.c b/src/lrmi.9.c
+index 09cc6ae..3a83c5b 100644
+--- a/src/lrmi.9.c
++++ b/src/lrmi.9.c
+@@ -206,6 +206,13 @@ LRMI_free_real(void *m)
+
+
+ #if defined(__linux__)
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#define IF_MASK X86_EFLAGS_IF
++#define IOPL_MASK X86_EFLAGS_IOPL
++#define VIF_MASK X86_EFLAGS_VIF
++#define VIP_MASK X86_EFLAGS_VIP
++#endif
+ #define DEFAULT_VM86_FLAGS (IF_MASK | IOPL_MASK)
+ #elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ #define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL)
+--
+1.7.5.3
+
diff --git a/patches/svgalib-1.9.25/0003-svgalib-search-also-in-local-sharedlib-dir.patch b/patches/svgalib-1.9.25/0003-svgalib-search-also-in-local-sharedlib-dir.patch
new file mode 100644
index 000000000..76e495ed2
--- /dev/null
+++ b/patches/svgalib-1.9.25/0003-svgalib-search-also-in-local-sharedlib-dir.patch
@@ -0,0 +1,25 @@
+From 57639dc85bf498e6ba147f274f5608c2ab715dc8 Mon Sep 17 00:00:00 2001
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+Date: Thu, 16 Jun 2011 16:49:07 +0200
+Subject: [PATCH 3/3] svgalib: search also in local sharedlib dir
+
+---
+ demos/Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/demos/Makefile b/demos/Makefile
+index f7052f3..37ef13b 100644
+--- a/demos/Makefile
++++ b/demos/Makefile
+@@ -29,7 +29,7 @@ PROGS = fun testgl speedtest mousetest vgatest scrolltest testlinear \
+
+ # Determine what library (static or shared) we will be linking programs with
+ ifdef INSTALLSHAREDLIB
+- LIBS = -lvgagl -lvga
++ LIBS = -L../sharedlib -lvgagl -lvga
+ endif
+ ifndef LIBS
+ LIBS = ../staticlib/libvgagl.a ../staticlib/libvga.a -lm
+--
+1.7.5.3
+
diff --git a/patches/svgalib-1.9.25/series b/patches/svgalib-1.9.25/series
new file mode 100644
index 000000000..793c9dfbb
--- /dev/null
+++ b/patches/svgalib-1.9.25/series
@@ -0,0 +1,3 @@
+0001-svgalib-disable-obsolete-drivers.patch
+0002-svgalib-patch-taken-from-open-embedded.patch
+0003-svgalib-search-also-in-local-sharedlib-dir.patch