openwrt/staging/rmilecki.git
6 years agoath79: fixup TL-WR703N/TL-MR10U split
Alex Maclean [Tue, 12 Jun 2018 20:54:52 +0000 (21:54 +0100)]
ath79: fixup TL-WR703N/TL-MR10U split

Readd SoC compatible strings and correct model names mangled in
a51078f7354fac9e31f6956cbddc77aaef02c67b, cleanup dts to remove
duplication, rename dtsi for clarity, use correct GPIO for TL-MR10U
USB power.

Tested only on TL-WR703N due to lack of a TL-MR10U.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years agotools: build squashfs (v3) for ath79
Zoltan HERPAI [Wed, 13 Jun 2018 08:51:50 +0000 (10:51 +0200)]
tools: build squashfs (v3) for ath79

Certain Netgear and AVM devices use BE squashfs for the kernel image. As
squashfs4 only supports creating LE images, add squashfs (v3) into
the tools to be built for ath79.

Trying to use an LE squashfs (thus trying to use squashfs4 only for
building the image) for the kernel image results in the bootloader
barfing and stopping.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years agoramips: add support for TP-Link TL-WR842N v5
Maxim Anisimov [Wed, 30 May 2018 15:41:53 +0000 (18:41 +0300)]
ramips: add support for TP-Link TL-WR842N v5

TP-Link TL-WR842N v5 are simple N300 router with 5-port FE switch and
non-detachable antennas. Its very similar to TP-Link TL-MR3420 V5.

Specification:

- MT7628N/N (580 MHz)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- USB 2.0 Port
- UART (J1) header on PCB (115200 8n1)
- 7x LED, 2x button, power input switch

Flash instruction:

The only way to flash OpenWrt image in wr842nv5 is to use
tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.0.225/24 and tftp server.
2. Rename "lede-ramips-mt7628-tplink_tl-wr842n-v5-squashfs-tftp-recovery.bin"
   to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
6 years agoramips: use phytpt trigger for mt76 wireless
David Bauer [Sun, 10 Jun 2018 22:37:38 +0000 (00:37 +0200)]
ramips: use phytpt trigger for mt76 wireless

With this change, the LED trigger is independent from the (wireless)
netdev name. The (wireless) netdev name can be easiliy changed in
OpenWrt and would require an update of the netdev trigger settings each
time it is done.

This change is (for now) applied only to MT7628 devices from TP-Link, as
we only had the possibility to test this change against two of those
devices, namely a TL-WR841 v13 and a Archer C50 v3.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years agoramips: fix mt7688 watchdog register base addr
lbzhung [Fri, 8 Jun 2018 09:15:17 +0000 (17:15 +0800)]
ramips: fix mt7688 watchdog register base addr

I found mt7688 watchdog not working. The watchdog registers are identical
for mt7621 and mt7628/mt7688. The first watchdog related register is at
0x10000100, the last one - a 16bit sized - at 0x10000128.

Set the correct register address and size in the dtsi file to get the
watchdog working.

Signed-off-by: lbzhung <gewalalb@gmail.com>
[add commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoramips: mt7621: fix mtu setting with kernel 4.14
Mathias Kresin [Sun, 18 Feb 2018 21:48:44 +0000 (22:48 +0100)]
ramips: mt7621: fix mtu setting with kernel 4.14

Since kernel 4.10 commit 61e84623ace3 ("net: centralize net_device
min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which
is [68, 1500] by default.

It's necessary to set a max_mtu if a mtu > 1500 is supported.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agomt76: update to the latest version
Felix Fietkau [Fri, 15 Jun 2018 18:56:01 +0000 (20:56 +0200)]
mt76: update to the latest version

9090f9c mt76x2: fix threshold for gain adjustment
2cbaa57 mt76x2: fix swapped values for RXO-18 in gain control
a39ab70 mt76x2: adjust AGC control register 26 based on gain for VHT80
4936c0c mt76x2: clear false CCA counters after changing gain settings
1528fe7 mt76x2: fix variable gain adjustment range
f3522e1 mt76x2: add a debugfs file to dump agc calibration information
65e161b mt76x2: fix tracking rssi for dynamic gain adjustment

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoltq-vdsl-fw: strip legacy dsl_fw logic
Daniel Golle [Fri, 15 Jun 2018 11:30:47 +0000 (13:30 +0200)]
ltq-vdsl-fw: strip legacy dsl_fw logic

We unfortunately dropped support for persistent in-flash DSL firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoltq-vdsl-app: use downloaded vectoring firmware
Daniel Golle [Fri, 15 Jun 2018 11:28:38 +0000 (13:28 +0200)]
ltq-vdsl-app: use downloaded vectoring firmware

Use vectoring firmware downloaded via vdsl_fw_install.sh from
ltq-vdsl-fw package for annex B and annex J.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agolantiq-vdsl-fw: update to provide recent vectoring firmware
Daniel Golle [Fri, 15 Jun 2018 10:21:03 +0000 (12:21 +0200)]
lantiq-vdsl-fw: update to provide recent vectoring firmware

Recent Speedport firmware downloads only work over HTTPS, so the user
either needs to provide the already downloaded file or install
ustream-ssl-* as well as ca-certificates or ca-bundle.

So to get VDSL2 with vectoring on xRX200, simply run
vdsl_fw_install.sh
on the target and either provide the downloaded file as instructed or
make sure the device is connected to the Internet and can download that
HTTPS url itself.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoRevert "lantiq: get rid of ltq-vdsl-fw"
Daniel Golle [Fri, 15 Jun 2018 09:56:05 +0000 (11:56 +0200)]
Revert "lantiq: get rid of ltq-vdsl-fw"

This reverts commit 0938233fcdef67d969f9429a10761cc640c6d56d.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoucert: fix build
Daniel Golle [Fri, 15 Jun 2018 06:57:44 +0000 (08:57 +0200)]
ucert: fix build

set PKG_BUILD_DIR before including package.mk to avoid problems as
seen on buildbot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agolibjson-c: fix host-build
Daniel Golle [Thu, 14 Jun 2018 20:53:58 +0000 (22:53 +0200)]
libjson-c: fix host-build

Add -Wno-implicit-fallthrough to HOST_CFLAGS.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agopackage/libs/libnfnetlink: Remove dead mirror
Daniel Engberg [Mon, 11 Jun 2018 11:34:23 +0000 (13:34 +0200)]
package/libs/libnfnetlink: Remove dead mirror

Remove mirrors.evolva.ro as it's no longer available

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agolibubox: make sure blobmsg-json is included in host-build
Daniel Golle [Thu, 14 Jun 2018 18:10:04 +0000 (20:10 +0200)]
libubox: make sure blobmsg-json is included in host-build

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agolibjson-c: add host build (for libblobmsg-json)
Daniel Golle [Thu, 14 Jun 2018 18:09:29 +0000 (20:09 +0200)]
libjson-c: add host build (for libblobmsg-json)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoucert: add package
Daniel Golle [Thu, 14 Jun 2018 17:39:25 +0000 (19:39 +0200)]
ucert: add package

ucert is a wrapper around usign to allow delegation and revocation of
public keys for future use in sysupgrade.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This work was sponsored by WIO (wiowireless.com)

6 years agobrcm2708: move wifi calibration EEPROMs out of base-files
Daniel Golle [Thu, 14 Jun 2018 15:21:19 +0000 (17:21 +0200)]
brcm2708: move wifi calibration EEPROMs out of base-files

Ship EEPROM blobs for specific supported board only and don't have them
lurking around in our source tree but rather download them from
@github/RPi-Distro/firmware-nonfree upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agobrcm2708: add brcmfmac-firmware-43455-sdio to DEFAULT_PACKAGES
Daniel Golle [Wed, 13 Jun 2018 22:42:09 +0000 (00:42 +0200)]
brcm2708: add brcmfmac-firmware-43455-sdio to DEFAULT_PACKAGES

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agobrcm2708: add RPi3+ wifi calibration data
Daniel Golle [Wed, 13 Jun 2018 22:37:27 +0000 (00:37 +0200)]
brcm2708: add RPi3+ wifi calibration data

Add files from
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.txt
https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43455-sdio.clm_blob

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agolinux-firmware: add firmware for BCM43455 SDIO wlan found on RPi3B+
Daniel Golle [Wed, 13 Jun 2018 22:36:01 +0000 (00:36 +0200)]
linux-firmware: add firmware for BCM43455 SDIO wlan found on RPi3B+

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agokernel: fix conntrack fixup of offloaded flows on timeout
Felix Fietkau [Thu, 14 Jun 2018 09:25:23 +0000 (11:25 +0200)]
kernel: fix conntrack fixup of offloaded flows on timeout

Fixes excessively long conntrack timeout of short lived connections

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: fix conntrack leak for flow_offload connections
Felix Fietkau [Wed, 13 Jun 2018 10:46:54 +0000 (12:46 +0200)]
kernel: fix conntrack leak for flow_offload connections

This was caused by a race condition between offload teardown and
conntrack gc bumping the timeout of offloaded connections

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: allow hardware NAT offload drivers to keep a priv pointer
Felix Fietkau [Mon, 30 Apr 2018 07:26:00 +0000 (09:26 +0200)]
kernel: allow hardware NAT offload drivers to keep a priv pointer

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agoramips: rename ethernet driver folder to the same one that upstream uses
Felix Fietkau [Mon, 30 Apr 2018 07:24:50 +0000 (09:24 +0200)]
ramips: rename ethernet driver folder to the same one that upstream uses

Preparation for sharing offload code with the mediatek target through
generic files/

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agokernel: avoid flow offload for connections with xfrm on the dst entry (should fix...
Felix Fietkau [Sun, 8 Apr 2018 17:19:58 +0000 (19:19 +0200)]
kernel: avoid flow offload for connections with xfrm on the dst entry (should fix IPSec)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years agotools/bison: Update to 3.0.5
Daniel Engberg [Thu, 7 Jun 2018 17:21:12 +0000 (19:21 +0200)]
tools/bison: Update to 3.0.5

Update bison to 3.0.5
Bugfix release
Remove 001-fix-macos-vasnprintf.patch as it is fixed upstream

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agopopt: Add backup site
Daniel Engberg [Sat, 9 Jun 2018 20:29:25 +0000 (22:29 +0200)]
popt: Add backup site

Add Gentoo's distfiles repo as backup site.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agotools/e2fsprogs: Update to 1.44.2
Daniel Engberg [Sat, 9 Jun 2018 20:23:51 +0000 (22:23 +0200)]
tools/e2fsprogs: Update to 1.44.2

Update e2fsprogs to 1.44.2

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
6 years agobase-files: sysupgrade: fix handing get_image unpack commands
Matthias Schiffer [Sun, 10 Jun 2018 13:41:52 +0000 (15:41 +0200)]
base-files: sysupgrade: fix handing get_image unpack commands

On bcm53xx and brcm47xx, commands are passed to default_do_upgrade that
expect the image to be passed on stdin, rather than as an argument.

Fixes: 30f61a34b4cf ("base-files: always use staged sysupgrade")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agotoolchain/glibc: update to latest 2.26 commit
Hans Dedecker [Mon, 11 Jun 2018 15:53:56 +0000 (17:53 +0200)]
toolchain/glibc: update to latest 2.26 commit

7b52c8ae05 libio: Avoid _allocate_buffer, _free_buffer function pointers [BZ #23236]

Refresh patches

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agoodhcp6c: user string option support
Hans Dedecker [Mon, 11 Jun 2018 13:44:50 +0000 (15:44 +0200)]
odhcp6c: user string option support

ca8822b odhcp6c: add support for user string options

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agodnsmasq: fix confdir option processing (FS#1572)
Hans Dedecker [Mon, 11 Jun 2018 09:17:52 +0000 (11:17 +0200)]
dnsmasq: fix confdir option processing (FS#1572)

Fix condir option processing allowing to use the format
"<directory>[,<file-extension>......]," as documented on the dnsmasq man
page which previously resulted into bogus dir being created.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agokernel/modules: fix kmod-mdio-gpio module dependencies
Hauke Mehrtens [Sun, 10 Jun 2018 20:00:02 +0000 (22:00 +0200)]
kernel/modules: fix kmod-mdio-gpio module dependencies

On some targets this module depends on kmod-of-mdio.

This is similar to the fixes done in:
dc629d9cf5a ("kernel: fix kmod-switch-rtl8366-smi dependency")
56bd23cf529 ("kernel: let kmod-rtl8366-smi conditionally depend on kmod-of-mdio")

Fixes: 32f32398af976e ("kernel/modules: add kmod-mdio-gpio module")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years agokernel: bump 4.9 to 4.9.107
Kevin Darbyshire-Bryant [Sat, 9 Jun 2018 08:52:45 +0000 (09:52 +0100)]
kernel: bump 4.9 to 4.9.107

Refresh patches.

Compile-tested for: ar71xx
Run-tested on: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agokernel/modules: add kmod-switch-rtl8306 module
Martin Schiller [Wed, 26 Jul 2017 10:02:25 +0000 (12:02 +0200)]
kernel/modules: add kmod-switch-rtl8306 module

Add kernel module for kmod-switch-rtl8306.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 years agokernel/modules: add kmod-mdio-gpio module
Martin Schiller [Wed, 26 Jul 2017 09:51:05 +0000 (11:51 +0200)]
kernel/modules: add kmod-mdio-gpio module

Add kernel module package for kmod-mdio-gpio.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 years agokernel/modules: add kmod-adcxx module
Florian Eckert [Tue, 25 Jul 2017 14:38:56 +0000 (16:38 +0200)]
kernel/modules: add kmod-adcxx module

Add kernel module package for kmod-adcxx.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
6 years agokernel/modules: add kmod-random-tpm module
Martin Schiller [Wed, 2 Aug 2017 04:04:50 +0000 (06:04 +0200)]
kernel/modules: add kmod-random-tpm module

Add kernel module package for kmod-random-tpm.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 years agomvebu: enable SATA port multiplier support
Jeremiah McConnell [Thu, 7 Jun 2018 22:23:41 +0000 (16:23 -0600)]
mvebu: enable SATA port multiplier support

Some of the Marvell targets have functional SATA port multiplier
support, which is required for multi-bay eSATA enclosures.  Enable
kernel support by setting CONFIG_SATA_PMP.

Closes: FS#1232 and FS#547
Signed-off-by: Jeremiah McConnell <miah@miah.com>
6 years agomac80211: ath10k: Allow to enable the thermal code of ath10k
Sven Eckelmann [Tue, 30 Jan 2018 08:41:45 +0000 (09:41 +0100)]
mac80211: ath10k: Allow to enable the thermal code of ath10k

Some ath10k firmware versions allow to access the chip internal a
temperature sensor and allow to reduce the amount of the time when the card
is allowed to send. The latter is required on devices which tend to
overheat.

An userspace service has to read
/sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input regularly and
then decide how much the device has to be throttled. This can be done by
writing to /sys/class/ieee80211/phy*/device/cooling_device/cur_state. By
default it is not throttled (0) but it can be throttled up to 100(%).

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
6 years agoltq-vdsl-mei: reset g_tx_link_rate on showtime exit
Martin Schiller [Wed, 9 Aug 2017 12:57:18 +0000 (14:57 +0200)]
ltq-vdsl-mei: reset g_tx_link_rate on showtime exit

Without this change, ifx_mei_atm_showtime_check() will always return
"showtime" after one call of MEI_InternalXtmSwhowtimeEntrySignal()
was done, even if MEI_InternalXtmSwhowtimeExitSignal() was called
in the meantime.

The ifx_mei_atm_showtime_check() function is used by the ltq-atm and
ltq-ptm driver.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
6 years agoramips: fix network config for ravpower wd03
Matthias Badaire [Wed, 23 May 2018 21:19:47 +0000 (23:19 +0200)]
ramips: fix network config for ravpower wd03

This device has only one ethernet port.

Signed-off-by: Matthias Badaire <mbadaire@gmail.com>
[add the existing eth0 as lan block, shorten commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years agoar71xx: use Power-LED as Diag-LED on FRITZBox 4020
David Bauer [Fri, 8 Jun 2018 19:42:52 +0000 (21:42 +0200)]
ar71xx: use Power-LED as Diag-LED on FRITZBox 4020

This commit makes use of the Power-LED as Diag-LED, allowing the LED to
work as a status indicator.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years agoar71xx: fix AVM package selection
David Bauer [Fri, 8 Jun 2018 19:41:25 +0000 (21:41 +0200)]
ar71xx: fix AVM package selection

The AVM package selection partially broke with the addition of the
FRITZ!Box 4020. This commit restores the intended behavior.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years agoath79: add tl-mr3020-v1 support
Lucian Cristian [Fri, 8 Jun 2018 08:51:00 +0000 (11:51 +0300)]
ath79: add tl-mr3020-v1 support

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agoath79: wr1043: fix DTC warnings
Karl Palsson [Mon, 28 May 2018 13:44:39 +0000 (13:44 +0000)]
ath79: wr1043: fix DTC warnings

Use the "correct" unit name to avoid DTC warnings.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoath79: glinet ar150: fix DTC warnings
Karl Palsson [Mon, 28 May 2018 13:42:44 +0000 (13:42 +0000)]
ath79: glinet ar150: fix DTC warnings

Supply a unit name to match other .dts files and avoid DTC warnings.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoath79: ubnt: fix DTC warnings
Karl Palsson [Mon, 28 May 2018 13:37:27 +0000 (13:37 +0000)]
ath79: ubnt: fix DTC warnings

Use explicit labels instead of units with no reg's to avoid DTC
warnings.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoath79: wdr4300: avoid DTC warnings
Karl Palsson [Mon, 28 May 2018 12:49:57 +0000 (12:49 +0000)]
ath79: wdr4300: avoid DTC warnings

Use direct button labels to avoid dtc warnings

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoath79: buffalo_wzr-hp-g450h: fix dtc warnings
Karl Palsson [Mon, 28 May 2018 12:46:52 +0000 (12:46 +0000)]
ath79: buffalo_wzr-hp-g450h: fix dtc warnings

Just name buttons directly, rather than abstract and then also a label.
Likewise for leds.  Avoids DTC warnings about unit address with no reg
parameter.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoath79: avm_fritz300e: avoid dtc warnings
Karl Palsson [Mon, 28 May 2018 12:41:59 +0000 (12:41 +0000)]
ath79: avm_fritz300e: avoid dtc warnings

Use number formats preferred by the device tree compiler

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoath79: mdio: add address-cells and size-cells defaults
Karl Palsson [Mon, 28 May 2018 12:42:43 +0000 (12:42 +0000)]
ath79: mdio: add address-cells and size-cells defaults

Eliminates warnings about relying on defaults from the device tree
compiler.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoath79: ar9330.dtsi: fix typo in USB unit name
Karl Palsson [Mon, 28 May 2018 14:01:01 +0000 (14:01 +0000)]
ath79: ar9330.dtsi: fix typo in USB unit name

Make the unitname match the reg address.  This fixes a DTC warning.

Tested that USB is still functional on an ar9331 device including this
dtsi.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoath79: add etactica-eg200 support
Karl Palsson [Mon, 7 May 2018 16:08:00 +0000 (16:08 +0000)]
ath79: add etactica-eg200 support

Based on original ar71xx eg200 board files

Tested working:
* usb hub, storage and serial port
* ethernet
* wifi
* leds
* button

sysupgrade from self->self passes validity checks.
sysupgrade from old ar71xx->ath79 passes. (however this doesn't migrate
wireless driver configs)

Only unknown issue is the existance of a /sys/class/leds/ath9k-phy0,
which doesn't "exist"

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years agoramips: add support for I-O DATA WN-GX300GR
INAGAKI Hiroshi [Wed, 16 May 2018 12:42:48 +0000 (21:42 +0900)]
ramips: add support for I-O DATA WN-GX300GR

I-O DATA WN-GX300GR is a 2.4 GHz band 11n router, based on MediaTek
MT7621S.

Specification:

- MT7621S (1-Core, 2-Threads)
- 64 MB of RAM
- 8 MB of Flash (SPI)
- 2T2R 2.4 GHz
- 5x 10/100/1000 Mbps Ethernet
- 2x LEDs, 4x keys (2x buttons, 1x slide switch)
- UART header on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - baudrate: 115200 bps (U-Boot, OpenWrt)

Flash instruction using initramfs image:

1. Connect serial cable to UART header
2. Rename OpenWrt initramfs image for WN-GX300GR to "uImageWN-GX300GR"
and place it in the TFTP directory
3. Set the IP address of the computer to 192.168.99.8, connect to the
LAN port of WN-GX300GR, and start the TFTP server on the computer
4. Connect power cable to WN-GX300GR and turn on the router
5. Press "1" key on the serial console to interrupt boot process on
U-Boot, press Enter key 3 times and start firmware download via TFTP
6. WN-GX300GR downloads initramfs image and boot with it
7. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with sysupgrade image for WN-GX300GR
8. Wait ~150 seconds to complete flasing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years agosparse: updated to version 0.5.2
Krystian Kozak [Sun, 27 May 2018 20:35:18 +0000 (22:35 +0200)]
sparse: updated to version 0.5.2

Updated to latest stable release

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
6 years agoath79: add TP-Link TL-MR10U port
Adoal Xu [Sun, 3 Jun 2018 17:04:51 +0000 (01:04 +0800)]
ath79: add TP-Link TL-MR10U port

Signed-off-by: Adoal Xu <adoalxu@gmail.com>
6 years agoar71xx: Fix offset to WMAC address for 8devices Lima
Sven Eckelmann [Thu, 7 Jun 2018 08:57:06 +0000 (10:57 +0200)]
ar71xx: Fix offset to WMAC address for 8devices Lima

The ART partition of the Lima board stores exactly three mac addresses:

* 0x0: eth0
* 0x6: eth1
* 0x1002: wmac

The first two are correctly assigned in the mach file but the latter points
to 0x800. But this position is set to ff:ff:ff:ff:ff:ff. Luckily, the
driver falls back in ath9k_hw_init_macaddr to the EEPROM mac address when
it doesn't find a valid mac address in the platform_data.

Remove this bogus offset to the ART partition to directly load the wmac via
the EEPROM data in the ART partition.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
6 years agomtd-utils: revert faulty upstream patch for now
Christian Lamparter [Thu, 7 Jun 2018 21:30:14 +0000 (23:30 +0200)]
mtd-utils: revert faulty upstream patch for now

Some of the ubi-tools in the upstream mtd-utils have been
broken by a bad patch upstream. It causes major breakage
during sysupgrade when the kernel, rootfs, ... volumes
are deleted in the wrong order.

This patch therefore reverts the faulty upstream commit which
fixes the bug.

linux-mtd mailing-list thread:
<http://lists.infradead.org/pipermail/linux-mtd/2018-June/081562.html>

Cc: John Crispin <john@phrozen.org>
Reported-by: L. Wayne Leach <LLeachii@aol.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years agoramips: mt7621: Fix some cosmetic DTC warnings
Rosen Penev [Thu, 7 Jun 2018 21:21:38 +0000 (14:21 -0700)]
ramips: mt7621: Fix some cosmetic DTC warnings

Node /cpus/cpu@0 has a unit name, but no reg property
Node /cpus/cpu@1 has a unit name, but no reg property
Node /cpuintc@0 has a unit name, but no reg property
Node /cpuclock@0 has a unit name, but no reg property
Node /sysclock@0 has a unit name, but no reg property
Node /pcie@1e140000/pcie0 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie0 missing bus-range for PCI bridge
Node /pcie@1e140000/pcie1 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie1 missing bus-range for PCI bridge
Node /pcie@1e140000/pcie2 missing ranges for PCI bridge (or not a bridge)
Node /pcie@1e140000/pcie2 missing bus-range for PCI bridge

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years agoramips: mmc: Add back some non-mt7621 code that staging removed
Rosen Penev [Thu, 7 Jun 2018 17:36:19 +0000 (10:36 -0700)]
ramips: mmc: Add back some non-mt7621 code that staging removed

This reverts commit 8a570921b5ba49a2d3824f1220e4c53809063468.

This seems to have been accidentally reverted. This fixes mt7620 and
mt7628.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Daniel Golle <daniel@makrotopia.org>
6 years agoramips: mir3g dts define usb port Vcc volt regulator GPIO
Kevin Darbyshire-Bryant [Thu, 7 Jun 2018 16:33:57 +0000 (16:33 +0000)]
ramips: mir3g dts define usb port Vcc volt regulator GPIO

Define USB port power on/off GPO as voltage regulator type instead of
exposing as a normal GPIO.

The GPO is now controlled by the USB driver via the voltage regulator
definition.  The regulator is of fixed output type (5V for USB) hence the
GPO switches power on/off to USB pin 1 (Vcc)

USB port power is enabled on driver load and disabled on driver unload.

Enable kernel support for fixed voltage regulator types on mt7621.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years agoipq40xx: flesh out MR33's pcie dts definitions
Christian Lamparter [Thu, 7 Jun 2018 15:36:58 +0000 (17:36 +0200)]
ipq40xx: flesh out MR33's pcie dts definitions

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years agoipq40xx: fix OpenMesh A62 dtc warnings
Christian Lamparter [Thu, 7 Jun 2018 15:36:57 +0000 (17:36 +0200)]
ipq40xx: fix OpenMesh A62 dtc warnings

Warning (pci_bridge): Node /soc/pci@40000000/pcie@0 missing ranges for PCI bridge (or not a bridge)
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0 missing bus-range for PCI bridge
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 node name is not "pci" or "pcie"
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 missing ranges for PCI bridge (or not a bridge)
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 incorrect #address-cells for PCI bridge
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 incorrect #size-cells for PCI bridge
Warning (pci_bridge): Node /soc/pci@40000000/pcie@0/ath10k@0,0 missing bus-range for PCI bridge
Warning (unit_address_format): Failed prerequisite 'pci_bridge'
Warning (pci_device_reg): Failed prerequisite 'pci_bridge'
Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge'

Cc: Sven Eckelmann <sven.eckelmann@openmesh.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Tested-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
6 years agoipq40xx: fix dtc warning about /soc/ad-hoc-bus missing a unit name
Christian Lamparter [Thu, 7 Jun 2018 15:36:56 +0000 (17:36 +0200)]
ipq40xx: fix dtc warning about /soc/ad-hoc-bus missing a unit name

This patch fixes a dtc warning that shows up for every device
Warning (unit_address_vs_reg): Node /soc/ad-hoc-bus has a reg or ranges property, but no unit name

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years agoipq40xx: set #size-cells to 0 to fix warning
Christian Lamparter [Thu, 7 Jun 2018 15:36:55 +0000 (17:36 +0200)]
ipq40xx: set #size-cells to 0 to fix warning

qcom-ipq4018-ex6100v2.dtb: Warning (reg_format): "reg" property in
/led_spi/led_gpio@0 has invalid length (4 bytes)
qcom-ipq4018-ex6100v2.dtb: Warning (avoid_default_addr_size):
Relying on default #size-cells value for /led_spi/led_gpio@0

Cc: Thomas Hebb <tommyhebb@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
6 years agoar71xx: fix USB switch to mPCIE for Mikrotik rb91x boards
Koen Vandeputte [Thu, 7 Jun 2018 13:59:26 +0000 (15:59 +0200)]
ar71xx: fix USB switch to mPCIE for Mikrotik rb91x boards

Some devices like the Mikrotik RB912 only have 1 USB port
which is shared between an USB A type port, and the mini PCIe socket.

Toggling a gpio selects the output to which USB is connected.

Since kernel 4.9, gpio base is rounded up to a value of 32.

Commit 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") accounts correctly for that.
In this commit, rb912 sees it's value changed from AR934X_GPIO_COUNT (23) to 32
This means that the USB toggle gpio number actually also changes from 52 to 61.

But ..
Some of these GPIO numbers are also used in other locations, like the boardfile.
The author forgot to also change them over there.

Switching the USB port to mPCIe now shows my modem is correctly discovered again:

[ 2863.864471] usb 1-1: new high-speed USB device number 4 using ehci-platform
[ 2864.055303] usb 1-1: config 1 has an invalid interface number: 8 but max is 3
[ 2864.062728] usb 1-1: config 1 has no interface number 1
[ 2864.074567] qcserial 1-1:1.0: Qualcomm USB modem converter detected
[ 2864.081474] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB0
[ 2864.111960] qcserial 1-1:1.2: Qualcomm USB modem converter detected
[ 2864.118976] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB1
[ 2864.139808] qcserial 1-1:1.3: Qualcomm USB modem converter detected
[ 2864.146777] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB2
[ 2864.165276] qmi_wwan 1-1:1.8: cdc-wdm0: USB WDM device
[ 2864.171879] qmi_wwan 1-1:1.8 wwan0: register 'qmi_wwan' at usb-ehci-platform-1, WWAN/QMI device, 02:00:44:ed:3b:11

Fixes: 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Cc: Robin Leblon <robin.leblon@ncentric.com>
Cc: Felix Fietkau <nbd@nbd.name>
6 years agoimx-uuc: updated to latest git HEAD
Krystian Kozak [Sun, 27 May 2018 20:54:04 +0000 (22:54 +0200)]
imx-uuc: updated to latest git HEAD

8e29d86 linuxrc: remove superfluous shebang line
12d2045 gitignore: remove Windows stuff
57d8969 Add travis hint
8edf4cc sdimage: use fsync before closing the device (fixes #1)
d395b31 uuc: fix some compiler warnings

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
6 years agobusybox: udhcpc: no MSG_DONTROUTE when sending packet
Adi Shammout [Wed, 6 Jun 2018 19:53:24 +0000 (22:53 +0300)]
busybox: udhcpc: no MSG_DONTROUTE when sending packet

This reverts a change made in Sep 2017 [1] which introduced
MSG_DONTROUTE flag to prevent udhcpc from reaching out to servers on a
different subnet. That change violates RFC2131 by forcing fully
configured clients, who got their configurations through an offer
relayed by a DHCP relay, from renewing through a unicast request
directly to the DHCP server, resulting in the client resorting to
boradcasting lease extension requests instead of unicasting them,
further breaking RFC2131.

The problem with MSG_DONTROUTE appears when talking to a properly
configured DHCP server that rejects non-compliant requests. Such server
will reject lease extension attempts sent via broadcast rather than
unicast, as is the case with Finnish ISPs Telia and DNA as well as
Estonian ISP Starman. Once the lease expires without renewal, udhcpc
enters init mode, taking down the interfaces with it, and thus causing
interruption on every lease expiry. On some ISPs (such as the ones
mentioned above) that can be once every 10-20 minutes. The interruptions
appear in the logs as such:
----
udhcpc: sending renew to x.x.x.x
udhcpc: send: Network unreachable
udhcpc: sending renew to 0.0.0.0
udhcpc: sending renew to 0.0.0.0
...
udhcpc: lease lost, entering init state
Interface 'wan' has lost the connection
Interface 'wan' is now down
Network alias 'eth0' link is down
udhcpc: sending select for y.y.y.y
udhcpc: lease of y.y.y.y obtained, lease time 1200
Network alias 'eth0' link is up
Interface 'wan' is now up
----

During lease extension, a fully configured client should be able to
reach out to the server from which it recieved the lease for extension,
regardless in which network it is; that's up to the gateway to find. [2]
This patch ensures that.

[1]
http://lists.busybox.net/pipermail/busybox-cvs/2017-September/037402.html
[2]
https://www.netmanias.com/en/post/techdocs/6000/dhcp-network-protocol/
understanding-dhcp-relay-agents

Signed-off-by: Adi Shammout <adi.shammout@outlook.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
6 years agologd: create log directory for log_file
Karl Palsson [Thu, 22 Feb 2018 11:09:53 +0000 (11:09 +0000)]
logd: create log directory for log_file

If log_file is specified, make sure its directory exists.

Signed-off-by: Karl Palsson <karlp@etactica.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
6 years agoath79: fix qca956x SoC boot
Lucian Cristian [Sun, 3 Jun 2018 23:09:15 +0000 (02:09 +0300)]
ath79: fix qca956x SoC boot

based on old ar71xx irq.c driver

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agoar71xx: add support for OCEDO Koala
David Bauer [Tue, 29 May 2018 15:00:53 +0000 (17:00 +0200)]
ar71xx: add support for OCEDO Koala

This commit adds support for the OCEDO Koala

SOC: Qualcomm QCA9558 (Scorpion)
RAM:    128MB
FLASH:  16MiB
WLAN1:  QCA9558 2.4 GHz 802.11bgn 3x3
WLAN2:  QCA9880 5 GHz 802.11nac 3x3
INPUT:  RESET button
LED:    Power, LAN, WiFi 2.4, WiFi 5, SYS
Serial: Header Next to Black metal shield
        Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V)
        The Serial setting is 115200-8-N-1.

Tested and working:
 - Ethernet
 - 2.4 GHz WiFi
 - 5 GHz WiFi
 - TFTP boot from ramdisk image
 - Installation via ramdisk image
 - OpenWRT sysupgrade
 - Buttons
 - LEDs

Installation seems to be possible only through booting an OpenWRT
ramdisk image.

Hold down the reset button while powering on the device. It will load a
ramdisk image named 'koala-uImage-initramfs-lzma.bin' from 192.168.100.8.

Note: depending on the present software, the device might also try to
pull a file called 'koala-uimage-factory'. Only the name differs, it
is still used as a ramdisk image.

Wait for the ramdisk image to boot. OpenWRT can be written to the flash
via sysupgrade or mtd.

Due to the flip-flop bootloader which we not (yet) support, you need to
set the partition the bootloader is selecting. It is possible from the
initramfs image with

 > fw_setenv bootcmd run bootcmd_1

Afterwards you can reboot the device.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years agohostapd: make cli treat UNKNOWN COMMAND as failing
Denton Gentry [Wed, 30 May 2018 15:05:42 +0000 (15:05 +0000)]
hostapd: make cli treat UNKNOWN COMMAND as failing

Avoid infinite loop at 100% CPU when running hostapd_cli
if CONFIG_CTRL_IFACE_MIB is not defined.

  _newselect(4, [3], NULL, NULL, ...)
  recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16
  sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24

Signed-off-by: Denton Gentry <denny@geekhold.com>
6 years agoipq806x: Enlarge R7800 flash - use netgear partition
Hannu Nyman [Sun, 3 Jun 2018 13:33:15 +0000 (16:33 +0300)]
ipq806x: Enlarge R7800 flash - use netgear partition

Increase the available flash memory size in Netgear R7800
by taking into the use the unused "netgear" partition
that is located after the firmware partition.

Available flash space for kernel+rootfs+overlay increases
by 68 MB from 32 MB to 100 MB.

In a typical build, overlay space increases from 15 to 85,
increasing the package installation possibilities greatly.

Reverting to the OEM firmware is still possible, as the OEM
firmware contains logic to initialise the "netgear" partition
if its contents do not match expectations. In OEM firmware,
"netgear" contains 6 UBI sub-partitions that are defined in
/etc/netgear.cfg and initialisation is done by /etc/preinit

Tested with Openwrt master r7093-4fdc6ca31b and OEM V1.0.2.52

Reference to forum discussion in Netgear R7800 exploration thread:
https://forum.lede-project.org/t/netgear-r7800-exploration-ipq8065-qca9984/285/1118
(messages 1118-1158)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
6 years agoipq806x: Limit NR_CPUS to 2
Rosen Penev [Thu, 7 Jun 2018 01:33:59 +0000 (18:33 -0700)]
ipq806x: Limit NR_CPUS to 2

ipq806x is all dual core processors. ipq807x is quad core. Removes this
from dmesg:

RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years agoethtool: Update to 4.16
Rosen Penev [Thu, 7 Jun 2018 01:22:28 +0000 (18:22 -0700)]
ethtool: Update to 4.16

Tested on Turris Omnia (mvebu).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years agoiperf: Update to 2.0.11
Rosen Penev [Thu, 7 Jun 2018 01:22:27 +0000 (18:22 -0700)]
iperf: Update to 2.0.11

Tested on Turris Omnia (mvebu).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years agogdb: Update to 8.1
Rosen Penev [Thu, 7 Jun 2018 01:22:26 +0000 (18:22 -0700)]
gdb: Update to 8.1

Tested on Turris Omnia (mvebu).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years agostrace: Update to 4.22
Rosen Penev [Thu, 7 Jun 2018 01:22:25 +0000 (18:22 -0700)]
strace: Update to 4.22

SourceForge is deprecated according to upstream, so switch to main site
for downloads.

Tested on Turris Omnia (mvebu).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years agokernel: bump 4.9 to 4.9.106
Koen Vandeputte [Wed, 6 Jun 2018 13:22:05 +0000 (15:22 +0200)]
kernel: bump 4.9 to 4.9.106

Refreshed all patches

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years agoath79: add WLAN, Ethernet-Switch with LAN/WAN and Status LED to Dorin
Catrinel Catrinescu [Tue, 5 Jun 2018 14:56:48 +0000 (16:56 +0200)]
ath79: add WLAN, Ethernet-Switch with LAN/WAN and Status LED to Dorin

Signed-off-by: Catrinel Catrinescu <cc@80211.de>
6 years agozynq: remove support for kernel 4.4
Luis Araneda [Sun, 13 May 2018 23:48:53 +0000 (19:48 -0400)]
zynq: remove support for kernel 4.4

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agozynq: switch to kernel 4.14
Luis Araneda [Sun, 13 May 2018 23:45:58 +0000 (19:45 -0400)]
zynq: switch to kernel 4.14

Also, remove the source-only qualifier

Run-tested: ZedBoard

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agozynq: refresh kernel 4.14 configuration
Luis Araneda [Sun, 13 May 2018 23:39:36 +0000 (19:39 -0400)]
zynq: refresh kernel 4.14 configuration

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agozynq: copy config to kernel 4.14
Luis Araneda [Sun, 13 May 2018 22:22:10 +0000 (18:22 -0400)]
zynq: copy config to kernel 4.14

The file will be used as a base configuration
for kernel 4.14

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agouboot-zynq: update to 2017.03
Luis Araneda [Sun, 13 May 2018 22:12:21 +0000 (18:12 -0400)]
uboot-zynq: update to 2017.03

Compile-tested: ZedBoard

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agozynq: fix detection of the zybo board
Luis Araneda [Sun, 13 May 2018 19:55:00 +0000 (15:55 -0400)]
zynq: fix detection of the zybo board

The board_name was being tested for "xlnx,zynq-zybo",
but the .dts compatible string is "digilent,zynq-zybo"

Also, sorted the boards alphabetically, and added an
error message for unsupported boards

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agozynq: remove hard-coded network configuration
Luis Araneda [Sun, 13 May 2018 18:52:04 +0000 (14:52 -0400)]
zynq: remove hard-coded network configuration

This is no longer necessary since commit 57776e6
(base-files: remove default /etc/config/network,
generate it via board.d instead)

Run-tested: ZedBoard

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agozynq: reworked image creation process
Luis Araneda [Sun, 13 May 2018 18:05:38 +0000 (14:05 -0400)]
zynq: reworked image creation process

After commit a1248da (zynq: convert to new image build code),
all boards, became unbootable, entering into a boot loop.

Replace the compressed kernel zImage by an uncompressed Image,
which is compressed after with gzip. Also, enable the creation
of an initramfs image by default.

Change images' filename to match the compatible string from the
respective .dts file (<vendor>_<model>). Also, use the shared
mkits.sh script and remove the target specific one.

Fixes: FS#1204
Run-tested: ZedBoard

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years agobrcm2708: Update brcm2708-gpu-fw package
Christo Nedev [Fri, 1 Jun 2018 14:23:21 +0000 (14:23 +0000)]
brcm2708: Update brcm2708-gpu-fw package

Problem - rapsberry pi 3 b/b+ does not boot with bcm2710 images!

How Raspberry Pi boots Actualy?

When Raspberry is switched on GPU is activated.
1. GPU execute First stage bootloader from ROM.
First stage bootloader mount the FAT boot partition on the SD card
and execute second stage bootloader (bootcode.bin).
2. Second stage bootloader (bootcode.bin) activate SDRAM.
Load the GPU firmware (start.elf).
3. GPU firmware (start.elf)
  a) display Rainbow splash.
  b) read firmware configuration file config.txt and
     split the RAM using fixup.dat.
  c) loads a cmdline.txt
  d) enables the CPU.
  e) loads the kernel image configurable via config.txt

In your target/linux/brcm2708/image/config.txt
 493 ## kernel (string)
 494 ##     Alternative name to use when loading kernel.
 495 ##
 496 #kernel=""
it is not configured!

But in your target/linux/brcm2708/image/Makefile
  75   KERNEL_IMG := kernel8.img
  76   DEVICE_TITLE := Raspberry Pi 3B/3B+
you have kernel8.img

GPU Firmware search order by default for a PI 3 is:
kernel8.img if found boot in 64 bit mode
kernel8-32.img if found boot in 32 bit mode
kernel7.img if found boot in 32 bit mode
kernel.img if found boot in 32 bit mode

But a PI 2 will start the search from kernel7.img and
a PI 1 only looks for kernel.img.

Đžbviously the kernel has been found.
But something goes wrong and the device is restarted.

In your package/kernel/brcm2708-gpu-fw/Makefile
  11 PKG_NAME:=brcm2708-gpu-fw
  12 PKG_VERSION:=2017-08-08
  13 PKG_RELEASE:=e7ba7ab135f5a68b2c00a919ea9ac8d5528a5d5b
boot loader is 10 monts old.

In conclusion, the best way to solve the problem is
to update the boot loader!

Fixup_cd.dat and start_cd.elf files are not necessary.
These are used when GPU memory is set to 16 MB, which disables
some GPU features.
I did not remove them just in case!

cheers

Signed-off-by: Christo Nedev <christo.nedev@gmail.com>
6 years agoramips: fix reboot with W25Q256 with 4-address-mode enabled
Daniel Golle [Wed, 6 Jun 2018 23:51:58 +0000 (01:51 +0200)]
ramips: fix reboot with W25Q256 with 4-address-mode enabled

Some board vendors actually changed the loader to expect the chip
to come up in 4-address-mode and flipped the ADP bit in the flash
chip's configuration register which makes it come up in 4-address-mode.
Hence it doesn't make sense to avoid switching to 4-address-mode on
those boards but the opposite as otherwise reboot hangs eg. on the
WrtNode2 boards. Fix this by checking the ADP register and only using
SPI_NOR_4B_READ_OP on chips which have ADP==0 (come up in 3-byte mode).

See also datasheet section 7.1.11 Power Up Address Mode (ADP)

Fixes: 22d982ea0 ("ramips: add support for switching between 3-byte and 4-byte addressing on w25q256 flash")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years agoebtables: update to latest git 2018-06-06
Hans Dedecker [Wed, 6 Jun 2018 20:30:57 +0000 (22:30 +0200)]
ebtables: update to latest git 2018-06-06

5699354 extensions: fix build failure on fc28
e6359ee build: update ebtables.h from kernel and drop local unused copy

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
6 years agoar71xx: switch CPE/WBS 210/510 to okli-loader
Matthias Schiffer [Tue, 5 Jun 2018 22:35:17 +0000 (00:35 +0200)]
ar71xx: switch CPE/WBS 210/510 to okli-loader

We recently increased the kernel partition size of the CPE/WBS 210/510.
This works fine for new installations of the factory image, but on
sysupgrades, the partition table read by the bootloader is not adjusted.
This limits the maximum size of the kernel loaded by the bootloader to the
old partition size.

While adjusting the partition table would be a cleanest solution, such a
migration would have to happen before an upgrade to a new version with a
newer kernel. This is error-prone and would require a two-step upgrade, as
we mark the partition table partition read-only.

Instead, switch from the lzma-loader with embedded kernel to the
okli-loader, so only the tiny lzma-loader is loaded by the bootloader as
"kernel", and the lzma-loader will then load the rest of the kernel by
itself.

Fixes: e39847ea2f70 ("ar71xx: increase kernel partition size for CPE/WBS 210/510")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoath79: lzma-loader: sync with ar71xx target
Matthias Schiffer [Wed, 6 Jun 2018 19:01:32 +0000 (21:01 +0200)]
ath79: lzma-loader: sync with ar71xx target

Import all improvements made in the lzma-loader since development on the
ath79 target started.

This also reverts fe594bf90d09 ("ath79: fix loader-okli, lzma-loader"), as
is obsoleted by 2ad60168b6af ("ar71xx: lzma-loader: move padding workaround
to gzip step").

Likely, many of the changes should be ported to the ramips lzma-loader as
well, but I don't have a device to test this.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoar71xx: make loader-okli build step more generic
Matthias Schiffer [Tue, 5 Jun 2018 22:34:25 +0000 (00:34 +0200)]
ar71xx: make loader-okli build step more generic

Add support for different loader types.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoar71xx: lzma-loader: constify kernel argv array
Matthias Schiffer [Tue, 5 Jun 2018 22:30:57 +0000 (00:30 +0200)]
ar71xx: lzma-loader: constify kernel argv array

By making the kernel argv array const, the .data section can always be
omitted from the laoder binary.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoar71xx: lzma-loader: set page size to 4KB
Matthias Schiffer [Tue, 5 Jun 2018 22:27:42 +0000 (00:27 +0200)]
ar71xx: lzma-loader: set page size to 4KB

The text section in the ELF loader is aligned to the maximum page size,
which defaults to 64KB. Reduce it to the actual page size to avoid wasting
flash space for this alignment.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agoar71xx: lzma-loader: move padding workaround to gzip step
Matthias Schiffer [Wed, 6 Jun 2018 18:51:05 +0000 (20:51 +0200)]
ar71xx: lzma-loader: move padding workaround to gzip step

Some devices (TP-Link TL-WR1043ND v1) don't boot reliably when the
uncompressed loader is too small. This was workarounded in the loader by
adding 512KB of padding to the .data section of the loader binary.

This approach had two issues:

- The padding was only working when .data was non-empty (otherwise the
  section would become NOBITS, omitting it in the binary). .data was only
  empty when no CMDLINE was set, leading to further workarounds like
  fe594bf90d09 ("ath79: fix loader-okli, lzma-loader"), and this
  workaround was only effective because a missing "const" led to the kernel
  argv being stored in .data instead of .rodata
- The padding was not only added to the compressed .gz loader, but also
  uncompressed .bin and .elf loaders. The prevented embedding the kernel
  cmdline in the loader for non-gz loader types.

To fix both issues, move the creation of the padding from the linker script
to the gzip step.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years agobase-files: fix UCI config parsing and callback handling
Tony Ambardar [Thu, 8 Mar 2018 05:00:45 +0000 (21:00 -0800)]
base-files: fix UCI config parsing and callback handling

There are several long-standing issues present in the UCI shell API as
documented in https://wiki.openwrt.org/doc/devel/config-scripting. They
relate both to high-level, user-defined callback functions used to
process UCI config files, and also to low-level functions used within
scripts generally.

The related problems have been encountered now and in the past, e.g.
https://forum.openwrt.org/viewtopic.php?id=54295, and include:

a) UCI parsing option() function and user-defined option_cb() callbacks
being erroneously called during processing of "list" config file entries;

b) normal usage of the low-level config_set() unexpectedy calling any
defined option_cb() if present; and

c) handling of the list_cb() not respecting the NO_CALLBACK variable.

Root causes include a function stack "inversion", where the low-level
config_set() function incorrectly calls the high-level option() function,
intended only for processing the "option" keyword of UCI config files.

This change addresses the inversion and other issues, making the option
handling code more consistent and smaller, and simplifying developers'
usage of UCI callbacks.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]