Commit graph

36956 commits

Author SHA1 Message Date
Huan Truong
fd62fa752b ar71xx: Add support for Netgear WNR2000v1
This patch adds supports for the WNR2000v1 board with 4MB flash, and
produces device-specific factory, rootfs, and sysupgrade files for the
WNR2000v1. This board is errorneously claimed as supported on the OpenWRT
wiki as AP81, but AP81 image would not work because of APT81 image
requiring having 8MB of flash, while WNR2000v1 has only 4MB.

The image requires the u-boot bootloader to be modified to fuhry's
bootloader first.

Short specification:

- CPU: Atheros AR9132
- 4x 10/100 Mbps Ethernet, 1x WAN 10/100 Mbps
- 4 MB of Flash
- 32 MB of RAM
- UART header (J1) on board
- 1x button

Factory/Initial flash instructions:

- Set up a TFTP server on your local machine.
- Download the uImage for ar71xx-generic and the rootfs image for
  ar71xx-generic-wnr2000 and save in the tftp server root.
- Gain serial access to the router via the UART port (telnetenable over
  the network only won't work!).
- Upgrade the u-boot bootloader to fuhry's version by running the
  script: http://fuhry.com/b/wnr2000/install-repart.sh
- When the router restarts, interrupt u-boot and gain access to u-boot command line.
- Repartititon the board and flash initial uImage and rootfs as follow.

Commands to type in u-boot:

	# tells u-boot that we have a tftp server on 192.168.1.10
	setenv serverip 192.168.1.10

	# tells u-boot that the router should take the address 192.168.1.1
	setenv ipaddr 192.168.1.1

	# erase the region from 0x050000-0x3f0000
	erase 0xbf050000 +0x3A0000

	# loads sqfs.bin on TFTP server, and put it to memory address 0x81000000
	tftpboot 0x81000000 sqfs.bin
	# it will tell you the length of sqfs.bin in hex, let's say ZZZZZZ
	# copy bit by bit 0xZZZZZZ bytes from offset 0x050000
	cp.b 0x81000000 0xbf050000 0xZZZZZZ

	# same to the uImage.bin, write it right next to sqfs.bin
	# again, 0xYYYYYY is the length that tftpboot reports
	tftpboot 0x81000000 uImage.bin
	cp.b 0x81000000 0xbf2a0000 0xYYYYYY

	# We need to tell the kernel what board it is booting into, and where to find the partitions
	setenv bootargs "board=WNR2000 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,3712k(firmware),64k(art)ro rootfstype=squashfs,jffs2 noinitrd"

	# Tell u-boot where to find the uImage
	setenv bootcmd "bootm 0xbf2a0000"

	# Tell u-boot to save parameters to the u-boot-env partitions
	saveenv

	# Reset the board
	reset

Tested on:

- WNR2000v1 board.
- Initial flash works.

Known bugs:

- I don't know why factory image doesn't work on initial flash on stock
  firmware in u-boot recovery mode while it should.
- Sysupgrade does not yet work, if you do -f it will mess up your
  installation (requiring a reinstall of sqfs and uImage).

Signed-off-by: Huan Truong <htruong@tnhh.net>
2016-12-14 10:37:01 +01:00
Jing Lin
c9a9f9b8ce ar71xx: Add ath10k-firmware-qca988x for DomyWifi DW33D
The default package selection was missing the correct FW for ath10k to
work.

Signed-off-by: Jing Lin <mumuqz@163.com>
2016-12-14 10:37:01 +01:00
Jo-Philipp Wich
b22a20af45 procd: add support for service signals
Update procd to latest HEAD in order to introduce support for services signals:

- Adds a new service.signal ubus call to send a kill() signal to one or all
  running instances of a given service

- Adds a new "reload_signal" property which allows service init scripts to
  request procd to send a specific kill() signal on reload, instead of
  stopping and restarting running processes

Also fixes some potential memory leaks reported by cppcheck and an environment
variable corruption in the trace command.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-12-14 01:14:08 +01:00
Jo-Philipp Wich
e2f8d200f5 netfilter: drop proprietary xt_id match
The xt_id match was used by the firewall3 package to track its own rules but
the approach has been changed to use xt_comment instead now, so we can drop
this nonstandard extension.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-12-14 01:05:06 +01:00
Jo-Philipp Wich
2daab45cae firewall3: drop support for automatic NOTRACK rules
Update to current HEAD in order to drop automatic generation of per-zone
NOTRACK rules.

The NOTRACK rules used to provide a little performance improvement but the
later introduction of the netfilter conntrack cache made those rules largely
unnecessary. Additionally, those rules caused various issues which broke
stateful firewalling in some scenarios.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-12-14 01:05:06 +01:00
Hauke Mehrtens
a6781ef4c1 kernel: kmod-hwmon-tmp102: add dependency to kmod-thermal
Depend on the kmod-thermal package when it is activated, this fixes
compile problems on some targets.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-12-14 00:15:33 +01:00
Hans Dedecker
a7c2310278 odhcpd: Fix dnsmasq re-reading hostfile
Depending on the dhcp uci config pidof dnsmasq can return
multiple pids. Fix re-reading of the hostfile by dnsmasq in
such case by sending SIGHUP signal to each of the returned
pids.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-12-13 23:32:57 +01:00
Hans Dedecker
942904f7b9 dnsmasq: Specify directory /tmp/hosts as argument for --addn-hosts
Let dnsmasq read all hosts files in /tmp/hosts directory by specifying
/tmp/hosts as argument of --addn-host

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2016-12-13 23:32:20 +01:00
Felix Fietkau
66482e179b ath10k: fix DMA allocation issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-13 12:44:57 +01:00
Felix Fietkau
57f7f91f0c mac80211: refresh all patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-13 12:34:13 +01:00
Felix Fietkau
4872c36c55 ath9k: add a RCU related bugfix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-13 12:34:12 +01:00
Felix Fietkau
1b9a39c528 download.mk: improve download tarball reproducibility
Store only numeric user/group id. Group 0 is 'root' on linux and 'wheel' on
BSD and Mac OS X.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-13 12:16:26 +01:00
Felix Fietkau
19d3b78304 download.mk: remove code duplication in $(TAR) call
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-13 12:16:26 +01:00
Felix Fietkau
dbbfd41118 download.mk: use $(error) instead of a regular shell error
Useful for further rework

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-13 12:16:25 +01:00
Rafał Miłecki
d6ef917bdb kernel: backport ubifs support for dirty_writeback_interval
These patches were queued for 4.10. For possible use cases see added:
[PATCH] ubifs: Use dirty_writeback_interval value for wbuf timer

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-12-13 09:40:46 +01:00
Rafał Miłecki
2ca4c74279 bcm53xx: backport missed BCM53573 ILP patch from 4.10
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-12-13 09:26:27 +01:00
Kevin Darbyshire-Bryant
f5b833b8fe kernel: bump to 4.4.38
Bump & refresh patches for all 4.4 supported targets.

Compile & run tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-12-13 08:28:28 +01:00
Rafał Miłecki
1feb166ee7 bcm53xx: backport DTS patches accepted for 4.11
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-12-13 07:52:57 +01:00
Kevin Darbyshire-Bryant
88f8c8d7eb iproute2: support latest cake & restore DSCP washing
Support new packet overhead passing paradigm in cake qdisc, also restore
DSCP wash/nowash keywords.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-12-12 16:42:06 +01:00
Kevin Darbyshire-Bryant
1f0ff783f0 kmod-sched-cake: update & restore DSCP washing
Track upstream changes, incl changes in packet overhead accounting
(automatically taking care of linux' packet sizing knowledge),
improvements to triple isolated DRR handling (new flow dominance),
statistics tweak & allow more packet drops in stressed conditions.

Under tests this has significantly improved latency control under
'many flows to one' scenarious as is typical of bittorrent and MS
Windows update.

I also restored 'DSCP washing' functionality in my repo which follows
upstream closely (like a hawk!) with tc keywords 'wash/nowash'.  This
allows cake to limit/control packets in bands determined by a packet's
DSCP but to clear those DSCP bits on qdisc egress.  This functionality
was originally removed as part of an attempt to push cake into the
kernel, which hasn't actually happened as yet.

A matching commit is required to iproute2/tc to support the new overhead
handling, keyword changes as well as the 'wash/nowash' tweak.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-12-12 16:42:06 +01:00
Matthias Schiffer
d1a2c3f9b1
firmware-utils: tplink-safeloader: update support lists for CPE210/510/...
Adds support for new EU and US variants; removes a few strings that were
never actually used and have been removed from the stock firmwares.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-12-12 13:46:58 +01:00
Matthias Schiffer
fcf54f79d2
ar71xx: simplify model detection for TP-Link Pharos devices
This also makes the detection more flexible, as it doesn't need to check
for each model explicitly.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-12-12 13:45:37 +01:00
Felix Fietkau
b305b8c386 mt76: update to the latest version, fixes dfs issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:54:47 +01:00
Felix Fietkau
b9ddf3098b tcpdump: reduce size of -mini by removing more infrequently used protocols
This removes:
- BGP
- CDP
- SCTP

MIPS binary .ipk size is reduced from ~150k to ~130k

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:20 +01:00
p-wassi
a4a00d794f net/utils/tcpdump: update to 4.8.1
Update tcpdump to upstream release 4.8.1

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
2016-12-12 10:22:19 +01:00
Felix Fietkau
64590f3c7e mbedtls: tune config to reduce size and improve performance
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:19 +01:00
Felix Fietkau
732c24a0ca mbedtls: sync with polarssl config
One of those changes is re-enabling blowfish support to make
openvpn-mbedtls compatible with common configurations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:19 +01:00
Magnus Kroken
a456dd96e7 openvpn: quote parameters to --push in openvpn config file
OpenVPN requires arguments to --push to be enclosed in double quotes.
One set of quotes is stripped when the UCI config is parsed.
Change append_params() of openvpn.init to enclose push parameters in
double quotes.

Unquoted push parameters do not cause errors in OpenVPN 2.3,
but OpenVPN 2.4 fails to start with unquoted push parameters.

Fixes: FS#290.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
2016-12-12 10:22:19 +01:00
Magnus Kroken
4b8c69258e mbedtls: enable MBEDTLS_DHM_C
This option is required by OpenVPN, and OpenVPN 2.4 uses mbedTLS 2.x.
DHM_C is also already enabled in the PolarSSL 1.3.x config.h.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
2016-12-12 10:22:19 +01:00
Felix Fietkau
8f23ec609c ar71xx: remove obsolete flash chip locking code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:19 +01:00
Felix Fietkau
a5923cd549 ar71xx: remove PB92 reference design board support
Due to flash size limitations, support for this board has not been
functional for years

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:18 +01:00
Felix Fietkau
30285facbe ar71xx: remove AP113 reference design board support
Due to flash size limitations, support for this board has not been
functional for years

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:18 +01:00
Felix Fietkau
4c8a9b8e39 ar71xx: remove AP81 reference design board support
This board is very old and unlikely to still be relevant today.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:18 +01:00
Felix Fietkau
fd95dec2e3 ar71xx: remove obsolete duplicate driver source file
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:18 +01:00
Felix Fietkau
441ee62931 ar71xx: remove AP83 reference design board support
This board is very old and unlikely to still be relevant today. Support
for it contains a significant amount of device specific baggage which is
worth getting rid of.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:18 +01:00
Felix Fietkau
fa04682f21 ar71xx: clean up spi controller related patches
Remove various hacks for fast read, un-break device tree support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-12 10:22:17 +01:00
Rafał Miłecki
52c7375c13 bcm53xx: disable CONFIG_FW_LOADER_USER_HELPER_FALLBACK
There are many targets using user space scripts to generate firmware but
bcm53xx doesn't need this, so let's disable that kernel option.

This lets us avoid some scary-looking kernel warnings like:
brcmfmac 0001:04:00.0: Falling back to user helper
firmware brcm!brcmfmac43602-pcie.txt: firmware_loading_store: map pages failed

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-12-12 09:57:40 +01:00
Martin Blumenstingl
6b94234a65 lantiq: remove "init" kernel command line parameter from bootargs
/etc/preinit has been the default init-script for a very long time (at
least since Linux 2.6.30 in OpenWrt). Remove the kernel command line
"init" parameter to get rid of duplicate and inconsistent definitions
of this parameter (some boards, like FRITZ3370 for example did not use
it at all, while it's just copy and paste on others).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-12-12 09:57:40 +01:00
Martin Blumenstingl
4995c64857 lantiq: specify console using stdout-path instead of cmdline argument
Use devicetree's /chosen/stdout-path instead of the kernel command line
(embedded in the .dts-files) to specify the serial console. Using the
chosen node is recommended on devicetree based platforms.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-12-12 09:57:40 +01:00
Piotr Dymacz
c40477519e uboot-envtools: add support for YunCore SR3200 and XD3200
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2016-12-12 09:57:40 +01:00
Piotr Dymacz
c198ca682c ar71xx: add support for YunCore SR3200 and XD3200
YunCore SR3200 is a dual-band AC1200 router, based on Qualcomm/Atheros
QCA9563+QCA9882+QCA8337N.

YunCore XD3200 (FCC ID: 2ADUG-XD3200) is a dual-band AC1200 ceiling mount
AP with PoE support, based on Qualcomm/Atheros QCA9563+QCA9882+QCA8334.

Common specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 128 MB or RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 2T2R 2.4 GHz, with ext. PA (SKY65174-21), up to 30 dBm
- 2T2R 5 GHz, with ext. PA (SKY85405-11) and LNA (SKY85601-11), up to 30 dBm

SR3200 specification:

- 5x 10/100/1000 Mbps Ethernet
- 6x ext. RP-SMA antennas (actually, only 4 are connected with radio chips)
- 3x LED (+ 5x LED in RJ45 sockets), 1x button
- UART header on PCB

XD3200 specification:

- 2x 10/100/1000 Mbps Ethernet, with 802.3at PoE support (WAN port)
- 4x internal antennas
- 3 sets of LEDs on external PCB (+ 2x LED near RJ45 sockets), 1x button
- UART and JTAG (custom 6-pin, 2 mm pitch) headers on PCB

LED for 5 GHz WLAN is currently not supported on both devices as it is
connected directly to the QCA9882 radio chip.

Flash instruction under vendor firmware, using telnet/SSH:

1. If your firmware does not have root password, go to point 5
2. Connect PC with 192.168.1.x address to LAN or WAN port
3. Power up device, enter failsafe mode with button (no LED indicator!)
4. Change root password and reboot (mount_root, passwd ..., reboot -f)
5. Upload lede-ar71xx-...-sysupgrade.bin to /tmp using SCP
6. Connect PC with 192.168.188.x address to LAN port, SSH to 192.168.188.253
7. Invoke:
- cd /tmp
- fw_setenv bootcmd "bootm 0x9fe80000 || bootm 0x9f050000"
- mtd -e firmware -r write lede-ar71xx-...-sysupgrade.bin firmware

Flash instruction under U-Boot, using UART:

1. tftp 0x80060000 lede-ar71xx-...-sysupgrade.bin
2. erase 0x9f050000 +$filesize
3. cp.b $fileaddr 0x9f050000 $filesize
4. setenv bootcmd "bootm 0x9fe80000 || bootm 0x9f050000"
5. saveenv && reset

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2016-12-12 09:57:40 +01:00
Christian Schoenebeck
6ae71708c9 ca-certificates: update to version 20161130
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-12-12 09:57:40 +01:00
Yutang Jiang
ad907e1c03 layerscape: add 64b/32b target for ls1046ardb device
Add support for NXP layerscape ls1046ardb 64b/32b Dev board.

LS1046ARDB Specification:
-------------------------
Memory subsystem:
* 8GByte DDR4 SDRAM (64bit bus)
* 512 Mbyte NAND flash
* Two 64 Mbyte high-speed SPI flash
* SD connector to interface with the SD memory card
* On-board 4G eMMC
Ethernet:
* Two XFI 10G ports
* Two SGMII ports
* Two RGMII ports
PCIe:
* PCIe1 (SerDes2 Lane0) to miniPCIe slot
* PCIe2 (SerDes2 Lane1) to x2 PCIe slot
* PCIe3 (SerDes2 Lane2) to x4 PCIe slot

* USB 3.0: one super speed USB 3.0 type A port, one Micro-AB port
* UART: supports two UARTs up to 115200 bps for console

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
2016-12-12 09:57:40 +01:00
Yutang Jiang
76fa771a78 layerscape: fman-ucode: prefer github over git.freescale.com
In order to prevent the impact of the merger of the company and the potential
rebase of the SDK repositories, migrate the u-boot source to github.

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
2016-12-12 09:57:40 +01:00
Yutang Jiang
d5fc7430ca layerscape: uboot-layerscape: prefer github over git.freescale.com
In order to prevent the impact of the merger of the company and the potential
rebase of the SDK repositories, migrate the u-boot source to github.

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
2016-12-12 09:57:40 +01:00
Julian Labus
b0ac825884 base-files: Changed UCI variable name for GPIO value from 'default' to 'value'
This changes the UCI variable for the GPIO value from system.$cfg.default back
to system.$cfg.value as it was before the change from uci-defaults [1] to board.d.
/etc/init.d/gpio_switch [2] still expects the value to be in system.$cfg.value.

[1] d65916047b/package/base-files/files/lib/functions/uci-defaults.sh (L197)
[2] https://github.com/lede-project/source/blob/master/package/base-files/files/etc/init.d/gpio_switch#L17

Signed-off-by: Julian Labus <julian@labus-online.de>
2016-12-12 09:57:40 +01:00
Hauke Mehrtens
7c47f43fe6 lantiq: falcon: remove bootargs-append
This attribute is not evaluated any more and the boot loader on these
reference boards does not provide a broken root= or console= parameter.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-12-10 16:08:06 +01:00
Hauke Mehrtens
4dbdba36f8 kernel: add TI tmp102 and tmp103 temperature sensors
This just adds the kmods for these kernel modules.
This is found on some Lantiq / Intel reference boards.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-12-10 16:06:40 +01:00
Hauke Mehrtens
c058f4f22d kernel: add KERNEL_DEBUG_PINCTRL and KERNEL_DEBUG_GPIO
This makes it possible to activate the gpio and the pinctl debugging
from LEDE menuconfig.

Acked-by: John Crispin <john@phrozen.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-12-10 16:06:34 +01:00
Jo-Philipp Wich
9791fb2ac2 build: support adding version code to file names (FS#323)
Now that the VERSION_NUMBER variable holds the human friendly name and not
the commit ID anymore, we need to support adding the revision ID as well.

Introduce a new config variable CONFIG_VERSION_CODE_FILENAMES which, if set,
causes the resulting file names to contain a commit ID designation as printed
by scripts/getver.sh.

Also sanitize the input variables to ensure that the resulting strings are
lowercased and no not contain spaces.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-12-09 17:16:43 +01:00