Re: Bind + ISC dhcpd integration (for intranet split-horizon, etc)
Philip Prindeville writes: > I’m trying to do the integration “glue” to allow one to operate a DNS > private zone inside your intranet (aka “split horizon”) and prime it > with both static data as well as DHCP lease information. “split horizon” is a very bad idea, and should not be encouraged. > Ideally this could be done with a minimum of UCI configuration and canned > configurations. > > I tried to follow a couple of examples of this online: > > https://www.talk-about-it.ca/setup-bind9-with-isc-dhcp-server-dynamic-host-registration/ > > https://docs.oracle.com/cd/E19469-01/820-6410-12/app_example_dns.html > > But couldn’t get either to work demonstrably. Has anyone else managed > to get this working, and if so, would they share the details of how > they did it? > > I’ve followed the steps and I’m not seeing any errors, but I’m not > able to resolve the dynamic host names, either. Some of the details > of what I’ve tried are here: > > https://lists.isc.org/pipermail/bind-workers/2020-December/003530.html > > It’s probably something trivial but I can’t put my finger on it. You need to post your configs. Missing those, I tried to look at the examples you point to. The first one doesn't resolve due to serious errors in the DNS configuration, so I will assume that ANY advice you found there is plain wrong (I guess someone here is unable to spell DNS): bjorn@miraculix:~$ dig www.talk-about-it.ca +trace ; <<>> DiG 9.16.8-Debian <<>> www.talk-about-it.ca +trace ;; global options: +cmd . 516931 IN NS f.root-servers.net. . 516931 IN NS g.root-servers.net. . 516931 IN NS h.root-servers.net. . 516931 IN NS i.root-servers.net. . 516931 IN NS j.root-servers.net. . 516931 IN NS k.root-servers.net. . 516931 IN NS l.root-servers.net. . 516931 IN NS m.root-servers.net. . 516931 IN NS a.root-servers.net. . 516931 IN NS b.root-servers.net. . 516931 IN NS c.root-servers.net. . 516931 IN NS d.root-servers.net. . 516931 IN NS e.root-servers.net. . 516931 IN RRSIG NS 8 0 518400 2020122805 2020121504 26116 . FhG5WBLPhzoCY01sZlB76cBR5OyhyjACLV1V3QrwUISVBRhucfjtm+0K rfw857zJ39mEX/oV7uTat3WjavPIjDqL+6YIRq18FqE9BX+vaYzUUDgU fZgLF/4MM9kQjsYIIiX+HUZGxT2IdYfP8YLO5q+2I5B53PS4iw9lK1aT 66FIx+OEKGVdEwVAFTOgH3GQB2R0A52VByfbMYotj0YxbdnQ6g+OVfwD Xzud5Cf3imyqb4PY7P4mBvgZszLET/uUbfHje4eyesjK0cFwoW8txAEA 7Pu/Bs13/s79r76pk5jFtbKwDgXAWPj+60jdk7bZPEoxU9x+6P+jtfAq BK4ZQQ== ;; Received 1125 bytes from 148.122.16.253#53(148.122.16.253) in 248 ms ca. 172800 IN NS c.ca-servers.ca. ca. 172800 IN NS j.ca-servers.ca. ca. 172800 IN NS x.ca-servers.ca. ca. 172800 IN NS any.ca-servers.ca. ca. 86400 IN DS 2134 8 2 4B8475C0C0FE2AFDFEE1A71A237C91059098D12FC18265B290EDB238 A5F63582 ca. 86400 IN RRSIG DS 8 1 86400 2020122805 2020121504 26116 . bNnIysh6MYhpbK6KBAuQt24vxB+wU838f07IxOCAjbnru4IHyLrcjCF+ 3zz2ctSrUJ/5EQOHdi+rbDdOiCsQg3eOhLO/xqFDjy8M+yapBZxolhNJ pvcIKcfOVfuIgPTq8ZcvxYV+/M7i5dD89yDaJ2X7DcHauMryaNjO+xb5 +LchwPmUsGtWKH/gABBSPy7U+W3OM5fgDEVVTh1SjHqU5CH1+Mpf6W0Y y6JIsXQheb1feNdPZT1H+LkJEyeXsuKe9eUFFqHwlSGezlPQkkbHCObT k+S+RoN6XrH8qn9ysU3FDCdSPiVPhC6WOM2fFNJTT6nZLmtZf/KYujRb H8sxQw== ;; Received 637 bytes from 2001:503:ba3e::2:30#53(a.root-servers.net) in 80 ms talk-about-it.ca. 86400 IN NS dn1.p01.nsone.net. talk-about-it.ca. 86400 IN NS dn2.p01.nsone.net. talk-about-it.ca. 86400 IN NS dn3.p01.nsone.net. talk-about-it.ca. 86400 IN NS dn4.p01.nsone.net. talk-about-it.ca. 86400 IN DS 2371 13 2 253C2AD76C9E6D92292A83811BA64FEB4EC70C1ED30115B4E897A885 6E92E167 talk-about-it.ca. 86400 IN RRSIG DS 8 2 86400 20201220003013 20201212163855 43854 ca. pG4pnP1GYocjqaTXiR6b/BHFZDHmiCDkPxrSi/R7oCyTXI+2l2Ka+8Gb oM4wkvYF6EIOldwWn/MJLfP3CDgYzF3WPe6OWbdvwAyUZn87GDQWCUj6 DcGybJHeLFKbZye01tMz+l0CnLCTwL9abXysYTM9FRBZa349eUxlqz8E GFU= couldn't get address for 'dn1.p01.nsone.net': not found couldn't get address for 'dn2.p01.nsone.net': not found couldn't get address for 'dn3.p01.nsone.net': not found couldn't get address for 'dn4.p01.nsone.net': not found dig: couldn't get address for 'dn1.p01.nsone.net': no more The other example is from Oracle, which I personally trust about as far as I can throw them. And it doesn't. It's not difficult to find problems with it. Quotiong from dhcpd.conf(5):
Make HTTPS in LuCI optional but dead simple in 20.12 [Was: Re: 20.xx: postponse LuCI HTTPS per default]
Petr Štetiar [2020-11-20 11:44:14]: > > I'd like to suggest to postponse HTTPS LuCI (`luci-ssl` vs `luci`) per > > default. > > Do we need to make this hard decission? Can't we leave it to the end users? > We need most of the SSL stuff for other parts, so why not benefit from that in > other parts? > > For the start, can't we simply introduce some first time welcome page on HTTP, > explain to the user, that HTTPS is available, the pros and cons of this > solution and let the user decide? > > In less intrusive way, this welcome page/wizard could be replaced with some > information box "HTTPS is just a moments away", so the user would need to > explicitly request that HTTPS feature. > > There might be some better UX approach, but please try hard to move forward, > not backward :-) this PR#4660[1] (needs PR#4659[2]) and uhttpd patch[3] is my complete attempt to make the HTTPS optional, but just two clicks away. 1. https://github.com/openwrt/luci/pull/4660 2. https://github.com/openwrt/luci/pull/4659 3. https://patchwork.ozlabs.org/project/openwrt/patch/20201214090743.14651-1-yn...@true.cz/ Cheers, Petr ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[luci PATCH 05/12] rpcd-mod-luci: get rid of now unused getDSLStatus ubus rpc
Good riddance. Signed-off-by: Andre Heider Tested-by: Martin Schiller --- libs/rpcd-mod-luci/src/luci.c | 55 --- 1 file changed, 55 deletions(-) diff --git a/libs/rpcd-mod-luci/src/luci.c b/libs/rpcd-mod-luci/src/luci.c index 94ccdf271..abf4b9ba5 100644 --- a/libs/rpcd-mod-luci/src/luci.c +++ b/libs/rpcd-mod-luci/src/luci.c @@ -1695,60 +1695,6 @@ rpc_luci_get_board_json(struct ubus_context *ctx, struct ubus_object *obj, return UBUS_STATUS_OK; } -static int -rpc_luci_get_dsl_status(struct ubus_context *ctx, struct ubus_object *obj, -struct ubus_request_data *req, const char *method, -struct blob_attr *msg) -{ - char line[128], *p, *s; - FILE *cmd; - - cmd = popen("/etc/init.d/dsl_control lucistat", "r"); - - if (!cmd) - return UBUS_STATUS_NOT_FOUND; - - blob_buf_init(&blob, 0); - - while (fgets(line, sizeof(line), cmd)) { - if (strncmp(line, "dsl.", 4)) - continue; - - p = strchr(line, '='); - - if (!p) - continue; - - s = p + strlen(p) - 1; - - while (s >= p && isspace(*s)) - *s-- = 0; - - *p++ = 0; - - if (!strcmp(p, "nil")) - continue; - - if (isdigit(*p)) { - blobmsg_add_u32(&blob, line + 4, strtoul(p, NULL, 0)); - } - else if (*p == '"') { - s = p + strlen(p) - 1; - - if (s >= p && *s == '"') - *s = 0; - - blobmsg_add_string(&blob, line + 4, p + 1); - } - } - - fclose(cmd); - - ubus_send_reply(ctx, req, blob.head); - return UBUS_STATUS_OK; -} - - enum { RPC_L_FAMILY, __RPC_L_MAX, @@ -1859,7 +1805,6 @@ rpc_luci_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx) UBUS_METHOD_NOARG("getHostHints", rpc_luci_get_host_hints), UBUS_METHOD_NOARG("getDUIDHints", rpc_luci_get_duid_hints), UBUS_METHOD_NOARG("getBoardJSON", rpc_luci_get_board_json), - UBUS_METHOD_NOARG("getDSLStatus", rpc_luci_get_dsl_status), UBUS_METHOD("getDHCPLeases", rpc_luci_get_dhcp_leases, rpc_get_leases_policy) }; -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH v2 0/12] add ubus support to ltq-[v|a]dsl-app
v2: - drop 0002-ltq-vdsl-app-fix-Wundef-warnings.patch - use "/dev/dsl_cpe_api" without the "0" suffix for the adsl daemon: package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch:+ device_create(dsl_class, NULL, MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0), NULL, "dsl_cpe_api"); package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch:+ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api0"); - use callDSLMetrics() for luci, per jo - add Tested-by tags This is to significantly speed up the generation of the metrics. The motivation comes from the fact that ~2.6s is just way too ineffcient for interval based metric collectors like prometheus or collectd. The luci status page also loads/refreshes alot faster. $ time /etc/init.d/dsl_control dslstat real0m 2.66s user0m 0.90s sys 0m 1.76s $ time ubus call dsl metrics real0m 0.02s user0m 0.00s sys 0m 0.01s The ltq-adsl-app changes are only compile time tested. -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 07/12] ltq-vdsl-app: use ubus to provide metrics
luci now uses ubus directly, so remove 'lucistat'. For manual usage just print the ubus output, use luci for a pretty version. Signed-off-by: Andre Heider Tested-by: Martin Schiller --- package/network/config/ltq-vdsl-app/files/dsl_control | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control index 5089d7ac31..54b739e2cd 100644 --- a/package/network/config/ltq-vdsl-app/files/dsl_control +++ b/package/network/config/ltq-vdsl-app/files/dsl_control @@ -4,10 +4,11 @@ START=97 USE_PROCD=1 -extra_command "dslstat" "Get DSL status information" -extra_command "lucistat" "Get status information in lua friendly format" +dslstat() { + ubus call dsl metrics +} -. /lib/functions/lantiq_dsl.sh +extra_command "dslstat" "Get DSL status information" # # ITU-T G.997.1 (06/2012) - Section 7.3.1.1.1 (xTU transmission system enabling (XTSE)) -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 08/12] ltq-adsl-app: use ubus to provide metrics
luci now uses ubus directly, so remove 'lucistat'. For manual usage just print the ubus output, use luci for a pretty version. Signed-off-by: Andre Heider --- package/network/config/ltq-adsl-app/files/dsl_control | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/network/config/ltq-adsl-app/files/dsl_control b/package/network/config/ltq-adsl-app/files/dsl_control index 49c342d9d5..4bd6e860e8 100644 --- a/package/network/config/ltq-adsl-app/files/dsl_control +++ b/package/network/config/ltq-adsl-app/files/dsl_control @@ -4,10 +4,11 @@ START=97 USE_PROCD=1 -extra_command "dslstat" "Get DSL status information" -extra_command "lucistat" "Get status information in lua friendly format" +dslstat() { + ubus call dsl metrics +} -. /lib/functions/lantiq_dsl.sh +extra_command "dslstat" "Get DSL status information" annex_b=10_00_10_00_00_04_00_00 annex_bdmt=10_00_00_00_00_00_00_00 -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 10/12] ltq-dsl-base: bump PKG_RELEASE
Signed-off-by: Andre Heider Tested-by: Martin Schiller --- package/network/utils/ltq-dsl-base/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/utils/ltq-dsl-base/Makefile b/package/network/utils/ltq-dsl-base/Makefile index e2cfc4004c..aae07bc299 100644 --- a/package/network/utils/ltq-dsl-base/Makefile +++ b/package/network/utils/ltq-dsl-base/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ltq-dsl-base -PKG_RELEASE:=2 +PKG_RELEASE:=3 include $(INCLUDE_DIR)/package.mk -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 11/12] ltq-vdsl-app: bump PKG_RELEASE
Signed-off-by: Andre Heider --- package/network/config/ltq-vdsl-app/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index 33b6ca093b..bf9287bc79 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-app PKG_VERSION:=4.17.18.6 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_BASE_NAME:=dsl_cpe_control PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[luci PATCH 04/12] luci-mod-status: use the new ubus dsl metrics
This is significantly faster. Signed-off-by: Andre Heider Tested-by: Martin Schiller --- .../resources/view/status/include/50_dsl.js | 55 +-- .../usr/share/rpcd/acl.d/luci-mod-status.json | 2 +- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js index 4150b5513..714086f0d 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/50_dsl.js @@ -2,40 +2,39 @@ 'require baseclass'; 'require rpc'; -var callLuciDSLStatus = rpc.declare({ - object: 'luci-rpc', - method: 'getDSLStatus', +var callDSLMetrics = rpc.declare({ + object: 'dsl', + method: 'metrics', expect: { '': {} } }); function renderbox(dsl) { return E('div', { class: 'ifacebox' }, [ - E('div', { class: 'ifacebox-head center ' + ((dsl.line_state === 'UP') ? 'active' : '') }, + E('div', { class: 'ifacebox-head center ' + (dsl.up ? 'active' : '') }, E('strong', _('DSL Status'))), E('div', { class: 'ifacebox-body left' }, [ L.itemlist(E('span'), [ - _('Line State'), '%s [0x%x]'.format(dsl.line_state, dsl.line_state_detail), - _('Line Mode'), dsl.line_mode_s || '-', - _('Line Uptime'), '%t'.format(dsl.line_uptime), - _('Annex'), dsl.annex_s || '-', - _('Profile'), dsl.profile_s || '-', - _('Data Rate'), '%1000.3mb/s / %1000.3mb/s'.format(dsl.data_rate_down, dsl.data_rate_up), - _('Max. Attainable Data Rate (ATTNDR)'), '%1000.3mb/s / %1000.3mb/s'.format(dsl.max_data_rate_down, dsl.max_data_rate_up), - _('Latency'), '%.2f ms / %.2f ms'.format(dsl.latency_down / 1000, dsl.latency_up / 1000), - _('Line Attenuation (LATN)'), '%.1f dB / %.1f dB'.format(dsl.line_attenuation_down, dsl.line_attenuation_up), - _('Signal Attenuation (SATN)'), '%.1f dB / %.1f dB'.format(dsl.signal_attenuation_down, dsl.signal_attenuation_up), - _('Noise Margin (SNR)'), '%.1f dB / %.1f dB'.format(dsl.noise_margin_down, dsl.noise_margin_up), - _('Aggregate Transmit Power (ACTATP)'), '%.1f dB / %.1f dB'.format(dsl.actatp_down, dsl.actatp_up), - _('Forward Error Correction Seconds (FECS)'), '%d / %d'.format(dsl.errors_fecs_near, dsl.errors_fecs_far), - _('Errored seconds (ES)'), '%d / %d'.format(dsl.errors_es_near, dsl.errors_es_far), - _('Severely Errored Seconds (SES)'), '%d / %d'.format(dsl.errors_ses_near, dsl.errors_ses_far), - _('Loss of Signal Seconds (LOSS)'), '%d / %d'.format(dsl.errors_loss_near, dsl.errors_loss_far), - _('Unavailable Seconds (UAS)'), '%d / %d'.format(dsl.errors_uas_near, dsl.errors_uas_far), - _('Header Error Code Errors (HEC)'), '%d / %d'.format(dsl.errors_hec_near, dsl.errors_hec_far), - _('Non Pre-emptive CRC errors (CRC_P)'), '%d / %d'.format(dsl.errors_crc_p_near, dsl.errors_crc_p_far), - _('Pre-emptive CRC errors (CRCP_P)'), '%d / %d'.format(dsl.errors_crcp_p_near, dsl.errors_crcp_p_far), - _('ATU-C System Vendor ID'), dsl.atuc_vendor_id, - _('Power Management Mode'), dsl.power_mode_s + _('Line State'), dsl.state || '-', + _('Line Mode'), dsl.mode || '-', + _('Line Uptime'), '%t'.format(dsl.uptime), + _('Annex'), dsl.annex || '-', + _('Data Rate'), '%1000.3mb/s / %1000.3mb/s'.format(dsl.downstream.data_rate, dsl.upstream.data_rate), + _('Max. Attainable Data Rate (ATTNDR)'), '%1000.3mb/s / %1000.3mb/s'.format(dsl.downstream.attndr, dsl.upstream.attndr), + _('Latency'), '%.2f ms / %.2f ms'.format(dsl.downstream.interleave_delay / 1000, dsl.upstream.interleave_delay / 1000), + _('Line Attenuation (LATN)'), '%.1f dB / %.1f dB'.format(dsl.downstream.latn, dsl.upstream.latn), + _('Signal Attenuation (SATN)'), '%.1f dB / %.1f dB'.format(dsl.downstream.satn, dsl.upstream.satn), + _('Noise Margin (SNR)'), '%.1f dB / %.1f dB'.format(dsl.
[PATCH 12/12] ltq-adsl-app: bump PKG_RELEASE
Signed-off-by: Andre Heider --- package/network/config/ltq-adsl-app/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile index e03c0911a5..317f8a908a 100644 --- a/package/network/config/ltq-adsl-app/Makefile +++ b/package/network/config/ltq-adsl-app/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=dsl_cpe_control_danube PKG_VERSION:=3.24.4.4 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION) PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[packages PATCH 06/12] prometheus-node-exporter-lua: use the new ubus dsl metrics
This is significantly faster. Signed-off-by: Andre Heider --- .../lib/lua/prometheus-collectors/ltq-dsl.lua | 108 -- 1 file changed, 47 insertions(+), 61 deletions(-) diff --git a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua index a59c1507e..0a33fa4fd 100644 --- a/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua +++ b/utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua @@ -1,14 +1,6 @@ -local function scrape() - local fd = io.popen("/etc/init.d/dsl_control lucistat") - local dsl_func = loadstring(fd:read("*a")) - fd:close() - - if not dsl_func then -return - end - - local dsl_stat = dsl_func() +local ubus = require "ubus" +local function scrape() local dsl_line_attenuation = metric("dsl_line_attenuation_db", "gauge") local dsl_signal_attenuation = metric("dsl_signal_attenuation_db", "gauge") local dsl_snr = metric("dsl_signal_to_noise_margin_db", "gauge") @@ -19,82 +11,76 @@ local function scrape() local dsl_error_seconds_total = metric("dsl_error_seconds_total", "counter") local dsl_errors_total = metric("dsl_errors_total", "counter") + local u = ubus.connect() + local m = u:call("dsl", "metrics", {}) + -- dsl hardware/firmware information metric("dsl_info", "gauge", { -atuc_vendor_id = dsl_stat.atuc_vendor_id, -atuc_system_vendor_id = dsl_stat.atuc_system_vendor_id, -chipset = dsl_stat.chipset, -firmware_version = dsl_stat.firmware_version, -api_version = dsl_stat.api_version, +atuc_vendor = m.atu_c.vendor, +atuc_system_vendor = m.atu_c.system_vendor, +chipset = m.chipset, +firmware_version = m.firmware_version, +api_version = m.api_version, }, 1) -- dsl line settings information metric("dsl_line_info", "gauge", { -xtse1 = dsl_stat.xtse1, -xtse2 = dsl_stat.xtse2, -xtse3 = dsl_stat.xtse3, -xtse4 = dsl_stat.xtse4, -xtse5 = dsl_stat.xtse5, -xtse6 = dsl_stat.xtse6, -xtse7 = dsl_stat.xtse7, -xtse8 = dsl_stat.xtse8, -annex = dsl_stat.annex_s, -mode= dsl_stat.line_mode_s, -profile = dsl_stat.profile_s, +annex = m.annex, +mode = m.mode, +profile = m.profile, }, 1) - -- dsl up is 1 if the line is up and running local dsl_up - if dsl_stat.line_state == "UP" then + if m.up then dsl_up = 1 else dsl_up = 0 end metric("dsl_up", "gauge", { -detail = dsl_stat.line_state_detail, +detail = m.state, }, dsl_up) -- dsl line status data - metric("dsl_uptime_seconds", "gauge", {}, dsl_stat.line_uptime) + metric("dsl_uptime_seconds", "gauge", {}, m.uptime) -- dsl db measurements - dsl_line_attenuation({direction="down"}, dsl_stat.line_attenuation_down) - dsl_line_attenuation({direction="up"}, dsl_stat.line_attenuation_up) - dsl_signal_attenuation({direction="down"}, dsl_stat.signal_attenuation_down) - dsl_signal_attenuation({direction="up"}, dsl_stat.signal_attenuation_up) - dsl_snr({direction="down"}, dsl_stat.noise_margin_down) - dsl_snr({direction="up"}, dsl_stat.noise_margin_up) - dsl_aggregated_transmit_power({direction="down"}, dsl_stat.actatp_down) - dsl_aggregated_transmit_power({direction="up"}, dsl_stat.actatp_up) + dsl_line_attenuation({direction="down"}, m.downstream.latn) + dsl_line_attenuation({direction="up"}, m.upstream.latn) + dsl_signal_attenuation({direction="down"}, m.downstream.satn) + dsl_signal_attenuation({direction="up"}, m.upstream.satn) + dsl_snr({direction="down"}, m.downstream.snr) + dsl_snr({direction="up"}, m.upstream.snr) + dsl_aggregated_transmit_power({direction="down"}, m.downstream.actatp) + dsl_aggregated_transmit_power({direction="up"}, m.upstream.actatp) -- dsl performance data - if dsl_stat.latency_down ~= nil then -dsl_latency({direction="down"}, dsl_stat.latency_down / 100) -dsl_latency({direction="up"}, dsl_stat.latency_up / 100) + if m.downstream.interleave_delay ~= nil then +dsl_latency({direction="down"}, m.downstream.interleave_delay / 100) +dsl_latency({direction="up"}, m.upstream.interleave_delay / 100) end - dsl_datarate({direction="down"}, dsl_stat.data_rate_down) - dsl_datarate({direction="up"}, dsl_stat.data_rate_up) - dsl_max_datarate({direction="down"}, dsl_stat.max_data_rate_down) - dsl_max_datarate({direction="up"}, dsl_stat.max_data_rate_up) + dsl_datarate({direction="down"}, m.downstream.data_rate) + dsl_datarate({direction="up"}, m.upstream.data_rate) + dsl_max_datarate({direction="down"}, m.downstream.attndr) + dsl_max_datarate({direction="up"}, m.upstream.attndr) -- dsl errors - dsl_error_seconds_total({err="forward error correction",loc="near"}, dsl_stat.errors_fecs_near) - dsl_error_seconds_total({err="forward error correction",loc="far"}, dsl_stat.
[PATCH 03/12] ltq-adsl-app: add ubus support to get metrics
As with ltq-vdsl-app, see previous commit. Signed-off-by: Andre Heider --- package/network/config/ltq-adsl-app/Makefile | 2 +- .../ltq-adsl-app/patches/300-ubus.patch | 50 +++ package/network/config/ltq-adsl-app/src | 1 + 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 package/network/config/ltq-adsl-app/patches/300-ubus.patch create mode 12 package/network/config/ltq-adsl-app/src diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile index cfd66d0ee4..e03c0911a5 100644 --- a/package/network/config/ltq-adsl-app/Makefile +++ b/package/network/config/ltq-adsl-app/Makefile @@ -35,7 +35,7 @@ define Package/ltq-adsl-app CATEGORY:=Network TITLE:=Lantiq DSL userland tool URL:=http://www.lantiq.com/ - DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread +ltq-dsl-base + DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy||TARGET_lantiq_ase) +libpthread +ltq-dsl-base +libubox +libubus MENU:=1 endef diff --git a/package/network/config/ltq-adsl-app/patches/300-ubus.patch b/package/network/config/ltq-adsl-app/patches/300-ubus.patch new file mode 100644 index 00..1951efd4f6 --- /dev/null +++ b/package/network/config/ltq-adsl-app/patches/300-ubus.patch @@ -0,0 +1,50 @@ +--- a/src/dsl_cpe_control.c b/src/dsl_cpe_control.c +@@ -139,6 +139,9 @@ extern DSL_Error_t DSL_CPE_Pipe_StaticRe + #endif /* INCLUDE_DSL_RESOURCE_STATISTICS*/ + #endif + ++extern void ubus_init(); ++extern void ubus_deinit(); ++ + DSL_char_t *g_sFirmwareName1 = DSL_NULL; + DSL_char_t *g_sFirmwareName2 = DSL_NULL; + #ifdef INCLUDE_SCRIPT_NOTIFICATION +@@ -5343,6 +5346,8 @@ DSL_int_t dsl_cpe_daemon ( +signal (SIGINT, DSL_CPE_TerminationHandler); + #endif /* RTEMS*/ + ++ ubus_init(); ++ +/* Open DSL_CPE_MAX_DEVICE_NUMBER devices*/ +for (nDevice = 0; nDevice < DSL_CPE_MAX_DEVICE_NUMBER; nDevice++) +{ +@@ -5738,6 +5743,7 @@ DSL_int_t dsl_cpe_daemon ( + #endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */ + + DSL_CPE_CONTROL_EXIT: ++ ubus_deinit(); + + #ifdef INCLUDE_DSL_BONDING +DSL_CPE_BND_Stop((DSL_CPE_BND_Context_t*)pCtrlCtx->pBnd); +--- a/src/Makefile.am b/src/Makefile.am +@@ -11,7 +11,7 @@ else + dsl_cpe_control_common_ldflags = + endif + +-dsl_cpe_control_LDADD = -lpthread ++dsl_cpe_control_LDADD = -lpthread -lubox -lubus + + if INCLUDE_DSL_CPE_SOAP_SUPPORT + dsl_cpe_control_LDADD += -lm +@@ -70,7 +70,8 @@ dsl_cpe_control_SOURCES = \ + dsl_cpe_control.c \ + dsl_cpe_init_cfg.c \ + dsl_cpe_linux.c \ +- dsl_cpe_debug.c ++ dsl_cpe_debug.c \ ++ dsl_cpe_ubus.c + + dsl_cpe_control_SOURCES += \ + $(dsl_cpe_control_dti_sources) diff --git a/package/network/config/ltq-adsl-app/src b/package/network/config/ltq-adsl-app/src new file mode 12 index 00..d3dfcc3b34 --- /dev/null +++ b/package/network/config/ltq-adsl-app/src @@ -0,0 +1 @@ +../ltq-vdsl-app/src \ No newline at end of file -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH 02/12] ltq-vdsl-app: add ubus support to get metrics
Add a 'dsl' ubus object with a 'metrics' function to replace the expensive shell parsing done by /etc/init.d/dsl_control [dsl|luci]stat. All metrics are gathered by using syscalls. An additional thread is started to handle ubus events. $ time /etc/init.d/dsl_control dslstat real0m 2.66s user0m 0.90s sys 0m 1.76s $ time ubus call dsl metrics real0m 0.02s user0m 0.00s sys 0m 0.01s Example output: { "api_version": "4.17.18.6", "firmware_version": "5.8.1.5.0.7", "chipset": "Lantiq-VRX200", "driver_version": "1.5.17.6", "state": "Showtime with TC-Layer sync", "up": true, "uptime": 3891, "atu_c": { "vendor_id": [ 181, 0, 66, 68, 67, 77, 178, 26 ], "vendor": "Broadcom 178.26", "system_vendor_id": [ 181, 0, 66, 68, 67, 77, 0, 0 ], "system_vendor": "Broadcom", "version": [ 49, 57, 46, 48, 46, 51, 53, 46, 50, 32, 86, 69, 95, 49, 49, 95 ], "serial": [ 65, 65, 49, 52, 52, 54, 70, 69, 48, 90, 87, 45, 48, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] }, "power_state": "L0 - Synchronized", "xtse": [ 0, 0, 0, 0, 0, 0, 0, 2 ], "annex": "B", "standard": "G.993.2", "profile": "17a", "mode": "G.993.2 (VDSL2, Profile 17a, with down- and upstream vectoring)", "upstream": { "vector": true, "trellis": true, "bitswap": true, "retx": true, "virtual_noise": false, "interleave_delay": 0, "data_rate": 31999000, "latn": 8.50, "satn": 8.40, "snr": 12.70, "actps": -90.10, "actatp": 13.40, "attndr": 3718 }, "downstream": { "vector": true, "trellis": true, "bitswap": true, "retx": true, "virtual_noise": false, "interleave_delay": 140, "data_rate": 89998000, "latn": 9.50, "satn": 9.60, "snr": 13.30, "actps": -90.10, "actatp": -1.60, "attndr": 116315372 }, "errors": { "near": { "es": 1, "ses": 0, "loss": 3, "uas": 424, "lofs": 0, "fecs": 0, "hec": 0, "ibe": 0, "crc_p": 0, "crcp_p": 0, "cv_p": 0, "cvp_p": 0, "rx_corrupted": 27740, "rx_uncorrected_protected": 27010, "rx_retransmitted": 0, "rx_corrected": 730, "tx_retransmitted": 16222 }, "far": { "es": 242, "ses": 71, "loss": 0,
[PATCH 09/12] ltq-dsl-base: remove usused lantiq_dsl.sh
All users have been converted to ubus. Signed-off-by: Andre Heider Tested-by: Martin Schiller --- .../files/lib/functions/lantiq_dsl.sh | 749 -- 1 file changed, 749 deletions(-) delete mode 100755 package/network/utils/ltq-dsl-base/files/lib/functions/lantiq_dsl.sh diff --git a/package/network/utils/ltq-dsl-base/files/lib/functions/lantiq_dsl.sh b/package/network/utils/ltq-dsl-base/files/lib/functions/lantiq_dsl.sh deleted file mode 100755 index 5842a7879f..00 --- a/package/network/utils/ltq-dsl-base/files/lib/functions/lantiq_dsl.sh +++ /dev/null @@ -1,749 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2012-2014 OpenWrt.org - -if [ "$( which vdsl_cpe_control )" ]; then - XDSL_CTRL=vdsl_cpe_control -else - XDSL_CTRL=dsl_cpe_control -fi - -# -# Basic functions to send CLI commands to the vdsl_cpe_control daemon -# -dsl_cmd() { - killall -q -0 ${XDSL_CTRL} && ( - lock /var/lock/dsl_pipe - echo "$@" > /tmp/pipe/dsl_cpe0_cmd - cat /tmp/pipe/dsl_cpe0_ack - lock -u /var/lock/dsl_pipe - ) -} -dsl_val() { - expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*' -} -dsl_string() { - expr "$1" : '.*'$2'=(\([A-Z0-9,]*\))' -} - -# -# Simple divide by 10 routine to cope with one decimal place -# -dbt() { - local a=$(expr $1 / 10) - local b=$(expr $1 % 10) - echo "${a}.${b#-}" -} -# -# Take a number and convert to k or meg -# -scale() { - local val=$1 - local a - local b - - if [ "$val" -gt 100 ]; then - a=$(expr $val / 1000) - b=$(expr $a % 1000) - a=$(expr $a / 1000) - printf "%d.%03d Mb" ${a} ${b} - elif [ "$val" -gt 1000 ]; then - a=$(expr $val / 1000) - printf "%d Kb" ${a} - else - echo "${val} b" - fi -} - -scale_latency() { - local val=$1 - local a - local b - - a=$(expr $val / 100) - b=$(expr $val % 100) - printf "%d.%d ms" ${a} ${b} -} - -scale_latency_us() { - local val=$1 - - expr $val \* 10 -} - -# -# convert vendorid into human readable form -# -parse_vendorid() { - local val=$1 - local name - local version - - case "$val" in - B5,00,41,4C,43,42*) - name="Alcatel" - version=${val##*B5,00,41,4C,43,42,} - ;; - B5,00,41,4E,44,56*) - name="Analog Devices" - version=${val##*B5,00,41,4E,44,56,} - ;; - B5,00,42,44,43,4D*) - name="Broadcom" - version=${val##*B5,00,42,44,43,4D,} - ;; - B5,00,43,45,4E,54*) - name="Centillium" - version=${val##*B5,00,43,45,4E,54,} - ;; - B5,00,47,53,50,4E*) - name="Globespan" - version=${val##*B5,00,47,53,50,4E,} - ;; - B5,00,49,4B,4E,53*) - name="Ikanos" - version=${val##*B5,00,49,4B,4E,53,} - ;; - B5,00,49,46,54,4E*) - name="Infineon" - version=${val##*B5,00,49,46,54,4E,} - ;; - B5,00,54,53,54,43*) - name="Texas Instruments" - version=${val##*B5,00,54,53,54,43,} - ;; - B5,00,54,4D,4D,42*) - name="Thomson MultiMedia Broadband" - version=${val##*B5,00,54,4D,4D,42,} - ;; - B5,00,54,43,54,4E*) - name="Trend Chip Technologies" - version=${val##*B5,00,54,43,54,4E,} - ;; - B5,00,53,54,4D,49*) - name="ST Micro" - version=${val##*B5,00,53,54,4D,49,} - ;; - esac - - [ -n "$name" ] && { - val="$name" - - [ "$version" != "00,00" ] && val="$(printf "%s %d.%d" "$val" 0x${version//,/ 0x})" - } - - echo "$val" -} - -# -# Read the data rates for both directions -# -data_rates() { - local csg - local dru - local drd - local sdru - local sdrd - - csg=$(dsl_cmd g997csg 0 1) - drd=$(dsl_val "$csg" ActualDataRate) - - csg=$(dsl_cmd g997csg 0 0) - dru=$(dsl_val "$csg" ActualDataRate) - - [ -z "$drd" ] && drd=0 - [ -z "$dru" ] && dru=0 - - sdrd=$(scale $drd) - sdru=$(scale $dru) - - if [ "$action" = "lucistat" ]; then - echo "dsl.data_rate_down=$drd" - echo "dsl.data_rate_up=$dru" - echo "dsl.data_rate_down_s=\"$sd
[PATCH 01/12] ltq-vdsl-app: shutdown upon sigterm
procd sends sigterm to stop daemons, hook it up. This speeds up the shutdown sequence and gets rid of the following message: daemon.info procd: Instance dsl_control::instance1 pid 15408 not stopped on SIGTERM, sending SIGKILL instead Signed-off-by: Andre Heider Tested-by: Martin Schiller --- .../config/ltq-vdsl-app/files/dsl_control | 2 -- .../ltq-vdsl-app/patches/201-sigterm.patch| 19 +++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 package/network/config/ltq-vdsl-app/patches/201-sigterm.patch diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control index 3f3cecbca5..5089d7ac31 100644 --- a/package/network/config/ltq-vdsl-app/files/dsl_control +++ b/package/network/config/ltq-vdsl-app/files/dsl_control @@ -307,8 +307,6 @@ start_service() { } stop_service() { - # do not use dsl_cmd to not block when this is locked up by some other proess - echo quit > /tmp/pipe/dsl_cpe0_cmd DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \ DSL_INTERFACE_STATUS="DOWN" \ /sbin/dsl_notify.sh diff --git a/package/network/config/ltq-vdsl-app/patches/201-sigterm.patch b/package/network/config/ltq-vdsl-app/patches/201-sigterm.patch new file mode 100644 index 00..68a416ce24 --- /dev/null +++ b/package/network/config/ltq-vdsl-app/patches/201-sigterm.patch @@ -0,0 +1,19 @@ +--- a/src/dsl_cpe_control.c b/src/dsl_cpe_control.c +@@ -6504,7 +6504,7 @@ DSL_CPE_STATIC void DSL_CPE_Termination +/* ignore the signal, we'll handle by ourself */ +signal (sig, SIG_IGN); + +- if (sig == SIGINT) ++ if (sig == SIGINT || sig == SIGTERM) +{ + DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX "terminated" DSL_CPE_CRLF)); + DSL_CPE_Termination (); +@@ -6756,6 +6756,7 @@ DSL_int_t dsl_cpe_daemon ( + + #ifndef RTEMS +signal (SIGINT, DSL_CPE_TerminationHandler); ++ signal (SIGTERM, DSL_CPE_TerminationHandler); + #endif /* RTEMS*/ + +/* Open DSL_CPE_MAX_DSL_ENTITIES devices*/ -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
RE: [PATCH 1/2] ramips: add support for ELECOM WRC-1167GS2-B
Hi, > > I've tested it, but doesn't work. Okay, it was worth a try. Maybe it's a similar driver issue on ramips like that one we had about one year ago, where a similar case was not "picked up" from 10_fix_wifi_mac for a single radio ... Best Adrian > > I made the following change, > > ``` > > diff --git > a/target/linux/ramips/mt7621/base- > files/etc/hotplug.d/ieee80211/10_fix_wifi_mac > b/target/linux/ramips/mt7621/base- > files/etc/hotplug.d/ieee80211/10_fix_wifi_mac > index b7a41f038c..f0093d4337 100644 > --- > a/target/linux/ramips/mt7621/base- > files/etc/hotplug.d/ieee80211/10_fix_wifi_mac > +++ > b/target/linux/ramips/mt7621/base- > files/etc/hotplug.d/ieee80211/10_fix_wifi_mac > @@ -10,6 +10,14 @@ PHYNBR=${DEVPATH##*/phy} > board=$(board_name) > > case "$board" in > + elecom,wrc-1167gs2-b) > + [ "$PHYNBR" = "1" ] && \ > + $(mtd_get_mac_binary factory 0x4) > > /sys${DEVPATH}/macaddress > + ;; > + elecom,wrc-1167gst2) > + [ "$PHYNBR" = "1" ] && \ > + macaddr_add $(mtd_get_mac_binary factory > 0xe006) 2 > /sys${DEVPATH}/macaddress > + ;; > linksys,ea7300-v1|\ > linksys,ea7300-v2|\ > linksys,ea7500-v2) > > ``` > > but iwinfo still reports the MAC address generated from phy0 by mt76 > > driver. > > ``` > > (WRC-1167GS2-B) > > root@OpenWrt:/# iwinfo > wlan0 ESSID: unknown > Access Point: 04:AB:18:58:2F:15 > Mode: Client Channel: unknown (unknown) > Tx-Power: 3 dBm Link Quality: unknown/70 > Signal: unknown Noise: unknown > Bit Rate: unknown > Encryption: unknown > Type: nl80211 HW Mode(s): 802.11bgnac > Hardware: 14C3:7615 7615:14C3 [MediaTek MT7615E] > TX power offset: none > Frequency offset: none > Supports VAPs: yes PHY name: phy0 > > wlan1 ESSID: unknown > Access Point: 86:AB:18:58:2F:15 > Mode: Client Channel: unknown (unknown) > Tx-Power: 3 dBm Link Quality: unknown/70 > Signal: unknown Noise: unknown > Bit Rate: unknown > Encryption: unknown > Type: nl80211 HW Mode(s): 802.11nac > Hardware: 14C3:7615 7615:14C3 [MediaTek MT7615E] > TX power offset: none > Frequency offset: none > Supports VAPs: yes PHY name: phy1 > > root@OpenWrt:/# cat /sys/class/ieee80211/phy1/macaddress > 86:ab:18:58:2f:15 > > ``` > > >> - Wi-Fi band on primary phy (2.4GHz) cannot be limitted by specifying > >>ieee80211-freq-limit > >>(fail to register secondary phy due to error) > >> - mtd-mac-address in the wifi node is required for using > >>mtd-mac-address-increment > >> > >> Signed-off-by: INAGAKI Hiroshi > >> --- > >> .../dts/mt7621_elecom_wrc-1167gs2-b.dts | 57 ++ > >> .../dts/mt7621_elecom_wrc-1167gsxx.dtsi | 179 > ++ > >> target/linux/ramips/image/mt7621.mk | 8 + > >> 3 files changed, 244 insertions(+) > >> create mode 100644 > >> target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2- > >> b.dts > >> create mode 100644 target/linux/ramips/dts/mt7621_elecom_wrc- > >> 1167gsxx.dtsi > >> > >> diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts > >> b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts > >> new file mode 100644 > >> index 00..af0c580c64 > >> --- /dev/null > >> +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts > >> @@ -0,0 +1,57 @@ > >> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT > >> + > >> +#include "mt7621_elecom_wrc-1167gsxx.dtsi" > >> + > >> +/ { > >> + compatible = "elecom,wrc-1167gs2-b", "mediatek,mt7621-soc"; > >> + model = "ELECOM WRC-1167GS2-B"; > >> + > >> + aliases { > >> + label-mac-device = &wan; > >> + }; > >> +}; > >> + > >> +&gmac0 { > >> + mtd-mac-address = <&factory 0xfff4>; }; > >> + > >> +&wan { > >> + mtd-mac-address = <&factory 0xfffa>; }; > >> + > >> +&partitions { > >> + partition@5 { > >> + compatible = "denx,uimage"; > >> + label = "firmware"; > >> + reg = <0x5 0xb0>; > >> + }; > >> + > >> + partition@b5 { > >> + label = "tm_pattern"; > >> + reg = <0xb5 0x38>; > >> + read-only; > >> + }; > >> + > >> + partition@ed { > >> + label = "tm_key"; > >> + reg = <0xed 0x8>; > >> + read-only; > >> + }; > >> + > >> + partition@f5 { > >> + label = "nvram"; > >> + reg = <0xf5 0x3>; > >> + read-only; > >> + }; > >> + > >> + partition@f8 { > >> + label = "user_data"; > >> + reg = <0xf8 0x8>; > >> + read-only; > >> + }; > >> +}; > >> + > >> +&wifi { > >> + mtd-mac-address = <&factory 0x4>; > >> + mtd-mac-address-increment = <(-1)>; }; > >> diff -
RE: [PATCH] ramips: add support for GL.iNet GL-MT1300
Hi, > -Original Message- > From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] > On Behalf Of xinfa.d...@gl-inet.com > Sent: Dienstag, 15. Dezember 2020 05:15 > To: openwrt-devel@lists.openwrt.org > Cc: Xinfa Deng > Subject: [PATCH] ramips: add support for GL.iNet GL-MT1300 > > From: "Xinfa Deng" > > The GL-MT1300 is a high-performance new generation pocket-sized router > that offers a powerful hardware and first-class cybersecurity protocol with > unique and modern design. > > Specifications: > - SoC: MT7621A, Dual-Core @880MHz > - RAM: 256 MB DDR3 > - Flash: 32 MB > - Ethernet: 3 x 10/100/1000: 2 x LAN + 1 x WAN > - Wireless: 1 x MT7615D Dual-Band 2.4GHz(400Mbps) + 5GHz(867Mbps) > - USB: 1 x USB 3.0 port > - Slot: 1 x MicroSD card slot > - Button: 1 x Reset button > - Switch: 1 x Mode switch > - LED: 1 x Blue LED + 1 x White LED > > MAC addresses based on vendor firmware: > WAN : factory 0x4000 > LAN : Mac from factory 0x4000 + 1 > 2.4GHz : factory 0x4 > 5GHz : Mac form factory 0x4 + 1 Please add flashing instructions to the commit message, I assume they will be short and relatively easy for this device ... Three minor comments below. > + leds { > + compatible = "gpio-leds"; > + > + led_run: blue { Use function for node name instead, i.e. led_run: run { > + label = "blue:run"; > + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; > + }; > + > + white { system { > + label = "white:system"; > + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; > + }; [...] > case "$board" in > + glinet,gl-mt1300) > + [ "$PHYNBR" = "1" ] && macaddr_add > "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress > + ;; Have you verified that this is working (i.e. assigning the correct MAC address to the second WiFi interface)? Thanks Adrian > linksys,ea7300-v1|\ > linksys,ea7300-v2|\ > linksys,ea7500-v2) > -- > 2.7.4 > > > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel openpgp-digital-signature.asc Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[no subject]
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- When a FW upgrade is performed without keeping the current config, the temporary overlay directory is eventually empty and causes the archive copy to / to fail. This has no functional impact but adds a false 'failed to sync jffs2 overlay' to the error log. Fix this by explicitly checking for the directory to exist and being non-empty. Signed-off-by: Zefir Kurtisi --- libfstools/overlay.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libfstools/overlay.c b/libfstools/overlay.c index eadafcf..d3987a8 100644 --- a/libfstools/overlay.c +++ b/libfstools/overlay.c @@ -315,6 +315,11 @@ jffs2_switch(struct volume *v) umount2("/tmp/root", MNT_DETACH); foreachdir("/overlay/", handle_whiteout); + /* prevent below cp command failing with empty temporary overlay */ + if (system("[ ! -d /tmp/root/upper ] || [ -z \"$(ls -A /tmp/root/upper/)\" ]")) { + ULOG_INFO("temporary overlay empty\n"); + break; + } /* try hard to be in sync */ ULOG_INFO("syncronizing overlay\n"); if (system("cp -a /tmp/root/upper/* / 2>/dev/null")) -- 2.17.1 --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH 1/2] ath79: add support for Mojo Networks AirTight C-75
W dniu 14.12.2020 o 17:28, Adrian Schmutzler pisze: > Hi, > > only have time for a quick subset of answers: > [...] arduino,yun|\ buffalo,bhr-4grv2|\ devolo,magic-2-wifi|\ diff --git a/target/linux/ath79/dts/qca9550_mojo_c-75.dts b/target/linux/ath79/dts/qca9550_mojo_c-75.dts new file mode 100644 index ..51046a740a02 --- /dev/null +++ b/target/linux/ath79/dts/qca9550_mojo_c-75.dts @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include +#include + +#include "qca955x.dtsi" >>> >>> This include needs to be first (after the license). >> >> I followed Linux kernel style in which first we add global includes in >> alphabetical order then local includes. Will change that. > > This is just because dts-v1 is introduced from ath79.dtsi via qca955x.dtsi > and dts-v1 has to be before anything else. This is also done like this in > kernel (but not consistently), e.g. ipq4019/ipq806x. Ok. [...] + + aliases { + label-mac-device = ð0; + led-boot = &led_power; + led-failsafe = &led_power; + led-upgrade = &led_power; >>> >>> No led-running? >> >> The power LED is by default on, so it makes led-running redundant. Is there >> something else also using that alias? > > default-on is first, then diag.sh starts doing stuff due to led-boot, i.e. > will have the LED blinking. I'm not sure what happens after that without > led-running, i.e. is the LED turned off or on. Anyway, that will be the job > of diag.sh then, not of default-on anymore. The power led behaves as intended with every led-* state and stays on after, so I don't think there's a need to duplicate that in userspace and will keep the current aliases. If I'll come across any issues with that, I'll send a patch. > >> >>> + }; + + keys { + compatible = "gpio-keys"; + + reset { + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; >>> >>> missing label? >> >> The label is set from the node name by default. > > Hmm, so essentially we could drop label for about 50 % of our keys (in > contrast to the more complex situation with LEDs)? Sorry, got confused with LEDs and thought that's the same with gpio input, I'll add label to this node. > >> >>> + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "amber:power"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; + phy-handle = <&phy0>; + phy-mode = "rgmii"; + pll-data = <0xa600 0x0101 0x1616>; }; + +ð1 { + status = "okay"; + + mtd-mac-address = <&art 0x6>; + phy-mode = "sgmii"; + pll-data = <0x03000101 0x0101 0x1616>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + qca,ar8327-initvals = < + 0x0c 0x00080080 + 0x04 0x0760 + 0x58 0xc935c935 + 0x5c 0x0300 + 0x7c 0x007e + 0x94 0x007e + >; + }; +}; >>> >>> Please move mdio0 up so it's either directly before or after eth0. >> >> The nodes are sorted alphabetically. There are no includes specified >> between nodes, which would make following applied sorting not possible. >> What are the criteria saying that this node should be above ð nodes? > > Well, mdioX is a subnode of ethX. Thus, I tend to see them as related, and > that's probably also the reason why they are typically grouped together in > the ar/qca DTSI files. > It just makes reading the config easier for me when they are grouped this > way. I won't force you to change that if you think alphabetic sorting is > superior. Ok, that's sensible I'll move it after eth0. [...] > > Best > > Adrian > Regards. -- TMN ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH 2/2] ath79: mojo c-75: use second flash chip
W dniu 14.12.2020 o 17:30, Adrian Schmutzler pisze: > Hi, > >> -Original Message- >> From: Tomasz Maciej Nowak [mailto:tmn...@gmail.com] >> Sent: Dienstag, 8. Dezember 2020 18:05 >> To: Adrian Schmutzler ; openwrt- >> de...@lists.openwrt.org >> Cc: 'Vladimir Georgievsky' >> Subject: Re: [PATCH 2/2] ath79: mojo c-75: use second flash chip >> >> W dniu 01.12.2020 o 20:50, Adrian Schmutzler pisze: diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 0f90c00b9c43..b7618a8ab33c 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1199,7 +1199,7 @@ define Device/mojo_c-75 DEVICE_ALT0_VENDOR := WatchGuard DEVICE_ALT0_MODEL := AP320 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k-ct kmod- usb2 - IMAGE_SIZE := 15936k + IMAGE_SIZE := 32320k >>> >>> I'm not sure whether that's possible or whether the image itself is >> restricted to a single consecutive area to be written to (i.e. the flash can >> be >> concatenated and used, but the _image_ is limited to the first partition _in_ >> it) >> >> The mtd-concat creates virtual mtd device, which whole space we name as >> 'firmware' partiton, and for kernel it's completely transparent, as for mtd- >> splitter and mtd command. > > That might hold for OpenWrt-internal sysupgrade (I'm actually not sure here), > but will it also be true for initial flashing? That's why the installation is done from initramfs image, where everything is properly set-up. Thinking about it more, the U-Boot might be not capable of loading kernel image spanned through two flash chips, so I'll add KERNEL_SIZE variable. > > Best > > Adrian > Regards. -- TMN ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH v3 3/3] dropbear: create a submenu for key exchange algorithms
Hi, Please, always use "reply to all", in order to copy the mailing list on replies. On Tue, 15 Dec 2020 at 01:49, Patrick Kent wrote: > > These patches have been outdate. > Can you please update them for latest development openwrt. > Thanks. Regards. The general consensus seems to be that this patch series makes the configuration too complex. I'll rebase and resend, but I'm not expecting it to be applied. Thanks, Rui ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH v4 0/3] dropbear: overhaul the crypto algorithm selection
This patch series enables a much more fine-grained configuration of the public key, encryption and key exchange algorithms in Dropbear. v4: rebase against current master. v3: rebase against current master. v2: correct file permissions. Rui Salvaterra (3): dropbear: create a submenu for public key algorithms dropbear: create a submenu for encryption algorithms dropbear: create a submenu for key exchange algorithms package/network/services/dropbear/Config.in | 65 +-- package/network/services/dropbear/Makefile| 28 ++-- .../dropbear/files/dropbear.failsafe.ecc | 8 +++ .../dropbear/files/dropbear.failsafe.ed25519 | 8 +++ ...ropbear.failsafe => dropbear.failsafe.rsa} | 0 ...nkey-fix-use-of-rsa-sha2-256-pubkeys.patch | 12 +++- 6 files changed, 105 insertions(+), 16 deletions(-) create mode 100644 package/network/services/dropbear/files/dropbear.failsafe.ecc create mode 100644 package/network/services/dropbear/files/dropbear.failsafe.ed25519 rename package/network/services/dropbear/files/{dropbear.failsafe => dropbear.failsafe.rsa} (100%) mode change 100755 => 100644 -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH v4 1/3] dropbear: create a submenu for public key algorithms
This allows the user to select only the public key algorithms (s)he requires (e.g., disabling RSA and keeping only Ed25519). The default selection maintains the current functionality. Additionally, make sure at least one public key algorithm is selected, lest the build would fail. Dropbear executable sizes (ath79, -O2): RSA + Ed25519: 210101 bytes RSA only: 197765 bytes Ed25519 only: 189637 bytes Signed-off-by: Rui Salvaterra --- package/network/services/dropbear/Config.in | 27 ++- package/network/services/dropbear/Makefile| 23 +++- .../dropbear/files/dropbear.failsafe.ecc | 8 ++ .../dropbear/files/dropbear.failsafe.ed25519 | 8 ++ ...ropbear.failsafe => dropbear.failsafe.rsa} | 0 ...nkey-fix-use-of-rsa-sha2-256-pubkeys.patch | 12 ++--- 6 files changed, 62 insertions(+), 16 deletions(-) create mode 100644 package/network/services/dropbear/files/dropbear.failsafe.ecc create mode 100644 package/network/services/dropbear/files/dropbear.failsafe.ed25519 rename package/network/services/dropbear/files/{dropbear.failsafe => dropbear.failsafe.rsa} (100%) mode change 100755 => 100644 diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in index 15000eff53..5b7be04ade 100644 --- a/package/network/services/dropbear/Config.in +++ b/package/network/services/dropbear/Config.in @@ -1,14 +1,13 @@ menu "Configuration" depends on PACKAGE_dropbear -config DROPBEAR_CURVE25519 - bool "Curve25519 support" +menu "Public key algorithm selection" + +config DROPBEAR_RSA + bool "RSA support" default y help - This enables the following key exchange algorithm: - curve25519-sha...@libssh.org - - Increases binary size by about 4 kB (MIPS). + Enable support for the RSA public key algorithm. config DROPBEAR_ECC bool "Elliptic curve cryptography (ECC)" @@ -58,6 +57,13 @@ config DROPBEAR_ED25519 Increases binary size by about 12 kB (MIPS). +config DROPBEAR_AUTOSEL_PK + def_bool y + depends on !(DROPBEAR_ECC || DROPBEAR_ED25519) + select DROPBEAR_RSA + +endmenu + config DROPBEAR_CHACHA20POLY1305 bool "Chacha20-Poly1305 support" default y @@ -67,6 +73,15 @@ config DROPBEAR_CHACHA20POLY1305 Increases binary size by about 4 kB (MIPS). +config DROPBEAR_CURVE25519 + bool "Curve25519 support" + default y + help + This enables the following key exchange algorithm: + curve25519-sha...@libssh.org + + Increases binary size by about 4 kB (MIPS). + config DROPBEAR_ZLIB bool "Enable compression" default n diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 8bbb26f829..d0b6a4b7ea 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -32,7 +32,8 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_DROPBEAR_CURVE25519 CONFIG_DROPBEAR_ZLIB \ CONFIG_DROPBEAR_ED25519 CONFIG_DROPBEAR_CHACHA20POLY1305 \ CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE \ - CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP CONFIG_DROPBEAR_ASKPASS + CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP CONFIG_DROPBEAR_ASKPASS \ + CONFIG_DROPBEAR_RSA include $(INCLUDE_DIR)/package.mk @@ -67,9 +68,9 @@ define Package/dropbear/description endef define Package/dropbear/conffiles +$(if $(CONFIG_DROPBEAR_RSA),/etc/dropbear/dropbear_rsa_host_key) $(if $(CONFIG_DROPBEAR_ED25519),/etc/dropbear/dropbear_ed25519_host_key) $(if $(CONFIG_DROPBEAR_ECC),/etc/dropbear/dropbear_ecdsa_host_key) -/etc/dropbear/dropbear_rsa_host_key /etc/config/dropbear endef @@ -137,7 +138,7 @@ DB_OPT_CONFIG = \ !!DROPBEAR_ECC_384|CONFIG_DROPBEAR_ECC_FULL|1|0 \ !!DROPBEAR_ECC_521|CONFIG_DROPBEAR_ECC_FULL|1|0 \ DROPBEAR_CLI_ASKPASS_HELPER|CONFIG_DROPBEAR_ASKPASS|1|0 \ - + DROPBEAR_RSA|CONFIG_DROPBEAR_RSA|1|0 \ TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections -flto TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver @@ -199,10 +200,18 @@ define Package/dropbear/install $(INSTALL_DIR) $(1)/usr/lib/opkg/info $(INSTALL_DIR) $(1)/etc/dropbear $(INSTALL_DIR) $(1)/lib/preinit - $(INSTALL_DATA) ./files/dropbear.failsafe $(1)/lib/preinit/99_10_failsafe_dropbear - $(if $(CONFIG_DROPBEAR_ED25519),touch $(1)/etc/dropbear/dropbear_ed25519_host_key) - $(if $(CONFIG_DROPBEAR_ECC),touch $(1)/etc/dropbear/dropbear_ecdsa_host_key) - touch $(1)/etc/dropbear/dropbear_rsa_host_key + +ifdef CONFIG_DROPBEAR_ED25519 + $(INSTALL_DATA) ./files/dropbear.failsafe.ed25519 $(1)/lib/preinit/99_10_failsafe_dropbear +else ifdef CONFIG_DROPBEAR_ECC + $(INSTALL_DATA) ./files/dropbear.failsafe.ecc $(1)/
[PATCH v4 3/3] dropbear: create a submenu for key exchange algorithms
This allows the user to select only the key exchange algorithms (s)he requires (e.g., disabling group 14 SHA-{1,256} and keeping only Curve25519). The default selection maintains the current functionality. Additionally, make sure at least one key exchange algorithm is selected, lest the build would fail. Signed-off-by: Rui Salvaterra --- package/network/services/dropbear/Config.in | 17 + package/network/services/dropbear/Makefile | 7 +-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in index 6d2b4cdfae..b0ad21f907 100644 --- a/package/network/services/dropbear/Config.in +++ b/package/network/services/dropbear/Config.in @@ -94,6 +94,16 @@ config DROPBEAR_AUTOSEL_EA endmenu +menu "Key exchange algorithm selection" + +config DROPBEAR_DH_GROUP14_SHA1 + bool "Group 14 SHA-1" + default y + +config DROPBEAR_DH_GROUP14_SHA256 + bool "Group 14 SHA-256" + default y + config DROPBEAR_CURVE25519 bool "Curve25519 support" default y @@ -103,6 +113,13 @@ config DROPBEAR_CURVE25519 Increases binary size by about 4 kB (MIPS). +config DROPBEAR_AUTOSEL_KEX + def_bool y + depends on !(DROPBEAR_DH_GROUP14_SHA1 || DROPBEAR_CURVE25519) + select DROPBEAR_DH_GROUP14_SHA256 + +endmenu + config DROPBEAR_ZLIB bool "Enable compression" default n diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 1d131455a2..7a6cc96f94 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -33,7 +33,8 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_DROPBEAR_ED25519 CONFIG_DROPBEAR_CHACHA20POLY1305 \ CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE \ CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP CONFIG_DROPBEAR_ASKPASS \ - CONFIG_DROPBEAR_RSA CONFIG_DROPBEAR_AES128 CONFIG_DROPBEAR_AES256 + CONFIG_DROPBEAR_RSA CONFIG_DROPBEAR_AES128 CONFIG_DROPBEAR_AES256 \ + DROPBEAR_DH_GROUP14_SHA1 DROPBEAR_DH_GROUP14_SHA256 include $(INCLUDE_DIR)/package.mk @@ -140,7 +141,9 @@ DB_OPT_CONFIG = \ DROPBEAR_CLI_ASKPASS_HELPER|CONFIG_DROPBEAR_ASKPASS|1|0 \ DROPBEAR_RSA|CONFIG_DROPBEAR_RSA|1|0 \ DROPBEAR_AES128|CONFIG_DROPBEAR_AES128|1|0 \ - DROPBEAR_AES256|CONFIG_DROPBEAR_AES256|1|0 + DROPBEAR_AES256|CONFIG_DROPBEAR_AES256|1|0 \ + DROPBEAR_DH_GROUP14_SHA1|CONFIG_DROPBEAR_DH_GROUP14_SHA1|1|0 \ + DROPBEAR_DH_GROUP14_SHA256|CONFIG_DROPBEAR_DH_GROUP14_SHA256|1|0 TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections -flto TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH v4 2/3] dropbear: create a submenu for encryption algorithms
This allows the user to select only the encryption algorithms (s)he requires (e.g., disabling AES and keeping only ChaCha20-Poly1305). The default selection maintains the current functionality. Additionally, make sure at least one encryption algorithm is selected, lest the build would fail. Signed-off-by: Rui Salvaterra --- package/network/services/dropbear/Config.in | 21 + package/network/services/dropbear/Makefile | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in index 5b7be04ade..6d2b4cdfae 100644 --- a/package/network/services/dropbear/Config.in +++ b/package/network/services/dropbear/Config.in @@ -64,6 +64,20 @@ config DROPBEAR_AUTOSEL_PK endmenu +menu "Encryption algorithm selection" + +config DROPBEAR_AES128 + bool "AES-128 support" + default y + help + This enables support for the 128-bit AES cipher + +config DROPBEAR_AES256 + bool "AES-256 support" + default y + help + This enables support for the 256-bit AES cipher + config DROPBEAR_CHACHA20POLY1305 bool "Chacha20-Poly1305 support" default y @@ -73,6 +87,13 @@ config DROPBEAR_CHACHA20POLY1305 Increases binary size by about 4 kB (MIPS). +config DROPBEAR_AUTOSEL_EA + def_bool y + depends on !(DROPBEAR_AES256 || DROPBEAR_CHACHA20POLY1305) + select DROPBEAR_AES128 + +endmenu + config DROPBEAR_CURVE25519 bool "Curve25519 support" default y diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index d0b6a4b7ea..1d131455a2 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -33,7 +33,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_DROPBEAR_ED25519 CONFIG_DROPBEAR_CHACHA20POLY1305 \ CONFIG_DROPBEAR_UTMP CONFIG_DROPBEAR_PUTUTLINE \ CONFIG_DROPBEAR_DBCLIENT CONFIG_DROPBEAR_SCP CONFIG_DROPBEAR_ASKPASS \ - CONFIG_DROPBEAR_RSA + CONFIG_DROPBEAR_RSA CONFIG_DROPBEAR_AES128 CONFIG_DROPBEAR_AES256 include $(INCLUDE_DIR)/package.mk @@ -139,6 +139,8 @@ DB_OPT_CONFIG = \ !!DROPBEAR_ECC_521|CONFIG_DROPBEAR_ECC_FULL|1|0 \ DROPBEAR_CLI_ASKPASS_HELPER|CONFIG_DROPBEAR_ASKPASS|1|0 \ DROPBEAR_RSA|CONFIG_DROPBEAR_RSA|1|0 \ + DROPBEAR_AES128|CONFIG_DROPBEAR_AES128|1|0 \ + DROPBEAR_AES256|CONFIG_DROPBEAR_AES256|1|0 TARGET_CFLAGS += -DARGTYPE=3 -ffunction-sections -fdata-sections -flto TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH v2 1/2] ath79: add support for AirTight C-75
AirTight Networks (later renamed to Mojo Networks) C-75 is a dual-band access point, also sold by WatchGuard under name AP320. Specification SoC: Qualcomm Atheros QCA9550 RAM: 128 MiB DDR2 Flash: 2x 16 MiB SPI NOR WIFI: 2.4 GHz 3T3R integrated 5 GHz 3T3R QCA9890 oversized Mini PCIe card Ethernet: 2x 10/100/1000 Mbps QCA8334 port labeled LAN1 is PoE capable (802.3at) USB: 1x 2.0 LEDs: 7x which two are GPIO controlled, four switch controlled, one controlled by wireless driver Buttons: 1x GPIO controlled Serial: RJ-45 port, Cisco pinout baud: 115200, parity: none, flow control: none JTAG: Yes, pins marked J1 on PCB Installation 1. Prepare TFTP server with OpenWrt initramfs-kernel image. 2. Connect to one of LAN ports. 3. Connect to serial port. 4. Power on the device and when prompted to stop autoboot, hit any key. 5. Adjust "ipaddr" and "serverip" addresses in U-Boot environment, use 'setenv' to do that, then run following commands: tftpboot 0x8100 bootm 0x8100 6. Wait about 1 minute for OpenWrt to boot. 7. Transfer OpenWrt sysupgrade image to /tmp directory and flash it with: sysupgrade -n /tmp/ 8. After flashing, the access point will reboot to OpenWrt. Wait few minutes, until the Power LED stops blinking, then it's ready for configuration. Known issues Green power LED does not work. Additional information The U-Boot fails to initialise ethernet ports correctly when a UART adapter is attached to UART pins (marked J3 on PCB). Cc: Vladimir Georgievsky Signed-of-by: Tomasz Maciej Nowak --- v1 -> v2 - rename primary device vendor (Mojo -> AirTight) - remove U-Boot environment definition - minor dts adjustments (no functional changes) - add additional DEVICE_ALTn variable .../linux/ath79/dts/qca9550_airtight_c-75.dts | 171 ++ .../generic/base-files/etc/board.d/02_network | 4 + target/linux/ath79/image/generic.mk | 13 ++ 3 files changed, 188 insertions(+) create mode 100644 target/linux/ath79/dts/qca9550_airtight_c-75.dts diff --git a/target/linux/ath79/dts/qca9550_airtight_c-75.dts b/target/linux/ath79/dts/qca9550_airtight_c-75.dts new file mode 100644 index ..34d4c32b3562 --- /dev/null +++ b/target/linux/ath79/dts/qca9550_airtight_c-75.dts @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca955x.dtsi" + +#include +#include + +/ { + model = "AirTight Networks C-75"; + compatible = "airtight,c-75", "qca,qca9550", "qca,qca9558"; + + aliases { + label-mac-device = ð0; + led-boot = &led_power; + led-failsafe = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "amber:power"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; + phy-handle = <&phy0>; + phy-mode = "rgmii"; + pll-data = <0xa600 0x0101 0x1616>; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + qca,ar8327-initvals = < + 0x0c 0x00080080 + 0x04 0x0760 + 0x58 0xc935c935 + 0x5c 0x0300 + 0x7c 0x007e + 0x94 0x007e + >; + }; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&art 0x6>; + phy-mode = "sgmii"; + pll-data = <0x03000101 0x0101 0x1616>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&pcie0 { + status = "okay"; + + wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x 0 0 0 0>; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <2500>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x00 0x04>; +
[PATCH v2 2/2] ath79: airtight c-75: use second flash chip
The flash capacity is divided in two flash chips and currently only first is used. Increase available space for OpenWrt by additional 16 MiB using mtd-concat driver. Because U-Boot might not be able to load kernel image spanned through two flash chips, the size of kernel is limited to space available on first chip. Cc: Vladimir Georgievsky Signed-off-by: Tomasz Maciej Nowak --- v1 -> v2 - add kernel size constraints .../linux/ath79/dts/qca9550_airtight_c-75.dts | 24 +++ target/linux/ath79/image/generic.mk | 3 ++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/target/linux/ath79/dts/qca9550_airtight_c-75.dts b/target/linux/ath79/dts/qca9550_airtight_c-75.dts index 34d4c32b3562..c380a109c96b 100644 --- a/target/linux/ath79/dts/qca9550_airtight_c-75.dts +++ b/target/linux/ath79/dts/qca9550_airtight_c-75.dts @@ -41,6 +41,23 @@ linux,default-trigger = "phy1tpt"; }; }; + + mtd-concat { + compatible = "mtd-concat"; + devices = <&concat0 &concat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "firmware"; + reg = <0x0 0x1f9>; + compatible = "denx,uimage"; + }; + }; + }; }; ð0 { @@ -120,10 +137,8 @@ read-only; }; - partition@6 { - label = "firmware"; + concat0: partition@6 { reg = <0x06 0xf9>; - compatible = "denx,uimage"; }; art: partition@ff { @@ -144,8 +159,7 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { - label = "opt"; + concat1: partition@0 { reg = <0x0 0x100>; }; }; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 177caafa2253..bdc35823c66c 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -246,7 +246,8 @@ define Device/airtight_c-75 DEVICE_ALT1_VENDOR := WatchGuard DEVICE_ALT1_MODEL := AP320 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k-ct kmod-usb2 - IMAGE_SIZE := 15936k + IMAGE_SIZE := 32320k + KERNEL_SIZE := 15936k endef TARGET_DEVICES += airtight_c-75 -- 2.29.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: Bind + ISC dhcpd integration (for intranet split-horizon, etc)
> On Dec 15, 2020, at 1:22 AM, Bjørn Mork wrote: > > Philip Prindeville writes: > >> I’m trying to do the integration “glue” to allow one to operate a DNS >> private zone inside your intranet (aka “split horizon”) and prime it >> with both static data as well as DHCP lease information. > > “split horizon” is a very bad idea, and should not be encouraged. Can you say more about that? I don’t see why the converse would be any better, i.e. publishing RFC-1918 addresses of NATted hosts behind a firewall, and disclosing more information than is necessary anyway… > >> Ideally this could be done with a minimum of UCI configuration and canned >> configurations. >> >> I tried to follow a couple of examples of this online: >> >> https://www.talk-about-it.ca/setup-bind9-with-isc-dhcp-server-dynamic-host-registration/ >> >> https://docs.oracle.com/cd/E19469-01/820-6410-12/app_example_dns.html >> >> But couldn’t get either to work demonstrably. Has anyone else managed >> to get this working, and if so, would they share the details of how >> they did it? >> >> I’ve followed the steps and I’m not seeing any errors, but I’m not >> able to resolve the dynamic host names, either. Some of the details >> of what I’ve tried are here: >> >> https://lists.isc.org/pipermail/bind-workers/2020-December/003530.html >> >> It’s probably something trivial but I can’t put my finger on it. > > You need to post your configs. See here: https://github.com/openwrt/packages/pull/14233 Looking for testers, if anyone is interested. I don’t have an easy way to do 172.16.0.0/12 or 10.0.0.0/8 testing… but I might add support for those if someone can test it. I think the problem was that neither example that I was going by included "ddns-updates on;” which obvious was the “secret sauce” missing. Seems kind of obvious in retrospect. > > Missing those, I tried to look at the examples you point to. The first > one doesn't resolve due to serious errors in the DNS configuration, so I > will assume that ANY advice you found there is plain wrong (I guess > someone here is unable to spell DNS): > > > bjorn@miraculix:~$ dig www.talk-about-it.ca +trace > > ; <<>> DiG 9.16.8-Debian <<>> www.talk-about-it.ca +trace > ;; global options: +cmd > . 516931 IN NS f.root-servers.net. > . 516931 IN NS g.root-servers.net. > . 516931 IN NS h.root-servers.net. > . 516931 IN NS i.root-servers.net. > . 516931 IN NS j.root-servers.net. > . 516931 IN NS k.root-servers.net. > . 516931 IN NS l.root-servers.net. > . 516931 IN NS m.root-servers.net. > . 516931 IN NS a.root-servers.net. > . 516931 IN NS b.root-servers.net. > . 516931 IN NS c.root-servers.net. > . 516931 IN NS d.root-servers.net. > . 516931 IN NS e.root-servers.net. > . 516931 IN RRSIG NS 8 0 518400 2020122805 > 2020121504 26116 . > FhG5WBLPhzoCY01sZlB76cBR5OyhyjACLV1V3QrwUISVBRhucfjtm+0K > rfw857zJ39mEX/oV7uTat3WjavPIjDqL+6YIRq18FqE9BX+vaYzUUDgU > fZgLF/4MM9kQjsYIIiX+HUZGxT2IdYfP8YLO5q+2I5B53PS4iw9lK1aT > 66FIx+OEKGVdEwVAFTOgH3GQB2R0A52VByfbMYotj0YxbdnQ6g+OVfwD > Xzud5Cf3imyqb4PY7P4mBvgZszLET/uUbfHje4eyesjK0cFwoW8txAEA > 7Pu/Bs13/s79r76pk5jFtbKwDgXAWPj+60jdk7bZPEoxU9x+6P+jtfAq BK4ZQQ== > ;; Received 1125 bytes from 148.122.16.253#53(148.122.16.253) in 248 ms > > ca. 172800 IN NS c.ca-servers.ca. > ca. 172800 IN NS j.ca-servers.ca. > ca. 172800 IN NS x.ca-servers.ca. > ca. 172800 IN NS any.ca-servers.ca. > ca. 86400 IN DS 2134 8 2 > 4B8475C0C0FE2AFDFEE1A71A237C91059098D12FC18265B290EDB238 A5F63582 > ca. 86400 IN RRSIG DS 8 1 86400 2020122805 > 2020121504 26116 . > bNnIysh6MYhpbK6KBAuQt24vxB+wU838f07IxOCAjbnru4IHyLrcjCF+ > 3zz2ctSrUJ/5EQOHdi+rbDdOiCsQg3eOhLO/xqFDjy8M+yapBZxolhNJ > pvcIKcfOVfuIgPTq8ZcvxYV+/M7i5dD89yDaJ2X7DcHauMryaNjO+xb5 > +LchwPmUsGtWKH/gABBSPy7U+W3OM5fgDEVVTh1SjHqU5CH1+Mpf6W0Y > y6JIsXQheb1feNdPZT1H+LkJEyeXsuKe9eUFFqHwlSGezlPQkkbHCObT > k+S+RoN6XrH8qn9ysU3FDCdSPiVPhC6WOM2fFNJTT6nZLmtZf/KYujRb H8sxQw== > ;; Received 637 bytes from 2001:503:ba3e::2:30#53(a.root-servers.net) in 80 ms > > talk-about-it.ca. 86400 IN NS dn1.p01.nsone.net. > talk-about-it.ca. 86400 IN NS dn2.p01.nsone.net. > talk-about-it.ca. 86400 IN NS dn3.p01.nsone.net. > talk-about-it.ca. 86400 IN NS dn4.p01.nsone.net. > talk-about-it.ca. 86400 IN
[PATCH] e2fsprogs: Add TARGET_LDFLAGS to e4crypt
The TARGET_LDFLAGS were dropped in the linking of e4crypt. Signed-off-by: Hauke Mehrtens --- ...build-Add-SYSLIBS-to-e4crypt-linking.patch | 28 +++ 1 file changed, 28 insertions(+) create mode 100644 package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch diff --git a/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch b/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch new file mode 100644 index ..dad71cf0b33a --- /dev/null +++ b/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch @@ -0,0 +1,28 @@ +From e33ecf1595e390b2657018442c68ae824b3e13b4 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Tue, 15 Dec 2020 23:58:53 +0100 +Subject: [PATCH e2fsprogs] build: Add SYSLIBS to e4crypt linking + +The $(SYSLIBS) was missing when linking the e4crypt application. This is +available in the e4crypt.profiled variant, so I assume this was just +missing in the normal variant and is not left out intentionally. + +This fixes building e2fsprogrs with -fsanitize=undefined in the global +CFLAGS nad LDFLAGS. + +Signed-off-by: Hauke Mehrtens +--- + misc/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/misc/Makefile.in b/misc/Makefile.in +@@ -242,7 +242,7 @@ e4defrag: $(E4DEFRAG_OBJS) $(DEPLIBS) + e4crypt: $(E4CRYPT_OBJS) $(DEPLIBS) $(DEPSTATIC_LIBUUID) + $(E) " LD $@" + $(Q) $(CC) $(ALL_LDFLAGS) -o e4crypt $(E4CRYPT_OBJS) \ +- $(LIBUUID) $(LIBS) ++ $(LIBUUID) $(LIBS) $(SYSLIBS) + + e4defrag.profiled: $(E4DEFRAG_OBJS) $(PROFILED_DEPLIBS) + $(E) " LD $@" -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] toolchain: gcc: Remove support for GCC 5
GCC was used in 17.01 as the default compiler the last time. We do not test this old GCC version any more and there are some known problems it fails to compile the U-Boot for the Allwinner A64 SoC. Just remove it to make it clear that we will not support this old GCC version any more. Signed-off-by: Hauke Mehrtens --- toolchain/gcc/Config.in |4 - toolchain/gcc/Config.version |5 - toolchain/gcc/common.mk |4 - .../001-revert_register_mode_search.patch | 65 - .../patches/5.5.0/002-case_insensitive.patch | 14 - .../gcc/patches/5.5.0/010-documentation.patch | 23 - .../patches/5.5.0/020-no-plt-backport.patch | 28 - .../5.5.0/040-fix-mips-ICE-PR-68400.patch | 23 - ...efine-__always_inline-in-local_atomi.patch | 1092 - .../gcc/patches/5.5.0/200-musl_config.patch | 309 - .../gcc/patches/5.5.0/201-musl_arm.patch | 43 - .../gcc/patches/5.5.0/202-musl_mips.patch | 35 - .../gcc/patches/5.5.0/203-musl_powerpc.patch | 209 toolchain/gcc/patches/5.5.0/204-musl_sh.patch | 39 - .../gcc/patches/5.5.0/205-musl_x86.patch | 41 - .../gcc/patches/5.5.0/206-musl_aarch64.patch | 31 - .../patches/5.5.0/207-musl_fixincludes.patch | 30 - .../patches/5.5.0/209-musl_libstdc++.patch| 72 -- .../gcc/patches/5.5.0/230-musl_libssp.patch | 13 - .../patches/5.5.0/240-musl-libitm-fixes.patch | 61 - .../gcc/patches/5.5.0/250-add-musl.patch | 120 -- .../5.5.0/260-musl-add-unwind-fix.patch | 34 - .../270-musl-add-powerpc-softfloat-fix.patch | 24 - .../280-musl-disable-ifunc-by-default.patch | 36 - .../300-mips_Os_cpu_rtx_cost_model.patch | 14 - .../5.5.0/800-arm_v5te_no_ldrd_strd.patch | 11 - .../5.5.0/810-arm-softfloat-libgcc.patch | 25 - .../gcc/patches/5.5.0/820-libgcc_pic.patch| 36 - .../5.5.0/830-arm_unbreak_armv4t.patch| 13 - .../5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch | 19 - .../patches/5.5.0/850-use_shared_libgcc.patch | 47 - .../patches/5.5.0/851-libgcc_no_compat.patch | 12 - .../patches/5.5.0/870-ppc_no_crtsavres.patch | 11 - .../patches/5.5.0/880-no_java_section.patch | 11 - .../gcc/patches/5.5.0/881-no_tm_section.patch | 11 - .../patches/5.5.0/900-bad-mips16-crt.patch|9 - .../gcc/patches/5.5.0/910-mbsd_multi.patch| 222 .../5.5.0/920-specs_nonfatal_getenv.patch | 15 - .../5.5.0/930-fix-mips-noexecstack.patch | 111 -- .../931-fix-MIPS-softfloat-build-issue.patch | 167 --- .../5.5.0/940-no-clobber-stamp-bits.patch | 11 - .../5.5.0/950-cpp_file_path_translation.patch | 182 --- toolchain/gcc/patches/5.5.0/960-go_libm.patch | 11 - .../gcc/patches/5.5.0/970-warn_bug.patch | 11 - 44 files changed, 3304 deletions(-) delete mode 100644 toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch delete mode 100644 toolchain/gcc/patches/5.5.0/002-case_insensitive.patch delete mode 100644 toolchain/gcc/patches/5.5.0/010-documentation.patch delete mode 100644 toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch delete mode 100644 toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch delete mode 100644 toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch delete mode 100644 toolchain/gcc/patches/5.5.0/200-musl_config.patch delete mode 100644 toolchain/gcc/patches/5.5.0/201-musl_arm.patch delete mode 100644 toolchain/gcc/patches/5.5.0/202-musl_mips.patch delete mode 100644 toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch delete mode 100644 toolchain/gcc/patches/5.5.0/204-musl_sh.patch delete mode 100644 toolchain/gcc/patches/5.5.0/205-musl_x86.patch delete mode 100644 toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch delete mode 100644 toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch delete mode 100644 toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch delete mode 100644 toolchain/gcc/patches/5.5.0/230-musl_libssp.patch delete mode 100644 toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch delete mode 100644 toolchain/gcc/patches/5.5.0/250-add-musl.patch delete mode 100644 toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch delete mode 100644 toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch delete mode 100644 toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch delete mode 100644 toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch delete mode 100644 toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch delete mode 100644 toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch delete mode 100644 toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch delete mode 100644 toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch delete mode 100644 toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch delete mode 100644 toolchain/gcc/patches/5.5.0/850-use_shared_libgc
Re: [PATCH] toolchain: gcc: Remove support for GCC 5
On Mi, Dez 16, 2020 at 00:24, Hauke Mehrtens wrote: GCC was used in 17.01 as the default compiler the last time. We do not test this old GCC version any more and there are some known problems it fails to compile the U-Boot for the Allwinner A64 SoC. Just remove it to make it clear that we will not support this old GCC version any more. Signed-off-by: Hauke Mehrtens --- Acked-by: Paul Spooren This goes hand in hand with Petrs gcc6+ patches. I'm wondering if these major version requirement changes should happen before or after the 20.x change, I'd like the former. toolchain/gcc/Config.in |4 - toolchain/gcc/Config.version |5 - toolchain/gcc/common.mk |4 - .../001-revert_register_mode_search.patch | 65 - .../patches/5.5.0/002-case_insensitive.patch | 14 - .../gcc/patches/5.5.0/010-documentation.patch | 23 - .../patches/5.5.0/020-no-plt-backport.patch | 28 - .../5.5.0/040-fix-mips-ICE-PR-68400.patch | 23 - ...efine-__always_inline-in-local_atomi.patch | 1092 - .../gcc/patches/5.5.0/200-musl_config.patch | 309 - .../gcc/patches/5.5.0/201-musl_arm.patch | 43 - .../gcc/patches/5.5.0/202-musl_mips.patch | 35 - .../gcc/patches/5.5.0/203-musl_powerpc.patch | 209 toolchain/gcc/patches/5.5.0/204-musl_sh.patch | 39 - .../gcc/patches/5.5.0/205-musl_x86.patch | 41 - .../gcc/patches/5.5.0/206-musl_aarch64.patch | 31 - .../patches/5.5.0/207-musl_fixincludes.patch | 30 - .../patches/5.5.0/209-musl_libstdc++.patch| 72 -- .../gcc/patches/5.5.0/230-musl_libssp.patch | 13 - .../patches/5.5.0/240-musl-libitm-fixes.patch | 61 - .../gcc/patches/5.5.0/250-add-musl.patch | 120 -- .../5.5.0/260-musl-add-unwind-fix.patch | 34 - .../270-musl-add-powerpc-softfloat-fix.patch | 24 - .../280-musl-disable-ifunc-by-default.patch | 36 - .../300-mips_Os_cpu_rtx_cost_model.patch | 14 - .../5.5.0/800-arm_v5te_no_ldrd_strd.patch | 11 - .../5.5.0/810-arm-softfloat-libgcc.patch | 25 - .../gcc/patches/5.5.0/820-libgcc_pic.patch| 36 - .../5.5.0/830-arm_unbreak_armv4t.patch| 13 - .../5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch | 19 - .../patches/5.5.0/850-use_shared_libgcc.patch | 47 - .../patches/5.5.0/851-libgcc_no_compat.patch | 12 - .../patches/5.5.0/870-ppc_no_crtsavres.patch | 11 - .../patches/5.5.0/880-no_java_section.patch | 11 - .../gcc/patches/5.5.0/881-no_tm_section.patch | 11 - .../patches/5.5.0/900-bad-mips16-crt.patch|9 - .../gcc/patches/5.5.0/910-mbsd_multi.patch| 222 .../5.5.0/920-specs_nonfatal_getenv.patch | 15 - .../5.5.0/930-fix-mips-noexecstack.patch | 111 -- .../931-fix-MIPS-softfloat-build-issue.patch | 167 --- .../5.5.0/940-no-clobber-stamp-bits.patch | 11 - .../5.5.0/950-cpp_file_path_translation.patch | 182 --- toolchain/gcc/patches/5.5.0/960-go_libm.patch | 11 - .../gcc/patches/5.5.0/970-warn_bug.patch | 11 - 44 files changed, 3304 deletions(-) delete mode 100644 toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch delete mode 100644 toolchain/gcc/patches/5.5.0/002-case_insensitive.patch delete mode 100644 toolchain/gcc/patches/5.5.0/010-documentation.patch delete mode 100644 toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch delete mode 100644 toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch delete mode 100644 toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch delete mode 100644 toolchain/gcc/patches/5.5.0/200-musl_config.patch delete mode 100644 toolchain/gcc/patches/5.5.0/201-musl_arm.patch delete mode 100644 toolchain/gcc/patches/5.5.0/202-musl_mips.patch delete mode 100644 toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch delete mode 100644 toolchain/gcc/patches/5.5.0/204-musl_sh.patch delete mode 100644 toolchain/gcc/patches/5.5.0/205-musl_x86.patch delete mode 100644 toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch delete mode 100644 toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch delete mode 100644 toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch delete mode 100644 toolchain/gcc/patches/5.5.0/230-musl_libssp.patch delete mode 100644 toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch delete mode 100644 toolchain/gcc/patches/5.5.0/250-add-musl.patch delete mode 100644 toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch delete mode 100644 toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch delete mode 100644 toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch delete mode 100644 toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch delete mode 100644 toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch delete mode 100644 toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch delete mode 100
Re: [PATCH] toolchain: gcc: Remove support for GCC 5
On 12/16/20 1:21 AM, Paul Spooren wrote: On Mi, Dez 16, 2020 at 00:24, Hauke Mehrtens wrote: GCC was used in 17.01 as the default compiler the last time. We do not test this old GCC version any more and there are some known problems it fails to compile the U-Boot for the Allwinner A64 SoC. Just remove it to make it clear that we will not support this old GCC version any more. Signed-off-by: Hauke Mehrtens --- Acked-by: Paul Spooren This goes hand in hand with Petrs gcc6+ patches. I'm wondering if these major version requirement changes should happen before or after the 20.x change, I'd like the former. In do not want to support gcc 5 in the next major release and think we should remove this before branching. I am still unsure about gcc 7. Hauke OpenPGP_signature Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] build: Add IRQSOFF and PREEMPT TRACER kernel config option
From: Hauke Mehrtens This adds the CONFIG_IRQSOFF_TRACER and the CONFIG_PREEMPT_TRACER kernel configuration option to the OpenWrt menu. This can be used to debug latencies in the system. The CONFIG_PREEMPT_TRACER option needs the CONFIG_PREEMPT option which is supposed to be used for Low-Latency Desktop and not used by many targets in OpenWrt. The help text is copied from the Linux kernel Kconfig. Signed-off-by: Hauke Mehrtens --- config/Config-kernel.in | 34 ++ 1 file changed, 34 insertions(+) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 3f013aa2b21f..22e2286b8ded 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -266,6 +266,40 @@ config KERNEL_FUNCTION_PROFILER depends on KERNEL_FUNCTION_TRACER default n +config KERNEL_IRQSOFF_TRACER + bool "Interrupts-off Latency Tracer" + depends on KERNEL_FTRACE + help + This option measures the time spent in irqs-off critical + sections, with microsecond accuracy. + + The default measurement method is a maximum search, which is + disabled by default and can be runtime (re-)started + via: + + echo 0 > /sys/kernel/debug/tracing/tracing_max_latency + + (Note that kernel size and overhead increase with this option + enabled. This option and the preempt-off timing option can be + used together or separately.) + +config KERNEL_PREEMPT_TRACER + bool "Preemption-off Latency Tracer" + depends on KERNEL_FTRACE + help + This option measures the time spent in preemption-off critical + sections, with microsecond accuracy. + + The default measurement method is a maximum search, which is + disabled by default and can be runtime (re-)started + via: + + echo 0 > /sys/kernel/debug/tracing/tracing_max_latency + + (Note that kernel size and overhead increase with this option + enabled. This option and the irqs-off timing option can be + used together or separately.) + config KERNEL_DEBUG_KERNEL bool default n -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[RFC] raise gcc/make versions for 20.x
Hi, I've seen two patches for version raises of build requirements and would like to know if we should merge them before or after 20.x. make: 3.81.x -> 4.1.x gcc: 4.8 -> 6.x I'm in favor to merge both *before* the branch. Best, Paul ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] toolchain: gcc: Remove support for GCC 5
On Tue, Dec 15, 2020 at 5:14 PM Hauke Mehrtens wrote: > > On 12/16/20 1:21 AM, Paul Spooren wrote: > > > > > > On Mi, Dez 16, 2020 at 00:24, Hauke Mehrtens wrote: > >> GCC was used in 17.01 as the default compiler the last time. We do not > >> test this old GCC version any more and there are some known problems it > >> fails to compile the U-Boot for the Allwinner A64 SoC. > >> > >> Just remove it to make it clear that we will not support this old GCC > >> version any more. > >> > >> Signed-off-by: Hauke Mehrtens > >> --- > > > > Acked-by: Paul Spooren > > > > This goes hand in hand with Petrs gcc6+ patches. > > > > I'm wondering if these major version requirement changes should happen > > before or after the 20.x change, I'd like the former. > > In do not want to support gcc 5 in the next major release and think we > should remove this before branching. I am still unsure about gcc 7. Some packages in the packages feed do not build with GCC7. gerbera comes to mind (requires GCC8 because of C++17). > > Hauke > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC] raise gcc/make versions for 20.x
On Tue, Dec 15, 2020 at 6:31 PM Paul Spooren wrote: > > Hi, > > I've seen two patches for version raises of build requirements and > would like to know if we should merge them before or after 20.x. > > make: 3.81.x -> 4.1.x > gcc: 4.8 -> 6.x The issue is with EL7. That would break the ability to compile. No idea about the former in terms of bugs. In terms of the latter, there's a clang warning to fix the GCC 4.8 issue: -Werror=gnu-empty-initializer . > > I'm in favor to merge both *before* the branch. > > Best, > Paul > > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Corruption in ext4 root
I have a peculiar use case for OpenWrt: an image with an ext4 root filesystem running on Xen as a DomU. I often find the OpenWrt image's root filesystem corrupt after running "poweroff" and then restarting the DomU VM. I have gone as far as to activate CONFIG_TARGET_EXT4_JOURNAL, but this does not seem to help. It occurred to me that I might ask to see if anyone had any suggestions about what I might investigate in our default kernel configuration. Has anyone else seen anything like this? Might we be missing a sync somewhere due to our more typical reliance on overlay filesystems? I have been puzzled for a while. -- Mike :wq ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC] raise gcc/make versions for 20.x
Paul Spooren [2020-12-15 16:26:14]: Hi, > I've seen two patches for version raises of build requirements and would > like to know if we should merge them before or after 20.x. > > make: 3.81.x -> 4.1.x > gcc: 4.8 -> 6.x > > I'm in favor to merge both *before* the branch. it would probably help to know the reason as well. "I'm in favor" might not be enough in this almost pre-release stage. AFAIK that Make version bump fixes an issue with possibly few stray ANSI color escapes (workaround is to use NO_COLOR=1 in this case) and \r characters in the log file. Is it really that big issue to do this last minute version bump? FYI that gcc6+ one was NACKed[1] by Yousong and I'm fine with that for 20.12 release. I plan to rebase/resend that patch once 20.12 is branched. 1. https://patchwork.ozlabs.org/project/openwrt/patch/20191112081625.27695-1-yn...@true.cz/#2301662 Cheers, Petr ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC] raise gcc/make versions for 20.x
Rosen Penev [2020-12-15 19:03:55]: Hi, > The issue is with EL7. That would break the ability to compile. this is moot argument[1]: [root@9bb9a267fbb6 build]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) [root@9bb9a267fbb6 build]# gcc --version gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3) Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > there's a clang warning to fix the GCC 4.8 issue: > -Werror=gnu-empty-initializer . And what is your point? Are we supposed to handle this and possibly dozen other corner cases in GCC 4.8 just because someone wants to use EL7 in default setup and refuses to install and use modern toolchain? Even then, what's the problem? You could still simply revert the commit which would make gcc6+ requirement. 1. https://github.com/openwrt/openwrt/commit/4ba8f7b1ef1e4c0607185a41c06b51928c625d8b#commitcomment-35907238 Cheers, Petr ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC] raise gcc/make versions for 20.x
On Tue, Dec 15, 2020 at 9:26 PM Petr Štetiar wrote: > > Rosen Penev [2020-12-15 19:03:55]: > > Hi, > > > The issue is with EL7. That would break the ability to compile. > > this is moot argument[1]: > > [root@9bb9a267fbb6 build]# cat /etc/redhat-release > CentOS Linux release 7.7.1908 (Core) > > [root@9bb9a267fbb6 build]# gcc --version > gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3) > Copyright (C) 2018 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > there's a clang warning to fix the GCC 4.8 issue: > > -Werror=gnu-empty-initializer . > > And what is your point? empty initializers are a GNU extension and not standard C. I don't think even C23. Fixing it makes the code more portable. >Are we supposed to handle this and possibly dozen > other corner cases in GCC 4.8 just because someone wants to use EL7 in default > setup and refuses to install and use modern toolchain? Even then, what's the > problem? You could still simply revert the commit which would make gcc6+ > requirement. > > 1. > https://github.com/openwrt/openwrt/commit/4ba8f7b1ef1e4c0607185a41c06b51928c625d8b#commitcomment-35907238 > > Cheers, > > Petr ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel