Commit Graph

3681 Commits (be2b61e4f1ec1e351733bebb7105629599034639)

Author SHA1 Message Date
Koen Vandeputte 206bebcad4 kernel: bump 4.14 to 4.14.97
Refreshed all patches.

Adapted patches:
- 012-kbuild-add-macro-for-controlling-warnings-to-linux-c.patch

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Jo-Philipp Wich 19850b639e ar71xx: fix packed-not-aligned error with GCC 8.
Building ar71xx currently fails with:

    In file included from ./include/linux/ipv6.h:5,
                     from ./include/net/ipv6.h:16,
                     from ./include/net/inetpeer.h:16,
                     from ./include/net/ip_fib.h:24,
                     from ./include/net/switchdev.h:17,
                     from ./include/net/dsa.h:23,
                     from arch/mips/ath79/dev-dsa.h:15,
                     from arch/mips/ath79/dev-dsa.c:17:
    ./include/uapi/linux/ipv6.h:107:1: error: alignment 1 of 'struct ipv6_destopt_hao' is less than 2 [-Werror=packed-not-aligned]
     } __attribute__((packed));

Address this issue by correcting the alignment of the struct packing
pragma accordingly.

Fixes: FS#1805
Reported-by: Pascal Ernster <git@hardfalcon.net>
[reword subject, rewrap commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
David Santamaría Rogado 4bcf581352 ar71xx: use correct wan mac address for the TP-Link Archer C7 v4
The correct MAC address for this device is lan_mac +1, there is no
need to set lan_mac so use base_mac variable instead lan_mac.

Based on this PR for ath79:
https://github.com/openwrt/openwrt/pull/1726

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
[fix alphabetical ordering, reword subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Koen Vandeputte 3662157d8b kernel: bump 4.14 to 4.14.96
Refreshed all patches.

Remove upstreamed patches:
- 142-jffs2-Fix-use-of-uninitialized-delayed_work-lockdep-.patch

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 528508ae8b kernel: bump 4.14 to 4.14.95
Refreshed all patches.

Removed superseded patches:
- 0400-Revert-MIPS-smp-mt-Use-CPU-interrupt-controller-IPI-.patch

Compile-tested on: ar71xx, cns3xxx, imx6, lantiq (xrx200, AVM 3370), x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6, lantiq (xrx200, AVM 3370)

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Mathias Kresin <dev@kresin.me>
Tested-by: Robert Resch <openwrt@webnmail.de>
5 years ago
Milan Krstic 39ede7bc67 ar71xx: ag71xx: preserve port mirror flags during swconfig apply
The swconfig load operation always triggers 'apply' function which in
this driver currently clears port mirroring flags effectively undoing
port mirroring configuration.

This fix preserves port mirroring flags during apply.

Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
5 years ago
Mathias Kresin fd35c5b205 build: move seama commands to image-commands.mk
Move it to image-commands.mk to get rid of duplicate recipes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin de42466528 ar71xx: sync seama image build code with ramips
Use the same syntax as used in the ramips target, to use common seama
recipes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Daniel F. Dickinson 99c81eab78 ar71xx: Fix PowerCloud CR5000 5GHz wifi mac
Without this patch PowerCloud CR5000 AR9382 PCIe 5GHz Wifi uses
the mac address from eeprom instead the one specified when
initializing the PCIe chip.  There were two issues:

1) ap94_pci_init on the second PCIe wmac is wrong as there is only one
PCIe wmac on this device (the other wmac is the AR1022/AR9342 SoC wmac).
2) Without specifying pdata->use_eeprom there is a failure to load
firmware and caldata.

Thanks to Christian Lamparter (@chunkeey) for the heavy lifting and
help. [0]

[0] <https://github.com/openwrt/openwrt/pull/1613>

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
5 years ago
Mathias Kresin ffdce856e0 build: move append-string to image-commands.mk
Move it to image-commands.mk so that it can used by other targets.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Christian Lamparter f54ac91ef5 ar71xx/ath79: switch devices to the -ct driver and firmware
Since commit 61b5b4971e ("mac80211: make ath10k-ct the default ath10k")
select ath10k-ct and the -ct firmwares by default.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Petr Štetiar 22f9afa118 ar71xx: ag71xx: Replace duplicate debugging code with simple function call
ag71xx_dump_regs is used in code several times, and is providing same
output.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Romain MARIADASSOU 02494fa35c
Add support for TL-WA801ND v4
This add support for TP-Link TL-WA801ND v4 (same as TL-WA801ND v3) :

Specification:

- System-On-Chip: Qualcomm Atheros QCA9533
- CPU/Speed: 650 MHz
- Flash-Chip: Winbond W25Q32BVSIG
- Flash size: 4096 KiB
- RAM: 32 MiB
- Wireless No1: SoC-integrated: QCA9533 2.4GHz 802.11bgn

Flash instructions:

1) To flash the image, rename the file
   openwrt-ar71xx-generic-tl-wa801nd-v4-squashfs-factory.bin
   to firmware.bin
2) Connect your device to the LAN port, then upload the firmware
   through web interface. It will try to download the image and
   flash it.

It can take up to 2-3 minutes to finish. When it reaches 100%, the
router will reboot itself.

Signed-off-by: Romain MARIADASSOU <roms2000@free.fr>
6 years ago
Daniel Halmschlager 99e212171a ar71xx: Add usb drivers in Archer C7 v4/v5 images
This commit adds the default usb packages
- kmod-usb-core
- kmod-usb2
- kmod-usb-ledtrig-usbport
for Archer C7 v4 and v5.
(The C7 v5 configuration is based on the v4, therefore the change for v4
also applies for v5.)

Signed-off-by: Daniel Halmschlager <dh@dev.halms.at>
6 years ago
INAGAKI Hiroshi 879f2ef7c0 ath79: modify mtd partitions for Buffalo BHR-4GRV2
This commit modifies mtd partitions define for Buffalo BHR-4GRV2 and
move it to generic subtarget.

In Buffalo BHR-4GRV2, "kernel" partition is located behined "rootfs"
partition in the stock firmware. This causes the size of the kernel
to be limited by the fixed value.

0x50000                       0xe80000        0xff0000
  +-------------------------------+--------------+
  |            rootfs             |    kernel    |
  |           (14528k)            |    (1472k)   |
  +-------------------------------+--------------+

After ar71xx was updated to Kernel 4.14, the kernel size of BHR-4GRV2
exceeded the limit, and it breaks builds on official buildbot.
Since this issue was also confirmed in ath79, I modified the mtd
partitions to get rid of that limitation.

0x50000                                       0xff0000
  +----------------------------------------------+
  |                   firmware                   |
  |                   (16000k)                   |
  +----------------------------------------------+

However, this commit breaks compatibility with ar71xx firmware, so I
dropped "SUPPORTED_DEVICES += bhr-4grv2".

This commit requires new flash instruction instead of the old one.

Flash instruction using initramfs image:

1. Connect the computer to the LAN port of BHR-4GRV2
2. Set the IP address of the computer to 192.168.12.10
3. Rename the OpenWrt initramfs image to
"bhr4grv2-uImage-initramfs-gzip.bin" and place it into the TFTP
directory
4. Start the tftp server on the computer
5. While holding down the "ECO" button, connect power cable to
BHR-4GRV2 and turn on it
6. Flashing (orange) diag LED and release the finger from the button,
BHR-4GRV2 downloads the intiramfs image from TFTP server and boot
with it
7. On the initramfs image, create "/etc/fw_env.config" file with
following contents
  /dev/mtd1 0x0 0x10000 0x10000
8. Execute following commands to add environment variables for
u-boot
  fw_setenv ipaddr 192.168.12.1
  fw_setenv serverip 192.168.12.10
  fw_setenv ethaddr 00:aa:bb:cc:dd:ee
  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
9. Perform sysupgrade with squashfs-sysupgrade image
10. Wait ~150 seconds to complete flashing

And this commit includes small fix; BHR-4GRV2 has QCA9557 as a SoC,
not QCA9558.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Sergey Ryazanov 8baad26d01 ar71xx: fix RouterBOARD Power LED default state
RouterBOARD(s) bootloader actully turns Power LED off just before
it starts the kernel. So we need to set the LED default status to On
instead of Keep in order to keep LED on during kernel boot.

This change fixes Power LED off during the kernel boot on the RB91x and
SXT Lite boards.

Fixes: 6cad8ee0bd ("ar71xx: keep the RouterBOARD Power LED in On state")

CC: Mathias Kresin <dev@kresin.me>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Christoph Krapp 987b961537 ar71xx: add support for UniFi-AC-Mesh-Pro
This adds the build option for UniFi AC Mesh Pro as well as
model detection for it.
The device is a hardware clone of the AC Pro.

- SoC: QCA9563-AL3A (775Mhz)
- RAM: 128MiB
- Flash: 16MiB - dual firmware partitions!
- LAN: 2x 1000M - POE+
- Wireless:
        2.4G: QCA9563
          5G: UniFi Chip, QCA988X compatible

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
6 years ago
Rinki Kumari dd02a19ff5
ar71xx: fix TP-Link Archer C7 v5 switch LEDs
Signed-off-by: Rinki Kumari <rinki13@gmail.com>
6 years ago
Pau Escrich 15f16bf05b ar71xx: add support for Gainstrong MiniBox V3.2
Adds MiniBox V3.2 ar71xx target (QCA99531 + QCA9887)
Info: http://oolite.cn/minibox-v3-2-qca9531-qca9887-module-pin-specification.html
Reference patch: http://oolite.cn/wp-content/uploads/2017/09/minibox_v3_cc15.05_20160325.patch
Installation: Upload firmware to uboot via HTTP at 192.168.1.1 (press button for 5 seconds)

Signed-off-by: Pau Escrich <p4u@dabax.net>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(daniel@makrotopia.org: rebased and fixed conflicts, fixed LED name,
                        added ath10k eeprom)
6 years ago
Koen Vandeputte 860de2e1aa ar71xx: disable some tiny targets with kernel 4.14
The bump to kernel 4.14 caused a massive increase in kernel size.

For most targets, switching them to dynamic partitioning allowed
to cope with this.

On some targets, the kernel partition is located behind the rootfs,
which disallows switching to dynamic partitioning as the boot location
would be altered, requiring a u-boot change.

Also within the tiny section, which disables kernel symbols etc
to decrease the image size,  the partition size is still too small.

Disable these targets for now, fixing image generation:

- Buffalo BHR-4GRV2
- Zbtlink ZBT-WE1526

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte c764b2b531 kernel: bump 4.14 to 4.14.79
Refreshed all patches.

Compile-tested on: ar71xx, cns3xxx, imx6, x86_64
Runtime-tested on: ar71xx, cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 162e016fed ar71xx: expand kernel size for ubnt targets
Kernel 4.14 is pretty large causing a build error as the partition is too small.
Expand the kernel partition a bit to make it fit.

* ubnt-uap-pro
* ubnt-unifi-outdoor-plus

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte d6b63f1698 ar71xx: disable ap91-5g due to kernel size
This target causes a build failure as the kernel image does not fit
into the kernel partition.

As the kernel is located behind the rootfs, it cannot be enlarged
as the boot entry location would get altered.

Disable this target for now.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 7c78be1b74 ar71xx: switch more targets to dynamic partitioning
Targets:
- TP-LINK ER355
- TP-LINK C25 V1
- TP-LINK C59 V1
- TP-LINK C7 V4
- TP-LINK C7 V5

Fixes build issues seen due to the kernel being too big

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Radek Dostál 9d35b68776 ar71xx: switch TP-Link RE450 v1 to dynamic partitioning
As mentioned in commit 5f24933 recent changes on ar71xx (switch to 4.14,
memory compaction, ...) cause an increase in kernel size, making it too
big for RE450.

RE450 images were not build due to the following error message:
os-image partition too big (more than 1572864 bytes): Success

Tested on RE450, device boots and was used to send this patch.

Reported-by: Enrico Mioso <mrkiko.rs@gmail.com>
Suggested-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Radek Dostál <rd@radekdostal.com>
[rewrote commit msg keeping it tight + fixed SoB lines]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
David Bauer f89fc43a50 ar71xx: move OCEDO Koala to generic and use dynamic partitioning
This changes the OCEDO Koala flash-layout to a unified firmware
partition, thus making the ar71xx-generic kernel fit in flash.

Compile and runtested on OCEDO Koala.

Signed-off-by: David Bauer <mail@david-bauer.net>
[small title reword]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Fabio Bettoni ddc11c3932 ar71xx/ath79: fix mtd corruption
In commit fec8fe8069 ("kernel: bump 4.9 to 4.9.116") [1], the following patch for removed:
- 403-mtd_fix_cfi_cmdset_0002_status_check.patch

This patch contained fixes for both write and erase functions.

While the chip-detects for erase got fixed upstream [2],
some modifications are still required, even with the fixes applied.

While at it, also apply the same fix for target ath79,
which suffers the same issue.

Not doing so results in following errors seen:

Collected errors:
 * pkg_write_filelist: Failed to open //usr/lib/opkg/info/luci-lib-ip.list: I/O error.
 * opkg_install_pkg: Failed to extract data files for luci-lib-ip. Package debris may remain!
 * opkg_install_cmd: Cannot install package luci-ssl.
 * opkg_conf_write_status_files: Can't open status file //usr/lib/opkg/status: I/O error.

[    0.780920] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    8.406396] jffs2: notice: (415) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    8.423476] mount_root: switching to jffs2 overlay
[  270.902671] jffs2: Write of 1989 bytes at 0x005ce6f8 failed. returned -5, retlen 962
[  270.931965] jffs2: Write of 1989 bytes at 0x005ceec0 failed. returned -5, retlen 0
[  270.939631] jffs2: Not marking the space at 0x005ceec0 as dirty because the flash driver returned retlen zero
[  270.950397] jffs2: Write of 68 bytes at 0x005ceec0 failed. returned -5, retlen 0
[  270.957838] jffs2: Not marking the space at 0x005ceec0 as dirty because the flash driver returned retlen zero
[  270.968584] jffs2: Write of 68 bytes at 0x005ceec0 failed. returned -5, retlen 0
[  270.976027] jffs2: Not marking the space at 0x005ceec0 as dirty because the flash driver returned retlen zero
[  270.986735] jffs2: Write of 68 bytes at 0x005ceec0 failed. returned -5, retlen 0
[  270.994225] jffs2: Not marking the space at 0x005ceec0 as dirty because the flash driver returned retlen zero

[1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=fec8fe806963c96a6506c2aebc3572d3a11f285f
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.9.133&id=a0239d83e1cb60de5e78452d4708c083b9e3dcbe

Fixes: fec8fe8069 ("kernel: bump 4.9 to 4.9.116")
Signed-off-by: Fabio Bettoni <fbettoni@gmail.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 5f24933309 ar71xx: Move some targets to tiny
Recent changes on ar71xx (switch to 4.14, memory compaction, ...) cause
an increase in kernel size, making it too big for some devices.

Move these devices to the tiny target, where kernel symbols and
optimization for speed are disabled, reducing the kernel size.

Devices:
- EnGenius ENS202EXT
- OCEDO Koala

Compile-tested targets:

- ar71xx->generic->default
- ar71xx->smallFlash->Default

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Mathias Kresin 80c61c161a treewide: use wpad-basic for not small flash targets
Add out of the box support for 802.11r and 802.11w to all targets not
suffering from small flash.

Signed-off-by: Mathias Kresin <dev@kresin.me>

Mathias did all the heavy lifting on this, but I'm the one who should
get shouted at for committing.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Koen Vandeputte 13f283198e ar71xx: remove linux 4.9 support
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 77d004de6d ar71xx: switch to kernel 4.14
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Sven Eckelmann c383e0c979 ar71xx: Create /var/lock directory in platform_do_upgrade_*
The sysupgrade_pre_upgrade hook was removed with 5e1b4c57de ("base-files:
drop fwtool_pre_upgrade") while there were still scripts using it:

* target/linux/ar71xx/base-files/lib/upgrade/allnet.sh
* target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
* target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh

Not running the hooks can either prevent a successful upgrade or brick the
device because the fw_setenv program cannot be started correctly.

Instead of adding this hook again, the directory /var/lock for fw_setenv
can also just be created directly before fw_setenv is called.

Fixes: 5e1b4c57de ("base-files: drop fwtool_pre_upgrade")
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
Sven Eckelmann 11d51276b1 ar71xx: Use sysupgrade's RAMFS_COPY_* for fw_(set|print)env
The install_bin from /lib/upgrade/common.sh is no longer creating the
symlinks when a secondary parameter is added. But the fw_setenv program was
always copied this way to the ramdisk for the upgrade.

Instead, this should be done using RAMFS_COPY_* like on all other
platforms.

Fixes: 438dcbfe74 ("base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN")
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years ago
Koen Vandeputte 3b53d6fdbc ar71xx: fix pci irq init on kernel 4.14
The IRQ init structs are marked as __initconst which
means this memory can be free after init.

On this platform, the PCI IRQ init happens very late _after_ the
kernel already freed the memory allocated for these structs.

During IRQ allocation, the allocation function is passed
with invalid data at this point leading to following error:

[    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0
[    2.382828] Freeing unused kernel memory: 264K
[   34.414816] pci 0000:00:00.0: no irq found for pin 1

and

[    0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
[    2.125401] Freeing unused kernel memory: 284K
[    9.526479] pci 0000:00:00.0: no irq found for pin 1

After this patch:

[   14.960814] pci 0000:00:00.0: using irq 40 for pin 1

Commit 318e19ba67 ("ar71xx: add v4.14 support") fixed this for the
default targets already present in the source by default but forgot
to remove the __initconst attribute for targets QCA953x and QCA956x
which are only added later through platform patches.

Fixes: 318e19ba67 ("ar71xx: add v4.14 support")

Reported-by: Sven Schönhoff <sven.schoenhoff@gmail.com>
Reported-by: Dirk Brenken <dev@brenken.org>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Dirk Brenken <dev@brenken.org>
6 years ago
Koen Vandeputte 7bfe757bc4 kernel: bump 4.14 to 4.14.73
Refreshed all patches.

Removed upstreamed:
- 192-Revert-ubifs-xattr-Don-t-operate-on-deleted-inodes.patch

Compile-tested on: cns3xxx, imx6, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 00f1dc55e8 kernel: bump 4.9 to 4.9.130
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
John Crispin 61b5b4971e mac80211: make ath10k-ct the default ath10k
We select ath10k-ct by default, but it is still possible to build
the upstream version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Koen Vandeputte e9d92bf1e1 kernel: bump 4.14 to 4.14.72
Refreshed all patches.

Removed upstreamed:
- 203-MIPS-ath79-fix-restart.patch
- 0013-MIPS-ath79-fix-system-restart.patch
- 180-earlycon-initialize-port-uartclk-based-on-clock-frequency-property.patch
- 181-earlycon-remove-hardcoded-port-uartclk-initialization-in-of_setup_earlycon. patch
- 700-1-6-e1000e-Remove-Other-from-EIAC.patch
- 700-2-6-Partial-revert-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch
- 700-3-6-e1000e-Fix-queue-interrupt-re-raising-in-Other-interrupt.patch
- 700-4-6-e1000e-Avoid-missed-interrupts-following-ICR-read.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 3caf940cc6 kernel: bump 4.9 to 4.9.129
Refreshed all patches.

Removed upstreamed:
- 203-MIPS-ath79-fix-restart.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
David Bauer cd02d4faf9 ar71xx: flag FritzBox 4020 buttons as active low
Buttons of AVM FritzBox 4020 are incorrectly flagged as active high.

This was an oversight as RFKill button was working as expected even
with incorrectly flagged GPIO.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Koen Vandeputte 0dbdb476f3 kernel: bump 4.14 to 4.14.71
Refreshed all patches.

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 42f158314e ar71xx: fix switch probing on kernel 4.14
The bump to 4.14 changed the way mdio probes behind switches.

While the board_info is added to the list, the code that actually inserted
the list info into the phydev structure was missing.

This resulted in non-working ethernet ports.

Re-add it to fix switch probing.
This mimics the exact behaviour as it was in kernel 4.9.

Before:

[    1.066007] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    1.073409] Atheros AR8216/AR8236/AR8316: probe of ag71xx-mdio.0:00 failed with error -22
[    1.102455] libphy: ag71xx_mdio: probed
[    1.737938] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Generic PHY]
[    1.747994] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.377642] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.429938] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII

After:

[   11.163357] libphy: Fixed MDIO Bus: probed
[   11.319898] libphy: ag71xx_mdio: probed
[   11.360844] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[   12.447398] libphy: ag71xx_mdio: probed
[   13.077402] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[   13.088989] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[   13.717716] ag71xx-mdio.1: Found an AR934X built-in switch
[   13.769990] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 079871983c kernel: bump 4.14 to 4.14.68
Refreshed all patches.

Remove upstream accepted:
- 330-Revert-MIPS-BCM47XX-Enable-74K-Core-ExternalSync-for.patch

Altered:
- 303-v4.16-netfilter-nf_tables-remove-multihook-chains-and-fami.patch
- 308-mips32r2_tune.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 01793e8752 kernel: bump 4.14 to 4.14.67
Refreshed all patches.

Removed upstreamed patches:
- 037-v4.18-0008-ARM-dts-BCM5301x-Fix-i2c-controller-interrupt-type.patch

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 22f899c6dd kernel: bump 4.9 to 4.9.124
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
David Bauer 8e9a59a6b9 build: add mkrasimage
The current make-ras.sh image generation script for the ZyXEL NBG6617
has portability issues with bash. Because of this, factory images are
currently not built correctly by the OpenWRT buildbots.

This commit replaces the make-ras.sh by C-written mkrasimage.

The new mkrasimage is also compatible with other ZyXEL devices using
the ras image-format.
This is not tested with the NBG6616 but it correctly builds the
header for ZyXEL factory image.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Michal Cieslakiewicz 2e3e0fd94c ar71xx: WNR612v2: fix kernel panic due to wrong Wifi LED init
Netgear WNR612v2 flashed with recent OpenWrt builds suffers from kernel
panic at boot during wireless chip initialization, making device
unusable:

 ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
 ath: phy0: Enable LNA combining
 CPU 0 Unable to handle kernel paging request at virtual address 1000fee1, epc == 801d08f0, ra == 801d0d90
 Oops[#1]:
 CPU: 0 PID: 469 Comm: kmodloader Not tainted 4.9.120 #0
 [ ... register dump etc ... ]
 Kernel panic - not syncing: Fatal exception
 Rebooting in 1 seconds..

This simple patch fixes above error. It keeps LED table in memory after
kernel init phase for ath9k driver to operate correctly (__initdata
removed).

Also, another bug is fixed - correct array size is provided to function
that adds platform LEDs (this device has only 1 connected to Wifi chip)
preventing code from going outside array bounds.

Fixes: 1f5ea4eae4 ("ar71xx: add correct named default wireless led by using platform leds")

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
[trimmed commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Matthias Schiffer a4f4ddba61
ar71xx/generic: enable Zyxel NBG6616 in kernel config again
The NBG6616 shares a config symbol with the NBG6716. It was accidentally
removed from the config when the ar71xx-tiny target was split off.

Fixes: 0cd5e85e7a ("ar71xx: create new ar71xx/tiny subtarget for 4MB flash devices")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Koen Vandeputte 6100655c8c ar71xx: fix typo in rb91x nand source
Fixes: 3b1ea0996f ("ar71xx: fix build error due to bad include")

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 6b4ba118ac kernel: bump 4.14 to 4.14.66
Refreshed all patches

Compile-tested on: cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago