--- pvr-omap4-kernel-0.24.9.orig/.gbp.conf +++ pvr-omap4-kernel-0.24.9/.gbp.conf @@ -0,0 +1,8 @@ +# Customized to work on 'maverick/*'. +[DEFAULT] +upstream-branch = maverick/upstream +debian-branch = maverick/master + +[git-import-orig] +# Keep pristine-tar (allows to re-create 'orig'). +pristine-tar = True --- pvr-omap4-kernel-0.24.9.orig/Makefile +++ pvr-omap4-kernel-0.24.9/Makefile @@ -0,0 +1,20 @@ +#/usr/bin/make +SRC = $(DESTDIR)/usr/src +SHARE = $(DESTDIR)/usr/share/$(NAME)-dkms + +all: + +clean: + +install: + +#source tree + install -d "$(SRC)" + cp -a sgx "$(SRC)/$(NAME)-$(VERSION)" + find "$(SRC)/$(NAME)-$(VERSION)" -type f -exec chmod u=rw,go=r "{}" \; + find "$(SRC)/$(NAME)-$(VERSION)" -type d -exec chmod u=rwx,go=rx "{}" \; + sed -i 's/__VERSION__/$(VERSION)/g' "$(SRC)/$(NAME)-$(VERSION)"/dkms.conf + +#postinst + install -d "$(SHARE)" + install -m 755 $(PREFIX)/usr/lib/dkms/common.postinst $(SHARE)/postinst --- pvr-omap4-kernel-0.24.9.orig/debian/pvr-omap4-kernel-dkms.prerm +++ pvr-omap4-kernel-0.24.9/debian/pvr-omap4-kernel-dkms.prerm @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME=pvr-omap4-kernel +PACKAGE_NAME=$NAME-dkms +VERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` + +set -e + +case "$1" in + remove|upgrade|deconfigure) + if [ "`dkms status -m $NAME`" ]; then + dkms remove -m $NAME -v $VERSION --all + fi + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- pvr-omap4-kernel-0.24.9.orig/debian/control +++ pvr-omap4-kernel-0.24.9/debian/control @@ -0,0 +1,23 @@ +Source: pvr-omap4-kernel +Section: graphics +Priority: optional +Maintainer: TI OMAP Developers +Build-Depends: cdbs, debhelper (>= 7), quilt, dkms +Standards-Version: 3.9.1 +Homepage: https://gforge01.dal.design.ti.com/gf/project/gfx_l24_ddk2/ + +Package: pvr-omap4-kernel-dkms +Architecture: armel +Section: kernel +Depends: dkms (>= 1.95), make, ${misc:Depends}, linux-headers-omap4 +Conflicts: sgx-kernel-module, sgx-dkms +Replaces: sgx-kernel-module, sgx-dkms +Description: PowerVR SGX540 kernel driver for OMAP4 in DKMS format. + This package provides the source code for the PowerVR SGX540 OMAP4 + kernel module. + . + This driver will allow usage of the OpenGLES SGX libraries, providing + 3D acceleration. Kernel source or headers are required to compile these + modules. + . + This package contains the source to be built with dkms. --- pvr-omap4-kernel-0.24.9.orig/debian/rules +++ pvr-omap4-kernel-0.24.9/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +DEB_NAME=pvr-omap4-kernel +NAME=pvr-omap4-kernel +VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p') + +DEB_MAKE_CLEAN_TARGET := clean +DEB_MAKE_BUILD_TARGET := all +DEB_MAKE_INSTALL_TARGET := install DESTDIR=$(CURDIR)/debian/$(DEB_NAME)-dkms NAME=$(NAME) VERSION=$(VERSION) --- pvr-omap4-kernel-0.24.9.orig/debian/changelog +++ pvr-omap4-kernel-0.24.9/debian/changelog @@ -0,0 +1,11 @@ +pvr-omap4-kernel (0.24.9-2) maverick; urgency=low + + * Do not restrict to armel (there is armv7l also) + + -- Vincent Stehlé Fri, 12 Nov 2010 20:46:47 +0100 + +pvr-omap4-kernel (0.24.9-1) maverick; urgency=low + + * Initial public release. + + -- Vincent Stehlé Tue, 12 Oct 2010 16:54:59 +0200 --- pvr-omap4-kernel-0.24.9.orig/debian/compat +++ pvr-omap4-kernel-0.24.9/debian/compat @@ -0,0 +1 @@ +7 --- pvr-omap4-kernel-0.24.9.orig/debian/pvr-omap4-kernel-dkms.postinst +++ pvr-omap4-kernel-0.24.9/debian/pvr-omap4-kernel-dkms.postinst @@ -0,0 +1,48 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007 Mario Limonciello +# Copyright (C) 2009 Alberto Milone + +set -e + +NAME=pvr-omap4-kernel +PACKAGE_NAME=$NAME-dkms +CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` +ARCH=`dpkg --print-architecture` + +dkms_configure () { + for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do + if [ -f "$POSTINST" ]; then + "$POSTINST" "$NAME" "$CVERSION" "/usr/share/$PACKAGE_NAME" "$ARCH" "$2" + return $? + fi + echo "WARNING: $POSTINST does not exist." >&2 + done + echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not" >&2 + echo "built with legacy DKMS support." >&2 + echo "You must either rebuild $PACKAGE_NAME with legacy postinst" >&2 + echo "support or upgrade DKMS to a more current version." >&2 + return 1 +} + +case "$1" in + configure) + dkms_configure + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- pvr-omap4-kernel-0.24.9.orig/debian/copyright +++ pvr-omap4-kernel-0.24.9/debian/copyright @@ -0,0 +1,39 @@ +This work was packaged for Debian by: + + Vincent Stehle on Fri, 28 May 2010 14:11:56 +0200 + + (It was inspired from similar work for OMAP3, + by Ricardo Salveti de Araujo ) + +Upstream Author(s): + + Imagination Technologies Ltd. + Texas Instruments Incorporated + +Copyright: + + Copyright (C) 2008 Imagination Technologies Ltd. + Copyright (C) 2010 Texas Instruments Incorporated + +License: + + This program is free software; you can redistribute it and/or modify it + under the terms and conditions of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + This program is distributed in the hope it will be useful but, except + as otherwise stated in writing, without any warranty; without even the + implied warranty of merchantability or fitness for a particular purpose. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., + + 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + +The Debian packaging is: + + Copyright (C) 2010 Texas Instruments Incorporated + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. --- pvr-omap4-kernel-0.24.9.orig/debian/docs +++ pvr-omap4-kernel-0.24.9/debian/docs @@ -0,0 +1 @@ +sgx/README --- pvr-omap4-kernel-0.24.9.orig/debian/patches/0001-hack-add-omapfb-h.patch +++ pvr-omap4-kernel-0.24.9/debian/patches/0001-hack-add-omapfb-h.patch @@ -0,0 +1,211 @@ +From: TI OMAP Developers +Date: Mon, 20 Sep 2010 15:09:19 +0200 +Subject: [PATCH] hack-add-omapfb-h + +=================================================================== +--- + .../3rdparty/dc_omapfb3_linux/omaplfb_linux.c | 2 +- + sgx/services4/include/drivers-video-omap2-omapfb.h | 180 ++++++++++++++++++++ + 2 files changed, 181 insertions(+), 1 deletions(-) + create mode 100644 sgx/services4/include/drivers-video-omap2-omapfb.h + +diff --git a/sgx/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c b/sgx/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c +index f838524..d655530 100755 +--- a/sgx/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c ++++ b/sgx/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c +@@ -64,7 +64,7 @@ + #define PVR_DEBUG DEBUG + #undef DEBUG + #endif +-#include ++#include "drivers-video-omap2-omapfb.h" + #if defined(DEBUG) + #undef DEBUG + #endif +diff --git a/sgx/services4/include/drivers-video-omap2-omapfb.h b/sgx/services4/include/drivers-video-omap2-omapfb.h +new file mode 100644 +index 0000000..1305fc9 +--- /dev/null ++++ b/sgx/services4/include/drivers-video-omap2-omapfb.h +@@ -0,0 +1,180 @@ ++/* ++ * linux/drivers/video/omap2/omapfb.h ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * Author: Tomi Valkeinen ++ * ++ * Some code and ideas taken from drivers/video/omap/ driver ++ * by Imre Deak. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program. If not, see . ++ */ ++ ++#ifndef __DRIVERS_VIDEO_OMAP2_OMAPFB_H__ ++#define __DRIVERS_VIDEO_OMAP2_OMAPFB_H__ ++ ++#ifdef CONFIG_FB_OMAP2_DEBUG_SUPPORT ++#define DEBUG ++#endif ++ ++#include ++ ++#include ++ ++#ifdef DEBUG ++extern unsigned int omapfb_debug; ++#define DBG(format, ...) \ ++ if (omapfb_debug) \ ++ printk(KERN_DEBUG "OMAPFB: " format, ## __VA_ARGS__) ++#else ++#define DBG(format, ...) ++#endif ++ ++#define FB2OFB(fb_info) ((struct omapfb_info *)(fb_info->par)) ++ ++/* max number of overlays to which a framebuffer data can be direct */ ++#define OMAPFB_MAX_OVL_PER_FB 3 ++ ++struct omapfb2_mem_region { ++ int id; ++ u32 paddr; ++ void __iomem *vaddr; ++ struct vrfb vrfb; ++ unsigned long size; ++ u8 type; /* OMAPFB_PLANE_MEM_* */ ++ bool alloc; /* allocated by the driver */ ++ bool map; /* kernel mapped by the driver */ ++ atomic_t map_count; ++ struct rw_semaphore lock; ++ atomic_t lock_count; ++}; ++ ++/* appended to fb_info */ ++struct omapfb_info { ++ int id; ++ struct omapfb2_mem_region *region; ++ int num_overlays; ++ struct omap_overlay *overlays[OMAPFB_MAX_OVL_PER_FB]; ++ struct omapfb2_device *fbdev; ++ enum omap_dss_rotation_type rotation_type; ++ u8 rotation[OMAPFB_MAX_OVL_PER_FB]; ++ bool mirror; ++}; ++ ++struct omapfb2_device { ++ struct device *dev; ++ struct mutex mtx; ++ ++ u32 pseudo_palette[17]; ++ ++ int state; ++ ++ unsigned num_fbs; ++ struct fb_info *fbs[10]; ++ struct omapfb2_mem_region regions[10]; ++ ++ unsigned num_displays; ++ struct omap_dss_device *displays[10]; ++ unsigned num_overlays; ++ struct omap_overlay *overlays[10]; ++ unsigned num_managers; ++ struct omap_overlay_manager *managers[10]; ++ ++ unsigned num_bpp_overrides; ++ struct { ++ struct omap_dss_device *dssdev; ++ u8 bpp; ++ } bpp_overrides[10]; ++}; ++ ++struct omapfb_colormode { ++ enum omap_color_mode dssmode; ++ u32 bits_per_pixel; ++ u32 nonstd; ++ struct fb_bitfield red; ++ struct fb_bitfield green; ++ struct fb_bitfield blue; ++ struct fb_bitfield transp; ++}; ++ ++void set_fb_fix(struct fb_info *fbi); ++int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var); ++int omapfb_realloc_fbmem(struct fb_info *fbi, unsigned long size, int type); ++int omapfb_apply_changes(struct fb_info *fbi, int init); ++ ++int omapfb_create_sysfs(struct omapfb2_device *fbdev); ++void omapfb_remove_sysfs(struct omapfb2_device *fbdev); ++ ++int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg); ++ ++int omapfb_update_window(struct fb_info *fbi, ++ u32 x, u32 y, u32 w, u32 h); ++ ++int dss_mode_to_fb_mode(enum omap_color_mode dssmode, ++ struct fb_var_screeninfo *var); ++ ++int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, ++ u16 posx, u16 posy, u16 outw, u16 outh); ++ ++/* find the display connected to this fb, if any */ ++static inline struct omap_dss_device *fb2display(struct fb_info *fbi) ++{ ++ struct omapfb_info *ofbi = FB2OFB(fbi); ++ int i; ++ ++ /* XXX: returns the display connected to first attached overlay */ ++ for (i = 0; i < ofbi->num_overlays; i++) { ++ if (ofbi->overlays[i]->manager) ++ return ofbi->overlays[i]->manager->device; ++ } ++ ++ return NULL; ++} ++ ++static inline void omapfb_lock(struct omapfb2_device *fbdev) ++{ ++ mutex_lock(&fbdev->mtx); ++} ++ ++static inline void omapfb_unlock(struct omapfb2_device *fbdev) ++{ ++ mutex_unlock(&fbdev->mtx); ++} ++ ++static inline int omapfb_overlay_enable(struct omap_overlay *ovl, ++ int enable) ++{ ++ struct omap_overlay_info info; ++ ++ ovl->get_overlay_info(ovl, &info); ++ if (info.enabled == enable) ++ return 0; ++ info.enabled = enable; ++ return ovl->set_overlay_info(ovl, &info); ++} ++ ++static inline struct omapfb2_mem_region * ++omapfb_get_mem_region(struct omapfb2_mem_region *rg) ++{ ++ down_read_nested(&rg->lock, rg->id); ++ atomic_inc(&rg->lock_count); ++ return rg; ++} ++ ++static inline void omapfb_put_mem_region(struct omapfb2_mem_region *rg) ++{ ++ atomic_dec(&rg->lock_count); ++ up_read(&rg->lock); ++} ++ ++#endif +-- --- pvr-omap4-kernel-0.24.9.orig/debian/patches/series +++ pvr-omap4-kernel-0.24.9/debian/patches/series @@ -0,0 +1 @@ +0001-hack-add-omapfb-h.patch --- pvr-omap4-kernel-0.24.9.orig/sgx/dkms.conf +++ pvr-omap4-kernel-0.24.9/sgx/dkms.conf @@ -0,0 +1,9 @@ +PACKAGE_NAME="pvr-omap4-kernel" +PACKAGE_VERSION="__VERSION__" +CLEAN="make clean" + +MAKE[0]="make all KVERSION=$kernelver" +BUILT_MODULE_NAME[0]="pvrsrvkm" +DEST_MODULE_LOCATION[0]="/extra" + +AUTOINSTALL="yes" --- pvr-omap4-kernel-0.24.9.orig/sgx/Makefile +++ pvr-omap4-kernel-0.24.9/sgx/Makefile @@ -0,0 +1,31 @@ +# This top-level makefile is called by DKMS. +# It must provide targets: 'all' and 'clean'. +# Making 'all' the default target is nice to have. +# This makefile must take the $KVERSION variable into account. + +.PHONY: all clean + +# Set to 'debug' for debug build. +# (Note that you will need libraries & apps compiled in +# 'debug' too for this to be usable.) +#FLAVOUR := debug +FLAVOUR := release + +# Define for verbose build. +#export V := 1 + +KVERSION := $(shell uname -r) +export CROSS_COMPILE := +export DISCIMAGE := $(PWD) +export KERNELDIR := /usr/src/linux-headers-$(KVERSION) +export SUPPORT_XORG := 1 +DIR := eurasiacon/build/linux/omap4430_linux/kbuild + +all: + $(MAKE) -C $(DIR) BUILD=$(FLAVOUR) \ + && cp ./eurasiacon/binary_omap4430_linux_$(FLAVOUR)/*.ko . +# Note: we replace the 'make install' step by our cp for now. + +clean: + $(MAKE) -C $(DIR) clean \ + && rm -f *.ko