1. 21 Mar, 2022 9 commits
    • Marek Behún's avatar
      kernel: Fix patch header · f811c33b
      Marek Behún authored
      Remove "a" character from the first line of patch
      Otherwise `git am` fails to apply this patch which is annoying when
      trying to do some development / rebasing.
      Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
    • Robert Marko's avatar
      uboot-mvebu: backport patch to fix eMMC · a7038308
      Robert Marko authored
      v2022.01 has a regression that broke eMMC usage on most if not all Armada
      SoC-s, thus breaking boards like uDPU which use eMMC for storage.
      Fix it by backporting a recent upstream patch.
      Fixes: 782d4c83
       ("uboot-mvebu: update to version 2022.01")
      Signed-off-by: default avatarRobert Marko <robert.marko@sartura.hr>
    • Robert Marko's avatar
      mvebu: udpu: include LM75 kmod by default · a8b2d359
      Robert Marko authored
      uDPU has 2 LM75 compatible temperature sensors, so include the driver for
      them by default in order to utilize them.
      Signed-off-by: default avatarRobert Marko <robert.marko@sartura.hr>
    • Robert Marko's avatar
      mvebu: udpu: fix initramfs booting · 80f21e53
      Robert Marko authored
      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: default avatarRobert Marko <robert.marko@sartura.hr>
    • Jan Hoffmann's avatar
      ltq-vdsl-mei: add locking to interrupt handler · 17004245
      Jan Hoffmann authored
      Some users noticed repeated resyncs at random intervals, which go away
      when the MEI driver is configured to use polling instead of interrupts.
      Debugging shows that this seems to be caused by concurrent calls to
      MEI_ReadMailbox (in the interrupt handler) and MEI_WriteMailbox. This
      appears to be mostly triggered when there is an interrupt for vectoring
      error reports.
      In polling mode, calls to MEI_ReadMailbox are protected by the same
      semaphore as is used in MEI_WriteMailbox. When interrupts are used,
      MEI_WriteMailbox appears to rely on MEI_DisableDeviceInt and
      MEI_EnableDeviceInt to provide mutual exclusion with the interrupt
      handler. These functions mask/unmask interrupts, and there is an
      additional check of the mask in the interrupt handler itself. However,
      this is not sufficient on systems with SMP, as the interrupt handler
      may be running in parallel, and could already be past the interrupt
      mask check at this point.
      This adds a lock to the interrupt handler, and also acquires this lock
      in MEI_DisableDeviceInt. This should make sure that after a call to
      MEI_DisableDeviceInt the interrupt is masked, and the interrupt handler
      is either not running, has alread finished its work, or is still before
      the interrupt mask check, and is thus going to detect the change.
      Tested-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarJan Hoffmann <jan@3e8.eu>
    • Jan Hoffmann's avatar
      ltq-vdsl-app: set MAC address for vectoring error reports · b35d33c8
      Jan Hoffmann authored
      This tells the modem about the WAN MAC address, which is used as source
      address for vectoring error reports that are generated by the firmware.
      It needs to be set early, as the MEI driver only actually writes the
      value to the modem when is in reset state (i.e. the firmware has been
      loaded, but connection has not started yet).
      Tested-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarJan Hoffmann <jan@3e8.eu>
    • Jan Hoffmann's avatar
      ltq-vdsl-mei: enable vectoring error sample callback · 93f0e1f9
      Jan Hoffmann authored
      This re-enables the vectoring error sample callback and adds a
      dependency to the corresponding driver.
      Tested-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarJan Hoffmann <jan@3e8.eu>
    • Jan Hoffmann's avatar
      ltq-vectoring: add driver · f872b966
      Jan Hoffmann authored
      In order to calculate the required pre-distortion for downstream
      vectoring, the vectoring control entity (VCE) at the carrier office
      needs error samples from the modem. On Lantiq VR9 modems, error reports
      are generated by the firmware, but need to be multiplexed into the data
      stream by the driver on the main processor when L2 encapsulation is
      selected by the VCE.
      This driver provides the necessary callback function, which is called by
      the MEI driver after receiving an error report from the firmware.
      Originally, it is part of the Lantiq PPA driver, but after a few changes
      it also works with the PTM driver used in OpenWrt. The direct call to
      ndo_start_xmit needs to be replaced, as the PTM driver relies on locks
      from the kernel. Instead dev_queue_xmit is used, which is called from a
      work queue, as it is not safe to call from an interrupt handler.
      Additional changes include fixes to support recent kernel versions and
      a change of the used interface from ptm0 to dsl0.
      Tested-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarJan Hoffmann <jan@3e8.eu>
    • Daniel Golle's avatar
      kernel: delete Linux 5.4 config and patches · 3a145804
      Daniel Golle authored
      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: default avatarDaniel Golle <daniel@makrotopia.org>
  2. 20 Mar, 2022 2 commits
    • Richard Huynh's avatar
      mediatek: Add support for Xiaomi Redmi Router AX6S · 9f9477b2
      Richard Huynh authored
      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
      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.
      1. Flash stock Xiaomi "closed beta" image labelled
      (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
      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 +
      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: default avatarRichard Huynh <voxlympha@gmail.com>
    • Richard Huynh's avatar
      mediatek: Add GD5F1GQ5xExxG to mtk-snand · 4177de10
      Richard Huynh authored
      Some units of the Xiaomi Redmi Router AX6S/Xiaomi Router AX3200 contain this part.
      Signed-off-by: default avatarRichard Huynh <voxlympha@gmail.com>
  3. 19 Mar, 2022 21 commits
    • Nicholas Smith's avatar
      ipq40xx: add support for Telco X1 Pro · 7ea2f3d6
      Nicholas Smith authored
      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: default avatarNicholas Smith <nicholas@nbembedded.com>
    • Igor Nazarov's avatar
      ramips: add support for D-Link DIR-878 R1 · 42626aef
      Igor Nazarov authored
      - 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
      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 other than (e.g.
      and go to
      Flash with the factory image.
      Signed-off-by: default avatarIgor Nazarov <tigron.dev@gmail.com>
    • John Audia's avatar
      kernel: bump 5.10 to 5.10.107 · 1eb5d50f
      John Audia authored
      All patches automatically rebased.
      Build system: x86_64
      Build-tested: bcm2711/RPi4B, mt7622/RT3200
      Run-tested: bcm2711/RPi4B, mt7622/RT3200
      Signed-off-by: default avatarJohn Audia <graysky@archlinux.us>
    • Huangbin Zhan's avatar
    • Mikhail Zhilkin's avatar
      ramips: add support for Beeline SmartBox Flash · f8b02130
      Mikhail Zhilkin authored
      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:
      OEM: Arcadyan WE42022
      1. Place *factory.trx on any web server ( 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
         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
      Back to Stock
      1. Run in the OpenWrt shell:
         fw_setenv bootpartition 1
      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 |                |
      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
      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: default avatarMikhail Zhilkin <csharper2005@gmail.com>
    • Florian Eckert's avatar
      base-files: add wrapper for procd service list command · 09c41ea6
      Florian Eckert authored
      A service managed by procd does have a json object with usefull information.
      This information could by dumped with the following command.
      ubus call service list "{ 'verbose':true, 'name': '<service-name>)'". }"
      This line is long and complicated to enter. This commit adds a wrapper
      call to the procd service section tool to simplify the input and get the
      output faster.
      We could now enter the command /etc/initd/<service> info to get the info
      Signed-off-by: default avatarFlorian Eckert <fe@dev.tdt.de>
    • Florian Eckert's avatar
      procd: move service command to procd · b9017384
      Florian Eckert authored
      The service command belongs to the procd and does not belong in the
      shinit. In the course of the move, the script was also checked with
      shellcheck and cleaned up.
      Signed-off-by: default avatarFlorian Eckert <fe@dev.tdt.de>
    • John Audia's avatar
      kernel: bump 5.10 to 5.10.106 · b04d38a2
      John Audia authored
      All patches automatically rebased.
      Build system: x86_64
      Build-tested: bcm2711/RPi4B, mt7622/RT3200
      Run-tested: bcm2711/RPi4B, mt7622/RT3200
      Signed-off-by: default avatarJohn Audia <graysky@archlinux.us>
    • John Audia's avatar
      kernel: bump 5.10 to 5.10.105 · 048f0b17
      John Audia authored
      Updated default config with new sym (CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y).
      Manually rebased:
      All other patches automatically rebased.
      Build system: x86_64
      Build-tested: bcm2711/RPi4B, mt7622/RT3200
      Run-tested: bcm2711/RPi4B, mt7622/RT3200
      Signed-off-by: default avatarJohn Audia <graysky@archlinux.us>
    • Etienne Champetier's avatar
      iptables: bump PKG_RELEASE · 30c15d06
      Etienne Champetier authored
      Following {arp,eb}tables-nft addition, bump PKG_RELEASE
      Signed-off-by: default avatarEtienne Champetier <champetier.etienne@gmail.com>
    • Etienne Champetier's avatar
      iptables: add {arp,eb}tables-nft · 66bb6dde
      Etienne Champetier authored
      Add a patch to add some missing init_extensions{a,b}() calls
      Package lib{arp,eb}t_*.so
      Signed-off-by: default avatarEtienne Champetier <champetier.etienne@gmail.com>
    • Etienne Champetier's avatar
      iptables: add xtables-nft package · c913be1d
      Etienne Champetier authored
      This allows to install ip6tables-nft without iptables-nft
      This prepare the addition of {arp,eb}tables-nft
      Signed-off-by: default avatarEtienne Champetier <champetier.etienne@gmail.com>
    • Etienne Champetier's avatar
      iptables: add xtables-legacy package · afb6824a
      Etienne Champetier authored
      This allows to install ip6tables-legacy without iptables-legacy
      Signed-off-by: default avatarEtienne Champetier <champetier.etienne@gmail.com>
    • Etienne Champetier's avatar
      ebtables: rename to ebtables-legacy · 905b4992
      Etienne Champetier authored
      This prepare the introduction of ebtables-nft.
      Add PROVIDES so dependencies are not broken,
      Signed-off-by: default avatarEtienne Champetier <champetier.etienne@gmail.com>
    • Etienne Champetier's avatar
      arptables: rename package to arptables-legacy · 2f5088ef
      Etienne Champetier authored
      This prepare the introduction of arptables-nft.
      Add PROVIDES so dependencies are not broken,
      Signed-off-by: default avatarEtienne Champetier <champetier.etienne@gmail.com>
    • Rosen Penev's avatar
      quilt.mk: fix typo in the Host section · 9586a270
      Rosen Penev authored
      HOST_PATCH_DIR is used for host patches, not PATCH_DIR.
      Fixes refreshing patches with a custom HOST_PATCH_DIR.
      Signed-off-by: default avatarRosen Penev <rosenp@gmail.com>
    • Josef Schlehofer's avatar
      cypress-firmware: update it to version 5.4.18-2021_0812 · 7ca7e0b2
      Josef Schlehofer authored
      - Binary files were renamed to cyfmac from brcmfmac, but the files needs
        to be on the router with the previous naming
      [    6.656165] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
      [    6.665182] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.bin failed with error -2
      [    6.674928] brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: brcm/brcmfmac43455-sdio.bin
      - Cypress were acquired by Infineon Technologies
      Thus change the project URL and switch to download files from their
      GitHub repository. This is much better than the previous solution, which
      requires finding new threads on their community forum about new driver
      updates, and it will be necessary to change the URL each time.
      Unfortunately, it seems that there is not published changelog, but
      according to this forum thread [1], be careful by opening the link from
      solution since it contains ending bracket ), it brings fixes for various
      security vulnerabilities, which were fixed in 7_45_234.
      - FragAttacks
      - Kr00k
      Also add LICENSE file
      Run tested on Seeedstudio router powered by Raspberry Pi 4 CM with
      package cypress-firmware-43455-sdio.
      root@OpenWrt:~# dmesg | grep 'Firmware: BCM4345/6'
      [    6.895050] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 23 2020 02:20:01 version 7.45.206 (r725000 CY) FWID 01-febaba43
      root@OpenWrt:~# dmesg | grep 'Firmware: BCM4345/6'
      [    6.829805] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) FWID 01-996384e2
      [1] https://community.infineon.com/t5/Wi-Fi-Bluetooth-for-Linux/Outdated-brcmfmac-firmware-for-Raspberry-Pi-4-in-OpenWrt-21-02-1/m-p/331593#M2269
      Signed-off-by: default avatarJosef Schlehofer <pepe.schlehofer@gmail.com>
    • Josef Schlehofer's avatar
      bcm27xx: bcm2711: add kmod-usb-net-lan78xx · 31ccc27f
      Josef Schlehofer authored
      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: default avatarJosef Schlehofer <pepe.schlehofer@gmail.com>
    • Josef Schlehofer's avatar
      iwinfo: update to latest Git head · 013b0435
      Josef Schlehofer authored
      90bfbb9 devices: Add Cypress CYW43455
      234075b devices: fix AMD RZ608 format
      0e2a318 devices: add AMD RZ608 device-id
      Signed-off-by: default avatarJosef Schlehofer <pepe.schlehofer@gmail.com>
    • Felix Fietkau's avatar
      bpftools: fix library path on 64 bit systems · 54aab4e7
      Felix Fietkau authored
      drop the use of LIB_SUFFIX
      Fixes: 00cbf6f6
       ("bpftools: update to standalone bpftools + libbpf, use the latest version")
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
    • Felix Fietkau's avatar
  4. 18 Mar, 2022 2 commits
    • Felix Fietkau's avatar
      mac80211: backport MBSSID support · 9c8cd146
      Felix Fietkau authored
      Required for an upcoming mt76 update
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
    • Stijn Tintel's avatar
      kernel: enable SERIAL_8250_16550A_VARIANTS · 4ecf8346
      Stijn Tintel authored
      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: default avatarMatt Fawcett <mattytap@icloud.com>
      Signed-off-by: default avatarStijn Tintel <stijn@linux-ipv6.be>
      Reviewed-by: default avatarRui Salvaterra <rsalvaterra@gmail.com>
  5. 17 Mar, 2022 2 commits
  6. 16 Mar, 2022 4 commits
    • Jan Hoffmann's avatar
      lantiq: fritz7362sl: add partition subnode for SPI flash · a6222738
      Jan Hoffmann authored
      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: default avatarJan Hoffmann <jan@3e8.eu>
    • Martin Blumenstingl's avatar
      lantiq: fritz7362sl: fix SPI flash node reg property · dadedd55
      Martin Blumenstingl authored
      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: eae6cac6
       ("lantiq: add support for AVM FRITZ!Box 7362 SL")
      Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
    • Christian Lamparter's avatar
      ipq806x: fix TP-Link Archer VR2600v bootlooping · 621b0589
      Christian Lamparter authored
      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: f6a01d7f
       ("ipq806x: convert TP-Link Archer VR2600v to denx,uimage")
      Reported-by: default avatarTimo Schroeder <der.timosch@gmail.com>
      References: <https://github.com/openwrt/openwrt/issues/9467
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
    • Martin Kennedy's avatar
      mpc85xx: add support for Extreme Networks WS-AP3825i · 7e614820
      Martin Kennedy authored
      - 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)
      1. Grab the OpenWrt initramfs <openwrt-initramfs-bin>, e.g.
         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:
      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"
         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
      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
      7. Flash OpenWrt using sysupgrade.
      sysupgrade /tmp/<openwrt-sysupgrade-bin>
      - 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
      - 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
      - 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: default avatarMartin Kennedy <hurricos@gmail.com>
      Signed-off-by: default avatarMartin Kennedy <hurricos@gmail.com>