aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bcm53xx: fix shebang in packet_steering.shRafał Miłecki2023-02-151-1/+1
| | | | | Fixes: 6e555ac3ad26 ("bcm53xx: refactor packet steering init") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* iptables: iptables-mod-conntrack-extra: don't select kmod-ipt-rawRafał Miłecki2023-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Package kmod-ipt-raw enables CONFIG_IP_NF_RAW and packages iptable_raw.ko According to kernel's net/netfilter/Kconfig there are only 3 kernel symbols that depend on the IP_NF_RAW: 1. NETFILTER_XT_TARGET_CT (xt_CT.ko) 2. NETFILTER_XT_TARGET_NOTRACK (unused symbol?!) 3. NETFILTER_XT_TARGET_TRACE (xt_TRACE.ko) Now: iptables-mod-conntrack-extra selects kmod-ipt-conntrack-extra which provides: xt_helper.ko nf_conncount.ko xt_connlimit.ko xt_connmark.ko xt_recent.ko and xt_connbytes.ko (none of them seems to require iptable_raw.ko). It seems there is no explicit reason for iptables-mod-conntrack-extra to require kmod-ipt-raw (iptables_raw.ko). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: refactor packet steering initRafał Miłecki2023-02-152-44/+25
| | | | | | | | Replace a standalone init.d script with a platform implementation as supported by netifd. This avoids a race between netifd and target specific setups. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* netifd: refactor packet steering initRafał Miłecki2023-02-153-3/+24
| | | | | | | | 1. Move setup code to independent script file 2. Add init.d script to allow automatic updates 3. Support platform specific /usr/libexec/platform/packet-steering.sh Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: import accepted MediaTek Ethernet patchesDaniel Golle2023-02-1519-160/+396
| | | | | | | | Import some accepted and pending upstream patches for mtk_eth_soc, replacing some semantically equivalent local patches and fixing issues when operating the PCS in 1G SGMII mode. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* mediatek: mtk_thermal: replace with upstream patchDaniel Golle2023-02-152-41/+114
| | | | | | | Replace local patch adding thermal support for MT7986 with version accepted upstream. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* treewide: replace /sys/devices/virtual/ubi by /sys/class/ubiDaniel Golle2023-02-156-10/+9
| | | | | | | | | | Starting from Linux Kernel version 6.3 UBI devices will no longer be considered virtual, but rather have an MTD device parent. Hence they will no longer be listed under /sys/devices/virtual/ubi which is used in multiple places in OpenWrt. Prepare for future kernels by using /sys/class/ubi instead of /sys/devuces/virtual/ubi. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* fstools: update to git HEADDaniel Golle2023-02-151-3/+3
| | | | | | 12155d3 libfstools: use class interface to iterate over ubi devices Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ucode: update to the latest versionFelix Fietkau2023-02-141-4/+4
| | | | | | | | | | | | | | 08c709c58187 rtnl: add support for registering an uloop based listener 599a7fb59380 Merge pull request #140 from nbd168/rtnl c4125c516e0a nl80211: fix NL80211_ATTR_SURVEY_INFO c43bb9d8fe8d Merge pull request #141 from dhewg/master c1342d934b2d nl80211: add missing ucv_get() calls 9022b270683a rtnl: add missing ucv_get() calls 837cffec5a5c Merge pull request #142 from nbd168/ref-fixes 65b1f181e642 rtnl: add missing uc_vm_registry_set call ab2f3f70257d Merge pull request #143 from nbd168/rtnl-fix Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipq807x: add support for Buffalo WXR-5950AX12INAGAKI Hiroshi2023-02-128-0/+456
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WXR-5950AX12 is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on IPQ8074A. Specification: - SoC : Qualcomm IPQ8074A - RAM : DDR3 1024 MiB (2x Nanya NT5CC256M16ER-EK) - Flash : RAW NAND 256 MiB (Winbond W29N02GZBIBA) - WLAN : 2.4/5 GHz (IPQ8074A) - Ethernet : 5 ports - WAN : 100/1000/2500/10000 Mbps x1 (AQR113C) - LAN : 100/1000/2500/10000 Mbps x1 (AQR113C), 10/100/1000 Mbps x3 (QCA8075) - LED/Keys : 8x/5x - UART : pin header on PCB (J7) - assignment: 3.3V, GND, TX, RX from disc marking - settings : 115200n8 - Power : 12 VDC, 4 A Flash instruction using initramfs image: 1. Prepare TFTP server with IP address 192.168.11.10 2. Rename OpenWrt initramfs image to "WXR-5950AX12-initramfs.uImage and place it to TFTP directory 3. Hold AOSS (WPS) button and power on WXR-5950AX12 4. WXR-5950AX12 downloads initramfs image from TFTP server and boots with it automatically 5. Upload sysupgrade image to WXR-5950AX12 and perform sysupgrade 6. Wait ~120 seconds to complete flashing Partition layout: 0x000000000000-0x000000100000 : "0:sbl1" 0x000000100000-0x000000200000 : "0:mibib" 0x000000200000-0x000000280000 : "0:bootconfig" 0x000000280000-0x000000300000 : "0:bootconfig1" 0x000000300000-0x000000600000 : "0:qsee" 0x000000600000-0x000000900000 : "0:qsee_1" 0x000000900000-0x000000980000 : "0:devcfg" 0x000000980000-0x000000a00000 : "0:devcfg_1" 0x000000a00000-0x000000a80000 : "0:apdp" 0x000000a80000-0x000000b00000 : "0:apdp_1" 0x000000b00000-0x000000b80000 : "0:rpm" 0x000000b80000-0x000000c00000 : "0:rpm_1" 0x000000c00000-0x000000c80000 : "0:cdt" 0x000000c80000-0x000000d00000 : "0:cdt_1" 0x000000d00000-0x000000d80000 : "0:appsblenv" 0x000000d80000-0x000000e80000 : "0:appsbl" 0x000000e80000-0x000000f80000 : "0:appsbl_1" 0x000000f80000-0x000001000000 : "0:art" 0x000001000000-0x000001080000 : "0:art_1" 0x000001080000-0x000001100000 : "0:orgdata" 0x000001100000-0x000001180000 : "0:orgdata_1" 0x000001180000-0x000005180000 : "rootfs" 0x000005180000-0x000009180000 : "rootfs_recover" 0x000009180000-0x000010000000 : "user_property" Notes: - WXR-5950AX12 has 2x OS images on NAND flash. The 1st image is for normal operation and the 2nd one is for recoverying or firmware upgrading on stock. - Stock U-Boot checks MD5 hashes in "fw_hash" volume in each "root*" partition when booting. This is just a comparation of hash strings. Behaviors: - both "fw_hash" volumes exist, hashes are rootfs == rootfs_recover ---> boot from rootfs - both "fw_hash" volumes exist, hashes are rootfs != rootfs_recover ---> boot from rootfs_recover Note: this behavior is used for firmware upgrading on stock - "fw_hash" volume in rootfs is missing ---> boot from rootfs_recover - "fw_hash" volume in rootfs_recover is missing ---> boot from rootfs - "fw_hash" volumes in both root* partition are missing ---> boot from rootfs_recover Reverting to stock firmware: 1. Decrypt official image by buffalo-enc and remove header example of decryption: $ buffalo-enc -i wxr_5950ax12_jp_305 -o wxr_5950ax12_jp_305.dec \ -d -k olaffuB -O 0xc8 example of removing header (v3.05): - before $ hexdump -n 64 -v -C wxr_5950ax12_jp_305.dec 00000000 57 58 52 2d 35 39 35 30 41 58 31 32 5f 33 2e 30 |WXR-5950AX12_3.0| 00000010 35 5f 31 2e 30 31 5f 4a 50 5f 6a 70 5f 71 63 61 |5_1.01_JP_jp_qca| 00000020 0a 66 69 6c 65 6c 65 6e 3d 34 35 33 35 30 39 31 |.filelen=4535091| 00000030 32 0a 55 42 49 23 01 00 00 00 00 00 00 00 00 00 |2.UBI#..........| 00000040 - after $ hexdump -n 64 -v -C wxr_5950ax12_jp_305.ubi 00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 00 |UBI#............| 00000010 00 00 08 00 00 00 10 00 78 cf c4 91 00 00 00 00 |........x.......| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 3d 2a 64 fd |............=*d.| 00000040 2. Boot WXR-5950AX12 with OpenWrt initramfs image 3. Upload modified stock image to WXR-5950AX12 4. Find partitions "rootfs" and "rootfs_recover" example: root@OpenWrt:/# cat /proc/mtd dev: size erasesize name ... mtd22: 04000000 00020000 "rootfs" mtd23: 04000000 00020000 "rootfs_recover" ... in this case, "rootfs" is mtd22 and "rootfs_recover" is mtd23 5. Format "rootfs"/"rootfs_recover" partition with the uploaded image example: ubiformat /dev/mtd22 -f /tmp/wxr_5950ax12_jp_305.ubi ubiformat /dev/mtd23 -f /tmp/wxr_5950ax12_jp_305.ubi 6. Remove "rootfs"/"rootfs_data" volume from user_property partition example: . /lib/upgrade/nand.sh UBI=$(nand_attach_ubi user_property) ubirmvol /dev/$UBI -N rootfs ubirmvol /dev/$UBI -N rootfs_data 7. Reboot MAC addresses: LAN : 50:C4:DD:xx:xx:28 (0:APPSBLENV, ethaddr (text)) WAN : 50:C4:DD:xx:xx:28 (0:APPSBLENV, ethaddr (text)) 2.4 GHz: 50:C4:DD:xx:xx:30 (0:APPSBLENV, wlan0addr (text)) 5 GHz : 50:C4:DD:xx:xx:38 (0:APPSBLENV, wlan1addr (text)) Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ipq807x: merge duplicate network configurations in 02_networkINAGAKI Hiroshi2023-02-121-4/+2
| | | | | | | | Merge network configurations in 02_network of Dynalink DL-WRX36 and Xiaomi AX9000. Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ipq807x: enable regulator-fixed driverINAGAKI Hiroshi2023-02-121-0/+1
| | | | | | | | Enable regulator-fixed to define the regulator of USB vbus on Buffalo WXR-5950AX12. Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: add support for APRESIA ApresiaLightGS120GT-SSINAGAKI Hiroshi2023-02-133-0/+556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APRESIA ApresiaLightGS120GT-SS (APLGS120GTSS) is a 16 + 4 ports gigabit switch, based on RTL8382M. Specifications: - SoC : Realtek RTL8382M - RAM : DDR3 256 MiB (Nanya NT5CC256M8JQ-EK) - Flash : SPI-NOR 32 MiB (Macronix MX25L25635FMI-10G) - Ethernet : 10/100/1000 Mbps x16 + 4 - port 1-8 : RTL8218B - port 9-16 : RTL8382M, TP (SoC, RTL8218B) - port 17-20 : RTL8214FC, TP/SFP (Combo) - LEDs/Keys : 3x/1x - UART : through-hole on PCB - J6: 3.3V, TX, RX, GND from tri-angle marking side - 115200n8 - Power : 100-120/200-240 VAC, 50/60 Hz Max. 16 W, Avg 14 W (100 VAC) - Plug : IEC 60320-C13 Flash instruction using factory image: 1. Boot ApresiaLightGS120GT-SS normally 2. Login to WebUI and open firmware page ("ファームウェア") 3. If the device is booted from image1, set active image for next booting ("起動イメージ選択") to image2("イメージ2"), press apply ("適用") button and reboot the device to make booting from image2 4. On the WebUI, set active image to image1 5. Select the OpenWrt factory image and press update button ("更新") 6. Open reboot page ("再起動") and press reboot button ("再起動実行") Notes: - "ApresiaLightGS120GT-SS" is a model name and "APLGS120GTSS" is a model number - this device has 3x GPIO-controlled LEDs on PCB, but 1x LED ("green:unused") has no hole on the case Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: add common definition of cameo based firmwareINAGAKI Hiroshi2023-02-132-10/+16
| | | | | | | | | | | | The cameo-related recipes can also be used for APRESIA ApresiaLightGS series devices. So create common definition for the devices manufactured by Cameo. And also, the model name of ApresiaLightGS120GT-SS is too long for cameo header (max: 20 bytes), so use additional variable "CAMEO_BOARD_MODEL" in Build/cameo-headers instead of DEVICE_MODEL to use the custom name. (default of CAMEO_BOARD_MODEL: DEVICE_MODEL) Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: rename cameo specific names in "Build/*" definitionsINAGAKI Hiroshi2023-02-132-10/+10
| | | | | | | | This patch renames some Cameo specific definitions for image generation. The same format is also used on APRESIA ApresiaLightGS series devices, not D-Link specific. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* uboot-envtools: add support for APRESIA ApresiaLightGS120GT-SSINAGAKI Hiroshi2023-02-131-0/+8
| | | | | | | This patch adds support for APRESIA ApresiaLightGS120GT-SS to uboot-envtools. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* realtek: fix memory leak in netevent handlerJan Hoffmann2023-02-132-16/+18
| | | | | | | | | The net_event_work struct is allocated, but only freed in a single case. Move the allocation to the branch where it is actually needed, and free it after the work has been done. Fixes: 03e1d93e0779 ("realtek: add driver support for routing offload") Signed-off-by: Jan Hoffmann <jan@3e8.eu>
* kernel: add missing optimization for page poolFelix Fietkau2023-02-132-0/+112
| | | | | | Improves performance in combination with threaded NAPI Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mac80211: add fixes for receiving A-MSDU packets on mesh interfacesFelix Fietkau2023-02-138-34/+1141
| | | | | | | | The standard defines the A-MSDU header length field differently for mesh compared to other modes. Deal with this accordingly and work around broken implementations (e.g. ath10k, ath11k). Signed-off-by: Felix Fietkau <nbd@nbd.name>
* e2fsprogs: update to 1.47.0Nick Hainke2023-02-131-2/+2
| | | | | | | Release notes: https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.0 Signed-off-by: Nick Hainke <vincent@systemli.org>
* toolchain: glibc: Update to glibc 2.37Linhui Liu2023-02-131-3/+3
| | | | | | | | This updates to glibc to version 2.37. Signed-off-by: Linhui Liu <liulinhui36@gmail.com> [Update to current git commit] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ramips: add support for ASUS RT-AX54Karl Chan2023-02-125-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - Device: ASUS RT-AX54 (AX1800S/HP,AX54HP) - SoC: MT7621AT - Flash: 128MB - RAM: 256MB - Switch: 1 WAN, 4 LAN (10/100/1000 Mbps) - WiFi: MT7905 2x2 2.4G + MT7975 2x2 5G - LEDs: 1x POWER (blue, configurable) 1x LAN (blue, configurable) 1x WAN (blue, configurable) 1x 2.4G (blue, not configurable) 1x 5G (blue, not configurable) Flash by U-Boot TFTP method: - Configure your PC with IP 192.168.1.2 - Set up TFTP server and put the factory.bin image on your PC - Connect serial port(rate:115200) and turn on AP, then interrupt "U-Boot Boot Menu" by hitting any key Select "2. Upgrade firmware" Press enter when show "Run firmware after upgrading? (Y/n):" Select 0 for TFTP method Input U-Boot's IP address: 192.168.1.1 Input TFTP server's IP address: 192.168.1.2 Input IP netmask: 255.255.255.0 Input file name: openwrt-ramips-mt7621-asus_rt-ax1800hp-squashfs-factory.bin - Restart AP aftre see the log "Firmware upgrade completed!" Signed-off-by: Karl Chan <exkc@exkc.moe>
* ath79: bump SPI frequency of Senao qca955x routersMichael Pratt2023-02-121-1/+1
| | | | | | | | All boards using this DTSI are expected to have the same 16 MB MX25L12845EMI-10G flash chip, or a larger one which can also use 40 MHz frequency. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add eth0 mac and initvals for Engenius EPG5000Michael Pratt2023-02-122-1/+9
| | | | | | | | | | | | | | | | | | Although VLANs are used, the "eth0" device by itself does not have a valid MAC, so fix that with preinit script. More initvals added by editing the driver to print switch registers, after the bootloader sets them but before openwrt changes them. The register bits needed for the QCA8337 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: convert Engenius EPG5000 radios to nvmem-cellsMichael Pratt2023-02-124-18/+23
| | | | | | | | | | | Use nvmem kernel subsystem to pull radio calibration data with the devicetree instead of userspace scripts. Existing blocks for caldata_extract are reordered alphabetically. MAC address is set using the hotplug script. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add support for Senao Engenius ESR1200Michael Pratt2023-02-125-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-ESR900 Engenius ESR1200 is an indoor wireless router with a gigabit ethernet switch, dual-band wireless, internal antenna plates, and a USB 2.0 port **Specification:** - QCA9557 SOC 2.4 GHz, 2x2 - QCA9882 WLAN PCIe mini card, 5 GHz, 2x2 - QCA8337N SW 4 ports LAN, 1 port WAN - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM - UART at J1 populated, RX grounded - 6 internal antenna plates (omni-directional) - 5 LEDs, 1 button (power, 2G, 5G, WAN, WPS) (reset) **MAC addresses:** Base MAC address labeled as "MAC ADDRESS" MAC "wanaddr" is not similar to "ethaddr" eth0 *:c8 MAC u-boot-env ethaddr phy0 *:c8 MAC u-boot-env ethaddr phy1 *:c9 --- u-boot-env ethaddr +1 WAN *:66:44 u-boot-env wanaddr **Serial Access:** RX on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin **Installation:** Method 1: Firmware upgrade page OEM webpage at 192.168.0.1 username and password "admin" Navigate to Settings (gear icon) --> Tools --> Firmware select the factory.bin image confirm and wait 3 minutes Method 2: TFTP recovery Follow TFTP instructions using initramfs.bin use sysupgrade.bin to flash using openwrt web interface **Return to OEM:** MTD partitions should be backed up before flashing using TFTP to boot openwrt without overwriting flash Alternatively, it is possible to edit OEM firmware images to flash MTD partitions in openwrt to restore OEM firmware by removing the OEM header and writing the rest to "firmware" **TFTP recovery:** Requires serial console, reset button does nothing at boot rename initramfs.bin to 'uImageESR1200' make available on TFTP server at 192.168.99.8 power board, interrupt boot by pressing '4' rapidly execute tftpboot and bootm **Note on ETH switch registers** Registers must be written to the ethernet switch in order to set up the switch's MAC interface. U-boot can write the registers on it's own which is needed, for example, in a TFTP transfer. The register bits from OEM for the QCA8337 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written. for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add support for Senao Engenius ESR1750Michael Pratt2023-02-125-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-ESR1750 Engenius ESR1750 is an indoor wireless router with a gigabit ethernet switch, dual-band wireless, internal antenna plates, and a USB 2.0 port **Specification:** - QCA9558 SOC 2.4 GHz, 3x3 - QCA9880 WLAN PCIe mini card, 5 GHz, 3x3 - QCA8337N SW 4 ports LAN, 1 port WAN - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM - UART at J1 populated, RX grounded - 6 internal antenna plates (omni-directional) - 5 LEDs, 1 button (power, 2G, 5G, WAN, WPS) (reset) **MAC addresses:** Base MAC address labeled as "MAC ADDRESS" MAC "wanaddr" is similar to "ethaddr" eth0 *:58 MAC u-boot-env ethaddr phy0 *:58 MAC u-boot-env ethaddr phy1 *:59 --- u-boot-env ethaddr +1 WAN *:10:58 u-boot-env wanaddr **Serial Access:** RX on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin **Installation:** Method 1: Firmware upgrade page NOTE: ESR1750 might require the factory.bin for ESR1200 instead, OEM provides 1 image for both. OEM webpage at 192.168.0.1 username and password "admin" Navigate to Settings (gear icon) --> Tools --> Firmware select the factory.bin image confirm and wait 3 minutes Method 2: TFTP recovery Follow TFTP instructions using initramfs.bin use sysupgrade.bin to flash using openwrt web interface **Return to OEM:** MTD partitions should be backed up before flashing using TFTP to boot openwrt without overwriting flash Alternatively, it is possible to edit OEM firmware images to flash MTD partitions in openwrt to restore OEM firmware by removing the OEM header and writing the rest to "firmware" **TFTP recovery:** Requires serial console, reset button does nothing at boot rename initramfs.bin to 'uImageESR1200' make available on TFTP server at 192.168.99.8 power board, interrupt boot by pressing '4' rapidly execute tftpboot and bootm **Note on ETH switch registers** Registers must be written to the ethernet switch in order to set up the switch's MAC interface. U-boot can write the registers on it's own which is needed, for example, in a TFTP transfer. The register bits from OEM for the QCA8337 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written. for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add support for Senao Engenius ESR900Michael Pratt2023-02-125-1/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-ESR900 Engenius ESR900 is an indoor wireless router with a gigabit ethernet switch, dual-band wireless, internal antenna plates, and a USB 2.0 port **Specification:** - QCA9558 SOC 2.4 GHz, 3x3 - AR9580 WLAN PCIe on board, 5 GHz, 3x3 - AR8327N SW 4 ports LAN, 1 port WAN - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM - UART at J1 populated, RX grounded - 6 internal antenna plates (omni-directional) - 5 LEDs, 1 button (power, 2G, 5G, WAN, WPS) (reset) **MAC addresses:** Base MAC address labeled as "MAC ADDRESS" MAC "wanaddr" is not similar to "ethaddr" eth0 *:06 MAC u-boot-env ethaddr phy0 *:06 MAC u-boot-env ethaddr phy1 *:07 --- u-boot-env ethaddr +1 WAN *:6E:81 u-boot-env wanaddr **Serial Access:** RX on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin **Installation:** Method 1: Firmware upgrade page OEM webpage at 192.168.0.1 username and password "admin" Navigate to Settings (gear icon) --> Tools --> Firmware select the factory.bin image confirm and wait 3 minutes Method 2: TFTP recovery Follow TFTP instructions using initramfs.bin use sysupgrade.bin to flash using openwrt web interface **Return to OEM:** MTD partitions should be backed up before flashing using TFTP to boot openwrt without overwriting flash Alternatively, it is possible to edit OEM firmware images to flash MTD partitions in openwrt to restore OEM firmware by removing the OEM header and writing the rest to "firmware" **TFTP recovery:** Requires serial console, reset button does nothing at boot rename initramfs.bin to 'uImageESR900' make available on TFTP server at 192.168.99.8 power board, interrupt boot by pressing '4' rapidly execute tftpboot and bootm **Note on ETH switch registers** Registers must be written to the ethernet switch in order to set up the switch's MAC interface. U-boot can write the registers on it's own which is needed, for example, in a TFTP transfer. The register bits from OEM for the AR8327 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written. for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: split Engenius EPG5000 DTS to common DTSIMichael Pratt2023-02-122-108/+128
| | | | | | | | | | | | Split the DTS to be used with similar boards made by Senao, dual-band routers with Atheros / Qualcomm ethernet switch. Set initvals for the switch in each device's DTS. Set some common calibration nvmem-cells in DTSI. While at it, fix MTD partition node names. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* tools/e2fsprogs: update to 1.47.0Nick Hainke2023-02-121-2/+2
| | | | | | | Release notes: https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.0 Signed-off-by: Nick Hainke <vincent@systemli.org>
* toolchain: wrapper.sh: use --rpath-linkEneas U de Queiroz2023-02-121-2/+2
| | | | | | | Use --rpath-link option instead of --rpath. The former is used only at link-time, while the latter is searched at run-time as well. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* toolchain: wrapper.sh: fix TOOLCHAIN_SYSROOT pathEneas U de Queiroz2023-02-121-1/+1
| | | | | | | | | 62c1740676 changed the location of the script from $(TOOLCHAIN_DIR)/usr to $(TOOLCHAIN_DIR), but the TOOLCHAIN_SYSROOT used in wrapper.sh was still expecting to find the script under usr/bin. Fixes: 62c1740676 toolchain: fix the sysroot mess by getting... Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* Revert "tools/fakeroot: update to 1.30.1"Michael Pratt2023-02-122-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 52167feff8ae3fbd02be22dfe6021e7e9c79c599. Fakeroot 1.30.1 broke building on certain hosts (32-bit archs). As of 2023-01-10, this was apparently fixed in source code, however, the version is still 1.30.1 (patch release), so the old binaries are removed from the repository and replaced, but the source provided by the repository remains the same. Furthermore, there are some complicated issues blocking the "testing" release from being bumped to a 1.30.x version. Considering all of this, it would likely be better for this package to follow the "testing" release instead of the "unstable" release, which is still 1.29-1, so revert to that. Link: https://bugs.debian.org/1023286 Link: https://tracker.debian.org/news/1407613/accepted-fakeroot-1301-11-source-into-unstable/ Link: https://qa.debian.org/excuses.php?package=fakeroot Link: https://bugs.debian.org/1027803 Signed-off-by: Michael Pratt <mcpratt@pm.me>
* openssl: bump to 1.1.1tJohn Audia2023-02-122-55/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed upstreamed patch: 010-padlock.patch Changes between 1.1.1s and 1.1.1t [7 Feb 2023] *) Fixed X.400 address type confusion in X.509 GeneralName. There is a type confusion vulnerability relating to X.400 address processing inside an X.509 GeneralName. X.400 addresses were parsed as an ASN1_STRING but subsequently interpreted by GENERAL_NAME_cmp as an ASN1_TYPE. This vulnerability may allow an attacker who can provide a certificate chain and CRL (neither of which need have a valid signature) to pass arbitrary pointers to a memcmp call, creating a possible read primitive, subject to some constraints. Refer to the advisory for more information. Thanks to David Benjamin for discovering this issue. (CVE-2023-0286) This issue has been fixed by changing the public header file definition of GENERAL_NAME so that x400Address reflects the implementation. It was not possible for any existing application to successfully use the existing definition; however, if any application references the x400Address field (e.g. in dead code), note that the type of this field has changed. There is no ABI change. [Hugo Landau] *) Fixed Use-after-free following BIO_new_NDEF. The public API function BIO_new_NDEF is a helper function used for streaming ASN.1 data via a BIO. It is primarily used internally to OpenSSL to support the SMIME, CMS and PKCS7 streaming capabilities, but may also be called directly by end user applications. The function receives a BIO from the caller, prepends a new BIO_f_asn1 filter BIO onto the front of it to form a BIO chain, and then returns the new head of the BIO chain to the caller. Under certain conditions, for example if a CMS recipient public key is invalid, the new filter BIO is freed and the function returns a NULL result indicating a failure. However, in this case, the BIO chain is not properly cleaned up and the BIO passed by the caller still retains internal pointers to the previously freed filter BIO. If the caller then goes on to call BIO_pop() on the BIO then a use-after-free will occur. This will most likely result in a crash. (CVE-2023-0215) [Viktor Dukhovni, Matt Caswell] *) Fixed Double free after calling PEM_read_bio_ex. The function PEM_read_bio_ex() reads a PEM file from a BIO and parses and decodes the "name" (e.g. "CERTIFICATE"), any header data and the payload data. If the function succeeds then the "name_out", "header" and "data" arguments are populated with pointers to buffers containing the relevant decoded data. The caller is responsible for freeing those buffers. It is possible to construct a PEM file that results in 0 bytes of payload data. In this case PEM_read_bio_ex() will return a failure code but will populate the header argument with a pointer to a buffer that has already been freed. If the caller also frees this buffer then a double free will occur. This will most likely lead to a crash. The functions PEM_read_bio() and PEM_read() are simple wrappers around PEM_read_bio_ex() and therefore these functions are also directly affected. These functions are also called indirectly by a number of other OpenSSL functions including PEM_X509_INFO_read_bio_ex() and SSL_CTX_use_serverinfo_file() which are also vulnerable. Some OpenSSL internal uses of these functions are not vulnerable because the caller does not free the header argument if PEM_read_bio_ex() returns a failure code. (CVE-2022-4450) [Kurt Roeckx, Matt Caswell] *) Fixed Timing Oracle in RSA Decryption. A timing based side channel exists in the OpenSSL RSA Decryption implementation which could be sufficient to recover a plaintext across a network in a Bleichenbacher style attack. To achieve a successful decryption an attacker would have to be able to send a very large number of trial messages for decryption. The vulnerability affects all RSA padding modes: PKCS#1 v1.5, RSA-OEAP and RSASVE. (CVE-2022-4304) [Dmitry Belyavsky, Hubert Kario] Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.93John Audia2023-02-1120-48/+48
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* mediatek: mt7622: fix rootfs/ubi detection for Xiaomi AX6SOleg S2023-02-111-1/+0
| | | | | | | | | | | | | | | | | By specifying the flag "denx,fit" for partition "kernel", the kernel try to find rootfs in the same partition during boot. Reality is that the placement of rootfs is precisely determined by the name of another partition -"ubi". It was also found that on some device (for example devices with NAND chips), the "Denx search engine" manages to find roots at the end of partition "kernel", but such partition doesn't exist and is empty there. Fix this by removing the "denx,fit" flag from partition "kernel". With this change the original behavior of searchif rootfs in partition "ubi" is restored. Signed-off-by: Oleg S <remittor@gmail.com>
* kernel: kmod-fs-ntfs3: fix typoXu Yiming2023-02-091-1/+1
| | | | | | Fix typo that mistaken the description of ntfs3 for fuse. Signed-off-by: Xu Yiming <xuyiming.open@outlook.com>
* realtek: fix dts whitespaceFelix Baumann2023-02-094-9/+9
| | | | | | Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ramips: fix dts whitespaceFelix Baumann2023-02-096-15/+15
| | | | | | | Replace blanks with tabs Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* mediatek: fix dts whitespaceFelix Baumann2023-02-091-1/+1
| | | | | | Replace blanks with tabs Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* kirkwood: fix dts whitespaceFelix Baumann2023-02-091-1/+1
| | | | | | Replace blanks with tabs Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ipq807x: fix dts whitespaceFelix Baumann2023-02-091-1/+1
| | | | | | Replace blanks with tabs Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ipq806x: fix dts whitespaceFelix Baumann2023-02-091-9/+9
| | | | | | Replace blanks with tabs Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* bcm63xx: fix dts whitespaceFelix Baumann2023-02-091-1/+1
| | | | | | Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ath79: fix dts whitespaceFelix Baumann2023-02-096-30/+30
| | | | | | | Replace blanks with tabs Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* ipq40xx: fix dts whitespaceFelix Baumann2023-02-092-2/+2
| | | | | | Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* tools/cmake: remove rpath ldflagRosen Penev2023-02-091-2/+0
| | | | | | no longer needed because of tools/zstd Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tools/zstd: build libraries as staticRosen Penev2023-02-091-1/+1
| | | | | | Enables to get rid of rpath hack for all users. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* toolchain/gcc: clean up CFLAGSAndre Heider2023-02-091-9/+13
| | | | | | | | | | | Instead of having two different ways to pass flags to the gcc build process, add them as configure args, which is a reliable way to let gcc pass them around to its various pieces. Also add CXXFLAGS, since gcc started to use c++ for itself recently (~10 years ago now). Signed-off-by: Andre Heider <a.heider@gmail.com>
* toolchain/gcc: use explicit configure argsAndre Heider2023-02-092-0/+3
| | | | | | | Spell out what we want to enable or disable. This prevents host libs to leak in, so everyone get the same feature set. Signed-off-by: Andre Heider <a.heider@gmail.com>