summaryrefslogtreecommitdiff
path: root/package/system/ubox
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-16 19:26:25 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-16 19:26:25 +0200
commit4dc1eee385f1b5115976db8d6b60ca0a08ed05ce (patch)
tree8c2562a28e69949dee07563a8bedc6029d7acc9a /package/system/ubox
parentbe049529e6a883601fd47303a05165a6a0b9a4a5 (diff)
downloadmtk-20170518-4dc1eee385f1b5115976db8d6b60ca0a08ed05ce.zip
mtk-20170518-4dc1eee385f1b5115976db8d6b60ca0a08ed05ce.tar.gz
mtk-20170518-4dc1eee385f1b5115976db8d6b60ca0a08ed05ce.tar.bz2
package/system: probably from OpenWRT
Diffstat (limited to 'package/system/ubox')
-rw-r--r--package/system/ubox/Makefile4
-rw-r--r--package/system/ubox/files/log.init2
-rw-r--r--package/system/ubox/patches/001-insmod.patch47
3 files changed, 49 insertions, 4 deletions
diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 194789c..2d7ed29 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -1,13 +1,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ubox
-PKG_VERSION:=2014-05-30
+PKG_VERSION:=2015-02-25.1
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://nbd.name/luci2/ubox.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=c3d4118eee505f41c4d20a87f326479530837569
+PKG_SOURCE_VERSION:=31f0ff358b360ee461d845c1b3b5e5d38fa27925
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
CMAKE_INSTALL:=1
PKG_CHECK_FORMAT_SECURITY:=0
diff --git a/package/system/ubox/files/log.init b/package/system/ubox/files/log.init
index be38297..3e06fa5 100644
--- a/package/system/ubox/files/log.init
+++ b/package/system/ubox/files/log.init
@@ -19,7 +19,6 @@ validate_log_section()
'log_port:port:514' \
'log_proto:or("tcp", "udp"):udp' \
'log_prefix:string'
- return $?
}
validate_log_daemon()
@@ -27,7 +26,6 @@ validate_log_daemon()
uci_validate_section system system "${1}" \
'log_size:uinteger:0' \
'log_buffer_size:uinteger:0'
- return $?
}
start_service_daemon()
diff --git a/package/system/ubox/patches/001-insmod.patch b/package/system/ubox/patches/001-insmod.patch
new file mode 100644
index 0000000..af858d9
--- /dev/null
+++ b/package/system/ubox/patches/001-insmod.patch
@@ -0,0 +1,47 @@
+Index: ubox-2015-02-25.1/kmodloader.c
+===================================================================
+--- ubox-2015-02-25.1.orig/kmodloader.c
++++ ubox-2015-02-25.1/kmodloader.c
+@@ -483,14 +483,15 @@ static int insert_module(char *path, con
+ return ret;
+ }
+
+- data = malloc(s.st_size);
+- if (read(fd, data, s.st_size) == s.st_size)
+- ret = syscall(__NR_init_module, data, (unsigned long) s.st_size, options);
+- else
++ data = mmap(NULL, s.st_size, PROT_READ,
++ MAP_PRIVATE, fd, 0);
++ if (data == MAP_FAILED)
+ ERROR("failed to read full module %s\n", path);
++ else
++ ret = syscall(__NR_init_module, data, (unsigned long) s.st_size, options);
+
++ munmap(data, s.st_size);
+ close(fd);
+- free(data);
+
+ return ret;
+ }
+@@ -574,15 +575,18 @@ static int main_insmod(int argc, char **
+ if (argc < 2)
+ return print_insmod_usage();
+
++ if (init_module_folders())
++ return -1;
++
++ if (scan_loaded_modules())
++ return -1;
++
+ name = get_module_name(argv[1]);
+ if (!name) {
+ ERROR("cannot find module - %s\n", argv[1]);
+ return -1;
+ }
+
+- if (scan_loaded_modules())
+- return -1;
+-
+ if (find_module(name)) {
+ ERROR("module is already loaded - %s\n", name);
+ return -1;