From: Grazvydas Ignotas Date: Sat, 19 May 2012 19:55:34 +0000 (+0300) Subject: fix out-of-tree build and new kernel support X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=sgx.git;a=commitdiff_plain;h=1ab3b0f22522b2b661241459fc4a0ec8f296dc8f fix out-of-tree build and new kernel support --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..92787d4 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +ifeq ($(MAKECMDGOALS),) +MAKECMDGOALS = all +endif + +$(MAKECMDGOALS): + make -C pvr $@ diff --git a/pvr/Makefile b/pvr/Makefile index f253168..acdf1db 100644 --- a/pvr/Makefile +++ b/pvr/Makefile @@ -1,3 +1,47 @@ +CONFIG_PVR = m + +CONFIG_PVR_RELEASE = y +CONFIG_PVR_DEBUG = n +CONFIG_PVR_TIMING = n + +CONFIG_PVR_DEBUG_EXTRA = n +CONFIG_PVR_DEBUG_PDUMP = n +CONFIG_PVR_PDUMP_MODE_STANDARD = n +CONFIG_PVR_PDUMP_MODE_FULL = n +CONFIG_PVR_EDM_DEBUG = n +CONFIG_NO_HARDWARE = n +CONFIG_PVR_FORCE_CLOCKS_ON = n +CONFIG_PVR_EXAMPLES = n +CONFIG_PVR_TRACE_CMD = n + +ccflags-$(CONFIG_PVR_DEBUG) += -DCONFIG_PVR_DEBUG +ccflags-$(CONFIG_PVR_DEBUG_EXTRA) += -DCONFIG_PVR_DEBUG_EXTRA +ccflags-$(CONFIG_PVR_DEBUG_PDUMP) += -DCONFIG_PVR_DEBUG_PDUMP \ + -DCONFIG_PVR_PDUMP_INITIAL_MAX_FRAME_COUNT=4 +ccflags-$(CONFIG_PVR_PDUMP_MODE_STANDARD) += -DCONFIG_PVR_PDUMP_MODE_STANDARD +ccflags-$(CONFIG_PVR_PDUMP_MODE_FULL) += -DCONFIG_PVR_PDUMP_MODE_FULL +ccflags-$(CONFIG_PVR_EDM_DEBUG) += -DCONFIG_PVR_EDM_DEBUG +ccflags-$(CONFIG_PVR_EXAMPLES) += -DCONFIG_PVR_EXAMPLES +ccflags-$(CONFIG_PVR_FORCE_CLOCKS_ON) += -DCONFIG_PVR_FORCE_CLOCKS_ON +ccflags-$(CONFIG_PVR_NO_HARDWARE) += -DCONFIG_PVR_NO_HARDWARE +ccflags-$(CONFIG_PVR_RELEASE) += -DCONFIG_PVR_RELEASE +ccflags-$(CONFIG_PVR_TIMING) += -DCONFIG_PVR_TIMING +ccflags-$(CONFIG_PVR_TOOLS) += -DCONFIG_PVR_TOOLS +ccflags-$(CONFIG_PVR_TRACE_CMD) += -DCONFIG_PVR_TRACE_CMD \ + -DCONFIG_PVR_TRACE_CMD_BUF_SHIFT=3 + +ccflags-y += -I$(src)/../include + +ifeq ($(KERNELRELEASE),) +all: + $(MAKE) -C $(KERNELDIR) M=`pwd` $* + +clean: + $(MAKE) -C $(KERNELDIR) M=`pwd` clean +endif + +### + obj-$(CONFIG_PVR) += omaplfb.o pvrsrvkm.o omaplfb-objs := omaplfb_displayclass.o omaplfb_linux.o @@ -31,7 +75,7 @@ CBUILD := -O2 \ -DPVR_BUILD_DIR="\"$(PVR_BUILD_DIR)\"" \ -DPVR_BUILD_DATE="\"$(DATE)\"" -ccflags-y += $(CBUILD) -include $(srctree)/$(src)/pvrconfig.h +ccflags-y += $(CBUILD) -include $(src)/pvrconfig.h ccflags-y += $(ccflags-m) diff --git a/pvr/omaplfb_displayclass.c b/pvr/omaplfb_displayclass.c index ae6cce4..b9d023b 100644 --- a/pvr/omaplfb_displayclass.c +++ b/pvr/omaplfb_displayclass.c @@ -39,6 +39,11 @@ #include "kerneldisplay.h" #include "omaplfb.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) +#define acquire_console_sem console_lock +#define release_console_sem console_unlock +#endif + static void *gpvAnchor; static int fb_idx; diff --git a/pvr/omaplfb_linux.c b/pvr/omaplfb_linux.c index 9ed02c5..b79a59e 100644 --- a/pvr/omaplfb_linux.c +++ b/pvr/omaplfb_linux.c @@ -43,7 +43,13 @@ #include "omaplfb.h" #include "pvrmodule.h" +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)) +#include