openwrt/openwrt.git
23 months agoumdns: remove superfluous include in init script
Jo-Philipp Wich [Thu, 1 Jun 2017 23:26:20 +0000 (01:26 +0200)]
umdns: remove superfluous include in init script

The umdns init script includes function/network.sh globally, outside of any
service procedure. This causes init script activation to fail in buildroot
and IB context if umdns is set to builtin.

Additionally, the network.sh helper is not actually used.

Drop the entire include in order to repair init script activation in build
host context. Fixes FS#658.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agodnsmasq: bump to 2.77
Kevin Darbyshire-Bryant [Thu, 1 Jun 2017 18:24:58 +0000 (19:24 +0100)]
dnsmasq: bump to 2.77

Bump to the 2.77 release after quite a few test & release candidates.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
23 months agomvebu: fix sysupgrade
Matthias Schiffer [Thu, 1 Jun 2017 16:39:12 +0000 (18:39 +0200)]
mvebu: fix sysupgrade

mvebu was modifying RAMFS_COPY_BIN and RAMFS_COPY_DATA from a
sysupgrade_pre_upgrade hook. As the ramfs is created from stage2, this
did not have an effect anymore after the staged sysupgrade changes.

As it doesn't really hurt to copy fw_printenv and fw_setenv
unconditionally, simply add them in /lib/upgrade/platform.sh, so stage2
will see them.

Config copying is moved to a function called by platform_copy_config, where
it belongs.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Fixes: FS#821
Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"

23 months agoramips: add jumbo frame support for v4.9
John Crispin [Thu, 1 Jun 2017 10:29:40 +0000 (12:29 +0200)]
ramips: add jumbo frame support for v4.9

Signed-off-by: John Crispin <john@phrozen.org>
23 months agoramips: fixup nand support on v4.9
John Crispin [Thu, 1 Jun 2017 10:19:57 +0000 (12:19 +0200)]
ramips: fixup nand support on v4.9

Signed-off-by: John Crispin <john@phrozen.org>
23 months agoppp: propagate master firewall zone to dynamic slave interface
Hans Dedecker [Wed, 31 May 2017 14:24:11 +0000 (16:24 +0200)]
ppp: propagate master firewall zone to dynamic slave interface

Assign the virtual DHCPv6 interface the firewall zone of the parent interface
so fw3 knows the zone to which the virtual DHCPv6 interface belongs.
This guarantees the firewall settings are applied correctly for the virtual
DHCPv6 interface and allows to query the zone to which the virtual DHCPv6
interface belongs via the fw3 network option.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
23 months agoar71xx: Fix UBIFS work on Mikrotik RB95x devices
Sergey Sergeev [Wed, 31 May 2017 08:00:01 +0000 (11:00 +0300)]
ar71xx: Fix UBIFS work on Mikrotik RB95x devices

If nand chip has no NAND_NO_SUBPAGE_WRITE flag on its options
ubifs can't use it mtd devices and the kernel crashes with error:
__nand_correct_data: uncorrectable ECC error

Signed-off-by: Sergey Sergeev <adron@yapic.net>
23 months agousbmode: remove devices with unsupported modes
Julian Labus [Wed, 24 May 2017 14:32:18 +0000 (16:32 +0200)]
usbmode: remove devices with unsupported modes

remove files which include the following mode options
BlackberryMode OptionMode PantechMode QuantaMode

Signed-off-by: Julian Labus <julian@labus-online.de>
23 months agobase-files: nand: use CI_KERNPART whenever the kernel volume is needed
Christian Lamparter [Tue, 30 May 2017 20:03:39 +0000 (20:03 +0000)]
base-files: nand: use CI_KERNPART whenever the kernel volume is needed

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
This patch is in continuation of: commit 93aa86040523
"procd: nand: make it possible to configure kernel and ubi partition"

The $CI_KERNPART variable should be used in place
of the fixed "kernel" partition name. This allows
targets to specifiy alternate names for the kernel
partition.

Cc: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
23 months agoimx6: disable UART dma
Koen Vandeputte [Mon, 29 May 2017 09:58:01 +0000 (11:58 +0200)]
imx6: disable UART dma

Fixes these prints on boot:

[   13.785600] imx-uart 2020000.serial: DMA transaction error.
[   13.793134] imx-uart 2020000.serial: DMA transaction error.
[   13.798721] imx-uart 2020000.serial: DMA transaction error.

Based on following upstream patch by Tim Harvey (Gateworks):

https://github.com/Gateworks/openwrt/commit/80a01b6582f94c4547f39d3a25e0a1e9b6eb9877

TX complete DMA messages are getting missed.
This is also currently an issue in mainline.
For now we will disable DMA in serial/imx.c.

This resolves an issue encountered with RS485 transmit.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
23 months agoramips: let the "reserved" MTD partition be RO for R6220
Enrico Mioso [Tue, 30 May 2017 09:04:06 +0000 (11:04 +0200)]
ramips: let the "reserved" MTD partition be RO for R6220

The "reserved" partition should probably be read-only, just in case. Even
not knowing it's content, other devices have marked it as such, so it
seems a good idea to do so also for this device.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
CC: Mathias Kresin <dev@kresin.me>
CC: Hanqing Wong <hquu@outlook.com>
23 months agouboot-lantiq/spl: fixed uninitialized variable len in spl_uncompress_lzo
Martin Schiller [Fri, 26 May 2017 08:47:18 +0000 (10:47 +0200)]
uboot-lantiq/spl: fixed uninitialized variable len in spl_uncompress_lzo

This fix is taken from uboot-lantiq v2014.07 (Daniel Schwierzeck)

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
23 months agouboot-lantiq: Support newer versions of the PEF7071 ethernet
Martin Schiller [Fri, 26 May 2017 09:12:19 +0000 (11:12 +0200)]
uboot-lantiq: Support newer versions of the PEF7071 ethernet

This fix is taken from uboot-lantiq v2014.07 (Daniel Schwierzeck)

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
23 months agoar71xx: disable ENS202EXT in mikrotik and nand subtargets
Jo-Philipp Wich [Wed, 31 May 2017 00:39:58 +0000 (02:39 +0200)]
ar71xx: disable ENS202EXT in mikrotik and nand subtargets

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agoopenvpn-easy-rsa: update to 3.0.1
Luiz Angelo Daros de Luca [Wed, 1 Mar 2017 04:42:55 +0000 (01:42 -0300)]
openvpn-easy-rsa: update to 3.0.1

easy-rsa v3 is now a single script. It expects a 'vars'
configuration file which path can be set using easy-rsa
options, environment variables or just looking in the
current directory.

The default usage would be:

 # cd /etc/easy-rsa
 # easy-rsa COMMAND [command-options]

Following upstream changes, /etc/easy-rsa/pki replaces
/etc/easy-rsa/keys directory.

The default /etc/easy-rsa/pki dir is marked to be kept during
upgrade (WARN: priv keys are saved in the system backup)
/etc/easy-rsa/openssl.1.0.cnf is now marked as config file while
index and serial got removed.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
23 months agomt76: update mirror hash after tar portablity fix
Felix Fietkau [Tue, 30 May 2017 13:40:41 +0000 (15:40 +0200)]
mt76: update mirror hash after tar portablity fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agotar: override symlink permissions
Felix Fietkau [Tue, 30 May 2017 13:37:10 +0000 (15:37 +0200)]
tar: override symlink permissions

On Linux, symlink permissions cannot be altered and are always 0777.
On Mac OS X they can be 0755. Force 0777 here to keep tarballs
reproducible across systems

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoar71xx: move Wallys DR344 to generic build target
Piotr Dymacz [Mon, 29 May 2017 20:07:04 +0000 (22:07 +0200)]
ar71xx: move Wallys DR344 to generic build target

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
23 months agoar71xx: fix Wallys DR344 GPIO-connected LEDs and button
Piotr Dymacz [Mon, 29 May 2017 19:32:11 +0000 (21:32 +0200)]
ar71xx: fix Wallys DR344 GPIO-connected LEDs and button

This fixes wrong GPIO numbers for LEDs and button in Wallys DR344 board
and sets color of all LEDs to green as the mass production boards have
only green one.

Actually, DR344 has 6 GPIO-connected LEDs and one button:

- GPIO11: status
- GPIO12: sig1
- GPIO13: sig2
- GPIO14: sig3
- GPIO15: sig4
- GPIO16: reset button
- GPIO17: lan

WAN LED is connected directly with AR8035 PHY.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
23 months agoar71xx: set GE interface as wan by default in Wallys DR344
Piotr Dymacz [Mon, 29 May 2017 19:25:03 +0000 (21:25 +0200)]
ar71xx: set GE interface as wan by default in Wallys DR344

This aligns default network interfaces configuration with vendor
firmware: GE (eth0) -> wan, FE (eth1) -> lan.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
23 months agoar71xx: fix GE interface support in Wallys DR344
Piotr Dymacz [Mon, 29 May 2017 17:18:52 +0000 (19:18 +0200)]
ar71xx: fix GE interface support in Wallys DR344

GMAC0 interface of AR9344 SOC in Wallys DR344 board is connected with
AR8035, not with AR8327. Without this fix, GE interface doesn't work at
all or shows high packet loss ratio.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
23 months agoar71xx: add support for EnGenius ENS202EXT
Marty Plummer [Fri, 14 Apr 2017 17:08:17 +0000 (12:08 -0500)]
ar71xx: add support for EnGenius ENS202EXT

EnGenius ENS202EXT is an outdoor wireless access point with
2-port 10/100 switch, detachable antennas and proprietery PoE.

The device is based on Qualcomm/Atheros AR9341 v1.

Specifications:
- 535/400/200 MHz (CPU/DDR/AHB)
- 64 MB of RAM
- 16 MB of FLASH
- UART (J1) header on PCB (unpopulated)
- 2x 10/100 Mbps Ethernet
- 2.4 GHz, up to 26dBm
- 2x external, detachable antennas
- 7x LED, 1x button

Flash instructions:

You have three options:

- Use the vendor firmware upgrade page on the web interface and give
it the factory.img. This is the easiest way to go about it.

- If you have serial access during u-boot, interrupt the normal boot
(any key before timeout) and run 'run failsafe_boot'; this will bring
you to a minimal openwrt luci image on ip 192.168.1.1 useful if you've
bricked the normal firmware.

- Use the vendor's management cli, which can be accessed via telnet
with the same credentials as the web login (default admin:admin), then
issue the following commands:

*** Hi admin, welcome to use cli(V-1.6.7) ***
---========= Commands Help =========---
      stat -- Status
       sys -- System
    wless2 -- 2.4G-Wireless
      mgmt -- Management
      tree -- Tree
      help -- Help
    reboot -- Reboot
ens202ext>mgmt
  Management
---========= Commands Help =========---
     admin -- Administration
     mvlan -- Management VLAN settings
      snmp -- SNMP settings
    backup -- Backup/Restore settings
    autorb -- Auto reboot settings
   fwgrade -- Firmware upgrade
      time -- Time settings
   wifisch -- Wifi schedule
       log -- Log
      diag -- Diagnostics
      disc -- Device Discovery
    logout -- Logout
      help -- Help
      exit -- Exit
ens202ext/mgmt>fwgrade
  Management --> Firmware upgrade
---========= Commands Help =========---
      fwup -- Firmware upgrade
      help -- Help
      exit -- Exit
ens202ext/mgmt/fwgrade>fwup http://web.server/lede-ar71xx-generic-ens202ext-squashfs-factory.bin

Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
23 months agoar71xx: fix LED defines for TP-Link TL-WR740N v6
Andrey Polischuk [Thu, 11 May 2017 18:26:21 +0000 (21:26 +0300)]
ar71xx: fix LED defines for TP-Link TL-WR740N v6

Signed-off-by: Andrey Polischuk <androld.b@gmail.com>
[changed commit subject, dropped redundant kernel config symbol]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
23 months agoiproute2: bump to 4.11
Kevin Darbyshire-Bryant [Mon, 20 Mar 2017 21:53:46 +0000 (21:53 +0000)]
iproute2: bump to 4.11

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
23 months agotoolchain/binutils: Set 2.28 as default version
Daniel Engberg [Sun, 14 May 2017 11:47:45 +0000 (13:47 +0200)]
toolchain/binutils: Set 2.28 as default version

Use 2.28 by default

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
23 months agomvebu: clearfog: assign SFP port to WAN zone
Josua Mayer [Mon, 22 May 2017 17:07:13 +0000 (19:07 +0200)]
mvebu: clearfog: assign SFP port to WAN zone

The single SFP port is meant for direct media access to WAN, such as
VDSL2, GPON). While it could also be used for in-home fiber, it is much
more likely that the LAN is standard ethernet, especially considering
that SFP is the onmly port that can go beyond 1Gbps.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
23 months agomvebu: clearfog: document interface configuration
Josua Mayer [Mon, 24 Apr 2017 14:52:31 +0000 (16:52 +0200)]
mvebu: clearfog: document interface configuration

Take explicit note of what physical ports eth{0,1,2} refer to.
Also repair port assignment:
At some point between 4.9.20 and 4.9.29 the numbering changed.
Keep previous port assignment that was:
LAN = SFP+Switch
WAN = standalone ethernet

Also use the same assignment for Clearfog-Base to avoid confusion.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
23 months agomvebu: clearfog: include DTB for all variants in image
Josua Mayer [Mon, 22 May 2017 15:04:19 +0000 (17:04 +0200)]
mvebu: clearfog: include DTB for all variants in image

Installing all armada-388-clearfog-* DTBs in the same sdcard image,
it now becomes much easier to swap sdcards between different device variants.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
23 months agomvebu: update boot-script to use generic variables
Josua Mayer [Sun, 23 Apr 2017 15:20:58 +0000 (17:20 +0200)]
mvebu: update boot-script to use generic variables

U-Boot provides standard variables for load addresses, and
filesystem-agnostic load-commands. Furthermore thanks to distro-boot,
the device and partition from which the system boots is known.
The new boot-script makes use of all this information.

Tested on the only board that uses this boot-script: Clearfog Pro

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
23 months agou-boot-mvebu: clearfog: enable setexpr command
Josua Mayer [Sun, 23 Apr 2017 18:28:57 +0000 (20:28 +0200)]
u-boot-mvebu: clearfog: enable setexpr command

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
23 months agou-boot-mvebu: clearfog: implement distro-boot
Josua Mayer [Sun, 23 Apr 2017 17:22:32 +0000 (19:22 +0200)]
u-boot-mvebu: clearfog: implement distro-boot

Add a patchfile that implements distro-boot and is meant to go upstream
Also make the other patches git-am'able for easier maintenance.

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
23 months agou-boot-mvebu: update to 2017.03
Josua Mayer [Sun, 23 Apr 2017 16:19:59 +0000 (18:19 +0200)]
u-boot-mvebu: update to 2017.03

Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
23 months agomwlwifi: update to the latest version
Ansuel Smith [Fri, 21 Apr 2017 13:08:42 +0000 (15:08 +0200)]
mwlwifi: update to the latest version

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
23 months agotoolchain/gcc: fix --with-isl path
Syrone Wong [Tue, 30 May 2017 07:10:02 +0000 (15:10 +0800)]
toolchain/gcc: fix --with-isl path

This fixes GCC 7 compilation when GRAPHITE is selected.
The path is replaced with $(TOOLCHAIN_DIR), while it should be
$(STAGING_DIR_HOST). To keep in sync with the path of gmp,
mpfr and mpc, I'm using $(TOPDIR)/staging_dir/host.

Fixes: f62f4b3c5c9d ("build: stop overriding STAGING_DIR_HOST for toolchain build")

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
23 months agomt76: update to the latest version, fixes a mt7603 beacon issue
Felix Fietkau [Tue, 30 May 2017 06:47:16 +0000 (08:47 +0200)]
mt76: update to the latest version, fixes a mt7603 beacon issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoprocd: update to latest git HEAD
Matthias Schiffer [Tue, 30 May 2017 05:29:25 +0000 (07:29 +0200)]
procd: update to latest git HEAD

e7bb2c8 upgraded: define __GNU_SOURCE

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agosunxi: sysupgrade: sync with x86
Matthias Schiffer [Thu, 4 May 2017 05:39:20 +0000 (07:39 +0200)]
sunxi: sysupgrade: sync with x86

sunxi sysupgrade was based on the x86 implementation; sync fixes and other
changes from the current x86 version:

x86: fix sysupgrades on disks with 4k block size
x86: sysupgrade: move partition table change check to platform_check_image
x86: sysupgrade: refactor platform_do_upgrade
x86: sysupgrade: explicitly rescan disk after writing partition table

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agosunxi: sysupgrade: don't write partitions twice
Matthias Schiffer [Thu, 4 May 2017 05:29:58 +0000 (07:29 +0200)]
sunxi: sysupgrade: don't write partitions twice

When existing partitions are retained, the dd call writing the uboot image
in the space before the first partition was accidentally writing the whole
image, making the code for individual partitions redundant. Limit the copy
to 1016KiB (the first 8KiB are skipped, and the first partition starts at
1024KiB).

In addition, conv=notrunc is replaced with conv=fsync. It seems this was an
oversight, as notrunc doesn't make sense for block devices and all other dd
commands use conv=fsync.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agox86: sysupgrade: explicitly rescan disk after writing partition table
Matthias Schiffer [Wed, 3 May 2017 07:08:29 +0000 (09:08 +0200)]
x86: sysupgrade: explicitly rescan disk after writing partition table

This should ensure that the kernel partition can be mounted in
platform_copy_config when its size has changed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agox86: sysupgrade: refactor platform_do_upgrade
Matthias Schiffer [Wed, 3 May 2017 07:05:25 +0000 (09:05 +0200)]
x86: sysupgrade: refactor platform_do_upgrade

By returning early when no upgrade device can be found and handling the
SAVE_PARTITIONS=0 case differently, we can get rid of two levels of if.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agox86: sysupgrade: move partition table change check to platform_check_image
Matthias Schiffer [Wed, 3 May 2017 06:57:29 +0000 (08:57 +0200)]
x86: sysupgrade: move partition table change check to platform_check_image

The staged sysupgrade will prevent us from using ask_bool in
platform_do_upgrade; therefore, the check is moved to platform_check_image.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agoramips: sysupgrade: move nand_do_upgrade call to platform_do_upgrade
Matthias Schiffer [Sat, 22 Apr 2017 19:27:04 +0000 (21:27 +0200)]
ramips: sysupgrade: move nand_do_upgrade call to platform_do_upgrade

All targets with NAND support should gradually move their nand_do_upgrade
calls from platform_pre_upgrade to platform_do_upgrade.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agobase-files: add support for staged sysupgrades from failsafe mode
Matthias Schiffer [Sun, 23 Apr 2017 23:31:04 +0000 (01:31 +0200)]
base-files: add support for staged sysupgrades from failsafe mode

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agobase-files: sysupgrade cleanup
Matthias Schiffer [Sun, 23 Apr 2017 21:33:14 +0000 (23:33 +0200)]
base-files: sysupgrade cleanup

Some functions only used by stage2 are moved there from common.sh.

One piece that could still use more cleanup is platform_pre_upgrade: many
targets reference files from there are aren't available in the ramfs, so
we need to evaluate it before the switch; conversely, flash writes happen
in that function on some targets. Targets that do the latter should be
fixed eventually to use platform_do_upgrade for that purpose.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agofstools: snapshot: handle jffs2 conversion using upgraded
Matthias Schiffer [Wed, 3 May 2017 06:29:55 +0000 (08:29 +0200)]
fstools: snapshot: handle jffs2 conversion using upgraded

We can reuse the kill_remaining and run_ramfs facilities of the stage2 run
by upgraded.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agofstools: clean up trailing whitespace in snapshot script
Matthias Schiffer [Wed, 3 May 2017 06:29:24 +0000 (08:29 +0200)]
fstools: clean up trailing whitespace in snapshot script

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agobase-files: always use staged sysupgrade
Matthias Schiffer [Fri, 21 Apr 2017 22:54:50 +0000 (00:54 +0200)]
base-files: always use staged sysupgrade

Support for the -d and -p options is dropped; it may be added again at some
point by adding these flags to the ubus sysupgrade call.

A downside of this is that we get a lot less information about the progress
of the upgrade: as soon as the actual upgrade starts, all shell sessions
are killed to allow unmounting the root filesystem.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agoprocd: remove procd-nand package
Matthias Schiffer [Fri, 21 Apr 2017 18:37:58 +0000 (20:37 +0200)]
procd: remove procd-nand package

We always want to support staged upgrades now, so it's better to include
upgraded into the main package. /lib/upgrade/nand.sh is moved to
base-files.

The procd-nand-firstboot package is removed for now, it may return later
as a separate package.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agoprocd: update to latest git HEAD
Matthias Schiffer [Mon, 29 May 2017 21:15:22 +0000 (23:15 +0200)]
procd: update to latest git HEAD

992b796 rcS: add missing fcntl.h include
63789e5 init: add support for sysupgrades triggered from preinit
5b1fb35 Remove code that has become unnecessary after sysupgrade changes
5918b6d upgraded: add support for passing a "command" argument to stage2
056d8dd upgraded: link dynamically, chroot during exec
7c6cf55 system: always support staged sysupgrade
d42b21e procd/rcS: Use /dev/null as stdin
e0098d4 service/instance: add an auto start option
1247db1 procd: Log initscript output prefixed with script name
8d720b2 procd: Don't use syslog before its initialization
2555474 procd: Add missing \n in debug message

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agoprocd: prepare NAND sysupgrade for making upgraded dynamically linked
Matthias Schiffer [Wed, 3 May 2017 06:28:05 +0000 (08:28 +0200)]
procd: prepare NAND sysupgrade for making upgraded dynamically linked

Use install_bin to copy upgraded with all dependencies. The old name
/tmp/upgraded is temporarily retained as a symlink to avoid breaking
things.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agoprocd: clean up trailing whitespace in nand.sh
Matthias Schiffer [Wed, 3 May 2017 06:27:40 +0000 (08:27 +0200)]
procd: clean up trailing whitespace in nand.sh

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
23 months agomt76: update to the latest version, improves mt7603/7628 stability
Felix Fietkau [Mon, 29 May 2017 12:42:16 +0000 (14:42 +0200)]
mt76: update to the latest version, improves mt7603/7628 stability

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agobuild: fix kmod package build on non-GNU systems
Felix Fietkau [Mon, 29 May 2017 12:26:36 +0000 (14:26 +0200)]
build: fix kmod package build on non-GNU systems

BSD paste requires a filename argument, and it accepts - to use stdin as
intended.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agotools/sparse: Update to snapshot 2017-03-31
Daniel Engberg [Wed, 10 May 2017 09:34:10 +0000 (11:34 +0200)]
tools/sparse: Update to snapshot 2017-03-31

Update sparse to snapshot 2017-03-31
Switch to HTTPS

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
23 months agotoolchain/insight: Remove from tree
Daniel Engberg [Mon, 29 May 2017 07:41:15 +0000 (09:41 +0200)]
toolchain/insight: Remove from tree

Insight hasn't been touched since 2009 and I can't find any references at
least 6 years back of being used. Ubuntu and Debian removed insight years ago
from their repos so I think we can safely remove this too.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
23 months agolantiq: pinctrl: xway: fix copy/paste error in xrx200_grps
Martin Schiller [Mon, 29 May 2017 04:17:07 +0000 (06:17 +0200)]
lantiq: pinctrl: xway: fix copy/paste error in xrx200_grps

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
23 months agoipq806x: add qpic nand and bam dma node's in ipq4019 dts tree
Ram Chandra Jangir [Wed, 24 May 2017 23:31:03 +0000 (05:01 +0530)]
ipq806x: add qpic nand and bam dma node's in ipq4019 dts tree

This change adds QPIC BAM dma and NAND driver node's in IPQ4019
device tree, also enable this for AP-DK04.1 based boards.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
23 months agoipq806x: Add support for custom data mapping in bam_dma dmaengine
Ram Chandra Jangir [Wed, 24 May 2017 23:31:02 +0000 (05:01 +0530)]
ipq806x: Add support for custom data mapping in bam_dma dmaengine

This change adds a new function to support for preparing DMA descriptor
for custom data.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
23 months agoipq806x: Added bam transaction and support additional CSRs
Ram Chandra Jangir [Wed, 24 May 2017 23:31:01 +0000 (05:01 +0530)]
ipq806x: Added bam transaction and support additional CSRs

This change adds support for below:
- Bam transaction which will be used for any NAND request.
- Reset function for NAND BAM transaction
- Add support for additional CSRs.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
23 months agoipq806x: Add bam_dma support in qcom_nand driver
Ram Chandra Jangir [Wed, 24 May 2017 23:31:00 +0000 (05:01 +0530)]
ipq806x: Add bam_dma support in qcom_nand driver

The existing qcom_nand driver supports ADM DMA which is mainly
required for ipq806x family based boards,
IPQ40xx based boards uses BAM DMA in NAND driver, so this patch
adds BAM DMA support with compatible string as qcom,ebi2-nandc-bam.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
23 months agoipq806x: Add support to configure ipq40xx GPIO_PULL bits
Ram Chandra Jangir [Wed, 24 May 2017 23:30:59 +0000 (05:00 +0530)]
ipq806x: Add support to configure ipq40xx GPIO_PULL bits

GPIO_PULL bits configurations in TLMM_GPIO_CFG register
differs for IPQ40xx from rest of the other qcom SoC's.
This change add support to configure the msm_gpio_pull
bits for ipq40xx, It is required to fix the proper
configurations of gpio-pull bits for nand pins mux.

Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
23 months agofirewall: fix stray continue statement
Jo-Philipp Wich [Sat, 27 May 2017 14:14:10 +0000 (16:14 +0200)]
firewall: fix stray continue statement

The previous commit introduced a faulty continue statement which might
lead to faulty rules not getting freed or reported.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agonetifd: fix 6rd regression (FS#812)
Hans Dedecker [Sat, 27 May 2017 11:18:33 +0000 (13:18 +0200)]
netifd: fix 6rd regression (FS#812)

08f1875 system-linux: fix 6rd regression

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
23 months agofirewall: extend ubus support, exception handling, parse fixes
Jo-Philipp Wich [Sun, 14 May 2017 19:00:26 +0000 (21:00 +0200)]
firewall: extend ubus support, exception handling, parse fixes

Update to latest Git HEAD in order to import a number of fixes and other
improvements:

3d2c18a options: improve handling of negations when parsing space separated values
0e5dd73 iptables: support -i, -o, -s and -d in option extra
4cb06c7 ubus: increase ubus network interface dump timeout
e5dfc82 iptables: add exception handling
f625954 firewall3: add check_snat() function
7d3d9dc firewall3: display the section type for UBUS rules
53ef9f1 firewall3: add UBUS support for include scripts
5cd4af4 firewall3: add UBUS support for ipset sections
02d6832 firewall3: add UBUS support for forwarding sections
0a7d36d firewall3: add UBUS support for redirect sections
d44f418 firewall3: add fw3_attr_parse_name_type() function
e264c8e firewall3: replace warn_rule() by warn_section()
6039c7f firewall3: check the return value of fw3_parse_options()

Fixes FS#548, FS#806, FS#811.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agobrcm47xx: remove target specific network preinit config
Jo-Philipp Wich [Wed, 17 May 2017 12:36:23 +0000 (14:36 +0200)]
brcm47xx: remove target specific network preinit config

The generic preinit code is now able to setup network and switch vlan settings
from the /etc/board.json file, therefor drop the target specific code.

Fixes FS#790.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agosamba: bump PKG_RELEASE
Jo-Philipp Wich [Sat, 27 May 2017 10:15:06 +0000 (12:15 +0200)]
samba: bump PKG_RELEASE

The previous CVE bugfix commit did not adjust PKG_RELEASE, therefor the
fixed samba package does not appear as opkg update.

Bump the PKG_RELEASE to signify upgrades to downstream users.

Ref: https://forum.lede-project.org/t/sambacry-are-lede-devices-affected/3972/4

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agox86: fix build of geode target
Hauke Mehrtens [Sat, 27 May 2017 09:29:55 +0000 (11:29 +0200)]
x86: fix build of geode target

The build bot complained that the OLPC option was not set.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agokernel: add missing config options
Hauke Mehrtens [Sat, 27 May 2017 09:29:28 +0000 (11:29 +0200)]
kernel: add missing config options

This broke the build for the x86 generic target.
This was found by the build bot.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agoMove enablemodem from ramips to new package adb-enablemodem and make it used also...
Filip Moc [Thu, 25 May 2017 19:55:32 +0000 (21:55 +0200)]
Move enablemodem from ramips to new package adb-enablemodem and make it used also by TL-MR6400

Signed-off-by: Filip Moc <lede@moc6.cz>
23 months agoar71xx: Add support for TP-Link MR6400
Filip Moc [Thu, 25 May 2017 19:51:37 +0000 (21:51 +0200)]
ar71xx: Add support for TP-Link MR6400

You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin
on 192.168.0.66/24, connect to any ethernet port and power on device while
holding the reset button). Flashing via OEM web interface does not work.

Hardware Specification (v1.0 EU):
 - SoC: QCA9531
 - Flash: Winbond W25Q64FV (8MiB)
 - RAM: EtronTech EM6AB160TSE-5G (64MiB)
 - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
 - Ethernet: 2NIC (3x100M + 1x100M)
 - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
 - Power: DC 12V 1A

Signed-off-by: Filip Moc <lede@moc6.cz>
23 months agoramips: remove fictional LEDs from AsiaRF AWM00x device tree
Russell Senior [Wed, 24 May 2017 17:22:05 +0000 (10:22 -0700)]
ramips: remove fictional LEDs from AsiaRF AWM00x device tree

Neither the AsiaRF AWM002 or AWM003 actually has an LED on the module
board.  The ld1 and ld2 do not represent actual LEDs.  These pins might
connect to LEDS on an eval board or other carrier board, but that is
outside the scope of this device tree file.

Signed-off-by: Russell Senior <russell@personaltelco.net>
23 months agousbmode: update usb-modeswitch-data to 20170205
Julian Labus [Wed, 24 May 2017 14:32:17 +0000 (16:32 +0200)]
usbmode: update usb-modeswitch-data to 20170205

add support for new hardware

Signed-off-by: Julian Labus <julian@labus-online.de>
23 months agousbmode: update to latest version
Julian Labus [Wed, 24 May 2017 14:32:16 +0000 (16:32 +0200)]
usbmode: update to latest version

453da8e convert-modeswitch.pl: fix message indices

Signed-off-by: Julian Labus <julian@labus-online.de>
23 months agobuild: fix possible issue with kmod package having multiple AutoLoad's
Yousong Zhou [Sat, 27 May 2017 02:22:02 +0000 (10:22 +0800)]
build: fix possible issue with kmod package having multiple AutoLoad's

This commit contains the following changes

 - Use local shell var where appliable
 - The $(sort $$$$$$$$mods) call will have no expected effect
 - Avoid EEXIST when creating symlinks in /etc/modules-boot.d/
 - Avoid duplicate arguments for insert_modules() in postinst-pkg

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
23 months agokernel: update kernel 4.4 to 4.4.70
Hauke Mehrtens [Fri, 26 May 2017 21:38:19 +0000 (23:38 +0200)]
kernel: update kernel 4.4 to 4.4.70

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agokernel: update kernel 4.9 to 4.9.30
Hauke Mehrtens [Fri, 26 May 2017 20:56:32 +0000 (22:56 +0200)]
kernel: update kernel 4.9 to 4.9.30

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
23 months agouml: Fix sample command line
Florian Fainelli [Tue, 23 May 2017 03:21:55 +0000 (20:21 -0700)]
uml: Fix sample command line

Provide paths that match where LEDE is staging images.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
23 months agouml: Check for glibc static libraries
Florian Fainelli [Tue, 23 May 2017 02:35:00 +0000 (19:35 -0700)]
uml: Check for glibc static libraries

UML statically links against libutil, librt and libpthread. Some hosts do not
necessarily have these libraries installed and we should find out sooner than
later (during the final vmlinux linking stage) about that.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
23 months agokernel: Make KERNEL_PERF_EVENTS selectable
Florian Fainelli [Mon, 22 May 2017 23:46:46 +0000 (16:46 -0700)]
kernel: Make KERNEL_PERF_EVENTS selectable

The kernel itself allows enabling/disabling CONFIG_PERF_EVENTS, so allow
doing the same thing.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
23 months agokernel: Hide kernel options behind a menu
Florian Fainelli [Mon, 22 May 2017 23:45:52 +0000 (16:45 -0700)]
kernel: Hide kernel options behind a menu

We are starting to add more and more kernel configurable options, to the
point where the Global build options menu is not really usable anymore,
hide all kernel-related configuration options behind a menu.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
23 months agoelfutils: Pass -Wno-unused-result to silence warnings as errors
Florian Fainelli [Mon, 22 May 2017 23:08:57 +0000 (16:08 -0700)]
elfutils: Pass -Wno-unused-result to silence warnings as errors

elfutils turns on -Werror by default, and patch 100-musl-compat.patch
changes how strerror_r is used and we no longer use the function's
return value. This causes the following build error/warning to occur
with glibc-based toolchains:

dwfl_error.c: In function 'dwfl_errmsg':
dwfl_error.c:158:18: error: ignoring return value of 'strerror_r',
declared with attribute warn_unused_result [-Werror=unused-result]
       strerror_r (error & 0xffff, s, sizeof(s));
                  ^
cc1: all warnings being treated as errors

Fixing this would be tricky as there are two possible signatures for
strerror_r (XSI and GNU), just turn off unused-result warnings instead.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
23 months agodnsmasq: add dhcp-script hook for other packages
Nick Brassel [Sat, 6 May 2017 10:56:26 +0000 (20:56 +1000)]
dnsmasq: add dhcp-script hook for other packages

Adds a script which acts as a hook for when dnsmasq creates/destroys a
lease, or completes a TFTP file transfer. The hook loops through scripts
in appropriate directories inside '/etc/hotplug.d', executing each one with
the same arguments supplied by dnsmasq.

In case dnsmasq is jailed by ujail the dhcp-script hook will not work as
expected as ujail does not yet support executing a script within a jail.

Signed-off-by: Nick Brassel <nick@tzarc.org>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
23 months agotreewide: fix device tree path in scripts
Mathias Kresin [Fri, 26 May 2017 13:13:42 +0000 (15:13 +0200)]
treewide: fix device tree path in scripts

The device tree is at /proc/device-tree/ without a base subdir.

Fixes: da472e5b30f6 ("treewide: access device tree from userspace via /proc/")

Signed-off-by: Mathias Kresin <dev@kresin.me>
23 months agoRevert "sysupgrade: run only one instance at a time."
Jo-Philipp Wich [Fri, 26 May 2017 12:48:05 +0000 (14:48 +0200)]
Revert "sysupgrade: run only one instance at a time."

This reverts commit e96a9a9af82c00dcce606a84a7bb87a00411385d.

The change breaks sysupgrade through LuCI and two-stage sysupgrade on
NAND targets. There is also a mismatch of file paths in lock and unlock
operations.

This commit was apparently neither properly tested, nor reviewed, so
drop it for now.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agoramips: add support for GL-inet GL-MT300N-V2
Kyson Lok [Wed, 17 May 2017 10:18:45 +0000 (18:18 +0800)]
ramips: add support for GL-inet GL-MT300N-V2

This patch adds supports for the GL-inet GL-MT300N-V2.

Specification:
- SoC: MediaTek MT7628AN
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR
- Ethernet: 1 x WAN (100 Mbps) and 1 x LAN (100 Mbps)
- USB: 1 x USB 2.0 port
- Button: 1 x switch button, 1 x reset button
- LED: 3 x LEDS (system power led is not GPIO controller)
- UART: 1 x UART on PCB (JP1: 3.3V, RX, TX, GND)

Installation through Luci:
- The original firmware is LEDE, so both LuCI or sysupgrade can be used.
- Do not keep settings, for sysupgrade please use the -n option.

Installation through bootloader webserver:
- Plug power and hold reset button until red LED blink to bright.
- Install sysupgrade image using web interface on 192.168.1.1.

Signed-off-by: Kyson Lok <kysonlok@gmail.com>
[match maximum image size with firmware partition]
Signed-off-by: Mathias Kresin <dev@kresin.me>
23 months agotreewide: access device tree from userspace via /proc/
Mathias Kresin [Wed, 10 May 2017 08:44:18 +0000 (10:44 +0200)]
treewide: access device tree from userspace via /proc/

Access the device tree via /proc/device-tree/ is the documented way to
access the properties. Everything else might not work in future.

Signed-off-by: Mathias Kresin <dev@kresin.me>
23 months agoflex: update to 2.6.4 (FS#809)
Eric Luehrsen [Fri, 26 May 2017 04:02:47 +0000 (00:02 -0400)]
flex: update to 2.6.4 (FS#809)

flex 2.6.3 has a bug which fails code generation and compile of some packages

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
23 months agox86/legacy: disable PAE again
Daniel Golle [Thu, 25 May 2017 21:44:23 +0000 (23:44 +0200)]
x86/legacy: disable PAE again

commit 961c0eacea ('x86: fix lifting kernel CPU requirements and always
enable PAE') broke some older geode boards such as Soekris net4826.
Hence disable PAE on x86/legacy again in order to still support those
very old non-PAE capable CPUs.

Fixes FS#773 - PAE broke Soekris net4826

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agobuild: fix QUILT related overrides
Felix Fietkau [Thu, 25 May 2017 18:38:10 +0000 (20:38 +0200)]
build: fix QUILT related overrides

They need to be defined before including quilt.mk

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoiptables: fix typos in 600-shared-libext.patch (FS#711)
Felix Fietkau [Thu, 25 May 2017 17:30:06 +0000 (19:30 +0200)]
iptables: fix typos in 600-shared-libext.patch (FS#711)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoDWR-512: adding wwan support for the dwr-512 3G modem
Giuseppe Lippolis [Thu, 22 Dec 2016 21:12:44 +0000 (22:12 +0100)]
DWR-512: adding wwan support for the dwr-512 3G modem

This PR allow the 3G modem embedded in the DWR-512 to be managed
by the wwan-ncm scripts. The modem will use the usb-option and
usb-cdc-ether drivers.
The DWR-512 DT is updated accordingly.

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
23 months agogcc: fix documentation entries added by 910-mbsd_multi.patch
Felix Fietkau [Wed, 10 May 2017 12:01:54 +0000 (14:01 +0200)]
gcc: fix documentation entries added by 910-mbsd_multi.patch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoscripts/download.pl: print the command used to download files
Felix Fietkau [Tue, 9 May 2017 13:20:42 +0000 (15:20 +0200)]
scripts/download.pl: print the command used to download files

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoxfsprogs: update to 4.11.0
Felix Fietkau [Tue, 9 May 2017 13:20:23 +0000 (15:20 +0200)]
xfsprogs: update to 4.11.0

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agotools/libressl: update to 2.5.4
Hannu Nyman [Sun, 7 May 2017 17:52:32 +0000 (20:52 +0300)]
tools/libressl: update to 2.5.4

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
23 months agotools/flex: update to 2.6.3
Hannu Nyman [Fri, 28 Apr 2017 13:53:42 +0000 (16:53 +0300)]
tools/flex: update to 2.6.3

* update flex to 2.6.3
* download .tar.gz (as upstream has dropped .xz)
* refresh patches

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
23 months agotools/cmake: update to 3.8.1
Hannu Nyman [Mon, 8 May 2017 19:18:25 +0000 (22:18 +0300)]
tools/cmake: update to 3.8.1

* update cmake to 3.8.1
* refresh patches

Release notes:
https://cmake.org/cmake/help/v3.8/release/3.8.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
23 months agox86_64: add drivers for Xeon controller hub based GPIO
Philip Prindeville [Tue, 28 Mar 2017 00:25:24 +0000 (18:25 -0600)]
x86_64: add drivers for Xeon controller hub based GPIO

These drivers are in many reference-design Xeon, iCore, or
Atom64 based server boards.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
23 months agojson-c: disable implicit fallthrough warning (gcc 7)
Felix Fietkau [Thu, 4 May 2017 13:45:35 +0000 (15:45 +0200)]
json-c: disable implicit fallthrough warning (gcc 7)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agofirewall: update to the latest version, fixes a gcc7 build error
Felix Fietkau [Thu, 4 May 2017 14:11:27 +0000 (16:11 +0200)]
firewall: update to the latest version, fixes a gcc7 build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>