mirror of
https://github.com/DigitalDevices/octonet.git
synced 2023-10-10 11:36:52 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfda1b722b | ||
|
|
4f4441a68e | ||
|
|
28f48ece42 | ||
|
|
ddcf792c6a | ||
|
|
1fe49c7f2d | ||
|
|
88574173d9 | ||
|
|
a0e2ee78dc | ||
|
|
3d45ccf6fc | ||
|
|
03a15dd9ee | ||
|
|
b6f4ff3206 | ||
|
|
f4c574cccd |
@@ -1,6 +1,7 @@
|
||||
BR2_arm=y
|
||||
BR2_CCACHE=y
|
||||
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk"
|
||||
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches"
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_PATH="$(TOPDIR)/output-octonet-tc/host/usr"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
BR2_arm=y
|
||||
BR2_CCACHE=y
|
||||
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk"
|
||||
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches"
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_PATH="$(TOPDIR)/output-octonet-tc/host/usr"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
BR2_arm=y
|
||||
BR2_CCACHE=y
|
||||
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL)/board/digitaldevices/octonet/local.mk"
|
||||
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches"
|
||||
BR2_KERNEL_HEADERS_3_17=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
|
||||
|
||||
12
buildroot.octonet/patches/dvb-apps/dvb-apps.perl-fix.patch
Normal file
12
buildroot.octonet/patches/dvb-apps/dvb-apps.perl-fix.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -rup ../../output-octonet.old/build/dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan/Makefile dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan/Makefile
|
||||
--- ../../output-octonet.old/build/dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan/Makefile 2016-08-18 16:14:43.996732820 +0200
|
||||
+++ dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan/Makefile 2016-11-15 18:40:08.830614417 +0100
|
||||
@@ -25,6 +25,6 @@ $(binaries): $(objects)
|
||||
$(objects): atsc_psip_section.c atsc_psip_section.h
|
||||
|
||||
atsc_psip_section.c atsc_psip_section.h:
|
||||
- perl section_generate.pl atsc_psip_section.pl
|
||||
+ perl section_generate.pl ./atsc_psip_section.pl
|
||||
|
||||
include ../../Make.rules
|
||||
Only in dvb-apps-3d43b280298c39a67d1d889e01e173f52c12da35/util/scan: Makefile~
|
||||
6
mk.patch
6
mk.patch
@@ -13,9 +13,9 @@ if [ ! -e buildroot ]; then
|
||||
fi
|
||||
tar xf buildroot-2015.02-rc2.tar.bz2
|
||||
mv buildroot-2015.02-rc2 buildroot
|
||||
cp dvb-apps-0002-Fix-broken-bitops-on-arm.patch buildroot/package/dvb-apps/
|
||||
cp busybox-0001-Fix-zcip-arp-compare.patch buildroot/package/busybox/
|
||||
cp lzop-0001-ACC.patch buildroot/package/lzop/
|
||||
# cp dvb-apps-0002-Fix-broken-bitops-on-arm.patch buildroot/package/dvb-apps/
|
||||
# cp busybox-0001-Fix-zcip-arp-compare.patch buildroot/package/busybox/
|
||||
# cp lzop-0001-ACC.patch buildroot/package/lzop/
|
||||
if [ -e dl ]; then
|
||||
ln -sf ../dl buildroot
|
||||
fi
|
||||
|
||||
@@ -1108,16 +1108,6 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
|
||||
if (!fe->type)
|
||||
return -1;
|
||||
|
||||
if (fe->type & (1UL << SYS_DVBS2))
|
||||
os->dvbs2num++;
|
||||
if (fe->type & (1UL << SYS_DVBT2))
|
||||
os->dvbt2num++;
|
||||
else if (fe->type & (1UL << SYS_DVBT))
|
||||
os->dvbtnum++;
|
||||
if (fe->type & (1UL << SYS_DVBC2))
|
||||
os->dvbc2num++;
|
||||
else if (fe->type & (1UL << SYS_DVBC_ANNEX_A))
|
||||
os->dvbcnum++;
|
||||
fe->os = os;
|
||||
fe->anum = a;
|
||||
fe->fnum = f;
|
||||
@@ -1142,7 +1132,19 @@ static int init_fe(struct octoserve *os, int a, int f, int fd, int nodvbt, int m
|
||||
}
|
||||
}
|
||||
}
|
||||
os->dvbfe_num++;
|
||||
|
||||
if (fe->type & (1UL << SYS_DVBS2))
|
||||
os->dvbs2num++;
|
||||
if (fe->type & (1UL << SYS_DVBT2))
|
||||
os->dvbt2num++;
|
||||
else if (fe->type & (1UL << SYS_DVBT))
|
||||
os->dvbtnum++;
|
||||
if (fe->type & (1UL << SYS_DVBC2))
|
||||
os->dvbc2num++;
|
||||
else if (fe->type & (1UL << SYS_DVBC_ANNEX_A))
|
||||
os->dvbcnum++;
|
||||
|
||||
os->dvbfe_num++;
|
||||
pthread_mutex_init(&fe->mutex, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -151,3 +151,92 @@ time_t mtime(time_t *t)
|
||||
return ts.tv_sec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
struct nlreq {
|
||||
struct nlmsghdr n;
|
||||
struct rtmsg r;
|
||||
char buf[1024];
|
||||
};
|
||||
|
||||
int nlrequest(int fd, struct nlmsghdr *n, unsigned char *gw)
|
||||
{
|
||||
char buf[1024];
|
||||
int rtl, len = 0, c;
|
||||
struct nlmsghdr *nlp;
|
||||
struct sockaddr_nl snl;
|
||||
struct iovec iov = { (void *) n, n->nlmsg_len };
|
||||
struct msghdr msg = { (void *) &snl, sizeof(snl),
|
||||
&iov, 1, NULL, 0, 0 };
|
||||
char *p = (char *) buf;
|
||||
|
||||
memset(&snl, 0, sizeof(snl));
|
||||
snl.nl_family = AF_NETLINK;
|
||||
sendmsg(fd, &msg, 0);
|
||||
while (1) {
|
||||
iov.iov_base = p;
|
||||
iov.iov_len = sizeof(buf) - len;
|
||||
c = recvmsg(fd, &msg, 0);
|
||||
if (c < 0)
|
||||
return -1;
|
||||
if (c == 0)
|
||||
break;
|
||||
nlp = (struct nlmsghdr *)p;
|
||||
if (nlp->nlmsg_type == NLMSG_DONE)
|
||||
break;
|
||||
if (nlp->nlmsg_type == NLMSG_ERROR)
|
||||
break;
|
||||
p += c;
|
||||
len += c;
|
||||
break;
|
||||
}
|
||||
for (nlp = (struct nlmsghdr *) buf; NLMSG_OK(nlp, len); nlp = NLMSG_NEXT(nlp, len)) {
|
||||
struct rtmsg *rtp = (struct rtmsg *) NLMSG_DATA(nlp);
|
||||
struct rtattr *rtap = (struct rtattr *) RTM_RTA(rtp);
|
||||
|
||||
for (rtl = RTM_PAYLOAD(nlp); RTA_OK(rtap, rtl); rtap = RTA_NEXT(rtap, rtl)) {
|
||||
switch (rtap->rta_type) {
|
||||
case RTA_GATEWAY:
|
||||
memcpy(gw, RTA_DATA(rtap), 24);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int get_route(unsigned char *ip)
|
||||
{
|
||||
struct sockaddr_nl snl;
|
||||
struct nlreq req;
|
||||
struct nlmsghdr *n = &req.n;
|
||||
struct rtattr *rta;
|
||||
int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||
|
||||
memset(&snl, 0, sizeof(snl));
|
||||
snl.nl_family = AF_NETLINK;
|
||||
snl.nl_pid = getpid();
|
||||
bind(fd, (struct sockaddr *) &snl, sizeof(snl));
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
|
||||
req.n.nlmsg_type = RTM_GETROUTE;
|
||||
req.n.nlmsg_flags = NLM_F_REQUEST;
|
||||
req.r.rtm_family = AF_INET;
|
||||
//req.r.rtm_flags |= RTM_F_LOOKUP_TABLE;
|
||||
req.r.rtm_table = 0;
|
||||
req.r.rtm_dst_len = 32;
|
||||
|
||||
rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
|
||||
rta->rta_type = RTA_DST;
|
||||
rta->rta_len = RTA_LENGTH(4);
|
||||
memcpy(RTA_DATA(rta), ip, 4);
|
||||
n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_LENGTH(4);
|
||||
|
||||
nlrequest(fd, n, ip);
|
||||
printf("IP/GW = %u.%u.%u.%u\n", ip[0], ip[1], ip[2], ip[3]);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,6 +126,9 @@ static int get_mac(char *ifname, struct sockaddr *sadr, uint8_t *mac)
|
||||
struct arpreq arpreq;
|
||||
int s;
|
||||
|
||||
if (sadr->sa_family == AF_INET)
|
||||
get_route(&((struct sockaddr_in *) sadr)->sin_addr);
|
||||
|
||||
s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (s < 0)
|
||||
return -1;
|
||||
@@ -1423,20 +1426,22 @@ static int merge_pids(struct dvb_params *op, struct dvb_params *p)
|
||||
{
|
||||
int i, r = 0;
|
||||
|
||||
dbgprintf(DEBUG_SYS, "merge_pids\n");
|
||||
|
||||
if (p->set & (1UL << PARAM_PID))
|
||||
for (i = 0 ; i < 1024 ; i++)
|
||||
for (i = 0; i < 1024; i++)
|
||||
if (op->pid[i] != p->pid[i]) {
|
||||
r |= 1;
|
||||
op->pid[i] = p->pid[i];
|
||||
}
|
||||
if (p->set & (1UL << PARAM_APID))
|
||||
for (i = 0 ; i < 1024 ; i++)
|
||||
if (!(op->pid[i] & p->pid[i])) {
|
||||
for (i = 0; i < 1024; i++)
|
||||
if ((~op->pid[i]) & p->pid[i]) {
|
||||
r |= 2;
|
||||
op->pid[i] |= p->pid[i];
|
||||
}
|
||||
if (p->set & (1UL << PARAM_DPID))
|
||||
for (i = 0 ; i < 1024 ; i++)
|
||||
for (i = 0; i < 1024; i++)
|
||||
if (op->pid[i] & p->dpid[i]) {
|
||||
r |= 4;
|
||||
op->pid[i] &= ~p->dpid[i];
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#include <linux/sockios.h>
|
||||
#include <linux/filter.h>
|
||||
#include <time.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
|
||||
#include <libdvben50221/en50221_stdcam.h>
|
||||
|
||||
@@ -537,5 +538,6 @@ int sendlen(int sock, char *buf, int len);
|
||||
int sendstring(int sock, char *fmt, ...);
|
||||
|
||||
time_t mtime(time_t *t);
|
||||
int get_route(unsigned char *ip);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,6 +53,8 @@ local StartIndex = 1
|
||||
local count = interval
|
||||
local fanstate = -1
|
||||
|
||||
sleep(30)
|
||||
|
||||
local ddbridge = io.open("/sys/class/ddbridge/ddbridge0/devid0","r");
|
||||
if ddbridge then
|
||||
local devid = ddbridge:read("*l")
|
||||
@@ -70,8 +72,6 @@ if ddbridge then
|
||||
end
|
||||
end
|
||||
|
||||
sleep(30)
|
||||
|
||||
for i = 0,4,1 do
|
||||
temp = ReadTemp(i)
|
||||
if temp > 0 then
|
||||
@@ -91,7 +91,7 @@ if NumSensors == 0 then
|
||||
end
|
||||
|
||||
while true do
|
||||
sleep(1)
|
||||
sleep(1)
|
||||
temps = ""
|
||||
for i = 0, NumSensors - 1, 1 do
|
||||
temp = ReadTemp(Sensor[i])
|
||||
|
||||
@@ -106,7 +106,11 @@ function SaveSettings()
|
||||
param += "strict=" + (NewSettings.strictEnabled?"1":"0");
|
||||
}
|
||||
|
||||
location.replace('/systemsettings.lua?'+param);
|
||||
document.getElementById("SetButton").disabled = true;
|
||||
if( param != "" )
|
||||
{
|
||||
location.replace('/systemsettings.lua?'+param);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +85,11 @@ function GetMSMode()
|
||||
local msmode = "quad"
|
||||
local tmp = io.open("/config/msmode")
|
||||
if tmp then
|
||||
msmode = tmp:read("*l")
|
||||
local t = tmp:read("*l")
|
||||
tmp:close()
|
||||
if t then
|
||||
msmode = t
|
||||
end
|
||||
elseif ReadSetting('noswitch') == "true" then
|
||||
msmode = "none"
|
||||
end
|
||||
@@ -162,6 +165,7 @@ if query ~= "" then
|
||||
if name == "strict" then restart = 1 end
|
||||
end
|
||||
end
|
||||
os.execute("/bin/sync >/dev/null 2>&1");
|
||||
if restart == 1 then
|
||||
os.execute("/etc/init.d/S99octo restartoctonet > /dev/null 2>&1 &")
|
||||
nextloc = "wait.html?10"
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
|
||||
#ifndef _OCTOSERVE_VERSION_
|
||||
#define _OCTOSERVE_VERSION_
|
||||
#define OCTOSERVE_VERSION "1.0.72"
|
||||
#define OCTOSERVE_VERSION "1.0.78"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user