mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-23 18:43:57 +08:00
Compare commits
59 Commits
devel-no-h
...
controller
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82bd89a2fa | ||
|
|
728bdacd70 | ||
|
|
9613b4b35d | ||
|
|
42c12b9a24 | ||
|
|
18620d19b5 | ||
|
|
a5f8436b9b | ||
|
|
9937972931 | ||
|
|
ff6e67d7ee | ||
|
|
1ba797a43d | ||
|
|
932d08e35c | ||
|
|
6b38477949 | ||
|
|
f9b4dea0ad | ||
|
|
182af2c1a5 | ||
|
|
e5fb9bf79d | ||
|
|
5ed7c8b79c | ||
|
|
545054bad4 | ||
|
|
9550947906 | ||
|
|
a859c42c9a | ||
|
|
a97b005232 | ||
|
|
00aaa8e966 | ||
|
|
9fdc4d0d8a | ||
|
|
f764e2be69 | ||
|
|
b46e64a4a1 | ||
|
|
9c40ae83b0 | ||
|
|
49dff02bf8 | ||
|
|
72e723d8f9 | ||
|
|
e908c6f6b8 | ||
|
|
176bed8df4 | ||
|
|
db20d56e6e | ||
|
|
ea799c2870 | ||
|
|
59ab62ae84 | ||
|
|
8763f54e6e | ||
|
|
df01b63437 | ||
|
|
79eb07954e | ||
|
|
5497338f67 | ||
|
|
9805015b81 | ||
|
|
ae13be86c9 | ||
|
|
efe8428fb6 | ||
|
|
b44fcd804c | ||
|
|
9f1b6b1eff | ||
|
|
a8f1267239 | ||
|
|
282dec860c | ||
|
|
56879584f1 | ||
|
|
9ec95d1b5e | ||
|
|
fd569dcb31 | ||
|
|
f031ee17a3 | ||
|
|
5a3b7602b0 | ||
|
|
746d3f2c89 | ||
|
|
0b58bfdf1b | ||
|
|
0a0633afc1 | ||
|
|
e6be8ccff7 | ||
|
|
de675228bc | ||
|
|
2b43a91930 | ||
|
|
1fe8dfa464 | ||
|
|
1bf0a38259 | ||
|
|
75b93ae57b | ||
|
|
0391f4c509 | ||
|
|
f57de2675a | ||
|
|
7046497a13 |
@@ -5,11 +5,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=4.0.6
|
||||
PKG_VERSION:=4.1.2
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5e72e0b9782de3978b24af0b2e80b226a35ad032
|
||||
PKG_SOURCE_VERSION:=3034c1b324937fdccafa92e706e5986dc7a78df7
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bulkdata
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_VERSION:=1.0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=4ac9d7a7e90f5de5f43d6bf3d1a844114a46b134
|
||||
PKG_SOURCE_VERSION:=e4f39d1bf4678fc05b9d02e81b194c70719909e4
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
|
||||
|
||||
|
||||
38
bulut/Makefile
Normal file
38
bulut/Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# Copyright (C) 2019 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bulut
|
||||
PKG_VERSION:=0.2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bulut/bulut-gw-client.git
|
||||
PKG_SOURCE_VERSION:=227700c44817afa2c392fa08bf4cf70fa6177f01
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/bulut
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=
|
||||
TITLE:=bulut
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include
|
||||
|
||||
define Package/bulut/description
|
||||
obuspa keys
|
||||
endef
|
||||
|
||||
define Package/bulut/install
|
||||
$(CP) $(PKG_BUILD_DIR)/files/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,bulut))
|
||||
@@ -1,50 +1,82 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=crun
|
||||
PKG_VERSION:=0.17
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.18
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/containers/crun.git
|
||||
PKG_SOURCE_VERSION:=0e9229ae34caaebcb86f1fde18de3acaf18c6d9a
|
||||
PKG_SOURCE_DATE:=2021-03-18
|
||||
PKG_SOURCE_VERSION:=496e81bdd69f117f10e4477e4204e4611a94b68f
|
||||
PKG_MIRROR_HASH:=26941b0d84bbeabeb5e982af48d131f55d0aa16f4a2f2ca3279a5c812cdeea8b
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_DEPENDS:=argp-standalone
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/crun
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+yajl +argp-standalone +libcap +libseccomp
|
||||
TITLE:=A fast and low-memory footprint OCI Container Runtime fully written in C
|
||||
TITLE:=crun
|
||||
URL:=https://github.com/containers/crun
|
||||
DEPENDS:=@!arc +libseccomp +libcap
|
||||
endef
|
||||
|
||||
define Package/crun/description
|
||||
crun conforms to the OCI Container Runtime specifications
|
||||
A fast and low-memory footprint OCI Container Runtime fully written in C.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
||||
TARGET_LDFLAGS += -largp
|
||||
CONFIGURE_ARGS+= \
|
||||
--disable-systemd \
|
||||
--enable-embedded-yajl \
|
||||
--enable-caps \
|
||||
--enable-dl \
|
||||
--enable-seccomp \
|
||||
--enable-bpf
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(SED) '/#include <git-version.h>/d' $(PKG_BUILD_DIR)/src/crun.c
|
||||
endef
|
||||
|
||||
MAKE_FLAGS := \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
|
||||
define Build/Configure
|
||||
cd $(PKG_BUILD_DIR)/ && sh autogen.sh && ./configure
|
||||
endef
|
||||
$(call Build/Configure/Default)
|
||||
|
||||
$(SED) '/#define PACKAGE \"/d' $(PKG_BUILD_DIR)/config.h
|
||||
$(SED) '/#define VERSION \"/d' $(PKG_BUILD_DIR)/config.h
|
||||
$(SED) '/#define GIT_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
|
||||
$(SED) '/#define PACKAGE_BUGREPORT \"/d' $(PKG_BUILD_DIR)/config.h
|
||||
$(SED) '/#define PACKAGE_NAME \"/d' $(PKG_BUILD_DIR)/config.h
|
||||
$(SED) '/#define PACKAGE_STRING \"/d' $(PKG_BUILD_DIR)/config.h
|
||||
$(SED) '/#define PACKAGE_TARNAME \"/d' $(PKG_BUILD_DIR)/config.h
|
||||
$(SED) '/#define PACKAGE_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
|
||||
|
||||
echo "#define PACKAGE \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
|
||||
echo "#define VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
|
||||
echo "#define PACKAGE_NAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
|
||||
echo "#define PACKAGE_VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
|
||||
echo "#define PACKAGE_STRING \"$(PKG_NAME) $(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
|
||||
echo "#define PACKAGE_TARNAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
|
||||
echo "#define PACKAGE_BUGREPORT \"bugs@openwrt.org\"" >> $(PKG_BUILD_DIR)/config.h
|
||||
echo "#define GIT_VERSION \"$(PKG_SOURCE_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
|
||||
endef
|
||||
|
||||
define Package/crun/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/crun $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/crun $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/crun $(1)/usr/bin/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrun.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,crun))
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5e9f2f9..5ed99bd 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -52,16 +52,6 @@ AS_IF([test "x$enable_seccomp" != "xno"], [
|
||||
])
|
||||
])
|
||||
|
||||
-dnl libsystemd
|
||||
-AC_ARG_ENABLE([systemd],
|
||||
- AS_HELP_STRING([--disable-systemd], [Ignore systemd and disable support]))
|
||||
-AS_IF([test "x$enable_systemd" != "xno"], [
|
||||
- AC_CHECK_HEADERS([systemd/sd-bus.h], [], [AC_MSG_ERROR([*** Missing libsystemd headers])])
|
||||
- AS_IF([test "$ac_cv_header_systemd_sd_bus_h" = "yes"], [
|
||||
- AC_SEARCH_LIBS(sd_bus_match_signal_async, [systemd], [AC_DEFINE([HAVE_SYSTEMD], 1, [Define if libsystemd is available])], [AC_MSG_ERROR([*** Failed to find libsystemd])])
|
||||
- ])
|
||||
-])
|
||||
-
|
||||
dnl ebpf
|
||||
AC_ARG_ENABLE([bpf],
|
||||
AS_HELP_STRING([--disable-bpf], [Ignore eBPF and disable support]))
|
||||
@@ -114,26 +104,6 @@ AS_IF([test "x$enable_criu" != "xno"], [
|
||||
FOUND_LIBS=$LIBS
|
||||
LIBS=""
|
||||
|
||||
-AC_MSG_CHECKING([for new mount API (fsconfig)])
|
||||
-AC_COMPILE_IFELSE(
|
||||
- [AC_LANG_SOURCE([[
|
||||
- #include <linux/mount.h>
|
||||
- int cmd = FSCONFIG_CMD_CREATE;
|
||||
- ]])],
|
||||
- [AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE([HAVE_FSCONFIG_CMD_CREATE], 1, [Define if FSCONFIG_CMD_CREATE is available])],
|
||||
- [AC_MSG_RESULT(no)])
|
||||
-
|
||||
-AC_MSG_CHECKING([for seccomp notify API])
|
||||
-AC_COMPILE_IFELSE(
|
||||
- [AC_LANG_SOURCE([[
|
||||
- #include <linux/seccomp.h>
|
||||
- int cmd = SECCOMP_GET_NOTIF_SIZES;
|
||||
- ]])],
|
||||
- [AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE([HAVE_SECCOMP_GET_NOTIF_SIZES], 1, [Define if SECCOMP_GET_NOTIF_SIZES is available])],
|
||||
- [AC_MSG_RESULT(no)])
|
||||
-
|
||||
AC_DEFINE([LIBCRUN_PUBLIC], [__attribute__((visibility("default"))) extern], [LIBCRUN_PUBLIC])
|
||||
AC_SUBST([FOUND_LIBS])
|
||||
AC_SUBST([CRUN_LDFLAGS])
|
||||
diff --git a/src/libcrun/cgroup.c b/src/libcrun/cgroup.c
|
||||
index 29c1f7a..77dc441 100644
|
||||
--- a/src/libcrun/cgroup.c
|
||||
+++ b/src/libcrun/cgroup.c
|
||||
@@ -575,23 +575,6 @@ get_file_owner (const char *path, uid_t *uid, gid_t *gid)
|
||||
struct stat st;
|
||||
int ret;
|
||||
|
||||
-#ifdef HAVE_STATX
|
||||
- struct statx stx;
|
||||
-
|
||||
- ret = statx (AT_FDCWD, path, AT_STATX_DONT_SYNC, STATX_UID | STATX_GID, &stx);
|
||||
- if (UNLIKELY (ret < 0))
|
||||
- {
|
||||
- if (errno == ENOSYS || errno == EINVAL)
|
||||
- goto fallback;
|
||||
-
|
||||
- return ret;
|
||||
- }
|
||||
- *uid = stx.stx_uid;
|
||||
- *gid = stx.stx_gid;
|
||||
- return ret;
|
||||
-
|
||||
-fallback:
|
||||
-#endif
|
||||
ret = stat (path, &st);
|
||||
if (UNLIKELY (ret < 0))
|
||||
return ret;
|
||||
diff --git a/src/libcrun/error.h b/src/libcrun/error.h
|
||||
index aa3f3aa..477a2fe 100644
|
||||
--- a/src/libcrun/error.h
|
||||
+++ b/src/libcrun/error.h
|
||||
@@ -18,9 +18,6 @@
|
||||
#ifndef ERROR_H
|
||||
#define ERROR_H
|
||||
#include <config.h>
|
||||
-#ifdef HAVE_ERROR_H
|
||||
-# include <error.h>
|
||||
-#else
|
||||
# define error(status, errno, fmt, ...) \
|
||||
do \
|
||||
{ \
|
||||
@@ -35,7 +32,6 @@
|
||||
exit (status); \
|
||||
} \
|
||||
while (0)
|
||||
-#endif
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
diff --git a/src/libcrun/utils.c b/src/libcrun/utils.c
|
||||
index cbde9b6..5ef7f5f 100644
|
||||
--- a/src/libcrun/utils.c
|
||||
+++ b/src/libcrun/utils.c
|
||||
@@ -164,22 +164,6 @@ get_file_type_fd (int fd, mode_t *mode)
|
||||
struct stat st;
|
||||
int ret;
|
||||
|
||||
-#ifdef HAVE_STATX
|
||||
- struct statx stx;
|
||||
-
|
||||
- ret = statx (fd, "", AT_EMPTY_PATH | AT_STATX_DONT_SYNC, STATX_TYPE, &stx);
|
||||
- if (UNLIKELY (ret < 0))
|
||||
- {
|
||||
- if (errno == ENOSYS || errno == EINVAL)
|
||||
- goto fallback;
|
||||
-
|
||||
- return ret;
|
||||
- }
|
||||
- *mode = stx.stx_mode;
|
||||
- return ret;
|
||||
-
|
||||
-fallback:
|
||||
-#endif
|
||||
ret = fstat (fd, &st);
|
||||
*mode = st.st_mode;
|
||||
return ret;
|
||||
@@ -191,22 +175,6 @@ get_file_type_at (int dirfd, mode_t *mode, bool nofollow, const char *path)
|
||||
struct stat st;
|
||||
int ret;
|
||||
|
||||
-#ifdef HAVE_STATX
|
||||
- struct statx stx;
|
||||
-
|
||||
- ret = statx (dirfd, path, (nofollow ? AT_SYMLINK_NOFOLLOW : 0) | AT_STATX_DONT_SYNC, STATX_TYPE, &stx);
|
||||
- if (UNLIKELY (ret < 0))
|
||||
- {
|
||||
- if (errno == ENOSYS || errno == EINVAL)
|
||||
- goto fallback;
|
||||
-
|
||||
- return ret;
|
||||
- }
|
||||
- *mode = stx.stx_mode;
|
||||
- return ret;
|
||||
-
|
||||
-fallback:
|
||||
-#endif
|
||||
ret = fstatat (dirfd, path, &st, nofollow ? AT_SYMLINK_NOFOLLOW : 0);
|
||||
*mode = st.st_mode;
|
||||
return ret;
|
||||
@@ -550,22 +518,7 @@ get_file_size (int fd, off_t *size)
|
||||
{
|
||||
struct stat st;
|
||||
int ret;
|
||||
-#ifdef HAVE_STATX
|
||||
- struct statx stx;
|
||||
-
|
||||
- ret = statx (fd, "", AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW | AT_STATX_DONT_SYNC, STATX_SIZE, &stx);
|
||||
- if (UNLIKELY (ret < 0))
|
||||
- {
|
||||
- if (errno == ENOSYS || errno == EINVAL)
|
||||
- goto fallback;
|
||||
- return ret;
|
||||
- }
|
||||
- *size = stx.stx_size;
|
||||
-
|
||||
- return ret;
|
||||
|
||||
-fallback:
|
||||
-#endif
|
||||
ret = fstat (fd, &st);
|
||||
*size = st.st_size;
|
||||
return ret;
|
||||
@@ -1060,7 +1013,6 @@ run_process (char **args, libcrun_error_t *err)
|
||||
_exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
-#ifndef HAVE_FGETPWENT_R
|
||||
static unsigned
|
||||
atou (char **s)
|
||||
{
|
||||
@@ -1126,7 +1078,6 @@ fgetpwent_r (FILE *f, struct passwd *pw, char *line, size_t size, struct passwd
|
||||
errno = rv;
|
||||
return rv;
|
||||
}
|
||||
-#endif
|
||||
|
||||
int
|
||||
set_home_env (uid_t id)
|
||||
@@ -1690,29 +1641,6 @@ copy_rec_stat_file_at (int dfd, const char *path, mode_t *mode, off_t *size, dev
|
||||
struct stat st;
|
||||
int ret;
|
||||
|
||||
-#ifdef HAVE_STATX
|
||||
- struct statx stx;
|
||||
-
|
||||
- ret = statx (dfd, path, AT_SYMLINK_NOFOLLOW | AT_STATX_DONT_SYNC,
|
||||
- STATX_TYPE | STATX_MODE | STATX_SIZE | STATX_UID | STATX_GID, &stx);
|
||||
- if (UNLIKELY (ret < 0))
|
||||
- {
|
||||
- if (errno == ENOSYS || errno == EINVAL)
|
||||
- goto fallback;
|
||||
-
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- *mode = stx.stx_mode;
|
||||
- *size = stx.stx_size;
|
||||
- *rdev = makedev (stx.stx_rdev_major, stx.stx_rdev_minor);
|
||||
- *uid = stx.stx_uid;
|
||||
- *gid = stx.stx_gid;
|
||||
-
|
||||
- return ret;
|
||||
-
|
||||
-fallback:
|
||||
-#endif
|
||||
ret = fstatat (dfd, path, &st, AT_SYMLINK_NOFOLLOW);
|
||||
|
||||
*mode = st.st_mode;
|
||||
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.0.10
|
||||
PKG_VERSION:=3.0.12
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=4d137242e742cb9fc03f27f4a55182806eb0bc4e
|
||||
PKG_SOURCE_VERSION:=db155c063a9875026e573bbd292dec484fc3f103
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,4 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (C) 2021 OpenWrt.org
|
||||
#
|
||||
|
||||
source /lib/functions/uci-defaults.sh
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SOUND_BASE=/lib/modules/$(uname -r)/kernel/sound
|
||||
SOUND_MODULES="$SOUND_BASE/soundcore.ko $SOUND_BASE/core/snd.ko $SOUND_BASE/core/snd-timer.ko"
|
||||
SOUND_MODULES="$SOUND_MODULES $SOUND_BASE/core/snd-pcm.ko $SOUND_BASE/core/snd-hwdep.ko"
|
||||
SOUND_MODULES="$SOUND_MODULES $SOUND_BASE/core/seq/snd-seq-device.ko"
|
||||
SOUND_MODULES="$SOUND_MODULES $SOUND_BASE/core/seq/snd-seq.ko $SOUND_BASE/core/snd-rawmidi.ko "
|
||||
SOUND_MODULES="$SOUND_MODULES $SOUND_BASE/usb/snd-usbmidi-lib.ko $SOUND_BASE/usb/snd-usb-audio.ko"
|
||||
|
||||
load_sound_modules() {
|
||||
for mod in $SOUND_MODULES; do
|
||||
insmod $mod
|
||||
done
|
||||
}
|
||||
|
||||
unload_sound_modules() {
|
||||
local modules=
|
||||
|
||||
# reverse the order
|
||||
for mod in $SOUND_MODULES; do
|
||||
modules="$mod $modules"
|
||||
done
|
||||
|
||||
for mod in $modules; do
|
||||
rmmod $mod
|
||||
done
|
||||
}
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=6.2.1
|
||||
PKG_VERSION:=6.2.12
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5521e398fd26f76a080c90b4975a649597564bba
|
||||
PKG_SOURCE_VERSION:=48b9abce9acace69a9b270ed4438b80434fc3446
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
@@ -45,12 +45,6 @@ ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_PLATFORM=MEDIATEK
|
||||
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
|
||||
TARGET_PLATFORM=MARVELL
|
||||
TARGET_CFLAGS +=-DIOPSYS_MARVELL
|
||||
else ifeq ($(CONFIG_TARGET_intel_mips),y)
|
||||
TARGET_PLATFORM=INTEL
|
||||
TARGET_CFLAGS +=-DIOPSYS_INTEL
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_x86),y)
|
||||
TARGET_PLATFORM=TEST
|
||||
TARGET_CFLAGS +=-DIOPSYS_TEST
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
|
||||
define Package/libdsl
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= XDSL library (libdsl)
|
||||
DEPENDS+=+TARGET_intel_mips:dsl-cpe-api-vrx \
|
||||
+TARGET_intel_mips:dsl-cpe-fapi \
|
||||
+TARGET_intel_mips:kmod-ppa-drv
|
||||
TITLE:= xDSL library (libdsl)
|
||||
endef
|
||||
|
||||
define Package/libdsl/config
|
||||
|
||||
@@ -6,26 +6,17 @@
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.4
|
||||
PKG_SOURCE_VERSION:=510b885c049b8ba06772dae59e64b370d0fded3e
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
ifeq ($(CONFIG_ENDPT_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=endptmngr-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://download.iopsys.eu/iopsys/opensdk/
|
||||
PKG_NAME:=endptmngr-open
|
||||
PATCH_DIR:=
|
||||
PKG_HASH:=skip
|
||||
else
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_NAME:=endptmngr
|
||||
PKG_VERSION:=0.4
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
|
||||
PKG_SOURCE_VERSION:=b94de01a4ff24bb4d31bb16b3be9e1b1859359dd
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
export BUILD_DIR
|
||||
|
||||
@@ -34,14 +25,9 @@ PKG_BUILD_PARALLEL:=1
|
||||
|
||||
# All config variable that are passed to the make invocation, directly or
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_TARGET_BOARD
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
export CONFIG_BRCM_SDK_VER_504001
|
||||
export CONFIG_BRCM_SDK_VER_504002
|
||||
export CONFIG_BRCM_SDK_VER_504003
|
||||
export CONFIG_BRCM_SDK_VER_504004
|
||||
export CONFIG_BRCM_SDK_VER_504005
|
||||
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@@ -52,7 +38,7 @@ endef
|
||||
|
||||
define Package/endptmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Brcmslic
|
||||
TITLE:=Broadcom Voice Endpoint Manager
|
||||
URL:=
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +uci +bcmkernel @TARGET_HAS_VOICE @BCM_VOICE
|
||||
endef
|
||||
@@ -61,18 +47,9 @@ define Package/endptmngr/description
|
||||
endptmngr
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_ENDPT_OPEN),y)
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
|
||||
define Package/endptmngr/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
cp $(PKG_BUILD_DIR)/files/etc/init.d/* $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/endptmngr $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
|
||||
25
endptmngr/files/etc/init.d/endptmngr
Executable file
25
endptmngr/files/etc/init.d/endptmngr
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=68
|
||||
STOP=12
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=endptmngr
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param env hw_board_hasDect=$(db get hw.board.hasDect)
|
||||
procd_set_param command $NAME
|
||||
procd_set_param respawn "5" "0" "3"
|
||||
procd_set_param nice -12
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger asterisk
|
||||
}
|
||||
@@ -12,7 +12,7 @@ PKG_VERSION:=1.0
|
||||
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/fdtextract.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=152a2d96fea896c1607bd5259e3076750693dd59
|
||||
PKG_SOURCE_VERSION:=485a38bc4eaf2a54d080b8529d5130b2955626d1
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
@@ -6,7 +6,6 @@ CONFIG_DEVEL=y
|
||||
CONFIG_PACKAGE_6in4=y
|
||||
CONFIG_PACKAGE_6rd=y
|
||||
CONFIG_PACKAGE_6to4=y
|
||||
CONFIG_PACKAGE_alsa-lib=y
|
||||
CONFIG_PACKAGE_at=y
|
||||
CONFIG_PACKAGE_atftp=m
|
||||
CONFIG_PACKAGE_atftpd=m
|
||||
@@ -89,15 +88,14 @@ CONFIG_PACKAGE_rpcd-mod-rpcsys=y
|
||||
CONFIG_PACKAGE_rulengd=y
|
||||
CONFIG_PACKAGE_strace=y
|
||||
CONFIG_PACKAGE_swmodd=m
|
||||
CONFIG_PACKAGE_tc=y
|
||||
CONFIG_PACKAGE_tcpdump=y
|
||||
CONFIG_PACKAGE_terminfo=y
|
||||
CONFIG_PACKAGE_traceroute6=y
|
||||
CONFIG_PACKAGE_uledd=y
|
||||
CONFIG_PACKAGE_umbim=y
|
||||
CONFIG_PACKAGE_uqmi=y
|
||||
CONFIG_PACKAGE_urlfilter=y
|
||||
CONFIG_PACKAGE_usb-modeswitch=y
|
||||
CONFIG_PACKAGE_usbreset=y
|
||||
CONFIG_PACKAGE_uspd=y
|
||||
CONFIG_PACKAGE_vsftpd-tls=m
|
||||
CONFIG_PACKAGE_wwan=y
|
||||
@@ -227,4 +225,3 @@ CONFIG_TARGET_ROOTFS_TARGZ=y
|
||||
# Disable it. Most SoCs nowadays has HW random generators anyway.
|
||||
# CONFIG_PACKAGE_urandom-seed is not set
|
||||
# CONFIG_PACKAGE_urngd is not set
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ function feeds_update {
|
||||
fi
|
||||
|
||||
# targets need to be installed explicitly
|
||||
targets="iopsys-brcm63xx-arm iopsys-ramips intel_mips iopsys-x86 iopsys-armvirt iopsys-bcm27xx"
|
||||
targets="iopsys-brcm63xx-arm iopsys-ramips intel_mips iopsys-x86 iopsys-armvirt iopsys-bcm27xx iopsys-mediatek"
|
||||
for target in $targets
|
||||
do
|
||||
rm -f target/linux/$target
|
||||
|
||||
@@ -18,6 +18,7 @@ function genconfig {
|
||||
brcm63xx_arm="target/linux/iopsys-brcm63xx-arm"
|
||||
ramips="target/linux/iopsys-ramips"
|
||||
intel_mips="target/linux/intel_mips"
|
||||
mediatek="target/linux/iopsys-mediatek"
|
||||
x86="target/linux/iopsys-x86"
|
||||
armvirt="target/linux/iopsys-armvirt"
|
||||
|
||||
@@ -113,6 +114,8 @@ function genconfig {
|
||||
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
|
||||
[ -e $ramips/genconfig ] &&
|
||||
iopsys_ramips=$(cd $ramips; ./genconfig)
|
||||
[ -e $mediatek/genconfig ] &&
|
||||
iopsys_mediatek=$(cd $mediatek; ./genconfig)
|
||||
[ -e $intel_mips/genconfig ] &&
|
||||
iopsys_intel_mips=$(cd $intel_mips; ./genconfig)
|
||||
[ -e $x86/genconfig ] &&
|
||||
@@ -123,7 +126,7 @@ function genconfig {
|
||||
iopsys_bcm27xx=$(cd $bcm27xx; ./genconfig)
|
||||
|
||||
if [ "$profile" == "LIST" ]; then
|
||||
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_intel_mips iopsys_x86 iopsys_armvirt iopsys_bcm27xx; do
|
||||
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_mediatek iopsys_intel_mips iopsys_x86 iopsys_armvirt iopsys_bcm27xx; do
|
||||
echo "$list based boards:"
|
||||
for b in ${!list}; do
|
||||
echo -e "\t$b"
|
||||
@@ -148,6 +151,14 @@ function genconfig {
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_mediatek; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_mediatek"
|
||||
target_config_path="$mediatek/config"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_intel_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="intel_mips"
|
||||
@@ -358,6 +369,11 @@ function genconfig {
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
|
||||
elif [ "$target" = "iopsys_mediatek" ]; then
|
||||
subtarget="mt7622"
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
|
||||
elif [ "$target" = "iopsys_bcm27xx" ]; then
|
||||
subtarget="iopsys_bcm2711"
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
@@ -429,7 +445,7 @@ function genconfig {
|
||||
fi
|
||||
|
||||
# Force regeneration of themes
|
||||
touch package/feeds/juci/juci/Makefile
|
||||
touch package/feeds/iopsys/juci/Makefile
|
||||
|
||||
# Force regeneration of kernel Makefile
|
||||
# Needed to disable kmods for iopsys-brcm targets
|
||||
|
||||
122
juci/Makefile
Normal file
122
juci/Makefile
Normal file
@@ -0,0 +1,122 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=juci
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/juci.git
|
||||
PKG_SOURCE_VERSION:=70b66bfc7f0e25e77b6920c3d44e5b05f4bfcf95
|
||||
PKG_VERSION:=2020-05-27
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
|
||||
PKG_RELEASE=$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/juci
|
||||
$(Package/juci/default)
|
||||
SECTION:=juci
|
||||
CATEGORY:=JUCI
|
||||
MENU=1
|
||||
TITLE:=JUCI Core Package (select this to select default plugins)
|
||||
DEPENDS:=+libubox +libubus +owsd +rpcd +rpcd-mod-file +questd
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/src/
|
||||
ln -s $(PKG_BUILD_DIR) $(1)/usr/src/juci
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/Default,THEME_PATH="$(TOPDIR)/tmp/juci-themes/")
|
||||
endef
|
||||
|
||||
define Package/juci/description
|
||||
JUCI Javascript UCI Web interface.
|
||||
endef
|
||||
|
||||
define Package/juci/install
|
||||
$(INSTALL_DIR) $(1)/
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/juci/* $(1)/
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
define Package/juci/postinst
|
||||
#!/bin/sh
|
||||
|
||||
juci-update
|
||||
exit 0
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,juci))
|
||||
|
||||
####### Extensions / Themes and Plugins
|
||||
|
||||
define RegisterAddonInner
|
||||
define Package/$(2)
|
||||
SECTION:=juci
|
||||
CATEGORY:=JUCI
|
||||
TITLE:=default
|
||||
SUBMENU:=$(1)
|
||||
TITLE:=$(if $(3),$(3),JUCI $(2) plugin)
|
||||
DEPENDS:=$(4)
|
||||
endef
|
||||
|
||||
define Package/$(2)/install
|
||||
$(INSTALL_DIR) $$(1)/
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/$(2)/* $$(1)/
|
||||
endef
|
||||
endef
|
||||
|
||||
define RegisterAddon
|
||||
$(eval $(call RegisterAddonInner,$(1),$(2),$(3),$(4),$(5)))
|
||||
$(eval $(call BuildPackage,$(2)))
|
||||
endef
|
||||
|
||||
$(eval $(call RegisterAddon,Plugins,juci-catv, CATV Module,@(PACKAGE_catv)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-cgroups, CGroups Module,@(PACKAGE_icgroupd)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-ddns, DDNS Configuration,@(PACKAGE_ddns-scripts)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-diagnostics, Simple Diagnostics,@(PACKAGE_busybox)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-ndt, NDT Speed Test client,@(PACKAGE_ndt)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-dnsmasq-dhcp, DHCP/DNSMasq Configuration,@(PACKAGE_dnsmasq||PACKAGE_dnsmasq-full)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-dropbear, Dropbear Configuration,@(PACKAGE_dropbear)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-easyqos, Easy QoS module,@(PACKAGE_easy-qos)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-event, Event Module,@(PACKAGE_owsd)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-firewall-fw3, Firewall Configuration,@(PACKAGE_firewall)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-icwmp, TR-069 Module,@(PACKAGE_icwmp)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-config-backup, Config Backup Module))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-qos, QoS module,@(PACKAGE_qos-scripts)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-voice-client, Asterisk Voice Client Module,@(PACKAGE_asterisk)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-minidlna, MiniDLNA Configuration,@(PACKAGE_minidlna)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-mcproxy, Multicast Proxy Configuration,@(PACKAGE_mcproxy)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-mod-status, Status Reporting Module,@(PACKAGE_questd)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-mod-system, System Administration Module))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-mwan3, mwan3 Configuration,@(PACKAGE_mwan3)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-natalie-dect, DECT Module,@(PACKAGE_dectmngr2)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-netmode, Netmode Module,@(PACKAGE_netmode)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-network-device, Network Device Configuration,@(PACKAGE_netifd)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-network-dsl, DSL Module))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-network-netifd, Network Module,@(PACKAGE_netifd)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-network-port, Ethernet Port Configuration,@(PACKAGE_port-management)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-openvpn, OpenVPN configuration,@(PACKAGE_openvpn)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-owsd, OWSD configuration,@(PACKAGE_owsd)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-printer, p910nd Printer Server Configuration,@(PACKAGE_p910nd)))
|
||||
#$(eval $(call RegisterAddon,Plugins,juci-realtime-graphs, Realtime Graphs))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-samba, Samba Configuration,@(PACKAGE_samba3)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-sfp, SFP Configuration,@(PACKAGE_peripheral_manager)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-snmpd, SNMP Module,@(PACKAGE_snmpd)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-sysupgrade, Sysupgrade Firmware Upgrade,@(PACKAGE_rpcd-mod-rpcsys)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-uhttpd, uHTTPD Configuration,@(PACKAGE_uhttpd)))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-upnp, UPnP Configuration Module,@(PACKAGE_miniupnpd)))
|
||||
#$(eval $(call RegisterAddon,Plugins,juci-usb, USB Module))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-wireless, Wireless Management Module))
|
||||
$(eval $(call RegisterAddon,Plugins,juci-wifilife, WiFi Life Module,@(PACKAGE_wifilife)))
|
||||
$(eval $(call RegisterAddon,Themes,juci-theme-iopsys))
|
||||
|
||||
####### dynamically publish themes as packages #######
|
||||
$(foreach th,$(wildcard $(TOPDIR)/tmp/juci-themes/*),$(eval $(call RegisterAddon,Themes,$(notdir $(th)))))
|
||||
66
juci/files/etc/config/juci
Normal file
66
juci/files/etc/config/juci
Normal file
@@ -0,0 +1,66 @@
|
||||
config juci 'juci'
|
||||
option homepage 'overview'
|
||||
option theme 'juci-theme-iopsys'
|
||||
option favicon 'favicon.ico'
|
||||
|
||||
config login 'login'
|
||||
option showusername '1'
|
||||
option defaultuser 'user'
|
||||
|
||||
config localization 'localization'
|
||||
option default_language 'en'
|
||||
list languages 'en'
|
||||
|
||||
config wiki 'wiki'
|
||||
option visible '0'
|
||||
option version 'v4.2.x'
|
||||
|
||||
config widget
|
||||
list name 'overviewWidget11WAN'
|
||||
list require 'ubus:network.interface'
|
||||
|
||||
config widget
|
||||
list name 'overviewWidget10Network'
|
||||
list require 'ubus:network.interface'
|
||||
list require 'ubus:router.network->hosts'
|
||||
|
||||
config widget
|
||||
list name 'overviewWidget00WiFi'
|
||||
list require 'ubus:wifi'
|
||||
list require 'ubus:wifi.wps'
|
||||
|
||||
config menu
|
||||
option path 'overview'
|
||||
option page 'overview'
|
||||
|
||||
config menu
|
||||
option path 'system'
|
||||
option page 'system'
|
||||
option redirect 'first'
|
||||
|
||||
config menu
|
||||
option path 'status'
|
||||
option page 'status'
|
||||
option redirect 'first'
|
||||
|
||||
config menu
|
||||
option path 'status/system'
|
||||
option page 'status-system'
|
||||
list require 'ubus:router.system->info'
|
||||
|
||||
config menu
|
||||
option path 'status/network'
|
||||
option page 'status-network'
|
||||
list require 'ubus:network.interface'
|
||||
|
||||
config menu
|
||||
option path 'status/dsl'
|
||||
option page 'network-dsl-status'
|
||||
list require 'ubus:dsl->stats'
|
||||
list require 'ubus:dsl->status'
|
||||
|
||||
config menu
|
||||
option path 'system/upgrade'
|
||||
option page 'settings-upgrade'
|
||||
list expose 'admin'
|
||||
|
||||
41
juci/files/etc/init.d/juci
Executable file
41
juci/files/etc/init.d/juci
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
. /lib/functions.sh
|
||||
|
||||
START=94
|
||||
STOP=06
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=juci
|
||||
|
||||
start_service() {
|
||||
mkdir -p /tmp/juci
|
||||
touch /www/index.html.gz
|
||||
chmod 755 /www/cgi-bin/luci
|
||||
# this will simply update index.html to include any files that are for some reason not included
|
||||
# a good way to make sure all plugins are properly included at each boot
|
||||
config_load juci
|
||||
local theme
|
||||
config_get theme juci theme
|
||||
if [ "$theme" ]
|
||||
then
|
||||
if [ -f /www/themes/theme.js.gz ]
|
||||
then
|
||||
rm -f /www/themes/theme.js.gz
|
||||
fi
|
||||
if [ -f /www/themes/*$theme.js.gz ]
|
||||
then
|
||||
ln -s /www/themes/*$theme.js.gz /www/themes/theme.js.gz
|
||||
fi
|
||||
fi
|
||||
juci-update
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_stop /sbin/juci
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger juci
|
||||
}
|
||||
|
||||
49
juci/files/etc/uci-defaults/00-default-juci-rpcd-acl
Normal file
49
juci/files/etc/uci-defaults/00-default-juci-rpcd-acl
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
USER_SECTION=""
|
||||
USER_EXISTS=0
|
||||
|
||||
find_user(){
|
||||
local section="$1"
|
||||
local user="$2"
|
||||
config_get username $section username
|
||||
if [ "$username" == "$user" ]; then
|
||||
USER_SECTION="$section"
|
||||
USER_EXISTS=1
|
||||
fi
|
||||
}
|
||||
|
||||
config_load rpcd
|
||||
|
||||
USER_EXISTS=0
|
||||
config_foreach find_user login root
|
||||
if [ $USER_EXISTS -eq 1 ]; then
|
||||
uci delete rpcd.$USER_SECTION
|
||||
fi
|
||||
|
||||
USER_EXISTS=0
|
||||
config_foreach find_user login admin
|
||||
if [ $USER_EXISTS -eq 0 ]; then
|
||||
uci -q add rpcd login >/dev/null
|
||||
uci -q set rpcd.@login[-1].username="admin"
|
||||
uci -q set rpcd.@login[-1].password="\$p\$admin"
|
||||
uci -q add_list rpcd.@login[-1].read="enduser"
|
||||
uci -q add_list rpcd.@login[-1].read="administrator"
|
||||
uci -q add_list rpcd.@login[-1].write="enduser"
|
||||
uci -q add_list rpcd.@login[-1].write="administrator"
|
||||
fi
|
||||
|
||||
USER_EXISTS=0
|
||||
config_foreach find_user login user
|
||||
if [ $USER_EXISTS -eq 0 ]; then
|
||||
uci -q add rpcd login >/dev/null
|
||||
uci -q set rpcd.@login[-1].username="user"
|
||||
uci -q set rpcd.@login[-1].password="\$p\$user"
|
||||
uci -q add_list rpcd.@login[-1].read="enduser"
|
||||
uci -q add_list rpcd.@login[-1].write="enduser"
|
||||
fi
|
||||
|
||||
uci commit rpcd
|
||||
|
||||
21
juci/files/usr/share/rpcd/acl.d/administrator.json
Normal file
21
juci/files/usr/share/rpcd/acl.d/administrator.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"administrator": {
|
||||
"description": "Administrator Access Rights",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"file": [
|
||||
"write"
|
||||
],
|
||||
"rpc-sys": [
|
||||
"upgrade_start",
|
||||
"upgrade_test"
|
||||
]
|
||||
}
|
||||
},
|
||||
"write": {
|
||||
"file": {
|
||||
"/tmp/firmware.bin": ["write"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
217
juci/files/usr/share/rpcd/acl.d/enduser.json
Normal file
217
juci/files/usr/share/rpcd/acl.d/enduser.json
Normal file
@@ -0,0 +1,217 @@
|
||||
{
|
||||
"enduser": {
|
||||
"description": "End User Access Rights",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"dect": [
|
||||
"state",
|
||||
"handset",
|
||||
"status",
|
||||
"call"
|
||||
],
|
||||
"dsl": [
|
||||
"status",
|
||||
"stats"
|
||||
],
|
||||
"network.device": [
|
||||
"status"
|
||||
],
|
||||
"network.interface*": [
|
||||
"status",
|
||||
"dump",
|
||||
"up",
|
||||
"down"
|
||||
],
|
||||
"router.network": [
|
||||
"clients",
|
||||
"hosts",
|
||||
"dump"
|
||||
],
|
||||
"router.system": [
|
||||
"info",
|
||||
"memory",
|
||||
"filesystem",
|
||||
"process",
|
||||
"processes"
|
||||
],
|
||||
"session": [
|
||||
"access",
|
||||
"list",
|
||||
"destroy",
|
||||
"login"
|
||||
],
|
||||
"system": [
|
||||
"info",
|
||||
"board",
|
||||
"reboot"
|
||||
],
|
||||
"testnet": [
|
||||
"status"
|
||||
],
|
||||
"uci": [
|
||||
"*"
|
||||
],
|
||||
"voice.asterisk": [
|
||||
"status",
|
||||
"call_log",
|
||||
"platform",
|
||||
"supported_countries"
|
||||
],
|
||||
"wifi": [
|
||||
"status"
|
||||
],
|
||||
"wifi.ap.*": [
|
||||
"status",
|
||||
"stats",
|
||||
"assoclist",
|
||||
"stations"
|
||||
],
|
||||
"wifi.radio.*": [
|
||||
"status",
|
||||
"stats",
|
||||
"scan",
|
||||
"scanresults",
|
||||
"autochannel"
|
||||
],
|
||||
"wifi.wps": [
|
||||
"start",
|
||||
"stop",
|
||||
"status",
|
||||
"showpin"
|
||||
]
|
||||
},
|
||||
"uci": [
|
||||
"dhcp",
|
||||
"firewall",
|
||||
"juci",
|
||||
"network",
|
||||
"voice_client",
|
||||
"wireless"
|
||||
],
|
||||
"owsd": [
|
||||
"client",
|
||||
"wifi.radio",
|
||||
"wifi.sta",
|
||||
"wifi.wps"
|
||||
]
|
||||
},
|
||||
"write": {
|
||||
"uci": [
|
||||
"dhcp",
|
||||
"firewall",
|
||||
"network",
|
||||
"wireless"
|
||||
],
|
||||
"uci_granular": {
|
||||
"dhcp": [
|
||||
{
|
||||
"match": {
|
||||
".type": "dhcp"
|
||||
},
|
||||
"option": [
|
||||
"*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
".type": "host"
|
||||
},
|
||||
"option": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"firewall": [
|
||||
{
|
||||
"match": {
|
||||
".type": "settings",
|
||||
".name": "settings"
|
||||
},
|
||||
"option": [
|
||||
"disabled"
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
".type": "zone"
|
||||
},
|
||||
"option": [
|
||||
"masq",
|
||||
"name",
|
||||
"network"
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
".type": "redirect"
|
||||
},
|
||||
"option": [
|
||||
"*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
".type": "rule"
|
||||
},
|
||||
"option": [
|
||||
"*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
".type": "dmz"
|
||||
},
|
||||
"option": [
|
||||
"enabled",
|
||||
"host",
|
||||
"ip6addr"
|
||||
]
|
||||
}
|
||||
],
|
||||
"network": [
|
||||
{
|
||||
"match": {
|
||||
".type": "interface"
|
||||
},
|
||||
"option": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"wireless": [
|
||||
{
|
||||
"match": {
|
||||
".type": "wifi-status"
|
||||
},
|
||||
"option": [
|
||||
"wps"
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
".type": "wifi-iface",
|
||||
"mode": "ap"
|
||||
},
|
||||
"option": [
|
||||
"*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
".type": "wifi-device"
|
||||
},
|
||||
"option": [
|
||||
"channel"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"owsd": [
|
||||
"client",
|
||||
"wifi.radio",
|
||||
"wifi.sta",
|
||||
"wifi.wps"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-agent
|
||||
PKG_VERSION:=3.5.17
|
||||
PKG_VERSION:=3.5.20
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=09d80be1eb37f1a822dbf3f55aaa6806e09b192a
|
||||
PKG_SOURCE_VERSION:=f396b503f111461e7869f302907e1d9ec639ca3a
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
|
||||
84
map-agent/files/etc/hotplug.d/ethernet/map-loop-detection
Executable file
84
map-agent/files/etc/hotplug.d/ethernet/map-loop-detection
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/bin/sh
|
||||
|
||||
diff=0
|
||||
wan=$(uci -q get ports.WAN.ifname)
|
||||
|
||||
[ "$wan" == "" ] && exit 1 # no configuration
|
||||
[ "$PORT" != "$wan" ] && exit 0
|
||||
|
||||
get_bridge() {
|
||||
local id
|
||||
local ifname="$1"
|
||||
local bridge=""
|
||||
id=$(cat /sys/class/net/${ifname}/brport/bridge/bridge/bridge_id)
|
||||
|
||||
#echo "bridge id = $id" > /dev/console
|
||||
|
||||
[ "$id" = "" ] && return
|
||||
|
||||
bridge=$(brctl show | grep $id | cut -f1)
|
||||
|
||||
case "$bridge" in
|
||||
br-*)
|
||||
bridge=$(echo $bridge | cut -c4-)
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $bridge
|
||||
}
|
||||
|
||||
disable_bstas() {
|
||||
section="$1"
|
||||
|
||||
config_get mode "$section" mode "ap"
|
||||
config_get ifname "$section" ifname
|
||||
config_get device "$section" device
|
||||
#echo mode=$mode ifname=$ifname > /dev/console
|
||||
|
||||
[ "$mode" == "sta" ] || return
|
||||
|
||||
uci set wireless.$section.disabled=1
|
||||
bridge=$(get_bridge $ifname)
|
||||
if [ "$bridge" != "" ]; then
|
||||
#echo got bridge = $bridge > /dev/console
|
||||
ubus call network.interface.$bridge remove_device '{"name":"$ifname"}'
|
||||
fi
|
||||
ifconfig "$ifname" down
|
||||
|
||||
diff=1
|
||||
#echo disabled $ifname > /dev/console
|
||||
}
|
||||
|
||||
enable_bstas() {
|
||||
section="$1"
|
||||
config_load "wireless"
|
||||
|
||||
config_get mode "$section" mode "ap"
|
||||
config_get ifname "$section" ifname
|
||||
config_get device "$section" device
|
||||
#echo mode=$mode ifname=$ifname > /dev/console
|
||||
|
||||
[ "$mode" == "sta" ] || return
|
||||
|
||||
uci set wireless.$section.disabled=0
|
||||
ifconfig "$ifname" up
|
||||
|
||||
diff=1
|
||||
#echo enabled $ifname > /dev/console
|
||||
}
|
||||
|
||||
config_load "wireless"
|
||||
|
||||
if [ "$LINK" == "up" ]; then
|
||||
config_foreach disable_bstas wifi-iface
|
||||
else
|
||||
config_foreach enable_bstas wifi-iface
|
||||
fi
|
||||
|
||||
#echo diff = $diff > /dev/console
|
||||
|
||||
uci -q commit wireless
|
||||
[ "$diff" == "1" ] && {
|
||||
#echo reloading via uci > /dev/console
|
||||
ubus call uci commit '{"config":"wireless"}'
|
||||
}
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=2.4.11
|
||||
PKG_VERSION:=2.4.12
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=096882c4695e831668056049867c611831c5ccac
|
||||
PKG_SOURCE_VERSION:=e4d286f6348519de2613d4ba3548ec811c60ad7b
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -48,5 +48,11 @@ reload_service() {
|
||||
return
|
||||
fi
|
||||
|
||||
pidof "mapcontroller" > /dev/null
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
start
|
||||
return
|
||||
fi
|
||||
|
||||
procd_send_signal "mapcontroller"
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=map-topology
|
||||
PKG_VERSION:=1.5.20
|
||||
PKG_VERSION:=1.5.22
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_VERSION:=d542c50c81d09f553bdd36dd12fd9eb7618f4463
|
||||
PKG_SOURCE_VERSION:=f10842f576fc29f6c3145a4b4b0efcb931d0e643
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -16,10 +16,9 @@ start_service() {
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "ieee1905"
|
||||
procd_add_reload_trigger "network"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
procd_send_signal "topologyd"
|
||||
}
|
||||
|
||||
15
obuspa/Config.in
Normal file
15
obuspa/Config.in
Normal file
@@ -0,0 +1,15 @@
|
||||
if PACKAGE_obuspa
|
||||
|
||||
config OBUSPA_MTP_ENABLE_STOMP
|
||||
bool "Enable STOMP as mtp protocol"
|
||||
default y
|
||||
|
||||
config OBUSPA_MTP_ENABLE_MQTT
|
||||
bool "Enable MQTT as mtp protocol"
|
||||
default y
|
||||
|
||||
config OBUSPA_MTP_ENABLE_COAP
|
||||
bool "Enable CoAP as mtp protocol"
|
||||
default y
|
||||
|
||||
endif
|
||||
@@ -5,13 +5,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=3.0.0.25
|
||||
PKG_VERSION:=3.0.0.32
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=617c724d409bf8d44fb2bf7b4ac47bb6dfe6c0eb
|
||||
PKG_SOURCE_VERSION:=7afcb04746566f19478dfdb5dd922d57d9e60166
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
|
||||
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -29,17 +30,46 @@ define Package/obuspa
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=USP agent
|
||||
DEPENDS:=+libopenssl +libcurl +libsqlite3 +libubox +libubus +uspd +libmosquitto
|
||||
PKG_BUILD_DEPENDS:=+openssl +ubus +sqlite3 +curl +ubox +uci
|
||||
DEPENDS:=+libopenssl +libcurl +libsqlite3 +libubox +libubus +libmosquitto +uspd +libuci
|
||||
endef
|
||||
|
||||
define Package/obuspa/description
|
||||
OB-USP-AGENT is a system daemon providing a User Services Platform (USP) Agent.
|
||||
endef
|
||||
|
||||
define Package/obuspa/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(CONFIG_OBUSPA_MTP_ENABLE_STOMP),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-stomp
|
||||
else
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-stomp
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OBUSPA_MTP_ENABLE_MQTT),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-mqtt
|
||||
else
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-mqtt
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OBUSPA_MTP_ENABLE_COAP),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-coap
|
||||
else
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-coap
|
||||
endif
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/obuspa/* $(PKG_BUILD_DIR)/
|
||||
@@ -55,6 +85,7 @@ define Package/obuspa/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspa $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/obuspa $(1)/etc/init.d/
|
||||
$(INSTALL_DATA) ./files/etc/config/obuspa $(1)/etc/config/
|
||||
$(INSTALL_DATA) ./files/etc/obuspa/roles.json $(1)/etc/obuspa/roles.json
|
||||
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-obuspa $(1)/etc/hotplug.d/iface/
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
config obuspa 'global'
|
||||
option enabled 'true'
|
||||
option enabled '1'
|
||||
option interface 'wan'
|
||||
#option ifname 'eth0.1'
|
||||
option debug '0'
|
||||
option log_level '1'
|
||||
#option db_file '/tmp/usp.db'
|
||||
#option db_file '/etc/obuspa/usp.db'
|
||||
option role_file '/etc/obuspa/roles.json'
|
||||
#option trust_cert '/etc/obuspa/rootCA.pem'
|
||||
#option client_cert '/etc/obuspa/client.pem'
|
||||
#option log_dest '/var/log/obuspa'
|
||||
|
||||
config localagent 'localagent'
|
||||
option Enable 'true'
|
||||
option Enable '1'
|
||||
|
||||
# Adds Device.LocalAgent.Controller.
|
||||
config controller 'localcontroller'
|
||||
@@ -18,6 +19,7 @@ config controller 'localcontroller'
|
||||
option Protocol 'MQTT'
|
||||
option Topic '/usp/controller'
|
||||
option mqtt 'localmqtt'
|
||||
option assigned_role_name 'Full Access'
|
||||
|
||||
# Adds Device.LocalAgent.MTP.
|
||||
config mtp
|
||||
@@ -41,3 +43,18 @@ config subscription
|
||||
option Persistent 'true'
|
||||
option controller 'localcontroller'
|
||||
|
||||
config challenge 'admin'
|
||||
option Description 'Request to get Administrative access'
|
||||
option role_name 'Full Access'
|
||||
option Enable '1'
|
||||
option Value 'admin'
|
||||
option Retries 2
|
||||
option LockoutPeriod 60
|
||||
|
||||
config challenge 'user'
|
||||
option Description 'Request to get User access'
|
||||
option role_name 'user'
|
||||
option Enable '1'
|
||||
option Value 'user'
|
||||
option Retries 3
|
||||
option LockoutPeriod 30
|
||||
|
||||
@@ -5,7 +5,7 @@ USE_PROCD=1
|
||||
PROG=/usr/sbin/obuspa
|
||||
|
||||
EXTRA_COMMANDS="remove_db"
|
||||
EXTRA_HELP=" remove_db Removes obuspa persistent db before restarting"
|
||||
EXTRA_HELP=" remove_db Removes obuspa persistent db before restarting, self trigger with uci change"
|
||||
|
||||
PARAM_FILE="/tmp/obuspa_param_reset.txt"
|
||||
CONFIGURATION=obuspa
|
||||
@@ -16,9 +16,20 @@ mtp_num=0
|
||||
stomp_num=0
|
||||
mqtt_num=0
|
||||
subs_num=0
|
||||
challenge_num=0
|
||||
index=0
|
||||
role_def_file=""
|
||||
|
||||
. /lib/functions/network.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
cleanup() {
|
||||
if [ -f "${USP_TEMP_FILE}" ]; then
|
||||
rm -f "${USP_TEMP_FILE}"
|
||||
fi
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t obuspa -p debug
|
||||
@@ -39,6 +50,37 @@ get_index() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_role_index_from_json() {
|
||||
local role="${@}"
|
||||
|
||||
# In case of role is empty or file not present
|
||||
if [ -z "${role}" -o ! -f ${role_def_file} ]; then
|
||||
echo 0
|
||||
return 0
|
||||
fi
|
||||
|
||||
json_init
|
||||
json_load_file ${role_def_file}
|
||||
if [ $? -ne 0 ]; then # In case of invalid json file
|
||||
echo 0
|
||||
return 0
|
||||
fi
|
||||
|
||||
json_select roles
|
||||
json_get_keys roles_obj
|
||||
|
||||
for k in ${roles_obj}; do
|
||||
json_select $k
|
||||
json_get_var name name
|
||||
json_select ..
|
||||
if [ "${role}" = "${name}" ]; then
|
||||
echo "${k}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
echo 0
|
||||
}
|
||||
|
||||
get_uci_ref_index() {
|
||||
local val;
|
||||
|
||||
@@ -62,14 +104,15 @@ validate_obuspa_section()
|
||||
{
|
||||
uci_validate_section ${CONFIGURATION} obuspa "${1}" \
|
||||
'enabled:bool:true' \
|
||||
'trust_cert:string' \
|
||||
'client_cert:string' \
|
||||
'trust_cert:file' \
|
||||
'client_cert:file' \
|
||||
'interface:string' \
|
||||
'ifname:string:"br-lan"' \
|
||||
'debug:bool:false' \
|
||||
'log_level:uinteger' \
|
||||
'log_dest:string' \
|
||||
'db_file:string'
|
||||
'log_dest:file' \
|
||||
'db_file:file' \
|
||||
'role_file:file'
|
||||
}
|
||||
|
||||
validate_localagent_section()
|
||||
@@ -85,7 +128,8 @@ validate_controller_section()
|
||||
uci_validate_section ${CONFIGURATION} controller "${1}" \
|
||||
'EndpointID:string' \
|
||||
'Enable:bool:true' \
|
||||
'AssignedRole:string:Device.LocalAgent.ControllerTrust.Role.1' \
|
||||
'AssignedRole:string' \
|
||||
'assigned_role_name:string' \
|
||||
'PeriodicNotifInterval:uinteger:86400' \
|
||||
'PeriodicNotifTime:string' \
|
||||
'USPNotifRetryMinimumWaitInterval:uinteger:5' \
|
||||
@@ -95,9 +139,9 @@ validate_controller_section()
|
||||
'Reference:string' \
|
||||
'Destination:string:controller-notify-dest' \
|
||||
'Topic:string' \
|
||||
'coap_host:string' \
|
||||
'coap_host:host' \
|
||||
'coap_path:string' \
|
||||
'coap_port:uinteger' \
|
||||
'coap_port:port' \
|
||||
'mqtt:string' \
|
||||
'stomp:string'
|
||||
}
|
||||
@@ -124,7 +168,7 @@ validate_mtp_section()
|
||||
'PublishQoS:uinteger' \
|
||||
'Destination:string' \
|
||||
'coap_path:string' \
|
||||
'coap_port:uinteger' \
|
||||
'coap_port:port' \
|
||||
'mqtt:string' \
|
||||
'stomp:string'
|
||||
}
|
||||
@@ -132,12 +176,12 @@ validate_mtp_section()
|
||||
validate_stomp_connection_section()
|
||||
{
|
||||
uci_validate_section ${CONFIGURATION} stomp "${1}" \
|
||||
'Host:string:usp-controller.com' \
|
||||
'Host:host' \
|
||||
'Username:string' \
|
||||
'Password:string' \
|
||||
'encryption:bool:true' \
|
||||
'Enable:bool:true' \
|
||||
'Port:uinteger:61613' \
|
||||
'Port:port:61613' \
|
||||
'VirtualHost:string:/' \
|
||||
'EnableHeartbeats:bool:true' \
|
||||
'OutgoingHeartbeat:uinteger:30000' \
|
||||
@@ -150,13 +194,13 @@ validate_stomp_connection_section()
|
||||
validate_mqtt_client_section()
|
||||
{
|
||||
uci_validate_section ${CONFIGURATION} mqtt "${1}" \
|
||||
'BrokerAddress:string' \
|
||||
'BrokerPort:uinteger:1883' \
|
||||
'BrokerAddress:host' \
|
||||
'BrokerPort:port:1883' \
|
||||
'Enable:bool:true' \
|
||||
'Username:string' \
|
||||
'Password:string' \
|
||||
'ProtocolVersion:string:5.0' \
|
||||
'TransportProtocol:string:TCP/IP' \
|
||||
'ProtocolVersion:or("3.1", "3.1.1","5.0"):5.0' \
|
||||
'TransportProtocol:or("TCP/IP","TLS"):TCP/IP' \
|
||||
'KeepAliveTime:uinteger:60' \
|
||||
'ClientID:string' \
|
||||
'ConnectRetryTime:uinteger:5' \
|
||||
@@ -170,7 +214,7 @@ configure_localagent() {
|
||||
|
||||
validate_localagent_section 'localagent' || {
|
||||
log "Validation of localagent section failed"
|
||||
return 1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if [ -n "${EndpointID}" ]; then
|
||||
@@ -180,7 +224,6 @@ configure_localagent() {
|
||||
_num=1
|
||||
while [ ${_num} -le ${controller_num} ]
|
||||
do
|
||||
db_set Device.LocalAgent.Controller.${_num}.BootParameter.1.Alias "cpe-1"
|
||||
db_set Device.LocalAgent.Controller.${_num}.BootParameter.1.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.Controller.${_num}.BootParameter.1.ParameterName "${ParameterName}"
|
||||
_num=$(( ${_num} + 1 ))
|
||||
@@ -192,14 +235,14 @@ configure_localagent() {
|
||||
configure_controller() {
|
||||
local EndpointID Enable AssignedRole PeriodicNotifInterval PeriodicNotifTime USPNotifRetryMinimumWaitInterval
|
||||
local USPNotifRetryIntervalMultiplier ControllerCode Protocol Destination coap_host coap_path coap_port
|
||||
local Reference Topic mqtt stomp
|
||||
local Reference Topic mqtt stomp assigned_role_name
|
||||
|
||||
validate_controller_section "${1}" || {
|
||||
log "Validation of controller section failed"
|
||||
return 1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if [ -z ${EndpointID} -o -z ${Protocol} ]; then
|
||||
if [ -z "${EndpointID}" -o -z "${Protocol}" ]; then
|
||||
log "controller:: EndpointID id and Protocol cannot be empty"
|
||||
return 1;
|
||||
fi
|
||||
@@ -229,10 +272,17 @@ configure_controller() {
|
||||
|
||||
controller_num=$(( controller_num + 1 ))
|
||||
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.Alias "cpe-${controller_num}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.EndpointID "${EndpointID}"
|
||||
#db_set Device.LocalAgent.Controller.${controller_num}.AssignedRole "${AssignedRole}"
|
||||
if [ -n "${AssignedRole}" ]; then
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.AssignedRole "${AssignedRole}"
|
||||
else
|
||||
if [ -n "${assigned_role_name}" ]; then
|
||||
AssignedRole=$(get_role_index ${assigned_role_name})
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.AssignedRole "${AssignedRole}"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.PeriodicNotifInterval "${PeriodicNotifInterval}"
|
||||
if [ -n "${PeriodicNotifTime}" ]; then
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.PeriodicNotifTime "${PeriodicNotifTime}"
|
||||
@@ -243,7 +293,6 @@ configure_controller() {
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.USPNotifRetryIntervalMultiplier "${USPNotifRetryIntervalMultiplier}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.ControllerCode "${ControllerCode}"
|
||||
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.Alias "cpe-${controller_num}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.Protocol "${Protocol}"
|
||||
# only support configuration of one mtp path per controller using uci
|
||||
@@ -270,7 +319,7 @@ configure_subscription(){
|
||||
|
||||
validate_subscription_section "${1}" || {
|
||||
log "Validation of subscription section failed"
|
||||
return 1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if [ -z "${Recipient}" -a -z "${controller}" ]; then
|
||||
@@ -288,7 +337,6 @@ configure_subscription(){
|
||||
|
||||
subs_num=$(( subs_num + 1))
|
||||
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.Alias "cpe-${subs_num}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.ID "${ID}"
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.NotifType "${NotifType}"
|
||||
@@ -297,13 +345,81 @@ configure_subscription(){
|
||||
db_set Device.LocalAgent.Subscription.${subs_num}.Recipient "${Recipient}"
|
||||
}
|
||||
|
||||
validate_challenge_section()
|
||||
{
|
||||
uci_validate_section ${CONFIGURATION} challenge "${1}" \
|
||||
'Enable:bool:true' \
|
||||
'Alias:string' \
|
||||
'Description:string' \
|
||||
'role_name:string' \
|
||||
'Role:string' \
|
||||
'Value:string' \
|
||||
'Retries:uinteger:3' \
|
||||
'LockoutPeriod:uinteger:0'
|
||||
}
|
||||
|
||||
get_role_index() {
|
||||
local role="Device.LocalAgent.ControllerTrust.Role"
|
||||
local index=0
|
||||
local role_name="${@}"
|
||||
|
||||
case "${role_name}" in
|
||||
'Full Access')
|
||||
index=1;
|
||||
;;
|
||||
'Untrusted')
|
||||
index=2;
|
||||
;;
|
||||
*)
|
||||
local ji=$(get_role_index_from_json ${role_name})
|
||||
index=$(( ji + 2 )) # Add predefined roles
|
||||
esac
|
||||
|
||||
echo "${role}.${index}"
|
||||
}
|
||||
|
||||
configure_challenges() {
|
||||
local Enable Description role_name Role Value Retries LockoutPeriod Alias
|
||||
|
||||
validate_challenge_section "${1}" || {
|
||||
log "Validation of challenge section failed"
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if [ -z "${role_name}" -a -z ${Role} ]; then
|
||||
log "Either role_name or Role must defined for a challenge";
|
||||
return 1;
|
||||
fi
|
||||
|
||||
challenge_num=$(( challenge_num + 1))
|
||||
|
||||
db_set Device.LocalAgent.ControllerTrust.Challenge.${challenge_num}.Enable "${Enable}"
|
||||
if [ -n "${Description}" ]; then
|
||||
db_set Device.LocalAgent.ControllerTrust.Challenge.${challenge_num}.Description "${Description}"
|
||||
fi
|
||||
|
||||
if [ -z "${Role}" ]; then
|
||||
Role=$(get_role_index ${role_name})
|
||||
fi
|
||||
|
||||
if [ -z "${Alias}" -a -n "${role_name}" ]; then
|
||||
Alias=${role_name}
|
||||
fi
|
||||
|
||||
db_set Device.LocalAgent.ControllerTrust.Challenge.${challenge_num}.Alias "${Alias}"
|
||||
db_set Device.LocalAgent.ControllerTrust.Challenge.${challenge_num}.Role "${Role}"
|
||||
db_set Device.LocalAgent.ControllerTrust.Challenge.${challenge_num}.Value "${Value}"
|
||||
db_set Device.LocalAgent.ControllerTrust.Challenge.${challenge_num}.Retries "${Retries}"
|
||||
db_set Device.LocalAgent.ControllerTrust.Challenge.${challenge_num}.LockoutPeriod "${LockoutPeriod}"
|
||||
}
|
||||
|
||||
configure_mtp() {
|
||||
local Enable Protocol Reference ResponseTopicConfigured PublishQoS
|
||||
local stomp mqtt
|
||||
|
||||
validate_mtp_section "${1}" || {
|
||||
log "Validation of mtp section failed"
|
||||
return 1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if [ -z ${Reference} ]; then
|
||||
@@ -325,7 +441,6 @@ configure_mtp() {
|
||||
fi
|
||||
mtp_num=$(( mtp_num + 1 ))
|
||||
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.Alias "cpe-${mtp_num}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.Enable "${Enable}"
|
||||
db_set Device.LocalAgent.MTP.${mtp_num}.Protocol "${Protocol}"
|
||||
if [ "${Protocol}" = "MQTT" ]; then
|
||||
@@ -354,7 +469,7 @@ configure_stomp_connection() {
|
||||
|
||||
validate_stomp_connection_section "${1}" || {
|
||||
log "Validation of stomp section failed"
|
||||
return 1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
stomp_num=$(( stomp_num + 1 ))
|
||||
@@ -363,10 +478,9 @@ configure_stomp_connection() {
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Username "${Username}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Password "${Password}"
|
||||
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Alias "cpe-${stomp_num}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Enable "${Enable}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.Port "${Port}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.X_ARRIS-COM_EnableEncryption "${encryption}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.EnableEncryption "${encryption}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.VirtualHost "${VirtualHost}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.EnableHeartbeats "${EnableHeartbeats}"
|
||||
db_set Device.STOMP.Connection.${stomp_num}.OutgoingHeartbeat "${OutgoingHeartbeat}"
|
||||
@@ -383,7 +497,7 @@ configure_mqtt_client(){
|
||||
|
||||
validate_mqtt_client_section "${1}" || {
|
||||
log "Validation of mqtt section failed"
|
||||
return 1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if [ -z "${BrokerAddress}" ]; then
|
||||
@@ -393,7 +507,6 @@ configure_mqtt_client(){
|
||||
|
||||
mqtt_num=$(( mqtt_num + 1 ))
|
||||
|
||||
db_set Device.MQTT.Client.${mqtt_num}.Alias "cpe-${mqtt_num}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.Enable "${Enable}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.BrokerAddress "${BrokerAddress}"
|
||||
db_set Device.MQTT.Client.${mqtt_num}.BrokerPort "${BrokerPort}"
|
||||
@@ -412,13 +525,14 @@ configure_mqtt_client(){
|
||||
|
||||
|
||||
configure_obuspa() {
|
||||
local enabled trust_cert ifname interface debug log_level db_file log_dest
|
||||
local enabled trust_cert ifname interface debug log_level db_file log_dest role_file
|
||||
|
||||
validate_obuspa_section "global" || {
|
||||
log "Validation of global section failed"
|
||||
return 1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
role_def_file="${role_file}"
|
||||
[ ${enabled} -eq 0 ] && exit 0
|
||||
|
||||
if [ ${debug} -eq 1 ]; then
|
||||
@@ -483,6 +597,7 @@ db_init() {
|
||||
config_foreach configure_stomp_connection stomp
|
||||
config_foreach configure_mqtt_client mqtt
|
||||
config_foreach configure_subscription subscription
|
||||
config_foreach configure_challenges challenge
|
||||
|
||||
db_set Internal.Reboot.Cause "LocalFactoryReset"
|
||||
}
|
||||
|
||||
97
obuspa/files/etc/obuspa/roles.json
Normal file
97
obuspa/files/etc/obuspa/roles.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"roles": [
|
||||
{
|
||||
"name": "admin",
|
||||
"permission": [
|
||||
{
|
||||
"object": "Device.",
|
||||
"perm": [
|
||||
"PERMIT_NONE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "Device.DeviceInfo.",
|
||||
"perm": [
|
||||
"PERMIT_GET",
|
||||
"PERMIT_GET_INST"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "Device.WiFi.",
|
||||
"perm": [
|
||||
"PERMIT_GET",
|
||||
"PERMIT_SET",
|
||||
"PERMIT_ADD",
|
||||
"PERMIT_DEL",
|
||||
"PERMIT_OPER",
|
||||
"PERMIT_SUBS_VAL_CHANGE",
|
||||
"PERMIT_SUBS_OBJ_ADD",
|
||||
"PERMIT_SUBS_OBJ_DEL",
|
||||
"PERMIT_SUBS_EVT_OPER_COMP",
|
||||
"PERMIT_GET_INST",
|
||||
"PERMIT_OBJ_INFO",
|
||||
"PERMIT_CMD_INFO"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "Device.IP.",
|
||||
"perm": [
|
||||
"PERMIT_GET",
|
||||
"PERMIT_GET_INST"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "user",
|
||||
"permission": [
|
||||
{
|
||||
"object": "Device.",
|
||||
"perm": [
|
||||
"PERMIT_NONE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "Device.DeviceInfo.",
|
||||
"perm": [
|
||||
"PERMIT_GET",
|
||||
"PERMIT_GET_INST"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "Device.WiFi.",
|
||||
"perm": [
|
||||
"PERMIT_GET",
|
||||
"PERMIT_OPER",
|
||||
"PERMIT_SUBS_VAL_CHANGE",
|
||||
"PERMIT_SUBS_OBJ_ADD",
|
||||
"PERMIT_SUBS_OBJ_DEL",
|
||||
"PERMIT_SUBS_EVT_OPER_COMP",
|
||||
"PERMIT_GET_INST",
|
||||
"PERMIT_OBJ_INFO",
|
||||
"PERMIT_CMD_INFO"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "Device.IP.",
|
||||
"perm": [
|
||||
"PERMIT_GET",
|
||||
"PERMIT_GET_INST"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "undefined-1"
|
||||
},
|
||||
{
|
||||
"name": "undefined-2"
|
||||
},
|
||||
{
|
||||
"name": "undefined-3"
|
||||
},
|
||||
{
|
||||
"name": "undefined-4"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=peripheral_manager
|
||||
PKG_VERSION:=1.0.5
|
||||
PKG_VERSION:=1.0.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=d9c22221f6cb414126978c92295fdcc0885e3285
|
||||
PKG_SOURCE_VERSION:=785166a9861a119623556163179915727896156b
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/peripheral-manager
|
||||
|
||||
@@ -38,27 +38,15 @@ define Package/peripheral_manager
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Application deamon for handling of peripheral
|
||||
URL:=
|
||||
DEPENDS:=+libuci +libubus +libblobmsg-json @+PACKAGE_bcmkernel:bcmkernel PACKAGE_bcmkernel:bcmkernel
|
||||
DEPENDS:=+libuci +libubus +libblobmsg-json
|
||||
endef
|
||||
|
||||
define Package/peripheral_manager/description
|
||||
Application handling peripheral
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS := \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
|
||||
$(TARGET_CFLAGS)
|
||||
|
||||
PERIPHERAL_OPTONS:=-DSELECT_BRCM_BOARD=0
|
||||
|
||||
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
|
||||
PERIPHERAL_OPTONS:= -DSELECT_BRCM_BOARD=1
|
||||
endif
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DCMAKE_BUILD_TYPE:String="Release" \
|
||||
$(PERIPHERAL_OPTONS) \
|
||||
|
||||
define Package/peripheral_manager/install
|
||||
$(CP) ./files/* $(1)/
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=prj-unish
|
||||
PKG_VERSION:=0.2.0
|
||||
PKG_VERSION:=0.7.0
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=8df9d23366407f239946d64f539ad839f556a780
|
||||
PKG_SOURCE_VERSION:=595bd811428f4c1271cc8e2f61a9b6311f4672f0
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/prj-unish.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
@@ -46,10 +46,26 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
#$(INSTALL_DIR) $(STAGING_DIR)/usr/include
|
||||
#$(CP) $(PKG_BUILD_DIR)/src/cmdu.h $(STAGING_DIR)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/cmdu.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/lib*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map2.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map_module.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/lib*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
|
||||
define Package/prj-unish/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/lib*.so* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/i1905d $(1)/usr/sbin/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,prj-unish))
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rulengd
|
||||
PKG_VERSION:=1.2.1
|
||||
PKG_VERSION:=1.2.2
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/rulengd.git
|
||||
PKG_SOURCE_VERSION:=360b64ff1a2fe1ad578e298f63a7d6a350f99d93
|
||||
PKG_SOURCE_VERSION:=e5afe7734674d416138a54526cc589c57ba28279
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
@@ -27,7 +27,7 @@ include $(INCLUDE_DIR)/cmake.mk
|
||||
define Package/rulengd
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=RuleEngine daemon
|
||||
DEPENDS:=+ubox +uci +ubus +libjson-c +libeasy
|
||||
DEPENDS:=+ubox +uci +ubus +libjson-c
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=stunc
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_VERSION:=1.0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=74c8205a45a69572d0c6a2615e87c019c15f8972
|
||||
PKG_SOURCE_VERSION:=cd7c5d70bc97a2f1a26d5587ccf6f4c1e9ca82c8
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/stunc.git
|
||||
|
||||
@@ -41,8 +41,11 @@ TARGET_CFLAGS += \
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/stund $(1)/usr/sbin/
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/stunc $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/stunc $(1)/etc/init.d/stunc
|
||||
$(INSTALL_DATA) ./files/etc/config/stun $(1)/etc/config/stun
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@@ -8,7 +8,5 @@ config stun 'stun'
|
||||
option min_keepalive '30'
|
||||
option max_keepalive '3600'
|
||||
# option client_port 7547
|
||||
#if client_port option is not set or < 0 then use a random port for connection request source port
|
||||
#Log levels: Critical=0, Warning=1, Notice=2, Info=3, Debug=4
|
||||
option log_level '3'
|
||||
option log_level '0'
|
||||
|
||||
|
||||
67
stunc/files/etc/init.d/stunc
Executable file
67
stunc/files/etc/init.d/stunc
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# STUN client software
|
||||
# Copyright (C) 2020 iopsys Software Solutions AB
|
||||
# Author: Omar Kallel <omar.kallel@pivasoftware.com>
|
||||
|
||||
START=90
|
||||
|
||||
USE_PROCD=1
|
||||
PROG="/usr/sbin/stunc"
|
||||
|
||||
|
||||
log() {
|
||||
#echo "${@}" >/dev/console
|
||||
echo "${@}"|logger -t stun -p info
|
||||
}
|
||||
|
||||
validate_stun_section()
|
||||
{
|
||||
uci_validate_section stun stun stun \
|
||||
'enable:bool' \
|
||||
'Username:string' \
|
||||
'Password:string' \
|
||||
'server_address:host' \
|
||||
'server_port:port' \
|
||||
'client_port:port' \
|
||||
'log_level:uinteger:0'
|
||||
}
|
||||
|
||||
service_running() {
|
||||
ubus wait_for tr069
|
||||
return $?;
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local enable server_address
|
||||
|
||||
config_load stun
|
||||
validate_stun_section || {
|
||||
log "Validation failed for stun section";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if [ "$enable" -eq 0 ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
if [ -z "${server_address}" ]; then
|
||||
log "Stun server address not defined or invalid"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
procd_open_instance stun
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn "3" "7" "0"
|
||||
procd_close_instance
|
||||
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger stun
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# STUN client software
|
||||
# Copyright (C) 2020 iopsys Software Solutions AB
|
||||
# Author: Omar Kallel <omar.kallel@pivasoftware.com>
|
||||
|
||||
START=90
|
||||
|
||||
USE_PROCD=1
|
||||
PROG="/usr/sbin/stund"
|
||||
|
||||
start_service() {
|
||||
local enable=`uci -q get stun.stun.enable`
|
||||
if [ "$enable" == "1" ]; then
|
||||
local server=`uci -q get stun.stun.server_address`
|
||||
[ "$server" = "" ] && exit 0
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn "3" "7" "0"
|
||||
procd_close_instance
|
||||
fi
|
||||
}
|
||||
|
||||
boot() {
|
||||
start
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
logger -p crit -t "stun" "reloading service()"
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger stun
|
||||
}
|
||||
45
sulu/Makefile
Normal file
45
sulu/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright (C) 2021 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sulu
|
||||
PKG_VERSION:=0.2.1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/sulu.git
|
||||
PKG_SOURCE_VERSION:=a41d8edde15be3f22e358fb31e0b4786047dab53
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
|
||||
PKG_RELEASE=$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/sulu
|
||||
# $(Package/sulu/default)
|
||||
SECTION:=sulu
|
||||
CATEGORY:=Utilities
|
||||
MENU=1
|
||||
TITLE:=SULU-CE ReactJS based Web UI Package
|
||||
endef
|
||||
|
||||
define Package/sulu/description
|
||||
SULU-CE ReactJS based Web UI.
|
||||
endef
|
||||
|
||||
define Package/sulu/install
|
||||
$(INSTALL_DIR) $(1)/www
|
||||
$(CP) $(PKG_BUILD_DIR)/out/* $(1)/www
|
||||
# $(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,sulu))
|
||||
|
||||
@@ -11,7 +11,7 @@ PKG_VERSION:=1.0.0
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=c11c1057e8f7bd96934fce1eef07f96d8349f683
|
||||
PKG_SOURCE_VERSION:=891e8d36446c0b1e7999c5798375985b1804fcf1
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/urlfilter.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
@@ -44,9 +44,7 @@ endef
|
||||
endif
|
||||
|
||||
define Package/urlfilter/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/etc/init.d/urlfilter $(1)/etc/init.d/urlfilter
|
||||
$(INSTALL_DIR) $(1)/usr
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/urlfilter $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
2
urlfilter/files/etc/config/urlfilter
Normal file
2
urlfilter/files/etc/config/urlfilter
Normal file
@@ -0,0 +1,2 @@
|
||||
config globals globals
|
||||
option enable 1
|
||||
2
urlfilter/files/etc/init.d/urlfilter
Normal file → Executable file
2
urlfilter/files/etc/init.d/urlfilter
Normal file → Executable file
@@ -20,7 +20,7 @@ configure_firewall()
|
||||
}
|
||||
|
||||
start_service() {
|
||||
if [ -f "/etc/config/urlfilter" ]; then
|
||||
if [ "$(uci -q get urlfilter.globals.enable)" == "1" ]; then
|
||||
procd_open_instance urlfilter
|
||||
procd_set_param command ${PROG}
|
||||
configure_firewall
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wfadatad
|
||||
PKG_VERSION:=3.2.5
|
||||
PKG_VERSION:=3.3.1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=342467c23a42c9f8df17a66ac627d43297f90e69
|
||||
PKG_SOURCE_VERSION:=9d7e1fea212fc06d7a1d37a5a52d9a55be0c36f2
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=9.2.3
|
||||
PKG_VERSION:=9.3.2
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=cc2d9b3bc4a08ca5628272adba18f3eaffc429f2
|
||||
PKG_SOURCE_VERSION:=a3a5ed150a9d2f267f9a15e927fa030831807674
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
Reference in New Issue
Block a user