Commit Graph

20976 Commits (33b81b572148e2de52fbcb986e238c2efbd1939f)

Author SHA1 Message Date
Koen Vandeputte 762361a79c brcm63xx: remove kernel 4.9 support
This target got bumped to 4.14 a long time ago
in commit: 2308b87204

Remove all leftover 4.9 files.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Hauke Mehrtens 655fff1571 kernel: Fix build of omap target
CONFIG_HW_RANDOM_OMAP is not set to any value after kmod-random-omap was
removed, add the configuration option to the generic configuration.

Fixes: cd3b298533 ("omap24xx: Remove unmaintained target")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Tomasz Maciej Nowak de3387654b mvebu: add images for additional ESPRESSObin boards
This commit adds support for different iterations of ESPRESSObin.
The added variants are:

ESPRESSObin with soldered eMMC,

ESPRESSObin V7, compared to V5 some passive elements changed and ethernet
ports labels positions have been reversed,

ESPRESSObin V7 with soldered eMMC.

Please refer to:
584d7c5 ("mvebu: new subtarget cortex A53")
for instruction how to boot OpenWrt image placed on SD card. It is
advised for owners of V5 and previous with bootloader based on U-Boot
2015.01, to upgrade the latest version available at:
http://espressobin.net/tech-spec.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak ee96fa15b1 mvebu: use device-tree board detection
Convert whole target to Device Tree based board detection instead of
identifying devices by dts file name. With this we can drop mvebu.sh
translation script and rely on common method for model detection.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak a39d2a8053 mvebu: align device names to vendor_device format
Add vendors in device names and also rename few device names, for easier
identyfying potential firmware to flash. The vendor and device string is
mainly derived from model/compatipble string in dts from particular
device, but since not all devices are well described, some of the renames
follow marketing names.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak 30b5554411 mvebu: image: don't create unnecessarily shell variables
Use make syntax to pass the U-Boot image location and boot with root
partitions size, instead of relying on shell functions and variables.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak 9509a6df0b mvebu: image: improve readability of device recipes
Drop overly complex amount of defines wich are referenced in the same
devices pool and move image recipes to common define, since devices not
using them overwrite it.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak fb005d688e mvebu: image: introduce BOOT_SCRIPT variable
All of U-Boot scripts repeat the same pattern with only Device Tree blob
name changing for respective device. Therefore create generic scripts
which will be altered on demad by image build process, and create
BOOT_SCRIPT variable which can be added to device recipe and will allow
referencing the same script by many device recipes. This will allow to
slim down the ammount of files in buildroot tree and avoid needlessly
incrementing amount of boot scripts if new devices will be added.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak ef384c68e7 mvebu: image: stack repeated variables
All of arm64 devices have part of variables repeatedly defined. Stack
them to common define, and reference it in each device recipe.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Tomasz Maciej Nowak f0c2bac252 mvebu: remove unnecessary code building dtbs
Even if dts is not included in upstream Makefile, it is built anyway by
recipe specified in include/image.mk. Also remove Build/dtb, it's not
used since 3f72f3a ("mvebu: clearfog: include DTB for all variants in
image").

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Jeff Kletsky 3bc8ed91d4 generic-4.19: Backport spi-nand support for GigaDevice A/E
This patch backports verbatim the commits from Linux 5.0 and 5.1
that implemented support for GigaDevice SPI NAND A and E variants.

Supported only in Linux 4.19 and later as based on the upstream
drivers/mtd/nand/spi/ framework.

mtd-spinand-add-support-for-GigaDevice-GD5FxGQ4xA.patch
commit c93c613214ac (5.0)

mtd-spinand-Add-support-for-GigaDevice-GD5F1GQ4UExxG.patch
commit c40c7a990a46 (5.1)

Run-tested-on: GL.iNet AR750S

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years ago
Hauke Mehrtens 747587ec61 kernel: Reorder generic configuration
This was done like this:
./scripts/kconfig.pl '+' target/linux/generic/config-4.14 /dev/null > target/linux/generic/config-4.14-new
mv target/linux/generic/config-4.14-new target/linux/generic/config-4.14

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 87ac3e801d gemini: Make kernel text and rodata read-only
This is activate for all other targets except gemini, also activate it
there.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens f7426b13fa cns3xxx: Activate CONFIG_CPU_SW_DOMAIN_PAN
This is already activated for all other ARM targets

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 2164a7bf15 x86: Activate CONFIG_X86_SMAP
This activates "Supervisor Mode Access Prevention". modern CPUs will
prevent the kernel code from accessing any data from the userspace
without the usage of copy_to_user() or copy_from_user()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 75eb8a146d kernel: Deactivate CONFIG_BINFMT_MISC
CONFIG_BINFMT_MISC allows it to add support for new executable formats
to the kernel from user space, the kernel will then detect for example a
java binary and call the java execution program automatically. I am not
aware that this feature is used in OpenWrt and this could be used to
exploit something. Deactivate it for all targets for now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens d4ad7e6548 kernel: Do not set CONFIG_DEVMEM or CONFIG_DEVKMEM
This is deactivated by default and should be manually activated in the
OpenWrt kernel configuration

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 57ec21ef3d kernel: Activate CONFIG_SYN_COOKIES for all targets
Some targets deactivated CONFIG_SYN_COOKIES, for unknown reasons, use
the default setting from the generic configuration which activates
CONFIG_SYN_COOKIES.

This should prevent SYN flooding.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 46af22de16 kernel: Remove CONFIG_COMPAT
This removes support for executing old 32 bit applications on 64 bit ARM
and MIPS kernels.
On OpenWrt we normally compile all the user space applications on our
own and do not support third party binary only modules especial not 32
bit applications on 64 bit CPUs.

This reduces the attack surface on such systems and should also save
some memory.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 7099bf0926 kernel: Remove CONFIG_DEBUG_RODATA and CONFIG_DEBUG_SET_MODULE_RONX
These were renamed to CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX and are
activated in kernel 4.14 and later by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 32eb66881c kernel: Activate CONFIG_ARM64_SW_TTBR0_PAN
This activates "Emulate Privileged Access Never using TTBR0_EL1
switching" on ARM64.

This should prevent the kernel from reading code from user space in
kernel context.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 9b1239451d Kernel: Activate CONFIG_HARDENED_USERCOPY
This adds additional checks to the copy_from_user() and copy_to_user()
functions. The details are described in this article:
https://lwn.net/Articles/695991/

This should only have a very small performance impact on system calls
and should not affect routing performance.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Adrian Schmutzler d8ec6dee49 ath79: Add missing read-only properties
Add some read-only properties to protect partitions from
accidental changes.

Also fixed two whitespaces error on the way.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
David Bauer a4dc519888 ramips: fix R6120 factory image
The factory firmware omits the JFFS2 end-marker while flashing via
web-interface. Add a 64k padding after the marker fixes this problem.

When the end-marker is not present, OpenWRT won't save the overlayfs
after initial flash.

Reported-by: Andreas Ziegler <dev@andreas-ziegler.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Klaus Kudielka 0a11c87e46 mvebu: fix board_name condition in 79_move_config
The correct board_name for the Turris Omnia is armada-385-turris-omnia.

Fixes: 4e8345ff68 ("mvebu: base-files: autodetect upgrade device")
Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
5 years ago
Klaus Kudielka ad62247800 base-files: improve lib/upgrade/common.sh
Recently, upgrade device autodetection has been added to the mvebu target.
This exposes some shortcomings of the generic export_bootdevice function,
e.g. on the Turris Omnia: export_bootdevice silently reports the root
partition to be the boot device. This makes the sysupgrade process fail at
several places.

Fix this by clearly distinguishing between /proc/cmdline arguments which
specify the boot disk, and those which specify the root partition. Only in
the latter case, strip off the partition, and do it consistently.
root=PARTUUID=<pseudo PARTUUID for MBR> (any partition) and root=/dev/*
(any partition) are accepted.

The root of the problem is that the *existing* export_bootdevice in
/lib/upgrade/common.sh behaves differently, if the kernel is booted with
root=/dev/..., or if it is booted with root=PARTUUID=...

In the former case, it reports back major/minor of the root partition,
in the latter case it reports back major/minor of the complete boot disk.

Targets, which boot with root=/dev/... *and* use export_bootdevice /
export_partdevice, have added workarounds to this behaviour, by specifying
*negative* increments to the export_partdevice function.

Consequently, those targets have to be adapted to use positive increments,
otherwise they are broken by the change to export_bootdevice.

Fixes: 4e8345ff68 ("mvebu: base-files: autodetect upgrade device")
Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Tested-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Steve Glennon 6411eac5da ipq40xx: add factory image for EnGenius ENS620EXT
Extended  mksenaofw to support new "capwap" header structure.
This supports flashing from factory 3.0.0, 3.0.1, 3.1.0 and 3.5.5
firmware.

Note that the factory image format changes for 3.1 and later firmware,
and that the 3.1.0 and 3.5.5 Engenius firmware will refuse the
factory_30.bin file. Similarly, the 3.0.0 and 3.0.1 Engenius firmware
will refuse the factory_35.bin file.

Flashing from the Engenius 3.1.0 firmware with the factory_35.bin
firmware has not been tested, as 3.1.0 firmware (Engenius "middleFW")
is only intended as part of the upgrade path to 3.5.5 firmware.

Modified ipq40xx image Makefile to appropriately invoke mksenaofw
with new parameters to configure the capwap header.

Note that there is currently no method to return to factory firmware,
so this is a one-way street.

Path from factory 3.0.0 and 3.0.1 (EnGenius) software to OpenWrt is
to navigate to 192.168.1.1 on the stock firmware and navigate to the
firmware menu. Then copy the URL you have for that page, something like
http://192.168.1.1/cgi-bin/luci/;stok=12345abcdef/admin/system/flashops
and replace the trailing /admin/system/flashops with just /easyflashops

You should then be presented with a simple "Firmware Upgrade" page.
On that page, BE SURE TO CLEAR the "Keep Settings:" checkbox.

Choose the openwrt-ipq40xx-engenius_ens620ext-squashfs-factory_30.bin,
click "Upgrade" and on the following page select "Proceed".

Path from factory 3.5.5 (EnGenius) software to OpenWrt is simply to
use the stock firmware update menu. Choose the
openwrt-ipq40xx-engenius_ens620ext-squashfs-factory_35.bin and click
"Upload" and "Proceed".

The device should then flash the OpenWrt firmware and reboot. Note
that this resets the device to a default configuration with Wi-Fi
disabled, LAN1/PoE acting as a WAN port (running DHCP client) and LAN2
acting as a LAN port with a DHCP server on 192.168.1.x (AP is at
192.168.1.1)

Signed-off-by: Steve Glennon <s.glennon@cablelabs.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[sorry, for unfixing the 80-lines eyesores.]
5 years ago
Steve Glennon 9b0eb4d260 ipq40xx: Fix reboot on EnGenius ENS620EXT
This patch works around an issue where reboot would cause the AP
to power down and not reboot.

The ipq4019 restart controller reboot causes the system
to power down and not recover. Fix is to disable the restart
controller in the device tree and the device reverts to
using the watchdog to perform the reset.

The real problem is due to the buggy bootloader that ships
with the device. Steve Glennon reported in the PR for this
patch: <https://github.com/openwrt/openwrt/pull/2009> that:

"the problem was due to a bad u-boot that ships with the device.

Using the u-boot that comes with 3.5.5.3 EnGenius factory
software now allows the old code (using the do_msm_reboot)
to reboot successfully.

On to the bad news:
Well 3.5.5.3 is a bad path. Finally managed to recover. You
CANNOT use prior EnGenius firmware to downgrade.

Findings:

* They now password protect the serial console with a new, unkown
  password.
* They changed the protection on their walled-garden. I have to
  use the ssh admin@ip /bin/sh --login to get out of their
  walled-garden.
* Attempts to flash the original 3.0.0 or 3.0.1 EnGenius firmware
  fail through the UI and sysupgrade. Their firmware update GUI now
  seem to detect regular openwrt images, but they fail to flash
  Attempts to flash a normal OpenWrt image with sysupgrade fail.
[..]

Attempts to sysupgrade with EnGenius firmware fail with the same
"mandatory section(s) missing" error, so you cannot downgrade to
3.0.0 or 3.0.1."

Signed-off-by: Steve Glennon <s.glennon@cablelabs.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [added valuable
findings from github discussion]
5 years ago
Alberto Bursi 4de0a61a62 kirkwood: enable sata port multiplier
Marvell sata controllers in all kirkwood SoCs support
sata port multipliers, just like mvebu.
Enable this feature in the default kernel config
so it is available in normal builds.
tested and working on nsa310b

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
5 years ago
Felix Fietkau 85017c40f4 build: add a config option for enabling a testing version of the target kernel
If the target supports a newer kernel version that is not used by default
yet, it can be enabled with this option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Deng Qingfang 367813b9b1 ramips: mt7620: fix dependencies
MT7620 integrated WMAC does not need RT2x00 PCI driver or firmware
Also corrected kmod-eeprom-93cx6 and kmod-lib-crc-itu-t dependencies
according to original Kconfig and lsmod output

This will remove some unnecessary packages from MT7620 target to
save some space

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[75 characters per line in the commit message]
5 years ago
Koen Vandeputte bc85640cdc kernel: bump 4.19 to 4.19.38
Refreshed all patches.

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

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

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 fca966d7b7 kernel: bump 4.9 to 4.9.172
Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Jeff Kletsky 2437418cd5 ath79: glinet_gl-ar750s: Use QCA9887 firmware
The GL.iNet AR750S is based around the QCA9563
and requires the QCA9887 firmware for operation.

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
5 years ago
Joachim Fünfer edf1d6264b ar71xx: fix failsafe interface for TL-WR940nv6
Switches failsafe mode interface from WAN to LAN ports.

Tested on TL-WR940Nv6.0 and TL-WR940Nv6.1

Signed-off-by: Joachim Fünfer <joachim.fuenfer@stusta.net>
5 years ago
David Bauer 3364af629d ath79: fix OCEDO Raccoon 10Mbit PLL value
This corrects the PLL value for 10 Mbit/s links on the OCEDO Raccoon.
Prior to this patch, 10 Mbit/s links would not transmit data.

It is worth mentioning that the vendor firmware used the same PLL
settings and 10Mbit/s was also not working there.

All other link-modes are working correctly without any packet loss.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Rosy Song 3b4c44aa8b ar71xx: mute script error in ar922x-led-fix script
This commit fixes following script error in syslog:

 cat: can't open '/sys/devices/platform/ehci-platform/usb1/1-1/1-1.2/1-1.2:1.4/ieee80211/phy*/name': No such file or directory
 sh: add: unknown operand
 sh: add: unknown operand

Signed-off-by: Rosy Song <rosysong@rosinson.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
[commit subject and message tweaks]
5 years ago
Petr Štetiar 51216b4f83 kernel: Rename UPROBE_EVENT to UPROBE_EVENTS
Upstream has renamed UPROBE_EVENT to UPROBE_EVENTS in the following
commit:

 commit 6b0b7551428e4caae1e2c023a529465a9a9ae2d4
 Author: Anton Blanchard <anton@samba.org>
 Date:   Thu Feb 16 17:00:50 2017 +1100

     perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS

     We have uses of CONFIG_UPROBE_EVENT and CONFIG_KPROBE_EVENT as
     well as CONFIG_UPROBE_EVENTS and CONFIG_KPROBE_EVENTS.

     Consistently use the plurals.

So I'm changing it to this plural option in order to make kconfig happy
and stop asking about it if kernel is compiled with verbose logging:

 Enable uprobes-based dynamic events (UPROBE_EVENTS) [Y/n/?] (NEW)

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Hauke Mehrtens 1325e74e0c kernel: Remove support for kernel 3.18
No target is using kernel 3.18 anymore, remove all the generic
support for kernel 3.18.

The removed packages are depending on kernel 3.18 only and are not used on
any recent kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 675832de79 xburst: Remove unmaintained target
This target only supports kernel 3.18, which is not supported in OpenWrt
any more for multiple releases. It also looks like there is no active
maintainer for this target.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens cd3b298533 omap24xx: Remove unmaintained target
This target only supports kernel 4.1, which is not supported in OpenWrt
any more for multiple releases. It also looks like there is no active
maintainer for this target.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 8ba38cc145 ppc44x: Remove unmaintained target
This target only supports kernel 3.18, which is not supported in OpenWrt
any more for multiple releases. It also looks like there is no active
maintainer for this target.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 406a3826dc ppc40x: Remove unmaintained target
This target only supports kernel 3.18, which is not supported in OpenWrt
any more for multiple releases. It also looks like there is no active
maintainer for this target.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 65cdfbabde mcs814x: Remove unmaintained target
This target only supports kernel 3.18, which is not supported in OpenWrt
any more for multiple releases. It also looks like there is no active
maintainer for this target.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens e6f9a8e89b au1000: Remove unmaintained target
This target only supports kernel 3.18, which is not supported in OpenWrt
any more for multiple releases. It also looks like there is no active
maintainer for this target.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens c35425f418 adm8668: Remove unmaintained target
This target only supports kernel 3.18, which is not supported in OpenWrt
any more for multiple releases. It also looks like there is no active
maintainer for this target.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 2d0a2ff1e0 adm5120: Remove unmaintained target
This target only supports kernel 3.18, which is not supported in OpenWrt
any more for multiple releases. It also looks like there is no active
maintainer for this target.
Remove the code and all the packages which are only used by this target.

To add this target to OpenWrt again port it to a recent and supported
kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Koen Vandeputte 49dca520fb brcm2708: fix renamed definition (FS#2265)
This target adds an alternative mmc driver using a patch.
Within this patch, a definition got renamed upstream.

Change it to fix following compile error:

  CC      drivers/mmc/host/bcm2835-mmc.o
In file included from ./include/linux/kernel.h:14:0,
                 from ./include/linux/delay.h:22,
                 from drivers/mmc/host/bcm2835-mmc.c:25:
drivers/mmc/host/bcm2835-mmc.c: In function 'bcm2835_mmc_dumpregs':
drivers/mmc/host/bcm2835-mmc.c:254:27: error: 'SDHCI_ACMD12_ERR' undeclared (first use in this function); did you mean 'SDHCI_CMD_CRC'?
   bcm2835_mmc_readw(host, SDHCI_ACMD12_ERR),
                           ^
./include/linux/printk.h:137:18: note: in definition of macro 'no_printk'
    printk(fmt, ##__VA_ARGS__); \
                  ^~~~~~~~~~~
drivers/mmc/host/bcm2835-mmc.c:253:2: note: in expansion of macro 'pr_debug'
  pr_debug(DRIVER_NAME ": AC12 err: 0x%08x | Slot int: 0x%08x\n",
  ^~~~~~~~
drivers/mmc/host/bcm2835-mmc.c:254:27: note: each undeclared identifier is reported only once for each function it appears in
   bcm2835_mmc_readw(host, SDHCI_ACMD12_ERR),
                           ^
./include/linux/printk.h:137:18: note: in definition of macro 'no_printk'
    printk(fmt, ##__VA_ARGS__); \
                  ^~~~~~~~~~~
drivers/mmc/host/bcm2835-mmc.c:253:2: note: in expansion of macro 'pr_debug'
  pr_debug(DRIVER_NAME ": AC12 err: 0x%08x | Slot int: 0x%08x\n",
  ^~~~~~~~
scripts/Makefile.build:326: recipe for target 'drivers/mmc/host/bcm2835-mmc.o' failed
make[8]: *** [drivers/mmc/host/bcm2835-mmc.o] Error 1

Upstream commit:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.14.114&id=45fd8679ea86bffb352132a1df4917c3d11375aa

Fixes: b765f4be40 ("kernel: bump 4.14 to 4.14.114")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 08802d93e2 kernel: bump 4.19 to 4.19.37
Refreshed all patches.

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

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

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

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

Remove upstreamed:
- 022-0006-crypto-crypto4xx-properly-set-IV-after-de-and-encryp.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 456f486b53 kernel: bump 4.9 to 4.9.171
Refreshed all patches.

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte fdf1aae77d kernel: add missing symbol in 4.19 config
Intel AtomISP2 dummy / power-management driver (INTEL_ATOMISP2_PM) [N/m/y/?] (NEW)

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Felix Fietkau 9af2735734 kernel: fix regression on 4.19 with 613-netfilter_optional_tcp_window_check.patch (FS#2253)
Since ct->proto.tcp.last_win isn't updated when nf_ct_tcp_no_window_check is
enabled, the retransmission timeout check needs to be bypassed.

Based on patch by Rob Mosher

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Yousong Zhou a9f6fceb42 sdk: fix building external modules when CONFIG_STACK_VALIDATION=y
The option is at the moment enabled for x86/64.  The selection chain
should be

	config RETPOLINE
	  select STACK_VALIDATION if HAVE_STACK_VALIDATION
	config x86
	  select HAVE_STACK_VALIDATION            if X86_64

cryptdev-linux:

	make[4]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10'
	make -C /store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.113 M=/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10 ARCH=x86 CROSS_COMPILE=x86_64-openwrt-linux-musl- modules
	make[5]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.113'
	make[6]: *** No rule to make target '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10/ioctl.o', needed by '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10/cryptodev.o'.  Stop.
	Makefile:1533: recipe for target '_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.10' failed

Open vSwitch intree kmods

	make[7]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux'
	make -C /store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111 ARCH=x86 M=/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux modules
	make[8]: Entering directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111'
	make[9]: *** No rule to make target 'tools/objtool/objtool', needed by '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux/actions.o'.  Stop.
	Makefile:1533: recipe for target '_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux' failed
	make[8]: *** [_module_/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/openvswitch-2.11.0/datapath/linux] Error 2
	make[8]: Leaving directory '/store/buildbot/slave/x86_64/build/sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.111'

Reference: builddeb: include objtool binary in headers package, https://patchwork.kernel.org/patch/9014071/
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years ago
Koen Vandeputte e40050d104 ar71xx: add support for Mikrotik RouterBOARD 2011UiAS-2HnD r2
This board got a new hardware revision, without any change in functionality.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f337cd2ba3 kernel: bump 4.19 to 4.19.36
Refreshed all patches.

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

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

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

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

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 022dfdc41c kernel: bump 4.19 to 4.19.35
Refreshed all patches.

Fixes:
- CVE-2019-3887

New symbol:
- CONFIG_LDISC_AUTOLOAD

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

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

New symbol:
- CONFIG_LDISC_AUTOLOAD

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 6e243c2353 kernel: bump 4.9 to 4.9.169
Refreshed all patches.

New symbols:
- CONFIG_LDISC_AUTOLOAD
- CONFIG_PPC_BARRIER_NOSPEC

Compile-tested on: ar7
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Lucian Cristian ee38ffb4a9 armvirt64: enable qemu drm drivers
adds the qemu video drivers and also fixes the build failure
introduced with drm-kms-helper

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years ago
Lucian Cristian 16b381179f kernel: add missing drm symbol
dependency introduced with module drm-kms-helper

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
5 years ago
Petr Štetiar bd3a18bbe4 lantiq: tdw90x0: Fix WLAN LED on TP-Link W8970 v1.2 (FS#2232)
This patch fixes disfunctional WLAN LED on TP-Link W8970. The LED was
reported working in the CC release[1], but doesn't work anymore in 18.06.2.

1. 420cb24d41

Tested-by: Damian Janarek <dzanar18@o2.pl>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Christian Lamparter d599890efd layerscape: unbreak ehci-fsl interaction with mpc85xx
Both targets have their own idea of how to use ehci-fsl.
This patch reverts part of commit
68b8d3b079 ("kernel: usb: add FSL EHCI package") and moves
ehci-fsl back into kmod-usb2, while also making it hopefully
useable for the mpc85xx target.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Christian Lamparter 324e94f31b mpc85xx: disable bricking TL-WDR4900v1 images
The current mpc85xx build is failing because the
TL-WDR4900v1 kernel image no longer fits into the
partition. Extending the kernel is not possible
without updating u-boot's kernel loader commands.

This patch disables the WDR4900v1 until the kernel
image size issue is fixed so the buildbot can still
compile the Sophos RED 15w Rev.1 . Installing the
WDR4900v1 images would cause the routers to get
bricked.

For the discussion, please go to:
<https://github.com/openwrt/openwrt/pull/1773>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Petr Štetiar 78ee6b1a40 kernel: MIPS: perf: ath79: Fix perfcount IRQ assignment
Currently it's not possible to use perf on ath79 due to genirq flags
mismatch happening on static virtual IRQ 13 which is used for
performance counters hardware IRQ 5.

On TP-Link Archer C7v5:

           CPU0
  2:          0      MIPS   2  ath9k
  4:        318      MIPS   4  19000000.eth
  7:      55034      MIPS   7  timer
  8:       1236      MISC   3  ttyS0
 12:          0      INTC   1  ehci_hcd:usb1
 13:          0  gpio-ath79   2  keys
 14:          0  gpio-ath79   5  keys
 15:         31  AR724X PCI    1  ath10k_pci

 $ perf top
 genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)

On TP-Link Archer C7v4:

         CPU0
  4:          0      MIPS   4  19000000.eth
  5:       7135      MIPS   5  1a000000.eth
  7:      98379      MIPS   7  timer
  8:         30      MISC   3  ttyS0
 12:      90028      INTC   0  ath9k
 13:       5520      INTC   1  ehci_hcd:usb1
 14:       4623      INTC   2  ehci_hcd:usb2
 15:      32844  AR724X PCI    1  ath10k_pci
 16:          0  gpio-ath79  16  keys
 23:          0  gpio-ath79  23  keys

 $ perf top
 genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)

This problem is happening, because currently statically assigned virtual
IRQ 13 for performance counters is not claimed during the initialization
of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
this interrupt isn't available for further use.

So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 5c8f557b36 Revert "ath79: Add WPS button to TP-Link Archer C7v5"
Reverting this commit as I've missed the fact, that the button is
already present in the included DTSI file.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Eike Feldmann 9e0fb5a27f ramips: add support for Rakwireless RAK633
It's OEM module with 2*26 pin header, similar to LinkIt Smart 7688 or
Vocore2.

Specification:

CPU:       MT7628 580 MHz. MIPS 24K
RAM:       64 MB
Flash:     8 MB
WIFI:      802.11n/g/b 20/40 MHz
USB:       1x Port USB 2.0
Ethernet:  5 Port ethernet switch
UART:      2x

Installation: Use the installed uboot Bootloader. Connect a serial cable
to serialport 0. Turn power on.  Choose the option: "Load system code
then write to Flash via TFTP".  Choose the local device IP and the TFTP
server IP and the file name of the system image.  After if the
Bootloader will copy the image to the local flash.

Notes: The I2C Kernel module work not correctly. You can send and
receive data. But the command i2cdetect doesn’t work. FS#845

Signed-off-by: Eike Feldmann <eike.feldmann@outlook.com>
[commit subject and message touches, DTS whitespace fixes, wifi LED
rename, pinctrl fixes, network settings fixes, lan/wmac mac addresses,
removed i2c kernel modules]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
David Bauer 43e8c37cb4 ramips: add support for GL.iNet VIXMINI
Hardware
--------
SoC:   MediaTek MT7628NN
RAM:   64M DDR2 (Etron EM68B16CWQD-25H)
FLASH: 8M (Winbond W25Q64JVSIQ)
LED:   Power - WLAN
BTN:   Reset
UART:  115200 8N1
       TX and RX are labled on the board as pads next to the SoC

Installation via web-interface
------------------------------
1. Visit the web-interface at 192.168.8.1
   Note: The ethernet port is by default WAN. So you need to connect to
   the router via WiFi

2. Navigate to the Update tab on the left side.

3. Select "Local Update"

4. Upload the OpenWrt sysupgrade image.
   Note: Make sure you select not to preserve the configuration.

Installation via U-Boot
-----------------------
1. Hold down the reset button while powering on the device.
   Wait for the LED to flash 5 times.

2. Assign yourself a static IPv4 in 192.168.1.0/24

3. Upload the OpenWrt sysupgrade image at 192.168.1.1.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Pawel Dembicki b3f7a73860 mpc85xx: generic: Check kernel size for the TL-WDR4900
TP-Link TL-WDR 4900 have u-boot with read-only env.
Boot command read only 0x29F000 data from flash.
Bigger images causes crc error. It can't be changed.

This patch add kernel size checking.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [utilize KERNEL_SIZE]
5 years ago
David Bauer bb831ca43a mpc85xx: clean up device package selection
Remove wireless and USB packages from the device-specific package
selection as they are already selected by the target itself.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
David Bauer 84b1257f80 mpc85xx: remove USB support from kernel
This removes USB support from the compiled kernel. Because of this, the
kernel is just small enough for the TP-Link WDR4900 to boot the
resulting kernel.

This is necessary to support the WDR4900 in the upcoming 19.xx release.
In the long run, this should be fixed with a second stage bootloader, as
the vendor bootloader only loads the first 2684k bytes.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
INAGAKI Hiroshi 3fd443640c ath79: remove unnecessary packages from I-O DATA ETG3-R
I-O DATA ETG3-R is a wired router. So wireless-related packages are
unnecessary and remove those packages from default configuration to
reduce flash usage.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
Sven Roederer e0d98e120a ath79: add TP-Link WR842N v3
This adds support for the TP-Link WR842N v3 which is already supported on ar71xx
target (0b45bec22c).

Specification:
* SoC: QCA9533 ver 2 rev 0
* 16 MB Flash (gd25q128)
* 64 MB RAM
* 1 WAN 10/100 MBit/s (blue connector)
* 4 LAN 10/100 MBit/s (AR8229; 4 ports; yellow connectors)
* Atheros AR9531 (2,4GHz, two fixed antennas)
* USB
* Reset / WPS button
* WiFi button (rf kill)
* 8 green leds; 1 red/green led
* serial console (115200 8N1, according to the OpenWrt-wiki some soldering is needed)

Installation:
* flash via vendor WebUI (the filename must not exceed certain length)
* sysupgrade from installed OpenWrt (also ar71xx)

Thanks to Holger Drefs for providing the hardware

Tested-by: @kofec (github)
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
5 years ago
Daniel Golle 66e2acad9c ramips: fix pinctrl to allow hardware i2c on WRTNODE2R
Instead of assigning I2C pins as GPIOs by default, leave it up to the
user whether to install kmod-i2c-mt7621 and use them for hardware I2C
instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle b6acb7b718 kernel: move and replace accepted patch
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Koen Vandeputte fa8d5ad21b imx6: bump sdma firmware to 3.4
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Daniel Gimpelevich f61e754522 ath79: add support for Netgear EX6400 and EX7300
This is sold as a dual-band 802.11ac range extender. It has a sliding
switch for Extender mode or Access Point mode, a WPS button, a recessed
Reset button, a hard-power button, and a multitude of LED's, some
multiplexed via an NXP 74AHC164D chip. The internal serial header pinout is
Vcc, Tx, Rx, GND, with GND closest to the corner of the board. You may
connect at 115200 bps, 8 data bits, no parity, 1 stop bit.

Specification:
- System-On-Chip: QCA9558
- CPU/Speed: 720 MHz
- Flash-Chip: Winbond 25Q128FVSG
- Flash size: 16 MiB
- RAM: 128 MiB
- Wireless No1: QCA9558 on-chip 2.4GHz 802.11bgn, 3x3
- Wireless No2: QCA99x0 chip 5GHz 802.11an+ac, 4x4
- PHY: Atheros AR8035-A

Installation:
If you can get to the stock firmware's firmware upgrade option, just feed
it the factory.img and boot as usual. As an alternative, TFTP the
factory.img to the bootloader.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[whitespace fix in DTS and reorder of make variables]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Daniel Gimpelevich d75d4837fc ath79: remove more duplicate image build variables
Remove Netgear-specific image build variables which are set to the same
value.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[reordering of variables, removed stray newline]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Hauke Mehrtens 1f839c8584 sunxi: Remove already applied patch
This patch is already included in kernel v4.19.31.

Fixes: 8df12d76c6 ("kernel: bump 4.19 to 4.19.34")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Adrian Schmutzler 93d23aced2 ar71xx: Correct MAC address for WAN interface of Archer C7 v5
This device shares the network config with v4, thus the WAN MAC
also needs to be fixed the same way. However, the partition
where the MAC address resides has been changed.

Based on: https://github.com/openwrt/openwrt/pull/1726

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 9aa8f87d27 ar71xx: Add "info" partition for TP-Link Archer C7 v5
This adds the "info" MTD partition, as it is specified in the
ath79 DTS:
https://github.com/openwrt/openwrt/blob/master/target/linux/ath79/dts/qca9563_tplink_archer-c7-v5.dts#L35

This is required to set the WAN MAC address, as it is build based
on the LAN MAC address, which in turn has to be read from the
"info" partition:
https://github.com/openwrt/openwrt/blob/master/target/linux/ath79/dts/qca9563_tplink_archer-c7-v5.dts#L35

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Petr Štetiar 02556d6365 ath79: Add WPS button to TP-Link Archer C7v5
This patch adds currently missing support for the WPS button on TP-Link
Archer C7v5.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Adrian Schmutzler 0a13f589c3 ath79: Correct MAC address for WAN interface of Archer A7/C7 v5
These devices share the network config with C7v4, thus the WAN MAC
also needs to be fixed the same way. However, the partition
where the MAC address resides has been changed.

Based on: https://github.com/openwrt/openwrt/pull/1726

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler a5885ea407 ath79: Fix GPIO reset button on TP-Link Archer C7v5
The GPIO for the reset button for the Archer C7v5 changed from
ar71xx to ath79. An investigation based on tests revealed
that the A7v5 responds on "11", while the C7v5 responds on
"5" as set for ar71xx.

Thus, we just define this in the DTS files instead of in the
common DTSI.

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 6f354c4d32 ath79: Utilize new LED modes from diag.sh for Archer A7/C7 v5
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 9888f1b96c ath79: Consolidate LEDs in Archer A7/C7 v5 DTSI
Definition is split here without obvious reason. Just merge it
(and align order to that from C7 v4).

Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Christian Mauderer 8a4dc6f48c ath79: add support for Ubiquiti airCube ISP
The Ubiquiti Network airCube ISP is a cube shaped 2.4 GHz with internal
2x2 MIMO antennas. It can be supplied via a USB connector or via PoE.
There are for 10/100 Mbps ports (1 * WAN + 3 * LAN). There is an
optional PoE passthrough from the first LAN port to the WAN port.

SoC:       Qualcomm / Atheros QCA9533-BL3A
RAM:       64 MB DDR2
Flash:     16 MB SPI NOR
Ethernet:  4x 10/100 Mbps (1 WAN + 3 LAN)
LEDS:      1x via a SPI controller (not yet supported)
Buttons:   1x Reset
Serial:    1x (only RX and TX); 115200 baud, 8N1

Missing points:
- LED not yet supported
- Factory upgrade via web IF or TFTP recovery not yet supported
  (Needs RSA signed images, for details see PR#1958)

The serial port is on a four pin connextor labeled J1 and located
between Ethernet and USB connector. The pinout is:
1. 3V3 (out)
2. Rx (in)
3. Tx (out)
4. GND

Upgrading via serial port / U-Boot:
- Connect the serial port via a level converter
- Power the system and stop U-Boot with pressing any key when `Hit any
  key to stop autoboot` is displayed. Note: Pressing space multiple
  times untill U-Boot reaches that location works well.
- Connect a PC with the IP 192.168.1.100 (or some other in that net)
  running a TFTP-Server to one of the LAN ports. Copy the sysupgrade
  image to the server.
- Set the U-Boot server IP with
    setenv serverip 192.168.1.100
- Load the flash image to RAM with
    tftpboot 0x81000000 sysupgrade.bin
- Erase the flash with
    erase 0x9f050000 0x9ffaffff
- Write the new flash content with
    cp 0x81000000 0x9f050000 ${filesize}
- Reset the device with
    reset

Signed-off-by: Christian Mauderer <oss@c-mauderer.de>
[removed full stop in subject and added lockdown note to commit message]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Markus Scheck de2f888024 ath79: add support for OCEDO Ursus
SOC:   Qualcomm Atheros QCA9558
RAM:   128MB
FLASH: 16MB (Macronix MX25L12845EMI-10G)
WLAN1: QCA9558 2.4GHz 802.11bgn 3SS
WLAN2: QCA9880 5GHz 802.11ac 3SS
LED:   Power, LAN1, LAN2, 2.4GHz, 5GHz
Serial:Next to SPI Flash,
       Pinout is 3V3 - GND - TX - RX (Square Pin is 3V3)
       The Serial setting is 115200-8-N-1

INSTALLATION:

1. Serve an OpenWrt ramdisk image named "ursus.bin".
   Set your IP-address to 192.168.100.8/24.
2. Connect to the serial. Power up the device and interrupt
   the boot process.
3. Set the correct bootcmd with
   > setenv bootcmd run bootcmd_1
   > saveenv
4. Run
   > tftpboot 0x81000000 ursus.bin
   > bootm 0x81000000
5. Wait for OpenWrt to boot up.
6. Transfer OpenWrt sysupdate image and flash via sysupgrade.

Signed-off-by: Markus Scheck <markus.scheck1@gmail.com>
Tested-by: David Bauer <mail@david-bauer.net>
[whitespace fix, renamed LED labels and SoC type fix]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 189aa1748b ath79: ag71xx: Enable tx hang workaround for the rest of ar724x SoCs
In ar71xx we check for stuck DMA on devices which fall in the is_ar724x
SoC group (ar724x, ar933x, ar934x, qca9533, tp9343, qca955x, qca956x).

In ath79 we're currently performing this check only for devices with
ar7240 SoC, so this patch tries to sync the dma stuck checking behavior
with what is being done in ar71xx.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 31ea08a64b ar71xx: ag71xx: Fix broken networking on some devices (FS#2177)
It was reported, that latest ar71xx builds have broken networking on
TP-Link TL-WPA8630 and Nanostation M5 XW devices and that by reverting
the offending commit, everything is back to normal.

Fixes: d3506d1 ("ar71xx: ag71xx: fix compile error when enabling debug")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 0f8cdc28af ar71xx: Add support for Ubiquity Bullet M (XW)
CPU: AR9342 SoC
RAM:     64 MB DDR2
Flash:    8 MB NOR SPI
Ports:  100 MBit (24V PoE in)
WLAN: 2.4/5 GHz
UART:     1 UART on PCB marked as J1 with 115200 8N1 config
LEDs:       Power, Ethernet, 4x RSSI LEDs (orange, red, 2x green)
Buttons:    Reset

UART connection details

  .---------------------------------.
  |                                 |
[ETH]          J1                 [ANT]
  |    o VCC o RX o TX o GND        |
  `---------------------------------'

Flashing instructions using recovery method over TFTP

 1. Unplug the ethernet cable from the router.
 2. Using paper clip press and hold the router's reset button. Make sure
    you can feel it depressed by the paper clip. Do not release the button
    until step 4.
 3. While keeping the reset button pressed in, plug the ethernet cable
    back into the AP. Keep the reset button depressed until you see the
    device's LEDs flashing in upgrade mode (alternating LED1/LED3 and
    LED2/LED4), this may take up to 25 seconds.
 4. You may release the reset button, now the device should be in TFTP
    transfer mode.
 5. Set a static IP on your Computer's NIC. A static IP of 192.168.1.25/24
    should work.
 6. Plug the PoE injector's LAN cable directly to your computer.
 7. Start tftp client and issue following commands:
     tftp> binary
     tftp> connect 192.168.1.20
     tftp> put openwrt-ar71xx-generic-ubnt-bullet-m-xw-squashfs-factory.bin

Tested only on Bullet M2HP.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 6009b3fd58 ar71xx: ubnt-m-xw: Fix factory image flashing using TFTP recovery
This is backport of the same functionality in ath79, from commit
 d42a7c469 ("ath79: ubnt-m-xw: Fix factory image flashing using TFTP
             recovery method")

Ubiquity allows flashing of unsigned factory images via TFTP recovery
method[1]. They claim in airOS v6.0.7 release changelog[2] following:

 All future airOS versions will be signed in this way and not allow
 unsigned firmware to be loaded except via TFTP.

U-boot bootloader on M-XW devices expects factory image revision
version in specific format. On airOS v6.1.7 with `U-Boot 1.1.4-s1039
(May 24 2017 - 15:58:18)` bootloader checks if the revision major(?)
number is actually a number, but in currently generated images there's
OpenWrt text and so the check fails:

 Hit any key to stop autoboot:  0
 Setting default IP 192.168.1.20
 Starting TFTP server...
 Receiving file from 192.168.1.25:38438
 Received 4981148 bytes
 Firmware check failed! (1)

By placing arbitrary correct number first in major version, we make the
bootloader happy and we can flash factory images over TFTP again:

 Received 3801500 bytes
 Firmware Version: XW.ar934x.v6.0.4-42.OpenWrt-r9766+2-be42e44
 Setting U-Boot environment variables
 Un-Protected 1 sectors
 Erasing Flash.... done

Patch provided by AREDN[3] project, tested on Bullet M2 XW.

1. https://help.ubnt.com/hc/en-us/articles/204910124-UniFi-TFTP-Recovery-for-Bricked-Access-Points
2. https://dl.ubnt.com/firmwares/XW-fw/v6.0.7/changelog.txt
3. https://github.com/aredn

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar d23222a96c imx6: Add support for Toradex Apalis family of CoMs
This patch adds support for the following computer on modules (CoM) from
Toradex[A]:

 Apalis iMX6 Quad 2GB IT - i.MX 6Quad 800MHz, 2GB DDR3, 4GB eMMC
                                             -40° to +85° C Temp
 Apalis iMX6 Quad 1GB    - i.MX 6Quad 1GHz,   1GB DDR3, 4GB eMMC
                                               0° to +70° C Temp
 Apalis iMX6 Dual 1GB IT - i.MX 6Dual 800MHz, 1GB DDR3, 4GB eMMC
                                             -40° to +85° C Temp
 Apalis iMX6 Dual 512MB  - i.MX 6Dual 1GHz, 512MB DDR3, 4GB eMMC
                                               0° to +70° C Temp

I've developed and tested it on Quad 2GB IT v1.1A and Dual 512MB v1.1A
CoMs, using Ixora[B] carrier board v1.0A, but it should hopefuly work on
Eval[C] board as well.

A. https://www.toradex.com/computer-on-modules/apalis-arm-family/nxp-freescale-imx-6
B. https://www.toradex.com/products/carrier-board/ixora-carrier-board
C. https://www.toradex.com/products/carrier-board/apalis-evaluation-board

Flashing/recovery instructions:

 1. Download and compile imx_loader for OpenWrt from
    https://github.com/ynezz/imx_loader

 2. Enter recovery mode as desribed in
    https://developer.toradex.com/knowledge-base/imx-recovery-mode

 3. Connect board via USB to the host computer, check that it's connected
    by lsusb:

    15a2:0054 Freescale Semiconductor, Inc. i.MX 6Dual/6Quad SystemOnChip
              in RecoveryMode

 4. Copy following OpenWrt images to imx_loader directory:
         SPL
         u-boot.img
         u-boot-with-spl.imx
         openwrt-imx6-apalis-recovery.scr
         openwrt-imx6-apalis-squashfs.combined.bin

 5. Run imx_usb in imx_loader directory

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar dc1a73984e imx6: image: Split imx6-sdcard image for reusability
I'm going to reuse the imx6-sdcard image commands for building of Apalis
eMMC images.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Koen Vandeputte 8df12d76c6 kernel: bump 4.19 to 4.19.34
Refreshed all patches.

Removed:
- 030-PCI-dwc-skip-MSI-init-if-MSIs-have-been-explicitly-d.patch

Altered:
- 366-netfilter-nf_flow_table-clean-up-and-fix-dst-handlin.patch
- 650-netfilter-add-xt_OFFLOAD-target.patch
- 662-remove_pfifo_fast.patch
- 332-arc-add-OWRTDTB-section.patch
- 100-clocksource-drivers-arch_timer-Workaround-for-Allwin.patch
- 702-phy_add_aneg_done_function.patch

New symbols:
- ARC_IRQ_NO_AUTOSAVE
- SUN50I_ERRATUM_UNKNOWN1

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

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

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 1138e0f887 kernel: bump 4.9 to 4.9.168
Refreshed all patches.

Compile-tested on: ar7
Runtime-tested on: none

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