-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
41 lines (37 loc) · 2.07 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
因为程序默认是用在openwrt上的,寄存器操作也是针对openwrt的,在bcm sdk里这个操作是有问题的,会造成reset按钮电平被无限拉低且不可拉高,修复这个问题,同时更换为sdk的gpio设置方式
merlin:
makefile
k3screenctrl/Makefile: sw-auth-lite
cd k3screenctrl && autoreconf -i -f && CC=$(CC) STRIP=$(STRIP) \
CFLAGS=" -std=gnu99 -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/nvram${BCMEX} -I$(TOP)/shared -I$(SRCBASE)/shared/bcmwifi/include -I$(SRCBASE)/include -I$(KERNEL_HEADER_DIR) -I$(TOP)/curl-7.21.7/include -I$(TOP)/json-c -I$(TOP)/openssl/include -I$(SRCBASE)/common/include -I$(TOP)/sw-auth-lite" \
LDFLAGS="$(EXTRALDFLAGS) -L$(TOP)/nvram${BCMEX} -lnvram -L$(TOP)/shared -lshared -L$(TOP)/curl-7.21.7/lib/.libs -lcurl -L$(TOP)/json-c/.libs -ljson-c -L$(TOP)/openssl -lcrypto -lssl -ldl -L$(TOP)/sw-auth-lite -lsw_auth" \
$(CONFIGURE) --target=arm-linux --host=arm-linux --build=x86_64-linux-gnu --prefix=""
k3screenctrl: k3screenctrl/Makefile
$(MAKE) -C $@ && $(MAKE) $@-stage
k3screenctrl-clean:
[ ! -f k3screenctrl/Makefile ] || $(MAKE) -C k3screenctrl -f Makefile distclean
k3screenctrl-install: k3screenctrl
install -D k3screenctrl/src/k3screenctrl $(INSTALLDIR)/k3screenctrl/usr/sbin/k3screenctrl
install -D k3screenctrl/src/k3screend $(INSTALLDIR)/k3screenctrl/usr/sbin/k3screend
$(STRIP) $(INSTALLDIR)/k3screenctrl/usr/sbin/k3screenctrl
$(STRIP) $(INSTALLDIR)/k3screenctrl/usr/sbin/k3screend
init
int k3screenb(){
_dprintf("....k3screen start b....\n");
char *timeout;
doSystem("mkdir -p /tmp/k3screenctrl");
doSystem("killall -q -9 phi_speed wl_cr uhmi k3screenctrl update_weather k3screend 2>/dev/null");
//doSystem("/usr/sbin/k3screend &");
//doSystem("chmod +x /tmp/k3screenctrl/*.sh");
if (nvram_get_int("k3screen_timeout")==1)
timeout = "-m0";
else
timeout = "-m30";
char *k3screenctrl_argv[] = { "k3screenctrl", timeout,NULL };
char *k3screend_argv[] = { "k3screend",NULL };
pid_t pid;
_eval(k3screend_argv, NULL, 0, &pid);
_eval(k3screenctrl_argv, NULL, 0, &pid);
_dprintf("....k3screen ok....\n");
return 0;
}