diff options
Diffstat (limited to 'package/system')
-rw-r--r-- | package/system/gpio-cdev/nu801/Makefile | 39 | ||||
-rwxr-xr-x | package/system/gpio-cdev/nu801/files/nu801.init | 14 |
2 files changed, 53 insertions, 0 deletions
diff --git a/package/system/gpio-cdev/nu801/Makefile b/package/system/gpio-cdev/nu801/Makefile new file mode 100644 index 0000000000..b3fae616cd --- /dev/null +++ b/package/system/gpio-cdev/nu801/Makefile @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nu801 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/chunkeey/nu801.git +PKG_SOURCE_VERSION:=d9942c0ceb949080b93366a9431028de3608e535 + +PKG_MAINTAINER:=Christian Lamparter <chunkeey@gmail.com> +PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/nu801 + SECTION:=utils + CATEGORY:=Utilities + SUBMENU:=Userspace GPIO Drivers + DEPENDS:=@TARGET_x86 +kmod-leds-uleds + KCONFIG:=CONFIG_GPIO_CDEV=y + TITLE:=NU801 LED Driver +endef + +define Package/nu801/description +This package contains a userspace driver to power the NUMEN Tech. NU801 LED Driver. +endef + +define Package/nu801/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/nu801 $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/nu801.init $(1)/etc/init.d/nu801 +endef + +$(eval $(call BuildPackage,nu801)) diff --git a/package/system/gpio-cdev/nu801/files/nu801.init b/package/system/gpio-cdev/nu801/files/nu801.init new file mode 100755 index 0000000000..a29554ae30 --- /dev/null +++ b/package/system/gpio-cdev/nu801/files/nu801.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +# SPDX-License-Identifier: GPL-2.0-or-later + +START=11 + +boot() { + . /lib/functions.sh + /usr/sbin/nu801 "$(board_name)" + + # Because this is a userspace driver, we need to trigger diag.sh after + # we start the driver, but before boot is complete so we blink. + . /etc/diag.sh + set_state preinit_regular +} |