add lcd4version. compiles now, but i have no clue if it will work with some lcd displays
authorwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 20 Mar 2005 03:37:44 +0000 (03:37 +0000)
committerwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 20 Mar 2005 03:37:44 +0000 (03:37 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@402 3c298f89-4303-0410-b956-a3cf2f4a3e73

openwrt/package/Config.in
openwrt/package/Makefile
openwrt/package/lcd4linux/Config.in [new file with mode: 0644]
openwrt/package/lcd4linux/Makefile [new file with mode: 0644]
openwrt/package/lcd4linux/lcd4linux.control [new file with mode: 0644]
openwrt/package/lcd4linux/patches/patch-drv_RouterBoard_c [new file with mode: 0644]
openwrt/package/lcd4linux/patches/patch-drv_generic_parport_c [new file with mode: 0644]
openwrt/package/lcd4linux/patches/patch-ucdelay_h [new file with mode: 0644]

index 3c0db1d..2cfaf37 100644 (file)
@@ -12,6 +12,7 @@ comment "Applications"
 source "package/haserl/Config.in"
 source "package/microperl/Config.in"
 source "package/strace/Config.in"
+source "package/lcd4linux/Config.in"
 
 comment "Networking"
 source "package/tcpdump/Config.in"
index 9fcdb6a..4018631 100644 (file)
@@ -26,6 +26,7 @@ package-$(BR2_PACKAGE_MICROPERL) += microperl
 package-$(BR2_PACKAGE_LIBELF) += libelf
 package-$(BR2_PACKAGE_STRACE) += strace
 package-$(BR2_PACKAGE_TCPDUMP) += tcpdump
+package-$(BR2_PACKAGE_LCD4LINUX) += lcd4linux
 
 all: compile install
 clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) linux-clean
diff --git a/openwrt/package/lcd4linux/Config.in b/openwrt/package/lcd4linux/Config.in
new file mode 100644 (file)
index 0000000..797e494
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LCD4LINUX
+       tristate "lcd4linux"
+       select BR2_PACKAGE_NCURSES
+       default m
+       help
+               LCD4Linux
+               https://ssl.bulix.org/projects/lcd4linux/wiki/Howto
diff --git a/openwrt/package/lcd4linux/Makefile b/openwrt/package/lcd4linux/Makefile
new file mode 100644 (file)
index 0000000..c283a61
--- /dev/null
@@ -0,0 +1,66 @@
+#############################################################
+#
+# lcd4linux
+#
+#############################################################
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lcd4linux
+PKG_VERSION:=0.10.0-RC1
+PKG_RELEASE:=1
+PKG_MD5SUM:=bab64ac01ebdce7e46ab367351af839f
+PKG_SOURCE_URL:=@SF/lcd4linux/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_CAT:=zcat
+PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
+
+$(DL_DIR)/$(PKG_SOURCE):
+       $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
+
+$(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
+       $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+       touch $(PKG_BUILD_DIR)/.unpacked
+
+$(PKG_BUILD_DIR)/.patched: $(PKG_BUILD_DIR)/.unpacked
+       $(PATCH) $(PKG_BUILD_DIR) ./patches
+       touch $(PKG_BUILD_DIR)/.patched
+
+$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
+       (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
+       $(TARGET_CONFIGURE_OPTS) \
+       CFLAGS="$(TARGET_CFLAGS)" \
+       ./configure \
+       --target=$(GNU_TARGET_NAME) \
+       --host=$(GNU_TARGET_NAME) \
+       --build=$(GNU_HOST_NAME) \
+       --prefix=/usr \
+       --sysconfdir=/etc \
+       --with-drivers='all,!RouterBoard,!X11' \
+       --with-plugins=wireless )
+       touch $(PKG_BUILD_DIR)/.configured
+
+$(PKG_BUILD_DIR)/lcd4linux: $(PKG_BUILD_DIR)/.configured
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \
+               CFLAGS="$(TARGET_CFLAGS) -O2 -Wall -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include"
+
+$(PKG_IPK): $(PKG_BUILD_DIR)/lcd4linux
+       $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
+       mkdir -p $(PKG_IPK_DIR)/usr/bin
+       cp $(PKG_BUILD_DIR)/lcd4linux $(PKG_IPK_DIR)/usr/bin/
+       mkdir -p $(PACKAGE_DIR)
+       $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
+
+$(IPKG_STATE_DIR)/info/lcd4linux.list: $(PKG_IPK)
+       $(IPKG) install $(PKG_IPK)
+
+source: $(DL_DIR)/$(PKG_SOURCE)
+prepare: $(PKG_BUILD_DIR)/.unpacked
+compile: $(PKG_IPK)
+install: $(IPKG_STATE_DIR)/info/lcd4linux.list
+
+clean:
+       rm -rf $(PKG_BUILD_DIR)
+       rm -f $(PKG_IPK)
diff --git a/openwrt/package/lcd4linux/lcd4linux.control b/openwrt/package/lcd4linux/lcd4linux.control
new file mode 100644 (file)
index 0000000..54c9a55
--- /dev/null
@@ -0,0 +1,9 @@
+Package: lcd4linux
+Priority: optional
+Section: apps
+Version: 0.10.0
+Architecture: mipsel
+Maintainer: Waldemar Brodkorb <wbx@dass-it.de>
+Source: buildroot internal
+Description: lcd software
+Depends: ncurses
diff --git a/openwrt/package/lcd4linux/patches/patch-drv_RouterBoard_c b/openwrt/package/lcd4linux/patches/patch-drv_RouterBoard_c
new file mode 100644 (file)
index 0000000..fc9cbb4
--- /dev/null
@@ -0,0 +1,11 @@
+--- 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 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
+-#include <sys/io.h>
++#include <asm/io.h>
+ #include "debug.h"
+ #include "cfg.h"
diff --git a/openwrt/package/lcd4linux/patches/patch-drv_generic_parport_c b/openwrt/package/lcd4linux/patches/patch-drv_generic_parport_c
new file mode 100644 (file)
index 0000000..f029ffb
--- /dev/null
@@ -0,0 +1,109 @@
+--- lcd4linux-0.10.0-RC1/drv_generic_parport.c 2005-01-06 17:54:54.000000000 +0100
++++ lcd/drv_generic_parport.c  2005-03-20 01:20:48.052255953 +0100
+@@ -359,13 +359,12 @@
+ #ifdef WITH_PPDEV
+   if (PPdev) {
+     ioctl (PPfd, PPDATADIR, &direction);
+-  } else
++  } 
++#else
++      /* code stolen from linux/parport_pc.h */
++      ctr = (ctr & ~0x20) ^ (direction?0x20:0x00);
++      outb (ctr, Port+2);
+ #endif
+-    {
+-      /* code stolen from linux/parport_pc.h */
+-      ctr = (ctr & ~0x20) ^ (direction?0x20:0x00);
+-      outb (ctr, Port+2);
+-    }
+ }
+@@ -383,11 +382,10 @@
+ #ifdef WITH_PPDEV
+   if (PPdev) {
+     ioctl (PPfd, PPRSTATUS, &data);
+-  } else
++  } 
++#else
++  data = inb (Port+1);
+ #endif
+-    {
+-      data = inb (Port+1);
+-    }
+   
+   /* clear unused bits */
+   data &= mask;
+@@ -413,13 +411,12 @@
+     frob.mask=mask;
+     frob.val=val;
+     ioctl (PPfd, PPFCONTROL, &frob);
+-  } else
++  } 
++#else
++  /* code stolen from linux/parport_pc.h */
++  ctr = (ctr & ~mask) ^ val;
++  outb (ctr, Port+2);
+ #endif
+-    {
+-      /* code stolen from linux/parport_pc.h */
+-      ctr = (ctr & ~mask) ^ val;
+-      outb (ctr, Port+2);
+-    }
+ }
+@@ -456,9 +453,9 @@
+     frob.val = value2;
+     ioctl (PPfd, PPFCONTROL, &frob);
+-  } else
+-#endif
+-    {
++  } 
++#else
++    
+       /* rise */
+       ctr = (ctr & ~bits) ^ value1;
+       outb (ctr, Port+2);
+@@ -469,7 +466,8 @@
+       /* lower */
+       ctr = (ctr & ~bits) ^ value2;
+       outb (ctr, Port+2);
+-    }
++    
++#endif
+ }
+@@ -478,11 +476,11 @@
+ #ifdef WITH_PPDEV
+   if (PPdev) {
+     ioctl(PPfd, PPWDATA, &data);
+-  } else
++  } 
++#else    
++  outb (data, Port);
+ #endif
+-    {
+-      outb (data, Port);
+-    }
++    
+ }
+ unsigned char drv_generic_parport_read (void)
+@@ -492,11 +490,10 @@
+ #ifdef WITH_PPDEV
+   if (PPdev) {
+     ioctl (PPfd, PPRDATA, &data);
+-  } else
++  } 
++#else
++  data=inb (Port);
+ #endif
+-    {
+-      data=inb (Port);
+-    }
+   return data;
+ }
diff --git a/openwrt/package/lcd4linux/patches/patch-ucdelay_h b/openwrt/package/lcd4linux/patches/patch-ucdelay_h
new file mode 100644 (file)
index 0000000..619594b
--- /dev/null
@@ -0,0 +1,11 @@
+--- lcd4linux-0.10.0-RC1/udelay.h      2004-06-26 14:05:00.000000000 +0200
++++ lcd-patched/udelay.h       2005-03-19 15:00:54.835892666 +0100
+@@ -69,7 +69,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");
+ }
This page took 0.034575 seconds and 4 git commands to generate.