openwrt/staging/ynezz.git
7 years agoag71xx: add support for port mirroring
Milan Krstić [Wed, 26 Apr 2017 19:52:44 +0000 (21:52 +0200)]
ag71xx: add support for port mirroring

This exposes hardware port mirroring in ag71xx driver (e.g. TL-WR841ND) via
swconfig API.

Signed-off-by: Milan Krstić <milan.krstic@gmail.com>
7 years agodnsmasq: introduce config support for forced DHCP options
Jo-Philipp Wich [Wed, 21 Jun 2017 14:48:41 +0000 (16:48 +0200)]
dnsmasq: introduce config support for forced DHCP options

Introduce a new UCI list setting `list dhcp_option_force` which is available
in sections of type `dnsmasq` and `dhcp`.

The `dhcp_option_force` setting has the same semantics as `dhcp_option` but
generates `dhcp-option-force` directives instead of `dhcp-option` ones in
emitted native configuration.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoscripts/download.pl: Adjust URLs
Daniel Engberg [Sun, 25 Jun 2017 16:14:33 +0000 (18:14 +0200)]
scripts/download.pl: Adjust URLs

Internet2 isn't considered a trusted issuer meaning that https links to
rit.edu will fail.

The host mirror.csclub.uwaterloo.ca has a trusted SSL cert and peering
is good so it can replace rit.edu without performance issues.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
[Jo-Philipp Wich: rewrapped commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agobuild: fix invocation of bundled ld.so in SDK and Imagebuilder
Jo-Philipp Wich [Sun, 16 Jul 2017 21:43:19 +0000 (23:43 +0200)]
build: fix invocation of bundled ld.so in SDK and Imagebuilder

Commit 72d751cba9 "build: rework library bundling" introduced a new helper
binary "runas" whose sole purpose was mangling the argv vector passed to
the actual called ELF image so that the renamed executable could obtain the
proper name from argv[0].

This approach, however totally defeated the purpose of calling bundled ELF
executables through the shipped ld.so loader since the execv() invocation
performed by "runas" would cause the kernel the interprete the final program
image through the system ELF loader again.

To solve the problem, use an alternative approach of shipping a shared object
"runas.so" which uses an ELF ".init_array" function pointer to obtain the
argv[] vector of the to-be-executed main() function and mangle it in-place.

The actual argv[0] value to use is communicated out-of-band using an
environment variable "RUNAS_ARG0" by the shell wrapper script. The wrapper
script also takes care of setting LD_PRELOAD to instruct the shipped ELF
loader to preload the actual ELF program image with the "runas.so" helper
library.

Fixes FS#909.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agobrcm47xx: fix switch port mapping on Asus RT-N12 and RT-N16 models
Jo-Philipp Wich [Wed, 19 Jul 2017 08:39:10 +0000 (10:39 +0200)]
brcm47xx: fix switch port mapping on Asus RT-N12 and RT-N16 models

On Asus RT-N12 and RT-N16 models, the WAN and LAN4 ports are swapped in the
initial switch configuration since the presets present in nvram appear to be
wrong.

Add special casing for these models to detect_by_model() in order to ensure
a proper switch configuration.

Fixes FS#502.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agobase-files: upgrade: don't loop forever trying to kill processes
Matthias Schiffer [Wed, 12 Jul 2017 22:19:32 +0000 (00:19 +0200)]
base-files: upgrade: don't loop forever trying to kill processes

When processes don't die on SIGKILL (usually because of kernel bugs), it's
better to give up instead of looping forever.

upgraded will trigger a reboot in this case (and if this fails, a hardware
watchdog will eventually time out and reset the system, if present).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoprocd: update to latest version
Matthias Schiffer [Wed, 12 Jul 2017 22:18:50 +0000 (00:18 +0200)]
procd: update to latest version

17026f4 system: return ubus error when sysupgrade_exec_upgraded() has failed
13f252f upgraded: Check chroot() return value
85ccb95 init: Check chroot return value in sysupgrade_exec_upgraded()
76dcbee upgraded: improve error handling
d749b2a upgraded: register stage2 process in uloop as intended

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoar71xx: use the RB912UAG-{2, 5}HPnD Power LED for diag
Sergey Ryazanov [Fri, 14 Jul 2017 08:59:16 +0000 (11:59 +0300)]
ar71xx: use the RB912UAG-{2, 5}HPnD Power LED for diag

The Power LED of RB912UAG-{2,5}HPnD boards can be controlled by sofware,
so use it for diag purposes and make the User LED free for other tasks.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
7 years agoar71xx: keep the RouterBOARD Power LED in On state
Sergey Ryazanov [Fri, 14 Jul 2017 08:58:54 +0000 (11:58 +0300)]
ar71xx: keep the RouterBOARD Power LED in On state

It is quite unexpected behaviour when the Power LED switches off as soon
as the kernel starts booting. So set the default state to 'Keep' for
the Power LEDs of all RouterBOARDs (e.g. RB91x, SXT Lite series, etc.).

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
[switch the default state to keep instead of on]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: add support for Phicomm K2P
Chuanhong Guo [Tue, 18 Jul 2017 05:02:51 +0000 (13:02 +0800)]
ramips: add support for Phicomm K2P

It uses one MT7615D radio chip with DBDC mode enabled. This mode allows
this single chip act as an 2x2 11n radio and an 2x2 11ac radio at the
same time. However mt76 doesn't  support it currently so there is no
wireless available.

Specification:
- SoC: MediaTek MT7621AT
- Flash: 16 MB
- RAM: 128 MB
- Ethernet: 1 x WAN (10/100/1000Mbps) and 4 x LAN (10/100/1000 Mbps)
- Wireless radio: MT7615D on PCIE0
- UART: 1 x UART on PCB - 57600 8N1

Issue:
- Wireless radio doesn't work due to the lack of driver.

Flash instruction:
Using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put the firmware into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press 2,then follow the instruction to
   set device and tftp server IP address and input the firmware
   file name.U-boot will then load the firmware and write it into
   the flash.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
7 years agolantiq: fix sleep with spinlock held in xrx200 network driver
Andrea Merello [Sat, 8 Jul 2017 08:11:11 +0000 (10:11 +0200)]
lantiq: fix sleep with spinlock held in xrx200 network driver

In the xrx200_close() function we call napi_disable(), that could
sleep, with priv->hw->chan[i].lock held. This could lead to deadlock
and causes the kernel to complain.

Look at the code I couldn't convince myself about why we
need to protect that specific code part with the lock. IMHO there
seems no reason to protect the refcount variables, because AFAIK
ndo_close() and ndo_open() callbacks are already called with a
semaphore held. Neither I could figure out why napi_disable() have to
be called with that lock held. The only remaining code part for
which I could guess the lock is useful for is ltq_dma_close()
function call.

This patch reduces the lock to the said function call, avoiding the
sleep-with-spinlock-held situation

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
[fold into 0025-NET-MIPS-lantiq-adds-xrx200-net.patch, backport to
kernel 4.4]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agokernel: do not try to probe builtin modules on empty kmod package install
Jonas Gorski [Sun, 18 Jun 2017 15:40:01 +0000 (17:40 +0200)]
kernel: do not try to probe builtin modules on empty kmod package install

Builtin modules are always present, and trying to load them will cause
modprobe to spew errors when installing the empty kmod packages.

Fix this by never generating any postinst module install instructions
for builtin modules.

Fixes #842.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years agouml: Backport upstream fix to build against static libpthread
Florian Fainelli [Tue, 18 Jul 2017 21:52:51 +0000 (14:52 -0700)]
uml: Backport upstream fix to build against static libpthread

Backport upstream commit f44f1e7da7c8e3f4575d5d61c4df978496903fcc ("um:
Avoid longjmp/setjmp symbol clashes with libpthread.a") to fix build
issues on hosts that only have a static libpthread.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agotoolchain/arc: update to the most recent release arc-2017.03
Evgeniy Didin [Wed, 12 Jul 2017 15:00:31 +0000 (18:00 +0300)]
toolchain/arc: update to the most recent release arc-2017.03

arc-2017.03 is the most recent release toolchain for ARC cores
and it is based on upstream Binutils 2.28 and GCC 6.3.0

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@phrozen.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
7 years agodnsmasq: backport remove ping check of configured dhcp address
Hans Dedecker [Tue, 18 Jul 2017 20:55:29 +0000 (22:55 +0200)]
dnsmasq: backport remove ping check of configured dhcp address

Remove ping check in DHCPDISCOVER case as too many buggy clients leave
an interface in configured state causing the ping check to fail.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agotools: expat: fix build on older host systems
Jo-Philipp Wich [Tue, 18 Jul 2017 20:50:11 +0000 (22:50 +0200)]
tools: expat: fix build on older host systems

Expat release 2.2.2 requires support for either syscall(SYS_getrandom) which
is available on Linux 3.17 or support for getrandom() which is only available
in glibc 2.25 or later.

Since some of our builders still run on Linux 3.16, we need to forcibly
disable the use of getrandom() for the host builds.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agotools/expat: Update host version to 2.2.2
Ted Hess [Mon, 17 Jul 2017 20:42:29 +0000 (16:42 -0400)]
tools/expat: Update host version to 2.2.2

Ref: CVE-2017-9233, CVE-2016-9063

Signed-off-by: Ted Hess <thess@kitschensync.net>
7 years agofstools: update to latest
Daniel Golle [Sun, 16 Jul 2017 20:32:46 +0000 (22:32 +0200)]
fstools: update to latest

0dfe61a block: support /dev/xvd* nodes
f038a61 libfstools: fix matching device name

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years agox86: Fix xen serial console by removing conflicting PATA driver
Baptiste Jonglez [Sat, 15 Jul 2017 17:48:09 +0000 (19:48 +0200)]
x86: Fix xen serial console by removing conflicting PATA driver

The Xen serial console has been broken since the xen_domu subtarget
was merged in the generic x86 subtarget (commits 1d6879ee and 371b382a).

The reason for the broken serial console seems to be an IRQ conflict
between the serial console driver and the PATA_LEGACY driver:

[    1.330125] genirq: Flags mismatch irq 8. 00000000 (hvc_console) vs. 00000000 (platform[pata_legacy.4])
[    1.330134] hvc_open: request_irq failed with rc -16.
[    1.330148] Warning: unable to open an initial console.

Just drop the PATA_LEGACY driver from the x86/generic and x86_64
subtargets, since this driver is marked experimental and only supports
very old ISA devices anyway.  It is still included in the x86/legacy
subtarget where it rightfully belongs.

Fixes: FS#787
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
7 years agox86/64: add xen DomU support
Baptiste Jonglez [Sat, 15 Jul 2017 16:48:01 +0000 (18:48 +0200)]
x86/64: add xen DomU support

Xen support for x86/generic was added in 1d6879ee.  This commit also
enables it for x86/64.

This was successfully tested with Xen 4.5, although the serial console
is broken in the same way as x86/generic (see FS#787)

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
7 years agox86: Move USB support from subtargets to target config
Baptiste Jonglez [Sat, 15 Jul 2017 16:48:00 +0000 (18:48 +0200)]
x86: Move USB support from subtargets to target config

All x86 subtargets enable USB support, so it makes sense to enable it
in the target config instead, to avoid duplication.

Also refresh subtarget configs accordingly.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
7 years agox86: Refresh subtargets kernel config
Baptiste Jonglez [Sat, 15 Jul 2017 16:47:59 +0000 (18:47 +0200)]
x86: Refresh subtargets kernel config

This was done by simply running `make kernel_menuconfig CONFIG_TARGET=subtarget`
and then saving without changing any option.

Most of the removed options can be explained because they are already
present in the target config or in the generic 4.9 config:

- PAE-related options, enabled by default on x86 by 961c0eac
- LZO-related options, enabled by default since 4.9

As far as I understand the build system, this shouldn't have any
user-visible impact, because the build system already merges the
various kernel configs during build.

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
7 years agox86: Drop stray subtarget "epia"
Baptiste Jonglez [Sat, 15 Jul 2017 16:47:58 +0000 (18:47 +0200)]
x86: Drop stray subtarget "epia"

This subtarget was added by 961c0eac, probably by mistake.  It does
not contain anything beside a kernel config.

Acked-by: Daniel Golle <daniel@makrotopia.org>
Cc: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
7 years agotreewide: use only board_name function to get name
Mathias Kresin [Sun, 9 Jul 2017 11:00:36 +0000 (13:00 +0200)]
treewide: use only board_name function to get name

Do not parse /tmp/sysinfo/board_name, /proc/cpuinfo or the device tree
compatible string directly. Always use the board_name function to get
the board name.

The admswconfig package still reads /proc/cpuinfo directly. The code
looks somehow broken and the whole adm5120 which uses this package
looks unmaintained. Leave it as it is for now.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agotreewide: drop target board_name functions
Mathias Kresin [Sun, 9 Jul 2017 10:25:04 +0000 (12:25 +0200)]
treewide: drop target board_name functions

They are not used any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agotreewide: use the generic board_name function
Mathias Kresin [Fri, 12 May 2017 20:36:07 +0000 (22:36 +0200)]
treewide: use the generic board_name function

Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agosunix: run b53_hack later
Mathias Kresin [Wed, 12 Jul 2017 06:10:59 +0000 (08:10 +0200)]
sunix: run b53_hack later

The script relies on the board name but runs prior the generic sysinfo
script which sets the board name.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agotreewide: do board detection during preinit
Mathias Kresin [Fri, 7 Apr 2017 16:01:17 +0000 (18:01 +0200)]
treewide: do board detection during preinit

Do the board detection during preinit to unify it across all targets.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agotreewide: populate boardname and model earlier
Mathias Kresin [Fri, 7 Apr 2017 16:09:08 +0000 (18:09 +0200)]
treewide: populate boardname and model earlier

For targets using the generic board detection and board specific
settings in diag.sh, the board name is still unset at the time the
set_state() provided by diag.sh is called by 10_indicate_preinit.

Change the execution order to ensure the boardname is populated before
required the first time. Do the target specific board detection as
early as possible, directly followed by the generic one to allow a
seamless switch to the generic function for populating /tmp/sysinfo/.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agokmod-sched-cake: drop maintainer
Kevin Darbyshire-Bryant [Fri, 16 Jun 2017 19:06:50 +0000 (20:06 +0100)]
kmod-sched-cake: drop maintainer

Drop myself from maintainership of 'cake'.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years agoimage: fix ar71xx legacy images
Mathias Kresin [Fri, 14 Jul 2017 17:35:02 +0000 (19:35 +0200)]
image: fix ar71xx legacy images

If TARGET_PER_DEVICE_ROOTFS and DEVICE_PACKAGES are used for ar71xx
legacy images:

- an already jffs2 padded squashfs rootfs is overwritten
  with an unpadded/raw one.

- the squashfs-raw and squashfs-64k rootfs are not replaced by the
  ones including the DEVICE_PACKAGES

Call Image/Build/squashfs after the DEVICE_PACKAGES are added to the
base squashfs rootfs to fix the issues.

Fixes: FS#904
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: fix GL-inet GL-MT300N-V2 WAN/LAN MAC address
John Marrett [Thu, 13 Jul 2017 12:03:07 +0000 (08:03 -0400)]
ramips: fix GL-inet GL-MT300N-V2 WAN/LAN MAC address

Correct MAC address lookup to appropriate offset based on vendor
source.

Override the WAN MAC to use the same address as LAN. The switch driver
increments the base MAC address for the WAN vlan but the stock firmware
uses the same MAC address for all interfaces.

Based on vendor source commit
https://github.com/domino-team/lede-1701/commit/efb0518

Signed-off-by: John Marrett <johnf@zioncluster.ca>
7 years agoimx6: fix DualLite/Solo GW551X board detection
Mathias Kresin [Mon, 15 May 2017 16:21:39 +0000 (18:21 +0200)]
imx6: fix DualLite/Solo GW551X board detection

The model name is a different one in the device tree source file.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agonftables: Update to 0.7
Nick Brassel [Mon, 10 Jul 2017 07:15:00 +0000 (17:15 +1000)]
nftables: Update to 0.7

Updated nftables to latest.

Signed-off-by: Nick Brassel <nick@tzarc.org>
7 years agokernel: update kernel 4.9 to 4.9.37
Koen Vandeputte [Wed, 12 Jul 2017 20:59:03 +0000 (22:59 +0200)]
kernel: update kernel 4.9 to 4.9.37

- Refreshed all patches
- Removed upstreamed
- Adapted 4 patches:

473-fix-marvell-phy-initialization-issues.patch
-----------------------------------------------
Removed hunk 5 which got upstreamed

403-net-phy-avoid-setting-unsupported-EEE-advertisments.patch
404-net-phy-restart-phy-autonegotiation-after-EEE-advert.patch
--------------------------------------------------------------
Adapted these 2 RFC patches, merging the delta's from an upstream commit
(see below) which made it before these 2.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-
stable.git/commit/?h=v4.9.36&id=97ace183074d306942b903a148aebd5d061758f0

180-usb-xhci-add-support-for-performing-fake-doorbell.patch
-----------------------------------------------------------
- Moved fake_doorbell bitmask due to new item

Compile tested on: cns3xxx, imx6
Run tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years agotools/flex: Revert "tools/flex: add autoreconf"
Hauke Mehrtens [Thu, 13 Jul 2017 20:47:42 +0000 (22:47 +0200)]
tools/flex: Revert "tools/flex: add autoreconf"

This was already done in commit 91e262c6b35a7 ("tools: flex: fix build
with automake 1.15.1")

This reverts commit 6b127d86390f85e92e59f3dba04fa585efb3b2c5.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agozlib: use default Build/Configure rule
Stijn Tintel [Sat, 11 Mar 2017 08:32:19 +0000 (09:32 +0100)]
zlib: use default Build/Configure rule

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agolzo: use default Build/Configure rule
Stijn Tintel [Sat, 11 Mar 2017 08:18:22 +0000 (09:18 +0100)]
lzo: use default Build/Configure rule

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agoscripts/gen_image_generic.sh: drop NOGRUB variable
Stijn Tintel [Tue, 11 Jul 2017 01:12:42 +0000 (03:12 +0200)]
scripts/gen_image_generic.sh: drop NOGRUB variable

It's not used since commit 816a9b30f683b8376423ff029d40e0e4a2701026.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agoscripts/gen_image_generic.sh: move from x86/image
Stijn Tintel [Tue, 11 Jul 2017 00:49:34 +0000 (02:49 +0200)]
scripts/gen_image_generic.sh: move from x86/image

The script can also be useful for other targets.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agoscripts: make all scripts executable
Stijn Tintel [Tue, 11 Jul 2017 00:48:39 +0000 (02:48 +0200)]
scripts: make all scripts executable

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agoscripts/openbsd.sh: remove script
Stijn Tintel [Tue, 11 Jul 2017 00:41:05 +0000 (02:41 +0200)]
scripts/openbsd.sh: remove script

Commit 6f5f328003128c95af2ffb3876eeadb473c463a0 removed freebsd.sh
because it was outdated and bad practice. Let's be consistent and remove
openbsd.sh as well.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agocurl: bump to version 7.54.1
Alif M. Ahmad [Mon, 26 Jun 2017 15:09:59 +0000 (15:09 +0000)]
curl: bump to version 7.54.1

Upgrade the curl package to latest version. Patches refreshed.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years agoar71xx/image: change unifi UBNT_CHIP to ar7240
Alexander Couzens [Wed, 12 Jul 2017 22:41:04 +0000 (00:41 +0200)]
ar71xx/image: change unifi UBNT_CHIP to ar7240

Verified by OEM firmware images which contains the same
chip.

Tested-by: Andreas Bräu <ab@andi95.de>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years agoar71xx: set US region code for TP-Link TL-WR710N v1 image
Matthias Schiffer [Wed, 12 Jul 2017 17:22:51 +0000 (19:22 +0200)]
ar71xx: set US region code for TP-Link TL-WR710N v1 image

Non-US versions of the TP-Link TL-WR710N v1 don't have a region code so
far, so we can just set US unconditionally.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoopkg: bump to version 2017-07-11
Yousong Zhou [Wed, 12 Jul 2017 02:34:00 +0000 (10:34 +0800)]
opkg: bump to version 2017-07-11

Commits since last 2017-05-03

    52fc006 pkg_alternatives: pass if the desired symlink already exists
    c668fce opkg: add --no-check-certificate argument

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agonetfilter: add iptables-mod-rpfilter package
Alin Nastac [Fri, 16 Jun 2017 12:16:07 +0000 (14:16 +0200)]
netfilter: add iptables-mod-rpfilter package

Unlike /proc/sys/net/ipv4/conf/INTF/rp_filter flag, rule iptables -t raw
-I PREROUTING -m rpfilter --invert -j DROP prevents conntrack table to
become full when a packet flood with randomly selected source IP addresses
is received from the lan side.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
7 years agouci: update to the latest version
Hans Dedecker [Tue, 11 Jul 2017 19:03:03 +0000 (21:03 +0200)]
uci: update to the latest version

c4df32b file: remove redundant NULL check on return value of uci_realloc()
5d08b7f build: fix BUILD_STATIC
49ec6ef Fix skipping directories in uci_list_config_files
c203c2f Revert "mandatory anonymous section identifier"
0a1a2fc uci/lua: add explicit close() method
7daf942 uci/lua: add list_configs() function
fe45f97 test: adjust for auto-naming anonymous sections
2eb9c09 cli: remove now-defunct UCI_FLAG_EXPORT_NAME support
df72af4 mandatory anonymous section identifier

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agobase-files: automatically handle paths and symlinks for RAMFS_COPY_BIN
Matthias Schiffer [Mon, 10 Jul 2017 16:37:25 +0000 (18:37 +0200)]
base-files: automatically handle paths and symlinks for RAMFS_COPY_BIN

Depending on busybox applet selection, paths of basic utiilties may differ,
and may not work as symlinks to busybox. Simply using whatever binary is
found in PATH and detecting symlinks automatically is more robust and
easier to maintain.

The list of binaries is also slightly cleaned up and duplicates are
removed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agokirkwood: upgrade: fix RAMFS_COPY_*
Matthias Schiffer [Mon, 10 Jul 2017 16:16:23 +0000 (18:16 +0200)]
kirkwood: upgrade: fix RAMFS_COPY_*

RAMFS_COPY_* are moved to platform.sh toplevel. The nand_do_upgrade call is
moved to platform_do_upgrade.

Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoipq806x: upgrade: fix RAMFS_COPY_*
Matthias Schiffer [Mon, 10 Jul 2017 16:03:39 +0000 (18:03 +0200)]
ipq806x: upgrade: fix RAMFS_COPY_*

RAMFS_COPY_* are moved to platform.sh toplevel. The unneeded
linksys_preupgrade function is removed, and the nand_do_upgrade call is
moved to platform_do_upgrade.

Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agobcm53xx: upgrade: fix RAMFS_COPY_*
Matthias Schiffer [Sat, 10 Jun 2017 14:14:54 +0000 (16:14 +0200)]
bcm53xx: upgrade: fix RAMFS_COPY_*

Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agobase-files: upgrade: correctly handle nand_do_upgrade argument passed from preupgrade
Matthias Schiffer [Mon, 10 Jul 2017 08:35:19 +0000 (10:35 +0200)]
base-files: upgrade: correctly handle nand_do_upgrade argument passed from preupgrade

Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agodnsmasq: restore ability to include/exclude raw device names
Jo-Philipp Wich [Mon, 10 Jul 2017 08:53:29 +0000 (10:53 +0200)]
dnsmasq: restore ability to include/exclude raw device names

Commit 5cd88f4 "dnsmasq: remove use of uci state for getting network ifname"
broke the ability to specify unmanaged network device names for inclusion
and exclusion in the uci configuration.

Restore support for raw device names by falling back to the input value
when "network_get_device" yields no result.

Fixes FS#876.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoar71xx: image: simplify Meraki MR16 device definition
Piotr Dymacz [Fri, 7 Jul 2017 16:51:26 +0000 (18:51 +0200)]
ar71xx: image: simplify Meraki MR16 device definition

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: fix upgrade platform check for Compex WPJ558
Enrique Giraldo [Thu, 6 Jul 2017 13:46:42 +0000 (15:46 +0200)]
ar71xx: fix upgrade platform check for Compex WPJ558

The magic number was wrong and always marked the images as invalid.

Signed-off-by: Enrique Giraldo <enrique.giraldo@galgus.net>
7 years agoar71xx: support LED in TP-Link TL-WR902AC RJ45 socket
Piotr Dymacz [Wed, 5 Jul 2017 08:44:02 +0000 (10:44 +0200)]
ar71xx: support LED in TP-Link TL-WR902AC RJ45 socket

TP-Link TL-WR902AC has another one, tiny LED inside RJ45 socket which is
attached to GPIO15. Add support for it, use it as a "lan" LED and rename
old one to "internet". Also, fix uci option name for "lan" LED in system
configuration ("wan" -> "lan").

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: verify TP-Link TL-WR902AC sysupgrade image
Piotr Dymacz [Wed, 5 Jul 2017 07:07:43 +0000 (09:07 +0200)]
ar71xx: verify TP-Link TL-WR902AC sysupgrade image

Until we enable requirement for metadata in sysupgrade images under
ar71xx target, this prevents users from using wrong image.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agofirmware-utils: tplink-safeloader: fix Archer C60 factory image
Henryk Heisig [Fri, 30 Jun 2017 22:45:19 +0000 (00:45 +0200)]
firmware-utils: tplink-safeloader: fix Archer C60 factory image

This commit fixes build factory image for TP-Link Archer C60v1.
Size of partition "SupportList" is only 256 bytes, and can
contain only 3 entries.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years agoar71xx: add metadata to some TP-Link images
Henryk Heisig [Fri, 30 Jun 2017 22:28:39 +0000 (00:28 +0200)]
ar71xx: add metadata to some TP-Link images

This commit adds metadata to TP-Link sysupgrade images
created by tplink-safeloader with uImage kernel header.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
7 years agoncurses: add libnucrses-dev package
Daniel Golle [Sat, 8 Jul 2017 21:16:52 +0000 (23:16 +0200)]
ncurses: add libnucrses-dev package

It's needed to use the SDK and IB on an OpenWrt/LEDE host.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years agomtd-utils: use source package name for lzo in PKG_BUILD_DEPENDS
Matthias Schiffer [Sat, 8 Jul 2017 20:51:34 +0000 (22:51 +0200)]
mtd-utils: use source package name for lzo in PKG_BUILD_DEPENDS

PKG_BUILD_DEPENDS should always refer to source package names.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agofirmware-utils: mktplinkfw2: use static board struct for custom values
Rafał Miłecki [Sun, 2 Jul 2017 21:09:46 +0000 (23:09 +0200)]
firmware-utils: mktplinkfw2: use static board struct for custom values

It seems simpler to store all custom (command line set) option values in
a struct identical to the predefined ones. It doesn't require:
1) Having so many global variables
2) Copying data from the predefined boards

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agofirmware-utils: mktplinkfw2: update firmware header
Rafał Miłecki [Sun, 2 Jul 2017 09:23:52 +0000 (11:23 +0200)]
firmware-utils: mktplinkfw2: update firmware header

1) Be consistent and use tabs
2) Drop FIXME from boot comments - some images use these fields normally

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoacx-mac80211: remove cobalt reference
Mathias Kresin [Fri, 7 Jul 2017 06:29:41 +0000 (08:29 +0200)]
acx-mac80211: remove cobalt reference

The cobalt target was removed with 22b38f145da7.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoacx-mac80211: disable for kernel 4.9+
Mathias Kresin [Fri, 7 Jul 2017 06:27:23 +0000 (08:27 +0200)]
acx-mac80211: disable for kernel 4.9+

Due to changes in the PCI subsystem this driver doesn't compile with
kernel 4.9.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: sound-mt7620: fix dependencies for kernel 4.9
Mathias Kresin [Fri, 7 Jul 2017 05:56:24 +0000 (07:56 +0200)]
ramips: sound-mt7620: fix dependencies for kernel 4.9

With kernel 4.8 common used code was moved to a shared kmod. Add the
missing dependency to the shared snd-soc-simple-card-utils.ko.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agokernel: add missing symbols
Mathias Kresin [Fri, 7 Jul 2017 05:44:51 +0000 (07:44 +0200)]
kernel: add missing symbols

Fixes the ramips and xburst/qi_lb60 build.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: fix typo in EASY80920.dtsi
Mathias Kresin [Fri, 7 Jul 2017 05:18:14 +0000 (07:18 +0200)]
lantiq: fix typo in EASY80920.dtsi

There is no device tree property named phynmode0. Use phy-mode as it is
done for the other ethernet nodes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: add Netgear DM200 support
Thomas Nixon [Sun, 23 Apr 2017 21:07:17 +0000 (22:07 +0100)]
lantiq: add Netgear DM200 support

Netgear DM200 is an inexpensive VDSL modem:

    CPU: VRX220 MIPS 34Kc 5.6 @ 500Mhz
    RAM: 64MiB
    Flash: 8MiB
    Ethernet: 1x100M
    DSL: VDSL2+, ADSL2+
    reset button, 3x bi-color LEDs

Serial port is 115200 baud, on the 4 pin header; pins from the bottom to
top are GND, RX, TX.

To upgrade from the vendor firmware, upload factory.img

The DM200 bootloader supports flashing over TFTP; hold the reset button
while powering on the device, and wait for the power light to start
flashing green before releasing. The device is now listening on
192.168.0.1/24, and can be sent a factory.img or a netgear image with a
TFTP put.

Once the image is loaded, it will be written to the flash, and the
device will reboot; this will take a few minutes.

Thanks to Edward O'Callaghan and Baptiste Jonglez, who implemented their
own ports for this device and provided valuable feedback.

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
7 years agolantiq: set up DSL front-end GPIOs if they exist
Thomas Nixon [Sun, 2 Jul 2017 12:33:00 +0000 (13:33 +0100)]
lantiq: set up DSL front-end GPIOs if they exist

This is necessary for devices using the PSB80108/VRX220LD front-end
(currently only known on the Netgear DM200).

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
7 years agoramips: simplify ubnt-erx-sfp device definition
Matthias Schiffer [Thu, 6 Jul 2017 17:44:44 +0000 (19:44 +0200)]
ramips: simplify ubnt-erx-sfp device definition

Most of the ubnt-erx definition can be reused; the package removals in
DEVICE_PACKAGES have become redundant after d17cb4a68a45 "ramips: purge
default packages on MT7621".

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoodhcpd: update to the latest version
Hans Dedecker [Thu, 6 Jul 2017 17:16:58 +0000 (19:16 +0200)]
odhcpd: update to the latest version

f0d78e7 ndp: optimize check_addr6_updates code
94afe3b ndp: fix syslog tracing for netlink neigbor and address events
18df6cc treewide: rework logic to retrieve IPv6 interface addresses
803b83e router: use enum to specify order and index of iov struct
5dad295 treewide: rework code to get rid of fixed IPv6 address arrays
3e4c8ad config: rework code to get rid of IFNAMSIZ usage
ab7813e treewide: use angle-brackets to include libubox header files

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agobuild: enable gzipping of images on x86 even if ext4 is disabled
Felix Fietkau [Mon, 27 Mar 2017 13:18:22 +0000 (15:18 +0200)]
build: enable gzipping of images on x86 even if ext4 is disabled

There is lots of padding between the boot partition and the rootfs, so
gzipping is helpful here

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agotools/flex: add autoreconf
John Crispin [Thu, 6 Jul 2017 06:57:27 +0000 (08:57 +0200)]
tools/flex: add autoreconf

build blows up on latest debian due to automake mismatch

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoipq806x: Enable AP148 fit image(.itb) generation
Ram Chandra Jangir [Mon, 26 Jun 2017 11:57:42 +0000 (17:27 +0530)]
ipq806x: Enable AP148 fit image(.itb) generation

This change enables .itb image generation for AP148,
It will help us to boot and test AP148 with NOR flash.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
7 years agoramips: bump to v4.9
John Crispin [Wed, 5 Jul 2017 05:52:36 +0000 (07:52 +0200)]
ramips: bump to v4.9

Signed-off-by: John Crispin <john@phrozen.org>
7 years agomt76: update to the latest version
Felix Fietkau [Wed, 5 Jul 2017 18:29:39 +0000 (20:29 +0200)]
mt76: update to the latest version

Fixes mt7603 stablity and performance issues

af32615 mt7603: change auto rate control register initialization
01fb9ba mt7603: fix control/status retries count estimation
cf4ba12 mt7603: avoid tx rate sampling using no retransmissions
32eab50 mt7603: set wtbl entry vif index
c4e3dea mt7603: use the real vif index in txwi header for normal tx.
e90a81a mt7603: fix channel width fall back in TXWI

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agotools: flex: fix build with automake 1.15.1
Jo-Philipp Wich [Wed, 5 Jul 2017 17:19:30 +0000 (19:19 +0200)]
tools: flex: fix build with automake 1.15.1

After the update of GNU automake, the flex configure fails with

    configure.ac:31: error: version mismatch.  This is Automake 1.15.1,
    configure.ac:31: but the definition used by this AM_INIT_AUTOMAKE
    configure.ac:31: comes from Automake 1.15.

Apply the autoreconf host fixup to properly regenerate configure before
to avoid triggering the version mismatch. Also refresh the patch while
we're at it.

Fixes FS#885.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agobzip2: add symlink to binary
Daniel Golle [Wed, 5 Jul 2017 14:25:23 +0000 (16:25 +0200)]
bzip2: add symlink to binary

Other distributions incl. the OpenWrt ImageBuilder and SDK
expect to find the bzip2 executable in /bin.
Create a symlink at that location for compatibility.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years agobrcm63xx: remove misleading warning about partial SPI NOR writes
Jonas Gorski [Wed, 5 Jul 2017 08:53:00 +0000 (10:53 +0200)]
brcm63xx: remove misleading warning about partial SPI NOR writes

The warning will be triggered by jffs2 or UBI, and partial writes are no
issue for most flash chips.

Fixes: 2a2b16210bbc ("brcm63xx: backport upstream solution for SPI message size limits")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years agoautomake: Update to version 1.15.1
Thomas Langer [Tue, 27 Jun 2017 16:26:28 +0000 (18:26 +0200)]
automake: Update to version 1.15.1

The new version includes the fix for new perl versions,
so remove the related patch.

Signed-off-by: Thomas Langer <thomas.langer.71@gmail.com>
7 years agokirkwood: drop kernel 4.4 support
Mathias Kresin [Wed, 28 Jun 2017 21:34:51 +0000 (23:34 +0200)]
kirkwood: drop kernel 4.4 support

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agokirkwood: switch to kernel 4.9
Paul Wassi [Fri, 10 Mar 2017 18:10:29 +0000 (19:10 +0100)]
kirkwood: switch to kernel 4.9

Add patches-4.9, some of them (heavily) rewritten:
  - ea4500 is upstream available, keep only LEDE changes in dts
  - ea3500 is changed to match the structure of the upstream ea4500 dts
  - nsa310s rewritten to include the common dtsi
  - nsa325 is dropped, since already upstream

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
[refresh kernel config, add on100, use the switchdev based mv88e6171
driver for the linksys boards, keep lede specific rootfs/kernel
partition names for linksys boards, reorder patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: use img file extension for DGN3500 factory images
Mathias Kresin [Wed, 28 Jun 2017 21:36:37 +0000 (23:36 +0200)]
lantiq: use img file extension for DGN3500 factory images

The Netgear UI in basic mode refuses the upgrade file if the the
fileextension is not img. The expert/advanced mode accepts any
fileextension. Use img to make it work in any case.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agofirmware-utils: mktplinkfw: add option for endianness swap
Piotr Dymacz [Tue, 4 Jul 2017 13:40:43 +0000 (15:40 +0200)]
firmware-utils: mktplinkfw: add option for endianness swap

This adds command line option in "mktplinkfw" tool for endianness swap
in kernel load address and entry point fields. As in "mktplinkfw2" tool,
we will need this for little-endian targets, like "ramips".

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: fix TPLINK_BOARD_ID for Archer C58 and TL-WA855RE
Piotr Dymacz [Tue, 4 Jul 2017 13:09:52 +0000 (15:09 +0200)]
ar71xx: fix TPLINK_BOARD_ID for Archer C58 and TL-WA855RE

Rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID for two ommited devices.

Fixes: 7d6c63d ("build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agofirmware-utils: mktplinkfw2: add missing options descriptions
Piotr Dymacz [Tue, 4 Jul 2017 11:26:40 +0000 (13:26 +0200)]
firmware-utils: mktplinkfw2: add missing options descriptions

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: fix Netgear WNDR3700 v4 switch port mapping
Qian Zheng [Mon, 3 Jul 2017 07:15:11 +0000 (15:15 +0800)]
ar71xx: fix Netgear WNDR3700 v4 switch port mapping

Signed-off-by: Qian Zheng <sotux82@gmail.com>
7 years agoar71xx: add support for TP-Link TL-WR902AC v1
Piotr Dymacz [Sun, 2 Jul 2017 16:32:38 +0000 (18:32 +0200)]
ar71xx: add support for TP-Link TL-WR902AC v1

TP-Link TL-WR902AC v1 is a pocket-size, dual-band (AC750), successor of
TL-MR3020 (both devices use very similar enclosure, in same size). New
device is based on Qualcomm QCA9531 v2 + QCA9887. FCC ID: TE7WR902AC.

Specification:

- 650/391/216 MHz (CPU/DDR/AHB)
- 1x 10/100 Mbps Ethernet
- 1x USB 2.0 (GPIO-controlled power)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz (QCA9531)
- 1T1R 5 GHz (QCA9887)
- 5x LED (GPIO-controlled), 2x button, 1x 3-pos switch
- UART pads on PCB (TP1 -> TX, TP2 -> RX, TP3 -> GND, TP4 -> 3V3, jumper
  resitors are missing on TX/RX lines)
- 1x micro USB (for power only)

Flash instructions:

Use "factory" image under vendor GUI.

Recovery instructions:

This device contains tftp recovery mode inside U-Boot. You can use it to
flash LEDE (use "factory" image) or vendor firmware.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "lede-ar71xx-generic-tl-wr902ac-v1-squashfs-factory.bin"
   to "wr902acv1_un_tp_recovery.bin" and place it in tftp server dir.
3. Connect PC with LAN port, press the reset button, power up the router
   and keep button pressed until WPS LED lights up.
4. Router will download file from server, write it to flash and reboot.

Root access over serial line in vendor firmware: root/sohoadmin.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: generic: enable CONFIG_MTD_SPLIT_TPLINK_FW
Piotr Dymacz [Mon, 3 Jul 2017 16:57:36 +0000 (18:57 +0200)]
ar71xx: generic: enable CONFIG_MTD_SPLIT_TPLINK_FW

We can use "tplink-fw" mtd splitter for TP-Link devices which use kernel
with TP-Link header embedded inside "safeloader" image type and thus get
rid of statically defined "kernel" and "rootfs" partitions in cmdline.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: refresh and cleanup mikrotik subtarget kernel config
Piotr Dymacz [Mon, 3 Jul 2017 19:12:32 +0000 (21:12 +0200)]
ar71xx: refresh and cleanup mikrotik subtarget kernel config

Refresh mikrotik subtarget kernel config and enable kernel support for
boards which belong to this subtarget only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: refresh and cleanup nand subtarget kernel config
Piotr Dymacz [Mon, 3 Jul 2017 17:51:13 +0000 (19:51 +0200)]
ar71xx: refresh and cleanup nand subtarget kernel config

Refresh nand subtarget kernel config and enable kernel support for
boards which belong to this subtarget only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agoar71xx: refresh and cleanup target kernel config
Piotr Dymacz [Mon, 3 Jul 2017 17:49:04 +0000 (19:49 +0200)]
ar71xx: refresh and cleanup target kernel config

Refresh target kernel config and disable kernel support for all boards
which belong to nand and mikrotik subtargets only.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years agodnsmasq: dnsmasq --rev-server support
DUPONCHEEL Sébastien [Wed, 28 Jun 2017 15:07:39 +0000 (17:07 +0200)]
dnsmasq: dnsmasq --rev-server support

This is functionally the same as --server, but provides some syntactic sugar to
make specifying address-to-name queries easier.

For example --rev-server=1.2.3.0/24,192.168.0.1 is exactly equivalent to
--server=/3.2.1.in-addr.arpa/192.168.0.1

Signed-off-by: DUPONCHEEL Sébastien <sebastien.duponcheel@corp.ovh.com>
7 years agofirmware-utils: mktplinkfw2: fix MD5 salt
Rafał Miłecki [Sun, 2 Jul 2017 15:06:58 +0000 (17:06 +0200)]
firmware-utils: mktplinkfw2: fix MD5 salt

LEDE supports few devices using TP-Link firmware format (V2 or V3):
ArcherC20i, ArcherC50, ArcherMR200, TDW8970, TDW8980, TL-WR840N v4,
TL-WR841N v13 and VR200v

Testing mktplinkfw2 tool with official (vendor generated) firmware files
for above devices has shown an error when comparing calculated and
included MD5 sum, e.g.:
> mktplinkfw2 -i Archer_C20iv1_0.9.1_3.2_up_boot\(170221\)_2017-02-21_17.14.03.bin | grep -A 1 MD5Sum1
Header MD5Sum1         : 22 5a cb 92 10 d2 95 7b df 62 9a f8 62 17 37 10 (*ERROR*)
          --> expected : ad 19 11 d1 78 98 a7 42 5f 2e 64 da 8a 34 ec cb

This problem has been verified to occur with:
Archer_C20iv1_0.9.1_3.2_up_boot(170221)_2017-02-21_17.14.03.bin
Archer MR200v1_0.9.1_1.1_up_boot_v004a.0 Build 160905 Rel.60037n.bin
TD-W8970v3_0.9.1_2.0_up_boot(160816)_2016-08-16_10.40.57.bin
TD-W8980v1_0.6.0_1.8_up_boot(150514)_2015-05-14_11.16.43.bin
Archer_VR200vv2_0.2.0_0.8.0_up_boot(161202)_2016-12-05_14.39.06.bin

For some images, e.g.:
Archer_C50v3_EU_0.9.1_0.3_up_boot[170417-rel52298].bin
TL-WR840Nv4_EU_0.9.1_4.16_up_boot[170421-rel70692].bin
TL-WR841Nv13_0.9.1_3.16_up_boot(161012).bin
mktplinkfw2 calculates zero MD5 so these has to be fixed separately:
> mktplinkfw2 -i TL-WR841Nv13_0.9.1_3.16_up_boot\(161012\).bin | grep -A 1 MD5Sum1
Header MD5Sum1         : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (*ERROR*)
          --> expected : 6f 1d 9b 57 5d 42 14 6d bf a2 03 9d 46 7d 55 55

It's most likely that MD5 salt used in mktplinkfw2 has been always wrong
(and it's not a matter of e.g. a vendor change). Update it to fix MD5
calculation.

This has been also verified to calculate MD5 correctly for other (not
yet supported) devices, e.g.:
Archer_C3150v2_0.1.0_0.9.1_up_boot(160812)_2016-08-12_10.52.54.bin
Archer_C3200v1_0.9.1_0.1_up_boot(160704)_2016-07-04_15.48.28.bin

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Mathias Kresin <dev@kresin.me>
7 years agobrcm47xx: Add support for kernel 4.9
Hauke Mehrtens [Sun, 2 Jul 2017 12:12:45 +0000 (14:12 +0200)]
brcm47xx: Add support for kernel 4.9

I tested this on a WRT54GS and a WRT610N V1.
The WRT610N does not boot when the kernel is too big, so I deactivated KALLSYMS

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agobrcm47xx: refresh kernel configuration
Hauke Mehrtens [Sun, 2 Jul 2017 12:12:22 +0000 (14:12 +0200)]
brcm47xx: refresh kernel configuration

Run make kernel_oldconfig on the brcm47xx target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agobrcm47xx: remove kernel 4.1 support
Hauke Mehrtens [Sun, 2 Jul 2017 11:29:43 +0000 (13:29 +0200)]
brcm47xx: remove kernel 4.1 support

Kernel 4.1 is not supported by LEDE for some time now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agobrcm47xx: use DMZ LED as status indicator
Mirko Parthey [Mon, 26 Jun 2017 16:25:45 +0000 (18:25 +0200)]
brcm47xx: use DMZ LED as status indicator

On the Linksys WRT54GSv1, the Power LED flickers in the "off" state.
Indicate status using the DMZ LED if available, since it has solid "on" and
"off" states.

This change was tested on the WRT54GSv1, but may also affect other brcm47xx
devices.

Fixes FS#793.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>