librecmc/librecmc.git
7 years agobcm53xx: backport Broadcom's iProc QSPI driver
Rafał Miłecki [Wed, 1 Mar 2017 05:52:23 +0000 (06:52 +0100)]
bcm53xx: backport Broadcom's iProc QSPI driver

This driver has been added instead of improving spi-bcm53xx. It has some
advantages: allows SPI speed control & hopefully doesn't have bug that
was stopping us from using multiple SPI messages for writing flash data.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agoopkg: mark as essential (FS#571)
Jo-Philipp Wich [Wed, 1 Mar 2017 02:05:39 +0000 (03:05 +0100)]
opkg: mark as essential (FS#571)

Flag the opkg package as essential to avoid accidential uninstalls of it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agokirkwood: fix include in etc/board.d/02_network
Alberto Bursi [Thu, 23 Feb 2017 18:42:40 +0000 (19:42 +0100)]
kirkwood: fix include in etc/board.d/02_network

the mtd_get_mac_ascii function called within this script requires the inclusion of /lib/functions/system.sh

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
7 years agoramips: add support for HiWiFi HC5962
ZengFei Zhang [Wed, 22 Feb 2017 12:47:22 +0000 (20:47 +0800)]
ramips: add support for HiWiFi HC5962

This patch adds supports for the HiWiFi HC5962(gee4) http://www.hiwifi.com

Short specification:

 - MT7621AT + MT7612EN + 7603EN
 - 256MB DDR3 RAM
 - 128MB NAND flash
 - 1+3 x 1000M Ethernet
 - 1x USB 2.0 port. 1x USB 3.0 port.
 - reset button
 - UART pad on PCB (JP3: TX, RX, GND, 3.3V)

Flash instruction:

1, Download lede-ramips-mt7621-hc5962-squashfs-factory.bin
2, Login as root via SSH on 192.168.199.1 and then copy factory.bin(using wget or nc or...) to /tmp/
3, use the following commands:
   $ mtd write /tmp/lede-ramips-mt7621-hc5962-squashfs-factory.bin firmware
   $ mtd erase firmware_backup && reboot
After reboot you should be able to login as root via SSH on 192.168.1.1

Signed-off-by: ZengFei Zhang <zhangzengfei@kunteng.org>
7 years agobcm53xx: backport accepted BCM5301X and BCM53573 patches
Rafał Miłecki [Tue, 28 Feb 2017 21:34:13 +0000 (22:34 +0100)]
bcm53xx: backport accepted BCM5301X and BCM53573 patches

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agokernel: fix MIPS memory function optimization build error in decompressor
Felix Fietkau [Tue, 28 Feb 2017 05:53:39 +0000 (06:53 +0100)]
kernel: fix MIPS memory function optimization build error in decompressor

Fixes the following build error:
  CC      arch/mips/boot/compressed/decompress.o
  OBJCOPY arch/mips/boot/compressed/vmlinux.bin
  XZKERN  arch/mips/boot/compressed/vmlinux.bin.z
  OBJCOPY arch/mips/boot/compressed/piggy.o
  LD      vmlinuz
arch/mips/boot/compressed/decompress.o: In function `lzma2_lzma':
/tmp2/mehrtens/linux/arch/mips/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:884: undefined reference to `memmove'
make[1]: *** [vmlinuz] Error 1
make: *** [vmlinuz] Error 2

lib/decompress_unxz.c only defines its own memmove function if there is no
macro with the same name.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agowireless-tools: Change download url to github
Hsing-Wang Liao [Sun, 26 Feb 2017 10:07:52 +0000 (18:07 +0800)]
wireless-tools: Change download url to github

Signed-off-by: Hsing-Wang Liao <kuoruan@gmail.com>
7 years agobcm53xx: enable CLK_BCM_NSP for kernel 4.9
Rafał Miłecki [Tue, 28 Feb 2017 15:43:22 +0000 (16:43 +0100)]
bcm53xx: enable CLK_BCM_NSP for kernel 4.9

This is required to get booting kernel.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agobrcm63xx: CPVA502+: add SPROM wifi
Daniel Gonzalez Cabanelas [Tue, 14 Feb 2017 15:37:18 +0000 (16:37 +0100)]
brcm63xx: CPVA502+: add SPROM wifi

Add SPROM wifi to the kernel board data.

After this fix, the wifi won't work anyway due the lack
of RAM memory (16 MB). It will throw a kernel panic
when loading the b43 drivers.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years agobrcm63xx: CPVA502+: fix userspace support
Daniel Gonzalez Cabanelas [Tue, 14 Feb 2017 15:37:04 +0000 (16:37 +0100)]
brcm63xx: CPVA502+: fix userspace support

Fix board name typo, fix network configuration and add a led trigger.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years agobrcm63xx: CPVA502+: fix image generation
Daniel Gonzalez Cabanelas [Tue, 14 Feb 2017 15:36:55 +0000 (16:36 +0100)]
brcm63xx: CPVA502+: fix image generation

Fix typo, erase pointless option and allow to build the image.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years agobrcm63xx: CPVA502+: fix LEDs and buttons at DTS
Daniel Gonzalez Cabanelas [Tue, 14 Feb 2017 15:36:45 +0000 (16:36 +0100)]
brcm63xx: CPVA502+: fix LEDs and buttons at DTS

Leds are wrong and a button is missing, fix them.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years agobrcm63xx: fix external IRQ edge type sense
Daniel Gonzalez Cabanelas [Tue, 7 Feb 2017 20:36:16 +0000 (21:36 +0100)]
brcm63xx: fix external IRQ edge type sense

Fix the register for configuring rising/falling edge

Rising should be sense=1, and falling sense=0.
The old driver used these values, but the new one have
them flipped.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
7 years agokernel: sort generic configs
Jonas Gorski [Mon, 27 Feb 2017 17:05:12 +0000 (18:05 +0100)]
kernel: sort generic configs

Use kconfig.pl to sort the generic configs and get rid of duplicate
entries.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years agorules.mk: make PKG_CONFIG_DEPENDS properly track string values
Matthias Schiffer [Fri, 24 Feb 2017 11:16:33 +0000 (12:16 +0100)]
rules.mk: make PKG_CONFIG_DEPENDS properly track string values

The confvar macro is adjusted to not only consider if a variable has a
value or not, but also the value itself. Instead of creating a string of
'y' and 'n' characters, all variable names and values are concatenated
and hashed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years agokernel: add another missing TPM symbol
John Crispin [Mon, 27 Feb 2017 13:51:43 +0000 (14:51 +0100)]
kernel: add another missing TPM symbol

Signed-off-by: John Crispin <john@phrozen.org>
7 years agokernel: add missing TPM related config symbol for 3.18
Felix Fietkau [Mon, 27 Feb 2017 13:41:50 +0000 (14:41 +0100)]
kernel: add missing TPM related config symbol for 3.18

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolantiq: select kmod-mt7603 instead of kmod-mt76 for WBMR-300HPD
Felix Fietkau [Sun, 26 Feb 2017 14:00:54 +0000 (15:00 +0100)]
lantiq: select kmod-mt7603 instead of kmod-mt76 for WBMR-300HPD

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: fix TPM related config symbols for 4.9
Felix Fietkau [Mon, 27 Feb 2017 12:45:47 +0000 (13:45 +0100)]
kernel: fix TPM related config symbols for 4.9

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: add missing HW_RANDOM_TPM symbol
John Crispin [Mon, 27 Feb 2017 11:36:59 +0000 (12:36 +0100)]
kernel: add missing HW_RANDOM_TPM symbol

Signed-off-by: John Crispin <john@phrozen.org>
7 years agotoolchain: unbreak glibc on MIPS
Jonas Gorski [Thu, 23 Feb 2017 21:16:00 +0000 (22:16 +0100)]
toolchain: unbreak glibc on MIPS

Binutils recently updated the ABI version to 5, which broke glibc, as it
refuses to load anything > 3. Upstream reverted the ABI version update,
so backport the commit.

Fixes the following error on boot:

/bin/sh: error while loading shared libraries: /lib/libcrypt.so.1: ELF file ABI version invalid
[    0.920077] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    0.920077]
[    0.929450] Rebooting in 1 seconds..

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
7 years agoramips: add support for HiWiFi HC5661A
Wang JiaWei [Fri, 24 Feb 2017 23:19:15 +0000 (07:19 +0800)]
ramips: add support for HiWiFi HC5661A

HC5661A is almost the same as HC5661 but MT7628AN is used instead of MT7620A.

- MT7628AN
- 128 MiB DDR2 RAM (W971GG6KB-25)
- 16 MiB SPI NOR flash (W25Q128)
- SD slot (not work yet)
- 1+4 x 100M Ethernet
- 802.11 b/g/n Wi-Fi
- 3 x LED
- 1 x button
- UART pad on PCB (JP1: TX, RX, GND, 3.3V)

The factory flash layout seems different from HC5661.
"hwf_config" is renamed to "oem" and its size changes to 0x20000.
It is modified accordingly in the dts file.

0x000000000000-0x000000030000 : "u-boot"
0x000000030000-0x000000040000 : "hw_panic"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000160000 : "kernel"
0x000000160000-0x000000fc0000 : "rootfs"
0x000000bb0000-0x000000fc0000 : "rootfs_data"
0x000000fc0000-0x000000fe0000 : "oem"
0x000000fe0000-0x000000ff0000 : "bdinfo"
0x000000ff0000-0x000001000000 : "backup"
0x000000050000-0x000000fc0000 : "firmware"

To install LEDE, enabled the "developer mode",
which will *void your warranty* and open the SSH server at port 1022.

sysupgrade -n -F lede-ramips-mt7628-hc5661a-squashfs-sysupgrade.bin

SD slot:
- Tried to add modules kmod-sdhci kmod-sdhci-mt7620, and corresponding dts block.
- It will block WAN + 3xLAN ports, only one LAN works.
- I'm not sure why, everything else works fine.

Signed-off-by: Wang JiaWei <buaawjw@gmail.com>
7 years agokernel: update 4.9 to 4.9.13
Ansuel Smith [Sun, 26 Feb 2017 12:42:13 +0000 (13:42 +0100)]
kernel: update 4.9 to 4.9.13

refresh patch 630-packet_socket_type

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
7 years agokernel: Add TPM Module support
Chris Blake [Sun, 26 Feb 2017 10:04:51 +0000 (04:04 -0600)]
kernel: Add TPM Module support

The following will enable the TPM kernel module, as well as support for
the atmel i2c TPM driver. Tested and confirmed working on an Aerohive
AP-121

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
7 years agoipq806x: sanitize Dni image generation
Thomas Reifferscheid [Tue, 21 Feb 2017 19:58:38 +0000 (20:58 +0100)]
ipq806x: sanitize Dni image generation

The more straight forward approach for generating the pure and unpadded
kernel file which then can be used for initramfs straight.
Build options for factory.img and sysupgrade.tar are handeled
seperately.

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years agokernel: enable hwmon-k10temp in the x86/64 kernel config instead of packaging it
Felix Fietkau [Sun, 26 Feb 2017 09:38:51 +0000 (10:38 +0100)]
kernel: enable hwmon-k10temp in the x86/64 kernel config instead of packaging it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agotools/m4: update 1.4.18
Etienne Haarsma [Sun, 12 Feb 2017 15:50:07 +0000 (16:50 +0100)]
tools/m4: update 1.4.18

Patch 100-fix-gets-removal.patch is removed because it's included in the new version.

Signed-off-by: Etienne Haarsma <bladeoner112@gmail.com>
7 years agobuild: clean up redundant touching of the package install info file
Felix Fietkau [Tue, 21 Feb 2017 17:27:22 +0000 (18:27 +0100)]
build: clean up redundant touching of the package install info file

Instead of using a separate .clean stamp file, remove the install info
file on compile, then append the install package list afterwards

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobuild: get rid of host.mk
Felix Fietkau [Mon, 20 Feb 2017 13:24:54 +0000 (14:24 +0100)]
build: get rid of host.mk

Defined required host related variables in toplevel.mk instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobuild: get rid of FIND_L from host.mk
Felix Fietkau [Mon, 20 Feb 2017 12:03:49 +0000 (13:03 +0100)]
build: get rid of FIND_L from host.mk

This was added for Mac OS X many years ago, but recent versions also
support find -L

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agopackge/boot/rbcfg: add new boot constants found in the recent Mikrotik devices
Alex Samorukov [Tue, 21 Feb 2017 11:02:51 +0000 (12:02 +0100)]
packge/boot/rbcfg: add new boot constants found in the recent Mikrotik devices

Signed-off-by: Alex Samorukov <samm@os2.kiev.ua>
7 years agogrub2: update to 2.02~rc1
Alif M. Ahmad [Sat, 18 Feb 2017 16:03:33 +0000 (23:03 +0700)]
grub2: update to 2.02~rc1

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years agoar71xx: mikrotik: erase firmware partition on SPI NOR devices in pre_upgrade()
Thibaut VARENE [Thu, 23 Feb 2017 11:24:05 +0000 (12:24 +0100)]
ar71xx: mikrotik: erase firmware partition on SPI NOR devices in pre_upgrade()

On Mikrotik SPI NOR devices, the firmware partition must be erased when flashing
from stock firmware, otherwise leftover bits (in particular a kernel signature)
can trigger a boot loop.

When booted from initramfs (the only way to flash LEDE on these devices),
this patch unconditionally erases the firmware partition in the pre_upgrade()
stage for all supported SPI NOR devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agoramips: include only kmod-mt76-core in EX2700 image
Joseph C. Lehner [Fri, 24 Feb 2017 17:20:48 +0000 (18:20 +0100)]
ramips: include only kmod-mt76-core in EX2700 image

This patch frees up flash space on the EX2700, by
removing unused mt76 drivers and firmware.

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
7 years agoar71xx: Enable RB2011 TTY
Arvid E. Picciani [Tue, 14 Feb 2017 11:29:02 +0000 (12:29 +0100)]
ar71xx: Enable RB2011 TTY

Enables TTY on the Mikrotik RouterBoard RB2011*R*

Signed-off-by: Arvid E. Picciani <aep@exys.org>
7 years agokernel: update 4.9 to 4.9.12
Ansuel Smith [Thu, 23 Feb 2017 17:00:31 +0000 (18:00 +0100)]
kernel: update 4.9 to 4.9.12

Refresh generic patch

Compiled and tested WRT1900ACS

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
7 years agolayerscape: add LS1043A Rev1.1 support
Yangbo Lu [Fri, 17 Feb 2017 14:21:56 +0000 (22:21 +0800)]
layerscape: add LS1043A Rev1.1 support

Backport kernel patches for LS1043A Rev1.1 support from upstream,
patchwork, and SDK. And update to latest u-boot to support LS1043A
Rev1.1.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 years agoiftop: bump to latest upstream
Kevin Darbyshire-Bryant [Tue, 18 Oct 2016 08:56:19 +0000 (09:56 +0100)]
iftop: bump to latest upstream

Drops a LEDE carried patch now upstream.
Convert to autotools.
A number of nits fixed upstream (dns & short packet handling most
notable)

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years agorelayd: fix making incomplete instance json data
Yousong Zhou [Sat, 25 Feb 2017 12:07:27 +0000 (20:07 +0800)]
relayd: fix making incomplete instance json data

Defer procd_open_instance only after validity check passed.

Fixes FS#541

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agorelayd: remove old start-stop-service related code
Yousong Zhou [Sat, 25 Feb 2017 12:00:14 +0000 (20:00 +0800)]
relayd: remove old start-stop-service related code

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agoubus: update to the latest version
Felix Fietkau [Sat, 25 Feb 2017 10:15:07 +0000 (11:15 +0100)]
ubus: update to the latest version

c09e4f0 ubusd: fix incomplete copy of shared buf during queue-ing
453b87f cli: add support for subscribing to objects
6eb3c96 cli: do not use default timeout for listen
dfe3383 libubus: reset ctx->sock.error when doing ubus reconnect
34c6e81 cli: fix listen_timeout compile issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolibubox: Update to latest version
Ted Hess [Fri, 24 Feb 2017 20:30:28 +0000 (15:30 -0500)]
libubox: Update to latest version

9d6305a utils: Change calloc_a() to return size_t aligned pointers

Signed-off-by: Ted Hess <thess@kitschensync.net>
7 years agoubox: fix possible address alignment issue
Yousong Zhou [Fri, 24 Feb 2017 01:45:37 +0000 (09:45 +0800)]
ubox: fix possible address alignment issue

Fixes FS#544

3dc78a4 kmodloader: don't store aliases info in struct module

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agoppp: ppp6-up: add executable permission bit
Yousong Zhou [Wed, 15 Feb 2017 06:06:41 +0000 (14:06 +0800)]
ppp: ppp6-up: add executable permission bit

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agomac80211: hwsim: select DRIVER_11AC_SUPPORT and DRIVER_11W_SUPPORT
Yousong Zhou [Fri, 3 Feb 2017 13:15:42 +0000 (21:15 +0800)]
mac80211: hwsim: select DRIVER_11AC_SUPPORT and DRIVER_11W_SUPPORT

This is required for default wireless configuration of malta target to
work out of the box again.  Fixes "77ece30e: hostapd: Add ability to
specify that that wireless driver supports 802.11ac"

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agoiw: sync nl80211.h with mac80211 package
Felix Fietkau [Fri, 24 Feb 2017 11:17:03 +0000 (12:17 +0100)]
iw: sync nl80211.h with mac80211 package

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoodhcpd: update to git HEAD version (FS#397) (FS#481)
Hans Dedecker [Thu, 23 Feb 2017 20:56:15 +0000 (21:56 +0100)]
odhcpd: update to git HEAD version (FS#397) (FS#481)

1b630f8 router: don't announce prefixes with valid lifetime equal to 0
ba0cac0 router: fix arithmetic exception fault
3495f17 router: allow RA prefix lifetime being set to leasetime value (FS#397)
e437ce9 treewide: simplify dhcp leasetime checking
942fb33 router: support ra_mininterval and ra_lifetime uci parameters (FS#397)
f913337 router.h: fix alignment style
4dc7edb Revert "odhcpd.h: fix alignment style"
62ea54f odhcpd.h: fix alignment style
a898ee5 config: make loglevel configurable via uci (FS#481)
51c756c odhcpd: display correct default log level in usage text
68ee0b5 treewide: define and use macro IN6_IS_ADDR_ULA
fa57225 ndp: deregister netlink event socket for non recoverable errors
ac70d28 odhcpd: fix white space errors

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoswconfig: Bugfix switch_port uci option parsing
Ben Kelly [Mon, 20 Feb 2017 12:04:30 +0000 (14:04 +0200)]
swconfig: Bugfix switch_port uci option parsing

When not defining 'device' or 'vlan' in relevant switch_port uci
sections, behaviour is inconsistent due to *devn, *port and *vlan
pointers not being zero initialized.

Signed-off-by: Ben Kelly <ben@benjii.net>
7 years agouboot-omap: Makefile: Include kernel.mk
Alexandru Gagniuc [Thu, 23 Feb 2017 00:04:36 +0000 (16:04 -0800)]
uboot-omap: Makefile: Include kernel.mk

This is needed for the definition of $(LINUX_DIR). This is used in
u-boot.mk to change the device-tree compiler to the dtc used by
linux.

Without this, the build will use the system dtc. This results in a
build failure when a dtc does not exist outside the buildroot.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
7 years agoar71xx: use common firmware partition for WNDAP360
Felix Fietkau [Sun, 19 Feb 2017 13:40:10 +0000 (14:40 +0100)]
ar71xx: use common firmware partition for WNDAP360

Patch from https://github.com/openwrt/openwrt/pull/398

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agomac80211: disable potentially harmful PS software retry for A-MPDU sessions
Felix Fietkau [Wed, 22 Feb 2017 21:51:04 +0000 (22:51 +0100)]
mac80211: disable potentially harmful PS software retry for A-MPDU sessions

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agonetifd: fix stopping netifd + interfaces
Felix Fietkau [Mon, 20 Feb 2017 09:49:33 +0000 (10:49 +0100)]
netifd: fix stopping netifd + interfaces

stop() is overwritten by rc.common, so implement stop_service instead.
While at it, remove the now unnecessary restart() override

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agomt76: split kmod package
Joseph C. Lehner [Sun, 19 Feb 2017 12:13:15 +0000 (13:13 +0100)]
mt76: split kmod package

This patch splits `kmod-mt76` into three separate packages:
`kmod-mt76-core`, `kmod-mt76x2` and `kmod-mt7603`. By making
`kmod-mt76` a metapackage containing these new packages,
the previous behaviour of including all drivers and firmware
is left unchanged, unless explicitly unselected in
`DEVICE_PACKAGES`.

This splitting is especially beneficial for devices with
small flash chips, since the `kmod-mt76` package currently
requires ~160K on squashfs (after compression).

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup]
7 years agolantiq: fix broadcast packets leaking on the wrong vlan on xrx200
Felix Fietkau [Wed, 22 Feb 2017 12:31:17 +0000 (13:31 +0100)]
lantiq: fix broadcast packets leaking on the wrong vlan on xrx200

The ethernet driver uses a port map override via special tag to control
the ports on which multicast packets are sent. This was added to work
around an issue in the switch that was occasionally leaking packets onto
the wrong vlan.
Unfortunately the change had some leftover lines that were overwrting
the port map with a list of all ports, thus always leaking packets onto
the wront vlan.

Fix this by only enabling the override with the VLAN port map and only
if a matching VLAN port map was actually found

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokernel: update kernel 4.4 to 4.4.50
Kevin Darbyshire-Bryant [Sun, 19 Feb 2017 10:48:39 +0000 (10:48 +0000)]
kernel: update kernel 4.4 to 4.4.50

Bump kernel from 4.4.49 to 4.4.50

Compile tested: All targets

Run tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years agoopkg: fix stray printf() (#551)
Jo-Philipp Wich [Thu, 23 Feb 2017 08:46:40 +0000 (09:46 +0100)]
opkg: fix stray printf() (#551)

Update to latest Git head to get rid of a stray printf() causing unwanted
output in the "opkg list-upgradable" command.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agokernel: add missing config symbol for linux 3.18
Felix Fietkau [Wed, 22 Feb 2017 22:20:30 +0000 (23:20 +0100)]
kernel: add missing config symbol for linux 3.18

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agomac80211: rename patch to avoid duplicate number
Felix Fietkau [Wed, 22 Feb 2017 21:49:00 +0000 (22:49 +0100)]
mac80211: rename patch to avoid duplicate number

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolibpcap: add optional netfilter support
Martin Schiller [Mon, 20 Feb 2017 05:27:41 +0000 (06:27 +0100)]
libpcap: add optional netfilter support

This is needed to use the nflog interface with tcpdump

Signed-off-by: Martin Schiller <mschiller@tdt.de>
7 years agobuild: unsilence move command
Thomas Reifferscheid [Mon, 20 Feb 2017 16:48:50 +0000 (17:48 +0100)]
build: unsilence move command

The @ sign in front of the "mv" command was significantly suppressing
output to stdout. When reviewing the make/build logs it was tricking
me a whole lot and it mad me lose time. Removing the @ sign will get
stdout and logs right about what happened when.

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years agoar71xx: Enable mtdsplit support for RB SPI NOR devices
Thibaut VARENE [Wed, 15 Feb 2017 10:40:06 +0000 (11:40 +0100)]
ar71xx: Enable mtdsplit support for RB SPI NOR devices

This patch enables mtdsplit for the MikroTik subtarget.
It converts mach-rbspi.c to use a single "firmware" partition.
Finally, it converts the SPI NOR profile to metadata images:
the original combined-image format is gone, the images are now
"standard" sysupgrade images with metadata appended.

Note: kernel2minor apparently pads the kernel container to erase-block
boundary, but this is undocumented behaviour, so we do not rely on it
and call pad-to anyway.

Note: in platform.sh, the boards are tested last in platform_check_image()
as this should eventually become the "*)" default case when more devices
switch to metadata images.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agoar71xx: remove bogus "rb*)" catch-all from platform.sh
Thibaut VARENE [Wed, 15 Feb 2017 12:23:27 +0000 (13:23 +0100)]
ar71xx: remove bogus "rb*)" catch-all from platform.sh

This patch replaces a dangerous catch-all with the exhaustive list of devices.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agokernel: mtdsplit: Add support for Mikrotik NOR firmware
Thibaut VARENE [Tue, 14 Feb 2017 13:42:10 +0000 (14:42 +0100)]
kernel: mtdsplit: Add support for Mikrotik NOR firmware

The RouterBOOT bootloader does not care where the kernel lives in the SPI
flash, all that matters is that the kernel is wrapped in the custom yaffs
container as generated by kernel2minor.

This container has a fixed signature as follows:
00000000  00 00 00 01 00 00 00 01  ff ff 6b 65 72 6e 65 6c  |..........kernel|

This patch adds mtdsplit support for identifying that signature and
triggering the search for the rootfs. rootfs is expected at EB boundary since
we use wget mtd_find_rootfs_from(). We make no use of the yaffs file size
field because it contains invalid data in the image generated by kernel2minor.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agodnsmasq: bump to dnsmasq v2.77test4
Kevin Darbyshire-Bryant [Mon, 6 Feb 2017 21:45:41 +0000 (21:45 +0000)]
dnsmasq: bump to dnsmasq v2.77test4

--bogus-priv now applies to IPv6 prefixes as specified in RFC6303 - this
is significantly friendlier to upstream servers.

CNAME fix in auth mode - A domain can only have a CNAME if it has no
other records

Drop 2 patches now included upstream.

Compile & run tested Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years agoopkg: fix handling conffiles in status lists
Jo-Philipp Wich [Wed, 22 Feb 2017 12:46:55 +0000 (13:46 +0100)]
opkg: fix handling conffiles in status lists

A missing list pointer initialization caused opkg to ignore conffile entries
from status files, breaking the conffile tracking on the target.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoRevert "kernel: ar8327/ar8337: disable ARL access code to avoid lockups (FS#384)"
Stijn Tintel [Wed, 22 Feb 2017 10:42:36 +0000 (11:42 +0100)]
Revert "kernel: ar8327/ar8337: disable ARL access code to avoid lockups (FS#384)"

This reverts commit ec1a695daa7390a6c24e3b28d3956f194cba2cb5.

Revert the workaround, the problem was properly fixed in
237454991618e0e8b7ceb8a8a2a43fca12c1a454.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agoipq806x: fix fakerootfs position
Thomas Reifferscheid [Tue, 21 Feb 2017 16:02:49 +0000 (17:02 +0100)]
ipq806x: fix fakerootfs position

The fakeroot header is expected by the netgear bootloader in the last
64 bytes of the last block used by the uImage. With the current
linux-4.9 uImage being more than 128k smaller than the linux-4.4 uImage
the bootloader was unable to locate the rootfs ih_magic and was
refusing to load and start the kernel.

Fixes: FS#542

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
7 years agobuild: skip opkg host dependency within the SDK
Felix Fietkau [Tue, 21 Feb 2017 19:43:35 +0000 (20:43 +0100)]
build: skip opkg host dependency within the SDK

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoarchs38: only calculate entry point address when necessary
Felix Fietkau [Thu, 16 Feb 2017 06:51:42 +0000 (07:51 +0100)]
archs38: only calculate entry point address when necessary

$(eval) runs even during prereq check, which can cause bogus error
messages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoarc770: only calculate entry point address when necessary
Felix Fietkau [Thu, 16 Feb 2017 06:50:55 +0000 (07:50 +0100)]
arc770: only calculate entry point address when necessary

$(eval) runs even during prereq check, which can cause bogus error
messages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoubox: update to the latest version
Felix Fietkau [Tue, 21 Feb 2017 13:13:22 +0000 (14:13 +0100)]
ubox: update to the latest version

c553354 cmake: fix typo
8973576 kmodloader: fix not being able to find some modules
fce9382 cmake: Check for getrandom system call

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agox86_64: Add support for EFI framebuffer (FS#515)
Alif M. Ahmad [Mon, 20 Feb 2017 18:58:20 +0000 (01:58 +0700)]
x86_64: Add support for EFI framebuffer (FS#515)

CONFIG_FB_EFI and CONFIG_FB_SIMPLE are needed to display console text on
EFI framebuffer.

CONFIG_FB_EFI is needed when the kernel is directly launched via EFI
shell or EFI startup.nsh script.

CONFIG_FB_SIMPLE is needed when launching the kernel via grub2 efi. In
this case, grub2 has prepared a gfxterm framebuffer and the kernel just
need to use the already prepared grub's gfxterm framebuffer to display
console text.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years agopx5g: replace px5g-standalone with a statically linked variant of px5g-mbedtls
Felix Fietkau [Tue, 21 Feb 2017 13:24:32 +0000 (14:24 +0100)]
px5g: replace px5g-standalone with a statically linked variant of px5g-mbedtls

px5g-standalone only supports SHA1 for certificates, which is strongly
deprecated. The new px5g-standalone is about 27k bigger (compressed),
and has identical behavior to px5g-mbedtls (it uses SHA256).

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agombedtls: add --function-sections and --data-sections to CFLAGS
Felix Fietkau [Tue, 21 Feb 2017 13:33:14 +0000 (14:33 +0100)]
mbedtls: add --function-sections and --data-sections to CFLAGS

This allows binaries that links these libraries statically to be reduced
by using --gc-sections on link

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobuild: move opkg host dependency from package/install to package/compile
Felix Fietkau [Mon, 20 Feb 2017 11:37:58 +0000 (12:37 +0100)]
build: move opkg host dependency from package/install to package/compile

Improves parallel build behavior, since it allows opkg to be built at
the same time as other packages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agocmake: skip build system check on compile
Felix Fietkau [Mon, 20 Feb 2017 11:13:51 +0000 (12:13 +0100)]
cmake: skip build system check on compile

cmake checks the build system and its variables on its own to detect if
the makefiles need to be regenerated.
Unfortunately this can invalidate overrides passed in the
Build/Configure step. On non-Linux systems this breaks the build when
switching between targets of the same package architecture.

Fix this by forcibly disabling the build system check and relying on the
LEDE build system to take care of these things

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobuild: allow building an individual subdir without dependencies using NO_DEPS=1
Felix Fietkau [Mon, 20 Feb 2017 11:14:32 +0000 (12:14 +0100)]
build: allow building an individual subdir without dependencies using NO_DEPS=1

QUILT=1 had the same effect, but it is sometimes useful to be able to do
this without quilt

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agoscripts/feeds: Reuse TOPDIR if defined in environment
Michal Sojka [Thu, 16 Feb 2017 22:02:50 +0000 (23:02 +0100)]
scripts/feeds: Reuse TOPDIR if defined in environment

The feeds script sets value of TOPDIR in a way that is inconsistent
with how toplevel Makefile sets it. The inconsistency manifests when I
use a "build directory" with symlinks to LEDE source (see below).

When make is invoked in such a directory, make's TOPDIR variable is
set to that directory, whereas scripts/feeds sets TOPDIR to the top of
LEDE source, which results in creating feeds directory inside the LEDE
source instead of in the build directory.

This patch changes the script so that it reuses the TOPDIR value form
the environment if it exists. The result is that 'make
package/symlinks' correctly fetches feeds to the build directory
instead in the source.

I use the following commands to create the build directory:

    ln -s $SRC/config config
    ln -s $SRC/Config.in Config.in
    ln -s $SRC/feeds.conf.default feeds.conf.default
    ln -s $SRC/include include
    ln -s $SRC/Makefile Makefile
    mkdir package
    ln -s $SRC/package/base-files package/base-files
    ln -s $SRC/package/boot package/boot
    ln -s $SRC/package/devel package/devel
    ln -s $SRC/package/firmware package/firmware
    ln -s $SRC/package/kernel package/kernel
    ln -s $SRC/package/libs package/libs
    ln -s $SRC/package/Makefile package/Makefile
    ln -s $SRC/package/network package/network
    ln -s $SRC/package/system package/system
    ln -s $SRC/package/utils package/utils
    ln -s $SRC/rules.mk rules.mk
    ln -s $SRC/scripts scripts
    ln -s $SRC/target target
    ln -s $SRC/toolchain toolchain
    ln -s $SRC/tools tools

This allows me to easily test changes in LEDE on multiple targets.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
7 years agoopkg: re-enable usign support
Jo-Philipp Wich [Mon, 20 Feb 2017 14:03:33 +0000 (15:03 +0100)]
opkg: re-enable usign support

The switch to cmake caused the -DHAVE_USIGN flag to get lost, disabling
compilation of the correspondinf support code.

Update to latest Git head which enables usign support by default.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoRevert "px5g-standalone: provide px5g via PROVIDES"
Stijn Tintel [Mon, 20 Feb 2017 14:11:40 +0000 (15:11 +0100)]
Revert "px5g-standalone: provide px5g via PROVIDES"

This reverts commit cc66f819b4e778732a32f08f5dc39a2554682b73.

This commit causes opkg to install px5g-standalone instead of px5g when
installing luci-ssl. As luci-ssl depends on mbedtls, using
px5g-standalone makes no sense. Next to that, it creates deprecated SHA1
certificates. Revert the commit to avoid pxg5-standalone to be
installed by accident.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agolibubox: fix host build on macOS
Felix Fietkau [Mon, 20 Feb 2017 11:32:45 +0000 (12:32 +0100)]
libubox: fix host build on macOS

Use the defaults instead of a custom non-portable Host/Install section

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agobcm53xx: add kernel 4.9 config
Rafał Miłecki [Mon, 20 Feb 2017 13:12:15 +0000 (14:12 +0100)]
bcm53xx: add kernel 4.9 config

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 years agohostapd: fix feature indication
Jo-Philipp Wich [Sun, 19 Feb 2017 21:04:16 +0000 (22:04 +0100)]
hostapd: fix feature indication

 - Fix eap test to work with standalone hostapd builds
 - Fix 11n test to check the correct define
 - Add 11ac, 11r and 11w tests

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agodnsmasq: bump to dnsmasq v2.77test3
Kevin Darbyshire-Bryant [Mon, 6 Feb 2017 21:45:41 +0000 (21:45 +0000)]
dnsmasq: bump to dnsmasq v2.77test3

New test release (since test1) includes 2 LEDE patches that are
upstream and may be dropped, along with many spelling fixes.

Add forthcoming 2017 root zone trust anchor to trust-anchors.conf.

Backport 2 patches that just missed test3:

Reduce logspam of those domains handled locally 'local addresses only'
Implement RFC-6842 (Client-ids in DHCP replies)

Compile & run tested Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years agoar71xx: fix vlan settings for some boards
Weijie Gao [Sat, 18 Feb 2017 14:32:49 +0000 (22:32 +0800)]
ar71xx: fix vlan settings for some boards

For AR71XX devices, GMAC1 always connects port 0 of the built-in switch,
as the CPU port.

This patch sets correct vlan for some devices with wrong settings:
a) mark port 0 as CPU port, tagged
b) reverse port order, marking these ports untagged

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
7 years agoar71xx: Add more boards to the routerboard serial detection patch
Thibaut VARENE [Sun, 19 Feb 2017 16:19:08 +0000 (17:19 +0100)]
ar71xx: Add more boards to the routerboard serial detection patch

This patch enables serial console on the 435 series and the 953gs.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
7 years agokernel: add Chinese codepages
Hsing-Wang Liao [Sat, 18 Feb 2017 06:40:58 +0000 (14:40 +0800)]
kernel: add Chinese codepages

Signed-off-by: Hsing-Wang Liao <kuoruan@gmail.com>
7 years agouboot-omap: Update to u-boot v2017.01
Alexandru Gagniuc [Wed, 1 Feb 2017 19:21:24 +0000 (11:21 -0800)]
uboot-omap: Update to u-boot v2017.01

Specifying USE_PRIVATE_LIBGCC is no longer needed, as it is the
default.

Patch 001 is removed, since it was already merged upstream. Patches
100 and 101 are removed because they do not appear to be needed
anymore, and they do not conform with the sign-off and commit message
procedures.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
7 years agouboot-omap: Do not hide bootloader packages
Alexandru Gagniuc [Sat, 26 Nov 2016 00:52:41 +0000 (16:52 -0800)]
uboot-omap: Do not hide bootloader packages

Because they were hidden, there was no way to disable the uboot
targets in menuconfig, so they had to be built every time. The omap
target is the only one to hide uboot packages. To be consistent with
the other targets, and have more control over the build, un-hide the
u-boot packages.

Note that the default behavior remains unchanged, as uboot will be
built unless explicitly disabled.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
7 years agoar71xx: add support for TL-WR802N Version 2
Thomas Roberts [Mon, 13 Feb 2017 17:29:34 +0000 (17:29 +0000)]
ar71xx: add support for TL-WR802N Version 2

This patch adds support for the TP-Link TL-WR802N Version 2.

Specification:
- SoC: Qualcomm Atheros QCA9533 (560 MHz, MIPS 24Kc)
- RAM: 32 MiB
- Storage: 4 MiB of FLash on board
- Wireless: Built into QCA9533 (Honey Bee), PHY modes b/g/n
- Ethernet: 1x100M (port0)

Installation through OEM Web Interface:
- Connect to TL-WR802N by Ethernet or Wi-Fi
- Go to http://192.168.0.1 (default user is "admin" & password is "admin)
- Go to "System Tools -> Firmware Upgrade"
- Browse for firmware "*.factory-us.bin" or  "*.factory-eu.bin" for eu model
- Click upgrade

Installation through tftp:
Note: T_OUT, T_IN and GND on the board must be connected to USB TTL
      Serial Configuration 115200 8n1

- Boot the TL-WR802N
- When "Autobooting in 1 seconds" appears type "tpl" followed by enter
- Connect to the board Ethernet port
    (IPADDR: 192.168.1.1, ServerIP: 192.168.1.10)
- tftpboot 0x80000000 <Firmware Image Name>
- Record the result of "printenv bootcmd"
- Enter "erase <Result of 'printenv bootcmd'> +0x3c0000"
    (e.g erase 0x9f020000 +0x3c0000)
- Enter "cp.b 0x80000000 <Result of 'printenv bootcmd'> 0x3c0000"
    (e.g cp.b 0x80000000 0x9f020000 0x3c0000)
- Enter "bootm <Result of 'printenv bootcmd'>"
    (e.g bootm 0x9f020000)

Signed-off-by: Thomas Roberts <tom.p.roberts@gmail.com>
7 years agosdk: emit proper tag references for base URLs
Jo-Philipp Wich [Sun, 19 Feb 2017 19:45:11 +0000 (20:45 +0100)]
sdk: emit proper tag references for base URLs

Properly resolve symbolic tag names when constructing the base feed Git url
and avoid emitting "HEAD" references when building from detached commits.

Fixes #495, #501.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agoopkg: switch to own fork to improve memory usage
Jo-Philipp Wich [Thu, 16 Feb 2017 16:36:47 +0000 (17:36 +0100)]
opkg: switch to own fork to improve memory usage

Switch to our own fork of opkg to significantly reduce the required amount
of memory when updating lists or installing packages.

Preliminary tests showed a usage drop of about 90% during these operations,
from ~3.7MB with unmodified opkg to ~360KB with our custom fork.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agolibubox: add host build
Jo-Philipp Wich [Fri, 17 Feb 2017 09:49:14 +0000 (10:49 +0100)]
libubox: add host build

Our opkg fork requires libubox to build, so add a host build for it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agofirewall3: update to Git head to support xtables API level > 11
Jo-Philipp Wich [Sun, 19 Feb 2017 18:04:09 +0000 (19:04 +0100)]
firewall3: update to Git head to support xtables API level > 11

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years agogen-dependencies.sh: fix handling variations in "file" output
Felix Fietkau [Sun, 19 Feb 2017 14:28:01 +0000 (15:28 +0100)]
gen-dependencies.sh: fix handling variations in "file" output

On some systems, file adds ", with debug info" after "not stripped"

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agorstrip.sh: fix handling variations in "file" output
Felix Fietkau [Sun, 19 Feb 2017 13:02:38 +0000 (14:02 +0100)]
rstrip.sh: fix handling variations in "file" output

On some systems, file adds ", with debug info" after "not stripped"

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agolantiq: fix warning if ltq_atm modules are missing
Mathias Kresin [Fri, 17 Feb 2017 22:29:46 +0000 (23:29 +0100)]
lantiq: fix warning if ltq_atm modules are missing

Fixes the following warning on first boot if the ltq_atm modules are
not included in the image:

  ls: /lib/modules/4.4.49/ltq_atm*: No such file or directory

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: set the internet led interface according to wan interface
Mathias Kresin [Fri, 17 Feb 2017 21:16:01 +0000 (22:16 +0100)]
lantiq: set the internet led interface according to wan interface

Use the nas0 interface for the netdev trigger as default. Use the ptm0
interface for xRX200 boards to match the default wan interface set in
02_network.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: introduce lantiq_is_vdsl_system
Mathias Kresin [Fri, 17 Feb 2017 21:04:12 +0000 (22:04 +0100)]
lantiq: introduce lantiq_is_vdsl_system

Move the code to check if the current system is a system with vdsl
support to a dedicate function to make it reusable.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years agolantiq: fix ARV7519RW22 switch port indexing
Mathias Kresin [Thu, 2 Feb 2017 23:59:16 +0000 (00:59 +0100)]
lantiq: fix ARV7519RW22 switch port indexing

Fixes FS#454.

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