aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* kernel: fix possible mtd NULL pointer dereferenceRafał Miłecki2022-10-043-2/+32
| | | | | | Fixes: edf3363959d3c ("kernel: backport mtd dynamic partition patch") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a5265497a4f6da158e95d6a450cb2cb6dc085cab)
* bcm53xx: backport clk driver fix for DT nodes namesRafał Miłecki2022-10-031-0/+72
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 77d9cce604d32005ddb90e91c6cc9b9cf35068d7)
* build: fix warnings from grepChris Osgood2022-09-291-1/+1
| | | | | | | | | | Fixes build warnings when using newer versions of grep. Signed-off-by: Chris Osgood <chris_github@functionalfuture.com> Tested-by: Georgi Valkov <gvalkov@gmail.com> (cherry picked from commit c5e167e0d6075c46ca92c30b425c4dcb05fec5ed) [ fix conflict error ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* Makefile: fix stray \ warnings with grep-3.8Nick Hainke2022-09-291-1/+1
| | | | | | | | | | | | | | | | | | | We simply grep for "/usr". So no need for "-E" or "\/". Furthermore, in the new grep versions this creates warnings. As written in the grep-3.8 announcement: Regular expressions with stray backslashes now cause warnings, as their unspecified behavior can lead to unexpected results. For example, '\a' and 'a' are not always equivalent <https://bugs.gnu.org/39678>. Fixes warnings in the form of: grep: warning: stray \ before / Signed-off-by: Nick Hainke <vincent@systemli.org> (cherry picked from commit a29d3bc48c40c6a2a93ae1806bea2ac26455cdbb) [ fix conflict error ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* mt7620: fix missing kernel config symbolFederico Capoano2022-09-241-0/+1
| | | | | | | | | | | | | | | | Fixes following missing kernel config symbol after adding GPIO watchdog: Software watchdog (SOFT_WATCHDOG) [M/n/y/?] m Watchdog device controlled through GPIO-line (GPIO_WATCHDOG) [Y/n/m/?] y Register the watchdog as early as possible (GPIO_WATCHDOG_ARCH_INITCALL) [N/y/?] (NEW) Fixes: 1a97c03d864e ("rampis: feed zbt-we1026 external watchdog") Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit fb2801b82c06878ae2ad20b8f95546c34ed3cdf4) [adapted to config-5.4] Signed-off-by: Federico Capoano <f.capoano@openwisp.io>
* rampis: feed zbt-we1026 external watchdogFederico Capoano2022-09-242-0/+9
| | | | | | | | | | | Without feeding the gpio watchdog, the board will reset after 90 seconds Signed-off-by: Arvid E. Picciani <aep@exys.org> (cherry picked from commit 1a97c03d864ee5ab917aff2988c62fce223c041e) [adapted to config-5.4] Signed-off-by: Federico Capoano <f.capoano@openwisp.io>
* base-files: add support for heartbeat led triggerAlexey Smirnov2022-09-241-0/+9
| | | | | | | | | | | | This patch adds support for creation heartbeat led trigger with, for example, this command: ucidef_set_led_heartbeat "..." "..." "..." from /etc/board.d/01_leds. Signed-off-by: Alexey Smirnov <s.alexey@gmail.com> (cherry picked from commit 66071729a27919e555752fce25210b1b035eb319)
* scripts/download.pl: fix downloads with wgetPetr Štetiar2022-09-211-2/+8
| | | | | | | | | | | | | | | | | | | | | Several users of wget for downloads (curl is not available in the system) have reported broken download functionality: wget --tries=5 --timeout=20 --output-document=- https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.142.tar.xz http://: Invalid host name. Thats all happening due to '' was passed as an argument, which got later expanded to http://. In the context of a list constructor '' is not nothing, it is an empty string element. So fix it by using () as it will yield "nothing" and thus not introduce an empty string element. Fixes: #10692 Fixes: 90c6e3aedf16 ("scripts: always check certificates") Signed-off-by: Jo-Philipp Wich <jo@mein.io> [shellwords() -> ()] Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 50a48faa1b8424e6b4b436b7118fffa2cba14b18)
* scripts/download.pl: silence can't exec curl warningPetr Štetiar2022-09-211-1/+1
| | | | | | | | | | | | When running build in verbose mode `make V=s` we can see a lot of following warnings when curl is not available in the system: Can't exec "curl": No such file or directory at scripts/download.pl line 77. So lets fix it by redirecting of the stderr to null hole. Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit c836ca84e8f641e10a8349a8f9b7432b33d6cec1)
* scripts: always check certificatesJosh Roys2022-09-213-2/+11
| | | | | | | | | | | | | | | | | Remove flags from wget and curl instructing them to ignore bad server certificates. Although other mechanisms can protect against malicious modifications of downloads, other vectors of attack may be available to an adversary. TLS certificate verification can be disabled by turning oof the "Enable TLS certificate verification during package download" option enabled by default in the "Global build settings" in "make menuconfig" Signed-off-by: Josh Roys <roysjosh@gmail.com> [ add additional info on how to disable this option ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> [backport] (cherry picked from commit 90c6e3aedf167b0ae1baf376e7800a631681e69a)
* tools: remove xxd packagePetr Štetiar2022-09-212-20/+1
| | | | | | | | | It shouldn't be needed anymore as we've now `scripts/xxdi.pl`, which should be self contained and fully compatible `xxd -i` replacement. Fixes: #10555 Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 88c9056a70901577489ecdc7a25207a9b7576d6e)
* build: provide xxd -i with scripts/xxdi.plPetr Štetiar2022-09-211-1/+4
| | | | | | | | | | | | | | | Dependency on xxd was added in commit c4dd2441e787 ("tools: add xxd (from vim)") as U-Boot requires xxd to create the default environment from an external file. Later in commit 2b94aac7a128 ("tools: xxd: use more convenient source tarball"), xxd from another source was used instead, but that source is currently unavailable, so let's fix it by using simple xxdi.pl Perl script instead. Fixes: #10555 Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit eae2fb8027cb892e42181e471ba344aa5d26bf7e)
* scripts: xxdi.pl: add xxd -i compat modePetr Štetiar2022-09-211-18/+19
| | | | | | | | | | | | So it can serve as a standalone drop in replacement for xxd utility used currently mostly in U-Boot packages with `xxd -i` mode which outputs C include file style, with aim for byte to byte identical output, so the eventual difference in the generated output is easily spottable. Fixes: #10555 Signed-off-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Jo-Philipp Wich <jo@mein.io> [perl-fu] (cherry picked from commit 06e01e817ec6643a35beb9e6946689e9cc7d020a)
* scripts: xxdi.pl: remove File::Slurp dependencyJo-Philipp Wich2022-09-211-2/+17
| | | | | | | | In order to make it more portable. Signed-off-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 8b278a76d90e3724815a5fde32be59f7796be1d8)
* scripts: add xxdi.plPetr Štetiar2022-09-211-0/+50
| | | | | | | | | | xxdi.pl is a Perl script that implements vim's 'xxd -i' mode so that packages do not have to use all of vim just to get this functionality. References: #10555 Source: https://github.com/gregkh/xxdi/blob/97a6bd5cee05d1b15851981ec38ef5a460ddfcb1/xxdi.pl Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 2117d04a3aaad3394c0afec799d9c43f8a09c2cf)
* bcm4908: fix -EPROBE_DEFER support in bcm4908_enetRafał Miłecki2022-09-212-1/+64
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 1722e23ffcf9038114142a2129c29eb3cdec8ff9)
* kernel: update U-Boot NVMEM driverRafał Miłecki2022-09-214-0/+59
| | | | | | | | 1. Fix casting 2. Support DT-defined variables Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 5652f378c6c607f99a15e6472cdca46c9c4b6162)
* bcm4908: backport mtd parser for Broadcom's U-Boot partitionRafał Miłecki2022-09-212-0/+138
| | | | | | | | Broadcom's U-Boot contains environment data blocks. They need to be found (offsets aren't predefined) to access env variables. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 137149847d0f374515f38952ce0986b03a97f2e4)
* bcm53xx: update NVMEM driver for NVRAMRafał Miłecki2022-09-214-5/+230
| | | | | | | Include support for NVMEM cells. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 2f50c53f1772f24e4687e960e21c5b392fb522f0)
* kernel: backport mtd dynamic partition patchChristian Marangi2022-09-215-4/+110
| | | | | | | | | | | | Backport upstream solution that permits to declare nvmem cells with dynamic partition defined by special parser. This provide an OF node for NVMEM and connect it to the defined dynamic partition. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 1a9ee367343edce263f82cc91a49d796c9d45ea3)
* kernel: bump 5.4 to 5.4.213Hauke Mehrtens2022-09-1743-107/+102
| | | | | | | | | | Manually adapted: layerscape/patches-5.4/820-usb-0009-usb-dwc3-Add-workaround-for-host-mode-VBUS-glitch-wh.patch Compile-tested: x86/64 Run-tested: x86/64 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* bcm53xx: drop downstream patch that now breaks pinctrl driverRafał Miłecki2022-09-131-31/+0
| | | | | | | | | | | | | | | This fixes: [ 0.292536] ns-pinmux 1800c100.cru:pinctrl: invalid resource [ 0.298322] ns-pinmux 1800c100.cru:pinctrl: Failed to map pinctrl regs [ 0.305578] ns-pinmux: probe of 1800c100.cru:pinctrl failed with error -22 Linux 5.4.157 included commit 6d0b30784fcd9 ("Revert "pinctrl: bcm: ns: support updated DT binding as syscon subnode"") which makes pinctrl driver expect the old DT syntax. Drop downstream patch switching pinctrl node to the invalidated syntax. Fixes: 0b7311300b01d ("kernel: bump 5.4 to 5.4.158") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm4908: enable NVMEM U-Boot env data driverRafał Miłecki2022-09-051-0/+3
| | | | | | | It's needed for devices with U-Boot bootloader. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit fb47b9fa1aa760de58f1b43d9f3e654acf1f1671)
* kernel: backport U-Boot environment data NVMEM driverRafał Miłecki2022-09-055-9/+359
| | | | | | | It parses U-Boot env data into NVMEM cells. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 34cf31043504473df3174a22d163b71b75e46542)
* kernel: backport mtd patch adding of_platform_populate() callsRafał Miłecki2022-09-057-15/+88
| | | | | | | This is required for non-parser drivers handling MTD devices. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 41e1e838fbbb0308ad7353a3714e04b8c4585e7e)
* kernel: bump 5.4 to 5.4.211Hauke Mehrtens2022-09-0484-253/+192
| | | | | | | | | | | | | | Similar version was upstreamed: bcm27xx/patches-5.4/950-0392-tty-amba-pl011-Add-un-throttle-support.patch Manually adapted: ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch layerscape/patches-5.4/301-arch-0008-arm-add-new-non-shareable-ioremap.patch Compile-tested: x86/64 Run-tested: x86/64 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: rename 5.20 patches to 6.0Rafał Miłecki2022-09-025-0/+0
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 372ee1919d281dd3e86121996805291a6948c982)
* bcm4908: enable & setup packet steeringRafał Miłecki2022-09-022-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without packet steering NAT masquarade speed on BCM4908 /jumps/ between two speeds: 1. 826 Mb/s (±3 Mb/s) 2. 909 Mb/s (±8 Mb/s) and it never reaches ~940 Mb/s. Proper packet steering can improve it. Below are testing results for running iperf TCP traffic from LAN to WAN. They were used to pick up golden values. ┌──────────┬──────────┬───────────┐ │ eth0 │ br-lan │ speed │ │ rps_cpus │ rps_cpus │ [Mbps] │ ├──────────┼──────────┼───────────┤ │ 0 │ 0 │ 743 / 804 │ │ 0 │ 1 │ 738 / 821 │ │ 0 │ 2 │ ✓ 940 │ │ 0 │ 4 │ ✓ 938 │ │ 0 │ 8 │ ✓ 941 │ ├──────────┼──────────┼───────────┤ │ 1 │ 0 │ 829 │ │ 1 │ 1 │ 829 │ │ 1 │ 2 │ ✓ 942 │ │ 1 │ 4 │ ✓ 941 │ │ 1 │ 8 │ ✓ 941 │ ├──────────┼──────────┼───────────┤ │ 2 │ 0 │ ✓ 942 │ │ 2 │ 1 │ 926 │ │ 2 │ 2 │ ✓ 942 │ │ 2 │ 4 │ ✓ 942 │ │ 2 │ 8 │ ✓ 941 │ ├──────────┼──────────┼───────────┤ │ 4 │ 0 │ ✓ 941 │ │ 4 │ 1 │ 925 │ │ 4 │ 2 │ ✓ 941 │ │ 4 │ 4 │ ✓ 941 │ │ 4 │ 8 │ ✓ 941 │ ├──────────┼──────────┼───────────┤ │ 8 │ 0 │ ✓ 942 │ │ 8 │ 1 │ 925 │ │ 8 │ 2 │ ✓ 941 │ │ 8 │ 4 │ ✓ 942 │ │ 8 │ 8 │ ✓ 942 │ └──────────┴──────────┴───────────┘ Ref: fcbd39689ebfe ("bcm53xx: enable & setup packet steering") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 57cad53f4e52be987cdd61308ff7d2704baca539)
* bcm4908: build bootfs image per-SoCRafał Miłecki2022-09-024-59/+92
| | | | | | | | | | | | | | | | | In theory we could have just 1 bootfs image for all devices as each device has its own entry in the "configurations" node. It doesn't work well with default configuration though. If something goes wrong U-Boot SPL can be interrupted (by pressing A) to enter its minimalistic menu. It allows ignoring boardid. In such case bootfs default configuration is used. For above reason each SoC family (BCM4908, BCM4912) should have its own bootfs built. It allows each of them to have working default configuration. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 6ae2f7ff4737ec8dbec026fc6c02f7d1850b521c)
* bcm4908: prepare for Asus GT-AX6000 supportRafał Miłecki2022-09-021-0/+10
| | | | | | | It isn't tested & Linux DT will surely need more work. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 3f2b2fe084c0019221a17e3217a01c41d003f6fd)
* bcm4908: backport bcmbca DT patches queued for 5.20Rafał Miłecki2022-09-0210-0/+1161
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit d63ef7c90f75393270ec4f5ff1b2563d6bd52066)
* bcm4908: include U-Boot DTB files for ASUS GT-AX6000 & Netgear RAX220Rafał Miłecki2022-09-011-0/+34
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 2de86691b67ea73d858ec1c78757faae795691e4)
* uboot-bcm4908: include SoC in output filesRafał Miłecki2022-09-011-2/+4
| | | | | | | | | This fixes problem of overwriting BCM4908 U-Boot and DTB files by BCM4912 ones. That bug didn't allow booting BCM4908 devices. Fixes: f4c2dab544ec2 ("uboot-bcm4908: add BCM4912 build") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a8e1e30543239e85ff5dc220368164b66cf73fba)
* uboot-bcm4908: add BCM4912 buildRafał Miłecki2022-09-013-3/+33
| | | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit f4c2dab544ec22fac6ab2de32aa5bb361c7566f7)
* uboot-bcm4908: update to the latest genericRafał Miłecki2022-09-011-3/+3
| | | | | | | | 0625aad74d arm: dts: add ASUS GT-AX6000 6fb1cb624d arm: dts: add Netgear RAXE450 / RAXE550 Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 3592aa85664040a118654555afb78659af756a4e)
* mac80211: disable ft-over-ds by defaultFelix Fietkau2022-08-301-1/+1
| | | | | | | | | Testing has shown it to be very unreliable in variety of configurations. It is not mandatory, so let's disable it by default until we have a better solution. Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 2984a0420649733662ff95b0aff720b8c2c19f8a)
* mt76: backport fix encap offload ethernet type checkThibaut VARÈNE2022-08-281-0/+63
| | | | | | | | | | The driver needs to check if the format is 802.2 vs 802.3 in order to set a tx descriptor flag. skb->protocol can't be used, since it may not be properly initialized for packets coming in from a packet socket. Fix misdetection by checking the ethertype from the skb data instead. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit description]
* ath79: add support for RouterBOARD mAPThibaut VARÈNE2022-08-285-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik mAP-2nd (sold as mAP) is an indoor 2.4Ghz AP with 802.3af/at PoE input and passive PoE passthrough. See https://mikrotik.com/product/RBmAP2nD for more details. Specifications: - SoC: QCA9533 - RAM: 64MB - Storage: 16MB NOR - Wireless: QCA9533 802.11b/g/n 2x2 - Ethernet: 2x 10/100 ports, 802.3af/at PoE in port 1, 500 mA passive PoE out on port 2 - 7 user-controllable LEDs Note: the device is a tiny AP and does not distinguish between both ethernet ports roles, so they are both assigned to lan. With the current setup, ETH1 is connected to eth1 and ETH2 is connected to eth0 via the embedded switch port 2. Flashing: TFTP boot initramfs image and then perform sysupgrade. The "ETH1" port must be used to upload the TFTP image. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Tested-By: Andrew Powers-Holmes <aholmes@omnom.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit e1223dbee332b89caf71850eb909104529595c31)
* ath79: add support for MikroTik RouterBOARD hAP ac liteThibaut VARÈNE2022-08-287-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik RB952Ui-5ac2nD (sold as hAP ac lite) is an indoor 2.4Ghz and 5GHz AP/router with a 2 dBi integrated antenna. See https://mikrotik.com/product/RB952Ui-5ac2nD for more details. Specifications: - SoC: QCA9533 - RAM: 64MB - Storage: 16MB NOR - Wireless: QCA9533 802.11b/g/n 2x2 / QCA9887 802.11a/n/ac 2x2 - Ethernet: AR934X switch, 5x 10/100 ports, 10-28 V passive PoE in port 1, 500 mA PoE out on port 5 - 6 user-controllable LEDs: - 1x user (green) - 5x port status (green) Flashing: TFTP boot initramfs image and then perform sysupgrade. The "Internet" port (port number 1) must be used to upload the TFTP image, then connect to any other port to access the OpenWRT system. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> (cherry picked from commit 2bd33e8626bd04fd7115ee1a42aaf03aae2fffb8)
* ipq40xx: add Linksys MR8300 WAN portJulien Cassette2022-08-281-2/+6
| | | | | | | | | | | This makes the WAN interface and port appear in LuCi -> Network -> Switch on Linksys MR8300. This allows to configure a VLAN on WAN. Fixes: FS#4227 Signed-off-by: Julien Cassette <julien.cassette@gmail.com> (cherry picked from commit 2c1f8a665eb3dce27deb4f9f9b718eb8baf997bd)
* hostapd: ubus: fix uninitialized pointerDavid Bauer2022-08-281-1/+1
| | | | | | | | | This fixes passing a bogus non-null pointer to the ubus handler in case the transition request is rejected. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 9b880f09f394049e0629e3c9d4061f431a6b19a8) Signed-off-by: Nick Hainke <vincent@systemli.org>
* feeds: use git-src-full to allow Git versioningPaul Spooren2022-08-282-6/+6
| | | | | | | | | | | | | | | | Both $(AUTORELEASE) and $(PKG_SRC_VERSION) (from luci.git) use the Git log to determine releases and package timestamps. Feeds are shallow cloned by default, resulting in an incomplete Git log and therefore different local package versions than offered upstream. This commits sets the default feeds to use `src-git-full` to solve that. Add fixes from "2b1d92f: scripts/feeds: silence git warning by selecting pull style" to `src-git-full` Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 7fae1e5677e9bb4979c8d4ac99be4de6955b13d0)
* ramips: add support for YunCore AX820/HWAP-AX820Clemens Hopfer2022-08-285-1/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two versions which are identical apart from the enclosure: YunCore AX820: indoor ceiling mount AP with integrated antennas YunCore HWAP-AX820: outdoor enclosure with external (N) connectors Hardware specs: SoC: MediaTek MT7621DAT Flash: 16 MiB SPI NOR RAM: 128MiB (DDR3, integrated) WiFi: MT7905DAN+MT7975DN 2.4/5GHz 2T2R 802.11ax Ethernet: 10/100/1000 Mbps x2 (WAN/PoE+LAN) LED: Status (green) Button: Reset Power: 802.11af/at PoE; DC 12V,1A Antennas: AX820(indoor): 4dBi internal; HWAP-AX820(outdoor): external Flash instructions: The "OpenWRT support" version of the AX820 comes with a LEDE-based firmware with proprietary MTK drivers and a luci webinterface and ssh accessible under 192.168.1.1 on LAN; user root, no password. The sysupgrade.bin can be flashed using luci or sysupgrade via ssh, you will have to force the upgrade due to a different factory name. Remember: Do *not* preserve factory configuration! MAC addresses as used by OEM firmware: use address source 2g 44:D1:FA:*:0b Factory 0x0004 (label) 5g 46:D1:FA:*:0b LAA of 2g lan 44:D1:FA:*:0c Factory 0xe000 wan 44:D1:FA:*:0d Factory 0xe000 + 1 The wan MAC can also be found in 0xe006 but is not used by OEM dtb. Due to different MAC handling in mt76 the LAA derived from lan is used for 2g to prevent duplicate MACs when creating multiple interfaces. Signed-off-by: Clemens Hopfer <openwrt@wireloss.net> (cherry picked from commit 4891b865380e2b7f32acf0893df9c1ca9db8d4ea) [switch to mtd-mac-address instead of nvmem-cells]
* sunxi: add support for Banana Pi M2 BerryZoltan HERPAI2022-08-282-0/+17
| | | | | | | | | | | | | | | | | | | CPU: Allwinner V40 quad-core Cortex A7 @ 1.2GHz Memory: 1GB DDR3 Storage: SDcard, native SATA Network: 10/100/1000M ethernet, Ampak AP6212 wifi + BT USB: 4x USB 2.0 Installation: Use the standard sunxi installation to an SD-card. While the board is very similar to the M2 Ultra board (the V40 is the automotive version of the R40), as both the u-boot and kernel supports them separately, and some pins are different, let's add a separate device spec. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> (cherry picked from commit 9aa66b8ce730aebff76d353392151708a897a3a0)
* ramips: add support for Sitecom WLR-4100 v1 002Andrea Poletti2022-08-284-2/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sitecom WLR-4100 v1 002 (marked as X4 N300) is a wireless router Specification: SoC: MT7620A RAM: 64 MB DDR2 Flash: MX25L6405D SPI NOR 8 MB WIFI: 2.4 GHz integrated Ethernet: 5x 10/100/1000 Mbps QCA8337 USB: 1x 2.0 LEDS: 2x GPIO controlled, 5x switch Buttons: 1x GPIO controlled UART: row of 4 unpopulated holes near USB port, starting count from white triangle on PCB: VCC 3.3V GND TX RX baud: 115200, parity: none, flow control: none Installation Connect to one of LAN (yellow) ethernet ports, Open router configuration interface, Go to Toolbox > Firmware, Browse for OpenWrt factory image with dlf extension and hit Apply, Wait few minutes, after the Power LED will stop blinking, the router is ready for configuration. Known issues Some USB 2.0 devices work at full speed mode 1.1 only MAC addresses factory partition only contains one (binary) MAC address in 0x4. u-boot-env contains four (ascii) MAC addresses, of which two appear to be valid. factory 0x4 **:**:**:**:b9:84 binary u-boot-env ethaddr **:**:**:**:b9:84 ascii u-boot-env wanaddr **:**:**:**:b9:85 ascii u-boot-env wlanaddr 00:AA:BB:CC:DD:12 ascii u-boot-env iNICaddr 00:AA:BB:CC:DD:22 ascii The factory firmware only assigns ethaddr. Thus, we take the binary value which we can use directly in DTS. Additional information OEM firmware shell password is: SitecomSenao useful for creating backup of original firmware. There is also another revision of this device (v1 001), based on RT3352 SoC The nvmem feature (commit 06bb4a5) was introduced in master after the splitting of the 21.02 branch. It need to be reverted in 21.02.. Signed-off-by: Andrea Poletti <polex73@yahoo.it> [remove config DT label, convert to nvmem, remove MAC address setup from u-boot-env, add MAC address info to commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit de0c380a5f8289839ab970e794a45f0e04a466a3) Signed-off-by: Petr Štetiar <ynezz@true.cz>
* tools/libelf: alpine linux os type: linux-musl fixIsaev Ruslan2022-08-281-0/+11
| | | | | | | Prevents ./configure "checking build system" test fail on Alpine linux. Signed-off-by: Isaev Ruslan <legale.legale@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit description]
* uclibc++: fix compilation with long file pathsAlois Klink2022-08-281-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, uClic++ 0.2.5 fails to compile when using a long filepath. For example, if the openwrt directory is in the path: /tmp/this_directory_name_is_very_long/more_long_paths/.../openwrt, then uclibc++ will cause a very obtuse error. Although the uclibc++ makefiles do print a "File name too long" error, it's not the final error that's printed, so it's a bit confusing: > /bin/sh: 1: > cannot create src/abi/libsupc/<SNIP>_libsupc++.a.dep: File name too long > <SNIP: some other makefile output here> > array_type_info.o: No such file or directory Although OpenWRT 22.03 and current master branch have removed uClib++, I thought I'd make a PR for OpenWRT 21.02, since I encountered it and there seems to be quite a few other people experiencing the same issue. It especially happens when using the SDK, (or when using an encrypted fs) since the pre-packaged SDKs have very long filenames. This patch is already in upstream [1], but has not yet been released. [1]: https://git.busybox.net/uClibc++/commit/?id=6687fc9276fa52defaf8592f2001c19b826aec93 Signed-off-by: Alois Klink <alois@aloisklink.com>
* zlib: backport null dereference fixPetr Štetiar2022-08-092-1/+30
| | | | | | | | | | | | | | The curl developers found test case that crashed in their testing when using zlib patched against CVE-2022-37434, same patch we've backported in commit 7df6795d4c25 ("zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)"). So we need to backport following patch in order to fix issue introduced in that previous CVE-2022-37434 fix. References: https://github.com/curl/curl/issues/9271 Fixes: 7df6795d4c25 ("zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)") Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit f443e9de7003c00a935b9ea12f168e09e83b48cd) (cherry picked from commit 707ec48ab3db6d08bd022df1bc720aee68b3b99d)
* zlib: backport fix for heap-based buffer over-read (CVE-2022-37434)Petr Štetiar2022-08-082-1/+33
| | | | | | | | | | | | | zlib through 1.2.12 has a heap-based buffer over-read or buffer overflow in inflate in inflate.c via a large gzip header extra field. NOTE: only applications that call inflateGetHeader are affected. Some common applications bundle the affected zlib source code but may be unable to call inflateGetHeader. Fixes: CVE-2022-37434 References: https://github.com/ivd38/zlib_overflow Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 7df6795d4c25447683fd4b4a4813bebcddaea547)
* octeon: add SUPPORTED_DEVICES to er/erlitePaul Spooren2022-07-291-0/+2
| | | | | | | | | | | | | | | | | Using the BOARD_NAME variable results for both er and erlite devices to identify themselfs as `er` and `erlite` (via `ubus call system board`). This is problematic when devices search for firmware upgrades since the OpenWrt profile is actually called `ubnt_edgerouter` and `ubnt_edgerouter-lite`. By adding the `SUPPORTED_DEVICE` a mapping is created to point devices called `er` or `erlite` to the corresponding profile. FIXES: https://github.com/openwrt/asu/issues/348 Signed-off-by: Paul Spooren <mail@aparcar.org> (cherry picked from commit 2a07270180ed0e295d854d6e9e59c78c40549efc)