[LEDE-DEV] [PATCH] ar71xx: add support for Ubiquiti Litebeam M5
Specification: - SoC: Atheros AR9342 - Flash: 8 MiB - RAM: 64 MiB - UART: 1x UART on PCB - 115200 8N1 - Ethernet: 1 x 100 Mbit with passive PoE (24V/0.2A) Doesn't work: * Flash via TFTP with Uiquiti Uboot Installation via vendor firmware: - upload factory image via webinterface Signed-off-by: Arne Zachlod--- target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 ++ .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + .../ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c| 58 ++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/ubnt.mk | 7 +++ 8 files changed, 79 insertions(+) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index e5baa90db8..79fc8ec5e2 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -147,6 +147,11 @@ rocket-m-xw) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100" "-50" "13" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100" "-75" "13" ;; +lbe-m5) + ucidef_set_led_netdev "lan" "LAN" "ubnt:green:lan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "ubnt:green:wlan" "phy0tpt" + ucidef_set_led_default "sys" "SYS" "ubnt:green:sys" "1" + ;; rocket-m-ti) ucidef_set_led_rssi "rssiverylow" "RSSIVERYLOW" "ubnt:green:link1" "wlan0" "1" "100" "0" "13" ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:green:link2" "wlan0" "26" "100" "-25" "13" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index fb61792bf4..86d6ffd91d 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -78,6 +78,7 @@ ar71xx_setup_interfaces() fritz300e|\ gl-usb150|\ hiveap-121|\ + lbe-m5|\ loco-m-xw|\ mr12|\ mr16|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 6cbb3576d8..f37541c75f 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -103,6 +103,9 @@ get_status_led() { rocket-m-xw) status_led="ubnt:green:link4" ;; + lbe-m5) + status_led="ubnt:green:sys" + ;; rocket-m-ti) status_led="ubnt:green:link6" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index b5440230a5..00a4acc6e0 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -711,6 +711,9 @@ ar71xx_board_detect() { *"Lima"*) name="lima" ;; + *"Litebeam M5"*) + name="lbe-m5" + ;; *"Loco M XW") name="loco-m-xw" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index ecf6820a2b..4e839f12c1 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -248,6 +248,7 @@ platform_check_image() { hiwifi-hc6361|\ hornet-ub-x2|\ jwap230|\ + lbe-m5|\ lima|\ loco-m-xw|\ mzk-w04nu|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c index 55cf52d19e..8afb3ad054 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-xm.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -503,6 +504,60 @@ static void __init ubnt_loco_m_xw_setup(void) ath79_register_eth(0); } +#define UBNT_LBE_M5_GPIO_LED_LAN 13 +#define UBNT_LBE_M5_GPIO_LED_WLAN 14 +#define UBNT_LBE_M5_GPIO_LED_SYS 16 + +static struct gpio_led ubnt_lbe_m5_leds_gpio[] __initdata = { + { + .name = "ubnt:green:lan", + .gpio = UBNT_LBE_M5_GPIO_LED_LAN, + .active_low = 1, + }, { + .name = "ubnt:green:wlan", + .gpio = UBNT_LBE_M5_GPIO_LED_WLAN, + .active_low = 1, + }, { + .name = "ubnt:green:sys", + .gpio = UBNT_LBE_M5_GPIO_LED_SYS, + .active_low = 1, + }, +}; + +static void __init
Re: [LEDE-DEV] DDNS for ipv6
Hi Christian, I revert all ddns related changes. It looks like that the changes are not the root cause. I check my old log files. The issue did start with my build from 16th of December. Independently of this, I'm the opinion, ddns for ipv6 can't work with a deal-in or modem connection. My wan interface is pppoe-wan. If the logical interface wan_6 is started, it (or pppoe-wan) doesn't have a global ipv6 address. It does only have a link local address. The global address is assigned later. If the ddns script is started before the global address is assigned, the script will be stopped and never restart. Regards, Hartmut Am 15.01.2018 um 21:44 schrieb Christian Schoenebeck: > Hi Hartmut, > > either try newest scripts from github (updated last weekend) > > or insert "network_flush_cache" at about line 900 inside > dynamic_dns_functions.sh function get_local_ip() > > while : ; do > if [ -n "$ip_network" ]; then > # set correct program > -->> network_flush_cache # force re-read data from ubus > [ $use_ipv6 -eq 0 ] && __RUNPROG="network_get_ipaddr" \ > || __RUNPROG="network_get_ipaddr6" > > or set option ip_source "interface" instead of "network" > > Christian > > > Am 15.01.2018 um 18:39 schrieb e9hack: >> Hi, >> >> ddns for ipv6 doesn't work since the last few updates related to the ddns >> package. From log file: >> >> Mon Jan 15 17:35:21 2018 user.notice DEBUG: hotplug igmpproxy: device >> 'wan_6' action 'ifup' >> Mon Jan 15 17:35:22 2018 user.notice ddns-scripts[7394]: dynv6_ipv6: PID >> '7394' started at 2018-01-15 17:35 >> Mon Jan 15 17:35:23 2018 user.err ddns-scripts[7394]: dynv6_ipv6: Can not >> detect local IP using network_get_ipaddr6 >> 'wan_6' - Error: '1' - TERMINATE >> Mon Jan 15 17:35:23 2018 user.warn ddns-scripts[7394]: dynv6_ipv6: PID >> '7394' exit WITH ERROR '1' at 2018-01-15 17:35 >> >> This is immediately after a sysupgrade. Restarting of the service brings it >> back. >> >> Ddns provider is dynv6.com. >> >> Regards, >> Hartmut >> > ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] ipq806x: replace linux, part-probe with a proper partitions subnode
Hi On 2018-01-11, Rafał Miłecki wrote: > From: Rafał Miłecki> > This solution is more upstream compatible as it only requires specifying > of_match_table in the parser code and doesn't depend on linux,part-probe > which is solution made generic by a LEDE downstream patch that can't be > upstreamed. [...] Tested-by: Stefan Lippers-Hollmann [0.00] OF: fdt:Machine model: ZyXEL NBG6817 ... [0.00] Kernel command line: rootfstype=squashfs,ext4 rootwait noinitrd root=/dev/mmcblk0p8 [0.00] Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p8 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC(SBL)ro,0x4(TZ)ro,0x4(RPM)ro,0x8(u-boot)ro,0x1(env)ro,0x1(ART)ro,0x1(dualflag),0x21(reserved) ... [1.136985] spi_qup 1a28.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64 [1.138996] m25p80 spi32766.0: mx25u3235f (4096 Kbytes) [1.144963] 13 qcom-smem partitions found on MTD device spi32766.0 [1.149927] Creating 13 MTD partitions on "spi32766.0": [1.156097] 0x-0x0002 : "0:SBL1" [1.162380] 0x0002-0x0004 : "0:MIBIB" [1.167429] 0x0004-0x0006 : "0:SBL2" [1.172427] 0x0006-0x000a : "0:SBL3" [1.177536] 0x000a-0x000b : "0:DDRCONFIG" [1.182473] 0x000b-0x000c : "0:SSD" [1.187679] 0x000c-0x0010 : "0:TZ" [1.192342] 0x0010-0x0014 : "0:RPM" [1.197190] 0x0014-0x001c : "0:APPSBL" [1.202027] 0x001c-0x001d : "0:APPSBLENV" [1.207300] 0x001d-0x001e : "0:ART" [1.212693] 0x001e-0x001f : "0:DUAL_FLAG" [1.217453] 0x001f-0x0040 : "0:RESERVED" Regards Stefan Lippers-Hollmann ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] OpenWrt LEDE merge
On 16/01/2018 16:11, Andrey Jr. Melnikov wrote: In gmane.comp.embedded.lede.devel Hauke Mehrtenswrote: [...] Old pre-15.05 OpenWrt CC releases, which are not supported any more, can be found at https://archive.openwrt.org . Old https://dev.openwrt.org serving content with untrusted WoSign certificate: Certificate chain 0 s:/CN=dev.openwrt.org i:/C=CN/O=WoSign CA Limited/CN=WoSign CA Free SSL Certificate G2 1 s:/C=CN/O=WoSign CA Limited/CN=WoSign CA Free SSL Certificate G2 i:/C=CN/O=WoSign CA Limited/CN=Certification Authority of WoSign 2 s:/C=CN/O=WoSign CA Limited/CN=Certification Authority of WoSign i:/C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority Time to move it to Let's Encrypt cert? Might also be good to think if it's still needed or if it could be just shut down. It's not providing or linking to anything useful now that all infrastructure was migrated elsewhere. -Alberto ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] ubus/lua: pass notification name to callback
The callback function registered to be invoked when subscribing to a notification was only passed the notification data (if any) but not the name of the notification. This name is now passed as second argument to remain backwards compatible. The example subscriber.lua has also be updated. Signed-off-by: Dirk Feytons--- lua/subscriber.lua |5 +++-- lua/ubus.c |5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/subscriber.lua b/lua/subscriber.lua index e1d3a9f..f59448d 100755 --- a/lua/subscriber.lua +++ b/lua/subscriber.lua @@ -15,8 +15,9 @@ if not conn then end local sub = { - notify = function( msg ) - print("Count: ", msg["count"]) + notify = function( msg, name ) + print("name:", name) + print(" count:", msg["count"]) end, } diff --git a/lua/ubus.c b/lua/ubus.c index cfe9c9b..00d9e00 100644 --- a/lua/ubus.c +++ b/lua/ubus.c @@ -787,10 +787,11 @@ ubus_sub_notify_handler(struct ubus_context *ctx, struct ubus_object *obj, if (lua_isfunction(state, -1)) { if( msg ){ ubus_lua_parse_blob_array(state, blob_data(msg), blob_len(msg), true); - lua_call(state, 1, 0); } else { - lua_call(state, 0, 0); + lua_pushnil(state); } + lua_pushstring(state, method); + lua_call(state, 2, 0); } else { lua_pop(state, 1); } -- 1.7.9.5 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] procd: add timing to start/stop logging
Shows how long an initd task took, for example: procd: stop /etc/init.d/dropbear running - took 0.088824 us procd: Update service dnsmasq procd: Update instance dnsmasq::dnsmasq procd: running /etc/init.d/dnsmasq running procd: start /etc/init.d/dnsmasq running procd: stop /etc/init.d/dnsmasq running - took 0.092586 us Signed-off-by: Karl Vogel--- rcS.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rcS.c b/rcS.c index dd3b76d..59c9038 100644 --- a/rcS.c +++ b/rcS.c @@ -37,6 +37,7 @@ static struct runqueue q, r; struct initd { struct ustream_fd fd; struct runqueue_process proc; + struct timeval tstart; char *file; char *param; }; @@ -70,6 +71,7 @@ static void q_initd_run(struct runqueue *q, struct runqueue_task *t) int pipefd[2]; pid_t pid; + gettimeofday(>tstart, NULL); DEBUG(2, "start %s %s \n", s->file, s->param); if (pipe(pipefd) == -1) { ERROR("Failed to create pipe: %m\n"); @@ -106,8 +108,11 @@ static void q_initd_run(struct runqueue *q, struct runqueue_task *t) static void q_initd_complete(struct runqueue *q, struct runqueue_task *p) { struct initd *s = container_of(p, struct initd, proc.task); + struct timeval tstop, tres; - DEBUG(2, "stop %s %s \n", s->file, s->param); + gettimeofday(, NULL); + timersub(, >tstart, ); + DEBUG(2, "stop %s %s - took %lu.%06lu us\n", s->file, s->param, tres.tv_sec, tres.tv_usec); ustream_free(>fd.stream); close(s->fd.fd.fd); free(s); -- 2.15.1 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev