openwrt/staging/jow.git
5 years agoutil-linux: Update to 2.32.1
Daniel Engberg [Sun, 12 Aug 2018 22:01:56 +0000 (00:01 +0200)]
util-linux: Update to 2.32.1

Update util-linux to 2.32.1
For release notes see https://lwn.net/Articles/759922/

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from d1ea8ac3b476e1e552f42dbf1042b521c57a0df4)

5 years agolantiq: add support for upgrade led
Mathias Kresin [Wed, 15 Aug 2018 18:18:26 +0000 (20:18 +0200)]
lantiq: add support for upgrade led

Indicate a (sys)upgrade via leds as well. It brings the lantiq diag.sh
script en par with the other implementations using devicetree aliases
to define multiple leds for boot status indication.

By default, use the boot finished led to indicate an upgrade for now.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from c9e9a787343fb9190b5491188025bcfdebc94beb)

5 years agotreewide: drop unused get_status_led functions
Mathias Kresin [Wed, 15 Aug 2018 17:23:44 +0000 (19:23 +0200)]
treewide: drop unused get_status_led functions

The function isn't used for targets getting the status leds from the
devicetree.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from be06c726c4f7275325dd380ca151963dd7597638)

5 years agotreewide: consolidate upgrade state set
Mathias Kresin [Wed, 15 Aug 2018 16:55:01 +0000 (18:55 +0200)]
treewide: consolidate upgrade state set

Set the (sys)upgrade state when sourcing the stage2 script instead of
setting the state for each target individual.

This change fixes the, due to a missing state set, not working upgrade
led on ath79 and apm821xx.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 56b8ac1e86eb5b0c500cbf8db60ce00aff01bcec)

5 years agoramips: mt7620: fix bad indent
Mathias Kresin [Wed, 15 Aug 2018 16:34:57 +0000 (18:34 +0200)]
ramips: mt7620: fix bad indent

Fix the indent to make the make it obvious which condition is the
parent of the loop.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 1ea1f3a223d7a56f96de00001f59b077a6c4d237)

5 years agoramips: add support for D-Link DWR-118-A2
Cezary Jackiewicz [Thu, 19 Apr 2018 17:34:22 +0000 (19:34 +0200)]
ramips: add support for D-Link DWR-118-A2

The DWR-118-A2 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 128 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7612EN)
- 4x 10/100 Mbps Ethernet (1 WAN and 3 LAN)
- 1x 10/100/1000 Mbps Marvell Ethernet PHY (1 LAN)
- 2x external, non-detachable antennas
- 1x USB 2.0
- UART (J1) header on PCB (57600 8n1)
- 7x LED (5x GPIO-controlled), 2x button
- JBOOT bootloader

Known issues:
- GELAN not working
- flash is very slow

The status led has been assigned to the dwr-118-a2:green:internet led.
At the end of the boot it is switched off and is available for other
operation. Work correctly also during sysupgrade operation.

Installation:
Apply factory image via http web-gui or JBOOT recovery page

How to revert to OEM firmware:
- push the reset button and turn on the power. Wait until LED start
  blinking (~10sec.)
- upload original factory image via JBOOT http (IP: 192.168.123.254)

Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(backported from 37af596593b0e84d0a076ab8f173066e3d7bc810)

5 years agoramips: mt7620: enable all ports unconditionally
Pawel Dembicki [Wed, 18 Jul 2018 04:31:36 +0000 (04:31 +0000)]
ramips: mt7620: enable all ports unconditionally

This patch make all mt7620 ephy ports turned on.
It is necessary for some JBOOT devices.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
(backported from 4877ad44c718debfa75533aedaaf3dfd0faeb6f0)

5 years agoramips: add support for HiWiFi HC5861B
Deng Qingfang [Thu, 9 Aug 2018 17:22:46 +0000 (01:22 +0800)]
ramips: add support for HiWiFi HC5861B

HiWiFi "Gee Enjoy1200" HC5861B is a dual-band router based on MediaTek MT7628AN
https://www.hiwifi.com/enjoy-view

Specifications:
- MediaTek MT7628AN 580MHz
- 128 MB DDR2 RAM
- 16 MB SPI Flash
- 2.4G MT7628AN 802.11bgn 2T2R 300Mbps
- 5G MT7612EN 802.11ac 2T2R 867Mbps
- 5x 10/100 Mbps Ethernet

Flash instruction:
1. Get SSH access to the router
2. SSH to router with `ssh -p 1022 root@192.168.199.1`, The SSH password is the same as the webconfig one
3. Upload OpenWrt sysupgrade firmware into the router's `/tmp` folder with SCP
4. Run `mtd write /tmp/<filename> firmware`
5. reboot

Everything is working

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
(backported from d20f4fc628e9e3c1e1d4063a0798e4097ffb3c4a)

5 years agofirmware-utils/mksercommfw: fix build with clang/macOS
Ryan Mounce [Tue, 14 Aug 2018 04:49:29 +0000 (14:19 +0930)]
firmware-utils/mksercommfw: fix build with clang/macOS

fixes error: non-void function 'main' should return a value

Fixes: FS#1770
Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
(backported from 9c6c7d11c795cd632c4d736577d7bb65ed35d729)

5 years agofirmware-utils/mksercommfw: fix musl build
Andy Walsh [Mon, 13 Aug 2018 12:33:39 +0000 (14:33 +0200)]
firmware-utils/mksercommfw: fix musl build

* add missing <sys/types.h> for musl

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
(backported from 22b8237ba1acb90caaf867bf657f7ed7497bbeb6)

5 years agotools/cmake: Update to 3.12.1
Daniel Engberg [Sun, 12 Aug 2018 11:53:59 +0000 (13:53 +0200)]
tools/cmake: Update to 3.12.1

Update cmake to 3.12.1

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
(backported from 0578993a41fed9855a5e8ff3ce7dca7530c69fd7)

5 years agopackages: nvram: make it possible to include it for ath79 targets
Christian Lamparter [Fri, 10 Aug 2018 21:24:45 +0000 (23:24 +0200)]
packages: nvram: make it possible to include it for ath79 targets

The WD My Net Range Extender stores the MAC addresses inside the
nvram partition. This utility can extract it, but it's currently
not avilable on the ath79 target. Hence, this patch adds the
necessary target declaration, so it can be built.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from 7b1b49bd32199e8d0469efc8c02050dd740b744d)

5 years agouboot-zynq: update to 2018.07
Luis Araneda [Sat, 11 Aug 2018 20:01:56 +0000 (16:01 -0400)]
uboot-zynq: update to 2018.07

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
(backported from 09ac4aa86b889446969df10e397798c7fe961515)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoramips: fix BR-6478ACv2 support
Daniel Gimpelevich [Mon, 6 Aug 2018 17:52:28 +0000 (10:52 -0700)]
ramips: fix BR-6478ACv2 support

The wholesale changes introduced in commit f9b8328 missed this DTS file
because it hadn't been merged yet. This patch brings it in line to match
the other mt7620a devices' DTS files.

Additionally, the Internet LED is now labeled correctly and set to unused
by default, since the WAN interface is not known in every configuration.

Using sysupgrade between images before and after this commit will require
the -F flag.

Tested-by: Rohan Murch <rohan.murch@gmail.com>
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[drop internet led default setting]
Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 1d3ea7874df420ab8d3acbddf5ec9251bf79ed9b)

5 years agoramips: add support for Netgear R6120
Ludwig Thomeczek [Tue, 12 Jun 2018 19:17:23 +0000 (21:17 +0200)]
ramips: add support for Netgear R6120

This patch adds support for the Netgear R6120, aka Netgear AC1200.

Specification:
- SoC: MediaTek MT7628 (580 MHz)
- Flash: 16 MiB
- RAM: 64 MiB
- Wireless: 2.4Ghz(builtin) and 5Ghz (MT7612E)
- LAN speed: 10/100
- LAN ports: 4
- WAN speed: 10/100
- WAN ports: 1
- Serial baud rate of Bootloader and factory firmware: 57600

To flash use nmrpflash with the provided factory.img.
Flashing via webinterface will not work, for now.

Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
(backported from 5543d63fc84e64be83afaa4241369a07797f041b)

5 years agofirmware-utils: add sercomm/netgear tool
Ludwig Thomeczek [Tue, 12 Jun 2018 19:16:40 +0000 (21:16 +0200)]
firmware-utils: add sercomm/netgear tool

This adds a tool to generate a firmware file accepted
by Netgear or sercomm devices.

They use a zip-packed rootfs with header and a custom
checksum. The generated Image can be flashed via the
nmrpflash tool or the webinterface of the router.

Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
(backported from e5b802b9c2711316e26402669bee9349f4c6ec65)

5 years agoiproute2: remove libutil from InstallDev section
Hans Dedecker [Thu, 9 Aug 2018 15:42:35 +0000 (17:42 +0200)]
iproute2: remove libutil from InstallDev section

Commit 4d961538f6 added libutil to the iproute2 InstallDev section
but lead to compile issues with packages picking up the wrong libutil
since libutil is quite a generic name ...
Further libutil is rather meant for internal usage in iproute2 than a
public API; therefore let's remove it from the InstallDev section together
with ll_map.h

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from e0fbf62821eb2d06badf393ac2c62570aaf85ccd)

5 years agosunxi: change Orange Pi PC2 MUSB/power button
Antonio Silverio [Mon, 30 Jul 2018 10:26:07 +0000 (12:26 +0200)]
sunxi: change Orange Pi PC2 MUSB/power button

Changed default role of Orange Pi PC2 MSUB port to host (in dts)
Changed default function of Orange Pi PC2 power button to PWR_BTN

Signed-off-by: Antonio Silverio <menion@gmail.com>
(backported from 5f4502998a5846146a428e9cfa3f0bbc4c145bb1)

5 years agosunxi: Added support for Xunlong Orange Pi PC2
Antonio Silverio [Mon, 30 Jul 2018 09:33:03 +0000 (11:33 +0200)]
sunxi: Added support for Xunlong Orange Pi PC2

CPU: H5 High Performance Quad-core 64-bit Cortex-A53
GPU: Mali450 OpenGL ES 2.0/1.1/1.0, OpenVG 1.1, EGL
Memory: 1GB DDR3 (shared with GPU)
Onboard Storage: TF card (Max. 32GB) / NOR flash(2MB)
Onboard Network: 1000M/100M Ethernet RJ45
USB 2.0 Ports: Three USB 2.0 HOST, one USB 2.0 OTG, HOST mode
role by default in DTS
Buttons: Power Button(SW4) Debug TTL

UART: ..DC-IN..
>[GND][RX][TX] ..HDMI..

Signed-off-by: Antonio Silverio <menion@gmail.com>
(backported from e2e39328d53c0af473df0c7aad908cff4abf3dfa)

5 years agobusybox: prevent compile hang with bzip2 enabled
Rob Mosher [Wed, 8 Aug 2018 07:13:14 +0000 (03:13 -0400)]
busybox: prevent compile hang with bzip2 enabled

The BZIP2_SMALL option was not being exposed via Config.in which
caused the build to fail as 'yes' is piped to the config during
build.  As it's expecting a number, it gets stuck in a loop.

Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net>
(backported from 8a3582fa8ae9a894a299ef28d0aceac1a8c4272b)

5 years agoucert: update to lastest git HEAD
Jo-Philipp Wich [Wed, 8 Aug 2018 17:52:13 +0000 (19:52 +0200)]
ucert: update to lastest git HEAD

Update to latest HEAD in order to fix a stack memory corruption issue:

1056e73 Change the sigb buffer to be the same size as the fread

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from cc21dab6cc164ba0bc18505f241edfbae8cb53ec)

5 years agocns3xxx: correct size specifier in watchdog init print
Koen Vandeputte [Wed, 8 Aug 2018 10:40:29 +0000 (12:40 +0200)]
cns3xxx: correct size specifier in watchdog init print

fix compiler warnings

Fixes: 84acff286566 ("cns3xxx: fix mpcore watchdog")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from 915b0ba69427f1c605d8a976f19d4e88b6aa2ca0)

5 years agocns3xxx: delete invalid snip in patch
Koen Vandeputte [Wed, 8 Aug 2018 10:37:27 +0000 (12:37 +0200)]
cns3xxx: delete invalid snip in patch

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from 85a0bca7cffc7b8d26ed5fa33673188ac9fc89d0)

5 years agokernel: allow device-tree configuration of at803x
David Bauer [Mon, 6 Aug 2018 14:21:03 +0000 (16:21 +0200)]
kernel: allow device-tree configuration of at803x

This commit adds the ability to configure specific functions of the
at803x series ethernet-PHYs, which were previously configured
exclusively with the help of platform-data, via device-tree.

This is needed to fully support existing boards of the ar71xx platform.

Signed-off-by: David Bauer <mail@david-bauer.net>
(backported from fbe17867daddf76ec26be7dbf6b9af3cfad4a54f)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoiproute2: add libutil to InstallDev section
Hans Dedecker [Wed, 8 Aug 2018 12:22:11 +0000 (14:22 +0200)]
iproute2: add libutil to InstallDev section

In iproute2 v4.17 ll_map has been moved from the libnetlink to the libutil
library; add libutil as well to the staging dir in order to keep support
for ll_map

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from 4d961538f6617a6a58f9688c7bca7bf47ae1da42)

5 years agouboot-envtools: add ath79 target
David Bauer [Mon, 6 Aug 2018 14:21:01 +0000 (16:21 +0200)]
uboot-envtools: add ath79 target

This adds uci entries for all ath79 devices for which this already was
the case on ar71xx. Additionally we add the OCEDO Koala as there was no
support in OpenWRT yet.

Signed-off-by: David Bauer <mail@david-bauer.net>
(backported from 5107ba23744989fd9ed68f40ed7e0ded5966e3b7)

5 years agoramips: use #include syntax for dtsi files
Mathias Kresin [Mon, 6 Aug 2018 18:02:00 +0000 (20:02 +0200)]
ramips: use #include syntax for dtsi files

Use the same syntax for including dtsi for all dts files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 3b1213a377d9015028eac5fac3b5d94daecdc84e)

5 years agoimage: fix build without ucert
Daniel Golle [Tue, 7 Aug 2018 22:47:12 +0000 (00:47 +0200)]
image: fix build without ucert

Make sure the Shell-expression returns true also in case of
key-build.ucert being absent.

Fixes commit 848b455d2e ("image: use ucert to append signature")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from ec78f03de589adc9bd47a02d723d7054510601dd)

5 years agoimage: use ucert to append signature
Daniel Golle [Mon, 6 Aug 2018 19:20:57 +0000 (21:20 +0200)]
image: use ucert to append signature

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 848b455d2e9441361f6e010f9b95ab8a7dccbae1)

5 years agoucert: update source
Daniel Golle [Mon, 6 Aug 2018 16:00:45 +0000 (18:00 +0200)]
ucert: update source

 ad816fc set rpath to make bundle-libraries.sh happy
 63ad591 blob_buf needs to be zero'd

Now that libubox, libjson-c and libblobms_json are installed into
STAGING_DIR_HOST we can properly bundle ucert in the ImageBuilder.
Follow-up commits will make use of it to include a signature-chain in
sysupgrade images using fwtool.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(backported from 7a52ce3fafab59a17f692a3a24717c8b0f358407)

5 years agocns3xxx: ethernet: use circular queue checks consistently
Koen Vandeputte [Tue, 7 Aug 2018 09:44:36 +0000 (11:44 +0200)]
cns3xxx: ethernet: use circular queue checks consistently

Use the same method for setting queue index pointers consistenly
throughout the source file.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from 0d283c0180a22610ed5bee988902525dee90cc71)

5 years agocns3xxx: ethernet: cleanup code
Koen Vandeputte [Tue, 7 Aug 2018 09:18:08 +0000 (11:18 +0200)]
cns3xxx: ethernet: cleanup code

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from 06beefd6d54c9491c93f03dfdd6174fd29dd3ad8)

5 years agocns3xxx: ethernet: fix signed/unsigned comparison
Koen Vandeputte [Tue, 7 Aug 2018 08:52:53 +0000 (10:52 +0200)]
cns3xxx: ethernet: fix signed/unsigned comparison

Fixes a compiler warning

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from 23cdbf2644dcbb3538b5e3341122a83603afeb3f)

5 years agocns3xxx: add myself as maintainer
Koen Vandeputte [Tue, 7 Aug 2018 10:43:53 +0000 (12:43 +0200)]
cns3xxx: add myself as maintainer

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from d1aa6bd69889f03bc4642e52be724a199057c91f)

5 years agoprocd: update to latest git HEAD
Hans Dedecker [Mon, 6 Aug 2018 20:19:12 +0000 (22:19 +0200)]
procd: update to latest git HEAD

e29966f Allow disabling seccomp or changing the whitelist
5f57223 trace: Use properly sized type for PTRACE_GETEVENTMSG
747efb6 procd: fix ustream deadlock when there are 0 bytes or no newlines

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from 9537c1a153591d2f6082a797d1d088c5d921e9cc)

5 years agoRevert "netfilter: separate IPv6 relevant kernel modules from IPv4"
Jo-Philipp Wich [Mon, 6 Aug 2018 17:46:31 +0000 (19:46 +0200)]
Revert "netfilter: separate IPv6 relevant kernel modules from IPv4"

This reverts commit 42a3c6465a230a4e03f2a185f4db5ac57b89f673.

The change was apparently never build-tested with all kmods enabled. I took
a brief look but found no simple way to untangle this, so revert it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 93ac8b03b04e8b414e5aea0ac4e986585931c1fe)

5 years agonetfilter: separate IPv6 relevant kernel modules from IPv4
Rosy Song [Sat, 4 Aug 2018 02:25:54 +0000 (10:25 +0800)]
netfilter: separate IPv6 relevant kernel modules from IPv4

Signed-off-by: Rosy Song <rosysong@rosinson.com>
(backported from 42a3c6465a230a4e03f2a185f4db5ac57b89f673)

5 years agokernel: modules: fix kmod-regmap redux
Christian Lamparter [Fri, 3 Aug 2018 21:49:22 +0000 (23:49 +0200)]
kernel: modules: fix kmod-regmap redux

Jonas Gorski commented on the previous patch:
|This is actually the wrong fix and papers over an issue in one of our
|local patches.
|
|We intentionally allow regmap to be built as a module, see
|
|/target/linux/generic/hack-4.14/259-regmap_dynamic.patch
|[...]
|[The regulator code] optionally supports regmap thanks to the stubs
|provided if regmap is disabled - which breaks if you compile regmap
|as a module.

In order to mitigate this issue, this patch reverts the previous patch
and replaces the existing IS_ENABLED(CONFIG_REGMAP) with
IS_REACHABLE(CONFIG_REGMAP). This solves this particular issue as the
regulator code will now automatically fallback to the regmap stubs in
case the kmod-regmap module is enabled, but nothing else sets
CONFIG_REGMAP=y.

Note: There's still a potential issue that this patch doesn't solve:
If someone ever wants to make a OpenWrt kernel package for a
regulator module that requires the REGMAP feature for a target that
doesn't set CONFIG_REGMAP=y but has CONFIG_REGULATOR=y, the resulting
kmod-regulator-xyz package will not work on the target.
Luckily, there aren't any in-tree OpenWrt kernel module packages for
regulators at the moment. On the bright side: regmap is a critical
part nowadays and all new and upcoming architectures require it by
default. This will likely only ever be a problem for legacy targets
and devices that cannot afford to enable REGMAP.

Cc: Jonas Gorski <jonas.gorski@gmail.com>
Cc: John Crispin <john@phrozen.org>
Fixes: d00913d1215b ("kernel: modules: fix kmod-regmap")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from 3fce12568a5c38fe0361b433902a1321d34f93d7)

5 years agomt7620: gsw: make IntPHY and ExtPHY share mdio addr 4 possible
Chen Minqiang [Fri, 3 Aug 2018 17:14:07 +0000 (01:14 +0800)]
mt7620: gsw: make IntPHY and ExtPHY share mdio addr 4 possible

To share mdio addr for IntPHY and ExtPHY,
as described in the documentation (MT7620_ProgrammingGuide.pdf).
(refer: http://download.villagetelco.org/hardware/MT7620/MT7620_ProgrammingGuide.pdf)

when port4 setup to work as gmac mode, dts like:

&gsw {
    mediatek,port4 = "gmac";
};

we should set SYSCFG1.GE2_MODE==0x0 (RGMII).
but SYSCFG1.GE2_MODE may have been set to 3(RJ-45) by uboot/default
so we need to re-set it to 0x0

before this changes:
gsw: 4FE + 2GE may not work correctly and MDIO addr 4 cannot be used by ExtPHY

after this changes:
gsw: 4FE + 2GE works and MDIO addr 4 can be used by ExtPHY

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(backported from f6d81e2fa1f110d8025eaa434d67d0014aca1d42)

5 years agoramips: remove superfluous & confusing DT binding
Daniel Gimpelevich [Wed, 1 Aug 2018 14:44:20 +0000 (07:44 -0700)]
ramips: remove superfluous & confusing DT binding

Mediatek has a reference platform that pairs an MT7620A with an MT7530W,
where the latter responds on MDIO address 0x1f while both chips respond on
0x0 to 0x4. The driver special-cases this arrangement to make sure it's
talking to the right chip, but two different ways in two different places.
This patch consolidates the detection without the current requirement of
both tests to be separately satisfied in the DTS.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
(backported from 5a6229a93df8a3f292094012a43410c6a24c210e)

5 years agoramips: add support for Edimax BR-6478AC v2
Daniel Gimpelevich [Mon, 16 Jul 2018 14:19:19 +0000 (07:19 -0700)]
ramips: add support for Edimax BR-6478AC v2

Roll-up of patches by Rohan Murch, Hans Ulli Kroll, and James McKenzie.
Taken from https://forum.openwrt.org/viewtopic.php?id=67192 and updated.

Specification:
- System-On-Chip: MT7620A
- CPU/Speed: 580 MHz
- Flash-Chip: Macronix MX25L6405D
- Flash size: 8192 KiB
- RAM: 64 MiB
- Wireless No1: SoC-integrated: MT7620A 2.4GHz 802.11bgn
- Wireless No2: On-board chip: MT7612E 5GHz 802.11ac
- Switch: Mediatek MT7530W Gigabit Switch
- USB: Yes 1 x 2.0

Installation:
1. Download sysupgrade.bin
2. Open vendor web interface
3. Choose to upgrade firmware
4. After reboot connect via ethernet at 192.168.1.1

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
(backported from f72fa883b324311c1972c39ed521e536b25d674c)

5 years agoramips: move partitions into partition table node
Alex Maclean [Wed, 1 Aug 2018 20:32:34 +0000 (21:32 +0100)]
ramips: move partitions into partition table node

Starting with kernel 4.4, the use of partitions as direct subnodes of the
mtd device is discouraged and only supported for backward compatiblity
reasons.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
(backported from 6031ab345df86c285ea55d6523d6888cc596f63d)

5 years agoramips: unify partition node names in dts files
Mathias Kresin [Fri, 3 Aug 2018 18:14:49 +0000 (20:14 +0200)]
ramips: unify partition node names in dts files

Use partition@ as name for all partition nodes. Add a label where
necessary.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 6dd94c2781b79ffd20f1a57a48fa2314d67ee190)

5 years agoramips: fix whitespace and comment issues in dts
Mathias Kresin [Sun, 22 Jul 2018 08:33:42 +0000 (10:33 +0200)]
ramips: fix whitespace and comment issues in dts

Fix space vs. tabs issue and trainling whitespaces. Use C style
comments or drop the comments if they explain what is already to see in
the devicetree parameters.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from bfd65fc4ab71b9504a9280e91a67698ac4e1e06d)

5 years agoramips: fix dtc warnings
Mathias Kresin [Sat, 21 Jul 2018 21:00:20 +0000 (23:00 +0200)]
ramips: fix dtc warnings

Fix individual boards dtc warnings or obvious mistakes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 53624c1702e6aad5b3e5e442c064dd30f81db2e4)

5 years agoramips: fix hnat dtc warning
Mathias Kresin [Sat, 21 Jul 2018 16:20:59 +0000 (18:20 +0200)]
ramips: fix hnat dtc warning

The hardware NAT node has the same reg/unit as the ethernet node. One
of them need to be a child of the other.

Make the hardware NAT node a child of the ethernet node since the it
"reference" the netdev in its properties.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 6384e0d16a91cdfa1f7afc73268d9485dda8065b)

5 years agoramips: fix pci/pcie related dtc warnings
Mathias Kresin [Sat, 21 Jul 2018 14:19:46 +0000 (16:19 +0200)]
ramips: fix pci/pcie related dtc warnings

Add the ranges property to the PCI bridges where missing. Add the unit
address to PCI bridge where missing.

Rework the complete rt3883 pci node. Drop the PCI unit nodes from the
dtsi. They are not used by any dts file and should be rather in the dts
than in the SoC dtsi. Express the PCI-PCI bridge in a clean devicetree
syntax. The ralink,pci-slot isn't used by any driver, drop it. Move the
pci interrupt controller out of the pci node. It doesn't share the same
reg and therefore should be an independent/SoC child node.

Move the pci related rt3883 pinctrl setting to the dtsi instead of
defining the very same for each rt3883 board.

If the device_type property is used for PCI units, the unit is treated
as pci bridge which it isn't. Drop it for PCI units.

Reference pci-bridges or the pci node defined in the dtsi instead of
recreating the whole node hierarchy. It allows to change the referenced
node in the dtsi without the need to touch all dts.

Fix the PCI(e) wireless unit addresses. All our PCI(e) wireless chips
are the first device on the bus. The unit address has to be the bus
address instead of the PCI vendor/device id.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from f9b8328d794473fcd044197ec64abf87761793e4)

5 years agoramips: use ralink,nr-gpio instead of ralink,num-gpios
Mathias Kresin [Sat, 21 Jul 2018 17:32:51 +0000 (19:32 +0200)]
ramips: use ralink,nr-gpio instead of ralink,num-gpios

Since commit c1e7738988f5 ("checks: add gpio binding properties check")
dtc treats any *-gpios and *-gpio property as phandle at least during
checks. The only whitelisted property is nr-gpio.

Use ralink,nr-gpio in favour of ralink,num-gpios to get rid of false
positive warnings.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from d8e7a526a38499e1d1368829a76e4a0e541893b0)

5 years agoramips: fix cpu interrupt controller dtc warnings
Mathias Kresin [Sat, 21 Jul 2018 14:53:10 +0000 (16:53 +0200)]
ramips: fix cpu interrupt controller dtc warnings

The cpu interrupt controller doesn't have a reg property, hence we
can't use a unit address in the node name.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 1bad2b74aea59289c21209aa1d8e5c2ccef74a72)

5 years agoramips: fix cpu related dtc warnings
Mathias Kresin [Sat, 21 Jul 2018 14:17:39 +0000 (16:17 +0200)]
ramips: fix cpu related dtc warnings

We need a reg property if we are using a unit address.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from b9dbf3f3c8112d6640c780bbb939ee5816b5bfb3)

5 years agotreewide: convert gpio-export to platform driver
René van Dorst [Thu, 19 Jul 2018 10:55:55 +0000 (12:55 +0200)]
treewide: convert gpio-export to platform driver

Without this patch you will get an error "gpio-export probe deferral
not supported" when you try to export i2c expander gpio pins.

gpio-export is probed long before i2c-bus and i2c expander are created
and it doesn't retry it so none pins are exported.

Signed-off-by: René van Dorst <opensource@vdorst.com>
apply the change to all instances of the gpio exports patch
Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 0ae9396556584db2dac73364af44758a5ccf4873)

5 years agobusybox: update to 1.29.2
Hannu Nyman [Tue, 31 Jul 2018 13:55:42 +0000 (16:55 +0300)]
busybox: update to 1.29.2

* Update busybox to 1.29.2
* refresh default config
* remove upstreamed patches

Config refreshed with
  cd config/
  ../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/busybox-1.29.2
  cd ..
  ./convert_defaults.pl < ../../../build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/busybox-1.29.2/.config > Config-defaults.in

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Tested-by: Hans Dedecker <dedeckeh@gmail.com>
(backported from 12fb4bb834dc715ce43bf428c35b489e89e776a1)

5 years agobrcm63xx: switch to 4.14
Jonas Gorski [Wed, 1 Aug 2018 10:18:13 +0000 (12:18 +0200)]
brcm63xx: switch to 4.14

Kernel 4.14 support has been present for quite some time, so let's give
it wider testing.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(backported from 2308b87204206d84b6bf3dbc3d72591611cc6b78)

5 years agobrcm63xx: drop b43 from devices with unsupported wifi
Jonas Gorski [Wed, 1 Aug 2018 10:14:39 +0000 (12:14 +0200)]
brcm63xx: drop b43 from devices with unsupported wifi

The internal wifi isn't supported, so drop b43 from devices that only
have it.

Fixes FS#1698
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(backported from 15cb65dad733f7c76bfc93f89bca2962d9ee6240)

5 years agobrcm63xx: copy SR102 support patch to 4.14 as well
Jonas Gorski [Wed, 1 Aug 2018 10:04:39 +0000 (12:04 +0200)]
brcm63xx: copy SR102 support patch to 4.14 as well

It seems to have been missed when the patch was accepted.

Fixes: d59126040701 ("brcm63xx: initial support for Sky SR102 router")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(backported from 8cb8d70fea917b1856c4f3ad936da5fd015d3a9c)

5 years agobrcm63xx: drop bogus SPROM section from SR102
Jonas Gorski [Wed, 1 Aug 2018 09:39:57 +0000 (11:39 +0200)]
brcm63xx: drop bogus SPROM section from SR102

The integrated SoC wifi will likely never be supported, and if,
it will go through DT with the sprom contents there.

Fixes: d59126040701 ("brcm63xx: initial support for Sky SR102 router")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(backported from bc1c706bb32ee1087357e5258a147bd792612d00)

5 years agoar71xx: add support for TP-LINK CPE510 V2.0
Andrew Cameron [Wed, 27 Jun 2018 03:09:03 +0000 (22:09 -0500)]
ar71xx: add support for TP-LINK CPE510 V2.0

Adds Support for the TP-LINK CPE510 V2.0 by TP-Link.
The hardware is almost the same as the CPE510 V1.0
Follow the same processes as for the CPE510 V1.0

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
(backported from bae927c551fdd91fbc8343071e4b5c44f73eee0d)

5 years agoRevert "ar71xx: ag71xx: Prevent kernel oops for board def"
Jo-Philipp Wich [Wed, 1 Aug 2018 20:33:49 +0000 (22:33 +0200)]
Revert "ar71xx: ag71xx: Prevent kernel oops for board def"

This reverts commit 7a3e133751870a3431e2430386a77a002eb24117.

This change reportedly breaks connectivity on some ar71xx devices, so
revert it for now.

Ref: https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from b9bd3285c7c6fbc60374b05ac2da9be41ce75651)

5 years agoRevert "ar71xx: ag71xx: Add connect message: fixed phy"
Jo-Philipp Wich [Wed, 1 Aug 2018 20:31:34 +0000 (22:31 +0200)]
Revert "ar71xx: ag71xx: Add connect message: fixed phy"

This reverts commit 0b9f4e880807e3cfd22d12b929202e1edcdc577c.

This change reportedly breaks connectivity on some ar71xx devices, so
revert it for now.

Ref: https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 33dbe2c55da1480559092185c4ef071995d9bc90)

5 years agoRevert "ar71xx: ag71xx_phy: Fix compilation for debug messages"
Jo-Philipp Wich [Wed, 1 Aug 2018 20:31:04 +0000 (22:31 +0200)]
Revert "ar71xx: ag71xx_phy: Fix compilation for debug messages"

This reverts commit 2655fbe8efb2a596aa8db92cffa817e3bf0c64ea.

The patch introduces syntax errors, revert it for now.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 9ebf59638600b3cffc5cb601cce60226c942a516)

5 years agogdb: bump to 8.1.1
Koen Vandeputte [Wed, 1 Aug 2018 11:32:22 +0000 (13:32 +0200)]
gdb: bump to 8.1.1

GDB 8.1.1 brings the following fixes and enhancements over GDB 8.1:

 * PR gdb/22824 (misleading description of new rbreak Python function in GDB 8.1 NEWS file)
 * PR gdb/22849 (ctrl-c doesn't work in extended-remote)
 * PR gdb/22907 ([Regression] gdbserver doesn't work with filename-only binaries)
 * PR gdb/23028 (inconsistent disassemble of vcvtpd2dq)
 * PR gdb/23053 (Fix -D_GLIBCXX_DEBUG gdb-add-index regression)
 * PR gdb/23127 ([AArch64] GDB cannot be used for debugging software that uses high Virtual Addresses)
 * PR server/23158 (gdbserver no longer functional on Windows)
 * PR breakpoints/23210 ([8.1/8.2 Regression] Bogus Breakpoint address adjusted from 0xf7fe7dd3 to 0xfffffffff7fe7dd3)

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from a2a225517d1a7c986bffe675274f94806fb6cc51)

5 years agotoolchain/gdb: bump to 8.1.1
Koen Vandeputte [Wed, 1 Aug 2018 11:39:03 +0000 (13:39 +0200)]
toolchain/gdb: bump to 8.1.1

GDB 8.1.1 brings the following fixes and enhancements over GDB 8.1:

 * PR gdb/22824 (misleading description of new rbreak Python function in GDB 8.1 NEWS file)
 * PR gdb/22849 (ctrl-c doesn't work in extended-remote)
 * PR gdb/22907 ([Regression] gdbserver doesn't work with filename-only binaries)
 * PR gdb/23028 (inconsistent disassemble of vcvtpd2dq)
 * PR gdb/23053 (Fix -D_GLIBCXX_DEBUG gdb-add-index regression)
 * PR gdb/23127 ([AArch64] GDB cannot be used for debugging software that uses high Virtual Addresses)
 * PR server/23158 (gdbserver no longer functional on Windows)
 * PR breakpoints/23210 ([8.1/8.2 Regression] Bogus Breakpoint address adjusted from 0xf7fe7dd3 to 0xfffffffff7fe7dd3)

GDB 8.1 includes the following changes and enhancements:

  * Breakpoints on C++ functions are now set on all scopes by default
    ("wild" matching);

  * Support for inserting breakpoints on functions marked with C++ ABI tags;

  * Target floating-point arithmetic emulation during expression evaluation
    (requires MPFR 3.1 or later);

  * Various Python Scripting enhancements;

  * Improved Rust support; in particular, Trait objects can now be inspected
    when debugging Rust code;

  * GDB no longer makes assumptions about the type of symbols without
    debugging information to avoid producing erroneous and often confusing
    results;

  * The 'enable' and 'disable' commands now accept a range of breakpoint
    locations;

  * New 'starti' command to start the program at the first instruction;

  * New 'rbreak' command to insert a number of breakpoints via a regular
    expression pattern (requires Python);

  * The 'ptype' command now supports printing the offset and size of
    the fields in a struct;

  * The 'gcore' command now supports dumping all the memory mappings
    ('-a' command-line option);

  * New shortcuts for TUI Single-Key mode: 'i' for stepi, and 'o' for nexti;

  * GDBserver enhancements:
    ** Support for transmitting environment variables to GDBserver;
    ** Support for starting inferior processes with a specified initial
       working directory;
    ** On Unix systems, support for globbing expansion and variable
       substitution of inferior command-line arguments;

  * Various completion enhancements;

  * The command used to compile and inject code with the 'compile' command
    is now configurable;

  * New '--readnever' command-line option to speed the GDB startup when
    debugging information is not needed;

  * Support for the following new native configurations:
    ** FreeBSD/aarch64 (aarch64*-*-freebsd*);
    ** FreeBSD/arm (arm*-*-freebsd*);

  * Support for the following new targets:
    ** FreeBSD/aarch64 (aarch64*-*-freebsd*);
    ** FreeBSD/arm (arm*-*-freebsd*);
    ** OpenRISC ELF (or1k*-*-elf)

  * Removed support for the following targets and native configurations:
    ** Solaris2/x86 (i?86-*-solaris2.[0-9]);
    ** Solaris2/sparc (sparc*-*-solaris2.[0-9]);

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(backported from 3df400c87ed9852d3641340b96849d9117355337)

5 years agoadb: added patch for openssl 1.1.0 compatibility
Eneas U de Queiroz [Fri, 25 May 2018 14:43:32 +0000 (11:43 -0300)]
adb: added patch for openssl 1.1.0 compatibility

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
(backported from f63f20fb93c7e67775cb01d97fc88b5b29452b81)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agonftables: allow to build with json support
Rosy Song [Tue, 31 Jul 2018 09:09:34 +0000 (17:09 +0800)]
nftables: allow to build with json support

Signed-off-by: Rosy Song <rosysong@rosinson.com>
(backported from f30583c41d37c39d3ca063b31871a3c207734b1f)

5 years agoar71xx: cr3000: cleanup board definition
Daniel F. Dickinson [Sun, 29 Jul 2018 11:40:01 +0000 (07:40 -0400)]
ar71xx: cr3000: cleanup board definition

1) Add comments so it's clear why we did things; this may prevent
   someone (e.g. me) from sinking time into fixing things that
   aren't broken and/or were done for reason.

2) Drop mdio 0 probe/register; we don't use ag1xx mdio bus 0.

3) Cosmetic reording of some code (tested) that makes the defintion
   more clear.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(backported from 0b7a9688ce49c60a18575b925138b100f4e8e078)

5 years agoar71xx: cr3000: Use correct company name
Daniel F. Dickinson [Sun, 29 Jul 2018 11:17:19 +0000 (07:17 -0400)]
ar71xx: cr3000: Use correct company name

It's 'PowerCloud Systems' not 'PowerCloud'.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(backported from b6c8bc0981855b50b7bf22f0743bb9a75fc2b341)

5 years agoar71xx: cr3000: Drop support for defunct cloud
Daniel F. Dickinson [Wed, 25 Jul 2018 23:18:07 +0000 (19:18 -0400)]
ar71xx: cr3000: Drop support for defunct cloud

The CR3000 stock firmware is now irrelevant as it required a now defunct
cloud service.  Therefore only build images that use the entire flash
(overwriting stock firwmare-specific partitions that no longer matter),
previously called 'nocloud' images.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
(backported from e38520cd50f3316e411b6210b6a258cdec81c88a)

5 years agokernel: switch compatible property for RedBoot DT binding
Matt Merhar [Mon, 30 Jul 2018 21:21:57 +0000 (17:21 -0400)]
kernel: switch compatible property for RedBoot DT binding

This changes the DT binding's compatible property to
"ecoscentric,redboot-fis-partitions", removing the existing reference to
Red Hat.

Per the documentation hosted at eCosCentric's website, eCosCentric is
RedBoot's sole commercial maintainer since 2002, and the project has
been under the stewardship of the Free Software Foundation since 2008.

This also updates the property in the Inventel Livebox 1 .dts, the
binding's only current user.

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
(backported from a2eaaaaf4b88f8e917203d79d833a9686a61022f)

5 years agokernel: modules: fix kmod-regmap
Christian Lamparter [Mon, 30 Jul 2018 20:33:51 +0000 (22:33 +0200)]
kernel: modules: fix kmod-regmap

This patch fixes the a compile issue that was triggered by
apm821xx/sata when kmod-regmap was selected.

The CONFIG_REGMAP is declared in drivers/base/regmap/Kconfig
as type "bool" and not "tristate". Hence the symbol should
never be set to module, as this confuses the #if CONFIG_REGMAP
guards in include/linux/regmap.h:

|.../drivers/regulator/core.c:4041: undefined reference to `dev_get_regmap'
|.../drivers/regulator/core.c:4042: undefined reference to `dev_get_regmap'
|.../drivers/regulator/core.c:4044: undefined reference to `dev_get_regmap'
|.../drivers/regulator/helpers.o: In function `regulator_is_enabled_regmap':
|.../drivers/regulator/helpers.c:36: undefined reference to `regmap_read'
|...

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(backported from d00913d1215b4877da67431b3dadf51fe5d0c443)

5 years agoipq40xx: Limit usable channels for OpenMesh A62 PHYs
Sven Eckelmann [Mon, 30 Jul 2018 15:43:48 +0000 (17:43 +0200)]
ipq40xx: Limit usable channels for OpenMesh A62 PHYs

The OpenMesh A62 is a tri-band device (1x 2.4GHz, 2x 5GHz) with special
filters in front of the RX+TX paths to the 5GHz PHYs. These filtered
channel can in theory still be used by the hardware but the signal strength
is reduced so much that it makes no sense.

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
(backported from e3b8ae2b09e137ce2eae33551923daf302293a0c)

5 years agomac80211: ath10k: Limit available channels via DT ieee80211-freq-limit
Sven Eckelmann [Mon, 30 Jul 2018 15:43:09 +0000 (17:43 +0200)]
mac80211: ath10k: Limit available channels via DT ieee80211-freq-limit

Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
the RX and TX path. These filtered channel can in theory still be used by
the hardware but the signal strength is reduced so much that it makes no
sense.

There is already a DT property to limit the available channels but ath10k
has to manually call this functionality to limit the currrently set wiphy
channels further.

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
(backported from ef39d0079b4efd18f0d39971c66989d5a6f34eca)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agokernel: add kmod-iio-htu21
Torbjörn Jansson [Mon, 30 Jul 2018 13:59:20 +0000 (15:59 +0200)]
kernel: add kmod-iio-htu21

This adds support for the htu21 humidity and temperature sensor.

To get it to work you have to do something like this:
echo "htu21 0x40" >/sys/class/i2c-dev/i2c-1/device/new_device
for example by adding it to rc.local

Compile tested on brcm2708 and I have used an earlier version of this
patch for more than a year.

Signed-off-by: Torbjörn Jansson <torbjorn.jansson@mbox200.swipnet.se>
(backported from af9a96d23eda3c9989e8b80c9ad2a9c41334aefd)

5 years agoar71xx: fix TL-WR1043N v5 port mapping
John Crispin [Mon, 30 Jul 2018 15:47:06 +0000 (17:47 +0200)]
ar71xx: fix TL-WR1043N v5 port mapping

fixes 5660c8fb20 ("ar71xx: TL-WR1043N v5: fix mapping of LAN ports to labels on housing.")

Signed-off-by: John Crispin <john@phrozen.org>
(backported from eddf4eae9777bf7328ece08451752abeab315919)

5 years agoar71xx: TL-WR1043N v5: fix mapping of LAN ports to labels on housing.
Tim Thorpe [Wed, 18 Apr 2018 22:50:05 +0000 (17:50 -0500)]
ar71xx: TL-WR1043N v5: fix mapping of LAN ports to labels on housing.

Reversed the numbering of the LAN ports in Luci so as to match the port numbers on the housing.

Signed-off-by: Tim Thorpe <tim@tfthorpe.net>
(backported from 5660c8fb20d056eac495647bb1116883f269ed8d)

5 years agoar71xx: TL-WR1043N v4/v5: add orange WAN LED support
Tim Thorpe [Tue, 13 Feb 2018 15:26:18 +0000 (09:26 -0600)]
ar71xx: TL-WR1043N v4/v5: add orange WAN LED support

Add missing definitions for the orange WAN LED on the
TL-WR1043N(D) v4 and v5.

Change the name of a MAC address offset constant to
make it consistent with the format of the
existing constants.

Signed-off-by: Tim Thorpe <tim@tfthorpe.net>
(backported from d834ad9ac34a1a94195cee08e1d389e7b7edab20)

5 years agoramips: add support for ELECOM WRC-2533GST
INAGAKI Hiroshi [Thu, 26 Jul 2018 14:24:22 +0000 (23:24 +0900)]
ramips: add support for ELECOM WRC-2533GST

ELECOM WRC-2533GST is a 2.4/5 GHz band 11ac rotuer, based on
MediaTek MT7621A.

Specification:

- MT7621A (2-Core, 4-Threads)
- 128 MB of RAM (DDR3)
- 16 MB of Flash (SPI)
- 4T4R 2.4/5 GHz wifi
  - MediaTek MT7615
- 5x 10/100/1000 Mbps Ethernet
- 4x LEDs, 6 keys (2x buttons, 1x slide switch)
- UART header on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - baudrate: 57600 bps

Flash instruction using factory image:

1. Connect the computer to the LAN port of WRC-2533GST
2. Connect power cable to WRC-2533GST and turn on it
3. Access to "https://192.168.2.1/" and open firmware update
page ("ファームウェア更新")
4. Select the OpenWrt factory image and click apply ("適用")
button
5. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(backported from ce93445cd6058ae37ca3d257792f68cd98e758da)

5 years agox86: add support to set GRUB menu entry title
Kjel Delaey [Tue, 5 Jun 2018 13:47:05 +0000 (15:47 +0200)]
x86: add support to set GRUB menu entry title

$ make menuconfig

        Target Images -> Title for the menu entry in GRUB

Signed-off-by: Kjel Delaey <kjel_delaey@hotmail.com>
(backported from 8492ad0cc183550137ea5afadcbebbfb4fd68fed)

5 years agokirkwood: add support for Iomega Storcenter ix2-200
Ademar Arvati Filho [Fri, 6 Jul 2018 00:56:58 +0000 (00:56 +0000)]
kirkwood: add support for Iomega Storcenter ix2-200

Iomega Storcenter ix2-200 is a dual SATA NAS powered by a Marvell
 Kirkwood SoC clocked at 1GHz. It has 256MB of RAM and 32MB of
 flash memory, 3x USB 2.0 and 1x 1Gbit/s NIC

Specification:
- SoC: Marvell Kirkwood 88F6281
- CPU/Speed: 1000Mhz
- Flash-Chip: Hynix NAND
- Flash size: 32 MiB,erase size:16 KiB,page size:512,OOB size:16
- RAM: 256MB
- LAN: 1x 1000 Mbps Ethernet
- WiFi: none
- 3x USB 2.0
- UART: for serial console

Installation instructions - easy steps:
1. download factory.bin and copy into tftp server
2. access uboot environment with serial cable and run
    ```
    setenv mainlineLinux yes
    setenv arcNumber 1682
    setenv console 'console=ttyS0,115200n8'
    setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
    setenv bootargs_root 'root='
    setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
    saveenv
    setenv serverip 192.168.1.1
    setenv ipaddr 192.168.1.13
    tftpboot 0x00800000 factory.bin
    nand erase 0x100000 $(filesize)
    nand write 0x00800000 0x100000 $(filesize)
    run bootcmd
    ```
3. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)

Installation steps nand bad blocks proof:
1. download initramfs-uImage and copy into usb ext2 partition
    ```
    mkfs.ext2 -L ext2 /dev/sdh1
    mount -t ext2 /dev/sdh1 /mnt
    cp initramfs-uImage /mnt/initramfs.bin
    umount /mnt
    ```
2. access uboot environment with serial cable and run
    ```
    setenv mainlineLinux yes
    setenv arcNumber 1682
    setenv console 'console=ttyS0,115200n8'
    setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
    setenv bootargs_root 'root='
    setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
    saveenv
    usb reset; ext2load usb 0:1 0x00800000 /initramfs.bin; bootm 0x00800000
    ```
3. log into openwrt and sysupgrade to install into flash
    ```
    sysupgrade -n /tmp/sysupgrade.bin
    ```
4. access openwrt by dhcp ip address assigned by your router (p.ex: 192.168.1.13)

Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
(backported from 27b2f0fc0fc5513304a5be3c5b8cb23aeb09e6f5)

5 years agoath10k-ct: fix build with current mac80211 package
Jo-Philipp Wich [Mon, 30 Jul 2018 13:00:53 +0000 (15:00 +0200)]
ath10k-ct: fix build with current mac80211 package

Commit 2dcd955aea ("mac80211: backport and update patches for ath10k")
changed the DFS detector API, causing ath10k-ct to fail building due to
a missing add_pulse() argument.

Extend the already existing kernel compatibility patch to also adjust
the add_pulse() call accordingly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 3083962dd409360059199753bb465427c667daf5)

5 years agobuild: fix ASLR for LTO packages
Julien Dusser [Tue, 17 Jul 2018 16:29:34 +0000 (18:29 +0200)]
build: fix ASLR for LTO packages

Fix building packages with LTO when CONFIG_PKG_ASLR_PIE is enabled.

Despite comment of PR lto/80838, it seems that GCC needs -fPIC on linker
command line, even if all objects are -fPIC. This may change as PR
lto/80838 is merged into 8.1

compile-tested: ar71xx, ath79

Fix commits:
6dac92a42e052f89971762173daabb7fd84742ef
8c11133c9de632dca69c8464f911d8e2716effe2
07940acc341ee9bb2887359f193625e48f36207e
e7397eef69a20fc630148d0e597523e139d21c0c
ef16a394d2b24a363b50b5b4720cb23fe156c9da
ef96d1e34a990871c912938c336f51a510b1e32f
47b42137ce1e931ae5871952b1f98438396f5e07
73fc67b61480a3430d31de33478a1c0c2c364b9c
154c0c4006daf41e2cbb6c8b7ad5557f83dfea3e
804c51e1e661819c5a7532e66fb8a12166eef9a9

Signed-off-by: Julien Dusser <julien.dusser@free.fr>
(backported from 4dfa6b7a300188db2d97a291f9c1303286a6bcc5)

5 years agosamsung/s5pv210: New target
Jianhui Zhao [Tue, 17 Apr 2018 03:09:14 +0000 (11:09 +0800)]
samsung/s5pv210: New target

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
(backported from 84c212da44cf5df210ae166ed7e64adf764ccf3f)

5 years agoar71xx: add support for TP-Link Archer C59 v2
Keith Maika [Fri, 15 Jun 2018 04:39:09 +0000 (00:39 -0400)]
ar71xx: add support for TP-Link Archer C59 v2

TP-Link Archer C59v2 is a dual-band AC1350 router based on
Qualcomm/Atheros QCA9561+QCA9886 chips.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 2T2R 5 GHz
- 5x 10/100 Mbps Ethernet
- USB 2.0 port
- UART header on PCB

Flash instruction:
  - via web UI:
    1. Download openwrt-ar71xx-generic-archer-c59-v2-squashfs-factory.bin
    2. Login to router and open the Advanced tab
    3. Navigate to System Tools -> Firmware Upgrade
    4. Upload firmware using the Manual Upgrade form
  - via TFTP:
    1. Set PC to fixed ip address 192.168.0.66
    2. Download openwrt-ar71xx-generic-archer-c59-v2-squashfs-factory.bin
       and rename it to tp_recovery.bin
    3. Start a tftp server with the file tp_recovery.bin in its root directory
    4. Turn off the router
    5. Press and hold Reset button
    6. Turn on router with the reset button pressed and wait ~15 seconds
    7. Release the reset button and after a short time
       the firmware should be transferred from the tftp server
    8. Wait ~30 second to complete recovery.

Signed-off-by: Keith Maika <keithm@aoeex.com>
(backported from 4caab808300ad75575d778bae6e184caa26aeabc)

5 years agokernel: add missing include to redboot.c
Rafał Miłecki [Mon, 30 Jul 2018 10:06:20 +0000 (12:06 +0200)]
kernel: add missing include to redboot.c

This fixes:
drivers/mtd/redboot.c:299:34: error: array type has incomplete element type 'struct of_device_id'

Fixes: 5e8b4be53177 ("kernel: add DT binding support to the mtd redboot parser")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(backported from a3d2448fae5499356a31d71585a812ac65e7a39a)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agobrcm63xx: update DT RedBoot binding for the Inventel Livebox 1
Rafał Miłecki [Mon, 30 Jul 2018 06:45:41 +0000 (08:45 +0200)]
brcm63xx: update DT RedBoot binding for the Inventel Livebox 1

linux,part-probe should be avoided as its only supported with OpenWrt
downstream patch that is going to be dropped eventually.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(backported from 23197e4580e933b2f81bfd06be051d6038bf24a9)

5 years agoomap: disable ubifs
Lucian Cristian [Thu, 19 Jul 2018 06:59:43 +0000 (09:59 +0300)]
omap: disable ubifs

ubifs image are not working, until there is a fix, disable them

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
(backported from 569b6c82460aed3df2d0ea90cdee1b54ddd34fd2)

5 years agoomap: add support for f2fs/ext4 overlay creation
Lucian Cristian [Thu, 19 Jul 2018 06:58:42 +0000 (09:58 +0300)]
omap: add support for f2fs/ext4 overlay creation

add kernel support and include the tools for creating an overlay partition (f2fs or ext4)

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
(backported from ca529e60d2dde215b3199583bda0f37454e0b896)

5 years agoomap: add sysupgrade support
Lucian Cristian [Thu, 19 Jul 2018 06:55:19 +0000 (09:55 +0300)]
omap: add sysupgrade support

add sysupgrade missing script files

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
(backported from 6a095e858718e91a56dc69f21b5ecb76237e7c28)

5 years agoomap: rename image for sysupgrade compatibility
Lucian Cristian [Thu, 19 Jul 2018 06:48:56 +0000 (09:48 +0300)]
omap: rename image for sysupgrade compatibility

for sysupgrade to work we need to change the image name based on dts target name

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
(backported from 40f66f1431b1a6638f05b75952d7b5a94e385e8d)

5 years agoomap: fix squashfs image boot and creation
Lucian Cristian [Thu, 19 Jul 2018 06:45:25 +0000 (09:45 +0300)]
omap: fix squashfs image boot and creation

fixes FS#1034, squash fs images fails to boot because of missing ARM BCJ filter decoder
also activate squashf image creation

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
(backported from f9af9be8abb72838011c206029ee9274ccd8738e)

5 years agohostapd: add ht and vht support in handle event function Add ht and vht capabilities...
Nick Hainke [Thu, 17 May 2018 10:35:23 +0000 (12:35 +0200)]
hostapd: add ht and vht support in handle event function Add ht and vht capabilities. If a device sends a probe request, the capabilities are added.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(backported from abefb4fda30936abff58736ed81572a127695e65)

5 years agohostapd: add ubus call for ap features
Nick Hainke [Wed, 25 Apr 2018 22:03:05 +0000 (00:03 +0200)]
hostapd: add ubus call for ap features

The call "get_features" allows to gather hostapd config options
via ubus. As first infos we add the ht and vht support.
Although nl80211 supports to gather informations about
ht and vht capabilities, the hostapd configuration can disable
vht and ht. However, it is possible that the iw output is not
representing the actual hostapd configuration.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(backported from 74ac74227715aec4b6a3badf7a69bdde13431e04)

5 years agouboot-envtools: add configuration for Traverse LS1043 boards.
Mathew McBride [Wed, 25 Apr 2018 02:51:48 +0000 (12:51 +1000)]
uboot-envtools: add configuration for Traverse LS1043 boards.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(backported from ae95a8ad3ee08995f16092820aa495b46ddcfdb9)

5 years agolayerscape: add Traverse LS1043-S support
Mathew McBride [Mon, 30 Apr 2018 12:42:39 +0000 (22:42 +1000)]
layerscape: add Traverse LS1043-S support

The Traverse LS1043-S board is a router board based on
NXP/Freescale's LS1043 SoC, with 4x1GBase-T, 1 SFP and 1 SFP+,
as well as miniPCIe and M.2 LTE.

Unlike the Layerscape reference boards, the LS1043-S board has
NAND flash and uses the mainline U-Boot.

This patch implements support for the LS1043-S board, as well as
the earlier LS1043-V board. It is our intention that all boards
in this family (LS1043-S and later, Five64) will boot the same binary.

Not included in this patchset are the hwmon drivers not in the kernel
(emc1704,pac1934) or the bootloader.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(backported from 08714738d2c8d7710f8fd2b7deac795f49e7d7c2)

5 years agolayerscape: add multiple-configuration generator for FIT images
Mathew McBride [Mon, 30 Apr 2018 12:43:29 +0000 (22:43 +1000)]
layerscape: add multiple-configuration generator for FIT images

This is required for the Traverse LS1043 family, we generate a FIT image
that works on all boards across the family. This is done by creating
multiple configurations that select the right DTB for the board.

The bootloader on these boards is configured to boot like this:
bootm $kernel_load#ls1043s
bootm $kernel_load#ls1043v

This is based on earlier work by Jason Wu for Zynq:
https://lists.openwrt.org/pipermail/openwrt-devel/2016-March/040460.html

Modified to add FDT load addresses and multiple configurations with DTB.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(backported from 481f870a02a29974eca943f3b926434d5e517679)

5 years agolayerscape: add support for fixed-link on RGMII interfaces
Mathew McBride [Mon, 16 Apr 2018 23:45:11 +0000 (09:45 +1000)]
layerscape: add support for fixed-link on RGMII interfaces

This is required on the Traverse LS1043 boards to support SFP
and xDSL plug-ins.

This will not be needed on kernel 4.14.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(backported from 2203815f05162c357fbf96b3da8098f687a86d04)

5 years agolayerscape: enable QorIQ thermal driver
Mathew McBride [Mon, 16 Apr 2018 23:43:38 +0000 (09:43 +1000)]
layerscape: enable QorIQ thermal driver

This provides access to the CPU die temperature sensor and
the thermal throttling integration

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(backported from 40120ca6709c4f47d739688797a39c31859d3a85)

5 years agolayerscape: remove DEVICE_TYPE=developerboard
Mathew McBride [Mon, 16 Apr 2018 23:43:03 +0000 (09:43 +1000)]
layerscape: remove DEVICE_TYPE=developerboard

The Traverse LS1043 series are router boards and need the default router package
selection

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(backported from efc1096ef0d15f1bfa6d5f7890fff7420e30fbee)

5 years agoramips: fix RBM11G name
Thibaut VARÈNE [Sun, 29 Jul 2018 09:07:23 +0000 (11:07 +0200)]
ramips: fix RBM11G name

The device name is corrected to match the hardware-stored (in hard config
flash space) device name.

Tested-by: Tobias Schramm <tobleminer@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(backported from 3fd4db76b06bfcf7c69a6bef62f073fb537ab977)

5 years agoramips: fix RBM33G name
Thibaut VARÈNE [Sun, 29 Jul 2018 09:07:21 +0000 (11:07 +0200)]
ramips: fix RBM33G name

The device name is corrected to match the hardware-stored (in hard config
flash space) device name.

Tested-by: Tobias Schramm <tobleminer@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(backported from a9494bb4254d1fa91eb82c04e14d97445e225a06)

5 years agolibevent: update to 2.1.8
Leon M. George [Mon, 31 Oct 2016 13:55:44 +0000 (14:55 +0100)]
libevent: update to 2.1.8

Signed-off-by: Leon M. George <leon@georgemail.eu>
(backported from 025688794d516d5b020abfdaabf47fe341e37da6)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>