aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* feeds: add freifunk feedSven Roederer2020-06-241-0/+1
| | | | | | | Read the freifunk packages, that have been moved from the LuCI feed into its own feed in January 2019. Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
* wireguard: bump to 1.0.20200623Jason A. Donenfeld2020-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * compat: drop centos 8.1 support as 8.2 is now out Of note, as well, is that we now have both RHEL7 and RHEL8 in our CI at <https://www.wireguard.com/build-status/>. * Kbuild: remove -fvisibility=hidden from cflags This fixes an issue when compiling wireguard as a module for ARM kernels in THUMB2 mode without the JUMP11 workaround. * noise: do not assign initiation time in if condition Style fix. * device: avoid circular netns references Fixes a circular reference issue with network namespaces. * netns: workaround bad 5.2.y backport This works around a back backport in the 5.2.y series. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* mac80211: fix use of local variableLeon M. George2020-06-241-1/+1
| | | | | | | | | | mac80211_get_addr is called from mac80211_generate_mac, where the local variable initialisation id="${macidx:-0}" suggests that macidx is not always defined. Probably, idx was supposed to be used instead of $(($macidx + 1)). Fixes: 4d99db168cf7 ("mac80211: try to get interface addresses from wiphy sysfs 'addresses' if no mask is set") Signed-off-by: Leon M. George <leon@georgemail.eu>
* bcm47xx: add support for NETGEAR R6200 V1Edward Matijevic2020-06-245-11/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds supports for the NETGEAR R6200 V1 This device is mainlined in Linux as of 5.4 Specification: - SOC: Broadcom BCM4718A1 (480 MHz) - Flash: 16MB (Macronix MX25L128) - RAM: 128MB DDR2 - SWITCH: BCM53125 - Ethernet: 5x GE (1 WAN + 4 LAN, Inverted order) - WLAN 2.4G: In SOC - WLAN 5GHz: miniPCIe card, BCM4352 (ID: 4360) - USB: 1x USB 2.0 port (Type A) - Buttons: Reset, WLAN, WPS - LED: Amber for Power, others need a workaround - UART: 1x UART on PCB LED Issues: They are controlled by a 74HC164 via bit banging(GPIO 6/7) Firmware Install Instructions ============================= Using the device specific .chk, use that file to perform a normal device upgrade in the OEM admin page. Signed-off-by: Edward Matijevic <motolav@gmail.com>
* base-files: remove urandom-seed definitionSungbo Eo2020-06-231-9/+0
| | | | | | | | urandom-seed has a separate Makefile, we can safely remove the definition here. Fixes: 27bfde9c9f78 ("base-files: move urandom seed bits into separate package") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: clean up Netgear R6120 code formattingAlex Lewontin2020-06-231-1/+1
| | | | | | | This commit performs minor janitorial work to clean up some code formatting for the Netgear R6120. Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com>
* ramips: move Netgear R6120 LED trigger to DTSAlex Lewontin2020-06-232-6/+3
| | | | | | | | | | | | This moves the trigger for the Netgear R6120's wlan2g_green LED from base-files/etc/board.d/01_leds to the device-tree file. This has been applied to R6120 based on findings for the very similar Netgear R6080. Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com> [merge case in 01_leds, slightly adjust commit message/title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: consolidate DTS filesAdrian Schmutzler2020-06-2312-837/+0
| | | | | | | | | | | | The DTS files in files-4.19 and files-5.4 are exactly identical except for one file (armada-3720-uDPU.dts), which is only present for 4.19, as it has been upstreamed before 5.4. Since there is no point in maintaining all these identical files twice, this patch moves them to the "files" directory, only keeping the named exception to files-4.19. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq40xx: consolidate DTS filesAdrian Schmutzler2020-06-2387-10517/+0
| | | | | | | | | | | | | | | The DTS files in files-4.19 and files-5.4 are exactly identical except for one file (qcom-ipq4018-emr3500.dts), which is only present for 5.4. Since there is no point in maintaining all these identical files twice, this patch moves them to the "files" directory. If there ever was a new kernel with substantial DTS changes, a new folder would need to be introduced anyway and could easily be done. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* igmpproxy: remove some bashismSven Roederer2020-06-231-3/+5
| | | | | | | | | | | | "[[" is a bash extension for test. As the ash-implementation is not fully compatible we drop its usage. This follows up 3519bf4976b41c As a result, we also need to move the and/or out of the test brackets. Signed-off-by: Sven Roederer <devel-sven@geroedel.de> [squash from two patches, adjust commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* libnetfilter-queue: fix package title and descriptionCatalin Patulea2020-06-231-3/+3
| | | | | | | | | | The original text was copy/pasted from some other package. Adjust the package title and description to match the description on the publishers page. Signed-off-by: Catalin Patulea <catalinp@google.com> [slightly adjust content and commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* mvebu: fix default EU regdomain for Linksys WRT AC devicesJose Olivera2020-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | The mwlwifi driver sets the default country code for EU (fi- rmware region code 0x30) certified devices to FR (France), not DE (Germany). Whilst this is a trivial fix, novice users may not know how mwlwifi negatively reacts to a non-matching country code and may leave the setting alone. Especially si- nce it is under the advanced settings section in LuCI. Relevant mwlwifi driver code: https://github.com/kaloz/mwlwifi/commit/0a550312ddb5a9e00e8d602d5571598f25a78158 The mwlwifi driver readme states "Please don't change country code and let mwlwifi set it for you." However, OpenWrt's current behaviour does not adhere to this with its default, 'just flashed from factory' setting for EU devices. Signed-off-by: Jose Olivera <oliverajeo@gmail.com> [rebase, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* armvirt,x86: fix build breakage of crypto ccp modulePetr Štetiar2020-06-232-0/+2
| | | | | | | | | Upstream in commit f9f8f0c24203 ("crypto: ccp -- don't "select" CONFIG_DMADEVICES") removed dependency on CONFIG_DMADEVICES symbol which leads to build breakage of ccp crypto module, so fix this by adding that symbol back in the kernel config. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* bcm63xx: AV4202N: add missing PCI pinmuxDaniel González Cabanelas2020-06-221-0/+5
| | | | | | | | | The ADB P.DG AV4202N device has a wifi chipset connected via PCI. But the PCI pinmux is missing and without it the wifi won't work properly. Add the pinctrl_pci to enable the missing PCI pins for this device. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* kernel: bump 5.4 to 5.4.48Petr Štetiar2020-06-2228-85/+42
| | | | | | | | | | | | | | | | Resolved merge conflict in the following patches: layerscape: 701-net-0213-dpaa2-eth-Add-CEETM-qdisc-support.patch ramips: 0013-owrt-hack-fix-mt7688-cache-issue.patch Refreshed patches, removed upstreamed patch: bcm63xx: 020-v5.8-mtd-rawnand-brcmnand-fix-hamming-oob-layout.patch Run tested: qemu-x86-64 Build tested: x86/64 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ath79: image: fix initramfs for safeloader devicesPetr Štetiar2020-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it's not possible to tftpboot initramfs image on archer-c7-v5 as the image contains tplink-v1-header which leads to: ath> bootm ## Booting image at 81000000 ... Bad Magic Number as U-Boot expects uImage wrapped image. This is caused by following inheritance issue: define Device/Init KERNEL_INITRAMFS = $$(KERNEL) define Device/tplink-v1 KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v1-header define Device/tplink-safeloader $(Device/tplink-v1) define Device/tplink-safeloader-uimage $(Device/tplink-safeloader) KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma define Device/tplink_archer-c7-v5 $(Device/tplink-safeloader-uimage) where tplink-v1 defines KERNEL_INITRAMFS with tplink-v1-header and it's then used by all devices inheriting from tplink-safeloader. Fix this by overriding KERNEL_INITRAMFS to KERNEL variable again. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* dropbear: bump to 2020.79Konstantin Demin2020-06-219-3722/+36
| | | | | | | | | | | | | | | | | | | | | - drop patches (applied upstream): * 010-backport-change-address-logging.patch * 020-backport-ed25519-support.patch * 021-backport-chacha20-poly1305-support.patch - backport patches: * 010-backport-disable-toom-and-karatsuba.patch: reduce dropbear binary size (about ~8Kb). - refresh patches. - don't bother anymore with following config options because they are disabled in upstream too: * DROPBEAR_3DES * DROPBEAR_ENABLE_CBC_MODE * DROPBEAR_SHA1_96_HMAC - explicitly disable DO_MOTD as it was before commit a1099ed: upstream has (accidentally) switched it to 0 in release 2019.77, but reverted back in release 2020.79. Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* lantiq: fritz7312: set maximum speed to 100 mbit on 5.4Adrian Schmutzler2020-06-211-0/+1
| | | | | | | | | | | | The fritz 7312 does not support 1000 gbit. Advertising it makes it worse. Some NIC will change to 1000 gibt and turn off and on again for ever. The previous patch in 36f628910b8b was only applied to the 4.19 file, so let's just make it consistent with this patch. Cc: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix input type for TP-Link TL-WR902AC v1 mode switchLech Perczak2020-06-211-0/+2
| | | | | | | | | Inputs assigned to "mode select" switch on the side of the device were missing linux,input-type property. This would cause them do incorrectly generate EV_KEY events. Fix this by setting the linux,input-type = <EV_SW> property on them. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* ramips: add support for ELECOM WRC-2533GST2INAGAKI Hiroshi2020-06-215-31/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELECOM WRC-2533GST2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on MT7621A. Specification: - SoC : MediaTek MT7621A - RAM : DDR3 256 MiB - Flash : SPI-NOR 32 MiB - WLAN : 2.4/5 GHz 4T4R (2x MediaTek MT7615) - Ethernet : 10/100/1000 Mbps x5 - Switch : MediaTek MT7530 (SoC) - LED/keys : 4x/6x (2x buttons, 1x slide-switch) - UART : through-hole on PCB - J4: 3.3V, GND, TX, RX from ethernet port side - 57600n8 - Power : 12VDC, 1.5A Flash instruction using factory image: 1. Boot WRC-2533GST2 normally 2. Access to "http://192.168.2.1/" and open firmware update page ("ファームウェア更新") 3. Select the OpenWrt factory image and click apply ("適用") button 4. Wait ~150 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: add MT7615 wireless support for ELECOM WRC-GST devicesINAGAKI Hiroshi2020-06-212-1/+30
| | | | | | | | | ELECOM WRC-1900GST and WRC-2533GST have two MT7615 chips for 2.4/5 GHz wireless. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [WRC-1900GST] Acked-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
* ramips: increase SPI frequency for ELECOM WRC-GST devicesINAGAKI Hiroshi2020-06-211-1/+1
| | | | | | | | | | | Increase the SPI frequency for ELECOM WRC-1900GST and WRC-2533GST to 40 MHz by updating the common DTSI file. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [WRC-1900GST] Acked-by: NOGUCHI Hiroshi <drvlabo@gmail.com> [split patch, adjust commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add label-mac-device for ELECOM WRC-GST devicesINAGAKI Hiroshi2020-06-211-1/+2
| | | | | | | | | | | Update the dtsi for ELECOM WRC-1900GST and WRC-2533GST to add label-mac-device alias. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> [WRC-1900GST] Acked-by: NOGUCHI Hiroshi <drvlabo@gmail.com> [split patch, adjust commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link CPE610 v2Andrew Cameron2020-06-205-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link CPE610 v2 is an outdoor wireless CPE for 5 GHz with one Ethernet port based on Atheros AR9344 Specifications: - 560/450/225 MHz (CPU/DDR/AHB) - 1x 10/100 Mbps Ethernet - 64 MB of DDR2 RAM - 8 MB of SPI-NOR Flash - 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal reflector - Power, LAN, WLAN5G green LEDs - 3x green RSSI LEDs Flashing instructions: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP adress:192.168.0.254 Signed-off-by: Andrew Cameron <apcameron@softhome.net>
* ath79: add support for TP-Link TL-WA801ND v3/v4Adrian Schmutzler2020-06-196-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for these devices from ar71xx. Specification: - System-On-Chip: Qualcomm Atheros QCA9533 - CPU/Speed: v3: 560 MHz, v4: 650 MHz - Flash: 4096 KiB - RAM: 32 MiB - Ethernet: 1 port @ 100M - Wireless: SoC-integrated: QCA9533 2.4GHz 802.11bgn In contrast to the implementation in ar71xx (reset and WiFi button), the device actually features reset and WPS buttons. Flashing instructions: Upload the ...-factory.bin file via OEM web interface. TFTP Recovery: 1. Set PC to fixed IP address 192.168.0.66 2. Download *-factory.bin image and rename it to wa801ndv3_tp_recovery.bin 3. Start a tftp server with the image file in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. TFTP recovery has only been tested with v3, and the Wiki states that the procedure won't work for v4, which cannot be verified or falsified at the moment. Tested by Tim Ward (see forum): https://forum.openwrt.org/t/ath79-support-for-tp-link-tl-wa901nd-v3-v4-v5/61246/13 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* bcm63xx: DGND3700v1: fix port orderDaniel González Cabanelas2020-06-191-4/+4
| | | | | | | | | Fix the switch LAN labels for the DGND3700v1/DGND3800B router, the order is reversed. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> [cut out of bigger patch, adjust commit title/message accordingly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* bcm63xx: HG622: enable LAN LEDsDaniel González Cabanelas2020-06-191-1/+3
| | | | | | | | | The Huawei Echolife HG622 has hardware controlled LAN LEDs. Add the ephy led pinctrl to let the router show LAN activity on these LEDs. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* ath79: set &eth1 status for TP-Link CPE devices in parent DTSIAdrian Schmutzler2020-06-184-6/+4
| | | | | | | The status is set to "okay" for all devices on ar9344, so just move this to the parent DTSI. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* toolchain: glibc ldd env path fixupChen Minqiang2020-06-181-0/+1
| | | | | | | | | | This replace the shell script header of ldd when it install to `/usr/bin/ldd` where `#! /..../staging_dir/host/bin/bash` should be `#!/bin/sh` Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
* base-files: gpio switch: add named GPIO supportKuan-Yi Li2020-06-183-14/+32
| | | | | | | | | | | | | | | | Previously, gpio_switch only accepts GPIO pin number as input. Once a GPIO pin is exported and named by device tree, its pin state cannot be configured and saved across reboots by UCI. This patch adds support for named GPIO pins. Thus GPIO pin can be exported by device tree with active high/low correctly configured, having human-readable name in /sys/class/gpio/ is also now possible. More importantly, GPIO pins which are referenced by name will be immune from pin mapping breakage while unintentional pin number changes are introduced by kernel or driver updates. Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
* mac80211: ath9k: enable adding wireless noise to kernel entropy poolAlan Swanson2020-06-181-0/+8
| | | | | | | | | | This option allows adding the ath9k ADC register output as a source of randomness into the Linux entropy pool at sufficient quality random data (at least 10 bits and up to 22 bits of min-entropy for a 32-bit value). Fixes FS#1444 Signed-off-by: Alan Swanson <reiver@improbability.net>
* hostapd: fix compilation of wpa_supplicantKarel Kočí2020-06-181-4/+4
| | | | | | | | | | | | | Ubus patch as it seems have been broken by some rebase in the past as the location of line that adds ubus object file was in condition for CONFIG_MACSEC. That condition was adding object files that are not touched by ubus patch. This means ubus.o does not have to be included in that case. When it has to be and when build fails is when CONFIG_AP is set. All files included in wpa_supplicant that are touched by this patch are in this condition. This means that this is for sure the original place for it. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
* toolchain: remove gcc libssp and use libc variantIan Cooper2020-06-177-64/+5
| | | | | | | | | | | | | | | Removes the standalone implementation of stack smashing protection in gcc's libssp in favour of the native implementation available in glibc and uclibc. Musl libc already uses its native ssp, so this patch does not affect musl-based toolchains. Stack smashing protection configuration options are now uniform across all supported libc variants. This also makes kernel-level stack smashing protection available for x86_64 and i386 builds using non-musl libc. Signed-off-by: Ian Cooper <iancooper@hotmail.com>
* comgt-ncm: do not attempt to connect if the control device is invalidRozhuk Ivan2020-06-171-16/+46
| | | | | | | | | | | | | | | | | | | | | | After a hardware reconnect, the control device might be unavailable and attempting to interact with it will lead to hanging gcom calls, leaving the protocol setup in an unrecoverable state. Change the protocol handler to bail out early and notify netifd if the control device is not defined or if the underlying device node does not exist. Also ensure that the "disconnect", "connect" and "setmode" commands are actually defined before trying to invoke them. Finally attempt to re-query the device manufacturer if it is unset in the interface state in order to prevent UNUPPORTED_MODEM errors after a modem hardware reconnect. Signed-off-by: Rozhuk Ivan <rozhuk.im@gmail.com> [reword subject and commit message] Ref: https://github.com/openwrt/openwrt/pull/2352 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* openvpn: add generic hotplug mechanismFlorian Eckert2020-06-176-8/+81
| | | | | | | | | | | | | | | | | | | Pass a default --up and --down executable to each started OpenVPN instance which triggers /etc/hotplug.d/openvpn/ scripts whenever an instance goes up or down. User-configured up and down scripts are invoked by the default shipped 01-user hotplug handler to ensure that existing setups continue to work as before. As a consequence of this change, the up, down and script_security OpenVPN options are removed from the option file, since we're always passing them via the command line, they do not need to get included into the generated configuration. Signed-off-by: Florian Eckert <fe@dev.tdt.de> [reword commit message, move hotplug executable to /usr/libexec] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ath79: define CONFIG_MFD_RB4XX_CPLD to fix build breakageHannu Nyman2020-06-172-0/+2
| | | | | | | | | | | | | | Define the kernel config symbol CONFIG_MFD_RB4XX_CPLD=n to fix build breakage on non-mikrotik targets. The driver was added for all ath79, but the symbol was only defined for mikrotik subtarget. Fixes: fa70b3a4bbc6 ("ath79: add Mikrotik rb4xx series drivers") Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> [rearrange commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* uclient: uclient-fetch: add option to read POST data from fileDaniel Golle2020-06-171-3/+3
| | | | | | c660986 uclient-fetch: add option to read POST data from file Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* lantiq: drop "CONFIG_HZ_100 is not set"Adrian Schmutzler2020-06-172-2/+0
| | | | | | | | | | CONFIG_HZ_100 is not set to "y" in generic config anymore since 3a761c90afc0 ("treewide: Don't diverge from upstream default HZ settings on 4.19"), so we don't need to disable it anymore either. This was the only remaining case in the entire tree. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* lantiq: switch to 5.4Aleksander Jan Bajkowski2020-06-171-2/+1
| | | | | | Runtime tested on BT Home Hub 5A and D-Link DWR-966. Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* kernel: bump 5.4 to 5.4.46Petr Štetiar2020-06-163-5/+5
| | | | | | | | | Refreshed patches. Run tested: qemu-x86-64, wrt3200acm Build tested: x86/64, imx6, mvebu/cortexa9, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mvebu: fix bootloader kernel commandline manglingPetr Štetiar2020-06-161-27/+34
| | | | | | | | | | | | Currently I'm unable to boot initramfs image with `console=ttyS0,115200` kernel commandline as the kernel commandline mangling resets kernel commandline if there is no `root=` option provided, efectively clearing whatever I pass to the kernel, making the `root=` option mandatory. So if the kernel commandline mangling is not appropriate just leave the kernel commandline as it is. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mediatek: mt7623: refresh kernel 5.4 configSungbo Eo2020-06-161-44/+7
| | | | | | By running make kernel_oldconfig and selecting relevant options. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* bcm63xx: use the generic nand upgrade on Sercomm devicesDaniel González Cabanelas2020-06-161-2/+5
| | | | | | | | | | | | | | | The Sercomm devices don't need the jffs2 cleanmarkers for the kernel partition. With the stock firmware they are only added when the bootloader partition is upgraded. Furthermore, on the Sercomm H500-s, the specific cfe_jffs2_upgrade_tar function causes OOB corruption. As a result of this, combined with the nature of the mtdsplit driver, the upgrade procedure ends in a bricked device. Use the generic nand_do_upgrade provided by the OpenWrt common functions. Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
* mediatek: fix IPv4-only corner case and commit in 99-net-psAdrian Schmutzler2020-06-161-1/+4
| | | | | | | | | | | | | | | | The uci config section network.globals set up in /bin/config_generate will only be created if /proc/sys/net/ipv6 exists. Correspondingly, lacking IPv6 support, the command uci set network.globals.packet_steering=1 will fail with "uci: Invalid argument" as the network.globals config has not been set up. Fix that by adding the setup there as well. While at it, limit the uci commit to the network config file. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for the TP-Link WBS210 v1Adrian Schmutzler2020-06-165-0/+28
| | | | | | | | | | | | | | | | | | | | Specifications: - SoC: Atheros AR9344 - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz N based built into SoC - Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps Installation: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP adress:192.168.0.254 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: drop shebang from non-executable target filesAdrian Schmutzler2020-06-1661-99/+4
| | | | | | | | | | | | | | This drops the shebang from all target files for /lib and /etc/uci-defaults folders, as these are sourced and the shebang is useless. While at it, fix the executable flag on a few of these files. This does not touch ar71xx, as this target is just used for backporting now and applying cosmetic changes would just complicate things. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik RouterBOARD 493G (rb4xx series)Christopher Hill2020-06-157-0/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RouterBOARD RB493G, ported from the ar71xx target. See https://routerboard.com/RB493G for details Specification: - SoC Qualcomm Atheros AR7161 - RAM: 256 MiB - Storage: 128MiB NAND - Ethernet: 9x 1000/100/10 Mbps - USB 1x 2.0 / 1.0 type A - PCIe: 3x Mini slot - MicroSD slot Working: - Board/system detection - Ethernet - SPI - NAND - LEDs - USB - Sysupgrade Enabled (but untested due to lack of hardware): - PCIe - ath79_pci_irq struct has the slot/pin/IRQ mappings if needed Installation methods: - tftp boot initramfs image, scp then flash via "sysupgrade -n" - nand boot existing OpenWrt, scp then flash via "sysupgrade -n" Notes: - initramfs image will not work if uncompressed image size over ~8.5Mb - The "rb4xx" drivers have been enabled Signed-off-by: Christopher Hill <ch6574@gmail.com>
* ath79: add Mikrotik rb4xx series driversChristopher Hill2020-06-156-0/+817
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds 3 Mikrotik rb4xx series drivers as follows: rb4xx-cpld: This is in the mfd subsystem, and is the parent CPLD device that interfaces between the SoC SPI bus and its two children below. rb4xx-gpio: This is the GPIO expander. rb4xx-nand: This is the NAND driver. The history of this code comes in three phases. 1. The first is a May 2015 attempt to push the equivalient ar71xx rb4xx drivers upstream. See https://lore.kernel.org/patchwork/patch/940880/. Module-author: Gabor Juhos <juhosg@openwrt.org> Module-author: Imre Kaloz <kaloz@openwrt.org> Module-author: Bert Vermeulen <bert@biot.com> 2. Next several ar71xx patches were applied bringing the code current. commit 7bbf4117c6fe4b764d9d7c62fb2bcf6dd93bff2c Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> commit af79fdbe4af32a287798b579141204bda056b8aa commit 889272d92db689fd9c910243635e44c9d8323095 commit e21cb649a235180563363b8af5ba8296b9ac0baa commit 7c09fa4a7492ca436f2c94bd9a465b7c5bbeed6f Signed-off-by: Felix Fietkau <nbd@nbd.name> 3. Finally a heavy refactor to split the driver into the three new subsystems, and updated to work with the device tree configuration, plus updates and review feedback incorporated Reviewed-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: Christopher Hill <ch6574@gmail.com>
* ath79: patch upstream Mikrotik rb4xx-spi driver to be device tree awareChristopher Hill2020-06-154-0/+224
| | | | | | | Backport upstream patches that make drivers/spi/spi-rb4xx.c device tree aware, plus a null pointer fix. Signed-off-by: Christopher Hill <ch6574@gmail.com>
* bcm63xx: a226m-fwb: fix linux partition offsetDaniel González Cabanelas2020-06-151-4/+4
| | | | | | | | | | | | | | | | | | The Pirelli A226M-FWB has a wrong linux partition offset, caused by a copy-paste error. As of result of this, OpenWrt is currently broken in this unit. Fix it. While at it, also use generic node names and fix the addresses there as well. Fixes: a27d59bb4274 ("brcm63xx: switch to new partition layout specification") Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com> [also fix/update node names, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>