[Packages] utils/lcd4linux:
* Update to lcd4linux trunk revision 847 * Add an simple init script and config file * Cleanup Makefile git-svn-id: svn://svn.openwrt.org/openwrt/packages@9646 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
c69067f767
commit
bf2c89aa7a
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
# Copyright (C) 2007 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -9,15 +9,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lcd4linux
|
||||
PKG_VERSION:=0.10.0+cvs20051015
|
||||
PKG_RELEASE:=2
|
||||
PKG_REV:=847
|
||||
PKG_VERSION:=r$(PKG_REV)
|
||||
PKG_RELEASE:=3
|
||||
|
||||
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/
|
||||
PKG_MD5SUM:=5b5ac629be4bb5c29104fb8f6b7fa444
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig
|
||||
PKG_SOURCE:=$(PKG_NAME)-r$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/
|
||||
PKG_SOURCE_SUBDIR:=lcd4linux-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||
PKG_SOURCE_PROTO:=svn
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -34,29 +34,36 @@ define Package/lcd4linux/description
|
||||
some subsystems and displays it on an external liquid crystal display.
|
||||
endef
|
||||
|
||||
define Package/lcd4linux/conffiles
|
||||
/etc/lcd4linux.conf
|
||||
endef
|
||||
|
||||
# commas are interpreted by the $(call ...) macro, so define an intermediate variable holding our drivers spec
|
||||
PKG_CONFIGURE_DRIVERS:=all,!PNG,!RouterBoard,!X11
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--without-x \
|
||||
--with-drivers="$(PKG_CONFIGURE_DRIVERS)" \
|
||||
--with-plugins=wireless
|
||||
--with-plugins=wireless \
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR); touch \
|
||||
configure.in \
|
||||
aclocal.m4 \
|
||||
Makefile.in \
|
||||
configure \
|
||||
stamp-h.in \
|
||||
config.h.in \
|
||||
);
|
||||
$(call Build/Configure/Default)
|
||||
$(call Build/Configure/Default,)
|
||||
$(call libtool_disable_rpath)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) all
|
||||
$(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)"
|
||||
endef
|
||||
|
||||
define Package/lcd4linux/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lcd4linux $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,lcd4linux))
|
||||
|
1224
utils/lcd4linux/files/lcd4linux.conf
Normal file
1224
utils/lcd4linux/files/lcd4linux.conf
Normal file
File diff suppressed because it is too large
Load Diff
18
utils/lcd4linux/files/lcd4linux.init
Normal file
18
utils/lcd4linux/files/lcd4linux.init
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2007 OpenWrt.org
|
||||
START=98
|
||||
|
||||
NAME=lcd4linux
|
||||
BIN_F=/usr/bin/$NAME
|
||||
PID_F=/var/run/lcd4linux.pid
|
||||
SSD=start-stop-daemon
|
||||
OPTIONS="-q -p $PID_F -f /etc/lcd4linux.conf"
|
||||
|
||||
start() {
|
||||
$SSD -S -q -p $PID_F -b -x $BIN_F -- $OPTIONS
|
||||
}
|
||||
|
||||
stop() {
|
||||
$SSD -K -q -p $PID_F
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: lcd4linux-0.10.0+cvs20051015.orig/drv_RouterBoard.c
|
||||
Index: lcd4linux-847/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 @@
|
||||
--- lcd4linux-847.orig/drv_RouterBoard.c 2007-12-01 17:15:10.000000000 +0100
|
||||
+++ lcd4linux-847/drv_RouterBoard.c 2007-12-01 17:15:10.000000000 +0100
|
||||
@@ -106,7 +106,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
@ -1,150 +0,0 @@
|
||||
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 <stdio.h>
|
||||
|
||||
|
||||
-#ifdef USE_OLD_UDELAY
|
||||
-
|
||||
-#include <time.h>
|
||||
-
|
||||
-#else
|
||||
-
|
||||
-#include <math.h>
|
||||
-#include <unistd.h>
|
||||
-#include <fcntl.h>
|
||||
-#include <errno.h>
|
||||
-#include <string.h>
|
||||
-#include <sys/time.h>
|
||||
-
|
||||
-#ifdef HAVE_ASM_MSR_H
|
||||
-#include <asm/msr.h>
|
||||
-#endif
|
||||
-
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
#include "debug.h"
|
||||
#include "udelay.h"
|
||||
+
|
||||
+#include <time.h>
|
||||
+#include <errno.h>
|
||||
|
||||
#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
|
@ -1,8 +1,8 @@
|
||||
Index: lcd4linux-0.10.0+cvs20051015.orig/drv_generic_parport.c
|
||||
Index: lcd4linux-847/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 @@
|
||||
--- lcd4linux-847.orig/drv_generic_parport.c 2007-12-01 17:15:10.000000000 +0100
|
||||
+++ lcd4linux-847/drv_generic_parport.c 2007-12-01 17:15:11.000000000 +0100
|
||||
@@ -39,16 +39,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
@ -19,7 +19,7 @@ Index: lcd4linux-0.10.0+cvs20051015.orig/drv_generic_parport.c
|
||||
#if defined (HAVE_LINUX_PARPORT_H) && defined (HAVE_LINUX_PPDEV_H)
|
||||
#define WITH_PPDEV
|
||||
#include <linux/parport.h>
|
||||
@@ -143,6 +133,11 @@
|
||||
@@ -65,6 +55,11 @@
|
||||
#define PARPORT_STATUS_BUSY 0x80
|
||||
#endif
|
||||
|
||||
@ -27,7 +27,7 @@ Index: lcd4linux-0.10.0+cvs20051015.orig/drv_generic_parport.c
|
||||
+#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
|
||||
|
@ -1,16 +0,0 @@
|
||||
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 <sys/ioctl.h>
|
||||
#include <net/if_arp.h>
|
||||
+#include <linux/version.h>
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/if.h>
|
||||
+#endif
|
||||
#include <linux/wireless.h>
|
||||
#include <math.h>
|
||||
|
@ -1,24 +1,24 @@
|
||||
Index: lcd4linux-0.10.0+cvs20051015.orig/drv_T6963.c
|
||||
Index: lcd4linux-847/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 @@
|
||||
--- lcd4linux-847.orig/drv_T6963.c 2007-12-01 17:15:10.000000000 +0100
|
||||
+++ lcd4linux-847/drv_T6963.c 2007-12-01 17:15:11.000000000 +0100
|
||||
@@ -114,7 +114,9 @@
|
||||
/* wait for STA0=1 and STA1=1 */
|
||||
n = 0;
|
||||
do {
|
||||
+#if 0
|
||||
+#if 0
|
||||
rep_nop();
|
||||
+#endif
|
||||
+#endif
|
||||
if (++n > 1000) {
|
||||
debug("hang in status1");
|
||||
bug = 1;
|
||||
@@ -206,7 +208,9 @@
|
||||
@@ -150,7 +152,9 @@
|
||||
/* wait for STA3=1 */
|
||||
n = 0;
|
||||
do {
|
||||
+#if 0
|
||||
+#if 0
|
||||
rep_nop();
|
||||
+#endif
|
||||
+#endif
|
||||
if (++n > 1000) {
|
||||
debug("hang in status2");
|
||||
bug = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user