From 2176a5d246e9b53eca6b9415261f8792fc566bc4 Mon Sep 17 00:00:00 2001 From: Oliver Ertl Date: Sat, 7 Jul 2007 12:58:47 +0000 Subject: [PATCH 1/1] lcd4linux: fix compile (#1981) SVN-Revision: 7886 --- utils/lcd4linux/Makefile | 11 +- .../patches/100-drv_RouterBoard.patch | 8 +- utils/lcd4linux/patches/110-ucdelay.patch | 12 -- utils/lcd4linux/patches/110-udelay.patch | 150 ++++++++++++++++++ .../patches/120-remove_parport_outb.patch | 34 ++-- .../patches/130-linux_2.6.19_wireless_h.patch | 7 +- .../patches/140-no_repnop_T6963.patch | 24 +++ 7 files changed, 204 insertions(+), 42 deletions(-) delete mode 100644 utils/lcd4linux/patches/110-ucdelay.patch create mode 100644 utils/lcd4linux/patches/110-udelay.patch create mode 100644 utils/lcd4linux/patches/140-no_repnop_T6963.patch diff --git a/utils/lcd4linux/Makefile b/utils/lcd4linux/Makefile index d843b3f4e9..b0564cca8a 100644 --- a/utils/lcd4linux/Makefile +++ b/utils/lcd4linux/Makefile @@ -10,13 +10,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lcd4linux PKG_VERSION:=0.10.0+cvs20051015 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/lcd4linux/ \ - http://ftp.de.debian.org/debian/pool/main/l/lcd4linux/ + http://ftp.de.debian.org/debian/pool/main/l/lcd4linux/ PKG_MD5SUM:=5b5ac629be4bb5c29104fb8f6b7fa444 -PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig @@ -37,9 +36,9 @@ endef PKG_CONFIGURE_DRIVERS:=all,!PNG,!RouterBoard,!X11 CONFIGURE_ARGS += \ - --without-x \ - --with-drivers="$(PKG_CONFIGURE_DRIVERS)" \ - --with-plugins=wireless + --without-x \ + --with-drivers="$(PKG_CONFIGURE_DRIVERS)" \ + --with-plugins=wireless define Build/Configure (cd $(PKG_BUILD_DIR); touch \ diff --git a/utils/lcd4linux/patches/100-drv_RouterBoard.patch b/utils/lcd4linux/patches/100-drv_RouterBoard.patch index fc9cbb43a9..091c4f120f 100644 --- a/utils/lcd4linux/patches/100-drv_RouterBoard.patch +++ b/utils/lcd4linux/patches/100-drv_RouterBoard.patch @@ -1,6 +1,8 @@ ---- lcd4linux-0.10.0-RC1/drv_RouterBoard.c 2004-08-30 15:20:45.000000000 +0200 -+++ lcd-patched/drv_RouterBoard.c 2005-03-19 16:03:26.849650830 +0100 -@@ -113,7 +113,7 @@ +Index: lcd4linux-0.10.0+cvs20051015.orig/drv_RouterBoard.c +=================================================================== +--- lcd4linux-0.10.0+cvs20051015.orig.orig/drv_RouterBoard.c 2007-07-07 14:02:56.000000000 +0200 ++++ lcd4linux-0.10.0+cvs20051015.orig/drv_RouterBoard.c 2007-07-07 14:02:56.000000000 +0200 +@@ -120,7 +120,7 @@ #include #include #include diff --git a/utils/lcd4linux/patches/110-ucdelay.patch b/utils/lcd4linux/patches/110-ucdelay.patch deleted file mode 100644 index 0908973b72..0000000000 --- a/utils/lcd4linux/patches/110-ucdelay.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN lcd4linux.old/udelay.h lcd4linux.dev/udelay.h ---- lcd4linux.old/udelay.h 2005-05-08 06:32:45.000000000 +0200 -+++ lcd4linux.dev/udelay.h 2006-01-20 03:50:36.806897500 +0100 -@@ -76,7 +76,7 @@ - /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ - static inline void rep_nop(void) - { -- __asm__ __volatile__("rep; nop"); -+ __asm__ __volatile__("nop"); - } - - diff --git a/utils/lcd4linux/patches/110-udelay.patch b/utils/lcd4linux/patches/110-udelay.patch new file mode 100644 index 0000000000..eaffdf84d1 --- /dev/null +++ b/utils/lcd4linux/patches/110-udelay.patch @@ -0,0 +1,150 @@ +Index: lcd4linux-0.10.0+cvs20051015.orig/udelay.c +=================================================================== +--- lcd4linux-0.10.0+cvs20051015.orig.orig/udelay.c 2007-07-07 14:02:55.000000000 +0200 ++++ lcd4linux-0.10.0+cvs20051015.orig/udelay.c 2007-07-07 14:02:56.000000000 +0200 +@@ -134,28 +134,11 @@ + #include + + +-#ifdef USE_OLD_UDELAY +- +-#include +- +-#else +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#ifdef HAVE_ASM_MSR_H +-#include +-#endif +- +-#endif +- +- + #include "debug.h" + #include "udelay.h" ++ ++#include ++#include + + #ifdef USE_OLD_UDELAY + +@@ -163,16 +146,30 @@ + + void ndelay(const unsigned long nsec) + { ++#if 0 + unsigned long loop = (nsec * loops_per_usec + 999) / 1000; + + __asm__(".align 16\n" "1:\tdecl %0\n" "\tjne 1b": /* no result */ + :"a"(loop)); ++#endif ++ struct timespec val; ++ struct timespec rem; ++ int ret; ++ ++ val.tv_sec = 0; ++ val.tv_nsec = nsec; ++ ++ do { ++ ret = nanosleep(&val, &rem); ++ val = rem; ++ } while ((ret == -1) && (errno == EINTR)); + } + + /* adopted from /usr/src/linux/init/main.c */ + + void udelay_calibrate(void) + { ++#if 0 + clock_t tick; + unsigned long bit; + +@@ -197,12 +194,13 @@ + if (clock() > tick) + loops_per_usec &= ~bit; + } ++#endif + } + + #else + + static unsigned int ticks_per_usec = 0; +- ++#if 0 + static void getCPUinfo(int *hasTSC, double *MHz) + { + int fd; +@@ -249,10 +247,11 @@ + } + + } +- ++#endif + + void udelay_init(void) + { ++#if 0 + #ifdef HAVE_ASM_MSR_H + + int tsc; +@@ -274,12 +273,13 @@ + ticks_per_usec = 0; + info("udelay: using gettimeofday() delay loop"); + } ++#endif + } + + + void ndelay(const unsigned long nsec) + { +- ++#if 0 + #ifdef HAVE_ASM_MSR_H + + if (ticks_per_usec) { +@@ -313,6 +313,20 @@ + gettimeofday(&now, NULL); + } while (now.tv_sec == end.tv_sec ? now.tv_usec < end.tv_usec : now.tv_sec < end.tv_sec); + } ++#endif ++ ++ struct timespec val; ++ struct timespec rem; ++ int ret; ++ ++ val.tv_sec = 0; ++ val.tv_nsec = nsec; ++ ++ do { ++ ret = nanosleep(&val, &rem); ++ val = rem; ++ } while ((ret == -1) && (errno == EINTR)); ++ + } + + #endif +Index: lcd4linux-0.10.0+cvs20051015.orig/udelay.h +=================================================================== +--- lcd4linux-0.10.0+cvs20051015.orig.orig/udelay.h 2007-07-07 14:02:56.000000000 +0200 ++++ lcd4linux-0.10.0+cvs20051015.orig/udelay.h 2007-07-07 14:02:56.000000000 +0200 +@@ -72,12 +72,14 @@ + #ifndef _UDELAY_H_ + #define _UDELAY_H_ + ++#if 0 + /* stolen from linux/asm-i386/processor.h */ + /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ + static inline void rep_nop(void) + { + __asm__ __volatile__("rep; nop"); + } ++#endif + + + #ifdef USE_OLD_UDELAY diff --git a/utils/lcd4linux/patches/120-remove_parport_outb.patch b/utils/lcd4linux/patches/120-remove_parport_outb.patch index c47cef278c..210c182d5d 100644 --- a/utils/lcd4linux/patches/120-remove_parport_outb.patch +++ b/utils/lcd4linux/patches/120-remove_parport_outb.patch @@ -1,21 +1,7 @@ -diff -urN lcd4linux.old/drv_generic_parport.c lcd4linux.dev/drv_generic_parport.c ---- lcd4linux.old/drv_generic_parport.c 2006-01-20 03:52:18.426419500 +0100 -+++ lcd4linux.dev/drv_generic_parport.c 2006-01-20 03:57:59.205263500 +0100 -@@ -134,6 +134,11 @@ - #define PARPORT_STATUS_BUSY 0x80 - #endif - -+#ifndef WITH_OUTB -+#define inb(foo) 0 -+#define outb(foo,bar) 0 -+#endif -+ - #if !defined(WITH_OUTB) && !defined(WITH_PPDEV) - #error neither outb() nor ppdev() possible - #error cannot compile parallel port driver -diff -ur lcd4linux.old/drv_generic_parport.c lcd4linux.dev/drv_generic_parport.c ---- lcd4linux.old/drv_generic_parport.c 2007-03-24 18:14:55.706590000 +0100 -+++ lcd4linux.dev/drv_generic_parport.c 2007-03-24 18:15:20.036891568 +0100 +Index: lcd4linux-0.10.0+cvs20051015.orig/drv_generic_parport.c +=================================================================== +--- lcd4linux-0.10.0+cvs20051015.orig.orig/drv_generic_parport.c 2007-07-07 14:02:55.000000000 +0200 ++++ lcd4linux-0.10.0+cvs20051015.orig/drv_generic_parport.c 2007-07-07 14:02:57.000000000 +0200 @@ -117,16 +117,6 @@ #include #include @@ -33,3 +19,15 @@ diff -ur lcd4linux.old/drv_generic_parport.c lcd4linux.dev/drv_generic_parport.c #if defined (HAVE_LINUX_PARPORT_H) && defined (HAVE_LINUX_PPDEV_H) #define WITH_PPDEV #include +@@ -143,6 +133,11 @@ + #define PARPORT_STATUS_BUSY 0x80 + #endif + ++#ifndef WITH_OUTB ++#define inb(foo) 0 ++#define outb(foo,bar) 0 ++#endif ++ + #if !defined(WITH_OUTB) && !defined(WITH_PPDEV) + #error neither outb() nor ppdev() possible + #error cannot compile parallel port driver diff --git a/utils/lcd4linux/patches/130-linux_2.6.19_wireless_h.patch b/utils/lcd4linux/patches/130-linux_2.6.19_wireless_h.patch index 9f7957b8d8..215c3482c7 100644 --- a/utils/lcd4linux/patches/130-linux_2.6.19_wireless_h.patch +++ b/utils/lcd4linux/patches/130-linux_2.6.19_wireless_h.patch @@ -1,6 +1,7 @@ -diff -ruN lcd4linux-0.10.0+cvs20051015-old/plugin_wireless.c lcd4linux-0.10.0+cvs20051015-new/plugin_wireless.c ---- lcd4linux-0.10.0+cvs20051015-old/plugin_wireless.c 2005-05-08 06:32:45.000000000 +0200 -+++ lcd4linux-0.10.0+cvs20051015-new/plugin_wireless.c 2007-01-10 01:08:13.000000000 +0100 +Index: lcd4linux-0.10.0+cvs20051015.orig/plugin_wireless.c +=================================================================== +--- lcd4linux-0.10.0+cvs20051015.orig.orig/plugin_wireless.c 2007-07-07 14:02:55.000000000 +0200 ++++ lcd4linux-0.10.0+cvs20051015.orig/plugin_wireless.c 2007-07-07 14:02:57.000000000 +0200 @@ -92,6 +92,11 @@ #include diff --git a/utils/lcd4linux/patches/140-no_repnop_T6963.patch b/utils/lcd4linux/patches/140-no_repnop_T6963.patch new file mode 100644 index 0000000000..79686009cf --- /dev/null +++ b/utils/lcd4linux/patches/140-no_repnop_T6963.patch @@ -0,0 +1,24 @@ +Index: lcd4linux-0.10.0+cvs20051015.orig/drv_T6963.c +=================================================================== +--- lcd4linux-0.10.0+cvs20051015.orig.orig/drv_T6963.c 2007-07-07 14:02:55.000000000 +0200 ++++ lcd4linux-0.10.0+cvs20051015.orig/drv_T6963.c 2007-07-07 14:02:57.000000000 +0200 +@@ -170,7 +170,9 @@ + /* wait for STA0=1 and STA1=1 */ + n = 0; + do { ++#if 0 + rep_nop(); ++#endif + if (++n > 1000) { + debug("hang in status1"); + bug = 1; +@@ -206,7 +208,9 @@ + /* wait for STA3=1 */ + n = 0; + do { ++#if 0 + rep_nop(); ++#endif + if (++n > 1000) { + debug("hang in status2"); + bug = 1; -- 2.30.2