mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-25 03:24:14 +08:00
Compare commits
192 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2599967241 | ||
|
|
8779369d7b | ||
|
|
938583d960 | ||
|
|
c29427fd51 | ||
|
|
b19040d68e | ||
|
|
ecc459f34d | ||
|
|
66c9db511b | ||
|
|
66d3110ebe | ||
|
|
5560428dc6 | ||
|
|
2eed8f2684 | ||
|
|
f7919b2471 | ||
|
|
69633fce7c | ||
|
|
d666372df6 | ||
|
|
a21c4aea1e | ||
|
|
ff0d48571e | ||
|
|
004b2b47c2 | ||
|
|
a215b5975d | ||
|
|
cf0ea79c93 | ||
|
|
da1c09a3f5 | ||
|
|
1c8f80f93d | ||
|
|
5ff7522148 | ||
|
|
3b322ba3cb | ||
|
|
57a0b0bcca | ||
|
|
0836a0cc62 | ||
|
|
52c52247eb | ||
|
|
4d7d03950a | ||
|
|
1d52207a7f | ||
|
|
194978c7d2 | ||
|
|
931ae16fec | ||
|
|
8e63cdb53b | ||
|
|
65be93fb61 | ||
|
|
f9e105133a | ||
|
|
463c4f0855 | ||
|
|
aad4b455b2 | ||
|
|
961b2caaf9 | ||
|
|
fe97541f89 | ||
|
|
9c5b671627 | ||
|
|
7d47e904d1 | ||
|
|
09e4e7cde2 | ||
|
|
b334565e90 | ||
|
|
eb07e8868f | ||
|
|
728da91a8f | ||
|
|
26a44ab3e5 | ||
|
|
b1ba9c1826 | ||
|
|
eadb49e55c | ||
|
|
68a39be532 | ||
|
|
333fbe25b1 | ||
|
|
c83a88ceb6 | ||
|
|
ae3d22ab45 | ||
|
|
59285541e3 | ||
|
|
2f312659d8 | ||
|
|
659a36547b | ||
|
|
24700f6162 | ||
|
|
17d2905283 | ||
|
|
93e9c0e4cb | ||
|
|
df039df5b3 | ||
|
|
3a30ea8209 | ||
|
|
0e22871a96 | ||
|
|
650f941dfc | ||
|
|
d563bfa099 | ||
|
|
840670bf80 | ||
|
|
645a9d919f | ||
|
|
aea3f66f51 | ||
|
|
650957082a | ||
|
|
d893622fb3 | ||
|
|
b2a32dac16 | ||
|
|
0b353ab84e | ||
|
|
82d4fef6a6 | ||
|
|
cd3e774fb1 | ||
|
|
92a6b78786 | ||
|
|
c32ced2cfe | ||
|
|
e0be33b76a | ||
|
|
117c5224cc | ||
|
|
3917419263 | ||
|
|
a6047dadbf | ||
|
|
906307df05 | ||
|
|
e8a6ff899b | ||
|
|
3c60ea1eae | ||
|
|
4ac9dcbcf4 | ||
|
|
07a4f41116 | ||
|
|
e8fd9b654a | ||
|
|
a81973c7ec | ||
|
|
ab06c82297 | ||
|
|
1d5ca37f1e | ||
|
|
98170bdb79 | ||
|
|
e3e9147597 | ||
|
|
ec82e9de8f | ||
|
|
97306df0a9 | ||
|
|
a6abec5787 | ||
|
|
88cf2ea0c2 | ||
|
|
103bbebad0 | ||
|
|
75e0d5a481 | ||
|
|
c7b88666d8 | ||
|
|
22e014b587 | ||
|
|
d3e9574ccc | ||
|
|
eccfa20011 | ||
|
|
a4b44d7415 | ||
|
|
3384f5ae7f | ||
|
|
ce9ac288ff | ||
|
|
87df5f9117 | ||
|
|
9073b24182 | ||
|
|
2d1e46af5d | ||
|
|
82d37cefd5 | ||
|
|
48a036c8aa | ||
|
|
93eaaa0aa9 | ||
|
|
ca9ba7c9f8 | ||
|
|
063e270ec4 | ||
|
|
b5db57ba45 | ||
|
|
3db08a8ec8 | ||
|
|
75ec580e89 | ||
|
|
12a7183a32 | ||
|
|
73e4a225bb | ||
|
|
3a9685332d | ||
|
|
12609ec471 | ||
|
|
c2788f796d | ||
|
|
5433164b08 | ||
|
|
0144ce9606 | ||
|
|
c595f79545 | ||
|
|
4f0d7b0de4 | ||
|
|
ab0c5c06b2 | ||
|
|
63ee5d4091 | ||
|
|
e89af64b6b | ||
|
|
0ab812d222 | ||
|
|
06679bd124 | ||
|
|
141b0c32e7 | ||
|
|
9abc466d79 | ||
|
|
93064cadd4 | ||
|
|
fc82c65364 | ||
|
|
150b9bd694 | ||
|
|
5ccec170d9 | ||
|
|
86cc70f753 | ||
|
|
3a7e94e956 | ||
|
|
a2220489b3 | ||
|
|
c1363317ba | ||
|
|
667e0b1073 | ||
|
|
39733b6227 | ||
|
|
789d2e2a42 | ||
|
|
353b048596 | ||
|
|
5e50e59c46 | ||
|
|
fa134b86f8 | ||
|
|
1258a086bc | ||
|
|
a9d22d5e6b | ||
|
|
b3af9d3695 | ||
|
|
e83748b3e4 | ||
|
|
fea6fc95a0 | ||
|
|
ba1337720e | ||
|
|
1d9619dfd9 | ||
|
|
8f63a74197 | ||
|
|
482a88a65b | ||
|
|
351ca030d4 | ||
|
|
b306dffa63 | ||
|
|
baeaa7cc4c | ||
|
|
df9e651719 | ||
|
|
f8e7362648 | ||
|
|
378310828c | ||
|
|
1fa651ddd2 | ||
|
|
b5b88e6335 | ||
|
|
f59e3fa4bf | ||
|
|
6fdf16fc81 | ||
|
|
905423d589 | ||
|
|
a2cf8beaed | ||
|
|
d3bf187a66 | ||
|
|
0afa6e264c | ||
|
|
45e33d565a | ||
|
|
e6bc413a9b | ||
|
|
b3c28656a7 | ||
|
|
7e70ce6c5d | ||
|
|
92fafa4245 | ||
|
|
50c3c52edd | ||
|
|
01fd665c51 | ||
|
|
3409632353 | ||
|
|
0e4cf8941d | ||
|
|
7d5d9f4fd2 | ||
|
|
6445cba038 | ||
|
|
595de81dff | ||
|
|
67e42d5efd | ||
|
|
12000972d7 | ||
|
|
e83347616c | ||
|
|
8d2bdd90fd | ||
|
|
fef609fb46 | ||
|
|
169c157cbd | ||
|
|
048546b175 | ||
|
|
a17f3718af | ||
|
|
70855e0a4f | ||
|
|
9c4ede538b | ||
|
|
e16d6d9b5b | ||
|
|
f656693f25 | ||
|
|
d065eef18c | ||
|
|
d2511509ef | ||
|
|
85fcb1f033 | ||
|
|
074f459bea | ||
|
|
0650265216 |
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=asterisk18-mod
|
||||
PKG_VERSION:=1.8.10.1
|
||||
|
||||
PKG_SOURCE_VERSION:=ffa46ba1d5abf22fa83d0bd06ea56fe8e638dd43
|
||||
PKG_SOURCE_VERSION:=015d279241d0ac5d8c1321aa6f78b9ae551575d1
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/asterisk-1.8.x
|
||||
|
||||
@@ -19,7 +19,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)-$(PKG_RELEASE).tar.
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/ltqtapi.mk
|
||||
-include $(INCLUDE_DIR)/ltqtapi.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/asterisk18-mod/Default
|
||||
@@ -392,6 +392,9 @@ CONFIGURE_ARGS+= \
|
||||
--with-sounds-cache="$(DL_DIR)" \
|
||||
--disable-xmldoc
|
||||
|
||||
# I've had strange errors with -fno-caller-saves
|
||||
# in global CFLAGS so revert it. /Ronny
|
||||
EXTRA_CFLAGS+= -O2 -fcaller-saves
|
||||
EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
|
||||
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.0.24
|
||||
PKG_VERSION:=1.0.23
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=6ba403663bc9cfdb8f89fb34de367f0796d68552
|
||||
PKG_SOURCE_VERSION:=90aff0da98c626d58201c14c34b3b3a64878ceee
|
||||
PKG_NAME:=dectmngr
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -11,14 +11,10 @@ PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.1.0
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=a51f8ed1b9178262777f73f7c275d3962f829c8a
|
||||
PKG_SOURCE_VERSION:=ee63f0c087840adba9d944ae31d71a3ef9d64043
|
||||
PKG_NAME:=dectmngr2
|
||||
|
||||
|
||||
LDFLAGS+= \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/lib
|
||||
|
||||
RSTRIP:=true
|
||||
export BUILD_DIR
|
||||
|
||||
@@ -41,11 +37,17 @@ endef
|
||||
|
||||
|
||||
define Package/dectmngr2/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/dect/
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
|
||||
cp $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/bin/
|
||||
cp $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/nvs_default $(1)/etc/dect/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
|
||||
$(CP) ./files/dect.config $(1)/etc/config/dect
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dectmngr2))
|
||||
|
||||
4
dectmngr2/files/dect.config
Normal file
4
dectmngr2/files/dect.config
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
config dect 'dect'
|
||||
option radio 'auto'
|
||||
|
||||
4
endptcfg/Config.in
Normal file
4
endptcfg/Config.in
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
config ENDPT_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
@@ -56,6 +56,10 @@ define Package/endptcfg/description
|
||||
Broadcom endpoint driver configuration application
|
||||
endef
|
||||
|
||||
define Package/endptcfg/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_ENDPT_OPEN),y)
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
|
||||
3
gigaset-elements/.gitignore
vendored
Normal file
3
gigaset-elements/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
git-src
|
||||
|
||||
65
gigaset-elements/Makefile
Normal file
65
gigaset-elements/Makefile
Normal file
@@ -0,0 +1,65 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gigaset-elements
|
||||
|
||||
PKG_VERSION:=2.4.2
|
||||
# PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_GIGASET_ELEMENTS_SRC_URL ?= git@public.inteno.se:gigaset-elements.git
|
||||
PKG_GIGASET_ELEMENTS_VERSION ?= v$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE_URL:=$(PKG_GIGASET_ELEMENTS_SRC_URL)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=$(PKG_GIGASET_ELEMENTS_VERSION)
|
||||
|
||||
|
||||
PKG_MAINTAINER:=Magier Marcin, Figlarek Piotr
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
######################################################
|
||||
|
||||
define Package/gigaset-elements
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libjson-c +libcurl
|
||||
TITLE:=Gigaset elements
|
||||
endef
|
||||
|
||||
######################################################
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) all
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/gigaset-elements/install
|
||||
$(CP) -r $(PKG_BUILD_DIR)/sysroot_common/* $(1)/
|
||||
$(CP) -r $(PKG_BUILD_DIR)/sysroot_$(CONFIG_ARCH)/* $(1)/
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/gigaset-elements/preinst
|
||||
#!/bin/sh
|
||||
mkdir -p $${IPKG_INSTROOT}/usr/gigaset/data/cert
|
||||
mkdir -p $${IPKG_INSTROOT}/usr/gigaset/data/fw
|
||||
endef
|
||||
|
||||
|
||||
define Package/gigaset-elements/postrm
|
||||
#!/bin/sh
|
||||
rm -rf $${IPKG_INSTROOT}/usr/gigaset/data
|
||||
rm -rf /usr/share/gigaset
|
||||
endef
|
||||
|
||||
|
||||
######################################################
|
||||
|
||||
$(eval $(call BuildPackage,gigaset-elements))
|
||||
|
||||
4
ice-client/Config.in
Normal file
4
ice-client/Config.in
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
config ICE_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
@@ -16,26 +16,26 @@ export PLATFORM_INCLUDE:=platforms/iopsys/build.mk
|
||||
export DATE:=$(shell date +%Y-%m-%d-%H-%M-%S)
|
||||
export LOGIN:=$(shell whoami)
|
||||
BASE_PKG_VERSION:=3.4.1
|
||||
PKG_RELEASE:=RC9
|
||||
PKG_RELEASE:=RC11
|
||||
PKG_VERSION:=$(BASE_PKG_VERSION)-$(PKG_RELEASE)_$(DATE)_$(LOGIN)
|
||||
export PKG_VERSION
|
||||
|
||||
###########################--RELEASE--################################
|
||||
|
||||
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
|
||||
PKG_SOURCE_VERSION:=d3065ee24d72d3fffd5ff75b617bf54fb5377561
|
||||
PKG_SOURCE_VERSION:=184d29446fe6103f567c968bf35569625326a82c
|
||||
ifeq ($(CONFIG_ICE_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_KERNEL_PROFILE)-$(BASE_PKG_VERSION)$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
#PKG_NAME:=ice-client-open
|
||||
else
|
||||
PKG_SOURCE_URL:=ssh://git@private.inteno.se/ice-client.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:ice-client.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BASE_PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(BASE_PKG_VERSION)-$(PKG_RELEASE).tar.gz
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BASE_PKG_VERSION)
|
||||
endif
|
||||
|
||||
|
||||
@@ -53,7 +53,11 @@ define Package/ice-client
|
||||
$(call Package/ice-client/Default)
|
||||
TITLE:=ice-client
|
||||
MENU:=1
|
||||
DEPENDS:=+libopenssl +libstdcpp +libubus +ubus +ubusd +jshn +libubox
|
||||
DEPENDS:=+libopenssl +libstdcpp +libubus +ubus +ubusd +jshn +libubox +libpthread
|
||||
endef
|
||||
|
||||
define Package/ice-client/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
###########################--DEVELOPMENT--################################
|
||||
@@ -136,7 +140,7 @@ define Package/ice-client/install
|
||||
$(CP) $(PKG_BUILD_DIR)/core/ice $(1)/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/modules/system/ubusevent/obj/iopsys/ubusevent $(1)/bin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/core/lib/{systemService.so.1.0.1,libconfStore.so.1,networkService.so.1.0.1,packageService.so.1.0.1,monitorService.so.1.0.1,iperfService.so.1.0.1,logService.so.1.0.1} $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/core/lib/{systemService.so.1.0.1,libconfStore.so.1,networkService.so.1.0.1,packageService.so.1.0.1,monitorService.so.1.0.1,iperfService.so.1.0.1,logService.so.1.0.1,texecService.so.1.0.1} $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/wsice/obj/iopsys/libwsice.so $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/bin/ifs/iperf/execute
|
||||
$(INSTALL_DIR) $(1)/bin/ifs/iperf/progress
|
||||
@@ -162,8 +166,8 @@ cp /tmp/iopsysserver.ini /etc/iopsys/server.ini
|
||||
rm -f /tmp/iopsysserver.ini
|
||||
cp /tmp/ice.back /etc/config/ice
|
||||
rm -f /tmp/ice.back
|
||||
if [ -f "/etc/rc.d/S99ice-client" ]; then
|
||||
/etc/init.d/ice-client start
|
||||
if [ -f "/etc/rc.d/S98ice-client" ]; then
|
||||
/etc/init.d/ice-client restart
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
@@ -482,7 +486,7 @@ endef
|
||||
define Package/ice-client-fileme
|
||||
$(call Package/ice-client/Default)
|
||||
TITLE:=FileMe
|
||||
DEPENDS+= +lighttpd +samba2-client
|
||||
DEPENDS+= +lighttpd +lighttpd-mod-webdav +lighttpd-mod-setenv +lighttpd-mod-userdir +samba2-client +samba2-common +libpcre +libltdl +libxml2
|
||||
endef
|
||||
|
||||
define Package/ice-client-fileme/description
|
||||
@@ -883,6 +887,55 @@ fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# texec
|
||||
define Package/ice-client-texec
|
||||
$(call Package/ice-client/Default)
|
||||
TITLE:=texec
|
||||
DEPENDS+=
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/description
|
||||
remote script execution module for ice-client
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/prerm
|
||||
#!/bin/sh
|
||||
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
|
||||
PROC_ID=$$(cat /tmp/ice.pid)
|
||||
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
|
||||
if [ -n "$$PROC_EXISTS" ]; then
|
||||
read -t 1 <>/tmp/cfout
|
||||
echo "system moduleRemove topic=texec" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/preinst
|
||||
#!/bin/sh
|
||||
if [ ! -f "/tmp/ice.pid" ] ; then exit 0 ; fi
|
||||
PROC_ID=$$(cat /tmp/ice.pid)
|
||||
PROC_EXISTS=$$(/usr/bin/pgrep -P $${PROC_ID})
|
||||
if [ -n "$$PROC_EXISTS" ]; then
|
||||
read -t 1 <>/tmp/cfout
|
||||
echo "system moduleRemove topic=tExecMgr" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/core/lib/texecService.so.1.0.1 $(1)/usr/lib
|
||||
endef
|
||||
|
||||
define Package/ice-client-texec/postinst
|
||||
#!/bin/sh
|
||||
read -t 1 <>/tmp/cfout
|
||||
if [ -f /tmp/ice.pid ]; then
|
||||
echo "system moduleAdd file=texecService.so.1.0.1" package="ice-client-texec" > /tmp/cfin
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# bmspeedtest
|
||||
define Package/ice-client-bcmspeedmgr
|
||||
$(call Package/ice-client/Default)
|
||||
@@ -931,5 +984,6 @@ $(eval $(call BuildPackage,ice-client-rework))
|
||||
$(eval $(call BuildPackage,ice-client-sip))
|
||||
$(eval $(call BuildPackage,ice-client-monitor))
|
||||
$(eval $(call BuildPackage,ice-client-gigaset))
|
||||
$(eval $(call BuildPackage,ice-client-texec))
|
||||
$(eval $(call BuildPackage,ice-client-bcmspeedmgr))
|
||||
endif
|
||||
|
||||
46
icgroupd/Makefile
Normal file
46
icgroupd/Makefile
Normal file
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# Copyright (C) 2016 Inteno Broadband AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icgroupd
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=0
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_MAINTAINER:=Inteno Broadband AB
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/icgroupd
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Inteno cgroup daemon
|
||||
DEPENDS:=+uci +busybox
|
||||
endef
|
||||
|
||||
define Package/icgroupd/description
|
||||
This package contains Intenos cgroup daemon and associated
|
||||
configuration and startup scripts.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/icgroupd/install
|
||||
$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d $(1)/etc/config
|
||||
|
||||
$(INSTALL_CONF) ./files/cgroups.config $(1)/etc/config/cgroups
|
||||
$(INSTALL_BIN) ./files/cgroups.init $(1)/etc/init.d/cgroups
|
||||
$(INSTALL_BIN) ./files/cgroupd $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,icgroupd))
|
||||
|
||||
76
icgroupd/files/cgroupd
Executable file
76
icgroupd/files/cgroupd
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
|
||||
CGBASEDIR=$1
|
||||
CGCONFIG=$2
|
||||
[ -n "$CGBASEDIR" -a -n "$CGCONFIG" ] || exit 1
|
||||
|
||||
[ -r /lib/functions.sh ] || exit 1
|
||||
. /lib/functions.sh
|
||||
|
||||
CGPROCMAP=/tmp/cgprocmap
|
||||
CGPERIOD=3s
|
||||
|
||||
DBGLOG=/tmp/cgroupd.log
|
||||
DEBUG=0
|
||||
|
||||
|
||||
add_to_procmap () {
|
||||
local name_grp=$1
|
||||
local name grp
|
||||
|
||||
name=$(echo $name_grp |awk -F= '{print $1}')
|
||||
grp=$(echo $name_grp |awk -F= '{print $2}')
|
||||
|
||||
echo "($name) $grp" >> $CGPROCMAP
|
||||
}
|
||||
|
||||
# Read configuration file and create process:group look-up table
|
||||
# in /tmp file
|
||||
read_config () {
|
||||
local enab
|
||||
|
||||
config_load $CGCONFIG
|
||||
|
||||
config_get enab cgroups enabled "1"
|
||||
[ $enab -eq 0 ] && exit 1
|
||||
|
||||
config_get CGDEFGROUP cgroups defgroup "_undef_"
|
||||
[ "$CGDEFGROUP" == "_undef_" ] && exit 1
|
||||
[ "$DEBUG" == "1" ] && echo "default $CGDEFGROUP" >> $DBGLOG
|
||||
|
||||
echo -n '' > $CGPROCMAP
|
||||
config_list_foreach procmap procmap add_to_procmap
|
||||
[ "$DEBUG" == "1" ] && cat $CGPROCMAP >> $DBGLOG
|
||||
}
|
||||
|
||||
# Move all process except init from cgroup root to cgroups according
|
||||
# to /tmp look-up table
|
||||
move_wild_procs () {
|
||||
local wild_procs=$(cat $CGBASEDIR/cgroup.procs)
|
||||
local pid name grp
|
||||
|
||||
for pid in $wild_procs; do
|
||||
|
||||
[ $pid -eq 1 ] && continue
|
||||
if [ -d /proc/$pid ]; then
|
||||
|
||||
name=$(awk '{print $2}' /proc/$pid/stat)
|
||||
grp=$(awk "\$1==\"$name\" {print \$2}" $CGPROCMAP)
|
||||
|
||||
[ "$grp" == "." ] && continue
|
||||
[ -n "$grp" ] || grp=$CGDEFGROUP
|
||||
|
||||
[ "$DEBUG" == "1" ] && \
|
||||
echo "Moving proc $pid $name to $grp" >> $DBGLOG
|
||||
echo $pid > $CGBASEDIR/$grp/cgroup.procs
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
[ "$DEBUG" == "1" ] && echo "$0 started $(date)" >> $DBGLOG
|
||||
read_config
|
||||
while true; do
|
||||
move_wild_procs
|
||||
sleep $CGPERIOD
|
||||
done
|
||||
48
icgroupd/files/cgroups.config
Normal file
48
icgroupd/files/cgroups.config
Normal file
@@ -0,0 +1,48 @@
|
||||
config cgroups cgroups
|
||||
option enabled 1
|
||||
option defgroup iopsys/normal
|
||||
|
||||
config cgroup _root_
|
||||
# list option cpu.rt_runtime_us=50000
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys
|
||||
list option cpu.shares=4096
|
||||
# list option cpu.rt_runtime_us=40000
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys_normal
|
||||
list option cpu.shares=1024
|
||||
# list option cpu.rt_runtime_us=10000
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys_high
|
||||
list option cpu.shares=4096
|
||||
# list option cpu.rt_runtime_us=30000
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt
|
||||
list option cpu.shares=1024
|
||||
# list option cpu.rt_runtime_us=10000
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt_normal
|
||||
list option cpu.shares=1024
|
||||
# list option cpu.rt_runtime_us=2500
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt_high
|
||||
list option cpu.shares=4096
|
||||
# list option cpu.rt_runtime_us=7500
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config procmap procmap
|
||||
list procmap kthreadd=.
|
||||
list procmap minidlna=3prt/normal
|
||||
|
||||
93
icgroupd/files/cgroups.init
Executable file
93
icgroupd/files/cgroups.init
Executable file
@@ -0,0 +1,93 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=01
|
||||
USE_PROCD=1
|
||||
PROCD_DEBUG=1
|
||||
NAME=cgroupd
|
||||
|
||||
CGBASEDIR=/sys/fs/cgroup
|
||||
CGCONFIG="cgroups"
|
||||
|
||||
DBGLOG=/tmp/cginit.log
|
||||
DEBUG=0
|
||||
|
||||
|
||||
cgroupinit_set_knob_value () {
|
||||
local knob_val=$1
|
||||
local dir=$2
|
||||
local knob val
|
||||
|
||||
knob=$(echo $knob_val |awk -F= '{print $1}')
|
||||
val=$(echo $knob_val |awk -F= '{print $2}')
|
||||
/bin/echo $val > $CGBASEDIR/$dir/$knob
|
||||
[ "$DEBUG" == "1" ] && \
|
||||
echo "/bin/echo $val > $CGBASEDIR/$dir/$knob (ret=$?)" >> $DBGLOG
|
||||
}
|
||||
|
||||
cgroupinit_create_group () {
|
||||
local cgrp=$1
|
||||
local dir
|
||||
|
||||
[ "$DEBUG" == "1" ] && echo "Create group $cgrp:" >> $DBGLOG
|
||||
if [ "$cgrp" == "_root_" ]; then
|
||||
dir=.
|
||||
else
|
||||
dir=$(echo $cgrp |tr '_' '/')
|
||||
|
||||
if [ ! -d $CGBASEDIR/$dir ]; then
|
||||
mkdir $CGBASEDIR/$dir
|
||||
[ "$DEBUG" == "1" ] && \
|
||||
echo "mkdir $CGBASEDIR/$dir (ret=$?)" >> $DBGLOG
|
||||
fi
|
||||
fi
|
||||
|
||||
config_list_foreach $cgrp option cgroupinit_set_knob_value $dir
|
||||
}
|
||||
|
||||
cgroupinit_configure_cgroups () {
|
||||
local enab defgrp
|
||||
|
||||
[ "$DEBUG" == "1" ] && echo "$0 started $(date)" >> $DBGLOG
|
||||
config_load $CGCONFIG
|
||||
|
||||
config_get enab cgroups enabled "1"
|
||||
[ $enab -eq 0 ] && return 1
|
||||
|
||||
config_get defgrp cgroups defgroup "_undef_"
|
||||
[ "$defgrp" == "_undef_" ] && return 1
|
||||
|
||||
if ! grep -q " $CGBASEDIR cgroup " /proc/mounts; then
|
||||
mount -t cgroup -o nodev,noexec,nosuid cgroup $CGBASEDIR
|
||||
[ $? -eq 0 ] || return 1
|
||||
fi
|
||||
|
||||
config_foreach cgroupinit_create_group cgroup
|
||||
return 0
|
||||
}
|
||||
|
||||
start_service () {
|
||||
cgroupinit_configure_cgroups
|
||||
[ $? -eq 0 ] || return
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command /sbin/cgroupd $CGBASEDIR $CGCONFIG
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service () {
|
||||
local cgdir procs prc
|
||||
|
||||
for cgdir in $(find $CGBASEDIR -type d -mindepth 1 -depth); do
|
||||
procs=$(cat $cgdir/cgroup.procs)
|
||||
for prc in $procs; do
|
||||
echo $prc > $CGBASEDIR/cgroup.procs
|
||||
done
|
||||
rmdir $cgdir
|
||||
done
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger $CGCONFIG
|
||||
}
|
||||
|
||||
@@ -15,10 +15,31 @@ config CWMP_ACS_HDM
|
||||
bool "HDM"
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Select Data Model"
|
||||
default tr098
|
||||
|
||||
config DATAMODEL_TR098
|
||||
bool "TR-098"
|
||||
|
||||
config DATAMODEL_TR181
|
||||
bool "TR-181"
|
||||
endchoice
|
||||
|
||||
config CWMP_DEBUG
|
||||
bool "Compile with debug options"
|
||||
default y
|
||||
|
||||
choice
|
||||
prompt "enable xmpp feature"
|
||||
default disable
|
||||
|
||||
config XMPP_DISABLE
|
||||
bool "disable"
|
||||
|
||||
config XMPP_ENABLE
|
||||
bool "enable"
|
||||
endchoice
|
||||
config CWMP_DEVEL_DEBUG
|
||||
bool "Compile with development debug options"
|
||||
default n
|
||||
|
||||
11
icwmp/Makefile
Normal file → Executable file
11
icwmp/Makefile
Normal file → Executable file
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=3.0-2016-03-14
|
||||
PKG_VERSION:=3.0-2016-07-07
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=dd333f6ce85bbc66bfbd00f10dbbcade6a6d236a
|
||||
PKG_SOURCE_VERSION:=6fac1df3418d727388162d5e006c7a756c9ff8d2
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
@@ -34,7 +34,7 @@ define Package/icwmp/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=CWMP client
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libexpat +curl
|
||||
endef
|
||||
|
||||
define Package/icwmp/description
|
||||
@@ -68,7 +68,7 @@ endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE -D_AADJ
|
||||
|
||||
|
||||
ifneq ($(CWMP_REVISION)_,_)
|
||||
ifneq ($(CWMP_REVISION),exported)
|
||||
ifneq ($(CWMP_REVISION),Unversioned directory)
|
||||
@@ -86,6 +86,9 @@ CONFIGURE_ARGS += \
|
||||
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
|
||||
--with-libubus-include-path=$(STAGING_DIR)/usr/include
|
||||
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_DATAMODEL_TR181),--enable-datamodel=tr181,--enable-datamodel=tr098)
|
||||
CONFIGURE_ARGS += $(if $(CONFIG_XMPP_ENABLE),--enable-xmpp=enable,--enable-xmpp=disable)
|
||||
|
||||
ifeq ($(BUILD_VARIANT),zstream)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-http=zstream \
|
||||
|
||||
34
iop/Makefile
Normal file
34
iop/Makefile
Normal file
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=iop
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/iop
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=iop utilities
|
||||
endef
|
||||
|
||||
define Package/iop/description
|
||||
This package contains Intenos Iop utilities
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/iop/install
|
||||
true
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,iop))
|
||||
194
iop/configs/config
Normal file
194
iop/configs/config
Normal file
@@ -0,0 +1,194 @@
|
||||
CONFIG_BUILD_NLS=y
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_CCACHE=y
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_DEVEL=y
|
||||
CONFIG_LOCALMIRROR="http://mirror.inteno.se/mirror"
|
||||
CONFIG_PACKAGE_4g-support=y
|
||||
CONFIG_PACKAGE_6in4=y
|
||||
CONFIG_PACKAGE_6rd=y
|
||||
CONFIG_PACKAGE_6to4=y
|
||||
CONFIG_PACKAGE_6tunnel=y
|
||||
CONFIG_PACKAGE_alsa-lib=y
|
||||
CONFIG_PACKAGE_bind-host=y
|
||||
CONFIG_PACKAGE_chat=y
|
||||
CONFIG_PACKAGE_comgt=y
|
||||
CONFIG_PACKAGE_crashlog=y
|
||||
CONFIG_PACKAGE_ddns-scripts=y
|
||||
CONFIG_PACKAGE_ds-lite=y
|
||||
CONFIG_PACKAGE_gdb=m
|
||||
CONFIG_PACKAGE_gdbserver=m
|
||||
CONFIG_PACKAGE_getopt=y
|
||||
CONFIG_PACKAGE_glib2=y
|
||||
CONFIG_PACKAGE_ice-client=y
|
||||
CONFIG_PACKAGE_ice-client-camerawatch=m
|
||||
CONFIG_PACKAGE_ice-client-fileme=m
|
||||
CONFIG_PACKAGE_ice-client-gigaset=m
|
||||
CONFIG_PACKAGE_ice-client-guest=m
|
||||
CONFIG_PACKAGE_ice-client-iperf=m
|
||||
CONFIG_PACKAGE_ice-client-logreader=m
|
||||
CONFIG_PACKAGE_ice-client-monitor=m
|
||||
CONFIG_PACKAGE_ice-client-netrounds=m
|
||||
CONFIG_PACKAGE_ice-client-rshell=m
|
||||
CONFIG_PACKAGE_ice-client-texec=m
|
||||
# CONFIG_PACKAGE_icgroupd is not set
|
||||
CONFIG_PACKAGE_icwmp-curl=y
|
||||
CONFIG_PACKAGE_iperf-mt=y
|
||||
CONFIG_PACKAGE_ipset=y
|
||||
CONFIG_PACKAGE_iup=y
|
||||
CONFIG_PACKAGE_iwatchdog=y
|
||||
CONFIG_PACKAGE_juci=y
|
||||
CONFIG_PACKAGE_juci-broadcom-dsl=y
|
||||
CONFIG_PACKAGE_juci-broadcom-ethernet=y
|
||||
CONFIG_PACKAGE_juci-broadcom-iptv=y
|
||||
CONFIG_PACKAGE_juci-broadcom-pwrmgmt=y
|
||||
CONFIG_PACKAGE_juci-broadcom-vlan=y
|
||||
CONFIG_PACKAGE_juci-broadcom-wl=y
|
||||
CONFIG_PACKAGE_juci-broadcom-xdsl=y
|
||||
CONFIG_PACKAGE_juci-ddns=y
|
||||
CONFIG_PACKAGE_juci-diagnostics=y
|
||||
CONFIG_PACKAGE_juci-dnsmasq-dhcp=y
|
||||
CONFIG_PACKAGE_juci-dropbear=y
|
||||
CONFIG_PACKAGE_juci-ethernet=y
|
||||
CONFIG_PACKAGE_juci-event=y
|
||||
CONFIG_PACKAGE_juci-firewall-fw3=y
|
||||
CONFIG_PACKAGE_juci-icwmp=y
|
||||
CONFIG_PACKAGE_juci-igmpinfo=y
|
||||
CONFIG_PACKAGE_juci-inteno-backup=y
|
||||
CONFIG_PACKAGE_juci-inteno-multiwan=y
|
||||
CONFIG_PACKAGE_juci-inteno-provisioning=y
|
||||
CONFIG_PACKAGE_juci-inteno-router=y
|
||||
CONFIG_PACKAGE_juci-inteno-qos=y
|
||||
CONFIG_PACKAGE_juci-inteno-voice-client=y
|
||||
CONFIG_PACKAGE_juci-macdb=y
|
||||
CONFIG_PACKAGE_juci-minidlna=y
|
||||
CONFIG_PACKAGE_juci-mod-status=y
|
||||
CONFIG_PACKAGE_juci-mod-system=y
|
||||
CONFIG_PACKAGE_juci-natalie-dect=y
|
||||
CONFIG_PACKAGE_juci-netmode=y
|
||||
CONFIG_PACKAGE_juci-network-netifd=y
|
||||
CONFIG_PACKAGE_juci-printer=y
|
||||
CONFIG_PACKAGE_juci-samba=y
|
||||
CONFIG_PACKAGE_juci-simple-gui=y
|
||||
CONFIG_PACKAGE_juci-snmpd=y
|
||||
CONFIG_PACKAGE_juci-sysupgrade=y
|
||||
CONFIG_PACKAGE_juci-theme-inteno=y
|
||||
CONFIG_PACKAGE_juci-ubus-core=y
|
||||
CONFIG_PACKAGE_juci-upnp=y
|
||||
CONFIG_PACKAGE_juci-usb=y
|
||||
CONFIG_PACKAGE_juci-utils=y
|
||||
# CONFIG_PACKAGE_kmod-ipt-nathelper is not set
|
||||
CONFIG_PACKAGE_kmod-nls-base=y
|
||||
CONFIG_PACKAGE_kmod-siit=y
|
||||
CONFIG_PACKAGE_layer2interface=y
|
||||
CONFIG_PACKAGE_ldd=y
|
||||
# CONFIG_PACKAGE_libcgroup=y
|
||||
# CONFIG_PACKAGE_libcgroup-daemon=y
|
||||
CONFIG_PACKAGE_libdaemon=y
|
||||
CONFIG_PACKAGE_libffmpeg-mini=y
|
||||
CONFIG_PACKAGE_libgmp=y
|
||||
CONFIG_PACKAGE_libreadline=y
|
||||
CONFIG_PACKAGE_minidlna=y
|
||||
CONFIG_PACKAGE_miniupnpd=y
|
||||
CONFIG_PACKAGE_mtd-utils=y
|
||||
CONFIG_PACKAGE_mtd-utils-deubinize=y
|
||||
CONFIG_PACKAGE_mtd-utils-imagewrite=y
|
||||
CONFIG_PACKAGE_mtd-utils-mkfs.jffs2=y
|
||||
CONFIG_PACKAGE_mtd-utils-nanddump=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubiattach=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubidetach=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubimkvol=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubinfo=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubirmvol=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubirsvol=y
|
||||
CONFIG_PACKAGE_mtd-utils-ubiupdatevol=y
|
||||
CONFIG_PACKAGE_multiwan=y
|
||||
CONFIG_PACKAGE_ndisc6=y
|
||||
CONFIG_PACKAGE_netcheck=y
|
||||
CONFIG_PACKAGE_ntfs-3g=y
|
||||
CONFIG_PACKAGE_odhcp6c=y
|
||||
CONFIG_PACKAGE_odhcpd=y
|
||||
CONFIG_PACKAGE_openssl-util=y
|
||||
CONFIG_PACKAGE_openvpn-easy-rsa=y
|
||||
CONFIG_PACKAGE_openvpn-openssl=y
|
||||
CONFIG_PACKAGE_p910nd=y
|
||||
CONFIG_PACKAGE_peripheral_manager=y
|
||||
CONFIG_PACKAGE_port-management=y
|
||||
CONFIG_PACKAGE_power-management=y
|
||||
CONFIG_PACKAGE_ppp-mod-pppoa=y
|
||||
CONFIG_PACKAGE_ppp-mod-pppol2tp=y
|
||||
CONFIG_PACKAGE_ppp-multilink=y
|
||||
CONFIG_PACKAGE_qos-scripts=y
|
||||
CONFIG_PACKAGE_qrencode=y
|
||||
CONFIG_PACKAGE_questd=y
|
||||
CONFIG_PACKAGE_rdisc6=y
|
||||
CONFIG_PACKAGE_rdnssd=y
|
||||
CONFIG_PACKAGE_resolveip=y
|
||||
CONFIG_PACKAGE_rpcd=y
|
||||
CONFIG_PACKAGE_samba3=y
|
||||
CONFIG_PACKAGE_samba3-nmbd=y
|
||||
CONFIG_PACKAGE_snmpd=y
|
||||
CONFIG_PACKAGE_strace=y
|
||||
CONFIG_PACKAGE_tc=y
|
||||
CONFIG_PACKAGE_tcpdump=y
|
||||
CONFIG_PACKAGE_terminfo=y
|
||||
CONFIG_PACKAGE_tptest=y
|
||||
CONFIG_PACKAGE_traceroute6=y
|
||||
CONFIG_PACKAGE_usb-modeswitch=y
|
||||
CONFIG_PACKAGE_usbreset=y
|
||||
CONFIG_PACKAGE_xl2tpd=y
|
||||
CONFIG_PACKAGE_zoneinfo-core=y
|
||||
CONFIG_PACKAGE_zoneinfo-europe=y
|
||||
CONFIG_TARGET_CUSTOMER="INT"
|
||||
CONFIG_TARGET_ROOTFS_JFFS2=y
|
||||
CONFIG_TARGET_ROOTFS_TARGZ=y
|
||||
# CONFIG_USE_SSTRIP is not set
|
||||
CONFIG_USE_STRIP=y
|
||||
CONFIG_BUILD_LOG=y
|
||||
CONFIG_BUSYBOX_CONFIG_ADDUSER=y
|
||||
CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y
|
||||
CONFIG_BUSYBOX_CONFIG_DELUSER=y
|
||||
# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q=y
|
||||
CONFIG_BUSYBOX_CONFIG_FIRST_SYSTEM_ID=100
|
||||
CONFIG_BUSYBOX_CONFIG_HTTPD=y
|
||||
CONFIG_BUSYBOX_CONFIG_INSMOD=y
|
||||
CONFIG_BUSYBOX_CONFIG_LAST_SYSTEM_ID=999
|
||||
CONFIG_BUSYBOX_CONFIG_LOGIN=y
|
||||
CONFIG_BUSYBOX_CONFIG_LSMOD=y
|
||||
CONFIG_BUSYBOX_CONFIG_LSPCI=y
|
||||
CONFIG_BUSYBOX_CONFIG_LSUSB=y
|
||||
CONFIG_BUSYBOX_CONFIG_MICROCOM=y
|
||||
CONFIG_BUSYBOX_CONFIG_RMMOD=y
|
||||
CONFIG_BUSYBOX_CONFIG_STTY=y
|
||||
CONFIG_BUSYBOX_CONFIG_TASKSET=y
|
||||
CONFIG_BUSYBOX_CONFIG_TFTP=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_2_4_MODULES is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_AUTH_MD5=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CGI=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_PROXY=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_NOLOGIN is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_SECURETTY=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y
|
||||
CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
|
||||
# CONFIG_BUSYBOX_CONFIG_LOGIN_SCRIPTS is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_PAM is not set
|
||||
# CONFIG_BUSYBOX_CONFIG_TFTP_DEBUG is not set
|
||||
CONFIG_LIBCURL_CRYPTO_AUTH=y
|
||||
CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y
|
||||
# CONFIG_SAMBA3_CONFIG_NO_PRINTING is not set
|
||||
38
iop/configs/luci.diff
Executable file
38
iop/configs/luci.diff
Executable file
@@ -0,0 +1,38 @@
|
||||
CONFIG_PACKAGE_luci=y
|
||||
CONFIG_PACKAGE_luci-mod-admin-core=y
|
||||
CONFIG_PACKAGE_luci-mod-admin-full=y
|
||||
CONFIG_PACKAGE_luci-app-ddns=y
|
||||
CONFIG_PACKAGE_luci-app-dslstats=y
|
||||
CONFIG_PACKAGE_luci-app-firewall=y
|
||||
CONFIG_PACKAGE_luci-app-iup=y
|
||||
CONFIG_PACKAGE_luci-app-mcpd=y
|
||||
CONFIG_PACKAGE_luci-app-minidlna=y
|
||||
CONFIG_PACKAGE_luci-app-multiwan=y
|
||||
CONFIG_PACKAGE_luci-app-p910nd=y
|
||||
CONFIG_PACKAGE_luci-app-parental-control=y
|
||||
CONFIG_PACKAGE_luci-app-port-management=y
|
||||
CONFIG_PACKAGE_luci-app-power-mgmt=y
|
||||
CONFIG_PACKAGE_luci-app-samba=y
|
||||
CONFIG_PACKAGE_luci-app-sfp=y
|
||||
CONFIG_PACKAGE_luci-app-snmp=y
|
||||
CONFIG_PACKAGE_luci-app-speedtest=y
|
||||
CONFIG_PACKAGE_luci-app-upnp=y
|
||||
CONFIG_PACKAGE_luci-app-voice=y
|
||||
CONFIG_PACKAGE_luci-theme-base=y
|
||||
CONFIG_PACKAGE_luci-theme-bootstrap=y
|
||||
CONFIG_PACKAGE_luci-i18n-english=y
|
||||
CONFIG_PACKAGE_luci-proto-3g=y
|
||||
CONFIG_PACKAGE_luci-proto-4g=y
|
||||
CONFIG_PACKAGE_luci-proto-core=y
|
||||
CONFIG_PACKAGE_luci-proto-ipv6=y
|
||||
CONFIG_PACKAGE_luci-proto-ppp=y
|
||||
CONFIG_PACKAGE_luci-sgi-cgi=y
|
||||
CONFIG_PACKAGE_luci-lib-core=y
|
||||
CONFIG_PACKAGE_luci-lib-core_source=y
|
||||
CONFIG_PACKAGE_luci-lib-ipkg=y
|
||||
CONFIG_PACKAGE_luci-lib-json=y
|
||||
CONFIG_PACKAGE_luci-lib-nixio=y
|
||||
CONFIG_PACKAGE_luci-lib-nixio_notls=y
|
||||
CONFIG_PACKAGE_luci-lib-sys=y
|
||||
CONFIG_PACKAGE_luci-lib-web=y
|
||||
|
||||
42
iop/scripts/cfe_upgrade.sh
Normal file
42
iop/scripts/cfe_upgrade.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
# this is a developer helper script to install firmware on a remote host running in CFE mode
|
||||
|
||||
function usage {
|
||||
echo "usage: $0 cfe_upgrade <host> <file>"
|
||||
}
|
||||
|
||||
function cfe_upgrade {
|
||||
if [ -z "$1" ] ; then
|
||||
usage
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
usage
|
||||
echo "Error: firmware filename required"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -e $2 ] ; then
|
||||
usage
|
||||
echo "Error: firmware file does not exist"
|
||||
exit 1
|
||||
fi
|
||||
IMAGE=`basename $2`
|
||||
echo "CFE upgrade host: $1 with file $IMAGE"
|
||||
[ "$2" ] && [ -e "$2" ] && curl -i -F filedata=@$2 http://$1/upload.cgi && echo "upgrade done!"
|
||||
}
|
||||
|
||||
register_command "cfe_upgrade" "<host> <file> Install firmware on remote host in CFE mode"
|
||||
|
||||
function cfe_upgrade_latest {
|
||||
if [ -z "$1" ] ; then
|
||||
echo "usage: $0 cfe_upgrade_latest <host>"
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
{ cd `dirname $0`
|
||||
IMAGE=`ls -Art bin/*/*.w | tail -n1`
|
||||
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop cfe_upgrade $1 $IMAGE
|
||||
}
|
||||
}
|
||||
|
||||
register_command "cfe_upgrade_latest" "<host> Install latest firmware on remote host in CFE mode"
|
||||
63
iop/scripts/feeds_update.sh
Executable file
63
iop/scripts/feeds_update.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#! /bin/bash
|
||||
|
||||
function feeds_update {
|
||||
|
||||
developer=0
|
||||
|
||||
git remote -v | grep -q http || developer=1
|
||||
|
||||
#while getopts "d" opt; do
|
||||
# case $opt in
|
||||
# d)
|
||||
# developer=1
|
||||
# ;;
|
||||
# \?)
|
||||
# echo "Invalid option: -$OPTARG" >&2
|
||||
# exit 1
|
||||
# ;;
|
||||
# esac
|
||||
#done
|
||||
|
||||
cp .config .genconfig_config_bak
|
||||
|
||||
rm -rf package/feeds
|
||||
|
||||
#if -d argument is passed, clone feeds with ssh instead of http
|
||||
if [ $developer == 1 ]; then
|
||||
./scripts/feeds update -g
|
||||
else
|
||||
./scripts/feeds update
|
||||
fi
|
||||
|
||||
|
||||
./scripts/feeds install -f -p feed_inteno_openwrt -a
|
||||
./scripts/feeds install -f -p feed_inteno_juci -a
|
||||
./scripts/feeds install -f -p feed_inteno_packages -a
|
||||
./scripts/feeds install -f -p feed_inteno_broadcom -a
|
||||
./scripts/feeds install -f -p feed_inteno_targets iopsys-brcm63xx-mips
|
||||
./scripts/feeds install -f -p feed_inteno_targets iopsys-brcm63xx-arm
|
||||
./scripts/feeds install -a
|
||||
./scripts/feeds uninstall asterisk18
|
||||
./scripts/feeds uninstall zstream
|
||||
./scripts/feeds uninstall mtd-utils
|
||||
./scripts/feeds install -f -p feed_inteno_packages mtd-utils
|
||||
./scripts/feeds uninstall qrencode
|
||||
./scripts/feeds install -f -p feed_inteno_packages qrencode
|
||||
|
||||
rm -rf package/feeds/oldpackages/libzstream # have to run this for now since uninstall is not working every time
|
||||
|
||||
cp .genconfig_config_bak .config
|
||||
make defconfig
|
||||
|
||||
# record when we last run this script
|
||||
touch tmp/.iop_bootstrap
|
||||
|
||||
# always return true
|
||||
exit 0
|
||||
}
|
||||
|
||||
register_command "feeds_update" "Update feeds to point to commit hashes from feeds.conf"
|
||||
|
||||
|
||||
|
||||
|
||||
262
iop/scripts/genconfig.sh
Executable file
262
iop/scripts/genconfig.sh
Executable file
@@ -0,0 +1,262 @@
|
||||
#!/bin/bash
|
||||
|
||||
function genconfig {
|
||||
export CLEAN=0
|
||||
export IMPORT=0
|
||||
export SRCTREEOVERR=0
|
||||
export FILEDIR="files/"
|
||||
export CONFIGPATH="package/feeds/feed_inteno_packages/iop/configs"
|
||||
export CUSTCONF="customerconfigs"
|
||||
export VERBOSE=0
|
||||
export DEVELOPER=0
|
||||
export TMPDIR="/tmp/builder/"
|
||||
LOCAL_MIRROR="http://mirror.inteno.se/mirror"
|
||||
|
||||
iopsys_brcm63xx_mips="cg300 cg301 dg150 dg150v2 dg150alv2 dg200 dg200al dg301 dg301al eg300 vg50 vox25"
|
||||
iopsys_brcm63xx_arm="dg400"
|
||||
target="bogus"
|
||||
|
||||
set_target() {
|
||||
|
||||
local profile=$1
|
||||
|
||||
for p in $iopsys_brcm63xx_mips; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_mips"
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $iopsys_brcm63xx_arm; do
|
||||
if [ $p == $profile ]; then
|
||||
target="iopsys_brcm63xx_arm"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
git remote -v | grep -q http || {
|
||||
DEVELOPER=1
|
||||
|
||||
bcmAllowed=0
|
||||
iceAllowed=0
|
||||
endptAllowed=0
|
||||
natalieAllowed=0
|
||||
|
||||
allowedRepos="$(ssh -o ConnectTimeout=5 git@private.inteno.se 2>/dev/null | grep -w 'R\|W' | awk '{print$NF}')"
|
||||
for repo in $allowedRepos; do
|
||||
case $repo in
|
||||
bcmkernel) bcmAllowed=1 ;;
|
||||
ice-client) iceAllowed=1 ;;
|
||||
endptcfg) endptAllowed=1 ;;
|
||||
natalie-dect*) natalieAllowed=1 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
v() {
|
||||
[ "$VERBOSE" -ge 1 ] && echo "$@"
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo
|
||||
echo 1>&2 "Usage: $0 [OPTIONS] BoardConfig Customerconfig"
|
||||
echo
|
||||
echo " -c, remove all files under ./files and import from config "
|
||||
echo " -v, verbose"
|
||||
echo " -u, Update customer config before applying"
|
||||
echo " -p, set profile (if exists)"
|
||||
echo " -t, use latest git tag and number of commits since as version for the build"
|
||||
echo " -s, enable 'Package source tree override'"
|
||||
echo
|
||||
echo "BoardConfig ex "
|
||||
ls -1 configs
|
||||
if [ -d "$CUSTCONF/$1" ]; then
|
||||
echo "Customerconfig ex"
|
||||
ls $CUSTCONF/*
|
||||
fi
|
||||
echo
|
||||
echo "Example ./genconfig vg50 TELIA"
|
||||
echo "(if no customerconfig is chosen the Inteno Config will be used)"
|
||||
echo
|
||||
exit 127
|
||||
}
|
||||
|
||||
use_local_mirror()
|
||||
{
|
||||
if wget -T 3 -t 2 -O /dev/null $LOCAL_MIRROR >/dev/null 2>/dev/null
|
||||
then
|
||||
echo "mirror [$LOCAL_MIRROR] exists. Using local mirror"
|
||||
sed -i "s;CONFIG_LOCALMIRROR=.*;CONFIG_LOCALMIRROR=\"$LOCAL_MIRROR\";" .config
|
||||
else
|
||||
echo "mirror [$LOCAL_MIRROR] does not exist. Not using local mirror"
|
||||
fi
|
||||
}
|
||||
|
||||
generate_config()
|
||||
{
|
||||
DIFFFILE="$1"
|
||||
MASTERFILE="$2"
|
||||
while read p; do
|
||||
v "$p"
|
||||
sed -r -i "$p" $MASTERFILE
|
||||
done < $DIFFFILE
|
||||
}
|
||||
|
||||
setup_dirs()
|
||||
{
|
||||
if [ $DEVELOPER -eq 1 ]; then
|
||||
if [ ! -d "$CUSTCONF" ]; then
|
||||
git clone git@private.inteno.se:customerconfigs
|
||||
elif [ $IMPORT -eq 1 ]; then
|
||||
cd customerconfigs
|
||||
v "git pull"
|
||||
git pull
|
||||
cd ..
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -d "$FILEDIR" ]; then
|
||||
mkdir $FILEDIR
|
||||
elif [ -d "$FILEDIR" -a $CLEAN -eq 1 ]; then
|
||||
v "rm -rf $FILEDIR*"
|
||||
rm -rf $FILEDIR*
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
create_and_copy_files()
|
||||
{
|
||||
local BOARDTYPE=$1
|
||||
local CUSTOMER=$2
|
||||
|
||||
# Validate seleced board and customer
|
||||
set_target $BOARDTYPE
|
||||
if [ $target == "bogus" ]; then
|
||||
echo "Hardware profile does not exist"
|
||||
exit 1
|
||||
elif [ -n "$CUSTOMER" -a ! -d "$CUSTCONF/$BOARDTYPE/$CUSTOMER/" ]; then
|
||||
echo "Customer profile does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clean base-file package to force rebuild when changing profile
|
||||
make package/base-files/clean
|
||||
|
||||
# Base config on master
|
||||
v "Config $BOARDTYPE selected"
|
||||
v "cp $CONFIGPATH/config .config"
|
||||
cp $CONFIGPATH/config .config
|
||||
|
||||
# Apply profile diff to master config if selected
|
||||
if [ -n "$PROFILE" ]; then
|
||||
if [ -e "$CONFIGPATH/$PROFILE.diff" ]; then
|
||||
cat $CONFIGPATH/$PROFILE.diff >> .config
|
||||
elif [ "$PROFILE" == "juci" ]; then
|
||||
v "Default profile (juci) is selected."
|
||||
else
|
||||
echo "ERROR: profile $PROFILE does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
v "No profile selected! Using default."
|
||||
fi
|
||||
|
||||
# Set target and profile
|
||||
echo "CONFIG_TARGET_${target}=y" >> .config
|
||||
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
|
||||
|
||||
# Add customerconfig diff if a customer is selected
|
||||
if [ -n "$CUSTOMER" ]; then
|
||||
echo "$BOARDTYPE $CUSTOMER" > .current_config_file
|
||||
if [ -d "$CUSTCONF/$BOARDTYPE/$CUSTOMER/fs" ]; then
|
||||
v "cp -rLp $CUSTCONF/$BOARDTYPE/$CUSTOMER/fs/* $FILEDIR"
|
||||
cp -rLp $CUSTCONF/$BOARDTYPE/$CUSTOMER/fs/* $FILEDIR
|
||||
fi
|
||||
if [ -e "$CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff" ]; then
|
||||
v "Apply $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff"
|
||||
cat $CUSTCONF/$BOARDTYPE/$CUSTOMER/$BOARDTYPE.diff >> .config
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set target version
|
||||
local GIT_TAG=$(git describe --abbrev=0 --tags)
|
||||
echo "CONFIG_TARGET_VERSION=\"${GIT_TAG}\"" >> .config
|
||||
|
||||
|
||||
# Enable Pckage source tree override if selected
|
||||
[ $SRCTREEOVERR -eq 1 ] && \
|
||||
echo CONFIG_SRC_TREE_OVERRIDE=y >> .config
|
||||
|
||||
|
||||
# developer mode selected ?
|
||||
if [ $DEVELOPER -eq 1 ]; then
|
||||
# rewrite url to clone with ssh instead of http
|
||||
echo "CONFIG_GITMIRROR_REWRITE=y" >>.config
|
||||
[ $bcmAllowed -eq 0 ] && echo "CONFIG_BCM_OPEN=y" >> .config
|
||||
[ $iceAllowed -eq 0 ] && echo "CONFIG_ICE_OPEN=y" >> .config
|
||||
[ $endptAllowed -eq 0 ] && echo "CONFIG_ENDPT_OPEN=y" >> .config
|
||||
[ $natalieAllowed -eq 0 ] && echo "CONFIG_NATALIE_OPEN=y" >> .config
|
||||
else
|
||||
echo "CONFIG_BCM_OPEN=y" >> .config
|
||||
echo "CONFIG_ICE_OPEN=y" >> .config
|
||||
echo "CONFIG_ENDPT_OPEN=y" >> .config
|
||||
echo "CONFIG_NATALIE_OPEN=y" >> .config
|
||||
fi
|
||||
|
||||
# Set default values based on selected parameters
|
||||
make defconfig
|
||||
|
||||
# Temporary fixup for juci/luci profile
|
||||
if [ "$PROFILE" == "luci" ]; then
|
||||
sed -i '/CONFIG_DEFAULT_juci/d' .config
|
||||
sed -i '/CONFIG_PACKAGE_juci/d' .config
|
||||
sed -i '/CONFIG_PACKAGE_uhttpd/d' .config
|
||||
fi
|
||||
|
||||
echo Set version to $(grep -w CONFIG_TARGET_VERSION .config | cut -d'=' -f2 | tr -d '"')
|
||||
}
|
||||
|
||||
####### main #####
|
||||
if [ ! -e tmp/.iop_bootstrap ]; then
|
||||
echo "You have not installed feeds. Running genconfig in this state would create a non functional configuration."
|
||||
echo "Run: iop feeds_update"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo Current profile:
|
||||
cat .current_config_file
|
||||
echo "Try ./iop_get_config.sh -h' to get instructions if you want to change current config"
|
||||
exit 0
|
||||
else
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
|
||||
-c) export CLEAN=1;;
|
||||
-u) export IMPORT=1;;
|
||||
-v) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
-p) export PROFILE="$2"; shift;;
|
||||
-t) export USE_TAG=1;;
|
||||
-s) export SRCTREEOVERR=1;;
|
||||
-h) usage;;
|
||||
-*)
|
||||
echo "Invalid option: $1 "
|
||||
echo "Try -h' for more information."
|
||||
exit 1
|
||||
;;
|
||||
*) break;;
|
||||
esac
|
||||
shift;
|
||||
done
|
||||
[ -d $TMPDIR ] || mkdir $TMPDIR
|
||||
setup_dirs
|
||||
create_and_copy_files "$1" "$2"
|
||||
[ -d $TMPDIR ] && rm -rf $TMPDIR
|
||||
use_local_mirror
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
register_command "genconfig" "Generate configuration for board and customer"
|
||||
88
iop/scripts/generate_tarballs.sh
Executable file
88
iop/scripts/generate_tarballs.sh
Executable file
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
|
||||
build_bcmkernel_consumer() {
|
||||
local tarfile bcmkernelcommith
|
||||
bcmkernelcommith=$(grep -w "PKG_SOURCE_VERSION:" $curdir/feeds/feed_inteno_broadcom/bcmkernel/$sdkversion.mk | cut -d'=' -f2)
|
||||
# do not build bcmopen sdk if it was already built before
|
||||
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/bcmopen-$profile-$bcmkernelcommith.tar.gz" && return
|
||||
cd ./build_dir/target-*_uClibc-0.9.33.*/bcmkernel-3.4-$sdkversion/bcm963xx/release
|
||||
sh do_consumer_release -p $profile -y
|
||||
tarfile='out/bcm963xx_*_consumer.tar.gz'
|
||||
[ $(ls -1 $tarfile |wc -l) -ne 1 ] && echo "Too many tar files: '$tarfile'" && return
|
||||
scp $tarfile inteno@ihgsp.inteno.se:/home/inteno/public/www/iopsys/consumer/bcmopen-$profile-$bcmkernelcommith.tar.gz
|
||||
rm -f $tarfile
|
||||
cd $curdir
|
||||
}
|
||||
|
||||
build_natalie_consumer() {
|
||||
# create natalie-dect open version tar file
|
||||
local natalieversion nataliecommith
|
||||
grep -q "CONFIG_TARGET_NO_DECT=y" .config && return
|
||||
natalieversion=$(grep -w "PKG_VERSION:" ./feeds/feed_inteno_packages/natalie-dect/Makefile | cut -d'=' -f2)
|
||||
nataliecommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/feed_inteno_packages/natalie-dect/Makefile | cut -d'=' -f2)
|
||||
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz" && return
|
||||
cd ./build_dir/target-*_uClibc-0.9.33.*/natalie-dect-$natalieversion/
|
||||
mkdir natalie-dect-open-$natalieversion
|
||||
cp NatalieFpCvm6362/Src/Projects/NatalieV3/FpCvm/Linux6362/dects.ko natalie-dect-open-$natalieversion/dect.ko
|
||||
tar -czv natalie-dect-open-$natalieversion/ -f natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz
|
||||
scp natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz inteno@iopsys.inteno.se:/home/inteno/public/www/iopsys/consumer/
|
||||
cp natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz $curdir/
|
||||
rm -rf natalie-dect-open-$natalieversion
|
||||
rm -f natalie-dect-$profile-$natalieversion-$nataliecommith.tar.gz
|
||||
cd $curdir
|
||||
}
|
||||
|
||||
build_endptcfg_consumer() {
|
||||
# create endptcfg open version tar file
|
||||
local endptversion endptcommith
|
||||
grep -q "CONFIG_TARGET_NO_VOICE=y" .config && return
|
||||
endptversion=$(grep -w "PKG_VERSION:" ./feeds/feed_inteno_packages/endptcfg/Makefile | cut -d'=' -f2)
|
||||
endptcommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/feed_inteno_packages/endptcfg/Makefile | cut -d'=' -f2)
|
||||
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/endptcfg-$profile-$endptversion-$endptcommith.tar.gz" && return
|
||||
cd ./build_dir/target-*_uClibc-0.9.33.*/endptcfg-$endptversion/
|
||||
mkdir endptcfg-open-$endptversion
|
||||
cp endptcfg endptcfg-open-$endptversion/
|
||||
tar -czv endptcfg-open-$endptversion/ -f endptcfg-$profile-$endptversion-$endptcommith.tar.gz
|
||||
scp endptcfg-$profile-$endptversion-$endptcommith.tar.gz inteno@iopsys.inteno.se:/home/inteno/public/www/iopsys/consumer/
|
||||
cp endptcfg-$profile-$endptversion-$endptcommith.tar.gz $curdir/
|
||||
rm -rf endptcfg-open-$endptversion
|
||||
rm -f endptcfg-$profile-$endptversion-$endptcommith.tar.gz
|
||||
cd $curdir
|
||||
}
|
||||
|
||||
build_ice_consumer() {
|
||||
# create ice-client open version tar file
|
||||
local iceversion icebasever icerelease icecommith
|
||||
icecommith=$(grep -w "PKG_SOURCE_VERSION:" ./feeds/feed_inteno_packages/ice-client/Makefile | head -1 | cut -d'=' -f2)
|
||||
icebasever=$(grep -w "BASE_PKG_VERSION:" ./feeds/feed_inteno_packages/ice-client/Makefile | cut -d'=' -f2)
|
||||
icerelease=$(grep -w "PKG_RELEASE:" ./feeds/feed_inteno_packages/ice-client/Makefile | cut -d'=' -f2)
|
||||
iceversion=$icebasever$icerelease
|
||||
ssh inteno@iopsys.inteno.se "ls public/www/iopsys/consumer/ice-client-$profile-$iceversion-$icecommith.tar.gz" && return
|
||||
cd ./build_dir/target-*_uClibc-0.9.33.*/ice-client-$icebasever/ipkg-*
|
||||
tar -czv ice-client -f ice-client-$profile-$iceversion-$icecommith.tar.gz
|
||||
scp ice-client-$profile-$iceversion-$icecommith.tar.gz inteno@iopsys.inteno.se:/home/inteno/public/www/iopsys/consumer/
|
||||
cp ice-client-$profile-$iceversion-$icecommith.tar.gz $curdir/
|
||||
rm -f ice-client-$profile-$iceversion-$icecommith.tar.gz
|
||||
cd $curdir
|
||||
}
|
||||
|
||||
|
||||
function generate_tarballs {
|
||||
|
||||
git remote -v | grep -q http && return # do not continue if this is an open SDK environment
|
||||
|
||||
profile=$(grep CONFIG_BCM_KERNEL_PROFILE .config | cut -d'=' -f2 | tr -d '"')
|
||||
sdkversion=$(grep "CONFIG_BRCM_SDK_VER.*=y" .config | awk -F'[_,=]' '{print$5}')
|
||||
curdir=$(pwd)
|
||||
|
||||
build_bcmkernel_consumer
|
||||
build_natalie_consumer
|
||||
build_endptcfg_consumer
|
||||
build_ice_consumer
|
||||
|
||||
}
|
||||
|
||||
register_command "generate_tarballs" "Generate tarballs for openstk"
|
||||
|
||||
18
iop/scripts/install_key.sh
Executable file
18
iop/scripts/install_key.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
# this is a developer helper script to install the public ssh key in the created image
|
||||
|
||||
function install_key {
|
||||
|
||||
mkdir -p files/etc/dropbear
|
||||
test -e ~/.ssh/id_dsa.pub && cat ~/.ssh/id_dsa.pub >>files/etc/dropbear/authorized_keys
|
||||
test -e ~/.ssh/id_rsa.pub && cat ~/.ssh/id_rsa.pub >>files/etc/dropbear/authorized_keys
|
||||
chmod 0644 files/etc/dropbear/authorized_keys
|
||||
|
||||
echo "::sysinit:/etc/init.d/rcS S boot" >files/etc/inittab
|
||||
echo "::shutdown:/etc/init.d/rcS K shutdown" >>files/etc/inittab
|
||||
echo "tty/0::askfirst:/bin/ash --login" >>files/etc/inittab
|
||||
echo "ttyS0::askfirst:/bin/ash --login" >>files/etc/inittab
|
||||
|
||||
echo Done
|
||||
}
|
||||
|
||||
register_command "install_key" "Install the user's public ssh key in the created image"
|
||||
70
iop/scripts/scp_changes.sh
Normal file
70
iop/scripts/scp_changes.sh
Normal file
@@ -0,0 +1,70 @@
|
||||
# this is a developer helper script to SCP changed files to remote host
|
||||
|
||||
ROOT=build_dir/target-mips_uClibc-0.9.33.2/root-iopsys-brcm63xx-mips/
|
||||
ROOT_OLD=tmp/root_old/
|
||||
ROOT_TMP=tmp/root_tmp/
|
||||
|
||||
function scp_changes_reset {
|
||||
{ cd `dirname $0`
|
||||
rm -rf "$ROOT_OLD"
|
||||
mkdir -p "$ROOT_OLD"
|
||||
cp -a "$ROOT"* "$ROOT_OLD"
|
||||
}
|
||||
}
|
||||
|
||||
function scp_changes {
|
||||
if [ -z "$1" ] ; then
|
||||
echo "usage: $0 scp_changes <host/-r(eset)/-p(retend)>"
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
{ cd `dirname $0`
|
||||
if [ ! -d $ROOT ]; then
|
||||
echo "$ROOT does not exist"
|
||||
echo "please build the project first"
|
||||
exit 1;
|
||||
fi
|
||||
if [ "$1" = "-r" ]; then
|
||||
echo "reset changes"
|
||||
scp_changes_reset
|
||||
exit 0
|
||||
fi
|
||||
if [ ! -d $ROOT_OLD ]; then
|
||||
echo "$ROOT_OLD does not exist"
|
||||
echo "you didn't store state of previous buildroot"
|
||||
#echo "please run ./scp_changes_reset.sh"
|
||||
echo "doing it now"
|
||||
scp_changes_reset
|
||||
exit 1;
|
||||
fi
|
||||
FILES=`diff -rq "$ROOT" "$ROOT_OLD" 2>&1 | sed -ne "s?^Files .* and $ROOT_OLD\\(.*\\) differ?\\1?p" -ne "s?^Only in $ROOT\\(.*\\): \\(.*\\)?\\1/\\2?p"`
|
||||
if [ "$1" = "-p" ]; then
|
||||
echo "files that would be copied:"
|
||||
echo $FILES
|
||||
exit 0
|
||||
fi
|
||||
for f in $FILES
|
||||
do
|
||||
mkdir -p "$ROOT_TMP`dirname $f`"
|
||||
cp -af "$ROOT$f" "$ROOT_TMP$f"
|
||||
done
|
||||
if [ -d "$ROOT_TMP" ]; then
|
||||
echo "scp changed files to $1"
|
||||
pushd "$ROOT_TMP" 2>&1 >/dev/null
|
||||
scp -r * root@$1:/
|
||||
RETVAL=$?
|
||||
popd 2>&1 >/dev/null
|
||||
rm -rf "$ROOT_TMP"
|
||||
if [ "$RETVAL" -eq 0 ]; then
|
||||
scp_changes_reset
|
||||
else
|
||||
echo "scp error"
|
||||
exit $RETVAL
|
||||
fi
|
||||
else
|
||||
echo "no change"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
register_command "scp_changes" "<host/-r(eset)/-p(retend)> SCP only changed files to device"
|
||||
177
iop/scripts/setup_host.sh
Executable file
177
iop/scripts/setup_host.sh
Executable file
@@ -0,0 +1,177 @@
|
||||
#!/bin/bash
|
||||
|
||||
function setup_host {
|
||||
|
||||
if [ "$(whoami)" != "root" ]; then
|
||||
echo "Please run this script as root!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
packages_all="bison flex g++ g++-multilib zlib1g-dev gettext gawk svn-buildpackage libncurses5-dev ncurses-term git automake gtk-doc-tools liblzo2-dev uuid-dev execstack"
|
||||
packages_perl="libconvert-binary-c-perl libdigest-crc-perl"
|
||||
packages_x64="libc6-dev-i386 lib32z1"
|
||||
packages_npm="npm nodejs yui-compressor"
|
||||
|
||||
curdir=$(pwd)
|
||||
|
||||
#===============#
|
||||
# Prerequisites #
|
||||
#===============#
|
||||
|
||||
mysh=$(ls -hl /bin/sh | awk -F'[ ,/]' '{print$NF}')
|
||||
if [ "$mysh" != "bash" ]; then
|
||||
echo "On Debian based systems, e.g. Ubuntu, /bin/sh must point to bash instead of $mysh"
|
||||
read -p "Do you approve this change (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
rm -f /bin/sh
|
||||
ln -s bash /bin/sh
|
||||
else
|
||||
echo "Warning! You haven't pointed /bin/sh to bash."
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "The packages below must be installed"
|
||||
echo $packages_all $packages_perl
|
||||
read -p "Do you approve insallation of these packages (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
apt-get install $packages_all
|
||||
apt-get install $packages_perl
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(uname -m | awk '{print$1}')" == "x86_64" ]; then
|
||||
echo "You are running a Linux Distribution based on 64-bit kernel"
|
||||
echo "The packages below must be installed"
|
||||
echo $packages_x64
|
||||
read -p "Do you approve insallation of these packages (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
apt-get install $packages_x64
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "The packages below must be installed in order to be able to compile JUCI"
|
||||
echo $packages_npm
|
||||
read -p "Do you approve insallation of these packages (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
apt-get install npm nodejs yui-compressor
|
||||
npm install -g npm
|
||||
npm install -g grunt-cli
|
||||
npm install -g mocha
|
||||
npm install -g bower
|
||||
npm install -g uglify-js
|
||||
npm install -g less
|
||||
|
||||
if [ "$(which node)" == "" ]; then
|
||||
NODEJS=$(which nodejs)
|
||||
if [ "$NODEJS" != "" ]; then
|
||||
read -p "Found nodejs executable at $(which nodejs), but no path to 'node'. Do you want to create a symlink? (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
ln -s "$NODEJS" "/usr/bin/node"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
user=$(who | head -1 | awk '{print$1}')
|
||||
[ -n $user ] && chown -R $user:$user /home/$user/.npm/
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the Broadcom toolchain from here and unpack the mips/arm package to /opt:
|
||||
echo -n "Checking for Broadcom MIPS toolchain: "
|
||||
if [ -d /opt/toolchains/crosstools-mips-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21 ]; then
|
||||
install_mips=0
|
||||
echo "YES"
|
||||
else
|
||||
install_mips=1
|
||||
echo "NO"
|
||||
fi
|
||||
|
||||
echo -n "Checking for Broadcom ARM toolchain: "
|
||||
if [ -d /opt/toolchains/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL ]; then
|
||||
install_arm=0
|
||||
echo "YES"
|
||||
else
|
||||
install_arm=1
|
||||
echo "NO"
|
||||
fi
|
||||
|
||||
if [ $install_mips -eq 1 -o $install_arm -eq 1 ]; then
|
||||
read -p "Do you approve insallation of missing toolchains (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
echo "Downloading toolchain"
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ~
|
||||
wget http://iopsys.inteno.se/iopsys/toolchain/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
|
||||
tar jxf crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
|
||||
cd /
|
||||
|
||||
if [ $install_mips -eq 1 ]; then
|
||||
echo "Installing MIPS toolchain"
|
||||
tar jxf ~/crosstools-mips-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2.tar.bz2
|
||||
fi
|
||||
|
||||
if [ $install_arm -eq 1 ]; then
|
||||
echo "Installing ARM toolchain"
|
||||
tar jxf ~/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL.Rel1.2.tar.bz2
|
||||
fi
|
||||
|
||||
rm -f ~/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-sources.tar.bz2
|
||||
rm -f ~/crosstools-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2-full.tar.bz2
|
||||
rm -f ~/crosstools-mip*-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21.Rel1.2.tar.bz2
|
||||
rm -f ~/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL.Rel1.2.tar.bz2
|
||||
fi
|
||||
|
||||
gcc_ver=$(ls -l /usr/bin/gcc-[0-9]* | head -1 | awk '{print$NF}' | cut -d'-' -f2)
|
||||
if [ "$gcc_ver" != "4.8" ]; then
|
||||
echo "Your current gcc version is $gcc_ver, but it must be changed to 4.8"
|
||||
read -p "Do you approve this change (y/n): " ans
|
||||
if [ "$ans" == "y" ]; then
|
||||
apt-get install gcc-4.8
|
||||
apt-get install g++-4.8
|
||||
apt-get install gcc-4.8-multilib
|
||||
|
||||
update-alternatives --install /usr/bin/g++ c++ /usr/bin/g++-4.8 100
|
||||
update-alternatives --install /usr/bin/g++ c++ /usr/bin/g++-$gcc_ver 90
|
||||
|
||||
update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-4.8 100
|
||||
update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-$gcc_ver 90
|
||||
|
||||
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-4.8 100
|
||||
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-$gcc_ver 90
|
||||
|
||||
update-alternatives --set c++ /usr/bin/g++-4.8
|
||||
update-alternatives --set cc /usr/bin/gcc-4.8
|
||||
update-alternatives --set cpp /usr/bin/cpp-4.8
|
||||
ln -s /etc/alternatives/cc /usr/bin/cc
|
||||
|
||||
echo "The deafult gcc version has now been changed from $gcc_ver to 4.8"
|
||||
else
|
||||
cd $curdir
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "You have successfully installed and configred prerequisites to be able to build an iopsys firmware"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
cd $curdir
|
||||
|
||||
}
|
||||
|
||||
register_command "setup_host" "Install needed packets to host machine"
|
||||
17
iop/scripts/ssh_install_key.sh
Executable file
17
iop/scripts/ssh_install_key.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
# this is a developer helper script to install the public ssh key on host running dropbear
|
||||
|
||||
function ssh_install_key {
|
||||
if [ -e ~/.ssh/id_rsa.pub ]; then
|
||||
echo "Adding public RSA key to $1"
|
||||
KEY=`cat ~/.ssh/id_rsa.pub`
|
||||
elif [ -e ~/.ssh/id_dsa.pub ]; then
|
||||
echo "Adding public DSA key to $1"
|
||||
KEY=`cat ~/.ssh/id_dsa.pub`
|
||||
else
|
||||
echo "No public key found"
|
||||
exit 1
|
||||
fi
|
||||
ssh root@$1 "echo '$KEY' >> /etc/dropbear/authorized_keys" && echo ok
|
||||
}
|
||||
|
||||
register_command "ssh_install_key" "Install the users public ssh key on host running dropbear"
|
||||
56
iop/scripts/ssh_sysupgrade.sh
Normal file
56
iop/scripts/ssh_sysupgrade.sh
Normal file
@@ -0,0 +1,56 @@
|
||||
# this is a developer helper script to install firmware on a remote host with SSH
|
||||
|
||||
function usage {
|
||||
echo "usage: $0 ssh_sysupgrade <host> <file> [opts]"
|
||||
}
|
||||
|
||||
function ssh_sysupgrade {
|
||||
if [ -z "$1" ] ; then
|
||||
usage
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
usage
|
||||
echo "Error: firmware filename required"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -e $2 ] ; then
|
||||
usage
|
||||
echo "Error: firmware file does not exist"
|
||||
exit 1
|
||||
fi
|
||||
IMAGE=`basename $2`
|
||||
echo "sysupgrade host: $1 with file $IMAGE"
|
||||
[ "$2" ] && [ -e "$2" ] && scp $2 root@$1:/tmp/ && ssh root@$1 "sysupgrade $3 /tmp/$IMAGE" && echo "sysupgrade done!"
|
||||
}
|
||||
|
||||
register_command "ssh_sysupgrade" "<host> <file> [opts] Install firmware on remote host with SSH"
|
||||
|
||||
function ssh_sysupgrade_latest {
|
||||
if [ -z "$1" ] ; then
|
||||
echo "usage: $0 ssh_sysupgrade_latest <host> [opts]"
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
{ cd `dirname $0`
|
||||
IMAGE=`ls -Art bin/*/*.y | tail -n1`
|
||||
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
|
||||
}
|
||||
}
|
||||
|
||||
register_command "ssh_sysupgrade_latest" "<host> [opts] Install latest ubifs firmware on remote host with SSH"
|
||||
|
||||
function ssh_sysupgrade_latest_w {
|
||||
if [ -z "$1" ] ; then
|
||||
echo "usage: $0 ssh_sysupgrade_latest_w <host> [opts]"
|
||||
echo "Error: host required"
|
||||
exit 1
|
||||
fi
|
||||
{ cd `dirname $0`
|
||||
IMAGE=`ls -Art bin/*/*.w | tail -n1`
|
||||
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop ssh_sysupgrade $1 $IMAGE $2
|
||||
}
|
||||
}
|
||||
|
||||
register_command "ssh_sysupgrade_latest_w" "<host> [opts] Install latest jffs2 firmware on remote host with SSH"
|
||||
20
iop/scripts/status.sh
Executable file
20
iop/scripts/status.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
function status {
|
||||
topdir=$PWD
|
||||
echo
|
||||
for subdir in .git $(find feeds/ -type d -name .git); do
|
||||
|
||||
echo "======= $(dirname $subdir) ========"
|
||||
cd $subdir/..
|
||||
if git status |grep -Eq '^\s([^\s\(]+)'; then
|
||||
git status |grep -Ev '(nothing added|use "git |^$)'
|
||||
else
|
||||
git status |grep -E "(On branch|HEAD detached)"
|
||||
fi
|
||||
cd $topdir
|
||||
done
|
||||
echo
|
||||
}
|
||||
|
||||
register_command "status" "Display the state of your working tree"
|
||||
602
iop/scripts/update_package.sh
Executable file
602
iop/scripts/update_package.sh
Executable file
@@ -0,0 +1,602 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
print_git_update()
|
||||
{
|
||||
echo "pkg -> ${PKG_NAME}"
|
||||
echo " PKG_BUILD_DIR = ${PKG_BUILD_DIR}"
|
||||
echo " PKG_DIR = ${PKG_DIR}"
|
||||
echo " PKG_SOURCE = ${PKG_SOURCE}"
|
||||
echo " PKG_NAME = ${PKG_NAME}"
|
||||
echo " PKG_SOURCE_URL = ${PKG_SOURCE_URL}"
|
||||
echo " PKG_SOURCE_PROTO= ${PKG_SOURCE_PROTO}"
|
||||
echo " PKG_SOURCE_VERSION= ${PKG_SOURCE_VERSION}"
|
||||
echo " PKG_SOURCE = ${PKG_SOURCE}"
|
||||
echo " PKG_SOURCE_VERSION_FILE=${PKG_SOURCE_VERSION_FILE}"
|
||||
}
|
||||
|
||||
is_git_same()
|
||||
{
|
||||
git_last=$(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)
|
||||
#echo "$PKG_NAME $git_last = ${PKG_SOURCE_VERSION}"
|
||||
if [ "$git_last" == "${PKG_SOURCE_VERSION}" ]
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
update_this_pkg()
|
||||
{
|
||||
mk_hash=$(get_makefile_hash)
|
||||
|
||||
if [ "$mk_hash" != "${PKG_SOURCE_VERSION}" ]
|
||||
then
|
||||
echo "${PKG_NAME}:"
|
||||
echo " build dir = ${PKG_BUILD_DIR}"
|
||||
echo " feed makefile = ${mk_hash}"
|
||||
echo " stale hash = ${PKG_SOURCE_VERSION}"
|
||||
echo " build git = $(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)"
|
||||
echo " Git hash in package makefile and the git hash recorded from last compile of"
|
||||
echo " package is different. You probably want to recompile the package"
|
||||
echo " to get an up to date version in ${PKG_BUILD_DIR}/.git_update"
|
||||
echo ""
|
||||
|
||||
echo -n " Shold we continue with the update anyway? [y/N]:"
|
||||
read answer
|
||||
echo ""
|
||||
|
||||
case $answer in
|
||||
y|Y)
|
||||
;;
|
||||
n|N|*)
|
||||
return 1;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "${PKG_NAME}:"
|
||||
echo " build dir = ${PKG_BUILD_DIR}"
|
||||
echo " pkg dir = ${PKG_DIR}"
|
||||
echo " feed makefile = ${PKG_SOURCE_VERSION}"
|
||||
echo " build git = $(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)"
|
||||
echo " package is at a different git commit in build compared to feed"
|
||||
echo -n " Should we update the feed and top project to reflect the new version ? [y/N]:"
|
||||
read answer
|
||||
echo ""
|
||||
|
||||
case $answer in
|
||||
y|Y)
|
||||
return 0;;
|
||||
*)
|
||||
echo ""
|
||||
return 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_makefile_hash()
|
||||
{
|
||||
if [ -n "$PKG_SOURCE_VERSION_FILE" ]
|
||||
then
|
||||
name="$PKG_SOURCE_VERSION_FILE"
|
||||
else
|
||||
name=Makefile
|
||||
fi
|
||||
grep "PKG_SOURCE_VERSION:=" ${PKG_DIR}/${name} | sed -e "s/\(^PKG_SOURCE_VERSION:=\)\(.*\)/\2/"
|
||||
}
|
||||
|
||||
insert_hash_in_feed_makefile()
|
||||
{
|
||||
if [ -n "$PKG_SOURCE_VERSION_FILE" ]
|
||||
then
|
||||
name="$PKG_SOURCE_VERSION_FILE"
|
||||
else
|
||||
name=Makefile
|
||||
fi
|
||||
|
||||
git_last=$(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)
|
||||
|
||||
sed -i -e "s/\(^PKG_SOURCE_VERSION:=\).*/\1${git_last}/" ${PKG_DIR}/${name}
|
||||
(cd ${PKG_DIR}; git add ${name})
|
||||
}
|
||||
|
||||
|
||||
# BUG: fix if only local branche name!
|
||||
branch_uptodate()
|
||||
{
|
||||
# $1 git repo
|
||||
# $2 if it exist dont abort do the pull
|
||||
(cd $1
|
||||
git remote update 2>&1 >/dev/null
|
||||
|
||||
LOCAL=$(git rev-parse @)
|
||||
REMOTE=$(git rev-parse @{u})
|
||||
BASE=$(git merge-base @ @{u})
|
||||
|
||||
if [ -z "$REMOTE" ]; then
|
||||
BRANCH=$(basename $(git symbolic-ref -q HEAD))
|
||||
echo "You need to setup a tracking branch for $BRANCH"
|
||||
exit 99
|
||||
fi
|
||||
|
||||
if [ $LOCAL = $REMOTE ]; then
|
||||
return
|
||||
elif [ $LOCAL = $BASE ]; then
|
||||
if [ -n "$2" ]
|
||||
then
|
||||
echo "Doing automatic pull on [ $1 ]"
|
||||
if git pull
|
||||
then
|
||||
return
|
||||
else
|
||||
echo "Something wrong with pull. aborting, repo at"
|
||||
echo " [ $1 ]"
|
||||
exit 99
|
||||
fi
|
||||
else
|
||||
echo "Local repo behind remote:"
|
||||
echo "do git pull at repo"
|
||||
echo " [ $1 ]"
|
||||
exit 99
|
||||
fi
|
||||
elif [ $REMOTE = $BASE ]; then
|
||||
echo "Local repo ahead of remote. A push is needed"
|
||||
echo "Repo is at: $1"
|
||||
echo ""
|
||||
echo -n "Should we try a push ? [Y/n]:"
|
||||
read answer
|
||||
echo ""
|
||||
|
||||
case $answer in
|
||||
n|N|q|Q)
|
||||
exit 99;;
|
||||
*)
|
||||
echo -e "${Yellow}"
|
||||
if ! git push origin HEAD
|
||||
then
|
||||
echo -e "${Color_Off}"
|
||||
exit 99
|
||||
fi
|
||||
echo -e "${Color_Off}Push done."
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
echo "Diverged. not sure what you did but there is no tracking branch. "
|
||||
echo "repo at [ $1 ]. fix it so that there is a tracking branch remote."
|
||||
echo "Often this is related to sombody having commited to the same branch"
|
||||
echo "on the server so a simple push wont work, try a 'git rebase'."
|
||||
exit 99
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
on_a_branch()
|
||||
{
|
||||
local repo=$1
|
||||
local type=$2
|
||||
(
|
||||
cd $repo
|
||||
name=$(git symbolic-ref -q HEAD)
|
||||
if [ -z "$name" ]
|
||||
then
|
||||
echo "git $type repo [ $repo ] is detached."
|
||||
|
||||
branches=($(git branch -r --contains $(git rev-parse HEAD)))
|
||||
if [ 0 == ${#branches[@]} ]
|
||||
then
|
||||
echo "It needs to be on a branch but git could not find any associated branch"
|
||||
echo ""
|
||||
echo "you need to make sure that the commit is not on a detached branch"
|
||||
echo "and that the branch exist in the remote repo also. it can not be a local name"
|
||||
echo "as it is about to get pushed so it can be part of system release"
|
||||
exit 99
|
||||
fi
|
||||
|
||||
echo "It needs to be on a branch. Please select one or quit if it is not in list."
|
||||
echo ""
|
||||
|
||||
i=0
|
||||
for branch in ${branches[*]}
|
||||
do
|
||||
echo "$i: $branch"
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo -n "Select what branch to checkout. Q/q or N/n to quit? "
|
||||
read answer
|
||||
|
||||
case $answer in
|
||||
q|Q|n|N)
|
||||
echo "Aborting!"
|
||||
exit 99;;
|
||||
esac
|
||||
|
||||
echo -e "${Yellow}"
|
||||
pwd
|
||||
echo "git checkout ${branches[$answer]}"
|
||||
if ! git checkout -t ${branches[$answer]}
|
||||
then
|
||||
local_branch=$(basename ${branches[$answer]})
|
||||
if ! git checkout ${local_branch}
|
||||
then
|
||||
echo -e "${Color_Off}"
|
||||
echo "update_git aborting! something was wrong changing to branch ${branches[$answer]}"
|
||||
echo "go to [ $repo ] and fix it."
|
||||
exit 99
|
||||
fi
|
||||
fi
|
||||
echo -e "${Color_Off}"
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
git_repos_uptodate()
|
||||
{
|
||||
on_a_branch ${PKG_BUILD_DIR} package
|
||||
on_a_branch ${PKG_DIR} feed
|
||||
on_a_branch ${PWD} top
|
||||
branch_uptodate ${PKG_BUILD_DIR}
|
||||
branch_uptodate ${PKG_DIR} do_pull
|
||||
branch_uptodate ${PWD} do_pull
|
||||
}
|
||||
|
||||
get_feed_name()
|
||||
{
|
||||
|
||||
echo $1 |sed -e "s|.*feeds/\([^/]*\).*|\1|"
|
||||
|
||||
# rest=$(dirname $1)
|
||||
# base=$(basename $1)
|
||||
# prev=$base
|
||||
|
||||
# while [ -n "$rest" ]
|
||||
# do
|
||||
# if [ "$base" == "feeds" ]
|
||||
# then
|
||||
# echo "$prev"
|
||||
# fi
|
||||
# done
|
||||
}
|
||||
|
||||
create_message()
|
||||
{
|
||||
FORMAT="commit %H%n\
|
||||
Author: %aN <%aE>%n\
|
||||
Date: %ai%n\
|
||||
%n\
|
||||
%w(80,4,4)%s%n
|
||||
%b%n\
|
||||
%w()Base directory -> ${repo_PATH}/"
|
||||
local FROM=${PKG_SOURCE_VERSION}
|
||||
local TO=$(cd ${PKG_BUILD_DIR}; git rev-parse HEAD)
|
||||
|
||||
local commits=$(cd ${PKG_BUILD_DIR};git rev-list ${FROM}..${TO})
|
||||
|
||||
local feed=$(get_feed_name ${PKG_DIR})
|
||||
|
||||
echo "Update feed [ $feed ] package [ $PKG_NAME ]"
|
||||
echo ""
|
||||
echo "-------------------------------------------------------------------------------"
|
||||
(cd ${PKG_BUILD_DIR}; git log --graph --oneline ${FROM}..${TO})
|
||||
echo "-------------------------------------------------------------------------------"
|
||||
|
||||
for commit in $commits
|
||||
do
|
||||
(cd ${PKG_BUILD_DIR}; git show --stat --pretty=format:"$FORMAT" $commit)
|
||||
echo "-------------------------------------------------------------------------------"
|
||||
done
|
||||
}
|
||||
|
||||
edit_file()
|
||||
{
|
||||
echo -en "${Red}"
|
||||
echo "Here is the commit message we are going to use!"
|
||||
echo "-------------------------------------------------------------------------------"
|
||||
echo -en "${Color_Off}"
|
||||
cat $1
|
||||
echo -en "${Red}"
|
||||
echo "-------------------------------------------------------------------------------"
|
||||
echo -en "${Color_Off}"
|
||||
|
||||
echo -n "Do you want to edit the message [y/N]? "
|
||||
read answer
|
||||
|
||||
case $answer in
|
||||
y|Y)
|
||||
$EDITOR $1;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
commit_feed()
|
||||
{
|
||||
template=$(readlink -f $1)
|
||||
edit_file $template
|
||||
|
||||
echo -e "${Yellow}"
|
||||
(
|
||||
cd ${PKG_DIR}
|
||||
if git commit -F $template
|
||||
then
|
||||
if git push origin HEAD
|
||||
then
|
||||
echo -e "${Color_Off} Feed Updated!"
|
||||
return
|
||||
else
|
||||
echo -e "${Color_Off}"
|
||||
echo "something wrong push feed git ${PKG_DIR}"
|
||||
exit 99
|
||||
fi
|
||||
else
|
||||
echo -e "${Color_Off}"
|
||||
echo "something wrong committing to feed git ${PKG_DIR}"
|
||||
exit 99
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
commit_feeds_config()
|
||||
{
|
||||
template=$(readlink -f $1)
|
||||
edit_file $template
|
||||
|
||||
echo -e "${Yellow}"
|
||||
if git commit -F $template
|
||||
then
|
||||
if git push origin HEAD
|
||||
then
|
||||
echo -e "${Color_Off}Feeds.conf updated!"
|
||||
return
|
||||
else
|
||||
echo -e "${Color_Off}"
|
||||
echo "something wrong push change to feeds.conf"
|
||||
echo "try \"git remote update ; git stash ;git rebase; git push;git stash pop\""
|
||||
exit 99
|
||||
fi
|
||||
else
|
||||
echo -e "${Color_Off}"
|
||||
echo "something wrong committing to feed git"
|
||||
exit 99
|
||||
fi
|
||||
}
|
||||
|
||||
insert_hash_in_feeds_config()
|
||||
{
|
||||
local feed=$(get_feed_name ${PKG_DIR})
|
||||
local TO=$(cd ${PKG_DIR}; git rev-parse HEAD)
|
||||
|
||||
sed -i feeds.conf -e "/${feed}/ s/\(.*\)[;^].*/\1^${TO}/"
|
||||
git add feeds.conf
|
||||
}
|
||||
|
||||
check_packages()
|
||||
{
|
||||
echo -e "${Green}_______________________________________________________________________________${Color_Off}"
|
||||
echo "Now checking if any changes has been done to the packages."
|
||||
echo -e "${Green}_______________________________________________________________________________${Color_Off}"
|
||||
|
||||
# First scan all files in build dir for packages that have .git directories.
|
||||
all_pkgs=$(find build_dir/ -name ".git")
|
||||
|
||||
for pkg in `echo "$all_pkgs"`
|
||||
do
|
||||
pkg=$(dirname $pkg)
|
||||
|
||||
# check if the git in build is at same commit id as the feed makefile points out
|
||||
if [ -e ${pkg}/.git_update ]
|
||||
then
|
||||
source ${pkg}/.git_update
|
||||
fi
|
||||
|
||||
# print_git_update
|
||||
|
||||
if [ -n "${PKG_NAME}" ]
|
||||
then
|
||||
if ! is_git_same
|
||||
then
|
||||
if update_this_pkg
|
||||
then
|
||||
# print_git_update
|
||||
git_repos_uptodate
|
||||
insert_hash_in_feed_makefile
|
||||
create_message >tmp/msg
|
||||
commit_feed tmp/msg
|
||||
insert_hash_in_feeds_config
|
||||
commit_feeds_config tmp/msg
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# now handle the target git. we have only one
|
||||
|
||||
|
||||
feeds_hash()
|
||||
{
|
||||
grep -v "^#" feeds.conf | grep " $1" | sed -e "s/.*[;^]\(.*\)/\1/"
|
||||
}
|
||||
|
||||
insert_feed_hash_in_feeds_config()
|
||||
{
|
||||
local feed=$1
|
||||
local TO=$(cd feeds/${feed}; git rev-parse HEAD)
|
||||
|
||||
sed -i feeds.conf -e "/ ${feed}/ s/\(.*\)[;^].*/\1^${TO}/"
|
||||
git add feeds.conf
|
||||
}
|
||||
|
||||
create_feed_message()
|
||||
{
|
||||
local feed=$1
|
||||
local FROM=$2
|
||||
local TO=$3
|
||||
|
||||
local FORMAT="commit %H%n\
|
||||
Author: %aN <%aE>%n\
|
||||
Date: %ai%n\
|
||||
%n\
|
||||
%w(80,4,4)%s%n
|
||||
%b%n\
|
||||
%w()Base directory -> feeds/$feed/"
|
||||
|
||||
|
||||
local commits=$(cd feeds/$feed;git rev-list ${FROM}..${TO})
|
||||
|
||||
echo "Update feed [ $feed ]"
|
||||
echo ""
|
||||
echo "-------------------------------------------------------------------------------"
|
||||
(cd feeds/$feed; git log --graph --oneline ${FROM}..${TO})
|
||||
echo "-------------------------------------------------------------------------------"
|
||||
|
||||
for commit in $commits
|
||||
do
|
||||
(cd feeds/$feed; git show --stat --pretty=format:"$FORMAT" $commit)
|
||||
echo "-------------------------------------------------------------------------------"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
check_feeds()
|
||||
{
|
||||
echo -e "${Green}_______________________________________________________________________________${Color_Off}"
|
||||
echo "Now checking if any changes has been done to the feeds."
|
||||
echo -e "${Green}_______________________________________________________________________________${Color_Off}"
|
||||
|
||||
feeds=$(grep -v "^#" feeds.conf| awk '{print $2}')
|
||||
for feed in `echo $feeds`
|
||||
do
|
||||
feed_hash=$(feeds_hash $feed)
|
||||
in_git=$(cd feeds/$feed; git rev-parse HEAD)
|
||||
|
||||
if [ "$feed_hash" != "$in_git" ]
|
||||
then
|
||||
|
||||
name=$(cd feeds/$feed;git symbolic-ref -q HEAD)
|
||||
if [ -z "$name" ]
|
||||
then
|
||||
echo "Feed feeds/${feed} is at a git commit which is different from feeds.conf"
|
||||
on_a_branch feeds/${feed} feed
|
||||
|
||||
#redo the test here and see if the feeds.conf and git is still different.
|
||||
in_git=$(cd feeds/$feed; git rev-parse HEAD)
|
||||
if [ "$feed_hash" = "$in_git" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
LOCAL=$(cd feeds/$feed;git rev-parse @)
|
||||
REMOTE=$(cd feeds/$feed;git rev-parse @{u})
|
||||
BASE=$(cd feeds/$feed;git merge-base @ @{u})
|
||||
|
||||
# if we are behind the remote automatically do a pull
|
||||
if [ $LOCAL = $BASE ]; then
|
||||
(cd feeds/$feed ; git pull 1>/dev/null)
|
||||
|
||||
#redo the test here and see if the feeds.conf and git is still different.
|
||||
in_git=$(cd feeds/$feed; git rev-parse HEAD)
|
||||
if [ "$feed_hash" = "$in_git" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Feed feeds/${feed} is at different commit than what is in feeds.conf"
|
||||
echo -n "Should we update feeds.conf to reflect the new version ? [y/N]:"
|
||||
read answer
|
||||
|
||||
case $answer in
|
||||
n|N)
|
||||
continue;;
|
||||
esac
|
||||
branch_uptodate feeds/${feed}
|
||||
create_feed_message ${feed} $feed_hash $in_git >tmp/msg
|
||||
insert_feed_hash_in_feeds_config ${feed}
|
||||
commit_feeds_config tmp/msg
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
feeds_at_top()
|
||||
{
|
||||
git remote update 2>/dev/null 1>/dev/null
|
||||
LOCAL=$(git rev-parse @)
|
||||
REMOTE=$(git rev-parse @{u})
|
||||
|
||||
if [ $LOCAL = $REMOTE ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
local_name=$(git rev-parse --abbrev-ref @ )
|
||||
remote_name=$(git rev-parse --abbrev-ref @{u} )
|
||||
|
||||
echo "Top repo local branch \"$local_name\" is not at same point as remote \"$remote_name\""
|
||||
echo "This update script will update the feeds.conf file and for that to work it needs to"
|
||||
echo "be up to date with the remote."
|
||||
echo ""
|
||||
echo "please run:"
|
||||
echo " git pull"
|
||||
echo " ./iop feeds_update"
|
||||
echo ""
|
||||
echo "do not forget the bootstrap. but do not run make it can delete your package in build"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
# Exported interface
|
||||
function update_package {
|
||||
|
||||
Color_Off='\033[0m' # Text Reset
|
||||
|
||||
# Regular Colors
|
||||
Black='\033[0;30m' # Black
|
||||
Red='\033[0;31m' # Red
|
||||
Green='\033[0;32m' # Green
|
||||
Yellow='\033[0;33m' # Yellow
|
||||
Blue='\033[0;34m' # Blue
|
||||
Purple='\033[0;35m' # Purple
|
||||
Cyan='\033[0;36m' # Cyan
|
||||
White='\033[0;37m' # White
|
||||
|
||||
while getopts "v:h" opt; do
|
||||
case $opt in
|
||||
v)
|
||||
verbose=$OPTARG
|
||||
;;
|
||||
h)
|
||||
echo "some help! No options yet"
|
||||
exit 1
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$EDITOR" ]
|
||||
then
|
||||
if [ -f /usr/bin/vi ]; then
|
||||
EDITOR=vi
|
||||
else
|
||||
echo "env variable EDITOR needs to be set"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# allow subshells to abort the whole program by exiting with "exit 99"
|
||||
set -E
|
||||
trap '[ "$?" -ne 99 ] || exit 99' ERR
|
||||
|
||||
feeds_at_top
|
||||
check_packages
|
||||
check_feeds
|
||||
}
|
||||
|
||||
register_command "update_package" "Publish changes to packages and feeds"
|
||||
@@ -48,32 +48,35 @@ init_iup() {
|
||||
config_get starttime polling starttime
|
||||
|
||||
### Ask for IUP related DHCP options only if IUP is enabled ###
|
||||
local enabled
|
||||
local newreqopts=
|
||||
local baseopts=
|
||||
local reqopts="$(uci -q get network.wan.reqopts)"
|
||||
local iupopts="66 67 128 224"
|
||||
local ropt iopt
|
||||
local net
|
||||
config_get enabled iup enabled "on"
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
66|67|128|224) ;;
|
||||
*) baseopts="$baseopts $ropt" ;;
|
||||
esac
|
||||
done
|
||||
ropt=""
|
||||
reqopts="$baseopts $iupopts"
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
66|67|128|224) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
|
||||
*) newreqopts="$newreqopts $ropt" ;;
|
||||
esac
|
||||
done
|
||||
new_reqopts() {
|
||||
local net=$1
|
||||
local enabled
|
||||
local newreqopts=
|
||||
local baseopts=
|
||||
local reqopts="$(uci -q get network.$net.reqopts)"
|
||||
local iupopts="66 67 128 224"
|
||||
local ropt iopt
|
||||
config_get enabled iup enabled "on"
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
66|67|128|224) ;;
|
||||
*) baseopts="$baseopts $ropt" ;;
|
||||
esac
|
||||
done
|
||||
ropt=""
|
||||
reqopts="$baseopts $iupopts"
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
66|67|128|224) [ $enabled == "on" ] && newreqopts="$newreqopts $ropt" ;;
|
||||
*) newreqopts="$newreqopts $ropt" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
|
||||
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
|
||||
echo "$newreqopts"
|
||||
}
|
||||
for net in $(management_interfaces); do
|
||||
uci -q set network.$net.reqopts="$newreqopts"
|
||||
uci -q set network.$net.reqopts="$(new_reqopts $net)"
|
||||
done
|
||||
uci commit network
|
||||
ubus call network reload
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/network/config.sh
|
||||
|
||||
if [ -z $1 ] ; then
|
||||
echo "No argument"
|
||||
@@ -50,23 +51,17 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sofwareminuspath=${url##*/}
|
||||
softwareminuspath=${url##*/}
|
||||
|
||||
if [ $url ] && [ $active -eq 1 ]; then
|
||||
echo "Software version to download $sofwareminuspath"
|
||||
echo "Software version to download $softwareminuspath"
|
||||
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
|
||||
json_load "$sysinfo"
|
||||
json_get_var firmware firmware
|
||||
json_get_var filesystem filesystem
|
||||
if [ "$filesystem" == "JFFS2" ] ; then
|
||||
firmware=$firmware.w
|
||||
firmware2=$firmware.w
|
||||
else
|
||||
firmware=$firmware.y
|
||||
firmware2=$firmware.y2
|
||||
fi
|
||||
if [ "$sofwareminuspath" == "${sofwareminuspath/$firmware/}" -o "$sofwareminuspath" == "${sofwareminuspath/$firmware2/}" ] ; then
|
||||
local firmware_new=${softwareminuspath%.*} # remove extension (.w, .y or .y2) from filename
|
||||
if [ "$firmware_new" != "$firmware" ] ; then
|
||||
echo "Image found $url will start flashing"
|
||||
wait_for_dns $url
|
||||
/sbin/sysupgrade -v $url &
|
||||
exit 1
|
||||
else
|
||||
|
||||
@@ -99,9 +99,10 @@ atm_inf_conf() {
|
||||
|
||||
checkxtmlist $atmtype $pcr $scr $mbs
|
||||
ret="$?"
|
||||
xtmctl operate conn --add 1.$vpi.$vci aal5 $encaps 0 $ret $ret
|
||||
xtmctl operate conn --addq 1.$vpi.$vci 0 wrr 1
|
||||
xtmctl operate conn --addq 1.$vpi.$vci 7 wrr 1 # fixes pppoe disconnect issue
|
||||
xtmctl operate conn --add 1.$vpi.$vci aal5 $encaps 0 1 $ret
|
||||
xtmctl operate conn --addq 1.$vpi.$vci 0 wrr 1 # low priority queue
|
||||
xtmctl operate conn --addq 1.$vpi.$vci 1 wrr 1 # mid priority queue upstream ACK's and ping from LAN will use this queue
|
||||
xtmctl operate conn --addq 1.$vpi.$vci 7 wrr 1 # high priority queue, internal traffic dhcp igmp dns and icmp
|
||||
xtmctl operate conn --createnetdev 1.$vpi.$vci ${ifname%%.*}
|
||||
xtmctl operate intf --state 1 enable
|
||||
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
#!/bin/sh
|
||||
|
||||
local hasEthWan="1"
|
||||
local hasAdsl="$(db -q get hw.board.hasAdsl)"
|
||||
local hasVdsl="$(db -q get hw.board.hasVdsl)"
|
||||
|
||||
local LANPORTS="$(db -q get hw.board.ethernetLanPorts)"
|
||||
local WANPORTS=""
|
||||
|
||||
# populate layer2_interface_ethernet #
|
||||
if [ "$hasEthWan" == "1" ]; then
|
||||
local wanEthernetPort="$(db -q get hw.board.ethernetWanPort)"
|
||||
wanEthernetPort="${wanEthernetPort:-eth0}"
|
||||
if [ ! -f /etc/config/layer2_interface_ethernet -o -z "$(uci -q get layer2_interface_ethernet.@ethernet_interface[0].ifname)" ]; then
|
||||
cat > /etc/config/layer2_interface_ethernet <<EOF
|
||||
config ethernet_interface 'Wan'
|
||||
option name 'WAN'
|
||||
option baseifname '${wanEthernetPort}'
|
||||
option ifname '${wanEthernetPort}.1'
|
||||
EOF
|
||||
fi
|
||||
local ifname="$(uci -q get layer2_interface_ethernet.@ethernet_interface[0].ifname)"
|
||||
[ -n "$WANPORTS" ] && WANPORTS="$WANPORTS $ifname" || WANPORTS="$ifname"
|
||||
elif [ "$hasEthWan" == "0" ]; then
|
||||
echo "" > /etc/config/layer2_interface_ethernet
|
||||
fi
|
||||
|
||||
# populate layer2_interface #
|
||||
if [ "$hasAdsl" == "1" ]; then
|
||||
if [ ! -f /etc/config/layer2_interface -o -z "$(uci -q get layer2_interface.capabilities)" ]; then
|
||||
cat > /etc/config/layer2_interface <<EOF
|
||||
config dsltype 'vdsl'
|
||||
option 'enabled' 'on'
|
||||
|
||||
config dsltype 'adsl'
|
||||
option 'enabled' 'on'
|
||||
|
||||
config dslsettings 'capabilities'
|
||||
option 'GDmt' 'Enabled'
|
||||
option 'Glite' 'Enabled'
|
||||
option 'T1413' 'Enabled'
|
||||
option 'ADSL2' 'Enabled'
|
||||
option 'AnnexL' 'Enabled'
|
||||
option 'ADSL2plus' 'Enabled'
|
||||
option 'VDSL2' 'Enabled'
|
||||
option '8a' 'Enabled'
|
||||
option '8b' 'Enabled'
|
||||
option '8c' 'Enabled'
|
||||
option '8d' 'Enabled'
|
||||
option '12a' 'Enabled'
|
||||
option '12b' 'Enabled'
|
||||
option '17a' 'Enabled'
|
||||
option '30a' 'Enabled'
|
||||
option 'US0' 'on'
|
||||
option 'bitswap' 'on'
|
||||
option 'sra' 'on'
|
||||
EOF
|
||||
fi
|
||||
elif [ "$hasAdsl" == "0" -a "$hasVdsl" == "0" ]; then
|
||||
echo "" > /etc/config/layer2_interface
|
||||
fi
|
||||
|
||||
# populate layer2_interface_adsl #
|
||||
if [ "$hasAdsl" == "1" ]; then
|
||||
local wanAdslPort=$(db -q get hw.board.adslWanPort)
|
||||
wanAdslPort="${wanAdslPort:-atm0}"
|
||||
if [ ! -f /etc/config/layer2_interface_adsl -o -z "$(uci -q get layer2_interface_adsl.@atm_bridge[0].ifname)" ]; then
|
||||
cat > /etc/config/layer2_interface_adsl <<EOF
|
||||
config atm_bridge
|
||||
option 'link_type' 'EoA'
|
||||
option 'encapseoa' 'llcsnap_eth'
|
||||
option 'unit' '0'
|
||||
option 'ifname' '${wanAdslPort}.1'
|
||||
option 'baseifname' '${wanAdslPort}'
|
||||
option 'vpi' '8'
|
||||
option 'vci' '35'
|
||||
option 'name' 'DSL8_35'
|
||||
option 'atmtype' 'ubr'
|
||||
EOF
|
||||
fi
|
||||
local ifname="$(uci -q get layer2_interface_adsl.@atm_bridge[0].ifname)"
|
||||
[ -n "$WANPORTS" ] && WANPORTS="$WANPORTS $ifname" || WANPORTS="$ifname"
|
||||
elif [ "$hasAdsl" == "0" ]; then
|
||||
echo "" > /etc/config/layer2_interface_adsl
|
||||
fi
|
||||
|
||||
# populate layer2_interface_vdsl #
|
||||
if [ "$hasVdsl" == "1" ]; then
|
||||
local wanVdslPort=$(db -q get hw.board.vdslWanPort)
|
||||
wanVdslPort="${wanVdslPort:-ptm0}"
|
||||
if [ ! -f /etc/config/layer2_interface_vdsl -o -z "$(uci -q get layer2_interface_vdsl.@vdsl_interface[0].ifname)" ]; then
|
||||
cat > /etc/config/layer2_interface_vdsl <<EOF
|
||||
config vdsl_interface
|
||||
option 'unit' '0'
|
||||
option 'ifname' '${wanVdslPort}.1'
|
||||
option 'baseifname' '${wanVdslPort}'
|
||||
option 'name' 'VDSL2'
|
||||
option 'dslat' '1'
|
||||
option 'ptmprio' '1'
|
||||
option 'ipqos' '1'
|
||||
EOF
|
||||
fi
|
||||
local ifname="$(uci -q get layer2_interface_vdsl.@vdsl_interface[0].ifname)"
|
||||
[ -n "$WANPORTS" ] && WANPORTS="$WANPORTS $ifname" || WANPORTS="$ifname"
|
||||
elif [ "$hasVdsl" == "0" ]; then
|
||||
echo "" > /etc/config/layer2_interface_vdsl
|
||||
fi
|
||||
|
||||
# populate network config ifnames #
|
||||
uci -q get network.lan.ifname >/dev/null || uci -q set network.lan.ifname="$LANPORTS"
|
||||
uci -q get network.wan.ifname >/dev/null || uci -q set network.wan.ifname="$WANPORTS"
|
||||
uci commit network
|
||||
|
||||
sync
|
||||
105
libcgroup/Makefile
Normal file
105
libcgroup/Makefile
Normal file
@@ -0,0 +1,105 @@
|
||||
#
|
||||
# Copyright (C) 2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libcgroup
|
||||
PKG_VERSION:=0.41
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_SOURCE_VERSION:=2186c97f60df7efe86ddadd5e3d9d36dd4923b98
|
||||
|
||||
PKG_SOURCE_URL:=git://git.code.sf.net/p/libcg/libcg
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)+git$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
#PKG_BUILD_PARALLEL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
|
||||
# this way we don't need to pick out the resulting files from the build dir.
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libcgroup
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libpthread
|
||||
TITLE:=Control group configuration library
|
||||
URL:=https://sourceforge.net/p/libcg/
|
||||
endef
|
||||
|
||||
define Package/libcgroup/description
|
||||
Control groups, a new kernel feature in Linux 2.6.24 provides a file system
|
||||
interface to manipulate and control the details on task grouping including
|
||||
creation of new task groups (control groups), permission handling and task
|
||||
assignment.
|
||||
endef
|
||||
|
||||
define Package/libcgroup-daemon
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+libcgroup
|
||||
TITLE:=Control group management daemon
|
||||
URL:=https://sourceforge.net/p/libcg/
|
||||
endef
|
||||
|
||||
define Package/libcgroup-utils
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libcgroup
|
||||
TITLE:=Control group configuration utilities
|
||||
URL:=https://sourceforge.net/p/libcg/
|
||||
endef
|
||||
|
||||
#define Package/libcgroup/conffiles
|
||||
# /etc/config/cgroups
|
||||
#endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-bindings \
|
||||
--disable-pam \
|
||||
--enable-static \
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/libcgroup
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libcgroup/*.h $(1)/usr/include/libcgroup/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/lib/pkgconfig
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.* $(1)/usr/lib/
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcgroup.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libcgroup/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libcgroup.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libcgroup-daemon/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin
|
||||
|
||||
# move to its own package?
|
||||
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
|
||||
$(INSTALL_CONF) ./files/cgroups.config $(1)/etc/config/cgroups
|
||||
$(INSTALL_BIN) ./files/cgroups.init $(1)/etc/init.d/cgroups
|
||||
endef
|
||||
|
||||
define Package/libcgroup-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libcgroup))
|
||||
$(eval $(call BuildPackage,libcgroup-daemon))
|
||||
$(eval $(call BuildPackage,libcgroup-utils))
|
||||
40
libcgroup/files/cgroups.config
Normal file
40
libcgroup/files/cgroups.config
Normal file
@@ -0,0 +1,40 @@
|
||||
config cgroups cgroups
|
||||
option enabled 1
|
||||
option defgroup iopsys/normal
|
||||
|
||||
config cgroup _root_
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys
|
||||
list option cpu.shares=4096
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys_normal
|
||||
list option cpu.shares=1024
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup iopsys_high
|
||||
list option cpu.shares=4096
|
||||
list option memory.limit_in_bytes=-1
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt
|
||||
list option cpu.shares=1024
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt_normal
|
||||
list option cpu.shares=1024
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config cgroup 3prt_high
|
||||
list option cpu.shares=4096
|
||||
list option memory.limit_in_bytes=75M
|
||||
list option memory.move_charge_at_immigrate=1
|
||||
|
||||
config procmap procmap
|
||||
list procmap minidlna=3prt/normal
|
||||
|
||||
123
libcgroup/files/cgroups.init
Executable file
123
libcgroup/files/cgroups.init
Executable file
@@ -0,0 +1,123 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=01
|
||||
USE_PROCD=1
|
||||
#PROCD_DEBUG=1
|
||||
NAME=cgrulesengd
|
||||
|
||||
CGBASEDIR=/sys/fs/cgroup
|
||||
CGCONFIG="cgroups"
|
||||
|
||||
CGRULESCONF=/tmp/cgrules.conf
|
||||
CGCONFIGCONF=/tmp/cgconfig.conf
|
||||
|
||||
|
||||
cgroupinit_add_knob_val_to_list () {
|
||||
CG_KNOB_VAL_LIST="$CG_KNOB_VAL_LIST
|
||||
$1"
|
||||
}
|
||||
|
||||
cgroupinit_create_group () {
|
||||
local cgrp=$1
|
||||
local dir curr
|
||||
|
||||
if [ "$cgrp" == "_root_" ]; then
|
||||
dir=.
|
||||
else
|
||||
dir=$(echo $cgrp |tr '_' '/')
|
||||
fi
|
||||
|
||||
echo -e "group $dir {" >> $CGCONFIGCONF
|
||||
|
||||
CG_KNOB_VAL_LIST=
|
||||
config_list_foreach $cgrp option cgroupinit_add_knob_val_to_list
|
||||
CG_KNOB_VAL_LIST=$(echo "$CG_KNOB_VAL_LIST" |sort)
|
||||
curr="_none_"
|
||||
|
||||
for knob_val in $CG_KNOB_VAL_LIST ; do
|
||||
local ctrlr knob val
|
||||
|
||||
knob=$(echo $knob_val |awk -F= '{print $1}')
|
||||
ctrlr=$(echo $knob |awk -F. '{print $1}')
|
||||
val=$(echo $knob_val |awk -F= '{print $2}')
|
||||
|
||||
if [ "$curr" != "$ctrlr" ]; then
|
||||
[ "$curr" == "_none_" ] || echo -e "\t}" >> $CGCONFIGCONF
|
||||
curr=$ctrlr
|
||||
echo -e "\t$curr {" >> $CGCONFIGCONF
|
||||
fi
|
||||
|
||||
echo -e "\t\t$knob = \"$val\";" >> $CGCONFIGCONF
|
||||
done
|
||||
|
||||
[ "$curr" == "_none_" ] || echo -e "\t}" >> $CGCONFIGCONF
|
||||
echo -e "}\n" >> $CGCONFIGCONF
|
||||
}
|
||||
|
||||
cgroupinit_add_to_rules () {
|
||||
local name_grp=$1
|
||||
local name grp
|
||||
|
||||
name=$(echo $name_grp |awk -F= '{print $1}')
|
||||
grp=$(echo $name_grp |awk -F= '{print $2}')
|
||||
|
||||
echo -e "*:$name\t*\t$grp" >> $CGRULESCONF
|
||||
}
|
||||
|
||||
cgroupinit_generate_config () {
|
||||
local enab defgrp
|
||||
|
||||
config_load $CGCONFIG
|
||||
|
||||
config_get enab cgroups enabled "1"
|
||||
[ $enab -eq 0 ] && return 1
|
||||
|
||||
config_get defgrp cgroups defgroup "_undef_"
|
||||
[ "$defgrp" == "_undef_" ] && return 1
|
||||
|
||||
# mount here instead of in cgconfigparser to get all options right
|
||||
# mounting without any controllers listed means mount all available
|
||||
if ! grep -q " $CGBASEDIR cgroup " /proc/mounts; then
|
||||
mount -t cgroup -o nodev,noexec,nosuid cgroup $CGBASEDIR
|
||||
[ $? -eq 0 ] || return 1
|
||||
fi
|
||||
|
||||
echo -n '' > $CGCONFIGCONF
|
||||
config_foreach cgroupinit_create_group cgroup
|
||||
|
||||
echo -n '' > $CGRULESCONF
|
||||
config_list_foreach procmap procmap cgroupinit_add_to_rules
|
||||
echo -e "*\t*\t$defgrp" >> $CGRULESCONF
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# cgrulesengd has hardcoded paths for configuration files
|
||||
# use symlinks to point to generated config files
|
||||
cgroupinit_cgrulesengd_fixup () {
|
||||
[ -r /etc/cgrules.conf ] || ln -s $CGRULESCONF /etc/cgrules.conf
|
||||
[ -r /etc/cgconfig.conf ] || ln -s $CGCONFIGCONF /etc/cgconfig.conf
|
||||
[ -d /etc/cgconfig.d ] || mkdir /etc/cgconfig.d
|
||||
}
|
||||
|
||||
start_service () {
|
||||
cgroupinit_generate_config
|
||||
[ $? -eq 0 ] || return
|
||||
|
||||
cgroupinit_cgrulesengd_fixup
|
||||
/usr/sbin/cgconfigparser -l $CGCONFIGCONF || return
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/sbin/cgrulesengd --nodaemon --syslog
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service () {
|
||||
/usr/sbin/cgclear
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger $CGCONFIG
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=natalie-dect-h
|
||||
PKG_VERSION:=11.19
|
||||
PKG_VERSION:=12.26
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/natalie-dect-h
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=c2139d05e3d082f1dcf58ce3f19306cb76fd0873
|
||||
PKG_SOURCE_VERSION:=9e2236989ff58d0db897f938b6b07b535144e0e2
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
4
natalie-dect/Config.in
Normal file
4
natalie-dect/Config.in
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
config NATALIE_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
@@ -8,9 +8,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=natalie-dect
|
||||
PKG_VERSION:=11.19
|
||||
PKG_VERSION:=12.26
|
||||
|
||||
PKG_SOURCE_VERSION:=2015e8106c7d541dd038381c2845bd8462d74a30
|
||||
PKG_SOURCE_VERSION:=35fed3a10124bd660b74704011256039ba9cf54d
|
||||
ifeq ($(CONFIG_NATALIE_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
PKG_NAME:=natalie-dect-open
|
||||
else
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:natalie-dect-11.19
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:natalie-dect-12.26
|
||||
PKG_SOURCE_PROTO:=git
|
||||
endif
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ TARGET_CFLAGS += $(FPIC) -std=gnu99
|
||||
|
||||
define Package/netcheck
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libuci +libjson +questd
|
||||
DEPENDS:=+libuci +libjson-c +questd
|
||||
TITLE:=netcheck utility
|
||||
endef
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=6a89f70edec94286a790cbb7c76debec6bb1c873
|
||||
PKG_SOURCE_VERSION:=2a16b98543580d376d5862a34415f24d8be15b27
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se/peripheral_manager
|
||||
|
||||
|
||||
@@ -15,8 +15,9 @@ start_service() {
|
||||
}
|
||||
|
||||
service_running() {
|
||||
ubus -t 2 wait_for leds
|
||||
ubus -t 2 wait_for led.status
|
||||
ubus call led.status set '{"state":"ok"}'
|
||||
ubus -t 2 wait_for button
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
@@ -12,14 +12,14 @@ check_for_config(){
|
||||
if [ -s "/etc/config/ports" ]
|
||||
then
|
||||
debug_print "file exists and has content"
|
||||
if uci -q show ports >/dev/null #are there any valid content then continue
|
||||
if uci -q get ports.@ethport[0] >/dev/null #are there any valid content then continue
|
||||
then
|
||||
return 0
|
||||
else
|
||||
rm -f /etc/config/ports
|
||||
fi
|
||||
fi
|
||||
debug_print "file doesent exsists or is empty"
|
||||
debug_print "ports config file doesn't exsist or is empty"
|
||||
touch /etc/config/ports
|
||||
local portnames="$(db get hw.board.ethernetPortNames)"
|
||||
local portorder="$(db get hw.board.ethernetPortOrder)"
|
||||
|
||||
@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=3.1.0
|
||||
PKG_VERSION:=3.1.6
|
||||
|
||||
PKG_SOURCE_VERSION:=f7e856ec68627842c1e79eadb5b856ec629bb637
|
||||
PKG_SOURCE_VERSION:=2b2f6928fde8ce9f7ab41957418104487b5b8c33
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/questd
|
||||
|
||||
@@ -18,16 +18,21 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
LDFLAGS+= \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/lib
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_bcmkernel),y)
|
||||
BCMKERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
|
||||
QUESTD_CLFAGS:=-DIOPSYS_BROADCOM
|
||||
KERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
QUESTD_CLFAGS:=-DIOPSYS_BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
|
||||
QUESTD_CLFAGS:=-DIOPSYS_MARVELL
|
||||
else ifeq ($(CONFIG_TARGET_lantiq_xrx500),y)
|
||||
QUESTD_CLFAGS:=-DIOPSYS_LANTIQ
|
||||
else
|
||||
BCMKERNEL_DIR:=$(BUILD_DIR)/bcmopen-consumer/bcm963xx
|
||||
$(info (UNEXPECTED CONFIG TARGET))
|
||||
endif
|
||||
export BCMKERNEL_DIR
|
||||
|
||||
export KERNEL_DIR
|
||||
export QUESTD_CLFAGS
|
||||
|
||||
define Package/questd
|
||||
CATEGORY:=Utilities
|
||||
@@ -43,10 +48,10 @@ endef
|
||||
define Package/questd/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_DIR) $(1)/tmp
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/questd $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ueventd $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uscriptd $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wificontrol $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,questd))
|
||||
|
||||
@@ -1268,7 +1268,7 @@ get_call_filter()
|
||||
fi
|
||||
|
||||
local call_filter enabled
|
||||
config_get call_filter $provider call_filter
|
||||
config_get call_filter $provider call_filter "call_filter0"
|
||||
if ! [ -z "$call_filter" -o "$call_filter" == "-" ] ; then
|
||||
macro="Macro($call_filter-$direction)"
|
||||
fi
|
||||
@@ -2213,6 +2213,11 @@ start_service() {
|
||||
|
||||
reload_service() {
|
||||
start
|
||||
|
||||
# turn off voice led; asterisk will turn it on
|
||||
# if there is a registered account
|
||||
ubus call led.voice1 set '{"state":"off"}'
|
||||
|
||||
asterisk -rx "core reload"
|
||||
asterisk -rx "dialplan reload"
|
||||
asterisk -rx "brcm reload"
|
||||
|
||||
@@ -20,7 +20,7 @@ uci -q batch <<-EOT
|
||||
add voice_client ringing_status
|
||||
rename voice_client.@ringing_status[-1]=RINGING_STATUS
|
||||
set voice_client.RINGING_STATUS.status=0
|
||||
set voice_client.RINGING_STATUS.enabled=1
|
||||
set voice_client.RINGING_STATUS.enabled=0
|
||||
set voice_client.RINGING_STATUS.shouldring=1
|
||||
commit voice_client
|
||||
EOT
|
||||
|
||||
@@ -24,7 +24,7 @@ LDFLAGS+= \
|
||||
|
||||
define Package/wifimngr
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libpthread +libstdcpp +librt +libjson alljoyn +ubus +libuci
|
||||
DEPENDS:=+libpthread +libstdcpp +librt +libjson +alljoyn +alljoyn-about +ubus +libuci
|
||||
TITLE:=WiFi Manager
|
||||
endef
|
||||
|
||||
|
||||
Reference in New Issue
Block a user