Compare commits

...

45 Commits

Author SHA1 Message Date
Fredrik Åsberg
266995c2b4 questd: update 2016-04-19 16:43:25 +02:00
Sukru Senli
a2220489b3 port_management: populate ports config if it has invalid config 2016-04-19 15:29:34 +02:00
Jonas Höglund
39733b6227 Update feed [ feed_inteno_packages ] package [ asterisk18-mod ]
-------------------------------------------------------------------------------
* 2239c2d Update to new json-c include path
-------------------------------------------------------------------------------
commit 2239c2d0e790abfce7ac0684dbbac1cf9c0aff40
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2016-04-19 14:20:33 +0200

    Update to new json-c include path

Base directory -> /
 res/res_voice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-04-19 14:25:01 +02:00
Jonas Höglund
789d2e2a42 Conditional include for cc branch 2016-04-19 13:54:45 +02:00
Jonas Höglund
353b048596 Fix libjson-c dependency for cc branch 2016-04-19 13:54:06 +02:00
Jonas Höglund
5e50e59c46 Update feed [ feed_inteno_packages ] package [ icwmp ]
-------------------------------------------------------------------------------
* 5de2405 Don't link against old libname
* 88d5361 libjson renamed to libjson-c
-------------------------------------------------------------------------------
commit 5de240514b73aff51301df4d41b88f762bca89df
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2015-10-27 13:46:54 +0100

    Don't link against old libname

Base directory -> /
 configure.ac | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 88d53614f3e698484d8052795eac3ead4f9fc951
Author: Jonas Höglund <jonas.hoglund@embeddednation.com>
Date: 2015-10-27 13:34:13 +0100

    libjson renamed to libjson-c

Base directory -> /
 dm/dmcommon.h                | 2 +-
 dm/dmtree/landevice.h        | 2 +-
 dm/dmtree/layer_2_bridging.c | 2 +-
 dm/dmtree/wandevice.h        | 4 ++--
 dm/dmubus.c                  | 2 +-
 dm/dmubus.h                  | 2 +-
 external.c                   | 2 +-
 jshn.c                       | 4 ----
 8 files changed, 8 insertions(+), 12 deletions(-)
-------------------------------------------------------------------------------
2016-04-18 11:24:10 +02:00
Jonas Höglund
fa134b86f8 Added libpthread to ice-client depends 2016-04-18 10:26:48 +02:00
Jonas Höglund
1258a086bc Fixed download method for cc branch 2016-04-18 10:15:17 +02:00
Sukru Senli
a9d22d5e6b Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* f7e856e add logs method to router object
-------------------------------------------------------------------------------
commit f7e856ec68627842c1e79eadb5b856ec629bb637
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-18 10:00:40 +0200

    add logs method to router object

Base directory -> /
 questd.c | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
-------------------------------------------------------------------------------
2016-04-18 10:01:39 +02:00
Jonas Höglund
b3af9d3695 Updated help message 2016-04-15 15:01:18 +02:00
Kenneth Johansson
e83748b3e4 Update feed [ feed_inteno_packages ] package [ peripheral_manager ]
-------------------------------------------------------------------------------
* bc5b822 add allflash state.
-------------------------------------------------------------------------------
commit bc5b8227410dac75d2525ef1946b842766982830
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-04-15 14:45:17 +0200

    add allflash state.

Base directory -> /
 src/led.c | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-04-15 14:52:30 +02:00
Jonas Höglund
fea6fc95a0 Luci sed not needed anymore as dependency is fixed 2016-04-15 14:12:57 +02:00
Jonas Höglund
ba1337720e Fixed NATALIE_OPEN 2016-04-15 12:33:17 +02:00
Jonas Höglund
1d9619dfd9 Don't remove all luci config parameters 2016-04-15 12:04:47 +02:00
Mats Karrman
8f63a74197 Added new package icgroupd, refs #2521
The icgroupd contains a simple shell script daemon and an procd enabled init script
for configuring cgroups according to uci configuration and launching the daemon.

The daemon will periodically look for new processes in the root cgroup and move
them to sub-groups according to configuration.
2016-04-15 11:53:44 +02:00
Erik Horemans
482a88a65b new ice-client 3.4.1-RC9 2016-04-15 11:50:27 +02:00
Jonas Höglund
351ca030d4 Add OPEN config parameters to the kconfig system 2016-04-15 11:39:13 +02:00
Sukru Senli
b306dffa63 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 13f6e7f add support for activating wps client mode
-------------------------------------------------------------------------------
commit 13f6e7f89f1b0a86820a8239f739a5e8797f95ca
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-14 14:24:15 +0200

    add support for activating wps client mode

Base directory -> /
 questd.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
-------------------------------------------------------------------------------
2016-04-14 19:39:15 +02:00
Jonas Höglund
baeaa7cc4c Revert "new ice-client 3.4.1-RC9"
This reverts commit 378310828c.
2016-04-14 17:51:20 +02:00
Jonas Höglund
df9e651719 Remove wip from genconfig 2016-04-14 14:00:18 +02:00
Jonas Höglund
f8e7362648 Fixed help message 2016-04-14 13:53:43 +02:00
Erik Horemans
378310828c new ice-client 3.4.1-RC9 2016-04-14 09:44:34 +02:00
Sukru Senli
1fa651ddd2 questd 3.1.0 2016-04-13 17:33:58 +02:00
Jonas Höglund
b5b88e6335 Added install_key to iop 2016-04-13 15:27:09 +02:00
Jonas Höglund
d3bf187a66 Fixed spelling error 2016-04-13 11:47:27 +02:00
Jonas Höglund
0afa6e264c Updated description of feeds_update 2016-04-13 11:33:58 +02:00
Jonas Höglund
45e33d565a Added generate_tarballs to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
e6bc413a9b Added genconfig to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
b3c28656a7 Added setup host 2016-04-13 11:33:58 +02:00
Jonas Höglund
7e70ce6c5d Added status command to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
92fafa4245 Renamed script to match command name 2016-04-13 11:33:58 +02:00
Jonas Höglund
50c3c52edd Export feeds_update to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
01fd665c51 Added iop_feeds_update to iop/scripts 2016-04-13 11:33:58 +02:00
Jonas Höglund
3409632353 Fix iop package 2016-04-13 11:33:58 +02:00
Jonas Höglund
0e4cf8941d Add iop package 2016-04-13 11:33:58 +02:00
Jonas Höglund
7d5d9f4fd2 Export update_package to iop 2016-04-13 11:33:58 +02:00
Jonas Höglund
6445cba038 Add update_package to iop/scripts 2016-04-13 11:33:58 +02:00
Sukru Senli
595de81dff layer2interface: for now populate network config ifnames along with layer2 configs 2016-04-12 18:24:03 +02:00
Sukru Senli
67e42d5efd auto populate layer2 configs 2016-04-12 17:50:21 +02:00
Sukru Senli
12000972d7 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 9022b06 handle endianness
* 42dae95 have to use wlctl command for sta_info
* 26eef94 collect sta info
* 4a12062 no more wlctl call
* fad40f0 use broadcom ioctl to get wireless parameters
* 3068e11 make sure dumping ports do not do memory leak
* 1ee4b5c new way of getting usb devices
* d8c7e6c give localtime in integer
* 07ed16a move remove_space function to tools.c
* bf907b0 remove unnecessary strdup calls
-------------------------------------------------------------------------------
commit 9022b06ecd73e1515b499a04894205fa95188deb
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-12 13:47:34 +0200

    handle endianness

Base directory -> /
 broadcom.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
 broadcom.h | 24 +++++++++++++++++++++
 questd.c   |  1 -
 3 files changed, 81 insertions(+), 17 deletions(-)
-------------------------------------------------------------------------------
commit 42dae959983cd079e074947328c7dbc4b10f5848
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-11 12:45:36 +0200

    have to use wlctl command for sta_info

Base directory -> /
 broadcom.c |  52 +++++++++++-----
 broadcom.h |  14 +++++
 questd.c   | 197 ++++++++++++++++++++++++++++++-------------------------------
 questd.h   |   4 +-
 4 files changed, 149 insertions(+), 118 deletions(-)
-------------------------------------------------------------------------------
commit 26eef94febd6db3b0ad157a63fca4fe26aa397dc
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-10 14:29:25 +0200

    collect sta info

Base directory -> /
 broadcom.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 broadcom.h |   2 ++
 questd.c   |  35 +++++++------------
 questd.h   |   6 ++--
 4 files changed, 122 insertions(+), 32 deletions(-)
-------------------------------------------------------------------------------
commit 4a120629f22044d3bf5d07c8c47e0832ff513abe
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-09 23:51:22 +0200

    no more wlctl call

Base directory -> /
 broadcom.c |  85 ++++++++++++++++++++++++++++--------
 broadcom.h | 136 ++++++++++++++++++++++++++++++++++++++++++++--------------
 questd.c   | 142 ++++++++++++++++++++-----------------------------------------
 questd.h   |  13 +++---
 4 files changed, 224 insertions(+), 152 deletions(-)
-------------------------------------------------------------------------------
commit fad40f0ca3a9a6fc9e30af376a0fcaa87d3b213a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-09 19:20:35 +0200

    use broadcom ioctl to get wireless parameters

Base directory -> /
 Makefile           |  12 +-
 bcmwifi_channels.h | 393 +++++++++++++++++++++++++++++++++++++++++++
 broadcom.c         | 254 ++++++++++++++++++++++++++++
 broadcom.h         | 485 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 questd.c           |  72 +++++---
 typedefs.h         |  18 ++
 6 files changed, 1209 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit 3068e11a19e37de37f18ef74659193e9b8d2772d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 15:22:44 +0200

    make sure dumping ports do not do memory leak

Base directory -> /
 port.c   | 18 ++++++++++--------
 questd.c |  4 ++--
 questd.h |  2 +-
 3 files changed, 13 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit 1ee4b5c59361b6ad2515e41bbb6b0b64b021760d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 14:42:11 +0200

    new way of getting usb devices

Base directory -> /
 questd.c | 30 +++++++++++++++++-----------
 questd.h | 14 ++++++-------
 usb.c    | 69 ++++++++++++++++++++++++++++++++--------------------------------
 3 files changed, 61 insertions(+), 52 deletions(-)
-------------------------------------------------------------------------------
commit d8c7e6cc402cb7166082545e21a374c477296218
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 13:23:04 +0200

    give localtime in integer

Base directory -> /
 dumper.c | 5 +++--
 questd.c | 3 ++-
 questd.h | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 07ed16ac80df81fbc13191781ca6f083543ffc4d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 09:57:39 +0200

    move remove_space function to tools.c

Base directory -> /
 questd.h |  1 +
 tools.c  | 17 +++++++++++++++++
 usb.c    | 18 ------------------
 3 files changed, 18 insertions(+), 18 deletions(-)
-------------------------------------------------------------------------------
commit bf907b0089e720d4a9c9680e0321982a105e6906
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 20:49:40 +0200

    remove unnecessary strdup calls

Base directory -> /
 questd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-04-12 13:49:36 +02:00
Sukru Senli
e83347616c Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* fad40f0 use broadcom ioctl to get wireless parameters
* 3068e11 make sure dumping ports do not do memory leak
* 1ee4b5c new way of getting usb devices
* d8c7e6c give localtime in integer
* 07ed16a move remove_space function to tools.c
* bf907b0 remove unnecessary strdup calls
-------------------------------------------------------------------------------
commit fad40f0ca3a9a6fc9e30af376a0fcaa87d3b213a
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-09 19:20:35 +0200

    use broadcom ioctl to get wireless parameters

Base directory -> /
 Makefile           |  12 +-
 bcmwifi_channels.h | 393 +++++++++++++++++++++++++++++++++++++++++++
 broadcom.c         | 254 ++++++++++++++++++++++++++++
 broadcom.h         | 485 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 questd.c           |  72 +++++---
 typedefs.h         |  18 ++
 6 files changed, 1209 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit 3068e11a19e37de37f18ef74659193e9b8d2772d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 15:22:44 +0200

    make sure dumping ports do not do memory leak

Base directory -> /
 port.c   | 18 ++++++++++--------
 questd.c |  4 ++--
 questd.h |  2 +-
 3 files changed, 13 insertions(+), 11 deletions(-)
-------------------------------------------------------------------------------
commit 1ee4b5c59361b6ad2515e41bbb6b0b64b021760d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 14:42:11 +0200

    new way of getting usb devices

Base directory -> /
 questd.c | 30 +++++++++++++++++-----------
 questd.h | 14 ++++++-------
 usb.c    | 69 ++++++++++++++++++++++++++++++++--------------------------------
 3 files changed, 61 insertions(+), 52 deletions(-)
-------------------------------------------------------------------------------
commit d8c7e6cc402cb7166082545e21a374c477296218
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 13:23:04 +0200

    give localtime in integer

Base directory -> /
 dumper.c | 5 +++--
 questd.c | 3 ++-
 questd.h | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
commit 07ed16ac80df81fbc13191781ca6f083543ffc4d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-08 09:57:39 +0200

    move remove_space function to tools.c

Base directory -> /
 questd.h |  1 +
 tools.c  | 17 +++++++++++++++++
 usb.c    | 18 ------------------
 3 files changed, 18 insertions(+), 18 deletions(-)
-------------------------------------------------------------------------------
commit bf907b0089e720d4a9c9680e0321982a105e6906
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 20:49:40 +0200

    remove unnecessary strdup calls

Base directory -> /
 questd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
-------------------------------------------------------------------------------
2016-04-09 19:24:28 +02:00
Sukru Senli
8d2bdd90fd Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* 9eb8f97 show radio isup status
* b18afa1 remove boardinfo method
* b863e0f populate clients every 10 seconds
* 070ceb5 mutex lock whiel populating network
-------------------------------------------------------------------------------
commit 9eb8f9759f74378d9b2617809cd757ca742ec364
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 17:54:31 +0200

    show radio isup status

Base directory -> /
 questd.c | 1 +
 1 file changed, 1 insertion(+)
-------------------------------------------------------------------------------
commit b18afa13382f4271882e01d9ea7aa97d26fde63e
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 17:42:43 +0200

    remove boardinfo method

Base directory -> /
 questd.c | 81 +++++++---------------------------------------------------------
 1 file changed, 8 insertions(+), 73 deletions(-)
-------------------------------------------------------------------------------
commit b863e0f87fdf0f5366c85e2a675d86b4e1ca1f7d
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 16:57:14 +0200

    populate clients every 10 seconds

Base directory -> /
 questd.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
-------------------------------------------------------------------------------
commit 070ceb5cd4ac6e7f8fb8a87c3a74c1c029b9b569
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 13:30:39 +0200

    mutex lock whiel populating network

Base directory -> /
 questd.c | 2 ++
 1 file changed, 2 insertions(+)
-------------------------------------------------------------------------------
2016-04-07 17:55:25 +02:00
Sukru Senli
fef609fb46 Update feed [ feed_inteno_packages ] package [ questd ]
-------------------------------------------------------------------------------
* c93a68d use strncpy to be safe
* 39ca14b show localtime
* dbd1ea5 show filesysem
-------------------------------------------------------------------------------
commit c93a68d9d45fde7a242a57776c0e11327da1d6c4
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 11:30:55 +0200

    use strncpy to be safe

Base directory -> /
 dumper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 39ca14b8ca0397000e402e5c63df50131c3c3841
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 11:20:24 +0200

    show localtime

Base directory -> /
 dumper.c | 5 +++++
 questd.c | 4 +++-
 questd.h | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit dbd1ea580bf442ab971760fecfeecfe83bd44eda
Author: Sukru Senli <sukru.senli@inteno.se>
Date: 2016-04-07 10:41:04 +0200

    show filesysem

Base directory -> /
 questd.c | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
-------------------------------------------------------------------------------
2016-04-07 11:41:44 +02:00
Sukru Senli
169c157cbd update package dependencies for ice-client and wifimngr 2016-04-06 13:36:07 +02:00
Sukru Senli
048546b175 set iup dhcp opts on all management interfaces 2016-04-06 11:29:15 +02:00
27 changed files with 1707 additions and 22 deletions

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk18-mod
PKG_VERSION:=1.8.10.1
PKG_SOURCE_VERSION:=2a1dd4361a14220affb5c9a39d1feff645fd67c7
PKG_SOURCE_VERSION:=2239c2d0e790abfce7ac0684dbbac1cf9c0aff40
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

4
endptcfg/Config.in Normal file
View File

@@ -0,0 +1,4 @@
config ENDPT_OPEN
bool "Use pre-compiled version for Open SDK"
default n

View File

@@ -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) \

4
ice-client/Config.in Normal file
View File

@@ -0,0 +1,4 @@
config ICE_OPEN
bool "Use pre-compiled version for Open SDK"
default n

View File

@@ -16,14 +16,14 @@ 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:=RC8
PKG_RELEASE:=RC9
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:=ecad8b60183b43ecf86543c0c29db46cda8aae29
PKG_SOURCE_VERSION:=d3065ee24d72d3fffd5ff75b617bf54fb5377561
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
@@ -34,7 +34,7 @@ else
PKG_SOURCE_URL:=ssh://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_SOURCE_PROTO:=git
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--################################
@@ -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
@@ -897,10 +901,20 @@ endef
define Package/ice-client-bcmspeedmgr/install
$(INSTALL_DIR) $(1)/bin
$(CP) $(PKG_BUILD_DIR)/daemons/bcmspeedmgr/obj/iopsys/bcmspeedmgr $(1)/bin
$(CP) $(PKG_BUILD_DIR)/daemons/bcmspeedmgr/obj/iopsys/speedsvc $(1)/bin
$(INSTALL_DIR) $(1)/etc/init.d
$(CP) $(PKG_BUILD_DIR)/platforms/iopsys/bcmspeedtestservice $(1)/etc/init.d/bcmspeedtestservice
endef
define Package/ice-client-bcmspeedmgr/postinst
#!/bin/sh
/etc/init.d/bcmspeedtestservice stop
/etc/init.d/bcmspeedtestservice start
exit 0
endef
endif
# This line executes the necessary commands to compile our program.
# The above define directives specify all the information needed, but this
# line calls BuildPackage which in turn actually uses this information to

46
icgroupd/Makefile Normal file
View 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
View 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

View 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
View 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
}

View File

@@ -12,7 +12,7 @@ PKG_VERSION:=3.0-2016-03-30
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=dc22607a3da41e5c3c095dc5fed33d4ec7b3fbb5
PKG_SOURCE_VERSION:=5de240514b73aff51301df4d41b88f762bca89df
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

34
iop/Makefile Normal file
View 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))

62
iop/scripts/feeds_update.sh Executable file
View File

@@ -0,0 +1,62 @@
#! /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_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"

257
iop/scripts/genconfig.sh Executable file
View File

@@ -0,0 +1,257 @@
#!/bin/bash
function genconfig {
export CLEAN=0
export IMPORT=0
export SRCTREEOVERR=0
export FILEDIR="files/"
export CONFIGPATH="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
# Base config on master
v "Config $BOARDTYPE selected"
v "cp $CONFIGPATH/MASTER/config .config"
cp $CONFIGPATH/MASTER/config .config
# Apply profile diff to master config if selected
if [ -n "$PROFILE" ]; then
if [ -e "$CONFIGPATH/MASTER/$PROFILE.diff" ]; then
generate_config configs/MASTER/$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"
generate_config $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
# Set default values based on selected parameters
make defconfig
# 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 1 ] && sed -i 's/CONFIG_BCM_OPEN=y/# CONFIG_BCM_OPEN is not set/g' .config
[ $iceAllowed -eq 1 ] && echo "# CONFIG_ICE_OPEN is not set" >> .config || echo "CONFIG_ICE_OPEN=y" >> .config
[ $endptAllowed -eq 1 ] && echo "# CONFIG_ENDPT_OPEN is not set" >> .config || echo "CONFIG_ENDPT_OPEN=y" >> .config
[ $natalieAllowed -eq 1 ] && echo "# CONFIG_NATALIE_OPEN is not set" >> .config || echo "CONFIG_NATALIE_OPEN=y" >> .config
else
echo "CONFIG_ICE_OPEN=y" >> .config
echo "CONFIG_ENDPT_OPEN=y" >> .config
echo "CONFIG_NATALIE_OPEN=y" >> .config
fi
# Temporary fixup for juci/luci profile
if [ "$PROFILE" == "luci" ]; then
sed -i '/CONFIG_DEFAULT_juci/d' .config
sed -i '/CONFIG_PACKAGE_juci/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"

View 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-brcm*
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
View 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"

175
iop/scripts/setup_host.sh Executable file
View File

@@ -0,0 +1,175 @@
#!/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_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
read -p "Do you approve insallation of these packages (y/n): " ans
if [ "$ans" == "y" ]; then
apt-get install $packages_all
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"

20
iop/scripts/status.sh Executable file
View 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
View 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"

View File

@@ -13,6 +13,23 @@ include /lib/network
CRONPATH="/etc/crontabs/root"
RANGE=60
management_interfaces() {
local DHCP_IFACES=""
is_notbridged_dhcp() {
local config="$1"
local proto="$(uci -q get network.$config.proto)"
local typ="$(uci -q get network.$config.type)"
if [ "$proto" == "dhcp" -a "$typ" != "bridge" ]; then
DHCP_IFACES="$DHCP_IFACES $config"
fi
}
config_load network
config_foreach is_notbridged_dhcp interface
echo $DHCP_IFACES
}
init_iup() {
local interval
local starttime
@@ -35,9 +52,9 @@ init_iup() {
local newreqopts=
local baseopts=
local reqopts="$(uci -q get network.wan.reqopts)"
local proto="$(uci -q get network.wan.proto)"
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
@@ -53,12 +70,13 @@ init_iup() {
*) newreqopts="$newreqopts $ropt" ;;
esac
done
if [ "$proto" == "dhcp" ]; then
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
uci -q set network.wan.reqopts="$newreqopts"
uci commit network
ubus call network reload
fi
newreqopts="$(echo $newreqopts | tr ' ' '\n' | sort -n | tr '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')"
for net in $(management_interfaces); do
uci -q set network.$net.reqopts="$newreqopts"
done
uci commit network
ubus call network reload
#################################################################
if [ $interval == "weekly" ]; then

View File

@@ -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

4
natalie-dect/Config.in Normal file
View File

@@ -0,0 +1,4 @@
config NATALIE_OPEN
bool "Use pre-compiled version for Open SDK"
default n

View File

@@ -46,6 +46,10 @@ define Package/natalie-dect/description
Kernel dect driver
endef
define Package/natalie-dect/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(CONFIG_NATALIE_OPEN),y)
define Build/Compile
endef

View File

@@ -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

View File

@@ -12,7 +12,7 @@ PKG_NAME:=peripheral_manager
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=8be3060315f010fbf1bde723e0674e4a65fa9ccb
PKG_SOURCE_VERSION:=bc5b8227410dac75d2525ef1946b842766982830
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se/peripheral_manager

View File

@@ -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)"

View File

@@ -6,9 +6,9 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=3.0.2
PKG_VERSION:=3.1.0
PKG_SOURCE_VERSION:=dd7371d62252de413d763c2cd7d1317e6e87394f
PKG_SOURCE_VERSION:=17c891b668f3149b4a6572f6848eee7e70677758
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/questd

View File

@@ -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