1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan168 2022-05-03 10:11:41 +08:00
parent 7f4e9142ac
commit f6bb3b2dff
10 changed files with 3767 additions and 0 deletions

60
grpcurl/Makefile Normal file
View file

@ -0,0 +1,60 @@
#
# Copyright (C) 2022 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=grpcurl
PKG_VERSION:=1.8.6
PKG_RELEASE:=1
PKG_SOURCE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/fullstorydev/grpcurl/archive/refs/tags/
PKG_HASH:=18b457f644baabeef0de350596dd8d23563586ee94a3ed3cb290063e097ab934
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Yannick Chabanois <ycarus@zugaina.org>
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/fullstorydev/grpcurl
GO_PKG_BUILD_PKG:=github.com/fullstorydev/grpcurl/cmd/grpcurl
GO_PKG_LDFLAGS_X:= \
$(GO_PKG)/constant.Version=$(PKG_VERSION) \
$(GO_PKG)/constant.Commit=v$(PKG_VERSION)
GO_PKG_LDFLAGS:=-s -w
GO_PKG_TAGS:=master
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/grpcurl
TITLE:=grpcurl is a command-line tool that lets you interact with gRPC servers
URL:=https://github.com/fullstorydev/grpcurl
SECTION:=net
CATEGORY:=Network
DEPENDS:=$(GO_ARCH_DEPENDS) +protobuf
endef
define Package/grpcurl/description
grpcurl is a command-line tool that lets you interact with gRPC servers. It's basically curl for gRPC servers.
The main purpose for this tool is to invoke RPC methods on a gRPC server from the command-line. gRPC servers use a binary encoding on the wire (protocol buffers, or "protobufs" for short). So they are basically impossible to interact with using regular curl (and older versions of curl that do not support HTTP/2 are of course non-starters). This program accepts messages using JSON encoding, which is much more friendly for both humans and scripts.
endef
define Package/v2ray-core/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/grpcurl $(1)/usr/bin
endef
$(eval $(call GoBinPackage,grpcurl))
$(eval $(call BuildPackage,grpcurl))

490
lcd4linux/Config.in Normal file
View file

@ -0,0 +1,490 @@
if PACKAGE_lcd4linux-custom
config LCD4LINUX_CUSTOM_NEEDS_libdbus
bool
#config LCD4LINUX_CUSTOM_NEEDS_libftdi
# bool
config LCD4LINUX_CUSTOM_NEEDS_libgd
bool
config LCD4LINUX_CUSTOM_NEEDS_libiconv
bool
config LCD4LINUX_CUSTOM_NEEDS_libjpeg
bool
config LCD4LINUX_CUSTOM_NEEDS_libmpdclient
bool
config LCD4LINUX_CUSTOM_NEEDS_libmysqlclient
bool
config LCD4LINUX_CUSTOM_NEEDS_libncurses
bool
config LCD4LINUX_CUSTOM_NEEDS_libnmeap
bool
config LCD4LINUX_CUSTOM_NEEDS_libsqlite3
bool
config LCD4LINUX_CUSTOM_NEEDS_libusb
bool
#config LCD4LINUX_CUSTOM_NEEDS_libX11
# bool
config LCD4LINUX_CUSTOM_NEEDS_ppp
bool
config LCD4LINUX_CUSTOM_NEEDS_python
bool
comment "Drivers ---"
config LCD4LINUX_CUSTOM_DRIVER_ASTUSB
bool
prompt "ASTUSB"
config LCD4LINUX_CUSTOM_DRIVER_BeckmannEgle
bool
prompt "BeckmannEgle"
config LCD4LINUX_CUSTOM_DRIVER_BWCT
bool
prompt "BWCT"
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_CrystalFontz
bool
prompt "CrystalFontz"
config LCD4LINUX_CUSTOM_DRIVER_Curses
bool
prompt "Curses"
select LCD4LINUX_CUSTOM_NEEDS_libncurses
config LCD4LINUX_CUSTOM_DRIVER_Cwlinux
bool
prompt "Cwlinux"
config LCD4LINUX_CUSTOM_DRIVER_D4D
bool
prompt "D4D"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_dpf
bool
prompt "dpf"
select LCD4LINUX_CUSTOM_NEEDS_libusb
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_EA232graphic
bool
prompt "EA232graphic"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_EFN
bool
prompt "EFN"
config LCD4LINUX_CUSTOM_DRIVER_FutabaVFD
bool
prompt "FutabaVFD"
config LCD4LINUX_CUSTOM_DRIVER_FW8888
bool
prompt "FW8888"
config LCD4LINUX_CUSTOM_DRIVER_G15
bool
prompt "G15"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_GLCD2USB
bool
prompt "GLCD2USB"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_HD44780
bool
prompt "HD44780"
depends on BROKEN
config LCD4LINUX_CUSTOM_DRIVER_HD44780-I2C
bool
prompt "HD44780-I2C"
depends on BROKEN
config LCD4LINUX_CUSTOM_DRIVER_IRLCD
bool
prompt "IRLCD"
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_LCD2USB
bool
prompt "LCD2USB"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_LCDLinux
bool
prompt "LCDLinux"
depends on BROKEN
config LCD4LINUX_CUSTOM_DRIVER_LCDTerm
bool
prompt "LCDTerm"
config LCD4LINUX_CUSTOM_DRIVER_LEDMatrix
bool
prompt "LEDMatrix"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_LPH7508
bool
prompt "LPH7508"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_LUIse
bool
prompt "LUIse"
select LCD4LINUX_CUSTOM_NEEDS_libgd
#select LCD4LINUX_CUSTOM_NEEDS_libluise
depends on BROKEN
config LCD4LINUX_CUSTOM_DRIVER_LW_ABP
bool
prompt "LW_ABP"
config LCD4LINUX_CUSTOM_DRIVER_M50530
bool
prompt "M50530"
config LCD4LINUX_CUSTOM_DRIVER_MatrixOrbital
bool
prompt "MatrixOrbital"
config LCD4LINUX_CUSTOM_DRIVER_MatrixOrbitalGX
bool
prompt "MatrixOrbitalGX"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_mdm166a
bool
prompt "mdm166a"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_MilfordInstruments
bool
prompt "MilfordInstruments"
config LCD4LINUX_CUSTOM_DRIVER_Newhaven
bool
prompt "Newhaven"
config LCD4LINUX_CUSTOM_DRIVER_Noritake
bool
prompt "Noritake"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_NULL
bool
prompt "NULL"
default y
config LCD4LINUX_CUSTOM_DRIVER_Pertelian
bool
prompt "Pertelian"
config LCD4LINUX_CUSTOM_DRIVER_PHAnderson
bool
prompt "PHAnderson"
config LCD4LINUX_CUSTOM_DRIVER_PICGraphic
bool
prompt "PICGraphic"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_picoLCD
bool
prompt "picoLCD"
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_picoLCDGraphic
bool
prompt "picoLCDGraphic"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_PNG
bool
prompt "PNG"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_PPM
bool
prompt "PPM"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_RouterBoard
bool
prompt "RouterBoard"
depends on TARGET_rb532
config LCD4LINUX_CUSTOM_DRIVER_SamsungSPF
bool
prompt "SamsungSPF"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_libjpeg
config LCD4LINUX_CUSTOM_DRIVER_serdisplib
bool
prompt "serdisplib"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_serdisplib
config LCD4LINUX_CUSTOM_DRIVER_ShuttleVFD
bool
prompt "ShuttleVFD"
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_SimpleLCD
bool
prompt "SimpleLCD"
config LCD4LINUX_CUSTOM_DRIVER_st2205
bool
prompt "st2205"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_st2205tool
config LCD4LINUX_CUSTOM_DRIVER_T6963
bool
prompt "T6963"
select LCD4LINUX_CUSTOM_NEEDS_libgd
config LCD4LINUX_CUSTOM_DRIVER_TeakLCM
bool
prompt "TeakLCM"
config LCD4LINUX_CUSTOM_DRIVER_TEW673GRU
bool
select LCD4LINUX_CUSTOM_NEEDS_libgd
depends on TARGET_ar71xx
default TARGET_ar71xx
config LCD4LINUX_CUSTOM_DRIVER_Trefon
bool
prompt "Trefon"
select LCD4LINUX_CUSTOM_NEEDS_libusb
#config LCD4LINUX_CUSTOM_DRIVER_ULA200
# bool
# prompt "ULA200"
# select LCD4LINUX_CUSTOM_NEEDS_libftdi
# select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_USBHUB
bool
prompt "USBHUB"
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_USBLCD
bool
prompt "USBLCD"
select LCD4LINUX_CUSTOM_NEEDS_libusb
config LCD4LINUX_CUSTOM_DRIVER_VNC
bool
prompt "VNC"
select LCD4LINUX_CUSTOM_NEEDS_libgd
select LCD4LINUX_CUSTOM_NEEDS_libvncserver
config LCD4LINUX_CUSTOM_DRIVER_WincorNixdorf
bool
prompt "WincorNixdorf"
#config LCD4LINUX_CUSTOM_DRIVER_X11
# bool
# prompt "X11"
# select LCD4LINUX_CUSTOM_NEEDS_libgd
# select LCD4LINUX_CUSTOM_NEEDS_libX11
comment "Plugins ---"
config LCD4LINUX_CUSTOM_PLUGIN_apm
bool
prompt "apm"
config LCD4LINUX_CUSTOM_PLUGIN_asterisk
bool
prompt "asterisk"
config LCD4LINUX_CUSTOM_PLUGIN_button_exec
bool
prompt "button_exec"
config LCD4LINUX_CUSTOM_PLUGIN_cpuinfo
bool
prompt "cpuinfo"
default y
config LCD4LINUX_CUSTOM_PLUGIN_dbus
bool
prompt "dbus"
select LCD4LINUX_CUSTOM_NEEDS_libdbus
config LCD4LINUX_CUSTOM_PLUGIN_diskstats
bool
prompt "diskstats"
config LCD4LINUX_CUSTOM_PLUGIN_dvb
bool
prompt "dvb"
config LCD4LINUX_CUSTOM_PLUGIN_event
bool
prompt "event"
config LCD4LINUX_CUSTOM_PLUGIN_exec
bool
prompt "exec"
config LCD4LINUX_CUSTOM_PLUGIN_fifo
bool
prompt "fifo"
config LCD4LINUX_CUSTOM_PLUGIN_file
bool
prompt "file"
config LCD4LINUX_CUSTOM_PLUGIN_gps
bool
prompt "gps"
select LCD4LINUX_CUSTOM_NEEDS_libnmeap
config LCD4LINUX_CUSTOM_PLUGIN_hddtemp
bool
prompt "hddtemp"
config LCD4LINUX_CUSTOM_PLUGIN_huawei
bool
prompt "huawei"
config LCD4LINUX_CUSTOM_PLUGIN_i2c_sensors
bool
prompt "i2c_sensors"
config LCD4LINUX_CUSTOM_PLUGIN_iconv
bool
prompt "iconv"
select LCD4LINUX_CUSTOM_NEEDS_libiconv
config LCD4LINUX_CUSTOM_PLUGIN_imon
bool
prompt "imon"
config LCD4LINUX_CUSTOM_PLUGIN_isdn
bool
prompt "isdn"
config LCD4LINUX_CUSTOM_PLUGIN_kvv
bool
prompt "kvv"
config LCD4LINUX_CUSTOM_PLUGIN_loadavg
bool
prompt "loadavg"
default y
config LCD4LINUX_CUSTOM_PLUGIN_meminfo
bool
prompt "meminfo"
default y
config LCD4LINUX_CUSTOM_PLUGIN_mpd
bool
prompt "mpd"
select LCD4LINUX_CUSTOM_NEEDS_libmpdclient
config LCD4LINUX_CUSTOM_PLUGIN_mpris_dbus
bool
prompt "mpris_dbus"
select LCD4LINUX_CUSTOM_NEEDS_libdbus
config LCD4LINUX_CUSTOM_PLUGIN_mysql
bool
prompt "mysql"
select LCD4LINUX_CUSTOM_NEEDS_libmysqlclient
config LCD4LINUX_CUSTOM_PLUGIN_netdev
bool
prompt "netdev"
config LCD4LINUX_CUSTOM_PLUGIN_netinfo
bool
prompt "netinfo"
config LCD4LINUX_CUSTOM_PLUGIN_pop3
bool
prompt "pop3"
config LCD4LINUX_CUSTOM_PLUGIN_ppp
bool
prompt "ppp"
select LCD4LINUX_CUSTOM_NEEDS_ppp
config LCD4LINUX_CUSTOM_PLUGIN_proc_stat
bool
prompt "proc_stat"
default y
#config LCD4LINUX_CUSTOM_PLUGIN_python
# bool
# prompt "python"
# select LCD4LINUX_CUSTOM_NEEDS_python
config LCD4LINUX_CUSTOM_PLUGIN_qnaplog
bool
prompt "qnaplog"
select LCD4LINUX_CUSTOM_NEEDS_libsqlite3
config LCD4LINUX_CUSTOM_PLUGIN_seti
bool
prompt "seti"
config LCD4LINUX_CUSTOM_PLUGIN_statfs
bool
prompt "statfs"
config LCD4LINUX_CUSTOM_PLUGIN_uname
bool
prompt "uname"
config LCD4LINUX_CUSTOM_PLUGIN_uptime
bool
prompt "uptime"
default y
config LCD4LINUX_CUSTOM_PLUGIN_w1retap
bool
prompt "w1retap"
config LCD4LINUX_CUSTOM_PLUGIN_wireless
bool
prompt "wireless"
depends on BROKEN
config LCD4LINUX_CUSTOM_PLUGIN_xmms
bool
prompt "xmms"
endif

306
lcd4linux/Makefile Normal file
View file

@ -0,0 +1,306 @@
#
# Copyright (C) 2007-2015 OpenWrt.org
# Copyright (C) 2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=lcd4linux
PKG_REV:=f13470faf00e52d1458f2a88d498716240edc272
PKG_VERSION:=r$(PKG_REV)
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
#PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/
PKG_SOURCE_URL:=https://github.com/redblue-pkt/lcd4linux.git
#PKG_SOURCE_SUBDIR:=lcd4linux-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=git
LCD4LINUX_DRIVERS:= \
ASTUSB \
BeckmannEgle \
BWCT \
CrystalFontz \
Curses \
Cwlinux \
D4D \
DPF \
EA232graphic \
EFN \
FutabaVFD \
FW8888 \
GLCD2USB \
IRLCD \
$(if $(CONFIG_BROKEN),HD44780) \
$(if $(CONFIG_BROKEN),HD44780-I2C) \
LCD2USB \
$(if $(CONFIG_BROKEN),LCDLinux) \
LCDTerm \
LEDMatrix \
LPH7508 \
$(if $(CONFIG_BROKEN),LUIse) \
LW_ABP \
M50530 \
MatrixOrbital \
MatrixOrbitalGX \
MilfordInstruments \
Newhaven \
Noritake \
NULL \
Pertelian \
PHAnderson \
PICGraphic \
picoLCD \
picoLCDGraphic \
PNG \
PPM \
$(if $(CONFIG_TARGET_rb532),RouterBoard) \
$(if $(CONFIG_BROKEN),SamsungSPF) \
ShuttleVFD \
SimpleLCD \
st2205 \
T6963 \
TeakLCM \
$(if $(CONFIG_TARGET_ar71xx),TEW673GRU) \
Trefon \
USBHUB \
USBLCD \
VNC \
WincorNixdorf \
serdisplib \
# G15 \
# ULA200 \
# X11 \
LCD4LINUX_PLUGINS:= \
apm \
asterisk \
button_exec \
cpuinfo \
dbus \
diskstats \
dvb \
event \
exec \
fifo \
file \
gps \
hddtemp \
huawei \
i2c_sensors \
iconv \
imon \
isdn \
kvv \
loadavg \
netdev \
netinfo \
meminfo \
mpris_dbus \
netdev \
pop3 \
ppp \
proc_stat \
qnaplog \
seti \
statfs \
uname \
uptime \
w1retap \
$(if $(CONFIG_BROKEN),wireless) \
xmms \
# mpd \
# mysql \
# python \
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:= \
# ppp \
# libftdi \
# libX11 \
# python \
PKG_CONFIG_DEPENDS:= \
$(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_%,$(LCD4LINUX_DRIVERS)) \
$(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_%,$(LCD4LINUX_PLUGINS)) \
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/lcd4linux/Default
SECTION:=utils
CATEGORY:=Utilities
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
TITLE:=LCD display utility
URL:=http://lcd4linux.bulix.org/
endef
define Package/lcd4linux/Default/description
LCD4Linux is a small program that grabs information from the kernel and
some subsystems and displays it on an external liquid crystal display.
endef
define Package/lcd4linux-custom
$(call Package/lcd4linux/Default)
DEPENDS:= \
+LCD4LINUX_CUSTOM_NEEDS_libdbus:libdbus \
+LCD4LINUX_CUSTOM_NEEDS_libgd:libgd \
$(if $(ICONV_FULL),+LCD4LINUX_CUSTOM_NEEDS_libiconv:libiconv-full) \
+LCD4LINUX_CUSTOM_NEEDS_libjpeg:libjpeg \
+LCD4LINUX_CUSTOM_NEEDS_libncurses:libncurses \
+LCD4LINUX_CUSTOM_NEEDS_libsqlite3:libsqlite3 \
+LCD4LINUX_CUSTOM_NEEDS_libusb:libusb-compat \
# +LCD4LINUX_CUSTOM_NEEDS_libmpdclient:libmpdclient \
# +LCD4LINUX_CUSTOM_NEEDS_libmysqlclient:libmysqlclient \
# +LCD4LINUX_CUSTOM_NEEDS_libftdi:libftdi \
# +LCD4LINUX_CUSTOM_NEEDS_libX11:libX11 \
# +LCD4LINUX_CUSTOM_NEEDS_python:python
MENU:=1
PROVIDES:=lcd4linux
VARIANT=custom
endef
define Package/lcd4linux-custom/config
source "$(SOURCE)/Config.in"
endef
define Package/lcd4linux-custom/description
$(call Package/lcd4linux/Default/description)
.
This package contains a customized version of LCD4Linux.
endef
define Package/lcd4linux-full
$(call Package/lcd4linux/Default)
DEPENDS:= \
+libdbus \
+libgd \
$(if $(ICONV_FULL),+libiconv-full) \
+libncurses \
+libsqlite3 \
+libusb-compat \
+serdisplib
# +libmpdclient \
# +libmysqlclient \
# +libftdi \
# +libX11 \
# +python
PROVIDES:=lcd4linux
VARIANT=full
endef
define Package/lcd4linux-full/description
$(call Package/lcd4linux/Default/description)
.
This package contains a version of LCD4Linux built with all supported
drivers and plugins.
endef
CONFIGURE_ARGS+= \
--disable-rpath \
EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
ifeq ($(BUILD_VARIANT),custom)
LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
$(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \
))
ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),)
LCD4LINUX_CUSTOM_DRIVERS:=Sample
endif
LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
$(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \
))
ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),)
LCD4LINUX_CUSTOM_PLUGINS:=sample
endif
CONFIGURE_ARGS+= \
--with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \
--with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \
ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),)
CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)"
else
CONFIGURE_ARGS+= --without-libiconv-prefix
endif
ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),)
EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
endif
# ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),)
# CONFIGURE_ARGS+= --with-python
# else
CONFIGURE_ARGS+= --without-python
# endif
# ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),)
# CONFIGURE_ARGS+= --with-x
# else
CONFIGURE_ARGS+= --without-x
# endif
endif
ifeq ($(BUILD_VARIANT),full)
LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \
$(c) \
))
LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \
$(c) \
))
CONFIGURE_ARGS+= \
--with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \
--with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \
--with-libiconv-prefix="$(ICONV_PREFIX)" \
--without-python \
--without-x \
EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
endif
define Package/lcd4linux/conffiles
/etc/lcd4linux.conf
endef
define Package/lcd4linux/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) $(PKG_BUILD_DIR)/lcd4linux.conf.sample $(1)/etc/lcd4linux.conf
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
$(SED) "s|^\(Display 'GLCD2USB'\)|#\1|g" \
-e "s|^\(Layout 'TestLayer'\)|#\1|g" \
-e "s|^#\(Display 'Image'\)|\1|g" \
-e "s|^#\(Layout 'Default'\)|\1|g" \
$(1)/etc/lcd4linux.conf
endef
Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles)
Package/lcd4linux-custom/install = $(Package/lcd4linux/install)
Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles)
Package/lcd4linux-full/install = $(Package/lcd4linux/install)
$(eval $(call BuildPackage,lcd4linux-custom))
$(eval $(call BuildPackage,lcd4linux-full))

View file

@ -0,0 +1,15 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2007-2015 OpenWrt.org
START=98
SERVICE_USE_PID=1
start() {
service_start /usr/bin/lcd4linux -o /tmp/lcd4linux.png -q
}
stop() {
service_stop /usr/bin/lcd4linux
}

View file

@ -0,0 +1,11 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,7 @@ ACLOCAL_AMFLAGS=-I m4
# use this for lots of warnings
#AM_CFLAGS = -D_GNU_SOURCE -std=c99 -m64 -Wall -W -pedantic -Wno-variadic-macros -fno-strict-aliasing
-lcd4linux_LDFLAGS ="-Wl,--as-needed"
+lcd4linux_LDFLAGS =
lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@
lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@

View file

@ -0,0 +1,22 @@
--- a/drv_T6963.c
+++ b/drv_T6963.c
@@ -114,7 +114,9 @@ static void drv_T6_status1(void)
/* wait for STA0=1 and STA1=1 */
n = 0;
do {
+#if 0
rep_nop();
+#endif
if (++n > 1000) {
debug("hang in status1");
bug = 1;
@@ -150,7 +152,9 @@ static void drv_T6_status2(void)
/* wait for STA3=1 */
n = 0;
do {
+#if 0
rep_nop();
+#endif
if (++n > 1000) {
debug("hang in status2");
bug = 1;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
--- a/drv_G15.c
+++ b/drv_G15.c
@@ -42,6 +42,7 @@
#include <usb.h>
#include <fcntl.h>
+#include <linux/version.h>
#include <linux/input.h>
#include <linux/uinput.h>
@@ -269,8 +270,13 @@ void drv_G15_initKeyHandling(char *devic
}
memset(&device, 0, sizeof(device));
strncpy(device.name, "G15 Keys", UINPUT_MAX_NAME_SIZE);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
device.id.bustype = BUS_USB;
device.id.version = 4;
+#else
+ device.idbus = BUS_USB;
+ device.idversion = 4;
+#endif
ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY);

View file

@ -0,0 +1,195 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -71,6 +71,8 @@ drv_generic_i2c.c \
drv_generic_i2c.h \
drv_generic_keypad.c \
drv_generic_keypad.h \
+drv_generic_spidev.c \
+drv_generic_spidev.h \
drv_ASTUSB.c \
drv_BeckmannEgle.c \
drv_BWCT.c \
--- /dev/null
+++ b/drv_generic_spidev.c
@@ -0,0 +1,89 @@
+/* $Id$
+ * $URL$
+ *
+ * generic driver helper for displays connected via SPI bus
+ *
+ * Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
+ *
+ * This file is part of LCD4Linux.
+ *
+ * LCD4Linux is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * LCD4Linux 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include "debug.h"
+#include "qprintf.h"
+#include "cfg.h"
+#include "drv_generic_spidev.h"
+
+static char *generic_spidev_section = "";
+static char *generic_spidev_driver = "";
+static int generic_spidev_fd;
+
+int drv_generic_spidev_open(const char *section, const char *driver)
+{
+ char *spidev;
+
+ udelay_init();
+
+ generic_spidev_section = (char *) section;
+ generic_spidev_driver = (char *) driver;
+
+ spidev = cfg_get(generic_spidev_section, "Port", NULL);
+
+ info("%s: initializing SPI device %s", generic_spidev_driver, spidev);
+ generic_spidev_fd = open(spidev, O_WRONLY);
+ if (generic_spidev_fd < 0) {
+ error("%s: unable to open SPI device %s!\n", generic_spidev_driver, spidev);
+ goto exit_error;
+ }
+
+ return 0;
+
+ exit_error:
+ free(spidev);
+ return -1;
+}
+
+int drv_generic_spidev_close(void)
+{
+ close(generic_spidev_fd);
+ return 0;
+}
+
+int drv_generic_spidev_transfer(const int count, struct spi_ioc_transfer *tr)
+{
+ int ret;
+
+ ret = ioctl(generic_spidev_fd, SPI_IOC_MESSAGE(count), tr);
+ if (ret < count) {
+ error("%s: can't send SPI message! (%s)\n",
+ generic_spidev_driver, strerror(errno));
+ return -1;
+ }
+
+ return 0;
+}
--- /dev/null
+++ b/drv_generic_spidev.h
@@ -0,0 +1,54 @@
+/* $Id$
+ * $URL$
+ *
+ * generic driver helper for displays connected via SPI bus
+ *
+ * Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2012 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
+ *
+ * This file is part of LCD4Linux.
+ *
+ * LCD4Linux is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * LCD4Linux 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+/*
+ *
+ * exported fuctions:
+ *
+ * int drv_generic_spidev_open (const char *section, const char *driver)
+ * reads 'Port' entry from config and opens
+ * the SPI device
+ * returns 0 if ok, -1 on failure
+ *
+ * int drv_generic_spidev_close (void)
+ * closes SPI device
+ * returns 0 if ok, -1 on failure
+ *
+ * void drv_generic_spidev_transfer (int count, struct spi_ioc_transfer *tr)
+ * transfer data to/from the SPI device
+ *
+ */
+
+#ifndef _DRV_GENERIC_SPIDEV_H_
+#define _DRV_GENERIC_SPIDEV_H_
+
+#include <linux/spi/spidev.h>
+
+int drv_generic_spidev_open(const char *section, const char *driver);
+int drv_generic_spidev_close(void);
+int drv_generic_spidev_transfer(const int count, struct spi_ioc_transfer *tr);
+
+#endif /* _DRV_GENERIC_SPIDEV_H_ */
--- a/drivers.m4
+++ b/drivers.m4
@@ -301,6 +301,7 @@ PARPORT="no"
SERIAL="no"
I2C="no"
KEYPAD="no"
+SPIDEV="no"
# generic libraries
LIBUSB="no"
@@ -936,6 +937,12 @@ if test "$LIBJPEG" = "yes"; then
DRVLIBS="$DRVLIBS -ljpeg"
fi
+# generic spidev driver
+if test "$SPIDEV" = "yes"; then
+ DRIVERS="$DRIVERS drv_generic_spidev.o"
+ AC_DEFINE(WITH_SPIDEV, 1, [SPIDEV driver])
+fi
+
# libusb
if test "$LIBUSB" = "yes"; then
DRVLIBS="$DRVLIBS -lusb"
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,9 @@ AC_ARG_WITH(outb,
AC_CHECK_HEADERS([asm/io.h] [linux/parport.h linux/ppdev.h], [has_parport="true"], [has_parport="false"])
+# check for spidev
+AC_CHECK_HEADERS([linux/spi/spidev.h], [has_spidev="true"], [has_spidev="false"])
+
# drivers
sinclude(drivers.m4)

View file

@ -0,0 +1,20 @@
--- a/drv_GLCD2USB.c
+++ b/drv_GLCD2USB.c
@@ -48,6 +48,7 @@
#include <fcntl.h>
#include <sys/time.h>
#include <usb.h>
+#include <endian.h>
#include "debug.h"
#include "cfg.h"
@@ -487,6 +488,9 @@ static int drv_GLCD2USB_start(const char
return -1;
}
+ buffer.display_info.width = le16toh(buffer.display_info.width);
+ buffer.display_info.height = le16toh(buffer.display_info.height);
+
info("%s: display name = %s", Name, buffer.display_info.name);
info("%s: display resolution = %d * %d", Name, buffer.display_info.width, buffer.display_info.height);
info("%s: display flags: %x", Name, buffer.display_info.flags);