summaryrefslogtreecommitdiff
path: root/package/system/procd
diff options
context:
space:
mode:
Diffstat (limited to 'package/system/procd')
-rw-r--r--package/system/procd/Makefile4
-rw-r--r--package/system/procd/files/nand.sh16
-rw-r--r--package/system/procd/files/procd.sh2
-rw-r--r--package/system/procd/patches/000-skip-watchdog.patch14
4 files changed, 32 insertions, 4 deletions
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 840778a..de73784 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=procd
-PKG_VERSION:=2014-07-30
+PKG_VERSION:=2014-09-15
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://nbd.name/luci2/procd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=35e01a9601292b2f609e65c2ddb3990cba8f378e
+PKG_SOURCE_VERSION:=c1a558f7d0c1e6c1ffa5a47d557a7b45205eef1d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
CMAKE_INSTALL:=1
diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
index 4aa56e3..fd2f943 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -10,6 +10,18 @@ CI_KERNPART="kernel"
# 'ubi' partition on NAND contains UBI
CI_UBIPART="ubi"
+ubi_mknod() {
+ local dir="$1"
+ local dev="/dev/$(basename $dir)"
+
+ [ -e "$dev" ] && return 0
+
+ local devid="$(cat $dir/dev)"
+ local major="${devid%%:*}"
+ local minor="${devid##*:}"
+ mknod "$dev" c $major $minor
+}
+
nand_find_volume() {
local ubidevdir ubivoldir
ubidevdir="/sys/devices/virtual/ubi/$1"
@@ -18,6 +30,7 @@ nand_find_volume() {
[ ! -d "$ubivoldir" ] && continue
if [ "$( cat $ubivoldir/name )" = "$2" ]; then
basename $ubivoldir
+ ubi_mknod "$ubivoldir"
return 0
fi
done
@@ -33,6 +46,7 @@ nand_find_ubi() {
[ ! "$mtdnum" ] && continue
if [ "$mtdnum" = "$cmtdnum" ]; then
ubidev=$( basename $ubidevdir )
+ ubi_mknod "$ubidevdir"
echo $ubidev
return 0
fi
@@ -122,7 +136,7 @@ nand_upgrade_prepare_ubi() {
ubiattach -m "$mtdnum"
sync
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
- [ -z "$has_env" ] || {
+ [ "$has_env" -gt 0 ] && {
ubimkvol /dev/$ubidev -n 0 -N ubootenv -s 1MiB
ubimkvol /dev/$ubidev -n 1 -N ubootenv2 -s 1MiB
}
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 1b19ba9..6d4cd9e 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -75,7 +75,7 @@ _procd_close_service() {
}
_procd_add_array_data() {
- while [ -n "$1" ]; do
+ while [ "$#" -gt 0 ]; do
json_add_string "" "$1"
shift
done
diff --git a/package/system/procd/patches/000-skip-watchdog.patch b/package/system/procd/patches/000-skip-watchdog.patch
new file mode 100644
index 0000000..88581b5
--- /dev/null
+++ b/package/system/procd/patches/000-skip-watchdog.patch
@@ -0,0 +1,14 @@
+Index: procd-2014-09-15/watchdog.c
+===================================================================
+--- procd-2014-09-15.orig/watchdog.c
++++ procd-2014-09-15/watchdog.c
+@@ -97,7 +97,8 @@ void watchdog_init(int preinit)
+
+ if (wdt_fd >= 0)
+ return;
+-
++ //skip watch_dog
++ return;
+ wdt_timeout.cb = watchdog_timeout_cb;
+ if (env) {
+ DEBUG(2, "Watchdog handover: fd=%s\n", env);