[oe-commits] org.oe.dev merge of '6a6b5625ce1a2f68e15757a541a724d13945155a'

crofton commit oe at amethyst.openembedded.net
Mon Jul 28 21:16:07 UTC 2008


merge of '6a6b5625ce1a2f68e15757a541a724d13945155a'
     and 'c11624e19576778237cea5d125bbc9f0b39d26cc'

Author: crofton at openembedded.org
Branch: org.openembedded.dev
Revision: 154d82740f4a13ef53553ca5cd9af7689511b994
ViewMTN: http://monotone.openembedded.org/revision/info/154d82740f4a13ef53553ca5cd9af7689511b994
Files:
1
packages/libmatthew/libmatthew_0.5.bb
packages/vte/vte_0.16.8.bb
packages/vte/vte_0.16.9.bb
packages/tangogps/files
packages/libmatthew/libmatthew.inc
packages/libmatthew/libmatthew_0.7.1.bb
packages/meta/distro-feed-configs.bb
packages/tangogps/files/0002-Get-GPS-data-via-the-gypsy-interface.patch
packages/tangogps/files/0003-Try-to-request-the-GPS-resource-from-ousaged.patch
packages/tangogps/tangogps-fso_0.9.2.bb
conf/distro/include/preferred-om-2008-versions.inc
packages/dbus-java/dbus-java_2.3.bb
packages/dbus-java/dbus-java_2.4.bb
packages/imagemagick/imagemagick_6.3.5-10.bb
packages/libmatthew/libmatthew_0.7.bb
packages/vte/vte.inc
packages/linux/gumstix-kernel-2.6.21/smc91x-fail-if-no-chip.patch
packages/linux/gumstix-kernel-2.6.21/tsc2003.c
packages/linux/gumstix-kernel_2.6.21.bb
packages/linux/gumstix-linux.inc
Diffs:

#
# mt diff -r6a6b5625ce1a2f68e15757a541a724d13945155a -r154d82740f4a13ef53553ca5cd9af7689511b994
#
#
#
# delete "packages/libmatthew/libmatthew_0.5.bb"
# 
# delete "packages/vte/vte_0.16.8.bb"
# 
# delete "packages/vte/vte_0.16.9.bb"
# 
# add_dir "packages/tangogps/files"
# 
# add_file "packages/libmatthew/libmatthew.inc"
#  content [58194bd41e566922cfbe447117b8251be5c758ec]
# 
# add_file "packages/libmatthew/libmatthew_0.7.1.bb"
#  content [5368e855e8426080e396ce1d0f8a17faaf843d95]
# 
# add_file "packages/meta/distro-feed-configs.bb"
#  content [5c7bcb7a4ed120f1953149991e2a362b36a429be]
# 
# add_file "packages/tangogps/files/0002-Get-GPS-data-via-the-gypsy-interface.patch"
#  content [45b07e2a1875c6424e684b81b4e8e960467bb47a]
# 
# add_file "packages/tangogps/files/0003-Try-to-request-the-GPS-resource-from-ousaged.patch"
#  content [0b726fea6b39675efe8f3b61db233741b2b8f8c5]
# 
# add_file "packages/tangogps/tangogps-fso_0.9.2.bb"
#  content [1829b3be52c4104bd5fa0b9abcd36ff3948b5930]
# 
# patch "conf/distro/include/preferred-om-2008-versions.inc"
#  from [1b5cac00d46388ab063fd9310c8e3b9aac2ac9c4]
#    to [de9d4b591e5fc2aee97cb683cb4c06bd3b30b405]
# 
# patch "packages/dbus-java/dbus-java_2.3.bb"
#  from [815714e636ac18cc91f38966a30a02df3057e1ef]
#    to [575d1bce4f960e8739b07964559e58e5768379d1]
# 
# patch "packages/dbus-java/dbus-java_2.4.bb"
#  from [9e606b58fa7b7996d5de35d17f5c373e5ed79c01]
#    to [3be815bf6755338045753a524ff10c510c2494e9]
# 
# patch "packages/imagemagick/imagemagick_6.3.5-10.bb"
#  from [1d2ed3471deb4e336d60cf64a0fd08aa576337bc]
#    to [214cf6cb6a05d8f49b255817a611d2dd2537a853]
# 
# patch "packages/libmatthew/libmatthew_0.7.bb"
#  from [14a246a8f48391ed663d6bc440b6c11579d2bf16]
#    to [fe9e94b1bca7f5fcf2d32b747ffbf8315fc7dd84]
# 
# patch "packages/vte/vte.inc"
#  from [780449de951c6a497b507b5dda72add7d9ee3060]
#    to [8dfe2fac6874cb77f61c5ecec5fd35f79320358b]
#
============================================================
--- packages/libmatthew/libmatthew.inc	58194bd41e566922cfbe447117b8251be5c758ec
+++ packages/libmatthew/libmatthew.inc	58194bd41e566922cfbe447117b8251be5c758ec
@@ -0,0 +1,71 @@
+DESCRIPTION = "Unix socket, debug and hexdump libraries"
+AUTHOR = "Matthew Johnson <web at matthew.ath.cx>"
+HOMEPAGE = "http://www.matthew.ath.cx/projects/java"
+SECTION = "libs"
+LICENSE = "LGPL"
+DEPENDS = "classpath-native classpath fastjar-native virtual/javac-native"
+
+S = "${WORKDIR}/libmatthew-java-${PV}"
+
+inherit java-library
+
+# Some internal version numbers which change from time to time.
+# Allowing to override them makes this include file more
+# versatile.
+VER_CGI 	?= "0.5"
+VER_DEBUG 	?= "1.1"
+VER_HEXDUMP	?= "0.2"
+VER_IO 		?= "0.1"
+VER_UNIX 	?= "0.5"
+
+do_compile() {
+    oe_runmake \
+        JCFLAGS="-source 1.5" \
+        JAVAC="javac" \
+        JAR="fastjar" \
+        JAVAH="gjavah" \
+        INCLUDES="-I${STAGING_INCDIR}/classpath" \
+        LDFLAGS="-fpic -shared -lc ${LDFLAGS}" \
+        LD="${CC}" \
+        CFLAGS="-fpic -Wall -Os -pedantic -std=c99 -Werror"
+}
+do_install() {
+    oe_jarinstall cgi-${VER_CGI}.jar cgi.jar
+    oe_jarinstall debug-disable-${VER_DEBUG}.jar debug-disable.jar
+    oe_jarinstall debug-enable-${VER_DEBUG}.jar debug-enable.jar
+    oe_jarinstall hexdump-${VER_HEXDUMP}.jar hexdump.jar
+    oe_jarinstall io-${VER_IO}.jar io.jar
+    oe_jarinstall unix-${VER_UNIX}.jar unix.jar
+    oe_libinstall -so libcgi-java ${D}${libdir_jni}
+    oe_libinstall -so libunix-java ${D}${libdir_jni}
+}
+
+do_stage() {
+    oe_jarinstall -s cgi-${VER_CGI}.jar cgi.jar
+    oe_jarinstall -s debug-disable-${VER_DEBUG}.jar debug-disable.jar
+    oe_jarinstall -s debug-enable-${VER_DEBUG}.jar debug-enable.jar
+    oe_jarinstall -s hexdump-${VER_HEXDUMP}.jar hexdump.jar
+    oe_jarinstall -s io-${VER_IO}.jar io.jar
+    oe_jarinstall -s unix-${VER_UNIX}.jar unix.jar
+}
+
+PACKAGES = "\
+	libcgi-java libcgi-jni libcgi-jni-dbg \
+	libunixsocket-java libunixsocket-jni libunixsocket-jni-dbg \
+	${PN}-io-java ${PN}-debug-java \
+"
+
+FILES_libcgi-java = "${datadir_java}/cgi*.jar"
+FILES_libcgi-jni = "${libdir_jni}/libcgi-java.so"
+FILES_libcgi-jni-dbg = "${libdir_jni}/.debug/libcgi-java.so"
+RDEPENDS_libcgi-java = "libcgi-jni"
+
+FILES_libunixsocket-java = "${datadir_java}/unix*.jar"
+FILES_libunixsocket-jni = "${libdir_jni}/libunix-java.so"
+FILES_libunixsocket-jni-dbg = "${libdir_jni}/.debug/libunix-java.so"
+RDEPENDS_libunixsocket-java = "libunixsocket-jni"
+
+FILES_${PN}-io-java = "${datadir_java}/io*.jar"
+
+FILES_${PN}-debug-java = "${datadir_java}/debug-*.jar ${datadir_java}/hexdump*.jar"
+
============================================================
--- packages/libmatthew/libmatthew_0.7.1.bb	5368e855e8426080e396ce1d0f8a17faaf843d95
+++ packages/libmatthew/libmatthew_0.7.1.bb	5368e855e8426080e396ce1d0f8a17faaf843d95
@@ -0,0 +1,8 @@
+require libmatthew.inc
+
+PR = "r0"
+
+SRC_URI = "http://www.matthew.ath.cx/projects/java/libmatthew-java-${PV}.tar.gz \
+           file://Makefile-0.7.patch;patch=1"
+
+
============================================================
--- packages/meta/distro-feed-configs.bb	5c7bcb7a4ed120f1953149991e2a362b36a429be
+++ packages/meta/distro-feed-configs.bb	5c7bcb7a4ed120f1953149991e2a362b36a429be
@@ -0,0 +1,30 @@
+DESCRIPTION = "Configuration files for online package repositories aka feeds"
+PR = "r0"
+
+DISTRO_FEED_PREFIX ?= "remote"
+DISTRO_FEED_URI ?= "http://my-distribution.org/remote-feed/"
+
+do_compile() {
+    mkdir -p ${S}/${sysconfdir}/opkg
+    for feed in all ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}; do
+        echo "src/gz ${DISTRO_FEED_PREFIX}-${feed} ${DISTRO_FEED_URI}/${feed}" > ${S}/${sysconfdir}/opkg/${feed}-feed.conf
+    done
+}
+do_install () {
+        install -d ${D}${sysconfdir}/opkg
+        install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+#def distro_feed_configs(d):
+#    import bb
+#    parchs = bb.data.getVar( "PACKAGE_EXTRA_ARCHS", d, 1 ).split()
+#    march = bb.data.getVar( "MACHINE_ARCH", d, 1 ).split()
+#    archs = [ "all" ] + parchs + march
+#    confs = [ ( "${sysconfdir}/opkg/%s-feed.conf" % feed ) for feed in archs ]
+#    return " ".join( confs )
+#
+#CONFFILES_${PN} += '${@distro_feed_configs(d)}'
+
+CONFFILES_${PN} += '${@ " ".join( [ ( "${sysconfdir}/opkg/%s-feed.conf" % feed ) for feed in "all ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".split() ] ) }'
============================================================
--- packages/tangogps/files/0002-Get-GPS-data-via-the-gypsy-interface.patch	45b07e2a1875c6424e684b81b4e8e960467bb47a
+++ packages/tangogps/files/0002-Get-GPS-data-via-the-gypsy-interface.patch	45b07e2a1875c6424e684b81b4e8e960467bb47a
@@ -0,0 +1,182 @@
+From aab817f5f2d66f1ef1e710eb6b698865d14b7fc2 Mon Sep 17 00:00:00 2001
+From: Daniel Willmann <daniel at totalueberwachung.de>
+Date: Mon, 21 Jul 2008 04:33:59 +0200
+Subject: [PATCH] Get GPS data via the gypsy interface.
+ Except for the time (which ogpsd doesn't send periodically) the interface
+ is implemented.
+
+---
+ configure.in        |    2 +-
+ src/gps_functions.c |   96 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/gps_functions.h |    3 +-
+ src/init.c          |    6 ++-
+ 4 files changed, 103 insertions(+), 4 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 3661a57..cf06033 100644
+--- a/configure.in
++++ b/configure.in
+@@ -23,7 +23,7 @@ AM_GLIB_GNU_GETTEXT
+ 
+ AM_PROG_LIBTOOL
+ 
+-PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 gdk-2.0 gconf-2.0])
++PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 gdk-2.0 gconf-2.0 gypsy])
+ AC_SUBST(PACKAGE_CFLAGS)
+ AC_SUBST(PACKAGE_LIBS)
+ 
+diff --git a/src/gps_functions.c b/src/gps_functions.c
+index bafbc18..57646e1 100644
+--- a/src/gps_functions.c
++++ b/src/gps_functions.c
+@@ -4,6 +4,13 @@
+ #  include <config.h>
+ #endif
+ 
++#include <gypsy/gypsy-control.h>
++#include <gypsy/gypsy-device.h>
++#include <gypsy/gypsy-position.h>
++#include <gypsy/gypsy-accuracy.h>
++#include <gypsy/gypsy-course.h>
++#include <gypsy/gypsy-satellite.h>
++
+ #include <glib.h>
+ #include <glib/gprintf.h>
+ 
+@@ -630,3 +637,92 @@ get_gps()
+ 	
+ 
+ }
++
++static void on_fix_status_changed(GypsyDevice *device, GypsyDeviceFixStatus status, void *user_data)
++{
++	gpsdata->fix.mode = status;
++	gpsdata->valid =  status > 1;
++}
++
++static void on_position_changed(GypsyPosition *position, GypsyPositionFields fields_set,
++		int timestamp, double latitude, double longitude, double altitude, void *user_data)
++{
++	if (gpsdata->valid) {
++		gpsdata->fix.latitude = latitude;
++		gpsdata->fix.longitude = longitude;
++		gpsdata->fix.altitude = altitude;
++	}
++}
++
++static void on_accuracy_changed(GypsyAccuracy *accuracy, int fields, double pdop,
++		double hdop, double vdop, void *user_data)
++{
++	gpsdata->hdop = hdop;
++}
++
++static void on_course_changed(GypsyCourse *course, GypsyCourseFields fields_set,
++		int timestamp, double speed, double direction, double climb, void *user_data)
++{
++	gpsdata->fix.speed = speed/3.6;
++	gpsdata->fix.track = direction;
++}
++
++static void on_satellites_changed(GypsySatellite *sat,  GPtrArray *sats, void *user_data)
++{
++	int i;
++
++	gpsdata->satellites_used = 0;
++	gpsdata->satellites_inview = sats->len;
++	for (i = 0; i < sats->len; i++) {
++	    GypsySatelliteDetails *details = sats->pdata[i];
++
++			if (details->in_use) {
++				gpsdata->satellites_used++;
++			}
++	}
++}
++
++// typedef struct {
++//     double time;        /* Time of update, seconds since Unix epoch */
++//     int    mode;        /* Mode of fix */
++//     double latitude;    /* Latitude in degrees (valid if mode >= 2) */
++//     double longitude;   /* Longitude in degrees (valid if mode >= 2) */
++//     double altitude;    /* Altitude in meters (valid if mode == 3) */
++//     double track;       /* Course made good (relative to true north) */
++//     double speed;       /* Speed over ground, meters/sec */
++//     double bearing;	/* in radian */
++// } gps_fix_t;
++// 
++// typedef struct {
++// 	gps_fix_t fix;
++// 	int satellites_used;
++// 	int satellites_inview;
++// 	double hdop;
++// 	gboolean valid;
++// } gps_data_t;
++
++
++#define GYPSY_OBJ_PATH "/org/freedesktop/Gypsy"
++
++int setup_gypsy() {
++	gpsdata = g_new0(gps_data_t,1);
++
++	GypsyControl *gyctrl = gypsy_control_get_default();
++	GypsyDevice *gydevice = gypsy_device_new(GYPSY_OBJ_PATH);
++	GypsyPosition *gypos = gypsy_position_new(GYPSY_OBJ_PATH);
++	GypsyAccuracy *gyacc = gypsy_accuracy_new(GYPSY_OBJ_PATH);
++	GypsyCourse *gycourse = gypsy_course_new(GYPSY_OBJ_PATH);
++	GypsySatellite *gysat = gypsy_satellite_new(GYPSY_OBJ_PATH);
++
++	g_signal_connect(gydevice, "fix-status-changed", G_CALLBACK(on_fix_status_changed), NULL);
++	g_signal_connect(gypos, "position-changed", G_CALLBACK(on_position_changed), NULL);
++	g_signal_connect(gyacc, "accuracy-changed", G_CALLBACK(on_accuracy_changed), NULL);
++	g_signal_connect(gycourse, "course-changed", G_CALLBACK(on_course_changed), NULL);
++	g_signal_connect(gysat, "satellites-changed", G_CALLBACK(on_satellites_changed), NULL);
++
++	gpsdata->fix.mode = gypsy_device_get_fix_status(gydevice, NULL);
++	gpsdata->valid = gpsdata->fix.mode > 1;
++
++	return 1;
++}
++
+diff --git a/src/gps_functions.h b/src/gps_functions.h
+index 1090565..207b39f 100644
+--- a/src/gps_functions.h
++++ b/src/gps_functions.h
+@@ -1,4 +1,5 @@
+-
++int
++setup_gypsy();
+ 
+ void
+ get_gps();
+diff --git a/src/init.c b/src/init.c
+index 46ca583..c557ce4 100644
+--- a/src/init.c
++++ b/src/init.c
+@@ -26,7 +26,7 @@
+ #include "wp.h"
+ 
+ FILE *fp = NULL;
+-
++int have_gypsy = 0;
+ 
+ 
+ void
+@@ -197,7 +197,8 @@ cb_gps_timer()
+ 			
+ 	printf("timer called\n");
+ 
+-	get_gps();
++	if (!have_gypsy)
++		get_gps();
+ 	
+ 
+ 	if(gpsdata) 
+@@ -868,5 +869,6 @@ init()
+ 	gtk_label_set_text(GTK_LABEL(widget), "V: " VERSION " (C) Marcus Bauer, GPLv2");
+ #endif
+ 
++	have_gypsy = setup_gypsy();
+ 	timer = g_timeout_add (1000,cb_gps_timer,data);
+ }
+-- 
+1.5.4.5
+
============================================================
--- packages/tangogps/files/0003-Try-to-request-the-GPS-resource-from-ousaged.patch	0b726fea6b39675efe8f3b61db233741b2b8f8c5
+++ packages/tangogps/files/0003-Try-to-request-the-GPS-resource-from-ousaged.patch	0b726fea6b39675efe8f3b61db233741b2b8f8c5
@@ -0,0 +1,73 @@
+From 2562a173716141cd9ea5c227dfa52f04ce4205f8 Mon Sep 17 00:00:00 2001
+From: Daniel Willmann <daniel at totalueberwachung.de>
+Date: Tue, 22 Jul 2008 00:22:58 +0200
+Subject: [PATCH] Try to request the GPS resource from ousaged
+
+---
+ configure.in        |    2 +-
+ src/gps_functions.c |   22 ++++++++++++++++++++++
+ 2 files changed, 23 insertions(+), 1 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index cf06033..2bc3cf9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -23,7 +23,7 @@ AM_GLIB_GNU_GETTEXT
+ 
+ AM_PROG_LIBTOOL
+ 
+-PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 gdk-2.0 gconf-2.0 gypsy])
++PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 gdk-2.0 gconf-2.0 dbus-glib-1 gypsy])
+ AC_SUBST(PACKAGE_CFLAGS)
+ AC_SUBST(PACKAGE_LIBS)
+ 
+diff --git a/src/gps_functions.c b/src/gps_functions.c
+index 57646e1..0802e67 100644
+--- a/src/gps_functions.c
++++ b/src/gps_functions.c
+@@ -11,6 +11,7 @@
+ #include <gypsy/gypsy-course.h>
+ #include <gypsy/gypsy-satellite.h>
+ 
++#include <dbus/dbus-glib.h>
+ #include <glib.h>
+ #include <glib/gprintf.h>
+ 
+@@ -705,6 +706,11 @@ static void on_satellites_changed(GypsySatellite *sat,  GPtrArray *sats, void *u
+ #define GYPSY_OBJ_PATH "/org/freedesktop/Gypsy"
+ 
+ int setup_gypsy() {
++	DBusGConnection *connection;
++	DBusGProxy *proxy;
++	GError *error;
++	int result;
++
+ 	gpsdata = g_new0(gps_data_t,1);
+ 
+ 	GypsyControl *gyctrl = gypsy_control_get_default();
+@@ -723,6 +729,22 @@ int setup_gypsy() {
+ 	gpsdata->fix.mode = gypsy_device_get_fix_status(gydevice, NULL);
+ 	gpsdata->valid = gpsdata->fix.mode > 1;
+ 
++  error = NULL;
++  connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
++  if (connection == NULL) {
++    g_printerr ("Failed to open connection to bus: %s\n",
++          error->message);
++    g_error_free (error);
++    proxy = NULL;
++  }
++
++  proxy = dbus_g_proxy_new_for_name (connection,
++             "org.freesmartphone.ousaged",
++             "/org/freesmartphone/Usage",
++             "org.freesmartphone.Usage");
++
++	dbus_g_proxy_call (proxy, "RequestResource", &error, G_TYPE_STRING, "GPS", G_TYPE_INVALID, G_TYPE_BOOLEAN, &result, G_TYPE_INVALID);
++
+ 	return 1;
+ }
+ 
+-- 
+1.5.4.5
+
============================================================
--- packages/tangogps/tangogps-fso_0.9.2.bb	1829b3be52c4104bd5fa0b9abcd36ff3948b5930
+++ packages/tangogps/tangogps-fso_0.9.2.bb	1829b3be52c4104bd5fa0b9abcd36ff3948b5930
@@ -0,0 +1,13 @@
+LICENSE = "GPLv2"
+SECTION = "x11/applications"
+PRIORITY = "optional"
+DESCRIPTION = "lightweight and fast mapping application"
+DEPENDS = "curl gtk+ gconf gypsy dbus-glib"
+
+inherit autotools
+
+SRC_URI = "http://www.tangogps.org/downloads/tangogps-${PV}.tar.gz\
+	file://0002-Get-GPS-data-via-the-gypsy-interface.patch;patch=1 \
+	file://0003-Try-to-request-the-GPS-resource-from-ousaged.patch;patch=1"
+
+S=${WORKDIR}/tangogps-${PV}
============================================================
--- conf/distro/include/preferred-om-2008-versions.inc	1b5cac00d46388ab063fd9310c8e3b9aac2ac9c4
+++ conf/distro/include/preferred-om-2008-versions.inc	de9d4b591e5fc2aee97cb683cb4c06bd3b30b405
@@ -1953,7 +1953,7 @@ PREFERRED_VERSION_vsftpd ?= "2.0.5"
 PREFERRED_VERSION_vorbis-tools ?= "1.0.1"
 PREFERRED_VERSION_vpnc ?= "0.3.3"
 PREFERRED_VERSION_vsftpd ?= "2.0.5"
-PREFERRED_VERSION_vte ?= "0.16.9"
+PREFERRED_VERSION_vte ?= "0.16.13"
 PREFERRED_VERSION_vtun ?= "2.6"
 PREFERRED_VERSION_w3cam ?= "0.7.2"
 PREFERRED_VERSION_wakelan ?= "1.1"
============================================================
--- packages/dbus-java/dbus-java_2.3.bb	815714e636ac18cc91f38966a30a02df3057e1ef
+++ packages/dbus-java/dbus-java_2.3.bb	575d1bce4f960e8739b07964559e58e5768379d1
@@ -7,7 +7,7 @@ AUTHOR = "Matthew Johnson <dbus at matthew.
 HOMEPAGE = "http://dbus.freedesktop.org/doc/dbus-java"
 AUTHOR = "Matthew Johnson <dbus at matthew.ath.cx>"
 
-PR = "r3"
+PR = "r4"
 
 inherit java-library
 
@@ -16,9 +16,9 @@ DEPENDS = "libmatthew docbook-utils-nati
 S = "${WORKDIR}/dbus-java-${PV}"
 
 DEPENDS = "libmatthew docbook-utils-native docbook-sgml-dtd-4.1-native fastjar-native"
-R%s
>>> DIFF TRUNCATED @ 16K


#
# mt diff -rc11624e19576778237cea5d125bbc9f0b39d26cc -r154d82740f4a13ef53553ca5cd9af7689511b994
#
#
#
# patch "packages/linux/gumstix-kernel-2.6.21/smc91x-fail-if-no-chip.patch"
#  from [6e0c7c7aa4434946cf8b4cd831750fc911b71a8f]
#    to [59d76958e9386ba776c4d7973ec4f781251714c9]
# 
# patch "packages/linux/gumstix-kernel-2.6.21/tsc2003.c"
#  from [3d88771bf7e195cd7b70a35310b8bdf58b8878fd]
#    to [76927013729a5cacdb43f3e6e0f923085aeda7f6]
# 
# patch "packages/linux/gumstix-kernel_2.6.21.bb"
#  from [1f1a51ddd361d503ab44e816d5c0dee09e9bbff2]
#    to [abcf379ae73f3805d3364fbbf7d4e735d4c887b2]
# 
# patch "packages/linux/gumstix-linux.inc"
#  from [cc9aa9d293625e691bf43518593347e53526502f]
#    to [1832359f059ffffee7e93ddf8254be7269d927a5]
#
============================================================
--- packages/linux/gumstix-kernel-2.6.21/smc91x-fail-if-no-chip.patch	6e0c7c7aa4434946cf8b4cd831750fc911b71a8f
+++ packages/linux/gumstix-kernel-2.6.21/smc91x-fail-if-no-chip.patch	59d76958e9386ba776c4d7973ec4f781251714c9
@@ -52,7 +52,7 @@
  	
 -proceed:
 +proceed1:
-+  printk(KERN_ERR "%s: found %d smc91x chip(s)\n", __FUNCTION__);
++  printk(KERN_ERR "%s: found %d smc91x chip(s)\n", __FUNCTION__,num_devices);
  	pxa_gpio_mode(GPIO15_nCS_1_MD);
  
  	if(smc91x_devices[1]) pxa_gpio_mode(GPIO_GUMSTIX_ETH1_RST_MD);
============================================================
--- packages/linux/gumstix-kernel-2.6.21/tsc2003.c	3d88771bf7e195cd7b70a35310b8bdf58b8878fd
+++ packages/linux/gumstix-kernel-2.6.21/tsc2003.c	76927013729a5cacdb43f3e6e0f923085aeda7f6
@@ -3,7 +3,8 @@
  *
  *  Copyright (C) 2005 Bill Gatliff <bgat at billgatliff.com>
  *  Changes for 2.6.20 kernel by Nicholas Chen <nchen at cs.umd.edu>
- *  Changes for 2.6.21 kernel by Chris Dollar <chris.dollar at gmail.com>
+ *  Changes to poll for events rather than use penirq by 
+ *  Chris Dollar <chris.dollar at gmail.com>
  *
  *  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
@@ -12,7 +13,6 @@
  *  Driver for TI's TSC2003 I2C Touch Screen Controller
  */
 
-//#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
@@ -21,10 +21,8 @@
 #include <linux/bcd.h>
 #include <linux/list.h>
 #include <linux/device.h>
-#include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/delay.h>
-#include <asm-arm/arch-pxa/irqs.h>
 
 #define DRIVER_NAME "tsc2003"
 #define TSC2003_CMD(cn,pdn,m) (((cn) << 4) | ((pdn) << 2) | ((m) << 1))
@@ -37,10 +35,10 @@ enum tsc2003_pd {
 I2C_CLIENT_INSMOD_1(tsc2003);
 
 enum tsc2003_pd {
-	PD_POWERDOWN = 0, /* penirq */
-	PD_IREFOFF_ADCON = 1, /* no penirq */
-	PD_IREFON_ADCOFF = 2, /* penirq */
-	PD_IREFON_ADCON = 3, /* no penirq */
+	PD_POWERDOWN = 0,
+	PD_IREFOFF_ADCON = 1,
+	PD_IREFON_ADCOFF = 2,
+	PD_IREFON_ADCON = 3,
 	PD_PENIRQ_ARM = PD_IREFON_ADCOFF,
 	PD_PENIRQ_DISARM = PD_IREFON_ADCON,
 };
@@ -70,14 +68,10 @@ struct tsc2003_data {
 	struct i2c_client client;
 	struct device_driver driver;
 	struct input_dev *idev;
-	struct semaphore sem;
 	struct task_struct *tstask;
 	struct completion tstask_completion;
-	struct completion penirq_completion;
 	enum tsc2003_pd pd;
 	enum tsc2003_m m;
-	int penirq;
-
 	int vbat1;
 	int vbat2;
 	int temp0;
@@ -86,11 +80,12 @@ struct tsc2003_data {
 	int in2;
 };
 
-static int
-		tsc2003_i2c_detect(struct i2c_adapter *adapter, int address, int kind);
+static int tsc2003_i2c_detect(struct i2c_adapter *adapter, int address,
+			      int kind);
 
 static int tsc2003_read(struct tsc2003_data *data, enum tsc2003_cmd cmd,
-		enum tsc2003_pd pd, int *val) {
+			enum tsc2003_pd pd, int *val)
+{
 	char c;
 	char d[2];
 	int ret;
@@ -101,7 +96,8 @@ static int tsc2003_read(struct tsc2003_d
 		goto err;
 
 	udelay(20);
-	ret = i2c_master_recv(&data->client, d, data->m == M_12BIT ? 2 : 1);
+	ret =
+	    i2c_master_recv(&data->client, d, data->m == M_12BIT ? 2 : 1);
 	if (ret <= 0)
 		goto err;
 
@@ -111,70 +107,80 @@ static int tsc2003_read(struct tsc2003_d
 		if (data->m == M_12BIT)
 			*val += (d[1] >> 4);
 	}
-
 #if defined(CONFIG_I2C_DEBUG_CHIP)
 	printk(KERN_ERR "%s: val[%x] = %d\n",
-			__FUNCTION__, cmd, (((int)d[0]) << 8) + d[1]);
+	       __FUNCTION__, cmd, (((int) d[0]) << 8) + d[1]);
 #endif
 
 	return 0;
-	err: if (!ret)
+      err:if (!ret)
 		ret = -ENODEV;
 	return ret;
 }
 
 static inline int tsc2003_read_temp0(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *t) {
+				     tsc2003_pd pd, int *t)
+{
 	return tsc2003_read(d, MEAS_TEMP0, pd, t);
 }
 
 static inline int tsc2003_read_temp1(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *t) {
+				     tsc2003_pd pd, int *t)
+{
 	return tsc2003_read(d, MEAS_TEMP1, pd, t);
 }
 
 static inline int tsc2003_read_xpos(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *x) {
+				    tsc2003_pd pd, int *x)
+{
 	return tsc2003_read(d, MEAS_XPOS, pd, x);
 }
 
 static inline int tsc2003_read_ypos(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *y) {
+				    tsc2003_pd pd, int *y)
+{
 	return tsc2003_read(d, MEAS_YPOS, pd, y);
 }
 
 static inline int tsc2003_read_pressure(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *p) {
+					tsc2003_pd pd, int *p)
+{
 	return tsc2003_read(d, MEAS_Z1POS, pd, p);
 }
 
 static inline int tsc2003_read_in1(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *t) {
+				   tsc2003_pd pd, int *t)
+{
 	return tsc2003_read(d, MEAS_IN1, pd, t);
 }
 
 static inline int tsc2003_read_in2(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *t) {
+				   tsc2003_pd pd, int *t)
+{
 	return tsc2003_read(d, MEAS_IN2, pd, t);
 }
 
 static inline int tsc2003_read_vbat1(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *t) {
+				     tsc2003_pd pd, int *t)
+{
 	return tsc2003_read(d, MEAS_VBAT1, pd, t);
 }
 
 static inline int tsc2003_read_vbat2(struct tsc2003_data *d, enum
-tsc2003_pd pd, int *t) {
+				     tsc2003_pd pd, int *t)
+{
 	return tsc2003_read(d, MEAS_VBAT2, pd, t);
 }
 
-static inline int tsc2003_powerdown(struct tsc2003_data *d) {
+static inline int tsc2003_powerdown(struct tsc2003_data *d)
+{
 	/* we don't have a distinct powerdown command,
-	 so do a benign read with the PD bits cleared */
+	   so do a benign read with the PD bits cleared */
 	return tsc2003_read(d, MEAS_IN1, PD_POWERDOWN, 0);
 }
 
-void tsc2003_init_client(struct i2c_client *client) {
+void tsc2003_init_client(struct i2c_client *client)
+{
 	struct tsc2003_data *data = i2c_get_clientdata(client);
 
 	data->pd = PD_PENIRQ_DISARM;
@@ -182,34 +188,10 @@ void tsc2003_init_client(struct i2c_clie
 	return;
 }
 
-static irqreturn_t tsc2003_penirq(int irq, void *v) {
+static int tsc2003ts_thread(void *v)
+{
 	struct tsc2003_data *d = v;
-
-	printk(KERN_INFO "penirq: %Ld\n", jiffies);
-
-    // disable the penirq while we take the sample					
-	disable_irq_nosync(d->penirq);
-
-	complete(&d->penirq_completion);
-	return IRQ_HANDLED;
-}
-
-static void tsc2003_pen_up(unsigned long v) {
-    printk(KERN_INFO "tsc2003_pen_up - re-enable irq now\n");
-	struct tsc2003_data *d = (struct tsc2003_data *)v;
-
-    enable_irq(d->penirq);
-
-	input_report_abs(d->idev, ABS_PRESSURE, 0);
-	input_sync(d->idev);
-	return;
-}
-
-static int tsc2003ts_thread(void *v) {
-	struct tsc2003_data *d = v;
 	struct task_struct *tsk = current;
-	int ret;
-	int err = 0;
 
 	d->tstask = tsk;
 
@@ -220,70 +202,59 @@ static int tsc2003ts_thread(void *v) {
 
 #if defined(CONFIG_I2C_DEBUG_CHIP)
 	printk(KERN_INFO "%s: address 0x%x\n",
-			__FUNCTION__, d->client.addr);
-#endif		
-			
-	do {
-      unsigned int x, y, p, fp;
-      int pen_is_up = 0;
-      
-      down(&d->sem);         
+	       __FUNCTION__, d->client.addr);
+#endif
 
-      // take the sample
-      d->pd = PD_PENIRQ_DISARM;
-      tsc2003_read_xpos(d, PD_PENIRQ_DISARM, &x);
-      tsc2003_read_ypos(d, PD_PENIRQ_DISARM, &y);
-      tsc2003_read_pressure(d, PD_PENIRQ_DISARM, &p);
+	do {
+		unsigned int x, y, p;
+		int pen_is_up = 0;
 
-      if (p < 64) {
-        p=0;
-      }
+		d->pd = PD_PENIRQ_DISARM;
+		tsc2003_read_xpos(d, PD_PENIRQ_DISARM, &x);
+		tsc2003_read_ypos(d, PD_PENIRQ_DISARM, &y);
+		tsc2003_read_pressure(d, PD_PENIRQ_DISARM, &p);
 
+		if (p < 64) {
+			p = 0;
+		}
 #if defined(CONFIG_I2C_DEBUG_CHIP)
-      printk(KERN_INFO "TSD X: %d Y: %d P: %d\n", x, y, p);
-#endif		
+		printk(KERN_INFO "TSD X: %d Y: %d P: %d\n", x, y, p);
+#endif
 
-      if (!pen_is_up) {
-        // report our touch to the input layer
-        input_report_abs(d->idev, ABS_X, 4096 - x);
-        input_report_abs(d->idev, ABS_Y, 4096 - y);
-        input_report_abs(d->idev, ABS_PRESSURE, p);
-        input_sync(d->idev);
-      }
+		if (!pen_is_up) {
+			input_report_abs(d->idev, ABS_X, 4096 - x);
+			input_report_abs(d->idev, ABS_Y, 4096 - y);
+			input_report_abs(d->idev, ABS_PRESSURE, p);
+			input_sync(d->idev);
+		}
 
-      if(p == 0) {
+		if (p == 0) {
 #if defined(CONFIG_I2C_DEBUG_CHIP)
-        printk(KERN_INFO "No pressure - pen is up!\n");
-#endif		
-        // set our pen as up
-        pen_is_up = 1;                            
-      }                    
-      else {                    
+			printk(KERN_INFO "No pressure - pen is up!\n");
+#endif
+			pen_is_up = 1;
+		} else {
 #if defined(CONFIG_I2C_DEBUG_CHIP)
-        printk(KERN_INFO "Pen is still down - sleeping and will re-sample!\n");
-#endif		
-        // set our pen as down
-        pen_is_up = 0;                            
-      }
+			printk(KERN_INFO
+			       "Pen is still down - sleeping and will re-sample!\n");
+#endif
+			pen_is_up = 0;
+		}
 
-      // sleep for 3 jiffies to give us about 30 updates/sec
-      msleep (3);
+		// sleep for 3 jiffies to give us about 30 updates/sec
+		msleep(3);
 
-      up(&d->sem);
-
 	} while (!signal_pending(tsk));
 
 	d->tstask = NULL;
 	complete_and_exit(&d->tstask_completion, 0);
 }
 
-static int tsc2003_idev_open(struct input_dev *idev) {
+static int tsc2003_idev_open(struct input_dev *idev)
+{
 	struct tsc2003_data *d = idev->private;
 	int ret = 0;
 
-	if (down_interruptible(&d->sem))
-		return -EINTR;
-
 	if (d->tstask)
 		panic(DRIVER_NAME "tsd already running (!). abort.");
 
@@ -293,51 +264,27 @@ static int tsc2003_idev_open(struct inpu
 		ret = 0;
 	}
 
-	up(&d->sem);
 	return ret;
 }
 
-static void tsc2003_idev_close(struct input_dev *idev) {
+static void tsc2003_idev_close(struct input_dev *idev)
+{
 	struct tsc2003_data *d = idev->private;
-	down_interruptible(&d->sem);
 	if (d->tstask) {
 		send_sig(SIGKILL, d->tstask, 1);
 		wait_for_completion(&d->tstask_completion);
 	}
 
-	up(&d->sem);
 	return;
 }
 
-static int tsc2003_detect_irq(struct tsc2003_data *d) {
-	d->penirq = IRQ_GPIO(16); //PWM0 GPIO
-	return 0;
-}
-
-static int tsc2003_driver_register(struct tsc2003_data *data) {
+static int tsc2003_driver_register(struct tsc2003_data *data)
+{
 	struct input_dev *idev;
 	int ret = 0;
-	int error;
 
-	init_MUTEX(&data->sem);
+	init_completion(&data->tstask_completion);
 
-	error = tsc2003_detect_irq(data);
-	if (error) {
-		printk(KERN_ERR "TSC2003: IRQ probe failed\n");
-	}
-
-	if (data->penirq) {
-		ret = request_irq(data->penirq, tsc2003_penirq, SA_INTERRUPT | IRQF_TRIGGER_LOW,
-				DRIVER_NAME, data);
-		if (!ret) {
-			printk(KERN_INFO "%s: irq %d\n", __FUNCTION__, data->penirq);
-			init_completion(&data->tstask_completion);
-			init_completion(&data->penirq_completion);
-		} else {
-			printk(KERN_ERR "%s: cannot grab irq %d\n", __FUNCTION__, data->penirq);
-		}
-	}
-
 	idev = input_allocate_device();
 	data->idev = idev;
 
@@ -361,19 +308,21 @@ static int tsc2003_driver_register(struc
 	return ret;
 }
 
-static int tsc2003_i2c_attach_adapter(struct i2c_adapter *adapter) {
+static int tsc2003_i2c_attach_adapter(struct i2c_adapter *adapter)
+{
 	printk(KERN_INFO "tsc2003 i2c touch screen controller\n");
+#if defined(CONFIG_I2C_DEBUG_CHIP)
 	printk(KERN_INFO "Bill Gatliff <bgat at billgatliff.com\n");
-    printk(KERN_INFO "Nicholas Chen <nchen at cs.umd.edu>\n");
-
-    return i2c_probe(adapter, &addr_data, tsc2003_i2c_detect);
+	printk(KERN_INFO "Nicholas Chen <nchen at cs.umd.edu>\n");
+#endif
+	return i2c_probe(adapter, &addr_data, tsc2003_i2c_detect);
 }
 
-static int tsc2003_i2c_detach_client(struct i2c_client *client) {
+static int tsc2003_i2c_detach_client(struct i2c_client *client)
+{
 	int err;
 	struct tsc2003_data *d = i2c_get_clientdata(client);
 
-	free_irq(d->penirq, d);
 	input_unregister_device(d->idev);
 
 	if ((err = i2c_detach_client(client))) {
@@ -385,16 +334,18 @@ static int tsc2003_i2c_detach_client(str
 	return 0;
 }
 
-static struct i2c_driver tsc2003_driver = { 
-    .driver = {
-	    .owner = THIS_MODULE,
-	    .name = DRIVER_NAME,
-    }, 
-    .attach_adapter = tsc2003_i2c_attach_adapter,
-    .detach_client = tsc2003_i2c_detach_client, 
+static struct i2c_driver tsc2003_driver = {
+	.driver = {
+		   .owner = THIS_MODULE,
+		   .name = DRIVER_NAME,
+		   },
+	.attach_adapter = tsc2003_i2c_attach_adapter,
+	.detach_client = tsc2003_i2c_detach_client,
 };
 
-static int tsc2003_i2c_detect(struct i2c_adapter *adapter, int address, int kind) {
+static int tsc2003_i2c_detect(struct i2c_adapter *adapter, int address,
+			      int kind)
+{
 	struct i2c_client *new_client;
 	struct tsc2003_data *data;
 
@@ -402,7 +353,8 @@ static int tsc2003_i2c_detect(struct i2c
 	const char *name = "";
 
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA
-			| I2C_FUNC_I2C | I2C_FUNC_SMBUS_WORD_DATA))
+				     | I2C_FUNC_I2C |
+				     I2C_FUNC_SMBUS_WORD_DATA))
 		goto exit;
 
 	data = kcalloc(1, sizeof(*data), GFP_KERNEL);
@@ -419,16 +371,16 @@ static int tsc2003_i2c_detect(struct i2c
 	new_client->flags = 0;
 
 	/* TODO: I'm pretty sure I'm not dealing with kind correctly */
-	if (kind == 0 /* identification */|| kind < 0 /* detection */)
+	if (kind == 0 /* identification */  || kind < 0 /* detection */ )
 		kind = tsc2003;
 
 	if (kind == tsc2003)
 		name = DRIVER_NAME;
 
 	/* try a command, see if we get an ack;
-	 if we do, assume it's our device */
+	   if we do, assume it's our device */
 	printk(KERN_INFO "%s: probing address 0x%x\n",
-			__FUNCTION__, address);
+	       __FUNCTION__, address);
 	err = tsc2003_powerdown(data);
 	if (err >= 0) {
 		strlcpy(new_client->name, name, I2C_NAME_SIZE);
@@ -443,15 +395,15 @@ static int tsc2003_i2c_detect(struct i2c
 			goto exit_free;
 
 		printk(KERN_INFO "%s: device address 0x%x attached.\n",
-				__FUNCTION__, address);
+		       __FUNCTION__, address);
 		return 0;
 	}
 	/* failure to detect when everything else is ok isn't an error */
 	else
 		err = 0;
 
-	exit_free: kfree(new_client);
-	exit: return err;
+      exit_free:kfree(new_client);
+      exit:return err;
 }
 
 static int __init tsc2003_init(void)
============================================================
--- packages/linux/gumstix-kernel_2.6.21.bb	1f1a51ddd361d503ab44e816d5c0dee09e9bbff2
+++ packages/linux/gumstix-kernel_2.6.21.bb	abcf379ae73f3805d3364fbbf7d4e735d4c887b2
@@ -1,4 +1,4 @@
-require linux.inc
+require gumstix-linux.inc
 
 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
        file://defconfig \
============================================================
--- packages/linux/gumstix-linux.inc	cc9aa9d293625e691bf43518593347e53526502f
+++ packages/linux/gumstix-linux.inc	1832359f059ffffee7e93ddf8254be7269d927a5
@@ -9,7 +9,10 @@ DEPENDS += " \
            u-boot-mkimage-openmoko-native \
           "
 
+KERNEL_IMAGE_BASE_NAME = ${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}
+
 S = "${WORKDIR}/linux-${PV}"
+do_deploy[dirs] = "${S}"
 
 do_configure_prepend() {
         echo "" > ${S}/.config
@@ -32,6 +35,16 @@ do_configure_prepend() {
        yes '' | oe_runmake oldconfig
 }
 
+do_sizecheck() {
+        if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
+            size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'`
+            if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
+                    rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
+                    die  "This kernel (size=$size) is too big for your device. Please reduce the size of the kernel by making more of it modular."
+            fi
+        fi
+}
+
 do_install_prepend() {
         if test -e arch/${ARCH}/boot/Image ; then
              ln -f arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage
@@ -41,3 +54,21 @@ do_install_prepend() {
              ln -f arch/${ARCH}/boot%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list