openwrt/staging/yousong.git
4 years agodnsmasq: bump to 2.81rc2 + 2 local
Kevin Darbyshire-Bryant [Fri, 6 Mar 2020 11:23:34 +0000 (11:23 +0000)]
dnsmasq: bump to 2.81rc2 + 2 local

Bump to dnsmasq 2.81rc2.  In the process discovered several compiler
warnings one with a logical error.

2 relevant patches sent upstream, added as 2 local patches for OpenWrt

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoath79: re-add accidentally dropped patch to kernel 5.4
Daniel Golle [Fri, 6 Mar 2020 12:12:02 +0000 (13:12 +0100)]
ath79: re-add accidentally dropped patch to kernel 5.4

Patch 0061-tty-serial-ar933x-uart-rs485-gpio.patch wasn't included
when adding support for kernel 5.4. Re-add it and refresh patches.

Fixes: 53ab9865c2 ("ath79: add support for kernel 5.4")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoncurses: update to 6.2
DENG Qingfang [Wed, 4 Mar 2020 16:07:54 +0000 (00:07 +0800)]
ncurses: update to 6.2

Update ncurses to 6.2

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: increase spi-max-frequency to 50 MHz for D-Link DIR-810L
Adrian Schmutzler [Thu, 5 Mar 2020 11:41:51 +0000 (12:41 +0100)]
ramips: increase spi-max-frequency to 50 MHz for D-Link DIR-810L

Read times drop when increasing frequency to 25 MHz and 50 MHz,
but not in between or for further increase. So, use 50 MHz as the
lowest frequency with the fastest speed.

Test results (thanks to Roger):

The device reports a mx25l6405d flash chip. I tried all the maximum
values in the devices' datasheet (Table 10. AC CHARACTERISTICS). All of
them worked with and without "m25p,fast-read":

> 10 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    1m 33.00s
user    0m 0.01s
sys    1m 7.56s

> 25 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 34.42s
user    0m 0.02s
sys    0m 23.58s

> 25 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 34.45s
user    0m 0.02s
sys    0m 23.59s

> 33 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 34.39s
user    0m 0.00s
sys    0m 23.60s

> 33 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 34.46s
user    0m 0.01s
sys    0m 23.62s

> 50 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.81s
user    0m 0.01s
sys    0m 18.25s

> 50 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.84s
user    0m 0.00s
sys    0m 18.25s

> 66 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.80s
user    0m 0.01s
sys    0m 18.23s

> 66 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.80s
user    0m 0.02s
sys    0m 18.23s

> 86 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.84s
user    0m 0.01s
sys    0m 18.24s

> 86 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.80s
user    0m 0.02s
sys    0m 18.23s

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years agoramips: fix and tidy up DTS for D-Link DIR-810L
Adrian Schmutzler [Thu, 27 Feb 2020 13:46:25 +0000 (14:46 +0100)]
ramips: fix and tidy up DTS for D-Link DIR-810L

This patch addresses several issues for D-Link DIR-810L:

- add correct button codes
- harmonize button node names
- use generic flash@0
- remove unused pin groups from state_default
- improve sorting of properties

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years agoramips: fix partition offset for D-Link DIR-810L
Adrian Schmutzler [Thu, 27 Feb 2020 13:46:24 +0000 (14:46 +0100)]
ramips: fix partition offset for D-Link DIR-810L

The Jffs2 partition for the D-Link DIR-810L is currently off by
0x10000. Apply the correct offset based on the other partitions'
size/offset and the information about stock OS from the Wiki.

This is just based on the named information and _not_ verified
on device.

Fixes: 36e3424fa520 ("ramips: add support for dir810l and asus rp-n53")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years agoipq806x: add newline at the end of qcom-ipq8064-v1.0.dtsi
Adrian Schmutzler [Thu, 5 Mar 2020 11:28:43 +0000 (12:28 +0100)]
ipq806x: add newline at the end of qcom-ipq8064-v1.0.dtsi

The file does not have a newline at the end. Add it to apply to
common style.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoipq40xx: fix support of EnGenius EAP2200
Adrian Schmutzler [Thu, 5 Mar 2020 11:21:40 +0000 (12:21 +0100)]
ipq40xx: fix support of EnGenius EAP2200

This fixes a typo in the device string for MAC address setup in
02_network and corrects the indent in the device's DTS files.

While at it, move the aliases section before the keys section to
have it closer to the top of the file.

Fixes: a736d912e2ba ("ipq40xx: add support for EnGenius EAP2200")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: add support for NETGEAR R6700v2/AC2400
Adrian Schmutzler [Fri, 27 Dec 2019 18:05:06 +0000 (19:05 +0100)]
ramips: add support for NETGEAR R6700v2/AC2400

SoC: MediaTek MT7621AT
RAM: 256M DDR3
FLASH: 128M NAND
WiFi: MediaTek MT7615N an+ac
MediaTek MT7615N bgn
ETH: MediaTek MT7621AT
BTN: 1x Connect (WPS), 1x WLAN, 1x Reset
LED: Power (white/amber), WAN(white/amber), 2.4G(white), 5G(white),
USB(white) , GuestWifi(white) 4x LAN(white/amber), Wifi Button(white),
WPS Button(white)

Installation:

Login to netgear webinterface and flash factory.img

Based on a discontinued GitHub Pull Request by
kuyokushin <codenamezero@protonmail.com>

https://github.com/openwrt/openwrt/pull/2545

NOTE: Netgear R6700 v2 have five clones: R6900 v2, R7450, Nighthawk
AC2400, Nighthawk AC2100 and already added R6800. Rest of them  should
be really easy supportable. Image for R6700v2 should work perfectly with
them. Please refer:

https://github.com/openwrt/openwrt/pull/2614

Tested-by: Víctor Gibrán <victorgibranmz@hotmail.com> [R6700v2]
Tested-by: John Landrum <jl31m10@yahoo.com> [AC2400]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[add guest led to mt7621_netgear_r6700-v2.dts end edit commit message]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agoramips: mt7621: add support for Netgear R6800
Pawel Dembicki [Wed, 11 Dec 2019 20:54:24 +0000 (21:54 +0100)]
ramips: mt7621: add support for Netgear R6800

This patch adds support for the Netgear R6800, aka Netgear AC1900 and
R6800-100PES.

Specification:
- SoC: MediaTek MT7621AT (880 MHz)
- Flash: 128 MiB NAND
- RAM: 256 MiB
- Wireless: MediaTek MT7615EN b/g/n , MediaTek MT7615EN an+ac
- LAN speed: 10/100/1000
- LAN ports: 4
- WAN speed: 10/100/1000
- WAN ports: 1
- USB 2.0
- USB 3.0
- Serial baud rate of Bootloader and factory firmware: 57600

Known issues:
- Device has 3 wifi LEDs: Wifi 5Ghz, Wifi 2.4Ghz and Wifi on/off.
  Wifi on/off is not used.

Installation:
- apply factory image via stock web-gui.

Back to stock:
- nmrpflash can be used to recover to the stock Netgear firmware.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agodnsmasq: bump to v2.81rc1
Kevin Darbyshire-Bryant [Sat, 9 Mar 2019 08:40:57 +0000 (08:40 +0000)]
dnsmasq: bump to v2.81rc1

1st release candidate for v2.81 after 18 months.

Refresh patches & remove all upstreamed leaving:

110-ipset-remove-old-kernel-support.patch

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoipq806x: add 5.4 as testing kernel version
Ansuel Smith [Sun, 26 Jan 2020 03:40:43 +0000 (04:40 +0100)]
ipq806x: add 5.4 as testing kernel version

Add 5.4 kernel version as a new testing kernel option.

Ref: https://github.com/openwrt/openwrt/pull/2793
Tested-by: Hannu Nyman <hannu.nyman@iki.fi> [ipq8065, R7800]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq8065, NBG6817]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[added Tested-by tags]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agogeneric: add missing symbol from 5.4 config
Ansuel Smith [Fri, 28 Feb 2020 20:19:27 +0000 (21:19 +0100)]
generic: add missing symbol from 5.4 config

Add missing symbol displayed with ipa806x kernel config

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agomodules: fix dwc3-qcom wrong condition
Ansuel Smith [Fri, 31 Jan 2020 23:15:46 +0000 (00:15 +0100)]
modules: fix dwc3-qcom wrong condition

Since now we support both kernel 4.19 and 5.2, change the
condition to remove driver when on kernel 4.14

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: fix broken stmmac notifier
Ansuel Smith [Tue, 3 Mar 2020 17:57:13 +0000 (18:57 +0100)]
ipq806x: fix broken stmmac notifier

Backport a patch in 5.6 to fix stmmac notifier
registration

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: add patch to fix broken usb3
Ansuel Smith [Wed, 19 Feb 2020 00:22:00 +0000 (01:22 +0100)]
ipq806x: add patch to fix broken usb3

Due to changes in syscon driver, the phy dwc3 driver
needs to use device_node_to_regmap since it has to skip
the new introduced clk check. This fix broken usb3 on this
target.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: move mdio node to ipq8064 dts
Ansuel Smith [Tue, 3 Mar 2020 17:38:21 +0000 (18:38 +0100)]
ipq806x: move mdio node to ipq8064 dts

As mdio0 is used in every dts move it to general ipq8064
dts and use label to set device specific definition.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: rework dts to use label
Ansuel Smith [Wed, 5 Feb 2020 02:03:41 +0000 (03:03 +0100)]
ipq806x: rework dts to use label

We should use label instead of redefine the node.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: remove wrong compatible from timer node
Ansuel Smith [Wed, 5 Feb 2020 02:20:41 +0000 (03:20 +0100)]
ipq806x: remove wrong compatible from timer node

This compatible definition deprecated long ago.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: add patch to disable pretimeout on timer platform
Ansuel Smith [Fri, 28 Feb 2020 21:29:04 +0000 (22:29 +0100)]
ipq806x: add patch to disable pretimeout on timer platform

Currently the watchdog timer is broken as it tries to
get an interrupt to setup pretimeout. Since our platform
have a different type of interrupt disable it and use
legacy watchdog probe.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: use mdio dedicated driver
Ansuel Smith [Thu, 30 Jan 2020 01:48:59 +0000 (02:48 +0100)]
ipq806x: use mdio dedicated driver

Enable kernel config flag
Convert all dts to use the new mdio driver

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: add ipq806x mdio driver
Ansuel Smith [Thu, 30 Jan 2020 01:37:58 +0000 (02:37 +0100)]
ipq806x: add ipq806x mdio driver

This was created by Chunkeey some time ago. Since mdio driver
works or doesn't work and since this was tested by me for 1 year,
include it to remove the use of the generic bitbang gpio driver for
switch driver.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: update config for kernel 5.4
Ansuel Smith [Fri, 28 Feb 2020 20:23:55 +0000 (21:23 +0100)]
ipq806x: update config for kernel 5.4

Adds new symbol and update flag with new kernel names.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: fix tsens driver
Ansuel Smith [Sun, 26 Jan 2020 03:32:45 +0000 (04:32 +0100)]
ipq806x: fix tsens driver

Rework tsens driver.
Since in the new kernel 5.4 init common do more than it
should, inizialize the kernel memory directly in the driver and
drop use of this function. Rework all the patch with the new
variable names.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: rework L2 cache patch
Ansuel Smith [Sun, 26 Jan 2020 03:30:52 +0000 (04:30 +0100)]
ipq806x: rework L2 cache patch

Rework l2 scaling patch to fix some compile warning
and to imporve the caling timings by removing call to unnecessary
function.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: update nvmem cpufreq driver
Ansuel Smith [Sun, 26 Jan 2020 03:29:56 +0000 (04:29 +0100)]
ipq806x: update nvmem cpufreq driver

Rework the nvmem cpufreq driver to reflect changed in
kernel 5.4

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: drop upstream patch
Ansuel Smith [Fri, 28 Feb 2020 20:04:10 +0000 (21:04 +0100)]
ipq806x: drop upstream patch

This patchset has been merged upstream.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: refresh patches for kernel 5.4
Ansuel Smith [Sun, 26 Jan 2020 03:27:46 +0000 (04:27 +0100)]
ipq806x: refresh patches for kernel 5.4

Refresh patches and minor changes for new kernel support

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: correct wrong node in r7800 dts
Ansuel Smith [Sun, 26 Jan 2020 01:30:49 +0000 (02:30 +0100)]
ipq806x: correct wrong node in r7800 dts

A mux node was missing in the gpio node of the r7800 dts.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: use correct definition for nand-controller node
Ansuel Smith [Sun, 26 Jan 2020 01:29:29 +0000 (02:29 +0100)]
ipq806x: use correct definition for nand-controller node

From kernel Documentation this should be called nand-controller

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: include ipq806x-v1.0 dtsi
Ansuel Smith [Sun, 26 Jan 2020 01:26:12 +0000 (02:26 +0100)]
ipq806x: include ipq806x-v1.0 dtsi

Since this dtsi now have wrong definition in the upstream version,
include it to overwrite and remove any problem.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: remove skeleton definition
Ansuel Smith [Sun, 26 Jan 2020 01:24:34 +0000 (02:24 +0100)]
ipq806x: remove skeleton definition

This was already deprecated. With kernel 5.4 it has been removed.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agoipq806x: copy files to kernel 5.4
Ansuel Smith [Sun, 26 Jan 2020 03:47:49 +0000 (04:47 +0100)]
ipq806x: copy files to kernel 5.4

Copy files to kernel 5.4 to start porting.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agokirkwood: switch kernel version to 5.4
Pawel Dembicki [Mon, 2 Mar 2020 20:53:09 +0000 (21:53 +0100)]
kirkwood: switch kernel version to 5.4

5.4 support is ready and tested.

Compile tested: all target devices
Run tested: pogoplug v4, nsa310b and two unofficial supported devices

Tested-by: Sungbo Eo <mans0n@gorani.run>
Tested-by: Alberto Bursi <alberto.bursi@outlook.it> [pogoplug v4 and nsa310b]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[fixed the switch, removed maintainer variable]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokirkwood: fix switch dts node in EA4500 and EA3500
Pawel Dembicki [Mon, 10 Feb 2020 04:13:26 +0000 (05:13 +0100)]
kirkwood: fix switch dts node in EA4500 and EA3500

Changes made in switch nodes in d42c9ce commit causes problem with
correct mvsw61xx detection. This commit undo that changes.

mvsw61xx is platform driver, so it need to be in main root of dts.

Fixes: d42c9ce326aa ("kirkwood: add kernel 4.19 support")
Tested-by: Marcin Fedan <mfedan@gmail.com> [EA4500]
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agokirkwood: initial refresh of 5.4 patches
Pawel Dembicki [Mon, 2 Mar 2020 20:42:34 +0000 (21:42 +0100)]
kirkwood: initial refresh of 5.4 patches

Refreshed all patches.
Changed:
105-ea4500.patch-> Upstream DSA driver was updated. Patch was fixed
202-linksys-find-active-root.patch -> Upstream driver was moved. Patch
was fixed

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agokirkwood: initial refresh 5.4 config
Pawel Dembicki [Mon, 2 Mar 2020 20:48:33 +0000 (21:48 +0100)]
kirkwood: initial refresh 5.4 config

Refreshed kernel config with updated NAND config.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agokirkwood: copy files and config from 4.19 to 5.4
Pawel Dembicki [Mon, 2 Mar 2020 20:24:03 +0000 (21:24 +0100)]
kirkwood: copy files and config from 4.19 to 5.4

This commit is simple copy config, files and patches from 4.19 to 5.4
kernel. No changes was done.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agomediatek: update uci-defaults for renamed smp packet steering option
Alan Swanson [Sat, 16 Nov 2019 16:48:30 +0000 (16:48 +0000)]
mediatek: update uci-defaults for renamed smp packet steering option

Leave as enabled by default for mediatek. Also remove obsolete
settings from when packet steering was moved from netifd to a
simplified hotplug script.

Signed-off-by: Alan Swanson <reiver@improbability.net>
4 years agonetifd: rename 20-smp-tune to 20-smp-packet-steering
Alan Swanson [Fri, 15 Nov 2019 14:12:02 +0000 (14:12 +0000)]
netifd: rename 20-smp-tune to 20-smp-packet-steering

Rename the script to be more obvious that this is for
packet steering only.

Signed-off-by: Alan Swanson <reiver@improbability.net>
4 years agonetifd: change RPS/XPS handling to all CPUs and disable by default
Alan Swanson [Fri, 15 Nov 2019 14:05:35 +0000 (14:05 +0000)]
netifd: change RPS/XPS handling to all CPUs and disable by default

The current implementation is significantly lowering lantiq
performace [1][2] by using RPS with non-irq CPUs and XPS
with alternating CPUs.

The previous netifd implementation (by default but could be
configured) simply used all CPUs and this patch essentially
reverts to this behaviour.

The only document suggesting using non-interrupt CPUs is Red
Hat [3] where if the network interrupt rate is extremely high
excluding the CPU that handles network interrupts *may* also
improve performance.

The original packet steering patches [4] advise that optimal
settings for the CPU mask seems to depend on architectures
and cache hierarcy so one size does not fit all. It also
advises that the overhead in processing for a lightly loaded
server can cause performance degradation.

Ideally, proper IRQ balancing is a better option with
the irqbalance daemon or manually.

The kernel does not enable packet steering by default, so
also disable in OpenWRT by default. (Though mvebu with its
hardware scheduling issues [5] might want to enable packet
steering by default.)

Change undocumented "default_ps" parameter to clearer
"packet_steering" parameter. The old parameter was only ever
set in target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps
and matched the default.

[1] https://forum.openwrt.org/t/18-06-4-speed-fix-for-bt-homehub-5a
[2] https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=1105
[3] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/performance_tuning_guide/network-rps
[4] https://marc.info/?l=linux-netdev&m=125792239522685&w=2
[5] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=2e1f6f1682d3974d8ea52310e460f1bbe470390f

Fixes: #1852
Fixes: #2573
Signed-off-by: Alan Swanson <reiver@improbability.net>
4 years agoramips: mt7530: more detailed output for unexpected etag_ctrl
Yousong Zhou [Thu, 6 Feb 2020 09:17:17 +0000 (17:17 +0800)]
ramips: mt7530: more detailed output for unexpected etag_ctrl

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agoramips: mt7530: remove redundant global attrs for port mirroring
Yousong Zhou [Thu, 6 Feb 2020 09:11:39 +0000 (17:11 +0800)]
ramips: mt7530: remove redundant global attrs for port mirroring

Global attributes enable_mirror_tx/enable_mirror_rx depend on runtime
value of another global attribute mirror_source_port which just resides
in the memory

The same functionality can be achieved by directly setting port
attribute of the same names.  E.g. the following two groups of commands
achieve the same thing

swconfig dev switch0 set mirror_source_port 3
swconfig dev switch0 set enable_mirror_tx 1
swconfig dev switch0 set mirror_source_port 4
swconfig dev switch0 set enable_mirror_tx 1

swconfig dev switch0 port 3 set enable_mirror_tx 1
swconfig dev switch0 port 4 set enable_mirror_tx 1

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
4 years agobcm53xx: fix ASUS firmwares to use vendor format
Rafał Miłecki [Mon, 2 Mar 2020 21:03:09 +0000 (22:03 +0100)]
bcm53xx: fix ASUS firmwares to use vendor format

Image building process was missing "asus-trx" step which resulted in raw
TRX files (without ASUS footer with device id).

Fixes: 0b9de8daa70e ("bcm53xx: add profiles for all other (SoftMAC) devices")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years agokernel: iio: fix st-accel dependencies properly
Petr Štetiar [Mon, 2 Mar 2020 11:11:58 +0000 (12:11 +0100)]
kernel: iio: fix st-accel dependencies properly

Add missing register map access SPI/I2C modules.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agobuild: simplify gnu-getopt search
Kevin Darbyshire-Bryant [Sat, 29 Feb 2020 16:50:52 +0000 (16:50 +0000)]
build: simplify gnu-getopt search

getopt is the only command where /usr/local/bin is specified explicitly.
All other commands are assumed to exist in the PATH in one form or
another.  Remove this exception and require gnugetopt/getopt to be in
the user's PATH.

In the case of macos Homebrew, getopt is 'keg only' hence not linked
into /usr/local/bin whilst other commands are linked and likely found by
virtue of /usr/local/bin being in PATH.

Since 2019 Homebrew is very reluctant to install links that have
potential to override default OS behaviour, eg: following instructions
on our current 'how to build on macos' wiki page:

$ brew ln gnu-getopt --force
Warning: Refusing to link macOS-provided software: gnu-getopt
If you need to have gnu-getopt first in your PATH run:
  echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.zshrc

A better option for macos is to link getopt as 'gnugetopt' in
/usr/local/bin, thus the build system will find 'gnugetopt' but other
applications looking for just 'getopt' will find the original macos
binary.

Ultimately it makes sense that 'GNU' dependencies are placed in
/usr/local/bin and /usr/local/bin is included in the user's PATH.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agokernel: x86_64: drop CALGARY IOMMU on 5.4
Kevin Darbyshire-Bryant [Fri, 28 Feb 2020 18:27:02 +0000 (18:27 +0000)]
kernel: x86_64: drop CALGARY IOMMU on 5.4

It's snuck back in on kernel 5.4 configs, so drop it there too.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agokernel: iio: fix st-accel missing dependency
Petr Štetiar [Mon, 2 Mar 2020 07:40:48 +0000 (08:40 +0100)]
kernel: iio: fix st-accel missing dependency

Fixes following build error on mpc85xx/p2020:

 Package kmod-iio-st_accel is missing dependencies for the following libraries:
  regmap-core.ko

Fixes: 2d8f4c4fbd46 ("kernel: iio: add st-accel driver modules")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoramips: mt7620: disable images for Netgear 2700
Petr Štetiar [Mon, 2 Mar 2020 07:30:31 +0000 (08:30 +0100)]
ramips: mt7620: disable images for Netgear 2700

Because openwrt-ramips-mt7620-netgear_ex2700-squashfs-factory.bin is too big.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoar71xx: add missing LED migration for Archer C7
David Bauer [Sun, 1 Mar 2020 20:31:29 +0000 (21:31 +0100)]
ar71xx: add missing LED migration for Archer C7

When changing the LED names for the Archer C7 to represent the correct
color, a migration for existing UCI entries was not created.

Add a migration to keep existing LED configurations working.

Fixes commit c79c001b593b ("ar71xx: Archer C7 v1 LED names and RFKILL
fixes")

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agox86: add preinit hook for bootloader upgrade
Tomasz Maciej Nowak [Tue, 14 Jan 2020 17:45:45 +0000 (18:45 +0100)]
x86: add preinit hook for bootloader upgrade

This commit fills the void for current OpenWrt installations which will
be still on old bootloader version even after "x86: add bootloader
upgrade on sysupgrade", since it performs bootloader upgrade only on
sysupgrade. To keep all OpenWrt deploynents on the same GRUB version,
add preinit hook, which will perform upgrade of the bootloader on first
boot after sysupgrade.

It's temporary solution and should be deleted, when the first release
including this hook will no longer be supported by OpenWrt team.
We can assume that all installations should be on current bootolader
version and from there sysupgrade routine will be sufficient.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agox86: add bootloader upgrade on sysupgrade
Tomasz Maciej Nowak [Tue, 14 Jan 2020 17:45:44 +0000 (18:45 +0100)]
x86: add bootloader upgrade on sysupgrade

Currently bootloader always stays on the same version as when first
written to boot medium (not true if partition layout changed, which will
trigger sysupgrade process to write full disk image). That creates
inconveniences as it always stays with same features or/and bugs. Users
wishing to add support to additional modules or new version, would need
to write the whole image, potentially destroying previous system
configuration. To fix these, this commit adds additional routine to
sysupgrade which upgrades unconditionally the bootloader to the latest
state provided by OpenWrt.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agox86: image: cleanup before creating image
Tomasz Maciej Nowak [Tue, 14 Jan 2020 17:45:43 +0000 (18:45 +0100)]
x86: image: cleanup before creating image

There can be some leftovers from other image recipes, if the same
directory names are used and multiply image types are selected.
Therefore remove directories used in the recipe, before contents for the
image are prepared.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agokernel: iio: add fxos8700 driver support
Tim Harvey [Fri, 28 Feb 2020 18:49:54 +0000 (10:49 -0800)]
kernel: iio: add fxos8700 driver support

Adds various kernel modules for Freescale FXOS8700 3-axis accelerometer.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: iio: add st-accel driver modules
Tim Harvey [Fri, 28 Feb 2020 16:56:24 +0000 (08:56 -0800)]
kernel: iio: add st-accel driver modules

Adds kernel modules for various STMicroelectronics accelerometers.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoimx6: 5.4: dts: backport lsm9ds1 imu support for GW553x
Tim Harvey [Fri, 28 Feb 2020 19:33:56 +0000 (11:33 -0800)]
imx6: 5.4: dts: backport lsm9ds1 imu support for GW553x

Add one node for the accel/gyro i2c device and another for the separate
magnetometer device in the lsm9ds1.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[commit subject/description tweaks, kernel version in patch filename]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: 5.4: backport fxos8700 accel support from 5.5
Tim Harvey [Fri, 28 Feb 2020 18:49:53 +0000 (10:49 -0800)]
kernel: 5.4: backport fxos8700 accel support from 5.5

Backport kernel module from 5.5 for FXOS8700CQ, which is a small,
low-power, 3-axis linear accelerometer and 3-axis magnetometer combined
into a single package. The device features a selectable I2C or
point-to-point SPI serial interface with 14-bit accelerometer and 16-bit
magnetometer ADC resolution along with smart-embedded functions.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: can: add MCP251x CAN controller module support
Tim Harvey [Fri, 28 Feb 2020 16:56:44 +0000 (08:56 -0800)]
kernel: can: add MCP251x CAN controller module support

Adds kernel module for Microchip MCP251x SPI CAN controller.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[added missing commit description]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agomkrasimage: fix segmentation fault
Michael T Farnworth [Sat, 22 Feb 2020 14:20:49 +0000 (14:20 +0000)]
mkrasimage: fix segmentation fault

Code was attempting to determine the size of the file
before it was actually known and allocating insufficient
memory space.  Images above a certain size caused a
segmentation fault.  Moving the calloc() ensured ensured
that large images didn't result in a buffer overflow on
memcpy().

Signed-off-by: Michael T Farnworth <michael@turf.org>
[fixed name in From to match one in SoB]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agotools/pkgconf: Run pkg-config wrapper through shellcheck
Rosen Penev [Thu, 28 Nov 2019 19:19:32 +0000 (11:19 -0800)]
tools/pkgconf: Run pkg-config wrapper through shellcheck

Mainly quoting fixes.

Separated parameters by \ for easier readability.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agotools/pkg-config: Replace with pkgconf
Rosen Penev [Thu, 28 Nov 2019 19:19:31 +0000 (11:19 -0800)]
tools/pkg-config: Replace with pkgconf

pkgconf is a newer, actively maintained implementation of pkg-config that
supports more aspects of the pkg-config file specification and provides a
library interface that applications can use to incorporate intelligent
handling of pkg-config files into themselves (such as build file
generators, IDEs, and compilers). Through its pkg-config compatibility
interface (activated when it is run as "pkg-config"), it also can
completely replace the original implementation.

It is also lighterweight and does not require glib2, as pkg-config does.

On other distros, pkgconf is symlinked to pkg-config. For simplicity here,
it is renamed to pkg-config.real, as in the original package.

Initial results have been positive. As before, pkgconf works as long as
the pkg-config files point to the proper paths.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[backported upstream fix for Meson]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agouboot-mvebu: point to UBOOT_CONFIG when setting options
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:27 +0000 (16:33 +0100)]
uboot-mvebu: point to UBOOT_CONFIG when setting options

The BUILD_VARIANT might differ from UBOOT_CONFIG, so point to a file we
are actually changing. Being here let's call 'Build/Configure/U-Boot'
definition, instead of definig the same command. This'll be more future
proof, if U-Boot configuration procedure will change.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: uDPU: drop patch compiling dtb
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:26 +0000 (16:33 +0100)]
mvebu: uDPU: drop patch compiling dtb

If device recipe has specified DEVICE_DTS variable, the dtb is built
anyway by OpenWrt buildroot image rules. Drop the patch and adjust the
location of compiled dtb.

Cc: Scott Roberts <ttocsr@gmail.com>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: image: rework uDPU-firmware recipe
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:25 +0000 (16:33 +0100)]
mvebu: image: rework uDPU-firmware recipe

Tar has ability to change current dir, so use that instead additional
command invocation. Also being here, change tar arguments to make final
archive reproducible.

Cc: Scott Roberts <ttocsr@gmail.com>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: uDPU: clean package selection
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:24 +0000 (16:33 +0100)]
mvebu: uDPU: clean package selection

This device receipe selects bunch of packages which some are re-defined,
unnecessary or irrelevant. Clean them up, so only basic functionality
persist.

Cc: Scott Roberts <ttocsr@gmail.com>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: image: keep global DTS_DIR intact
Tomasz Maciej Nowak [Mon, 10 Feb 2020 15:33:23 +0000 (16:33 +0100)]
mvebu: image: keep global DTS_DIR intact

Don't rewrite global DTS_DIR, instead, use proper variable for
specifying devices dts directory. For consistency, also specify the
variable in default profile, as suggested by Adrian Schmutzler.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agotools: Fix "lib" symlink created inside $(STAGING_DIR_HOST)/lib
Jeffery To [Tue, 18 Feb 2020 21:37:22 +0000 (05:37 +0800)]
tools: Fix "lib" symlink created inside $(STAGING_DIR_HOST)/lib

Currently, if "make tools/install" is called after tools have already
been installed, a symbolic link named "lib" will be created inside
$(STAGING_DIR_HOST)/lib, pointing to "lib" (i.e. itself).

During tools/prepare, a "lib64" symlink is created inside
$(STAGING_DIR_HOST) that points to "lib" (also inside
$(STAGING_DIR_HOST)).

If tools/prepare is called and the "lib64" symlink already exists, then
ln will treat it as a directory and instead create a symlink named "lib"
inside of that directory.

This adds the -n option for ln so that $(STAGING_DIR_HOST)/lib64 is
always treated as a normal file (the link name), not as a directory.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agobuild: Fix directory symlinks not removed when cleaning STAGING_DIR
Jeffery To [Tue, 18 Feb 2020 21:15:04 +0000 (05:15 +0800)]
build: Fix directory symlinks not removed when cleaning STAGING_DIR

Currently, a symbolic link whose target is a directory will not be
removed when cleaning packages from STAGING_DIR.

In the first cleaning pass in scripts/clean-package.sh, the -f test for
a directory symlink returns false (because the link target is a
directory) and so the symlink is not removed.

In the second pass, the -d test returns true for a directory symlink,
but the symlink is not removed by rmdir because rmdir only removes
(real) directories.

This updates clean-package.sh to remove all non-directories (including
symbolic links) in the first pass.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agobuild: Remove STAGING_DIR_HOST references for InstallDev/UninstallDev
Jeffery To [Sat, 8 Jun 2019 22:00:47 +0000 (06:00 +0800)]
build: Remove STAGING_DIR_HOST references for InstallDev/UninstallDev

Build/InstallDev no longer places a file list in
$(STAGING_DIR_HOST)/packages; this change removes the creation of
$(STAGING_DIR_HOST)/packages and the attempted removal of a
STAGING_DIR_HOST file list during package clean.

This also changes the host directory passed to Build/UninstallDev from
$(STAGING_DIR_HOST) to $(STAGING_DIR)/host, to match the directory
passed to Build/InstallDev.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agobase-files: Add /etc/shinit for non-login shell init
Jeffery To [Thu, 2 May 2019 18:24:27 +0000 (02:24 +0800)]
base-files: Add /etc/shinit for non-login shell init

Because /etc/profile (and ~/.profile) are read by login shells only,
aliases and functions defined there are not available to non-login
shells, e.g. when using screen or tmux.

If the ENV environment variable exists (exported by /etc/profile or
~/.profile) and references an existing file, then all interactive shells
(login or non-login) will read that file as well.

This sets the ENV environment variable in /etc/profile, pointing to
/etc/shinit.

This also adds /etc/shinit, which:

* Contains alias and function definitions originally in /etc/profile

* Sources /etc/mkshrc if the user is using mksh (also originally in
  /etc/profile), as /etc/mkshrc is meant for all interactive shells

* Sources ~/.mkshrc if the user is using mksh, to compensate for the
  fact that mksh will not read ~/.mkshrc if ENV is set

* Sources ~/.shinit if the user is not using mksh

This also removes the shebang from /etc/profile, as the file is sourced,
not executed.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
4 years agoppp: activate PIE ASLR by default
Petr Štetiar [Thu, 20 Feb 2020 09:46:49 +0000 (10:46 +0100)]
ppp: activate PIE ASLR by default

This activates PIE ASLR support by default when the regular option is
selected.

Size increase on imx6:

 112681 ppp_2.4.8-2_arm_cortex-a9_neon.ipk
 121879 ppp_2.4.8-2_arm_cortex-a9_neon.ipk
 = 9198 diff

Acked-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agolibpcap: activate PIE ASLR by default
Stijn Tintel [Sat, 22 Feb 2020 09:40:26 +0000 (11:40 +0200)]
libpcap: activate PIE ASLR by default

This activates PIE ASLR support by default when the regular option is
selected. This is required to enable PIE ASLR support by default in ppp,
as it fails to build without it, on x86/64.

The .so file size stays identical.

Suggested-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
4 years agoar71xx: correct AVM FRITZ Repeater 450E WPS button flag
David Bauer [Sun, 1 Mar 2020 17:36:17 +0000 (18:36 +0100)]
ar71xx: correct AVM FRITZ Repeater 450E WPS button flag

The AVM FRITZ!WLAN Repeater 450E's WPS button is not active low.

Correct the active low flag to avoid unintenional activation of
failsafe mode on boot.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agolinux-5.4: backport ARM symbol export fix
Álvaro Fernández Rojas [Sun, 1 Mar 2020 14:51:31 +0000 (15:51 +0100)]
linux-5.4: backport ARM symbol export fix

Fixes the following warning for ARM targets:
  WARNING: "return_address" [vmlinux] is a static EXPORT_SYMBOL_GPL

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agolinux-5.4: backport modpost upstream patches
Álvaro Fernández Rojas [Sun, 1 Mar 2020 14:50:37 +0000 (15:50 +0100)]
linux-5.4: backport modpost upstream patches

Fixes modpost Segmentation Fault with bcm2708 and bcm2709:
  MODPOST vmlinux.o
  Segmentation fault
  make[6]: *** [scripts/Makefile.modpost:66: __modpost] Error 139

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: bcm2708: refresh linux 5.4 config
Álvaro Fernández Rojas [Sun, 1 Mar 2020 12:43:29 +0000 (13:43 +0100)]
bcm27xx: bcm2708: refresh linux 5.4 config

I missed this when adding linux 5.4 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agompc85xx: disable kernel uImage generation
David Bauer [Sat, 29 Feb 2020 13:32:15 +0000 (14:32 +0100)]
mpc85xx: disable kernel uImage generation

The previous workaround for the unsupported mkimage xz compression
leads to the TP-Link TL-WDR4900s simpleImage bootwrapper being gzip
compressed, which does not fit the kernel partition.

Removing the uImage gerneration works around this problem.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agotreewide: move commonly disabled symbols to generic config
David Bauer [Sat, 29 Feb 2020 10:43:10 +0000 (11:43 +0100)]
treewide: move commonly disabled symbols to generic config

Move new commonly disabled kernel 5.4 symbols to the generic kernel
configuration.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agompc85xx: add missing kernel symbols
David Bauer [Sat, 29 Feb 2020 10:41:48 +0000 (11:41 +0100)]
mpc85xx: add missing kernel symbols

These symbols were previously not set. Define their state to avoid
potentially breaking builds.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agobuild: add xargs as prerequisite
Kevin Darbyshire-Bryant [Sat, 29 Feb 2020 15:28:44 +0000 (15:28 +0000)]
build: add xargs as prerequisite

Build system needs an 'xargs' that supports '-r' which darwin doesn't.
Homebrew installs a 'gxargs' with the findutils package so look for
'gxargs' as well as 'xargs'

This is a bit of a 'fun' corner case anyway. xargs is only required by
the build if 'CONFIG_AUTOREMOVE' is set and after the build system has
built 'tools/findutils' we have a fully working xargs for host anyway.
Until that time we have to rely on the host's xargs implementation.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoapm821xx: remove gpio-interrupt cruft
Christian Lamparter [Fri, 28 Feb 2020 22:44:31 +0000 (23:44 +0100)]
apm821xx: remove gpio-interrupt cruft

This hunk became obsolete the moment when our
gpio-button-hotplug learned how to deal with
interrupt-supported gpio buttons. The gpio driver
never supported interrupt handling, so these
properties never served any use (outside of a
enhanced ppc4xx-gpio driver that was dropped).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agomvebu: fix build regression due to neon-asm ghash module
Christian Lamparter [Sat, 29 Feb 2020 12:57:09 +0000 (13:57 +0100)]
mvebu: fix build regression due to neon-asm ghash module

This patch fixes the regression caused by adding the NEON
variant of the ghash as the default ghash package package:

> ERROR: module '[...]/arch/arm/crypto/ghash-arm-ce.ko' is missing.
> modules/crypto.mk:286: recipe for target
>  '[...]/kmod-crypto-ghash_4.19.106-1_aarch64_cortex-a53.ipk' failed

This patch limits the scope to the ARM32/cortexa9 target of mvebu.

Fixes: 285df63efc70 ("kernel: build neon-asm version of ghash module")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agobcm27xx: add linux 5.4 support
Álvaro Fernández Rojas [Sat, 29 Feb 2020 08:25:20 +0000 (09:25 +0100)]
bcm27xx: add linux 5.4 support

Tested on bcm2710 (Raspberry Pi 3B).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: update kernel configs
Álvaro Fernández Rojas [Sat, 29 Feb 2020 10:51:58 +0000 (11:51 +0100)]
bcm27xx: update kernel configs

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx: update to latest patches from RPi foundation
Álvaro Fernández Rojas [Fri, 28 Feb 2020 18:59:52 +0000 (19:59 +0100)]
bcm27xx: update to latest patches from RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agobcm27xx-gpu-fw: update to latest version
Álvaro Fernández Rojas [Fri, 28 Feb 2020 18:36:17 +0000 (19:36 +0100)]
bcm27xx-gpu-fw: update to latest version

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agospi: ath79: remove spi-master setup and cleanup assignment
David Bauer [Fri, 28 Feb 2020 23:54:41 +0000 (00:54 +0100)]
spi: ath79: remove spi-master setup and cleanup assignment

This removes the assignment of setup and cleanup functions for the ath79
target. Assigning the setup-method will lead to 'setup_transfer' not
being assigned in spi_bitbang_init.

Also drop the redundant cleanup assignment, as this also happens in
spi_bitbang_init.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agompc85xx: move NAND symbol to target config
David Bauer [Fri, 28 Feb 2020 23:11:59 +0000 (00:11 +0100)]
mpc85xx: move NAND symbol to target config

All mpc85xx subtargets utilize NAND, thus enable NAND support
target-wide.

Fixes: 1287bb48dc72 ("mpc85xx: fix build with kernel 5.4")
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agompc85xx: fix build with kernel 5.4
David Bauer [Mon, 24 Feb 2020 21:49:45 +0000 (22:49 +0100)]
mpc85xx: fix build with kernel 5.4

This fixes some outstanding issues with the Kernel 5.4 build:

 * Adds missing support patch for the Enterasys WS-AP3710i
 * Fixes incorrect NAND symbols
 * Adds patch for broken image wrapping

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoapm821xx: 5.4: add important NAND symbols
Christian Lamparter [Fri, 14 Feb 2020 16:19:53 +0000 (17:19 +0100)]
apm821xx: 5.4: add important NAND symbols

This patch adds important NAND config symbols.
These are necessary as otherwise the devices
won't find the rootfs on the NAND chips.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: 5.4: refresh patches and config
Christian Lamparter [Fri, 28 Feb 2020 20:15:48 +0000 (21:15 +0100)]
ipq40xx: 5.4: refresh patches and config

This patch just refreshes the 5.4 patches. It seems as if
070-v4.20-soc-qcom-spm-add-SCM-probe-dependency.patch is
already applied, so drop it. It also does a quick
make kernel_oldconfig to get rid of unneeded symbols.

[Looks like USB and Ethernet need some more work].

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agokernel: 5.4: add unconfigured symbols
Christian Lamparter [Fri, 28 Feb 2020 19:46:09 +0000 (20:46 +0100)]
kernel: 5.4: add unconfigured symbols

This patch adds a few more symbols that I found that
need disabling in order to not break the automatic build.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agokernel: build arm/neon-optimized sha1/512 modules
Eneas U de Queiroz [Mon, 24 Feb 2020 17:37:58 +0000 (14:37 -0300)]
kernel: build arm/neon-optimized sha1/512 modules

This builds the regular arm and arm-neon asm optmized modules for sha1
and sha512, for targets that set CONFIG_ARM_CRYPTO.

On ip40xx, the arm-asm version of sha1 improves performance by 5% over
the generic C implementation; sha1-neon is 25% faster than generic,
and sha512-neon, 259%.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agokernel: build neon-asm version of ghash module
Eneas U de Queiroz [Mon, 24 Feb 2020 12:59:38 +0000 (09:59 -0300)]
kernel: build neon-asm version of ghash module

This alone improves AES-GCM performance by up to 50% on ipq40xx.  This
is enabled for targets that support neon and set CONFIG_ARM_CRYPTO:
imx6, ipq40xx, and mvebu.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agoipq40xx: qce - add fixes for AES ciphers
Eneas U de Queiroz [Fri, 20 Dec 2019 13:52:17 +0000 (10:52 -0300)]
ipq40xx: qce - add fixes for AES ciphers

This backports commits from master that fix AES ciphers when using the
qce driver:

 - A couple of simple fixes for CTR and XTS modes used with AES:
   * 041-crypto-qce-fix-ctr-aes-qce-block-chunk-sizes.patch
   * 042-crypto-qce-fix-xts-aes-qce-key-sizes.patch

 - A fix for a bug that affected cases when there were more entries in
   the input sg list than necessary to actually encrypt, resulting in
   failure in gcm, where the authentication tag is present after the
   encryption data:
   * 043-crypto-qce-save-a-sg-table-slot-for-result-buf.patch

 - A fix to update the IV buffer passed to the driver from the kernel:
   * 044-crypto-qce-update-the-skcipher-IV.patch

 - A patch that reduces memory footprint and driver initialization by
   only initializing the fallback mechanism where it is actually used:
   * 046-crypto-qce-initialize-fallback-only-for-AES.patch

 - Three patches that make gcm and xts modes work with the qce driver,
   and improve performance with small blocks:
   * 047-crypto-qce-use-cryptlen-when-adding-extra-sgl.patch
   * 048-crypto-qce-use-AES-fallback-for-small-requests.patch
   * 049-crypto-qce-handle-AES-XTS-cases-that-qce-fails.patch

 - A patch that allows the hashes/ciphers to be built individually.
   * 051-crypto-qce-allow-building-only-hashes-ciphers.patch

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[renumbered patches, added patches from dropped commit, refreshed, 5.4]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: use neon crypto drivers
Eneas U de Queiroz [Fri, 21 Feb 2020 18:44:39 +0000 (15:44 -0300)]
ipq40xx: use neon crypto drivers

This adds the neon based implementations of AES & SHA256.

For AES, according to the kernel config help:

Use a faster and more secure NEON based implementation of AES in CBC,
CTR and XTS modes.
Bit sliced AES gives around 45% speedup on Cortex-A15 for CTR mode
and for XTS mode encryption, CBC and XTS mode decryption speedup is
around 25%. (CBC encryption speed is not affected by this driver.)
This implementation does not rely on any lookup tables so it is
believed to be invulnerable to cache timing attacks.
...
The observed speedups on ipq40xx are more modest: speedup is around 20%
for CTR mode and for XTS mode encryption, CBC and XTS mode decryption
speedup is around 10%. Measurements were made using tcrypt, with
1024-bytes blocks for CTR & CBC, and 4096-bytes for XTS.
The aes-neon-bs driver uses a fallback for CBC encryption; that fallback
could be either the generic driver written in C, or the scalar arm-asm
one.  Even though aes-arm is 1.9% slower, it is more resilient to timing
attacks (the reason for being slower), so it is being included here.

The neon sha256 module increases performance over the generic module by
33%.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[Enable only ciphers for now, reorder patch in series to help bisect
as new symbols could lead to build failures, 5.4]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: qce - switch to skcipher API
Eneas U de Queiroz [Fri, 20 Dec 2019 13:37:21 +0000 (10:37 -0300)]
ipq40xx: qce - switch to skcipher API

This backports a commit updating the API of the QCE crypto engine to
what is used in current kerenl, easing future upstream backports.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
[renumber patches, refreshed, added 5.4 patches]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agokernel: 4.19,5.4: disable ARM CE & NEON
Christian Lamparter [Wed, 26 Feb 2020 21:25:34 +0000 (22:25 +0100)]
kernel: 4.19,5.4: disable ARM CE & NEON

This patch disables the CRYPTO KERNEL SYMBOLs that are touched
by the upcoming ipq40xx patch "ipq40xx: use neon crypto drivers"
from "Eneas U de Queiroz" and more so for his follow up patches
for the  other ARM targets in this series. This should help to
prevent at least a few potential build errors on other archs.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq40xx: add support for EnGenius EAP2200
Steven Lin [Mon, 2 Sep 2019 02:39:45 +0000 (10:39 +0800)]
ipq40xx: add support for EnGenius EAP2200

SOC:    IPQ4019 / QCA Dakota
CPU:    Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7
DRAM:   256 MiB
FLASH:  NOR 4 MiB + NAND 128 MiB
ETH:    Qualcomm Atheros QCA8072
WLAN1:  Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2:2x2
WLAN2:  Qualcomm Atheros QCA4019 5GHz 802.11a/n/ac 2:2x2
WLAN2:  Qualcomm Atheros QCA9888 5GHz 802.11a/n/ac 2:2x2
INPUT:  WPS Button
LEDS:   Power, LAN1, LAN2, WLAN 2.4GHz, WLAN 5GHz-1, WLAN 5GHz-2, OPMODE

1. Load Ramdisk via U-Boot

To set up the flash memory environment, do the following:
a. As a preliminary step, ensure that the board console port is connected to the PC using these RS232 parameters:
   * 115200bps
   * 8N1
b. Confirm that the PC is connected to the board using one of the Ethernet ports.
c. Set a static ip 192.168.99.8 for Ethernet that connects to board.
d. The PC must have a TFTP server launched and listening on the interface to which the board is connected.
e. At this stage power up the board and, after a few seconds, press 4 and then any key during the countdown.

U-BOOT> set serverip 192.168.99.9 && tftpboot 0x84000000 192.168.99.8:openwrt.itb && bootm

Signed-off-by: Steven Lin <steven.lin@senao.com>
[copied 4.19 dts to 5.4]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoipq807x: fix indent in image/Makefile
Adrian Schmutzler [Fri, 28 Feb 2020 19:00:10 +0000 (20:00 +0100)]
ipq807x: fix indent in image/Makefile

Convert space indent to tab like the rest of the file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>