aboutsummaryrefslogtreecommitdiffstats
path: root/target
Commit message (Collapse)AuthorAgeFilesLines
* Revert "octeon: mark source-only"Stijn Tintel2022-04-031-1/+1
| | | | | | | | | | The memory leak is fixed by the kernel patches backported in the previous commit. This reverts commit 1fa8780056a8c7a2e26c8b4d5e6979232f117349. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit f6cda9f06b09c94457e838a28ef300b2f3c6be77)
* kernel: backport pgalloc memory leak fixStijn Tintel2022-04-032-0/+96
| | | | | | | | Backport a fix for the massive memory leak observed in Octeon after switching to kernel 5.10. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 9283359bd53a889a270da4a7d5bbe3eaaa771e70)
* octeon: mark source-onlyStijn Tintel2022-04-011-1/+1
| | | | | | | | There is a hard to reproduce, even harder to track down memory leak in Octeon since kernel 5.10. Mark octeon source-only until it is plugged. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 1fa8780056a8c7a2e26c8b4d5e6979232f117349)
* ath79: migrate Archer C5 5GHz radio device pathsJan-Niklas Burfeind2022-03-311-0/+1
| | | | | | | | | | | | When upgrading a TP-Link Archer C5 v1 from ar71xx to ath79, the 5ghz radio stops working because the device path changed. Same has been done for the Archer C7 before: commit e19506f20618 ("ath79: migrate Archer C7 5GHz radio device paths") Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me> (cherry picked from commit c6eb63d48f942f1e54737ed182776cf9a08de542)
* ath79: fix label MAC address for Ubiquiti UniFi AP Outdoor+Matthias Schiffer2022-03-303-2/+4
| | | | | | | | | | The label has the MAC address of eth0, not the WLAN PHY address. We can merge the definition back into ar7241_ubnt_unifi.dtsi, as both DTS derived from it use the same interface for their label MAC addresses after all. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit aee9ccf5c1b536189ebee8c232273657334da843)
* realtek: Fix tc default packageHauke Mehrtens2022-03-291-1/+1
| | | | | | | | | | | The tc package does not exits any more, it was split into tc-tiny, tc-full and tc-bpf. Include tc-bpf by default into realtek images. This increases the compressed image size by about 232KBytes. Tested-by: Stijn Segers <foss@volatilesystems.org> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 34fb36e165d5b6e6e37d33b4b0da789a8f1430bb)
* realtek: Use firewall4Hauke Mehrtens2022-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | The realtek target is not a router, but basic device, see DEVICE_TYPE. The basic device type does not come with firewall by default, see include/target.mk for details. The realtek target extended DEFAULT_PACKAGES manually with firewall. This changes the defaults to take firewall4 and nftables instead of firewall and iptables. This also adds the additional package kmod-nft-offload. The only difference to the router type is the missing ppp, ppp-mod-pppoe, dnsmasq and odhcpd-ipv6only package. This increases the compressed image size by about 422KBytes. Tested-by: Stijn Segers <foss@volatilesystems.org> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 469030659c5cb140bdbff1b3d8fc9691f98f984b)
* realtek: Remove dnsmasq and odhcpd-ipv6only from defaultHauke Mehrtens2022-03-291-1/+1
| | | | | | | | | | | | Do not include the dnsmasq and odhcpd-ipv6only package by default any more. These services are not needed on a switch. If someone needs this it is still possible to use opkg or image builder to add them. This decreases the compressed image size by about 165KBytes. Tested-by: Stijn Segers <foss@volatilesystems.org> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 2acebbdcaafbdfd3f677052c28bc0af04c6b5ab8)
* ipq40xx: WAC510: device-tree overhaulingChristian Lamparter2022-03-272-40/+33
| | | | | | | | | | removes usb-port remains as neither the WAC510 nor the WAC505 come with a USB port. Update the LED properties to phase out labels and introduce generic node-names as well as adding the color, function and function-enumerator properties. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 026fda10a5c45d56fd856628b6e9e69b95fd5e58)
* lantiq: xrx200: replace patch with upstream versionAleksander Jan Bajkowski2022-03-275-101/+402
| | | | | | | | | | | | This commit replaces patch number 0703 with the upstream accepted version. This patch requires backporting an additional patch to avoid conflicts. The only significant change is the lower maximum MTU. Packets with lengths over 2400 may be dropped. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> (cherry picked from commit b4970dab6b0c3e13715f4b13de42d72a74c1c9e9)
* kernel: bump 5.10 to 5.10.108Rui Salvaterra2022-03-277-15/+15
| | | | | | | | | | | | | | | | | Patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Tested-by: John Audia <graysky@archlinux.us> Build-tested: ath79/generic, ramips/mt76{20,21,x8}, ipq40xx, mvebu, realtek/rtl{838,930}x, x86/64 Run-tested: ramips/mt7621, mvebu Tested-by: Stijn Segers <foss@volatilesystems.org> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> (cherry picked from commit 2c26eb4e484fe6d7a8159a22f97b6db7ca6e9221)
* x86: Add support for Sophos XG 85 and XG 86 devicesRaylynn Knight2022-03-272-2/+3
| | | | | | | | | | | | | This commit builds on previous efforts to add support for Sophos devices. * Add support for Sophos XG 85 with/without wireless * Add support for Sophos XG 86 with/without wireless Tested on Sophos XG 85w rev1 and XG 86 rev 1 Signed-off-by: Raylynn Knight <rayknight@me.com> (cherry picked from commit c7bcbcd49280a79b287cc072cd0ca7de777a7ac4)
* generic: sync mtd rootfs hack with part_bitsDaniel Golle2022-03-271-1/+1
| | | | | | | | | | | | | | | In commit ab143647ef ("kernel: generic: improve FIT partition parser") part_bits was bumped to 2 in order to allow up to 3 additional FIT sub-images mapped into sub-partitions. This change has to be reflected also in our local patch 420-mtd-set-rootfs-to-be-root-dev.patch which still assumed part_bits==1 for mtdblock devices in case of CONFIG_FIT_PARTITION=y. Fixes: #9557 Fixes: ab143647ef ("kernel: generic: improve FIT partition parser") Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 13960fb0e0babcd99530fcb234073af0c0a5e2f5)
* kernel: generic: fix warning in FIT partition parserDaniel Golle2022-03-271-2/+2
| | | | | | | Use 'const char *' where necessary to make gcc get quiet. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit d3a4607fc61f890d5d4bedef6e542046038294d9)
* kernel: generic: improve FIT partition parserDaniel Golle2022-03-272-13/+41
| | | | | | | | | | * only map filesystems configured in 'loadables' * allow mapping more than one filesystem (e.g. customization/branding or localization in addition to rootfs) * small cleaning here and there Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit ab143647efef2a13bcce2f28a2797899fbc83946)
* kernel: generic: use chosen bootconf in FIT partition parserDaniel Golle2022-03-271-4/+13
| | | | | | | | | | If the selected boot configuration is stored by U-Boot in '/chosen' node as 'bootconf' attribute, use that configuration to resolve the block device used as rootfs. Fall back to use the default configuration in case 'bootconf' is not present. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 503f3b9f0e9693bb983a0f259aa4ba106a690140)
* kernel: add (disabled) ASYMMETRIC_TPM_KEY_SUBTYPE symbolChristian Lamparter2022-03-271-0/+1
| | | | | | | | | | | | | | | at91/sama7 fails to build due to: | Asymmetric (public-key cryptographic) key type (ASYMMETRIC_KEY_TYPE) [Y/?] y | Asymmetric public-key crypto algorithm subtype (ASYMMETRIC_PUBLIC_KEY_SUBTYPE) [Y/?] y | Asymmetric TPM backed private key subtype (ASYMMETRIC_TPM_KEY_SUBTYPE) [N/m/?] (NEW) |Error in reading or end of file. please note that asym_tpm (module) has been removed in 5.17: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d3cff4a9> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 638771509383cf36617c49b9cc1e0c4a9aedaa0d)
* ipq40xx: update E2600AC c1/c2 board张 鹏2022-03-264-16/+28
| | | | | | | | | | Modified the radio frequency hardware part of e2600ac c1/c2, need to cooperate with the modified board.bin file, the device can work normally. Signed-off-by: 张 鹏 <sd20@qxwlan.com> (cherry picked from commit bdc786e82c13547b01bd8f699d00598a974c14f6) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: backport two intel igc patches from 5.15Pascal Coudurier2022-03-262-0/+116
| | | | | | | | | | | | to allow proper initialization of device - igc: Remove _I_PHY_ID checking - igc: Remove phy->type checking Signed-off-by: Pascal Coudurier <coudu@wanadoo.fr> (refreshed) Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit dd45cc2123b75abb0b41eb90c21d8d3506f2a3c2)
* apm821xx: fix crash/panic related to SATA/SSD choiceChristian Lamparter2022-03-261-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ticerex on the OpenWrt Forum reported a gnarly crash when he was using Samsung 840 and 850 EVOs with his MyBook Live: | BUG: Kernel NULL pointer dereference at 0x00000000 | Faulting instruction address: 0xc03ed4b8 | Oops: Kernel access of bad area, sig: 11 [#1] | BE PAGE_SIZE=4K PowerPC 44x Platform | CPU: 0 PID: 362 Comm: scsi_eh_1 Not tainted 5.4.163 #0 | NIP: c03ed4b8 LR: c03d27e8 CTR: c03ed36c | REGS: cfa59950 TRAP: 0300 Not tainted (5.4.163) | MSR: 00021000 <CE,ME> CR: 42000222 XER: 00000000 | DEAR: 00000000 ESR: 00000000 | GPR00: c03d27e8 cfa59a08 cfa55fe0 00000000 0fa46bc0 [...] | [..] | NIP [c03ed4b8] sata_dwc_qc_issue+0x14c/0x254 | LR [c03d27e8] ata_qc_issue+0x1c8/0x2dc | Call Trace: | [cfa59a08] [c003f4e0] __cancel_work_timer+0x124/0x194 (unreliable) | [cfa59a78] [c03d27e8] ata_qc_issue+0x1c8/0x2dc | [cfa59a98] [c03d2b3c] ata_exec_internal_sg+0x240/0x524 | [cfa59b08] [c03d2e98] ata_exec_internal+0x78/0xe0 | [cfa59b58] [c03d30fc] ata_read_log_page.part.38+0x1dc/0x204 | [cfa59bc8] [c03d324c] ata_identify_page_supported+0x68/0x130 | [...] This turned out this is an issue with upstream changing ATA_TAG_INTERNAL's value from 31 to 32 during 4.18 release. Update "SATA_DWC_QCMD_MAX" to account for that. Link: https://forum.openwrt.org/t/my-book-live-duo-reboot-loop/122464 Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit e95dec811661f60ae931e09e320249187922bd67)
* ipq40xx: disable non-building tel(co Electronics) x1proChristian Lamparter2022-03-261-0/+1
| | | | | | | | | | | Tel(co Electronics) X1 Pro is preventing ipq40xx generic from building due to the KERNEL_SIZE. Whenever bigger kernels are possible, if lzma is supported is unknown. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 4ce52de450922dc671f08fb4551c066cfcf55bf4)
* ath79: fix link for long cables with OCEDO RaccoonDavid Bauer2022-03-261-1/+12
| | | | | | | | | | The OCEDO Raccoon had significant packet-loss with cables longer than 50 meter. Disabling EEE restores normal operation. Also change the ethernet config to reduce loss on sub-1G links. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 4551bfd91f31be5987727c77e58333fa06ba3acd)
* ath79: fix TPLINK_HWREV field for TL-WR1043ND v4Matthias Schiffer2022-03-251-0/+1
| | | | | | | | | | | Required to allow sysupgrades from OpenWrt 19.07. Closes #7071 Fixes: 98fbf2edc021 ("ath79: move TPLINK_HWID/_HWREV to parent for tplink-safeloader") Tested-by: J. Burfeind <git@aiyionpri.me> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit 8ba71f1f6f2359f9cf54201e9fc037df33f123c0)
* imagebuilder: fix broken image generation with external targetsPetr Štetiar2022-03-251-1/+1
| | | | | | | | | | | When using external targets there is a symlink being created for the target under target/linux which then becomes dangling under Image Builder. Fix it by dereferencing the possible symlink. Tested on IB with external target, ipq40xx and mvebu. Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit 621f39d1f438bf95dbae667c575926fa16a6d797)
* ath79: change Ubiquiti UniFi AP model name to include "AP"Matthias Schiffer2022-03-242-2/+2
| | | | | | | | | | While it hasn't always been clear whether the "AP" is part of the model name on the Ubiquiti website, we include it for all other pre-AC variants (AP Pro and the AP Outdoor+). Add it to the original UniFi AP as well for consistency. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit dc23df8a8ca728871d84f0a140f4b52c36b03f1d)
* ath79: fix label MAC address for Ubiquiti UniFiMatthias Schiffer2022-03-243-4/+2
| | | | | | | The label has the MAC address of eth0, not the WLAN PHY address. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit 2a02b7049966dc77ae9519ca165f29b75e0dbf0e)
* mvebu: udpu: fix initramfs bootingRobert Marko2022-03-241-1/+1
| | | | | | | | | | | uDPU provides a FIT based initramfs, but currently gets stuck after U-boot starts the kernel at "Starting kernel..". It is due to the load address being too low, so increase it in order to get the initramfs booting again. Signed-off-by: Robert Marko <robert.marko@sartura.hr> (cherry picked from commit 80f21e53360d52d493c51a4a263d9b7607b7494e)
* mvebu: udpu: include LM75 kmod by defaultRobert Marko2022-03-241-1/+1
| | | | | | | | uDPU has 2 LM75 compatible temperature sensors, so include the driver for them by default in order to utilize them. Signed-off-by: Robert Marko <robert.marko@sartura.hr> (cherry picked from commit a8b2d3590329386d0ae6873460b2d5126f63ddaa)
* kernel: Fix patch headerMarek Behún2022-03-241-1/+1
| | | | | | | | | | | Remove "a" character from the first line of patch 738-v5.14-01-net-dsa-qca8k-fix-an-endian-bug-in-qca8k-get-ethtool.patch Otherwise `git am` fails to apply this patch which is annoying when trying to do some development / rebasing. Signed-off-by: Marek Behún <kabel@kernel.org> (cherry picked from commit f811c33b197138d8e9ab7bc9fbdc3836e95827b8)
* sunxi: cortexa7: fix ethernet link detection on a20-olinuxino-lime2Petr Štetiar2022-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | a20-olinuxino-lime2 is currently having hard time with link detection of certain 1000Mbit partners due to usage of generic PHY driver, probably due to following missing workaround introduced in upstream in commit 3aed3e2a143c ("net: phy: micrel: add Asym Pause workaround"): The Micrel KSZ9031 PHY may fail to establish a link when the Asymmetric Pause capability is set. This issue is described in a Silicon Errata (DS80000691D or DS80000692D), which advises to always disable the capability. This patch implements the workaround by defining a KSZ9031 specific get_feature callback to force the Asymmetric Pause capability bit to be cleared. This fixes issues where the link would not come up at boot time, or when the Asym Pause bit was set later on. As a20-olinuxino-lime2 has Micrel KSZ9031RNXCC-TR Gigabit PHY since revision H, so we need to use Micrel PHY driver on those devices. Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit ffa1088f63267f817a3adf34c84b8e8089b1a938)
* kernel: delete Linux 5.4 config and patchesDaniel Golle2022-03-211708-477713/+0
| | | | | | | | | As the upcoming release will be based on Linux 5.10 only, remove all kernel configuration as well as patches for Linux 5.4. There were no targets still actively using Linux 5.4. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit 3a14580411adfb75f9a44eded9f41245b9e44606)
* mediatek: Add support for Xiaomi Redmi Router AX6SRichard Huynh2022-03-215-2/+393
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also known as the "Xiaomi Router AX3200" in western markets, but only the AX6S is widely installation-capable at this time. SoC: MediaTek MT7622B RAM: DDR3 256 MiB (ESMT M15T2G16128A) Flash: SPI-NAND 128 MiB (ESMT F50L1G41LB or Gigadevice GD5F1GQ5xExxG) WLAN: 2.4/5 GHz 4T4R 2.4 GHz: MediaTek MT7622B 5 GHz: MediaTek MT7915E Ethernet: 4x 10/100/1000 Mbps Switch: MediaTek MT7531B LEDs/Keys: 2/2 (Internet + System LED, Mesh button + Reset pin) UART: Marked J1 on board VCC RX GND TX, beginning from "1". 3.3v, 115200n8 Power: 12 VDC, 1.5 A Notes: U-Boot passes through the ethaddr from uboot-env partition, but also has been known to reset it to a generic mac address hardcoded in the bootloader. However, bdata is also populated with the ethernet mac addresses, but is also typically never written to. Thus this is used instead. Installation: 1. Flash stock Xiaomi "closed beta" image labelled 'miwifi_rb03_firmware_stable_1.2.7_closedbeta.bin'. (MD5: 5eedf1632ac97bb5a6bb072c08603ed7) 2. Calculate telnet password from serial number and login 3. Execute commands to prepare device nvram set ssh_en=1 nvram set uart_en=1 nvram set boot_wait=on nvram set flag_boot_success=1 nvram set flag_try_sys1_failed=0 nvram set flag_try_sys2_failed=0 nvram commit 4. Download and flash image On computer: python -m http.server On router: cd /tmp wget http://<IP>:8000/factory.bin mtd -r write factory.bin firmware Device should reboot at this point. Reverting to stock: Stock Xiaomi recovery tftp that accepts their signed images, with default ips of 192.168.31.1 + 192.168.31.100. Stock image should be renamed to tftp server ip in hex (Eg. C0A81F64.img) Triggered by holding reset pin on powerup. A simple implementation of this would be via dnsmasq's dhcp-boot option or using the vendor's (Windows only) recovery tool available on their website. Signed-off-by: Richard Huynh <voxlympha@gmail.com> (cherry picked from commit 9f9477b2751231d57cdd8c227149b88c93491d93)
* mediatek: Add GD5F1GQ5xExxG to mtk-snandRichard Huynh2022-03-211-0/+4
| | | | | | | Some units of the Xiaomi Redmi Router AX6S/Xiaomi Router AX3200 contain this part. Signed-off-by: Richard Huynh <voxlympha@gmail.com> (cherry picked from commit 4177de10df384e0106191e5b204b0aa11431fe77)
* ipq40xx: add support for Telco X1 ProNicholas Smith2022-03-195-2/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | Telco X1 Pro is a Cat12 LTE-A Pro modem router. Vendor firmware is based on a recent version of OpenWrt. Flashing is possible via CLI using sysupgrade -F -n The serial headers allow bootloader and console access Serial setting: 115200 8N1 Brief Specifications: IPQ4019 SoC 32MB flash 512MB RAM 4x gigabit LAN 1x gigabit WAN Dual-band Wave-2 wifi 2x SMA LTE antenna connectors 2x RP-SMA wifi antennas 1x USB 2.0 port 1x Reset button Serial headers installed 1x Nano SIM tray 1x Quectel EM-12G LTE-A Pro modem 1x M.2 slot attached to USB 3.0 1x internal micro SD card slot Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
* ramips: add support for D-Link DIR-878 R1Igor Nazarov2022-03-192-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: MediaTek MT7621AT - RAM: 128 MB (DDR3) - Flash: 16 MB (SPI NOR) - WiFi: MT7615N (2.4GHz) and MT7615N (5Ghz) - Switch: 1 WAN, 4 LAN (Gigabit) - Buttons: Reset, WiFi Toggle, WPS - LEDs: Power, Internet, WiFi 2.4G WiFi 5G The R1 revision is identical to the A1 revision except - No Config2 Parition, therefore - factory partition resized to 64k from 128K - Firmware partition offset is 0x50000 not 0x60000 - Firmware partitions size increased by 64K - Firmware partition type is "denx,uimage", not "sge,uimage" - Padding of image creation "uimage-padhdr 96" removed Installation: Update to the last D-Link firmware through web-ui before OpenWRT installation then follow the instructions to patch your device using D-Link FailsafeUI. - D-Link FailsafeUI: Power down the router, press and hold the reset button, then re-plug it. Keep the reset button pressed until the internet LED stops flashing, then jack into any lan port and manually assign a static IP address in 192.168.0.0/24 other than 192.168.0.1 (e.g. 192.168.0.2) and go to http://192.168.0.1 Flash with the factory image. Signed-off-by: Igor Nazarov <tigron.dev@gmail.com>
* kernel: bump 5.10 to 5.10.107John Audia2022-03-194-10/+3
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* ramips: add support for Beeline SmartBox FlashMikhail Zhilkin2022-03-196-0/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Beeline SmartBox Flash is a wireless AC1300 (WiFi 5) router manufactured by Arcadyan company. Device specification -------------------- SoC Type: MediaTek MT7621AT RAM: 256 MiB, Winbond W632GU6NB Flash: 128 MiB (NAND), Winbond W29N01HVSINF Wireless 2.4 GHz (MT7615DN): b/g/n, 2x2 Wireless 5 GHz (MT7615DN): a/n/ac, 2x2 Ethernet: 3xGbE (WAN, LAN1, LAN2) USB ports: 1xUSB3.0 Button: 1 (Reset/WPS) LEDs: 1 RGB LED Power: 12 VDC, 1.5 A Connector type: Barrel Bootloader: U-Boot (Ralink UBoot Version: 5.0.0.2) OEM: Arcadyan WE42022 Installation ------------ 1. Place *factory.trx on any web server (192.168.1.2 in this example) 2. Connect to the router using telnet shell (no password required) 3. Save MAC adresses to U-Boot environment: uboot_env --set --name eth2macaddr --value $(ifconfig | grep eth2 | \ awk '{print $5}') uboot_env --set --name eth3macaddr --value $(ifconfig | grep eth3 | \ awk '{print $5}') uboot_env --set --name ra0macaddr --value $(ifconfig | grep ra0 | \ awk '{print $5}') uboot_env --set --name rax0macaddr --value $(ifconfig | grep rax0 | \ awk '{print $5}') 4. Ensure that MACs were saved correctly: uboot_env --get --name eth2macaddr uboot_env --get --name eth3macaddr uboot_env --get --name ra0macaddr uboot_env --get --name rax0macaddr 5. Download and write the OpenWrt images: cd /tmp wget http://192.168.1.2/factory.trx mtd_write erase /dev/mtd4 mtd_write write factory.trx /dev/mtd4 6. Set 1st boot partition and reboot: uboot_env --set --name bootpartition --value 0 reboot Back to Stock ------------- 1. Run in the OpenWrt shell: fw_setenv bootpartition 1 reboot 2. Optional step. Upgrade the stock firmware with any version to overwrite the OpenWrt in Slot 1. MAC addresses ------------- +-----------+-------------------+----------------+ | Interface | MAC | Source | +-----------+-------------------+----------------+ | label | 30:xx:xx:51:xx:09 | No MACs was | | LAN | 30:xx:xx:51:xx:09 | found on Flash | | WAN | 30:xx:xx:51:xx:06 | [1] | | WLAN_2g | 30:xx:xx:51:xx:07 | | | WLAN_5g | 32:xx:xx:41:xx:07 | | +-----------+-------------------+----------------+ [1]: a. Label wasb't found neither in factory nor in other places. b. MAC addresses are stored in encrypted partition "glbcfg". Encryption key hasn't known yet. To ensure the correct MACs in OpenWrt, a hack with saving of the MACs to u-boot-env during the installation was applied. c. Default Ralink ethernet MAC address (00:0C:43:28:80:36) was found in "Factory" 0xfff0. It's the same for all Smartbox Flash devices. OEM firmware also uses this MAC when initialazes ethernet driver. In OpenWrt we use it only as internal GMAC (eth0), all other MACs are unique. Therefore, there is no any barriers to the operation of several Smartbox Flash devices even within the same broadcast domain. Stock firmware image format --------------------------- +--------------+---------------+----------------------------------------+ | Offset | 1.0.15 | Description | +==============+===============+========================================+ | 0x0 | 5d 43 6f 74 | TRX magic "]Cot" | +--------------+---------------+----------------------------------------+ | 0x4 | 00 70 ff 00 | Length (reverse) | +--------------+---------------+----------------------------------------+ | | | htonl(~crc) from 0xc ("flag_version") | | 0x8 | 72 b3 93 16 | to "Length" | +--------------+---------------+----------------------------------------+ | 0xc | 00 00 01 00 | Flags | +--------------+---------------+----------------------------------------+ | | | Offset (reverse) of Kernel partition | | 0x10 | 1c 00 00 00 | from the start of the header | +--------------+---------------+----------------------------------------+ | | | Offset (reverse) of RootFS partition | | 0x14 | 00 00 42 00 | from the start of the header | +--------------+---------------+----------------------------------------+ | 0x18 | 00 00 00 00 | Zeroes | +--------------+---------------+----------------------------------------+ | 0x1c | 27 05 19 56 … | Kernel data + zero padding | +--------------+---------------+----------------------------------------+ | | | RootFS data (starting with "hsqs") + | | 0x420000 | 68 73 71 73 … | zero padding to "Length" | +--------------+---------------+----------------------------------------+ | | | Some signature data (format is | | | | unknown). Necessary for the fw | | "Lenght" | 00 00 00 00 … | update via oem fw web interface. | +--------------+---------------+----------------------------------------+ | "Lenght" + | | TRX magic "HDR0". U-Boot is | | 0x10c | 48 44 52 30 | checking it at every boot. | +--------------+---------------+----------------------------------------+ | | | 1.00: | | | | Zero padding to ("Lenght" + 0x23000) | | | | 1.0.12: | | | | Zero padding to ("Lenght" + 0x2a000) | | "Lenght" + | | 1.0.13, 1.0.15, 1.0.16: | | 0x110 | 00 00 00 00 | Zero padding to ("Lenght" + 0x10000) | +--------------+---------------+----------------------------------------+ Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
* kernel: bump 5.10 to 5.10.106John Audia2022-03-1920-57/+47
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.10 to 5.10.105John Audia2022-03-193-17/+20
| | | | | | | | | | | | | | | Updated default config with new sym (CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y). Manually rebased: generic/hack-5.10/220-arm-gc_sections.patch All other patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* bcm27xx: bcm2711: add kmod-usb-net-lan78xxJosef Schlehofer2022-03-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some vendors like Seeedstudio in their product [1] with Raspberry Pi Compute Module 4 uses Microchip LAN7800 (USB 3.0 to Gigabit Ethernet Bridge) - USB 3.0 extended from PCIe of CM4. lsusb output: ``` Bus 002 Device 002: ID 0424:7800 Microchip LAN7800 ``` Raspberry Pi 4 and even Compute Module 4 has many resources available and for just one kernel module it is not necessary to add additional specific CM4 profiles. Let's include it by default, so the both Ethernet ports will be usable to have better user-experience. Because previous generation of Raspberry Pi included LAN7800 Gigabit Ethernet by default and it is enabled there [2] in kernel without additional kernel module, which was added recently [3]. After this commit in dmesg can be found this: ``` root@OpenWrt:~# dmesg | grep lan [ 7.038889] lan78xx 2-3:1.0 (unnamed net_device) (uninitialized): int urb period 64 [ 7.090484] usbcore: registered new interface driver lan78xx ``` Tested and works with sysupgrade image. [1] https://www.seeedstudio.com/Dual-GbE-Carrier-Board-with-4GB-RAM-32GB-eMMC-RPi-CM4-Case-p-5029.html [2] https://github.com/openwrt/openwrt/blob/32c74552b2310531af593ee0f859a3935a3a7cbd/target/linux/bcm27xx/bcm2709/config-5.4#L437 [3] https://github.com/openwrt/openwrt/commit/31647d8be8c60bfb6690c87c739b8abe6dc03950 Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* kernel: enable SERIAL_8250_16550A_VARIANTSStijn Tintel2022-03-181-1/+1
| | | | | | | | | | | | | | | | | | | Kernel 5.6 introduced a new config symbol SERIAL_8250_16550A_VARIANTS. In kernel 5.8, this symbol was changed to default to on on !x86, as some embedded devices still use 16650A variants. Let's play safe here and enable this symbol in the generic config, to avoid others from running into this problem and having to spend several hours trying to bisect this problem. While we could disable the symbol in the x86 target configs, a 20ms boot time reduction really isn't worth the time wasted on bisecting this issue. Matt discovered this problem while working on adding support for the WatchGuard Firebox M200 to the qoriq target, where it caused some characters to be missing on the console output. Reported-by: Matt Fawcett <mattytap@icloud.com> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Reviewed-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ath79: improve support for GL.iNet GL-XE300Pascal Coudurier2022-03-173-1/+10
| | | | | | | | | | - fix eth0 eth1 sharing same mac so it conforms to the behavior stated in the original commit and the way it is in vendor firmware : WAN is label, LAN is label +1 and WLAN is label +2 - add default leds config - add default network config Signed-off-by: Pascal Coudurier <coudu@wanadoo.fr>
* mpc85xx: fix missing kernel config symbol and DTS whitespace issuePetr Štetiar2022-03-172-1/+2
| | | | | | | | | | | | | Buildbot has reported following issue while crunching mpc85xx/p1010 subtarget: Extreme Networks WS-AP3825i (WS_AP3825I) [N/y/?] (NEW) Fix it by disabling that config symbol in target kernel config and while at it fix DTS whitespace issue. Fixes: 7e614820a892 ("mpc85xx: add support for Extreme Networks WS-AP3825i") Signed-off-by: Petr Štetiar <ynezz@true.cz>
* lantiq: fritz7362sl: add partition subnode for SPI flashJan Hoffmann2022-03-161-14/+20
| | | | | | | | | | | Without a partition subnode ofpart_core still parses direct subnodes as partitions, but it ignores nodes with a compatible property. Due to this, the switch to nvmem-cells made the urlader partition inaccessible. As a result, the wireless network was broken, as the calibration data is read from that partition by a script. Fixes: #8983 Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* lantiq: fritz7362sl: fix SPI flash node reg propertyMartin Blumenstingl2022-03-161-1/+1
| | | | | | | | | | | The &spi node has #address-cells = <1> and #size-cells = <0>. Drop the extra 0 in the reg property from the SPI flash node to ensure it's number of cells matches the definition in the parent node. This also makes the reg property for the SPI flash node consistent with all other VR9 boards. Fixes: eae6cac6a30b ("lantiq: add support for AVM FRITZ!Box 7362 SL") Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
* ipq806x: fix TP-Link Archer VR2600v bootloopingChristian Lamparter2022-03-161-1/+2
| | | | | | | | | | | | | | | | Timo Schroeder reported: "The TP-Link Archer VR2600v is stuck in a boot loop on written snapshot image. It's able to boot using the snapshot uimage though, but there ath10k firmware can't be found. 21.02.2 release version doesn't have either problem." The VR2600v has a 512 byte header at the beginning of the firmware that needs to be accounted for. Fixes: f6a01d7f5c3d ("ipq806x: convert TP-Link Archer VR2600v to denx,uimage") Reported-by: Timo Schroeder <der.timosch@gmail.com> References: <https://github.com/openwrt/openwrt/issues/9467> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* mpc85xx: add support for Extreme Networks WS-AP3825iMartin Kennedy2022-03-167-1/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware: - SoC: Freescale P1020 - CPU: 2x e500v2 @ 800MHz - Flash: 64MiB NOR (1x Intel JS28F512) - Memory: 256MiB (2x ProMOS DDR3 V73CAG01168RBJ-I9H 1Gb) - WiFi1: 2.4+5GHz abgn 3x3 (Atheros AR9590) - Wifi2: 5GHz an+ac 3x3 (Qualcomm Atheros QCA9890) - ETH: 2x PoE Gigabit Ethernet (2x Atheros AR8035) - Power: 12V (center-positive barrel) or 48V PoE (active or passive) - Serial: Cisco-compatible RJ45 next to 12V power socket (115200 baud) - LED Driver: TI LV164A - LEDs: (not functioning) - 2x Power (Green + Orange) - 4x ETH (ETH1 + ETH2) x (Green + Orange) - 2x WiFi (WiFi2 + WiFi1) Installation: 1. Grab the OpenWrt initramfs <openwrt-initramfs-bin>, e.g. openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin. Place it in the root directory of a DHCP+TFTP server, e.g. OpenWrt `dnsmasq` with configuration `dhcp.server.enable_tftp='1'`. 2. Connect to the serial port and boot the AP with options e.g. 115200,N,8. Stop autoboot in U-Boot by pressing Enter after 'Scanning JFFS2 FS:' begins, then waiting for the prompt to be interrupted. Credentials are identical to the one in the APs interface. By default it is admin / new2day: if these do not work, follow the OEM's reset procedure using the reset button. 3. Set the bootcmd so the AP can boot OpenWrt by executing: ```uboot setenv boot_openwrt "cp.b 0xEC000000 0x2000000 0x2000000; interrupts off; bootm start 0x2000000; bootm loados; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go;" setenv bootcmd "run boot_openwrt" saveenv ``` If you plan on going back to the vendor firmware - the bootcmd for it is stored in the boot_flash variable. 4. Load the initramfs image to RAM and boot by executing ```uboot setenv ipaddr <ipv4 client address>; setenv serverip <tftp server address>; tftpboot 0x2000000 <openwrt-initramfs-bin>; interrupts off; bootm start 0x2000000; bootm loados; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go; ``` 5. Make a backup of the "firmware" partition if you ever wish to go back to the vendor firmware. 6. Upload the OpenWrt sysupgrade image via SCP to the devices /tmp folder. 7. Flash OpenWrt using sysupgrade. ```ash sysupgrade /tmp/<openwrt-sysupgrade-bin> ``` Notes: - We must step through the `bootm` process manually to avoid fdt relocation. To explain: the stock U-boot (and stock Linux) are configured with a very large CONFIG_SYS_BOOTMAPSZ (and the device's stock Linux kernel is configured to be able to handle it). The U-boot version predates the check for the `fdt_high` variable, meaning that upon fdt relocation, the fdt can (and will) be moved to a very high address; the default appears to be 0x9ffa000. This address is so high that when the Linux kernel starts reading the fdt at the beginning of the boot process, it encounters a memory access exception and panics[5]. While it is possible to reduce the highest address the fdt will be relocated to by setting `bootm_size`, this also has the side effect of limiting the amount of RAM the kernel can use[3]. - Because it is not relocated, the flattened device tree needs to be padded in the build process to guarantee that `fdt resize` has enough space. - The primary ethernet MAC address is stored (and set) in U-boot; they are shimmed into the device tree by 'fdt boardsetup' through the 'local-mac-address' property of the respective ethernet node, so OpenWrt does not need to set this at runtime. Note that U-boot indexes the ethernet nodes by alias, which is why the device tree explicitly aliases ethernet1 to enet2. - LEDs do not function under OpenWrt. Each of 8 LEDs is connected to an output of a TI LV164A shift register, which is wired to GPIO lines and operates through bit-banged SPI. Unfortunately, I am unable to get the spi-gpio driver to recognize the `led_spi` device tree node at all, as confirmed by patching in printk messages demonstrating spi-gpio.c::spi_gpio_probe never runs. It is possible to manually articulate the shift register by exporting the GPIO lines and stepping their values through the sysfs. - Though they do not function under OpenWrt, I have left the pinout details of the LEDs and shift register in the device tree to represent real hardware. - An archive of the u-boot and Linux source for the AP3825i (which is one device of a range of devices code-named 'CHANTRY') be found here[1]. - The device has an identical case to both the Enterasys WS-AP3725i and Adtran BSAP-2030[2] (and potentially other Adtran BSAPs). Given that there is no FCC ID for the board itself (only its WLAN modules), it's likely these are generic boards, and even that the WS-AP3725i is identical, with only a change in WLAN card. I have ordered one to confirm this. - For additional information: the process of porting the board is documented in an OpenWrt forum thread[4]. [1]: magnet:?xt=urn:btih:f5306a5dfd06d42319e4554565429f84dde96bbc [2]: https://forum.openwrt.org/t/support-for-adtran-bluesocket-bsap-2030/48538 [3]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/29 [4]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168 [5]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/26 Tested-by: Martin Kennedy <hurricos@gmail.com> Signed-off-by: Martin Kennedy <hurricos@gmail.com>
* ramips: add support for Netgear WN3100RPv2Rodolphe de Saint Léger2022-03-166-155/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Netgear WN3100RPv2 http://www.netgear.com/support/product/wn3100rpv2.aspx Specifications: - SoC: MediaTek MT7620A (580MHz, ramips) - RAM: 32MB DDR - Storage: 8MB NOR SPI flash - Wireless: builtin MT7620A, 2x2:2 with u.FL connectors - Ethernet: 1x100M - Stock firmware based on OpenWRT Kamikaze Like the EX2700, the bootloader expects a secondary image signature, see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 This device seems to be same hardware as a WN3000RPv3 Flash instructions: - Use the Netgear WebUI to upgrade to OpenWRT using the factory image (see note below), - Use the sysupgrade image for upgrading versions from OpenWRT, - TFTP recovery procedure can be used to flash the factory image (preferred method). Note: - The WebUI may not reboot automatically, wait at least 5 minutes before powercycling the device Flashing using TFTP: - Set you IP address to 192.168.1.10/24 (no gateway) - Connect your machine to the Ethernet port - Power off the device and wait for 10 seconds, - Hold the reset button and power on the device (do not release reset), - Hold the reset button until the green light is flashing (Approx. 15s) - launch tftp, set mode to binary and connect to 192.168.1.1 - put the factory firmware image - All leds will switch off (like a power off), this is normal - Wait for the device to reboot in the new OpenWRT image (max 5 mins) - The first boot will take longer than usual. - After boot, the Device IP on the ethernet port is 192.168.1.1 Signed-off-by: Rodolphe de Saint Léger <rdesaintleger@gmail.com> [drop unneeded includes in dts, wrap commit message] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* Revert "ramips: add support for Netgear WN3000RPv3"Sungbo Eo2022-03-166-186/+155
| | | | | | | | | This reverts commit 7bc20cb6143e089fae6ad4b173fc42b55bdbecfe. It adds support for Netgear WN3100RPv2, but the commit title is wrong. It will be re-added with the correct title. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for Netgear WN3000RPv3Rodolphe de Saint Léger2022-03-166-155/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Netgear WN3100RPv2 http://www.netgear.com/support/product/wn3100rpv2.aspx Specifications: - SoC: MediaTek MT7620A (580MHz, ramips) - RAM: 32MB DDR - Storage: 8MB NOR SPI flash - Wireless: builtin MT7620A, 2x2:2 with u.FL connectors - Ethernet: 1x100M - Stock firmware based on OpenWRT Kamikaze Like the EX2700, the bootloader expects a secondary image signature, see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 This device seems to be same hardware as a WN3000RPv3 Flash instructions: - Use the Netgear WebUI to upgrade to OpenWRT using the factory image (see note below), - Use the sysupgrade image for upgrading versions from OpenWRT, - TFTP recovery procedure can be used to flash the factory image (preferred method). Note: - The WebUI may not reboot automatically, wait at least 5 minutes before powercycling the device Flashing using TFTP: - Set you IP address to 192.168.1.10/24 (no gateway) - Connect your machine to the Ethernet port - Power off the device and wait for 10 seconds, - Hold the reset button and power on the device (do not release reset), - Hold the reset button until the green light is flashing (Approx. 15s) - launch tftp, set mode to binary and connect to 192.168.1.1 - put the factory firmware image - All leds will switch off (like a power off), this is normal - Wait for the device to reboot in the new OpenWRT image (max 5 mins) - The first boot will take longer than usual. - After boot, the Device IP on the ethernet port is 192.168.1.1 Signed-off-by: Rodolphe de Saint Léger <rdesaintleger@gmail.com> [drop unneeded includes in dts, wrap commit message] Signed-off-by: Sungbo Eo <mans0n@gorani.run>