aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
Commit message (Collapse)AuthorAgeFilesLines
* ipq40xx: move dts file patches to end of seriesJohn Crispin2018-07-257-168/+168
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ipq40xx: cleanup USB supportJohn Crispin2018-07-253-462/+227
| | | | | | remove the 2 USB PHY drivers and add a generic PHY driver instead Signed-off-by: John Crispin <john@phrozen.org>
* ipq40xx: drop no-op cpu_idle symbol patchJohn Crispin2018-07-252-30/+0
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ath79: fix OCEDO RaccoonDavid Bauer2018-07-252-0/+5
| | | | | | | | | | | The OCEDO Raccoon only has one ethernet port, but currently uci sections for WAN and LAN are created. Additionally, newer versions of the devices U-Boot (units with SteelWRT) set the kernel-cmdline and therefore overwrite the partition-layout. We fix this by overwriting the cmdline supplied by the bootloader. Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: remove stale get_status_led callMathias Kresin2018-07-251-3/+0
| | | | | | | | | | | | The get_status_led() function was removed due to the convertion to dts alias based status led. Since we don't need the boardname any longer, the functions.sh include isn't required any more. Fixes: c9c4b2116c09 ("ramips: Use dts alias based status led") Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: don't auto attach ubi on read errorMathias Kresin2018-07-242-10/+20
| | | | | | | | | | | | With a10a204aab26cc ("kernel: make ubi auto-attach check for a tar file magic") the check for the magic was added without considering a failing mtd_read(). If the read fails, no check is done and the mount code is called straight away. Failing with an error message for such cases seems to me the cleaner way, as it would allow to spot hidden/workaround issues. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: handle bad blocks in ubi auto attach codeMathias Kresin2018-07-242-8/+36
| | | | | | | | | | The first block(s) of the ubi mtd device might be bad. We need to take care on our own to skip the bad block(s) and read the next one(s). Don't treat recoverable read errors as fatal and check for the UBI magic if the data of a block could be recovered using ECC or similar. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: improve ubi auto attach code readabilityMathias Kresin2018-07-242-52/+62
| | | | | | | | | | | | | | Move the put_mtd_device() called on multiple error conditions to a goto label to use it later for more error conditions. The early return on failed open of the mtd device and mismatching mtd type allows to get rid of one level of indentation. By jumping to the cleanup code, a refcount bug is fixed for the wrong flash type condition. While at it, make clear that we only check for the UBI magic if the read from flash was successful. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ipq40xx: drop bus driver, its a no-op and only does lots of alloc/freeJohn Crispin2018-07-2412-12178/+0
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* kernel: backport a change to 4.9 which disables overly aggressive warnings ↵Felix Fietkau2018-07-221-0/+45
| | | | | | on gcc 8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: backport fixes for GCC 8 errors in syscall definitionsFelix Fietkau2018-07-224-0/+457
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipq806x: dts: Remove device_type = "ethernet-phy"Rosen Penev2018-07-1912-26/+0
| | | | | | device_type is deprecated. Upstream doesn't seem to like it either. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* apm821xx: unify My Book Live Single + Duo imagesChristian Lamparter2018-07-194-246/+187
| | | | | | | | | | | | | | By takimata: "Come to think of it, an MBL Single board boots up just fine on an MBL Duo image, and the MBL Single board identifies completely identical to the MBL Duo (Board: Apollo-3G - APM82181 Board, 2*SATA, 1*USB). I wonder if there is any downside to just using the MBL Duo firmware on a MBL Single. I wonder if the two firmwares could even be unified." <https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/9> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: define common MikroTik RouterBOARD image recipeThibaut VARÈNE2018-07-191-11/+9
| | | | | | | | | | All these devices share the exact same image format. The usb3 kmod is added for the rbm11g, as the rbm11g has a mini-pcie slot like its bigger sibling. The usb kmod is necessary for usb-over-pcie support, which is mandatory for a lot of LTE modules. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* lantiq: add support for FritzBox 7312Johann Neuhauser2018-07-185-1/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FritzBox 7312 is also known as 1&1 WLAN-MODEM. The device is almost the same as FB7330, but only one ETH-Port and no USB. Hardware SoC: Lantiq Xway ARX188 PSB 50812 EL RAM: 64MB DDR1 (Zentel A4S12D40FTP-G5) Ethernet: Atheros 8030 Wireless: Atheros AR9227 b/g/n 2x2 DSL: Lantiq ADSL2+ DECT: Dialog SC14441 Buttons: WiFi, DECT LEDs: Power/DSL, Fon, DECT, WLAN, Info LEDs Power: GPIO#44 (active low) Internet: GPIO#47 (active low) DECT: GPIO#38 (active low) WLAN: GPIO#37 (active low) Info: GPIO#35 (active low) The Fon LED is labeled as internet in avm gpl sources. Buttons WLAN: GPIO#1 (active low) DECT: GPIO#2 (active low) Phy GPIO#03: 25 MHz GPIO#34: Reset (active low) GPIO#39: Int GPIO#42: MII MDIO GPIO#43: MII MDC PCIe GPIO#21: reset (active low) Installation: To install OpenWrt via Eva bootloader, within the first seconds after power on a ftp connection need to be established to the FRITZ!Box at 192.168.178.1 and the the following ftp commands need to be run: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put /path/to/openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1 ftp> quote REBOOT Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
* lantiq: etop: pass devicetree node to phy driverJohann Neuhauser2018-07-181-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of_mdiobus_register() to pass the ethernet phy node to the phy drivers. This is needed for the at8030 phy driver which needs to know the GPIO which is connected to the ar8030 reset pin. This driver expects a child in gsw/etop node named "mdio-bus", which has the ethernet phys defined: &gsw { phy-mode = "rmii"; phy-handle = <&phy0>; mtd-mac-address = <&ath9k_cal 0xa91>; mtd-mac-address-increment = <(-2)>; mdio-bus { #address-cells = <1>; #size-cells = <0>; reg = <0>; phy0: ethernet-phy@0 { reg = <0>; reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>; }; }; }; Fallback to mdiobus_register() if no mdio-bus child node exists. This way we don't need to touch all xway dts files, for which we don't know the actual address on the mdio bus. Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
* ath79: fix TP-Link Archer C7 v2 wlan1 MAC addressAleksandr V. Piskunov2018-07-181-0/+1
| | | | | | | | | | | | The mac address for the 2.4 wireless need to be decremented by one. Correct MAC adress increments for this board are: wlan0 (5GHz) : -2 wlan1 (2.4GHz) : -1 eth1 (LAN) : 0 eth0 (WAN) : 1 Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
* mediatek: fix parallel build issues in image build codeJo-Philipp Wich2018-07-171-10/+4
| | | | | | | | | Drop the parallel-unsafe custom Build/dtb macro and use the .dtb artifacts produced by the generic image build code. Also remove unused .dtb references in the mt7623 subtarget. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ar71xx: Move F9K1115v2 under ar71xx tiny targetKin Chan2018-07-165-10/+10
| | | | | | | | | | | | F9K1115v2 has a kernel partition size of 1408 kB. Since kernel 4.9.x+ the kernel image for this device compiled had exceeded the kernel partition size limit and thus failing size check. The kernel image generated for this device under ar71xx tiny target is 1329.67 kB < 1408 kB. Signed-off-by: Kin Chan <kcchan1@outlook.com>
* ramips: Use dts alias based status ledChuanhong Guo2018-07-16208-555/+1035
| | | | | | Also fix several typos in led node name. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ar71xx: add support for MikroTik RB931-2nDThibaut VARÈNE2018-07-169-2/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RB931-2nD (hAP mini): https://mikrotik.com/product/RB931-2nD Specifications: * SoC: Qualcomm QCA9533 (650MHz) * RAM: 32MiB * Storage: 16MiB SPI NOR flash * Ethernet: 3x100M * Wireless: QCA9533 built-in, dual-chain 802.11b/g/n Installation: 1. Setup a DHCP/BOOTP Server with the following parameters: * DHCP-Option 66 (TFTP server name): pointing to a local TFTP server within the same subnet of the DHCP range * DHCP-Option 67 (Bootfile-Name): matching the initramfs filename of the to be booted image. The usable intramfs files are: - openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf - openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf - openwrt-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin 2. Press the reset button on the board and keep that pressed. 3. Connect the board to your local network via its Internet port. 4. Release the button after the LEDs on the board are turned off. Now the board should load and start the initramfs image from the TFTP server. 5. Now connect the board via either of its LAN ports (2 or 3). 6. Upload the sysupgrade image to the board with scp: $ scp openwrt-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/fw.bin 7. Log in to the running system listening on 192.168.1.1 via ssh as root (without password): $ ssh root@192.168.1.1 8. Flash the uploaded firmware file from the ssh session via the sysupgrade command: root@OpenWrt:~# sysupgrade /tmp/fw.bin Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* brcm63xx: initial support for Sky SR102 routerAndrius Štikonas2018-07-167-0/+236
| | | | | | | | | | | | | | | | | | | | The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. SOC: BCM63168 (BMIPS4350 V8.0 @400MHz) Flash size: 16 MiB RAM size: 128 MiB Heavily based on patch for OpenWRT Chaos Chalmer. Original patch and more info can be found at: https://openwrt.org/toh/sky/sr102 Known issues: - Wireless and ADSL modem are not working. Signed-off-by: Andrius Štikonas <andrius@stikonas.eu>
* apm821xx: attempt to fix sata access freezesChristian Lamparter2018-07-161-0/+25
| | | | | | | | | | | The original vendor's driver programmed the dma controller's AHB HPROT values to enable bufferable, privileged mode. This along with the "same priorty for both channels" could very well fix the freezes that have been reported on the forum by @ticerex and @takimata. <https://forum.lede-project.org/t/wd-mybook-live-duo-two-disks/16195/46> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: fix usb-otg on 4.14Christian Lamparter2018-07-161-1/+1
| | | | | | | Starting with 4.14, the "amcc,dwc-otg" needs to be used in order to get the usb-otg to work. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: backport page fragment API changes from 4.10+ to 4.9Felix Fietkau2018-07-143-0/+291
| | | | | | mt76 now relies on this API Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: ethernet: disable fraglist supportFelix Fietkau2018-07-141-1/+1
| | | | | | | The code has some remaining issues that cause ethernet hangs, so disable it for now until we can get it fixed Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: ethernet: use own page_frag_cacheFelix Fietkau2018-07-122-3/+15
| | | | | | | | | | | | | | | | Using the NAPI or netdev frag cache along with other drivers can lead to 32 KiB pages being held for a long time, despite only being used for very few page fragment. This can happen if the ethernet driver grabs one or two fragments for rx ring refill, while other drivers use (and free up) the remaining fragments. The 32 KiB higher-order page can only be freed once all users have freed their fragments, which only happens after the rings of all drivers holding the fragments have wrapped around. Depending on the traffic patterns, this can waste a lot of memory and look a lot like a memory leak Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: ethernet: use skb_free_frag to free fragmentsFelix Fietkau2018-07-121-3/+3
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: TP-Link TL-WR902AC v3: add missing wps buttonPeter Lundkvist2018-07-121-1/+7
| | | | Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
* ramips: TP-Link TL-WR902AC v3: don't build factory imagePeter Lundkvist2018-07-121-1/+0
| | | | | | | | | | | | | | | | | | | | | The line that produces factory image was accidentally left by me while testing before inital commit. I came to the conclusion that flashing from OEM firmware does not work (seems to share this behavior with other tplinks based on mt7628). I have not done any further analysis, as I was unable to open the case and attach a serial port (too much glue). Maybe i will try once more. So the way to do initial flashing (or un-bricking) is to use the tftp-recover image. It is possible to revert to OEM firmware with tftp recovery; in this case the first 512 bytes the image file need to be cut off. Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com> [add explaination provided via mail as commit message] Signed-off-by: Mathias Kresin <dev@kresin.me>
* config: extend small_flash featureAlex Maclean2018-07-123-3/+3
| | | | | | | | | | Extend the small_flash feature to disable swap, core dumps, and kernel debug info, and change the squashfs block size to 1024KiB. Also change squashfs fragment cache to 2 for small_flash to ease memory usage. Signed-off-by: Alex Maclean <monkeh@monkeh.net>
* kernel: only optimized for size if small_flashMathias Kresin2018-07-1228-40/+8
| | | | | | | | | | | | | | | | | | | | | | | | Add a new config option to allow to select the default compile optimization level for the kernel. Select the optimization for size by default if the small_flash feature is set. Otherwise "Optimize for performance" is set. Add the small_flash feature flag to all (sub)targets which had the optimization for size in their default kernel config. Remove CC_OPTIMIZE_FOR_* symbols from all kernel configs to apply the new setting. Exceptions to the above are: - lantiq, where the optimization for size is only required for the xway_legacy subtarget but was set for the whole target - mediatek, ramips/mt7620 & ramips/mt76x8 where boards should have plenty of space and an optimization for size doesn't make much sense - rb532, which has 128MByte flash Signed-off-by: Mathias Kresin <dev@kresin.me>
* ar71xx: move boards to tiny subtargetMathias Kresin2018-07-125-35/+36
| | | | | | | Move boards to the tiny subtarget which break the build if the kernel is set to "Optimize for performance". Signed-off-by: Mathias Kresin <dev@kresin.me>
* arc: Update variables substitutions in u-boot env filesEvgeniy Didin2018-07-122-6/+6
| | | | | | | | | | | | | In the latest version of u-boot (2018.05) there was a swith to Hush shell for ARC AXS10x boards(arc770/archs38): commit 9249d74781e1 ("ARC: AXS10x: Enable hush shell"). In Hush shell using "$()" to declare envitonment variables is forbidden, instead of this "${}" need to be used. Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: John Crispin <john@phrozen.org>
* mediatek: Fix memory node for U7623Kristian Evensen2018-07-121-4/+16
| | | | | | | | | | The changed applied to BananaPi R2 in upstream commit c0b0d540db1a, which was backported to 4.14 in 4.14.53, is also required for the U7623. Without updating the memory node, the board refuses to boot. Fixes: d0839e020d0a ("kernel: bump 4.14 to 4.14.53") Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
* ramips: clean up and fix MT7621 NAND driver issuesFelix Fietkau2018-07-111-74/+25
| | | | | | | | | | | | - remove misaligned custom buffer allocation in the NAND driver - remove broken bounce buffer implementation for 16-byte align Let the MTD core take care of both Fixes messages like these: [ 102.820541] Data buffer not 16 bytes aligned: 87daf08c Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: replace bridge port isolate hack with upstream patch backport on 4.14Felix Fietkau2018-07-113-80/+148
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: adjust bridge port isolate patch to match upstream attribute namingFelix Fietkau2018-07-113-24/+9
| | | | | | | | Newer kernels have a patch that implements compatible functionality directly. Adjust the attribute of our own patch in preparation for dropping it later Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: bump 4.14 to 4.14.54Koen Vandeputte2018-07-1125-274/+274
| | | | | | | | | | | | Rereshed all patches Reworked patches to match upstream: 335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch Compile-tested on: cns3xxx, imx6, x86_64 Runtime-tested on: cns3xxx, imx6, x86_64 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bcm47xxpart: fix getting user-space data partition nameRafał Miłecki2018-07-102-2/+4
| | | | | | | | | | | Partition name is picked by a parser_trx_data_part_name(). It has to get correct partition offset (taking care of bad blocks) to work properly. This fixes UBI support for devices that have kernel flashed on partition with a bad block. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ath79: add support for OCEDO RaccoonDavid Bauer2018-07-083-0/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the OCEDO Raccoon SOC: Atheros AR9344 RAM: 128MB FLASH: 16MiB WLAN1: AR9344 2.4 GHz 802.11bgn 2x2 WLAN2: AR9382 5 GHz 802.11an 2x2 INPUT: RESET button LED: Power, LAN, WiFi 2.4, WiFi 5 Serial: Header Next to Black metal shield Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V) The Serial setting is 115200-8-N-1. NOTE: The U-Boot won't boot with the serial attached. Boot the device without serial attached and attach it after 3 seconds. Tested and working: - Ethernet - 2.4 GHz WiFi - 5 GHz WiFi - TFTP boot from ramdisk image - Installation via ramdisk image - OpenWRT sysupgrade - Buttons - LEDs Installation seems to be possible only through booting an OpenWRT ramdisk image. Hold down the reset button while powering on the device. It will load a ramdisk image named 'raccoon-uImage-initramfs-lzma.bin' from 192.168.100.8. Note: depending on the present software, the device might also try to pull a file called 'raccoon-uimage-factory'. Only the name differs, it is still used as a ramdisk image. Wait for the ramdisk image to boot. OpenWRT can be written to the flash via sysupgrade or mtd. Due to the flip-flop bootloader which we not (yet) support, you need to set the partition the bootloader is selecting. It is possible from the initramfs image with > fw_setenv bootcmd run bootcmd_1 Afterwards you can reboot the device. Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: move CONFIG_USB_MTU3 to generic configHauke Mehrtens2018-07-072-1/+1
| | | | | | | | | | | CONFIG_USB_MTU3 is not visible for the mediatek target by default, but only when CONFIG_USB_GADGET is set. This will config option will be remove with when running "make kernel_oldconfig", move this option to the generic config to prevent this. This fixes the build of the mt7623 subtarget of the mediatek target. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: disable some DRM_PANEL config optionsHauke Mehrtens2018-07-071-0/+2
| | | | | | | The modules should not be build by default. This fixes the build of the zynq target. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ath79: disable unused drivers for tiny targetLucian Cristian2018-07-072-8/+8
| | | | | | | | | | | Shrink the tiny kernel by moving all switch and ethernet phy drivers to the generic kernel config instead of the target kernel config. All boards in the tiny and nand target are either ar7240 or ar9331 based, which don't support external xMII and therefore no external ethernet phy can be connected. None of the boards uses a realtek switch either. Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
* ath79: optimize ath79 tiny target for sizeLucian Cristian2018-07-071-0/+2
| | | | | | the speed impact on tiny target is minimal and worth the size gained Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
* ath79: add support for UniFi AC-Mesh ProChristoph Krapp2018-07-076-23/+44
| | | | | | | | | The Unifi AC-Mesh Pro has identical hardware to the Unifi AC-Pro except USB support. Furthermore for setting parameters like antenna gain it is helpful to know the exact device variant. Signed-off-by: Christoph Krapp <achterin@googlemail.com>
* ramips: add support for Blueendless Kimax U35WFAdemar Arvati Filho2018-07-076-3/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | Blueendless Kimax U35WF is a 3,5" HDD Enclosure with Wi-Fi and Ethernet Patch rewritten from: https://forum.openwrt.org/viewtopic.php?id=66908 Based on: https://github.com/lede-project/source/pull/965 Specification: - SoC: MediaTek MT7620N - CPU/Speed: 580 MHz - Flash-Chip: KH25L12835F Spi Flash - Flash size: 16 MiB - RAM: 64 MiB - LAN: 1x 100 Mbps Ethernet - WiFi SoC-integrated: 802.11bgn - 1x USB 2.0 - UART: for serial console Installation: 1. Download sysupgrade.bin 2. Open vendor web interface 3. Choose to upgrade firmware 3. After reboot connect via ethernet at 192.168.1.1 Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
* ar71xx: factor out safe loader image build codeMathias Kresin2018-07-073-60/+44
| | | | | | | | | | Add a template for safeloader images and include it instead of overwriting variables defined in the common tp-link build commands. Split the existing tp-link templates to proper implement the safeloader template. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ar71xx: drop unnecessary LOADER_TYPE variablesMathias Kresin2018-07-071-5/+1
| | | | | | | Drop the LOADER_TYPE variables in case no loader is used at all or move the variable to devices which are using a loader. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ar71xx: get rid of copy-fileMathias Kresin2018-07-071-6/+4
| | | | | | | Use the provided image build variables to point the kernel-bin build command to the kernel we are interested in. Signed-off-by: Mathias Kresin <dev@kresin.me>