openwrt/openwrt.git
7 years agopackage/libs/libconfig: Update to 1.5
Daniel Engberg [Sun, 9 Oct 2016 21:46:41 +0000 (23:46 +0200)]
package/libs/libconfig: Update to 1.5

Update libconfig to 1.5

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackage/utils/e2fsprogs: Update to 1.43.3
Daniel Engberg [Wed, 5 Oct 2016 22:02:16 +0000 (00:02 +0200)]
package/utils/e2fsprogs: Update to 1.43.3

Updates e2fsprogs to 1.43.3

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agotools/libressl: Update to 2.5.0 and use mirrors
Daniel Engberg [Tue, 4 Oct 2016 13:21:30 +0000 (15:21 +0200)]
tools/libressl: Update to 2.5.0 and use mirrors

Updates LibreSSL to 2.5.0 and switches from main site to mirrors as primary source.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackage/libs/libnftnl: Update to 1.0.6
Daniel Engberg [Sun, 9 Oct 2016 21:50:16 +0000 (23:50 +0200)]
package/libs/libnftnl: Update to 1.0.6

Update libnftnl to 1.0.6

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackage/network/services/lldpd: Update to 0.9.5
Daniel Engberg [Fri, 7 Oct 2016 20:37:17 +0000 (22:37 +0200)]
package/network/services/lldpd: Update to 0.9.5

Updates lldpd to 0.9.5

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackage/libs/libtool: Switch to xz tarball
Daniel Engberg [Sat, 8 Oct 2016 21:43:06 +0000 (23:43 +0200)]
package/libs/libtool: Switch to xz tarball

Switch to xz tarball, there's no point pulling two different tarballs of the same source code (tools/libtool uses xz).

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackage/libs/nettle: Update to 3.3
Daniel Engberg [Sat, 8 Oct 2016 21:35:08 +0000 (23:35 +0200)]
package/libs/nettle: Update to 3.3

Update to 3.3

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackage/libs/libnl: Update to 3.2.28
Daniel Engberg [Sat, 8 Oct 2016 18:58:41 +0000 (13:58 -0500)]
package/libs/libnl: Update to 3.2.28

Update to 3.2.28
Remove patch as its in upstream

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackage/libs/libmnl: Update to 1.0.4
Daniel Engberg [Sat, 8 Oct 2016 18:46:08 +0000 (13:46 -0500)]
package/libs/libmnl: Update to 1.0.4

* Update to 1.0.4
* Remove patch as it's upstreamed

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackages/network/utils/wpan-tools: Update to 0.7
Daniel Engberg [Fri, 7 Oct 2016 20:49:52 +0000 (22:49 +0200)]
packages/network/utils/wpan-tools: Update to 0.7

* Updates to 0.7
* Switches tarball to xz

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agopackage/network/utils/ipset: Update to 6.29
Daniel Engberg [Fri, 7 Oct 2016 20:43:12 +0000 (22:43 +0200)]
package/network/utils/ipset: Update to 6.29

Updates to 6.29

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agousbutils: Switch to xz tarball, update db to 2016-07-21
Daniel Engberg [Thu, 6 Oct 2016 20:10:14 +0000 (22:10 +0200)]
usbutils: Switch to xz tarball, update db to 2016-07-21

Switch to xz tarball
Update USB ID-database to snapshot 2016-07-21

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agomtd: fix up error messages
John Crispin [Thu, 6 Oct 2016 21:59:34 +0000 (23:59 +0200)]
mtd: fix up error messages

remove the "Error fixing up TRX header" message which is misleading.

Signed-off-by: John Crispin <john@phrozen.org>
7 years agoar71xx: add support for the Airtight C-60
Christian Lamparter [Wed, 5 Oct 2016 12:53:11 +0000 (14:53 +0200)]
ar71xx: add support for the Airtight C-60

This patch adds support for the Airtight C-60.

SOC: Atheros AR9344 rev 2 (CPU:560.000MHz)
RAM: 128 MiB
NOR: MX25L3205D 4MiB
NAND: ST Micro NAND 32MiB 3,3V 8-bit
SW-NET: AR8327N (2 Ports)
WLAN1: Dual-Band AR9340 Rev:2 (built-in SoC)
WLAN2: Dual-Band AR9300 Rev:4 PCIe Chip

The switch is setup for an accesspoint:
LAN1: (gigabit) is the wan-port.
LAN2: (fast ethernet) is bridged with the br-lan.

Flashing Guide (via initramfs):
  1. Connect a PC to the serial port of the C-60.
     power up the C-60.

     Enter u-boot command prompt:
     #> nand erase
     #> setenv bootcmd "bootm 0x9f060000"
     #> saveenv
     #> setenv ipaddr 192.168.1.1
     #> setenv netmask 255.255.255.0
     #> setenv serverip 192.168.1.100
     #> setenv bootfile lede-ar71xx-nand-c-60-initramfs-kernel.bin
     #> tftpboot
     #> bootm

  2. Wait for the C-60 to boot LEDE.
     On the root prompt. Enter:
     # ubiformat /dev/mtd4
     # ubiattach -p /dev/mtd4

  3. After that copy the sysupgrade.tar onto the router and run:
     # sysupgrade sysupgrade.tar

     to flash the image.

Special thanks to Chris Blake <chrisrblake93@gmail.com>. He provided
a C-60 unit and he helped with debugging the switch, LEDs and platfrom
support.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agogeneric: ar8216: improve ar8xxx_is_possible check
Christian Lamparter [Wed, 5 Oct 2016 13:19:34 +0000 (15:19 +0200)]
generic: ar8216: improve ar8xxx_is_possible check

The commit "generic: ar8216: add sanity check to ar8216_probe"
(774da6c7a40320a320b28d71291c0e61fcf7bc8a) stated that PHY IDs
should be checked at address 0-4. However, the PHY 4 was
never check by the loop. This patch extends the check to be
similar to the Atheors SDK. It tries all 4 ports and skips
unconnected PHYs if necessary. If it cannot find any familiar
PHYs, it will prevent the phy driver from initializing.

This patch is necessary for the C-60. It doesn't have a
PHY at port 3, so this caused the check in ar8xxx_is_possible
to fail. As a result, the ethernet ports on the C-60 didn't
work.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agoipq806x: C2600: change leds colour name
Henryk Heisig [Sun, 2 Oct 2016 19:34:50 +0000 (21:34 +0200)]
ipq806x: C2600: change leds colour name

Signed-off-by: Henryk Heisig hyniu@o2.pl
7 years agoipq806x: add support for indicating the boot and upgrade state using four leds
Henryk Heisig [Fri, 30 Sep 2016 19:36:50 +0000 (21:36 +0200)]
ipq806x: add support for indicating the boot and upgrade state using four leds

Signed-off-by: Henryk Heisig hyniu@o2.pl
7 years agolantiq: use wpad-mini for WBMR boards
Mathias Kresin [Fri, 14 Oct 2016 04:27:14 +0000 (06:27 +0200)]
lantiq: use wpad-mini for WBMR boards

The WBMR boards are the only ones in the whole tree selecting the wpad
and hostapd-utils package by default.

Remove the wps uci-default script as well, there is no obvious reason
why the wps config need to be set only for this board.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: fix ARV452CQW keys
Mathias Kresin [Wed, 12 Oct 2016 07:09:07 +0000 (09:09 +0200)]
lantiq: fix ARV452CQW keys

Fix the typo in the gpio-keys-polled compatible string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: use rfkill for wps button on wlan only boards
Mathias Kresin [Mon, 26 Sep 2016 18:56:13 +0000 (20:56 +0200)]
ramips: use rfkill for wps button on wlan only boards

All of the touched boards don't have an ethernet port. Allow to use the
wps button on these boards to enable the wireless radio after boot.

The force enabled wireless for the DCH-M225 is removed. It is reckless
to bring up an unencrypted wireless network by default these days.

Using the wps button to bring up the radio seam to me the better
approach.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: use rootfs splitter and new image build code for BR-6475ND
Mathias Kresin [Sun, 2 Oct 2016 19:00:22 +0000 (21:00 +0200)]
ramips: use rootfs splitter and new image build code for BR-6475ND

Use the edimax uImage splitter instead of the fixed size rootfs
partition.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: move edimax images to the new build code
Mathias Kresin [Tue, 27 Sep 2016 05:38:08 +0000 (07:38 +0200)]
ramips: move edimax images to the new build code

Images installed via TFTP recovery or the Edimax webinterface of the
3g-6200n(l) are writting with the edimax header to flash.

Use only one image type for these boards. The migration to the
factory only images need to be done via TFTP recovery.

Use the same start address for the 3g-6200n(l) factory images as the
stock firmware images.

Thanks to Jan Dostrasil for reporting all the issues of the 3g-6200nl
and the patient testing of all changes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agokernel: mtdsplit_uimage: fix Edimax parser
Mathias Kresin [Thu, 29 Sep 2016 17:28:13 +0000 (19:28 +0200)]
kernel: mtdsplit_uimage: fix Edimax parser

According to the author the code was added to in preparation for adding
support for a new board. The patch for the board was never send and the
code never really tested.

The edimax header starting with the edimax magic is put in front of the
uImage header. There is no special uImage header used. Means, default
magic and the type field is set to kernel as usual.

Signed-off-by: Mathias Kresin <dev@kresin.me>
edimax parser fix

7 years agokernel: mtdsplit_uimage: fix rootfs offset
Mathias Kresin [Sun, 2 Oct 2016 17:18:56 +0000 (19:18 +0200)]
kernel: mtdsplit_uimage: fix rootfs offset

The return value of the find_header function need to be added to the
uimage_size, otherwise mtd_find_rootfs_from() might search for a rootfs
within a custom header and fails.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: improve edimax 6200n/nl support
Mathias Kresin [Tue, 27 Sep 2016 05:16:16 +0000 (07:16 +0200)]
ramips: improve edimax 6200n/nl support

Assign the reset functionality to the wps/reset buttons. Use the wlan
switch of the 6200n to enable/disable wlan.

Add the internet led of the 6200nl and use the led for boot status
indication

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: fix edimax 6200nl switch config
Mathias Kresin [Fri, 9 Sep 2016 19:12:49 +0000 (21:12 +0200)]
ramips: fix edimax 6200nl switch config

With 3a9752bbd2bc00e407b5dcad21789720f40abf0e and later changes to
ramips_set_preinit_iface() the default vlan config applied during
preinit was changed. These changes were made without updating the
default network config to ensure that vlan interfaces used for lan/wan
are still configured.

Fix the issue by using the default all LAN portmap and disabling not
connected switch ports using portdisable device tree parameter.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: tag the CPU switch port
Mathias Kresin [Wed, 12 Oct 2016 17:04:08 +0000 (19:04 +0200)]
ramips: tag the CPU switch port

With de5102651501e51c036f88fe9c4dbf6974e5158a the explicit tagging of
the CPU port was removed. This leads to a not working default network
config, with vlans enabled but disabled CPU tagging, for boards where
all switch ports are having the same role.

In case the ports are having different roles set, tagging is is set
implicit for the CPU port by ucidef_add_switch().

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoramips: remove fixed lan/wan interface for switch configs
Mathias Kresin [Wed, 12 Oct 2016 17:24:41 +0000 (19:24 +0200)]
ramips: remove fixed lan/wan interface for switch configs

Don't set the lan/wan interface when using ucidef_add_switch. This
results into a wan interface albeit all ports a annotated as lan ports.

ucidef_add_switch takes care of setting the correct lan/wan interface
according to the annotation of the ports.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agombedtls: enable NIST curves optimisation.
Kevin Darbyshire-Bryant [Wed, 12 Oct 2016 10:42:15 +0000 (11:42 +0100)]
mbedtls: enable NIST curves optimisation.

luci using ustream-mbedtls is extremely slow vs ustream-polarssl.
polarssl alias mbedtls v1 is configured to use NIST prime speed
optimisation, so no longer disable the default optimisation for
mbedtls v2.

Compile & run tested: Archer C7v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
[Jo-Philipp Wich: refresh patch to use common format]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agogettext-full: update to 0.19.8.1
Dirk Neukirchen [Wed, 12 Oct 2016 14:14:45 +0000 (16:14 +0200)]
gettext-full: update to 0.19.8.1

- unify configs of host/target
- disable stuff to decrease build time
- disable interactive gettextize: see
http://lists.busybox.net/pipermail/buildroot/2014-April/093394.html

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
7 years agoautotools: use correct version for gettext FIXUP
Dirk Neukirchen [Wed, 12 Oct 2016 14:14:44 +0000 (16:14 +0200)]
autotools: use correct version for gettext FIXUP

0.19.8.1 gettext-full uses "archive-version" of 0.19.8
to replace makros, leading to breakage of PKG_FIXUP:=gettext-version

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
7 years agogettext: fix whitespace
Dirk Neukirchen [Wed, 12 Oct 2016 14:14:43 +0000 (16:14 +0200)]
gettext: fix whitespace

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
7 years agobrcm2708: fix image generation with imagebuilder
Álvaro Fernández Rojas [Thu, 13 Oct 2016 17:01:41 +0000 (19:01 +0200)]
brcm2708: fix image generation with imagebuilder

COPYING is not present in $(LINUX_DIR) on imagebuilder and prevents a
successful image creation.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agomac80211: update to wireless-testing 2016-10-08
Felix Fietkau [Sat, 8 Oct 2016 11:53:14 +0000 (13:53 +0200)]
mac80211: update to wireless-testing 2016-10-08

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agopackage/devel/binutils: Update to 2.27
diizzyy [Mon, 3 Oct 2016 16:56:49 +0000 (18:56 +0200)]
package/devel/binutils: Update to 2.27

Updates binutils to 2.27

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agotoolchain/binutils: Add binutils 2.27
Daniel Engberg [Mon, 10 Oct 2016 09:27:48 +0000 (04:27 -0500)]
toolchain/binutils: Add binutils 2.27

Add binutils 2.27 to toolchain

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [refresh patches]
7 years agoodhcpd: Upstep to git HEAD version
Hans Dedecker [Fri, 7 Oct 2016 14:30:19 +0000 (16:30 +0200)]
odhcpd: Upstep to git HEAD version

Adds per-host leasetime support
Various bugfixes :
-Prioritize ifname resolving via ubus
-Free interface if ifindex cannot be resolved
-...

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [update mirror sha256]
7 years agobuild: use CXXFLAGS if defined
Hauke Mehrtens [Sun, 2 Oct 2016 23:21:13 +0000 (01:21 +0200)]
build: use CXXFLAGS if defined

Instead of using TARGET_CFLAGS and EXTRA_CFLAGS in cmake and scons
build use the TARGET_CXXFLAGS and EXTRA_CXXFLAGS like it is done for
normal make and configure. configure used TARGET_CXXFLAGS and
EXTRA_CFLAGS for the CXXFLAGS. The package-default.mk sets
"EXTRA_CXXFLAGS = $(EXTRA_CFLAGS)" so using EXTRA_CXXFLAGS flags should
be save.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years agoar71xx: move dragino2 from legacy to generic
Karl Palsson [Thu, 6 Oct 2016 12:08:24 +0000 (12:08 +0000)]
ar71xx: move dragino2 from legacy to generic

Tested on real hardware with r1804.

Signed-off-by: Karl Palsson <karlp@etactica.com>
7 years agoapm821xx: replace recovery image for the MBL with initramfs
Christian Lamparter [Fri, 7 Oct 2016 18:29:03 +0000 (20:29 +0200)]
apm821xx: replace recovery image for the MBL with initramfs

The patch "images: bump default rootfs size to 256 MB"
a1f83bad606411a561e8e60110c71232b1a28aa2 caused a crash
during boot for the recovery images. This is because
both variants of the MyBook Live only have 256MB of RAM
and for the recovery option, the ext4 rootfs was simply
stored in the RAMDISK.

This patch replaces recovery image for the MBL with an
initramfs kernel.

In order to boot the initramfs (for recovery or development):

0. copy the initramfs and device tree into tftp's server directory
   # cp *-initramfs-kernel.bin to /tftp-server/mbl.bin
   # cp *-ext4-kernel.dtb to /tftp-server/fdt.bin

1. Connect the MyBook Live (Duo) serial port.
   (Warning! Use a 3.3v level shifter).

2. Hit Enter during u-boot and insert these three lines:
   # setenv serverip 192.168.1.254; setenv ipaddr 192.168.1.1;
   # tftp ${kernel_addr_r} mbl.bin; tftp ${fdt_addr_r} fdt.bin
   # run addtty addmisc; bootm ${kernel_addr_r} - ${fdt_addr_r}

   Where 192.168.1.254 is your TFTP server.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years agokernel: ext4: Add missing kmod-crypto-crc32c dependency
daniel [Mon, 10 Oct 2016 15:56:16 +0000 (17:56 +0200)]
kernel: ext4: Add missing kmod-crypto-crc32c dependency

This fixes the following error when mounting a ext4 filesystem
----
[  166.240000] EXT4-fs (sda1): Cannot load crc32c driver.
----

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
7 years agox86: 64: enable pci hotplug and acpipnp
Yousong Zhou [Mon, 10 Oct 2016 13:11:18 +0000 (21:11 +0800)]
x86: 64: enable pci hotplug and acpipnp

This will allow dynamically adding/removing at least virtio-net pci
devices which are quite the norm in cloud environment with QEMU/KVM

    netdev_add bridge,id=wan2,br=br-wan,helper=/home/yousong/.usr/libexec/qemu-bridge-helper
    device_add virtio-net-pci,id=devwan2,netdev=wan2,mac=11:22:33:22:11:00

The config was formed by selecting target x86/64 first, then select
CONFIG_HOTPLUG_PCI and CONFIG_HOTPLUG_PCI_ACPI with

    make kernel_menuconfig CONFIG_TARGET=subtarget

The following text tries to explain how the current config was formed

 1. CONFIG_PCI_LABEL and CONFIG_ATA_PIIX were removed because they were
    already enabled in x86 platform config
 2. CONFIG_ATA_SFF was removed because it was enabled in generic config
 3. CONFIG_NLS was removed because it will be selected by CONFIG_PCI_LABEL

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agoubus: update to the latest version, adds a race fix for wait_for
Felix Fietkau [Wed, 12 Oct 2016 18:02:23 +0000 (20:02 +0200)]
ubus: update to the latest version, adds a race fix for wait_for

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agotools: add missing dependency for dosfstools
Felix Fietkau [Wed, 12 Oct 2016 10:25:12 +0000 (12:25 +0200)]
tools: add missing dependency for dosfstools

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agodosfstools: fix autotools dependency
Álvaro Fernández Rojas [Wed, 12 Oct 2016 10:22:38 +0000 (12:22 +0200)]
dosfstools: fix autotools dependency

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agotools: improve and simplify dosfstools
Álvaro Fernández Rojas [Tue, 11 Oct 2016 12:46:15 +0000 (14:46 +0200)]
tools: improve and simplify dosfstools

- use default host install and clean.
- backport compatibility patch for OS X and LEDE (avoids having to force iconv
for OS X).
- use default HOST_BUILD_DIR.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agotools: remove old mkdosfs symlink from dosfstools
Álvaro Fernández Rojas [Tue, 11 Oct 2016 12:43:23 +0000 (14:43 +0200)]
tools: remove old mkdosfs symlink from dosfstools

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agouqmi: re-enable autoconnect which was dropped without explanation
Felix Fietkau [Thu, 22 Sep 2016 18:07:45 +0000 (20:07 +0200)]
uqmi: re-enable autoconnect which was dropped without explanation

Fixes a regression in commit 8f24ee638275:
"uqmi: Add proper IPv6 support"

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agouqmi: always use DHCP for IPv4
Felix Fietkau [Wed, 14 Sep 2016 14:06:41 +0000 (16:06 +0200)]
uqmi: always use DHCP for IPv4

Commit 8f24ee638275 ("uqmi: Add proper IPv6 support") changed the code
to fetch the IPv4 address via QMI by default instead of using DHCP to
make it consistent with the IPv6 codepath.
This breaks on at least some Sierra Wireless cards, where data exchanges
fail to work until the host has fetched a DHCP lease.
Leave v6 as it is, but always use DHCP for v4.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoar71xx: add userspace support for D-Link DIR-869 A1, generate images
Florian Beier [Tue, 11 Oct 2016 18:32:26 +0000 (20:32 +0200)]
ar71xx: add userspace support for D-Link DIR-869 A1, generate images

Signed-off-by: Florian Beier <beier.florian@gmail.com>
[Matthias Schiffer: fix factory image, improve commit message]
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoar71xx: add kernel support for D-Link DIR-869 A1
Matthias Schiffer [Tue, 11 Oct 2016 18:32:26 +0000 (20:32 +0200)]
ar71xx: add kernel support for D-Link DIR-869 A1

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoar71xx: add back SEAMA header checksum fix (as used on ramips)
Matthias Schiffer [Tue, 11 Oct 2016 18:32:25 +0000 (20:32 +0200)]
ar71xx: add back SEAMA header checksum fix (as used on ramips)

The D-Link DIR-869 A1 doesn't accept images with the jffs2 marker added
after the checksummed range, so we need to include it in the checksum and
fix it on first boot.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoar71xx: avoid double lzma compression of kernel for SEAMA images
Matthias Schiffer [Tue, 11 Oct 2016 18:32:25 +0000 (20:32 +0200)]
ar71xx: avoid double lzma compression of kernel for SEAMA images

Use relocation loader instead of lzma loader.

Tested on D-Link DIR-869 A1.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoar71xx: add relocation loader
Matthias Schiffer [Tue, 11 Oct 2016 18:32:25 +0000 (20:32 +0200)]
ar71xx: add relocation loader

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoar71xx: clean up SEAMA image build code
Matthias Schiffer [Tue, 11 Oct 2016 18:32:24 +0000 (20:32 +0200)]
ar71xx: clean up SEAMA image build code

Split seama-factory and seama-sysupgrade into smaller pieces (similar to
the ramips code) to make the image generation more flexible.

Also use standard pad-offset instead of adding a block of zeros at the
beginning of the image that is later cut off again. Standard pad-rootfs can
be used as the seal header doesn't contain an image size or checksum.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoinclude: prereq-build.mk: improve gcp check
Jo-Philipp Wich [Tue, 11 Oct 2016 07:33:18 +0000 (09:33 +0200)]
include: prereq-build.mk: improve gcp check

Adjust the check for gcp (GNU copy command) to rule out false positives
with "Goffi's CoPier" a python copy command.

Fixes FS#218.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agolantiq: fix lantiq-dsl output spam
Mathias Kresin [Tue, 11 Oct 2016 07:12:30 +0000 (09:12 +0200)]
lantiq: fix lantiq-dsl output spam

In case the adsl/vdsl service is disabled intentional, the output is
cluttered with the following message multiple times if the status of
the dsl line is queried:

  killall: vdsl_cpe_control: no process killed

If the dsl line status is queried by LuCI, the logfile is spammed with
the message.

Fix the issue by using killall in quite mode. In quite mode killall
still returns a non-zero value if the to be killed process can not be
found so that existing logic based on the return value still works.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agonetfilter: remove nf_tproxy_core references
Mathias Kresin [Tue, 11 Oct 2016 06:55:41 +0000 (08:55 +0200)]
netfilter: remove nf_tproxy_core references

nf_tproxy_core was removed during 3.12 development with kernel commit
fd158d79d33d3c8b693e3e2d8c0e3068d529c2dc. The code was moved
to xt_TPROXY.c.

Fixes FS#212

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoar71xx: build image for Archer C7 v2 IL
Amir Rachum [Sat, 8 Oct 2016 10:51:51 +0000 (13:51 +0300)]
ar71xx: build image for Archer C7 v2 IL

TP-Link uses a different region coding mechanism for IL firmware for the Archer
C7 v2. Instead of of setting the region, they set a different TPLINK_HWREV.

Signed-off-by: Amir Rachum <amir@rachum.com>
7 years agouhttpd: update to the latest version, adds a small json handler fix
Felix Fietkau [Thu, 6 Oct 2016 13:19:10 +0000 (15:19 +0200)]
uhttpd: update to the latest version, adds a small json handler fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agomac80211: update rtl8xxxu patches
Álvaro Fernández Rojas [Thu, 6 Oct 2016 10:49:31 +0000 (12:49 +0200)]
mac80211: update rtl8xxxu patches

Adds the latest patches from Jes Sorensen for rtl8xxxu, which improve
rtl8732bu, rtl8192eu and rtl8188eu support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agokernel: update kernel 4.4 to version 4.4.24
Álvaro Fernández Rojas [Fri, 7 Oct 2016 14:31:57 +0000 (16:31 +0200)]
kernel: update kernel 4.4 to version 4.4.24

Refresh patches for all targets that support kernel 4.4.
compile/run-tested on brcm2708/bcm2710 only.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agolantiq: fix BTHOMEHUBV2B default packages
Mathias Kresin [Thu, 6 Oct 2016 20:55:06 +0000 (22:55 +0200)]
lantiq: fix BTHOMEHUBV2B default packages

Due to the introduced double whitespace the default package selection
isn't applied. This leads to errors like a not working networking
because of a missing swconfig binary.

Fixes FS#208.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoscripts/diffconfig.sh: fix output if TARGET_PER_DEVICE_ROOTFS is set
Mathias Kresin [Wed, 5 Oct 2016 14:36:28 +0000 (16:36 +0200)]
scripts/diffconfig.sh: fix output if TARGET_PER_DEVICE_ROOTFS is set

diffconfig show packages selected as dependencies of
TARGET_PER_DEVICE_ROOTFS as individual selected.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agotools: do not apply ccache dependency to xz
Jo-Philipp Wich [Thu, 6 Oct 2016 13:26:16 +0000 (15:26 +0200)]
tools: do not apply ccache dependency to xz

Since XZ is needed to bootstrap building ccache we must not depend on it,
so remove the dependency on ccache to avoid circular dependencies.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agotools: xz: force building without ccache
Jo-Philipp Wich [Thu, 6 Oct 2016 13:25:12 +0000 (15:25 +0200)]
tools: xz: force building without ccache

Since XZ is required to bootstrap ccache we must not use the ccache compiler
wrapper to avoid circular dependencies.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agotools: make all tools depend on xz
Jo-Philipp Wich [Thu, 6 Oct 2016 11:15:14 +0000 (13:15 +0200)]
tools: make all tools depend on xz

Make all tools except tar (which is required to bootstrap xz-utils) and XZ
itself depend on XZ, in order to be able to handle .tar.xz downloads.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agotools: tar: use .bz2 archive
Jo-Philipp Wich [Thu, 6 Oct 2016 11:13:20 +0000 (13:13 +0200)]
tools: tar: use .bz2 archive

The "tar" utility is required to bootstrap XZ which is required to handle
.tar.xz archives, therfore revert to using the bz2 archive.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agotools: xz: use .bz2 archive
Jo-Philipp Wich [Thu, 6 Oct 2016 10:25:29 +0000 (12:25 +0200)]
tools: xz: use .bz2 archive

In order to build XZ itself we cannot assume that XZ support is available,
so fetch the bz2 archive variant of its sources instead.

Also drop the FreeBSD portability patch and apply it at prepare time using
sed, to avoid a dependency on GNU patch which in turn depends on XZ support.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agosource: Switch to xz for packages and tools where possible
Daniel Engberg [Tue, 4 Oct 2016 12:28:54 +0000 (07:28 -0500)]
source: Switch to xz for packages and tools where possible

* Change git packages to xz
* Update mirror checksums in packages where they are used
* Change a few source tarballs to xz if available upstream
* Remove unused lines in packages we're touching, requested by jow- and blogic
* We're relying more on xz-utils so add official mirror as primary source, master site as secondary.
* Add SHA256 checksums to multiple git tarball packages

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agodslite: Quote resolveip hostname argument
Hans Dedecker [Thu, 6 Oct 2016 07:13:40 +0000 (09:13 +0200)]
dslite: Quote resolveip hostname argument

Quote resolveip hostname argument to avoid bad shell injections.
While at it fix pattern match logic in case multiple IPv6 addresses
are returned for a hostname as they're seperated by newline by
resolveip and not a white space

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoinclude: remove XZ host prereq
Jo-Philipp Wich [Thu, 6 Oct 2016 10:13:29 +0000 (12:13 +0200)]
include: remove XZ host prereq

We build XZ as part of tools/, so no need to require it to be available
on the host system.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoat91: Remove u-boot from platform images folder
Ben Whitten [Tue, 7 Jun 2016 22:04:34 +0000 (23:04 +0100)]
at91: Remove u-boot from platform images folder

Removes the bootloader from the images section as its now in packages/boot
with the others.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
7 years agopackage: Add U-Boot for at91
Ben Whitten [Tue, 7 Jun 2016 21:58:58 +0000 (22:58 +0100)]
package: Add U-Boot for at91

Adds u-boot for the at91 platform and a couple of boards.
The build honours COPTS to benefit from fortify source et al.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
7 years agouhttpd: rename certificate defaults section
Jo-Philipp Wich [Thu, 6 Oct 2016 09:27:09 +0000 (11:27 +0200)]
uhttpd: rename certificate defaults section

Now that the uhttpd init script can generate certificates using openssl as
well, update the section name and related comment to be more generic.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoipq806x: fix wlan mac for Netgear R7800
Pavel Kubelun [Tue, 13 Sep 2016 11:39:23 +0000 (14:39 +0300)]
ipq806x: fix wlan mac for Netgear R7800

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years agoinclude/package-ipkg.mk: use TARGET_PATH_PKG in Package/*/install steps
Matthias Schiffer [Wed, 5 Oct 2016 22:42:32 +0000 (00:42 +0200)]
include/package-ipkg.mk: use TARGET_PATH_PKG in Package/*/install steps

Package/*/install was using a different PATH than all other steps like
Build/Install, which was confusing and easily led to mistakes.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoinclude/host-build.mk: set Host/Exports for Host/Install step
Matthias Schiffer [Wed, 5 Oct 2016 22:28:45 +0000 (00:28 +0200)]
include/host-build.mk: set Host/Exports for Host/Install step

Having a different PATH in Host/Install than in other steps like Host/Build
is confusing and easily leads to mistakes. Setting all of Host/Exports
makes host builds match target builds (Build/Install is part of
$(STAMP_BUILT), which has Build/Exports set).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoinclude/host-build.mk: fix ACLOCAL_INCLUDE
Matthias Schiffer [Wed, 5 Oct 2016 22:13:33 +0000 (00:13 +0200)]
include/host-build.mk: fix ACLOCAL_INCLUDE

It seems the intention was to add both $(STAGING_DIR_HOST)/... and
$(STAGING_DIR)/host/... instead of passing $(STAGING_DIR_HOST) twice. This
makes the definition match HOST_CPPFLAGS and HOST_LDFLAGS.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agoinclude/host-build.mk: pass HOST_BUILD_PREFIX to Host/install
Matthias Schiffer [Wed, 5 Oct 2016 22:02:21 +0000 (00:02 +0200)]
include/host-build.mk: pass HOST_BUILD_PREFIX to Host/install

Using HOST_BUILD_PREFIX instead of STAGING_DIR_HOST will make the argument
work as expected from packages.

Nothing changes for tools, for which HOST_BUILD_PREFIX and STAGING_DIR_HOST
are equivalent.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agohostapd: make -mesh and -p2p variants depend on the cfg80211 symbol
Felix Fietkau [Wed, 5 Oct 2016 21:01:33 +0000 (23:01 +0200)]
hostapd: make -mesh and -p2p variants depend on the cfg80211 symbol

Avoids build failures when the nl80211 driver is disabled

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolantiq: fixup last commits
Mathias Kresin [Wed, 5 Oct 2016 18:25:04 +0000 (20:25 +0200)]
lantiq: fixup last commits

Revert the rename of unrelated device tree nodes. Rename the missed
leds of the Speedport W 504V Typ A.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agobase-files: also generate configs when current is empty (FS#193)
Koen Vandeputte [Wed, 5 Oct 2016 09:26:35 +0000 (11:26 +0200)]
base-files: also generate configs when current is empty (FS#193)

Before a configuration is generated, an empty file is created to store
it in. (required by UCI)

If something happens during config generation
(power cut, interruption, ..) an empty file exists and it is never
regenerated again, causing some daemons to fail starting
(NTPD, logread, ..)

Fix this by also generating new configs if a critical file
is empty.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
7 years agolantiq: fix usb leds/trigger
Mathias Kresin [Wed, 5 Oct 2016 06:16:08 +0000 (08:16 +0200)]
lantiq: fix usb leds/trigger

Add USB led aliases to boards having an led which is meant to be used
as USB led according to the manuals.

Remove the kmod-ledtrig-usbdev from the default package selection for
boards not having an USB led. Add the kmod-ledtrig-usbdev to boards
where it is missing.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: use aliases device tree node for leds
Mathias Kresin [Tue, 4 Oct 2016 18:34:03 +0000 (20:34 +0200)]
lantiq: use aliases device tree node for leds

The chosen node is clearly the wrong place for aliases.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: cleanup led handling functions
Mathias Kresin [Tue, 4 Oct 2016 18:30:34 +0000 (20:30 +0200)]
lantiq: cleanup led handling functions

Use a more generic name for the lantiq_get_dt_led_chosen function.

Drop the lantiq_is_dt_led_chosen function. The lantiq_get_dt_led
function can be used to achieve the same.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: board.d: apply alphabetical order to led file
Mathias Kresin [Wed, 5 Oct 2016 08:05:51 +0000 (10:05 +0200)]
lantiq: board.d: apply alphabetical order to led file

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agoinclude/download.mk: Use -7e compression instead of -6 by default
Daniel Engberg [Tue, 4 Oct 2016 11:36:53 +0000 (06:36 -0500)]
include/download.mk: Use -7e compression instead of -6 by default

Adds a slightly higher compression level to xz by default which roughly raises memory usage from 100MiB to about 200MiB during compression, about 10MiB for decompression. (Source: xz manpage)

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agoinclude/prereq-build.mk: Add xz-utils to make prereq
Daniel Engberg [Tue, 4 Oct 2016 11:34:43 +0000 (06:34 -0500)]
include/prereq-build.mk: Add xz-utils to make prereq

Add xz-utils to make prereq

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years agoccache: disable assembler support, it breaks kernel initramfs images
Felix Fietkau [Wed, 5 Oct 2016 07:45:59 +0000 (09:45 +0200)]
ccache: disable assembler support, it breaks kernel initramfs images

The reason is that ccache does not recognize and process the .incbin
directive, so caching is unreliable.
See https://github.com/ccache/ccache/issues/136 for more information.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: fix kmod-sound-hda-core on Linux 3.18
Jo-Philipp Wich [Tue, 4 Oct 2016 23:35:52 +0000 (01:35 +0200)]
kernel: fix kmod-sound-hda-core on Linux 3.18

The kmod-sound-hda-core module attempts to package snd-hda-core.ko which
does not exist in Linux 3.18, therfore only use it for kernels >= 4.1

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agozynq: fix maintainer email address
Jo-Philipp Wich [Thu, 28 Jul 2016 12:27:43 +0000 (14:27 +0200)]
zynq: fix maintainer email address

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agozynq: convert to new image build code
Jo-Philipp Wich [Thu, 28 Jul 2016 12:19:16 +0000 (14:19 +0200)]
zynq: convert to new image build code

Convert the Zynq target to use the new image build code in order to fix
broken image generation after 9945a1dca5bb6bc522393f7583baf3a64df6ce11
changed the handling of CPIO images.

Also remove the misapplied ubifs feature flag since the image generation is
not using UBIFS for building FIT images.

As part of the conversion, move the DTB building and the uImage ramdisk
generation into separate build steps which can be generalized and shared
with other targets, like APM821xx, in the long run.

Also remove the legacy profile declarations and use new-style per-device
profiles which will allow different package sets per image in the future.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agouhttpd: support using OpenSSL for certificate generation
Hannu Nyman [Tue, 4 Oct 2016 14:38:31 +0000 (17:38 +0300)]
uhttpd: support using OpenSSL for certificate generation

Support the usage of the OpenSSL command-line tool for generating
the SSL certificate for uhttpd. Traditionally 'px5g' based on
PolarSSL (or mbedTLS in LEDE), has been used for the creation.

uhttpd init script is enhanced by adding detection of an installed
openssl command-line binary (provided by 'openssl-util' package),
and if found, the tool is used for certificate generation.

Note: After this patch the script prefers to use the OpenSSL tool
if both it and px5g are installed.

This enables creating a truly OpenSSL-only version of LuCI
without dependency to PolarSSL/mbedTLS based px5g.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
7 years agoinclude/download.mk: generate reproducable SCM tarballs
Jo-Philipp Wich [Tue, 4 Oct 2016 16:33:55 +0000 (18:33 +0200)]
include/download.mk: generate reproducable SCM tarballs

Apply a number of changes to the tarball generation in order to produce
identical files on different systems:

1) Use an explicit `gzip -cn` to avoid storing file mtime in the gzip header
2) Instruct `tar` to unconditionally use uid and gid 0 for archive members
3) Instruct `tar` to sort archive members by file name
4) For SCMs that do not preserve file modification times like Git or Mercurial,
   use the date of the last commit to the repository and pass it as `--mtime`
   value to `tar`

After these changes, locally produced tarballs generated from SCM checkouts
should be identical on any system, simplifying the mirroring of cache archives.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agokernel: add missing snd-hda-intel module for Linux 3.18 and 4.1
Jo-Philipp Wich [Tue, 4 Oct 2016 22:43:10 +0000 (00:43 +0200)]
kernel: add missing snd-hda-intel module for Linux 3.18 and 4.1

Prior to kernel 4.4, the hda-intel module depends on the hda-controller
utility submodule so bundle it for the older kernel versions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agokernel: add missing config symbol (partial forward port of d2f4479870)
Felix Fietkau [Tue, 4 Oct 2016 15:54:23 +0000 (17:54 +0200)]
kernel: add missing config symbol (partial forward port of d2f4479870)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobuild: fix regression on running make kernel_menuconfig
Felix Fietkau [Tue, 4 Oct 2016 15:51:48 +0000 (17:51 +0200)]
build: fix regression on running make kernel_menuconfig

The build system overrides HOST_LOADLIBES to add the staging dir to the
library search path. menuconfig needs -lncurses, add another override
for it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: add missing symbols for Linux 3.18 (like d2f4479870)
Felix Fietkau [Tue, 4 Oct 2016 15:07:59 +0000 (17:07 +0200)]
kernel: add missing symbols for Linux 3.18 (like d2f4479870)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: move kmod-owl-loader to the right .mk file
Felix Fietkau [Tue, 4 Oct 2016 13:58:03 +0000 (15:58 +0200)]
kernel: move kmod-owl-loader to the right .mk file

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