Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Commit

Permalink
Bumped revision to 5.1.3 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
paldier committed Nov 25, 2020
1 parent b97193c commit ecae9d7
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 99 deletions.
2 changes: 1 addition & 1 deletion release/src-rt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export PATH := $(RELEASEDIR)/tools:$(SRCBASE)/ctools:$(PATH)
#K3C/K3/SBRAC1900P/SBRAC3200P/R7000/R8000/R7900P/R8000P
export MERLINR_NAME := RTACRH17
export MERLINR_VER_MAJOR :=B
export MERLINR_VER_MINOR :=5.1.2
export MERLINR_VER_MINOR :=5.1.3b
export MERLINR_VER := $(MERLINR_VER_MAJOR)$(MERLINR_VER_MINOR)
export MERLINRVER := $(MERLINR_NAME)_$(MERLINR_VER)
ifeq ($(MERLINR_NAME),RTACRH17)
Expand Down
2 changes: 1 addition & 1 deletion release/src-rt/target.mak
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export RT4G-AC53U := IPV6SUPP=y HTTPS=y SSH=y QCA=y IPQ40XX=y BBEXTRAS=y USBEXTR
export RT-AC82U := IPV6SUPP=y HTTPS=y SSH=y QCA=y IPQ40XX=y BBEXTRAS=y USBEXTRAS=y SAMBA3=y MEDIASRV=y PARENTAL2=y OPENVPN=y VPNC=y EMAIL=y YANDEXDNS=y ACCEL_PPTPD=y PRINTER=y USB="USB" APP="network" EBTABLES=y AUTODICT=y LANWAN_LED=y BUILD_NAME="RT-AC82U" RTAC82U=y SHP=y NVRAM_64K=y TUNEK="n" OPTIMIZE_XBOX=y ODMPID=y BOOT_FLASH_TYPE=NAND MDNS=y FINDASUS=y XHCI=y ATEUSB3_FORCE=y EXT4FS=y TEMPROOTFS=y NTFS="tuxera" TFAT=y HFS="tuxera" DUMP_OOPS_MSG=y DEBUGFS=y \
REBOOT_SCHEDULE=y NOIPTV=y \
DISK_MONITOR=y UBI=y UBIFS=y PSISTLOG=y WPSMULTIBAND=y BLINK_LED=y LAN4WAN_LED=y WANRED_LED=y BTN_WPS_ALLLED=y \
NEW_USER_LOW_RSSI=y REDIRECT_DNAME=y ATF=y QCA_TW_AUTO_BAND4=y STAINFO=y NEWSSID_REV2=y LAN50=y NEW_APP_ARM=y SW_HW_AUTH=y NATNL_AIHOME=y UTF8_SSID=y SOFTCENTER=y SMARTDNS=y FRS_LIVE_UPDATE=y UUPLUGIN=y
NEW_USER_LOW_RSSI=y REDIRECT_DNAME=y ATF=y QCA_TW_AUTO_BAND4=y STAINFO=y NEWSSID_REV2=y LAN50=y NEW_APP_ARM=y SW_HW_AUTH=y NATNL_AIHOME=y UTF8_SSID=y SOFTCENTER=y SMARTDNS=y FRS_LIVE_UPDATE=y UUPLUGIN=n

export MAP-AC1300 := HTTPS=y SSH=y QCA=y IPQ40XX=y PARENTAL2=y EMAIL=y YANDEXDNS=y EBTABLES=y AUTODICT=y BUILD_NAME="MAP-AC1300" NVRAM_64K=y TUNEK="n" OPTIMIZE_XBOX=y ODMPID=y BOOT_FLASH_TYPE=SPI MDNS=y FINDASUS=y TEMPROOTFS=y DEBUGFS=y CFGSYNC=y USB="USB" XHCI=y NOTIFICATION_CENTER=y WLCEVENTD=y \
UBI=y UBIFS=y WPSMULTIBAND=y \
Expand Down
144 changes: 84 additions & 60 deletions release/src/router/httpd/sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,40 +132,45 @@ int ej_show_sysinfo(int eid, webs_t wp, int argc, char_t ** argv)
int count = 0;
char model[64];
#if defined(RTCONFIG_BCMARM) || defined(RTCONFIG_HND_ROUTER) || defined(RTCONFIG_QCA)
#if !defined(RTCONFIG_HND_ROUTER_AX_675X) && !defined(RTCONFIG_HND_ROUTER_AX_6710) && !defined(RTCONFIG_QCA)
tmp = strstr(buffer, "Processor");
if (tmp)
sscanf(tmp, "Processor : %[^\n]", model);
else
#endif
{ // BCM490x
char impl[8], arch[8], variant[8], part[10];
char impl[8], arch[8], variant[8], part[10], revision[4];
impl[0]='\0'; arch[0]='\0'; variant[0]='\0'; part[0]='\0';
strcpy(revision,"0");

tmp = strstr(buffer, "CPU implementer");
sscanf(tmp, "CPU implementer : %7[^\n]s", impl);
if (tmp) sscanf(tmp, "CPU implementer : %7[^\n]s", impl);
tmp = strstr(buffer, "CPU architecture");
sscanf(tmp, "CPU architecture : %7[^\n]s", arch);
if (tmp) sscanf(tmp, "CPU architecture : %7[^\n]s", arch);
tmp = strstr(buffer, "CPU variant");
sscanf(tmp, "CPU variant : %7[^\n]s", variant);
if (tmp) sscanf(tmp, "CPU variant : %7[^\n]s", variant);
tmp = strstr(buffer, "CPU part");
sscanf(tmp, "CPU part : %9[^\n]s", part);
#if defined(RTCONFIG_QCA) || (defined(RTCONFIG_HND_ROUTER_AX_675X) && !defined(RTCONFIG_HND_ROUTER_AX_6710))
if (tmp) sscanf(tmp, "CPU part : %9[^\n]s", part);
tmp = strstr(buffer,"CPU revision");
if (tmp) sscanf(tmp, "CPU revision : %3[^\n]s", revision);
#if defined(RTCONFIG_QCA)
if (!strcmp(impl, "0x41")
&& !strcmp(variant, "0x0")
&& !strcmp(part, "0xc07")
&& !strcmp(arch, "7"))
strcpy(model, "Cortex A7 ARMv7l");
#else//490x or 671x
sprintf(model, "IPQ401x - Cortex A7 ARMv7 revision %s", revision);
#else
if (!strcmp(impl, "0x42")
&& !strcmp(variant, "0x0")
&& !strcmp(part, "0x100")
&& !strcmp(arch, "8"))
strcpy(model, "Cortex A53 ARMv8");
sprintf(model, "BCM490x - Cortex A53 ARMv8 revision %s", revision);
else if (!strcmp(impl, "0x41")
&& !strcmp(variant, "0x0")
&& !strcmp(part, "0xc07")
&& !strcmp(arch, "7"))
sprintf(model, "BCM675x - Cortex A7 ARMv7 revision %s", revision);
else if (!strcmp(impl, "0x41")
&& !strcmp(variant, "0x3")
&& !strcmp(part, "0xc09")
&& !strcmp(arch, "7"))
sprintf(model, "BCM470x - Cortex A7 ARMv7 revision %s", revision);
#endif
else
sprintf(model, "Implementer: %s, Part: %s, Variant: %s, Arch: %s",impl, part, variant, arch);
}
sprintf(model, "Implementer: %s, Part: %s, Variant: %s, Arch: %s, Rev: %s",impl, part, variant, arch, revision);
#elif defined(RTCONFIG_LANTIQ) || defined(RTCONFIG_RALINK)
tmp = strstr(buffer, "system type");
if (tmp)
Expand All @@ -174,7 +179,7 @@ int ej_show_sysinfo(int eid, webs_t wp, int argc, char_t ** argv)
#if defined(RTCONFIG_LANTIQ)
strcpy(model, "GRX500 rev 1.2");
#elif defined(RTCONFIG_RALINK)
strcpy(model, "MT7621");
strcpy(model, "mt7621a");
#endif
#endif
count = sysconf(_SC_NPROCESSORS_CONF);
Expand All @@ -192,9 +197,7 @@ int ej_show_sysinfo(int eid, webs_t wp, int argc, char_t ** argv)
}

} else if(strcmp(type,"cpu.freq") == 0) {
#if defined(RTCONFIG_HND_ROUTER_AX_675X) || defined(RTCONFIG_HND_ROUTER_AX_6710)
strcpy(result, "1500");
#elif defined(RTCONFIG_HND_ROUTER) || defined(RTCONFIG_BCMARM)
#if defined(RTCONFIG_HND_ROUTER) || defined(RTCONFIG_BCMARM)
#if defined(RTCONFIG_HND_ROUTER)
int freq = 0;
char *buffer;
Expand All @@ -206,11 +209,25 @@ int ej_show_sysinfo(int eid, webs_t wp, int argc, char_t ** argv)
free(buffer);
sprintf(result, "%d", freq);
}
#if defined(RTCONFIG_HND_ROUTER_AX_675X)
else if (
#if defined(RTAX55) || defined(RTAX1800)
get_model() == MODEL_RTAX55
#elif defined(RTAX56U)
get_model() == MODEL_RTAX56U
#elif defined(RTAX58U) || defined(TUFAX3000)
get_model() == MODEL_RTAX58U
#elif defined(RTAX82U)
get_model() == MODEL_RTAX82U
#endif
)
strcpy(result, "1500");
#endif
else
#endif
{
tmp = nvram_get("clkfreq");
if (tmp)
tmp = nvram_safe_get("clkfreq");
if (*tmp)
sscanf(tmp,"%[^,]s", result);
}
#elif defined(RTCONFIG_LANTIQ) || defined(RTCONFIG_QCA)
Expand Down Expand Up @@ -404,8 +421,15 @@ int ej_show_sysinfo(int eid, webs_t wp, int argc, char_t ** argv)
free(buffer);
}
unlink("/rom/opt/lantiq/etc/wave_components.ver");
#elif defined(RTCONFIG_QCA) || defined(RTCONFIG_RALINK)
strcpy(result,"Unknow");
#elif defined(RTCONFIG_QCA)
strcpy(result,"Unknow");
#elif defined(RTCONFIG_RALINK)
char buffer[16];
if(get_mtk_wifi_driver_version(buffer, strlen(buffer))>0){
if(*buffer)
strcpy(result,buffer);
} else
strcpy(result,"5.0.4.0");
#endif
#ifdef RTCONFIG_QTN
} else if(strcmp(type,"qtn_version") == 0 ) {
Expand Down Expand Up @@ -622,9 +646,13 @@ unsigned int get_phy_temperature(int radio)
strcpy(buf, "phy_tempsense");

if (radio == 2) {
interface = nvram_get("wl0_ifname");
interface = nvram_safe_get("wl0_ifname");
} else if (radio == 5) {
interface = nvram_get("wl1_ifname");
interface = nvram_safe_get("wl1_ifname");
#if defined(RTAC3200) || defined(RTAC5300) || defined(GTAC5300) || defined(RTAX89U) || defined(GTAX11000) || defined(RTAX92U)
} else if (radio == 52) {
interface = nvram_safe_get("wl2_ifname");
#endif
} else {
return 0;
}
Expand All @@ -637,48 +665,44 @@ unsigned int get_phy_temperature(int radio)
}
#elif defined(RTCONFIG_LANTIQ)
int temp = 0, retval = 0;
char *tmp;
if (radio == 2) {
system("iwpriv wlan0 gTemperature >/tmp/output.txt");
} else if (radio == 5) {
system("iwpriv wlan2 gTemperature >/tmp/output.txt");
} else if (radio == 7) {
system("cut -c25-26 /sys/kernel/debug/ltq_tempsensor/allsensors >/tmp/output.txt");
} else {
return retval;
}
char *buffer = read_whole_file("/tmp/output.txt");

if (buffer) {
if (radio == 7) {
sscanf(buffer, "%d", &temp);
free(buffer);
retval = temp;
} else {
tmp = strstr(buffer, "gTemperature:");
if (tmp) {
sscanf(tmp, "gTemperature:%d", &temp);
free(buffer);
retval = temp;
} else {
free(buffer);
retval = 0;
FILE *fp;

if (radio == 2 || radio == 5) {
char buffer[99];
char iw[]="iwpriv wlan0 gTemperature";
char s[]="wlan0 gTemperature:%%d %%*[0-9 ]";
if (radio == 2) {
snprintf(iw, sizeof(iw), "iwpriv wlan0 gTemperature");
snprintf(s, sizeof(s), "wlan0 gTemperature:%%d %%*[0-9 ]");
} else if (radio == 5) {
snprintf(iw, sizeof(iw), "iwpriv wlan2 gTemperature");
snprintf(s, sizeof(s), "wlan2 gTemperature:%%d %%*[0-9 ]");
}
if ((fp = popen(iw, "r")) != NULL) {
if(fgets(buffer, 99, fp) != NULL) {
sscanf(buffer, s, &temp);
}
pclose(fp);
retval = temp;
}
} else { retval = 99; }
unlink("/tmp/output.txt");
} else if (radio == 7) {
if ((fp = fopen("/sys/kernel/debug/ltq_tempsensor/allsensors", "r")) != NULL) {
fscanf(fp, "TS_CODE= %*[0-9]; TEMP = %d; CH_SEL = %*[0-9]", &temp);
fclose(fp);
retval = (temp/1000);
}
}
return retval;
#elif defined(RTCONFIG_QCA)
int temp = 0, retval = 0;
if (radio == 2) {
system("thermaltool -i wifi0 -get |grep temperature | awk '{print $3}' >/tmp/output.txt");
} else if (radio == 5) {
system("thermaltool -i wifi1 -get |grep temperature | awk '{print $3}' >/tmp/output.txt");
} else if (radio == 7) {
retval = 0;
} else {
return retval;
return retval;//4019 not support
}

char *buffer = read_whole_file("/tmp/output.txt");
if (buffer) {
if (radio != 7) {
Expand Down Expand Up @@ -738,7 +762,7 @@ unsigned int get_wifi_clients(int unit, int querytype)

#ifdef RTCONFIG_QTN
if (unit == 1) {
if ((nvram_match("wl1_unit", "0")) || (!rpc_qtn_ready()))
if ((nvram_match("wl1_radio", "0")) || (!rpc_qtn_ready()))
count = -1;
else if ((querytype == SI_WL_QUERY_ASSOC) &&
(qcsapi_wifi_get_count_associations(name, &association_count) >= 0))
Expand Down
10 changes: 8 additions & 2 deletions release/src/router/httpd/web.c
Original file line number Diff line number Diff line change
Expand Up @@ -5812,7 +5812,7 @@ static int get_fanctrl_info(int eid, webs_t wp, int argc, char_t **argv)
}
#endif

#if defined(RTCONFIG_BCMARM) || defined(RTCONFIG_LANTIQ)
#if defined(RTCONFIG_BCMARM) || defined(RTCONFIG_LANTIQ) || defined(RTCONFIG_QCA) || defined(RTCONFIG_RALINK)
static int get_cpu_temperature(int eid, webs_t wp, int argc, char_t **argv)
{
#ifdef HND_ROUTER
Expand All @@ -5826,11 +5826,15 @@ static int get_cpu_temperature(int eid, webs_t wp, int argc, char_t **argv)

return websWrite(wp, "%3.3f", (double) temperature / 1000);
#elif defined(RTCONFIG_QCA)
#if defined(RTAC82U)
return websWrite(wp, "0");//ipq401x not support
#else
char temperature[6] = { 0 };

if (f_read_string("/sys/class/thermal/thermal_zone0/temp", temperature, sizeof(temperature)) <= 0)
*temperature = '\0';
return websWrite(wp, "%d", safe_atoi(temperature));
#endif
#elif defined(RTCONFIG_LANTIQ)
FILE *fp;
int temperature;
Expand All @@ -5840,6 +5844,8 @@ static int get_cpu_temperature(int eid, webs_t wp, int argc, char_t **argv)
}

return websWrite(wp, "%d", (temperature/1000));
#elif defined(RTCONFIG_RALINK)
return websWrite(wp, "0");//mtk not support
#else
FILE *fp;
int temperature = -1;
Expand Down Expand Up @@ -23692,7 +23698,7 @@ struct ej_handler ej_handlers[] = {
#ifdef RTCONFIG_FANCTRL
{ "get_fanctrl_info", get_fanctrl_info},
#endif
#if defined(RTCONFIG_BCMARM) || defined(RTCONFIG_FANCTRL)
#if defined(RTCONFIG_BCMARM) || defined(RTCONFIG_QCA) || defined(RTCONFIG_LANTIQ) || defined(RTCONFIG_RALINK)
{ "get_cpu_temperature", get_cpu_temperature},
#endif
{ "get_machine_name" , get_machine_name},
Expand Down
8 changes: 8 additions & 0 deletions release/src/router/rc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,14 @@ ifeq ($(RTCONFIG_WTFAST),y)
OBJS += wtfast.o
endif

ifeq ($(RTCONFIG_TCPLUGIN),y)
OBJS += qmacc.o
endif

ifeq ($(RTCONFIG_UUPLUGIN),y)
OBJS += uu.o
endif

ifeq ($(or $(RTCONFIG_PPTPD),$(RTCONFIG_ACCEL_PPTPD)),y)
OBJS += vpn.o
endif
Expand Down
27 changes: 27 additions & 0 deletions release/src/router/rc/uu.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "rc.h"
#include "merlinr.h"

void start_uu(void)
{
stop_uu();

if(getpid()!=1) {
notify_rc("start_uu");
return;
}

if(nvram_get_int("uu_enable"))
#if defined(R8000P) || defined(RTAC3200) || defined(RTAC3100) || defined(EA6700) || defined(RAX20) || defined(SBRAC1900P) || defined(R7000P) || defined(RMAC2100) || defined(TY6201_BCM) || defined(TY6201_RTK)
exec_uu_merlinr();
#else
exec_uu();
#endif
}


void stop_uu(void)
{
doSystem("killall uuplugin_monitor.sh");
if (pidof("uuplugin") > 0)
doSystem("killall uuplugin");
}
6 changes: 0 additions & 6 deletions release/src/router/rc/watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -5350,12 +5350,6 @@ static void softcenter_sig_check()
{
//1=wan,2=nat,3=mount
if(nvram_match("sc_installed", "1")){
//if(!pids("perpd")){
//char *perp_argv[] = { "/jffs/softcenter/perp/perp.sh", "start",NULL };
//pid_t pid;
//_eval(perp_argv, NULL, 0, &pid);
//doSystem("sh /jffs/softcenter/perp/perp.sh start &");
//}
if(nvram_match("sc_wan_sig", "1")) {
if(nvram_match("sc_mount", "1")) {
if(f_exists("/jffs/softcenter/bin/softcenter.sh")) {
Expand Down
Loading

0 comments on commit ecae9d7

Please sign in to comment.