Commit Graph

20035 Commits (d157a76c67bcb821d3ec8dcd4312390ef129a95a)

Author SHA1 Message Date
Felix Fietkau b318edb999 ramips: add missing DTS frequency limit for the 5 GHz radio on Archer C20i
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Koen Vandeputte 74738c4b80 imx6: fix DMA transaction errors
Following errors were seen in the past on imx6 when using serial:

[ 22.617622] imx-uart 2020000.serial: DMA transaction error.
[ 22.623228] imx-uart 2020000.serial: DMA transaction error.
[ 22.628826] imx-uart 2020000.serial: DMA transaction error.
[ 22.648951] imx-uart 2020000.serial: DMA transaction error.
[ 22.654558] imx-uart 2020000.serial: DMA transaction error.
[ 22.660156] imx-uart 2020000.serial: DMA transaction error.

Which is the reason why DMA for the serial ports
got disabled in commits:

efb362cd93 ("imx6: disable dma on uart")
3b4241071d ("imx6: disable UART dma")

As indicated on mailinglist discussion, the cause seems to be
the usage of very old SDMA firmware which is present in the soc:

[    0.624302] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[    0.624318] imx-sdma 20ec000.sdma: Falling back to user helper
[   64.531607] imx-sdma 20ec000.sdma: external firmware not found, using ROM firmware

This patch adds the new firmware binary. (2196 bytes)

It is required to embed the binary into the kernel image, as it
gets loaded very early in the boot process where the rootfs is not
available yet:

[    0.622966] imx-sdma 20ec000.sdma: loaded firmware 3.3

Extended testing shows that the DMA errors are not seen anymore
when using this newer firmware version.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
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
David Bauer 5896b146a4 ipq40xx: fix NBG6617 LED mapping
The NBG6617's LEDs are wrongly identified in the 01_leds boardinit
script (board instead of boardname), resulting in referencing
non-existent LEDs in UCI.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Daniel Golle 9bcc08958b oxnas: add console=ttyS0,115200 argument to bootargs
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle cf7896117b oxnas: enable image metadata by setting SUPPORTED_DEVICES
For each board, set the legacy name as well as the new based on the
compatible-string from devicetree.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle ef9b169df0 oxnas: remove stray kernel config symbols
CONFIG_CRYPTO_* shouldn't be set by the target

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle 4f017c871d oxnas: switch to generic board detect
remove /lib/oxnas.sh platform-specific board-detection and use
generic which is based on device-tree compatible node instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Martin Weinelt 0411813c6f
ramips: fix leds on GL.iNet GL-MT300N-V2
The WAN LED now shows the link state. It's color is green,
not blue.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
6 years ago
Christian Lamparter dceee8cc09 ipq-wifi: drop custom board-2.bins
The BDFs for all boards were upstreamed to the ath10k-firmware
repository and linux-firmware.git.

We switched to the upstream board-2.bin, hence the files can be removed
here.

Keep the ipq-wifi package in case new boards are added. It might take
some time till board-2.bins send upstream are merged.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 8b18fce3b8 ipq40xx: nbg6617: switch to upstream boardfile variant
The NBG6617's boardfile was merged and this device can
now switch to the upstream ath10k board-2.bin.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 6840f15a16 ipq40xx: rt-ac58u: replace ubi auto load hack
This patch replaces the custom autoload quirk of the
RT-AC58U with a bootargs-append overwrite.

The vendor's u-boot doesn't leave the bootargs / cmdline alone,
so the it can't be overwritten in any other way right now...
And of course, this will be a lot of fun to deal with once
the device switches to the new spi-nand subsystem.

Signed-off-by: Christian Lamparter <chunkeey@gmail.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
Mathias Kresin 374e646724 ath79: fix PQI Air Pen support
Use the correct dts filename. It has to be <soc>_<manufacturer>_<device>.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
YuheiOKAWA 27eae6597e ath79: add support for PQI Air Pen
SoC: AR9330 (or AR9331 revision?)
Ethernet x1, Wireless 2.4G, uSD card slot x1.
USB Power, include Li-Po Battery.

Flash 8MiB. (factory is dual image)
1. write image is use half 4MiB size from factory.
  write initramfs image to mtd6 and mtd7.
2. change next boot setting. next is mtd6 boot.
  echo -ne "\x01" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0

3. rewrite sysupgrade image.
  change next boot setting. next is mtd4.
  echo -ne "\x00" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0

OEM mtd.
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "ART"
mtd3: 00010000 00010000 "NVRAM"
mtd4: 00140000 00010000 "uImage"
mtd5: 00280000 00010000 "rootfs"
mtd6: 00140000 00010000 "uImage2"
mtd7: 00280000 00010000 "rootfs2"
mtd8: 00010000 00010000 "CONF"

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>
6 years ago
Roger Pueyo Centelles 23f9b2d9a9 ath79: Add support for Ubiquiti LiteAP ac (LAP-120)
This commit adds support for the Ubiquiti LiteAP ac (LAP-120), an outdoor
5 GHz AC access point with an integrated 120° 16 dBi antenna. The device
was previously known as LiteBeam AP ac but was later rebranded.

CPU:    Atheros AR9342 SoC
RAM:    64 MB DDR2
Flash:  16 MB NOR SPI
Ports:  1 GbE port (PoE in)
WLAN:   5 GHz QCA899X (PCI)

The integrated QCA899X is a Ubiquiti branded part with modified vendor
and product id (0777:11ac9). It is very similar to the NanoStation loco
AC, except for the 2.4 GHz management radio (missing here).

Installation procedure is the same as the NanoStation [loco] AC:

1. Connect to serial header on device
2. Power on device and enter uboot console
3. Set up tftp server serving an openwrt initramfs build
4. Load initramfs build using the command tftpboot in the uboot cli
5. Boot the loaded image using the command bootm
6. Copy squashfs openwrt sysupgrade build to the booted device
7. Use mtd to write sysupgrade to partition "firmware"
8. Reboot and enjoy

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
6 years ago
Koen Vandeputte 5f298b95a1 kernel: add missing symbol for target bcm53xx
Fixes: ca88f4153f ("kernel: bump 4.14 to 4.14.77")

Reported-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Rafał Miłecki 9b385b2496 bcm53xx: use upstream SPI controller fix
This just moves patch to use 0xx prefix and includes maintainer's s-o-b.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Koen Vandeputte bc3d47cd12 kernel: bump 4.14 to 4.14.78
Refreshed all patches.

Remove upstreamed:
- 050-net-emac-fix-fixed-link-setup-for-the-RTL8363SB-swit.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 9c42391c0d kernel: bump 4.9 to 4.9.135
Refreshed all patches.

Fixes:
- CVE-2018-10883

Compile-tested on: ar71xx, layerscape
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Ryan Mounce 4d2613b01a mpc85xx: workaround 4.14 cross compile issue
Regression introduced with 4.10 by 43c9127d94d62a232ed33ed2eab8a08657ce5472

Build will fail if system 'ar' does not support deterministic builds.
e.g. macOS with Xcode toolchain

Appears to be fixed upstream in 4.18 by af3901cbbd3de182aafb8ee553c825c0074df6a2

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
6 years ago
Christian Lamparter fc70276e6c apm821xx: add disk-activity triggers via DT.
The WNDR4700 and the MBL have a dedicated HDD activity LED.
This patch adds the default led triggers to the DTS and
removes the entries in 01_leds.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 1d5d77612f apm821xx: apm82181.dtsi overhaul
- order entries by mmio address where possible

 - switch to lower-case address values

 - comment on BSP u-boot behaviour in regards to
   what it edits and look for

 - annotate irq lines with the help of interrupt-names

 - remove deprecated "device_type" properties
   The pci and network device_type had to stay since
   they are required by the drivers and u-boot.
   the cpu and memory device_types will remain as well
   as they are still part of the DT Spec.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 9ca82c2374 apm821xx: force WNDR4700 console to 115200n8
With the upcoming 4.19 release, the serial console on the
Netgear WNDR4700 would no longer work as it is never really
set and always relied on the kernel's serial code not to
change the baud rate.

On the stock firmware, Netgear forced the console setting
through a custom CONFIG_CMDLINE in their kernel to 115200.
Normally, they should have done it in a different way and
just passed the baudrate through a "console=..." kernel
parameter via the bootargs in the "/chosen" dt node.
But in their default u-boot bootcmd setting, they somehow
forgot to add the "run addtty", so there's no easy way to
pass the baudrate from u-boot to the kernel. So it has
to be forced as otherwise it ends up as 9600 baud.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Christian Lamparter 68bb91018d apm821xx: set uart compatible to ns16750
The APM821XX/PPC460EX datasheet mentions:
"Register compatibility with 16750 register set"

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years ago
Linus Walleij f280bd7fa8 gemini: Fix up image generation
I noticed that the image generator for the Gemini generates
some 10+ MB files for the second (application) partition.
This is just wrong. The first 6144K partition named initramfs
easily fits OpenWRTs squashfs,jffs2 overlayed partitions
with nice headroom for storing configuration files.

Generate a blank partition for the hddapp.tgz file and delete
it after generating the firmware image - when performing
updates manually you just want the "rd.z" file around
anyways.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years ago
Linus Walleij 10ec966f7b gemini: Break out USB to packages
This creates a new kernel package for the fotg210 host
controller and uses that with the gemini to shrink the
kernel. The SQ201 needs the USB2 PCI package as well.

The build system required me to make kernel_oldconfig
beofore it would build without errors so some minor
unrelated Kconfig entries are changed.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years ago
Baptiste Jonglez b2c68ceea7 kernel: Add support for Winbond w25q128jv SPI NOR flash
Newer batches of several Mikrotik boards contain this yet-unsupported
flash chip, for instance:

- rb941-2nd (hAP lite)
- rb952ui-5ac2nd (hAP ac lite)
- RBM33G

and probably other Mikrotik boards need this patch as well.

The patch was submitted upstream by Robert Marko: https://patchwork.ozlabs.org/patch/934181/

Closes: FS#1715
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Cc: Robert Marko <robimarko@gmail.com>
6 years ago
Koen Vandeputte ca88f4153f kernel: bump 4.14 to 4.14.77
Refreshed all patches.

Altered patches:
- 666-Add-support-for-MAP-E-FMRs-mesh-mode.patch

New symbol for arm targets:
- HARDEN_BRANCH_PREDICTOR

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

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

Compile-tested on: ar71xx, layerscape
Runtime-tested on: ar71xx

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 0d0bd8e6da kernel: bump 4.14 to 4.14.76
Refreshed all patches.

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

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

Compile-tested on: ar71xx, layerscape
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Koen Vandeputte 912340033a kernel: bump 3.18 to 3.18.124
Refreshed all patches.

Compile-tested: adm5120
Runtime-tested: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Felix Fietkau d251a11f60 ramips: refresh mt7621 kernel config
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau e34ea1b4ff kernel: add CONFIG_CC_OPTIMIZE_FOR_* to the default config
Avoid repeating them in the target config, they are overwritten by
top-level menuconfig anyway

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Rafał Miłecki f00cb94f7c bcm53xx: add pending pinctrl driver
It's required to support devices using adjustable SoC pins for some
specific purpose (e.g. I2C, PWM, UART1).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Rafał Miłecki 92de28b751 bcm53xx: replace SPI revert with a fix sent upstream
Instead of reverting whole commit it's enough to just revert a single
line change. It seems the real problem with the regressing commit was a
bump of read chunk size. Switching back to 256 B chunks is enough to fix
the problem/regression.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
6 years ago
Magnus Kroken ba826ce4e7 mpc85xx: remove kernel 4.9 support
Signed-off-by: Magnus Kroken <mkroken@gmail.com>
6 years ago
Magnus Kroken 650806d83a mpc85xx: switch to kernel 4.14
Signed-off-by: Magnus Kroken <mkroken@gmail.com>
6 years ago
Magnus Kroken c83c180489 mpc85xx: add kernel 4.14 support
Based on patches previously submitted by Achim Gottinger:
http://lists.infradead.org/pipermail/openwrt-devel/2018-June/012719.html

Tested on TP-Link TL-WDR4900 v1.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
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