diff options
Diffstat (limited to 'package/linux-fusion/linux-fusion-8.0.2-cross-compile.patch')
-rw-r--r-- | package/linux-fusion/linux-fusion-8.0.2-cross-compile.patch | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/package/linux-fusion/linux-fusion-8.0.2-cross-compile.patch b/package/linux-fusion/linux-fusion-8.0.2-cross-compile.patch new file mode 100644 index 000000000..110e66333 --- /dev/null +++ b/package/linux-fusion/linux-fusion-8.0.2-cross-compile.patch @@ -0,0 +1,100 @@ +diff -urN linux-fusion-8.0.2-0rig//linux/drivers/char/fusion/shmpool.c linux-fusion-8.0.2/linux/drivers/char/fusion/shmpool.c +--- linux-fusion-8.0.2-0rig//linux/drivers/char/fusion/shmpool.c 2008-09-29 12:20:44.000000000 +0200 ++++ linux-fusion-8.0.2/linux/drivers/char/fusion/shmpool.c 2009-01-11 17:00:19.000000000 +0100 +@@ -20,6 +20,8 @@ + #include <linux/slab.h> + #include <linux/smp_lock.h> + #include <linux/sched.h> ++#include <asm/page.h> ++#include <linux/mm.h> + + #include <linux/fusion.h> + +@@ -28,8 +30,6 @@ + #include "list.h" + #include "shmpool.h" + +- +- + typedef struct { + FusionLink link; + unsigned long next_base; +diff -urN linux-fusion-8.0.2-0rig//Makefile linux-fusion-8.0.2/Makefile +--- linux-fusion-8.0.2-0rig//Makefile 2008-09-29 12:20:44.000000000 +0200 ++++ linux-fusion-8.0.2/Makefile 2009-01-11 18:07:54.000000000 +0100 +@@ -17,13 +17,15 @@ + + + DESTDIR ?= $(SYSROOT) +- ++HEADERDIR ?= $(SYSROOT) ++# This location is valid for at least 2.6.27.10 ++KERNEL_FUSION_LIB=$(KERNEL_MODLIB)/kernel/drivers/char/fusion + + SUB = linux/drivers/char/fusion + + export CONFIG_FUSION_DEVICE=m + +- ++ARCH=avr32 + ifeq ($(DEBUG),yes) + CPPFLAGS += -DFUSION_DEBUG_SKIRMISH_DEADLOCK + endif +@@ -45,25 +47,41 @@ + ln -s Makefile-2.$(K_PATCHLEVEL) $(SUB)/Makefile + ifeq ($(call check-version,2,6,24),1) + $(MAKE) -C $(KERNEL_BUILD) \ +- KCPPFLAGS="$(CPPFLAGS) -I`pwd`/linux/include" \ ++ ARCH=avr32 \ ++ CC=$(CROSS_COMPILE)gcc \ ++ AS=$(CROSS_COMPILE)as \ ++ KCPPFLAGS="$(CPPFLAGS) \ ++ -I`pwd`/linux/include \ ++ -I$(KERNEL_SOURCE)/include \ ++ -I$(KERNEL_SOURCE)/arch/$(ARCH)/include" \ + SUBDIRS=`pwd`/$(SUB) modules + else + $(MAKE) -C $(KERNEL_BUILD) \ +- CPPFLAGS="$(CPPFLAGS) -D__KERNEL__ -I`pwd`/linux/include -I$(KERNEL_BUILD)/include -I$(KERNEL_SOURCE)/include $(AUTOCONF_H)" \ ++ ARCH=avr32 \ ++ CC=$(CROSS_COMPILE)gcc \ ++ AS=$(CROSS_COMPILE)as \ ++ CPPFLAGS="$(CPPFLAGS) \ ++ -I`pwd`/linux/include \ ++ -I$(KERNEL_BUILD)/include \ ++ -I$(KERNEL_SOURCE)/include \ ++ -I$(KERNEL_SOURCE)/arch/$(ARCH)/include \ ++ $(AUTOCONF_H)" \ + SUBDIRS=`pwd`/$(SUB) modules + endif + +-install: all ++#-D__KERNEL__ ++#-DHAVE_LINUX_CONFIG_H \ ++ ++install: all install-header + install -d $(DESTDIR)/usr/include/linux + install -m 644 linux/include/linux/fusion.h $(DESTDIR)/usr/include/linux +- +- install -d $(DESTDIR)$(KERNEL_MODLIB)/drivers/char/fusion ++ install -d $(DESTDIR)$(KERNEL_FUSION_LIB) + + ifeq ($(K_PATCHLEVEL),4) +- install -m 644 $(SUB)/fusion.o $(DESTDIR)$(KERNEL_MODLIB)/drivers/char/fusion ++ install -m 644 $(SUB)/fusion.o $(DESTDIR)$(KERNEL_FUSION_LIB) + rm -f $(DESTDIR)$(KERNEL_MODLIB)/fusion.o + else +- install -m 644 $(SUB)/fusion.ko $(DESTDIR)$(KERNEL_MODLIB)/drivers/char/fusion ++ install -m 644 $(SUB)/fusion.ko $(DESTDIR)$(KERNEL_FUSION_LIB) + rm -f $(DESTDIR)$(KERNEL_MODLIB)/fusion.ko + endif + ifneq ($(strip $(DESTDIR)),) +@@ -72,6 +90,8 @@ + /sbin/depmod -ae $(KERNEL_VERSION) + endif + ++install-header: ++ install -m 644 linux/include/linux/fusion.h $(HEADERDIR)/usr/include/linux + + + clean: |