Tony Ambardar [Thu, 8 Mar 2018 05:00:45 +0000 (21:00 -0800)]
base-files: fix UCI config parsing and callback handling
There are several long-standing issues present in the UCI shell API as
documented in https://wiki.openwrt.org/doc/devel/config-scripting. They
relate both to high-level, user-defined callback functions used to
process UCI config files, and also to low-level functions used within
scripts generally.
The related problems have been encountered now and in the past, e.g.
https://forum.openwrt.org/viewtopic.php?id=54295, and include:
a) UCI parsing option() function and user-defined option_cb() callbacks
being erroneously called during processing of "list" config file entries;
b) normal usage of the low-level config_set() unexpectedy calling any
defined option_cb() if present; and
c) handling of the list_cb() not respecting the NO_CALLBACK variable.
Root causes include a function stack "inversion", where the low-level
config_set() function incorrectly calls the high-level option() function,
intended only for processing the "option" keyword of UCI config files.
This change addresses the inversion and other issues, making the option
handling code more consistent and smaller, and simplifying developers'
usage of UCI callbacks.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
Christian Lamparter [Sat, 14 Jul 2018 15:21:55 +0000 (17:21 +0200)]
apm821xx: fix usb-otg on 4.14
Starting with 4.14, the "amcc,dwc-otg" needs to be used
in order to get the usb-otg to work.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit
12b80f1cabf0a7995637fc9b0831b3e9f881f9e6)
Hans Dedecker [Sun, 15 Jul 2018 19:53:25 +0000 (21:53 +0200)]
odhcp6c: add noserverunicast config option for broken DHCPv6 servers
Fix broken DHCPv6 servers which provide the server unicast option but
do not reply on DHCPv6 renew messages directed to the IPv6 address
contained in the server unicast option which results in broken IPv6
connectivity.
67ae6a7 odhcp6c: add option to ignore Server Unicast option
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Wed, 20 Jun 2018 13:34:18 +0000 (15:34 +0200)]
odhcp6c: update to latest git HEAD
b99c1f6 odhcp6c: remove len check in option parsing handle
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Mon, 11 Jun 2018 13:44:50 +0000 (15:44 +0200)]
odhcp6c: user string option support
ca8822b odhcp6c: add support for user string options
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
David Bauer [Tue, 12 Jun 2018 23:37:55 +0000 (01:37 +0200)]
ipq40xx: add get_status_led to diag.sh
This commit adds the get_status_led method to diag.sh, which sets the
boot-led as status-led for scripts using this method to get a
status-led.
This method is used platform-independent in downstream project gluon to
set the LED used to indicate the config-mode.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
4fc005197a320ff728544eba8028f7a9f23e1868)
Jo-Philipp Wich [Sun, 15 Jul 2018 15:54:39 +0000 (17:54 +0200)]
OpenWrt v18.06.0-rc2: revert to branch defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich [Sun, 15 Jul 2018 15:54:33 +0000 (17:54 +0200)]
OpenWrt v18.06.0-rc2: adjust config defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich [Mon, 2 Jul 2018 06:58:38 +0000 (08:58 +0200)]
uhttpd: update to latest Git head
db86175 lua: honour size argument in recv() function
d3b9560 utils: add uh_htmlescape() helper
8109b95 file: escape strings in HTML output
393b59e proc: expose HTTP Origin header in process environment
796d42b client: flush buffered SSL output when tearing down client ustream
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit
b54bef205846e2b30da23c1316c4a9b941c5078d)
Matthias Schiffer [Sat, 14 Jul 2018 13:44:47 +0000 (15:44 +0200)]
include/prereq-build.mk: explicitly check for -f flag when using busybox time
On Debian, busybox does have a time applet, but it does not support the -f
flag. Catch this in prereq check to give users to proper error message.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit
b123921a92a957f08abb186e041aa38aa9328f3e)
Matthias Schiffer [Sat, 14 Jul 2018 11:07:34 +0000 (13:07 +0200)]
include/kernel-build.mk: fix kernel rebuild on backport patch changes
An incorrect variable name was referenced in KERNEL_FILE_DEPENDS, leading
to the omission of the backport-* patch dirs in the generation of the
prepared stamp name.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit
36fa1bbf6f510e57098edab3932015dc747bbd49)
Felix Fietkau [Sat, 14 Jul 2018 09:38:28 +0000 (11:38 +0200)]
kernel: backport page fragment API changes from 4.10+ to 4.9
mt76 now relies on this API
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Kevin Darbyshire-Bryant [Mon, 2 Jul 2018 17:27:02 +0000 (18:27 +0100)]
kernel: gen_stats: Fix netlink stats dumping in the presence of padding
Backport hot off the press upstream netlink patch. Fixes stats display
from CAKE qdisc on MIPS allowing us to bump CAKE to latest version.
The gen_stats facility will add a header for the toplevel nlattr of type
TCA_STATS2 that contains all stats added by qdisc callbacks. A reference
to this header is stored in the gnet_dump struct, and when all the
per-qdisc callbacks have finished adding their stats, the length of the
containing header will be adjusted to the right value.
However, on architectures that need padding (i.e., that don't set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS), the padding nlattr is added
before the stats, which means that the stored pointer will point to the
padding, and so when the header is fixed up, the result is just a very
big padding nlattr. Because most qdiscs also supply the legacy TCA_STATS
struct, this problem has been mostly invisible, but we exposed it with
the netlink attribute-based statistics in CAKE.
Fix the issue by fixing up the stored pointer if it points to a padding
nlattr.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit
3698b34a00d623f87a41179e656b8e89d0bb7267)
Felix Fietkau [Wed, 11 Jul 2018 18:56:42 +0000 (20:56 +0200)]
ramips: clean up and fix MT7621 NAND driver issues
- remove misaligned custom buffer allocation in the NAND driver
- remove broken bounce buffer implementation for 16-byte align
Let the MTD core take care of both
Fixes messages like these:
[ 102.820541] Data buffer not 16 bytes aligned:
87daf08c
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Fri, 13 Jul 2018 14:36:39 +0000 (16:36 +0200)]
mt76: update to the latest version
08719b1 mt76: use a per rx queue page fragment cache
4d2c565 mt76x2: reset HW before probe
f622975 mt76x2: fix CCK protection control frame rate
6780375 mt76x2: add frame protection support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Thu, 12 Jul 2018 15:19:07 +0000 (17:19 +0200)]
ramips: ethernet: use own page_frag_cache
Using the NAPI or netdev frag cache along with other drivers can lead to
32 KiB pages being held for a long time, despite only being used for
very few page fragment.
This can happen if the ethernet driver grabs one or two fragments for rx
ring refill, while other drivers use (and free up) the remaining
fragments. The 32 KiB higher-order page can only be freed once all users
have freed their fragments, which only happens after the rings of all
drivers holding the fragments have wrapped around.
Depending on the traffic patterns, this can waste a lot of memory and
look a lot like a memory leak
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Thu, 12 Jul 2018 15:18:37 +0000 (17:18 +0200)]
ramips: ethernet: use skb_free_frag to free fragments
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Matthias Schiffer [Mon, 9 Jul 2018 22:00:01 +0000 (00:00 +0200)]
include/feeds.mk: rework generation of opkg distfeeds.conf
Allow enabling/commenting/disabling each feed individually by using a
tristate config symbol.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit
16035a7dd370671670693af9ae63368ee4dd731f)
Matthias Schiffer [Mon, 9 Jul 2018 21:50:28 +0000 (23:50 +0200)]
base-files: fix feed list in PKG_CONFIG_DEPENDS
FEEDS_ENABLED and FEEDS_DISABLED are derived from FEEDS_AVAILABLE, not
FEEDS_INSTALLED.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit
6dac434c0011524b9ac01725727faa1a19ea4a48)
Matthias Schiffer [Mon, 9 Jul 2018 20:13:19 +0000 (22:13 +0200)]
include/feeds.mk: always add available feeds to PACKAGE_SUBDIRS
Setting CONFIG_FEED_... symbols combined two different effects: Disabling
a feed in the generated opkg distfeeds.conf, and omitting the feed from
PACKAGE_SUBDIRS.
It does not make sense to omit built feeds from PACKAGE_SUBDIRS, as it will
only lead to packages that can be enabled in .config (and that will
consequently be built) not to be found during rootfs creation, breaking
the build. All feeds that packages are emitted to should simply always be
added to PACKAGE_SUBDIRS instead; the CONFIG_FEED_... only configure the
generated distfeeds.conf like this.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit
9af22f1ac9122b54700dd38f627fdd446e1109f4)
Matthias Schiffer [Mon, 9 Jul 2018 20:00:27 +0000 (22:00 +0200)]
scripts/feeds: add src-dummy method
The src-dummy method does not actually obtain any feed, but it can be used
to insert addtional entries into the opkg distfeeds.conf. This is useful to
make package feeds available to users without requiring the corresponding
source feeds to be available during build.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit
6bdd5d8459cca7ceb93c841cccf61dc7ce830092)
Peter Lundkvist [Mon, 9 Jul 2018 10:54:18 +0000 (12:54 +0200)]
ramips: TP-Link TL-WR902AC v3: add missing wps button
Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
Peter Lundkvist [Mon, 9 Jul 2018 10:54:17 +0000 (12:54 +0200)]
ramips: TP-Link TL-WR902AC v3: don't build factory image
The line that produces factory image was accidentally left by me while
testing before inital commit.
I came to the conclusion that flashing from OEM firmware does not work
(seems to share this behavior with other tplinks based on mt7628).
I have not done any further analysis, as I was unable to open the
case and attach a serial port (too much glue). Maybe i will try once
more.
So the way to do initial flashing (or un-bricking) is to use the
tftp-recover image. It is possible to revert to OEM firmware with tftp
recovery; in this case the first 512 bytes the image file need to be
cut off.
Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
[add explaination provided via mail as commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
Koen Vandeputte [Wed, 11 Jul 2018 12:58:36 +0000 (14:58 +0200)]
kernel: bump 4.14 to 4.14.54 for 18.06
Refreshed all patches
Reworked patches to match upstream:
335-v4.16-netfilter-nf_tables-add-single-table-list-for-all-fa.patch
Compile-tested on: cns3xxx, imx6, x86_64
Runtime-tested on: cns3xxx, imx6, x86_64
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Koen Vandeputte [Wed, 11 Jul 2018 12:57:00 +0000 (14:57 +0200)]
kernel: bump 4.9 to 4.9.111 for 18.06
Refreshed all patches
Compile-tested on: ar71xx
Runtime-tested on: ar71xx
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Koen Vandeputte [Mon, 2 Jul 2018 08:23:44 +0000 (10:23 +0200)]
mac80211: Expose support for ath9k Dynack
Enables support for Dynack feature.
When a remote station is far away, we need to compensate for the distance
by allowing more time for an ACK to arrive back before issueing a retransmission.
Currently, it needs to be set fixed to indicate the maximum distance the remote
station will ever be.
While this mostly works for static antennae, it introduces 2 issues:
- If the actual distance is less, speed is reduced due to a lot of wates wait-time
- If the distance becomes greater, retries start to occur and comms can get lost.
Allowing to set it dynamically using dynack ensures the best possible tradeoff
between speed vs distance.
This feature is currently only supported in ath9k.
it is also disabled by default.
Enabling it can be done in 2 ways:
- issue cmd: iw phy0 set distance auto
- sending the NL80211_ATTR_WIPHY_DYN_ACK flag to mac80211 driver using netlink
Disabling it can be done by providing a valid fixed value.
To give an idea of a practical example:
In my usecase, we have mesh wifi device installed on ships/platforms.
Currently, the coverage class is set at 12000m fixed.
When a vessel moved closer (ex. 1500m), the measured link capacity was a lot
lower compared to setting the coverage class fixed to 1500m
Dynack completely solved this, nearly providing double the bandwidth at closer range
compared to the fixed setting of 12000m being used.
Also when a vessel sailed to a distance greater than the fixed setting,
communication was lost as the ACK's never arrived within the max allowed timeframe.
Actual distance: 6010m
iperf 60s run avg
Fixed 12150m: 31 Mbit/s
Dynack: 58 Mbit/s
Fixed 6300m: 51 Mbit/s
Dynack: 59 Mbit/s
Fixed 3000m: 13 Mbit/s (lots of retries)
Dynack: 58 Mbit/s
Actual distance: 1504m
iperf 60s run avg
Fixed 12150m: 31 Mbit/s
Dynack: 86 Mbit/s
Fixed 6300m: 55 Mbit/s
Dynack: 87 Mbit/s
Fixed 3000m: 67 Mbit/s
Dynack: 87 Mbit/s
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Rafał Miłecki [Tue, 10 Jul 2018 12:02:00 +0000 (14:02 +0200)]
kernel: bcm47xxpart: fix getting user-space data partition name
Partition name is picked by a parser_trx_data_part_name(). It has to
get correct partition offset (taking care of bad blocks) to work
properly.
This fixes UBI support for devices that have kernel flashed on partition
with a bad block.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
7ddba08d873a0ce6d2d32b8f6a1bea550107ca44)
Sven Eckelmann [Wed, 6 Jun 2018 09:21:53 +0000 (11:21 +0200)]
mac80211: initialize sinfo in cfg80211_get_station
Most of the implementations behind cfg80211_get_station will not initialize
sinfo to zero before manipulating it. For example, the member "filled",
which indicates the filled in parts of this struct, is often only modified
by enabling certain bits in the bitfield while keeping the remaining bits
in their original state. A caller without a preinitialized sinfo.filled can
then no longer decide which parts of sinfo were filled in by
cfg80211_get_station (or actually the underlying implementations).
cfg80211_get_station must therefore take care that sinfo is initialized to
zero. Otherwise, the caller may tries to read information which was not
filled in and which must therefore also be considered uninitialized. In
batadv_v_elp_get_throughput's case, an invalid "random" expected throughput
may be stored for this neighbor and thus the B.A.T.M.A.N V algorithm may
switch to non-optimal neighbors for certain destinations.
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
(cherry picked from commit
87493dac11f3c7bbbc1fed9aef1cf9ff62053ab0)
Sven Eckelmann [Thu, 30 Nov 2017 13:30:06 +0000 (14:30 +0100)]
ath10k-ct: search DT for BDF variant info
Board Data File (BDF) is loaded upon driver boot-up procedure. The right
board data file is identified on QCA4019 using bus, bmi-chip-id and
bmi-board-id.
The problem, however, can occur when the (default) board data file cannot
fulfill the vendor requirements and it is necessary to use a different
board data file.
This problem was solved for SMBIOS by adding a special SMBIOS type 0xF8.
Something similar has to be provided for systems without SMBIOS but with
device trees. No solution was specified by QCA and therefore a new one has
to be found for ath10k.
The device tree requires addition strings to define the variant name
wifi@
a000000 {
status = "okay";
qcom,ath10k-calibration-variant = "RT-AC58U";
};
wifi@
a800000 {
status = "okay";
qcom,ath10k-calibration-variant = "RT-AC58U";
};
This would create the boarddata identifiers for the board-2.bin search
* bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=RT-AC58U
* bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=RT-AC58U
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
(cherry picked from commit
1c01e02575bd2af96741ba79ed12004fdfb15544)
Kevin Darbyshire-Bryant [Tue, 26 Jun 2018 18:28:34 +0000 (19:28 +0100)]
wireguard: bump to 0.0.
20180625
dfd9827 version: bump snapshot
88729f0 wg-quick: android: prevent outgoing handshake packets from being dropped
1bb9daf compat: more robust ktime backport
68441fb global: use fast boottime instead of normal boottime
d0bd6dc global: use ktime boottime instead of jiffies
18822b8 tools: fix misspelling of strchrnul in comment
0f8718b manpages: eliminate whitespace at the end of the line
590c410 global: fix a few typos
bb76804 simd: add missing header
7e88174 poly1305: give linker the correct constant data section size
fd8dfd3 main: test poly1305 before chacha20poly1305
c754c59 receive: don't toggle bh
Compile-tested-for: ath79 Archer C7 v2
Run-tested-on: ath79 Archer C7 v2
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit
3ce11588f6346ebedde68ef30a06e01999e292bb)
Kevin Darbyshire-Bryant [Sat, 7 Jul 2018 10:05:52 +0000 (11:05 +0100)]
kmod-sched-cake: bump to latest
20180706
Fixes a potential infinite loop bug when in unlimited (ie not using
built in shaper) mode.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit
4bd4ece9eafbcde62d1e6efc4cf820f05906dd28)
Kevin Darbyshire-Bryant [Mon, 21 May 2018 19:29:41 +0000 (20:29 +0100)]
kmod-sched-cake: bump to latest cake
This bumps to the latest & possibly greatest cake, sadly it's still
inedible but from an SQM point of view quite tasty :-)
Main tweaks since previous bump, improved ack_filter, some extra stats,
support for 64bit netlink parameters (higher rates/byte counters)
0520a6c Fix NAT option handling
8da93e1 Make sure we always call qdisc_watchdog_init() in cake_init()
f65daf6 Fix mismatched parenthesis
51d4ab3 Change flag handling to be safe even when mixing with non-eligible ACKs
f2ea091 ack_filter: protect DCTCP with stricter filtering of ECE marks
28b4560 ACK filter: Handle wrapping sequence numbers and DSACKs
73f62d9 Use the right PAD attribute for options
5969c14 Use 32 for tin backlog
e289f31 Move all the u64 netlink attributes together
36180a0 Check ACK seqno before parsing SACKs
91bbc01 Merge branch 'mine' into cobalt
58c55ec Rework SACK check to compare the ranges of two SACKs
9a5d593 ack_filter: Add proper handling of SACKs
eca95d4 ack_filter: short-circuit TCP flag check
d50a246 compat: backport some ktime functions
7b7ad11 compat: define tcpopt_fastopen for pre-4.1 kernels
ca54cdb Fix ktime compare
9d7dcc0 ack filter: Parse TCP options and only drop safe ones
b119882 Return EOPNOTSUPP on NAT option if conntrack is not available
842d7f0 Don't try to pad stats with tin_stats padding
bd46dc2 Use 64-bit divide helper
8e41bf0 Make sure we never drop SACKs when filtering ACKs
66e5d60 Avoid comparing ktime_t to scalar values
7fab017 Actually commit the ktime_t changes
fca6d13 Switch to ktime_t and get rid of cobalt.h
6f7e5af Can't use do_div with 64-bit divisors
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit
abeae38dbbe8b7fda10ad36fb5db57ed16c93479)
Kevin Darbyshire-Bryant [Fri, 18 May 2018 19:57:44 +0000 (20:57 +0100)]
iproute2: tc: update support for cake
Bump iproute2/tc support of cake.
Add support for cake's change to u64 attribute passing for certain
attributes (rate & byte counts)
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit
a2165f936e94ed71dff5fdbf0fbc58c88fb17158)
Aleksandr V. Piskunov [Sun, 1 Jul 2018 13:40:37 +0000 (16:40 +0300)]
ipq806x: fix numbering for Netgear R7800 LAN ports
Netgear R7800 switch LAN ports are numbered backwards in LuCI,
i.e. numbering is not corresponding to the actual physical port labels,
patch fixes that.
Signed-off-by: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
[merged with existing board using the same config]
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Mathias Kresin [Thu, 28 Jun 2018 18:28:19 +0000 (20:28 +0200)]
lantiq: backport stp-xway get callback implementation
To keep the status of a LED connected to the stp during boot, the get
callback is required. If the callback is missing and the LED default
state is set to keep in the devicetree, the gpio led driver errors out
during load.
Fixes: FS#1620
Signed-off-by: Mathias Kresin <dev@kresin.me>
Felix Fietkau [Mon, 2 Jul 2018 12:23:19 +0000 (14:23 +0200)]
build: fix target metadata scan dependencies
Move SCAN_DEPS to scan.mk to eliminate redundancy with scripts/feeds
Add image/*.mk to SCAN_DEPS for targets to pick up newly added devices
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Mon, 2 Jul 2018 12:19:42 +0000 (14:19 +0200)]
build: ensure that iwinfo is selected when building for multiple devices
extra_packages needs to be added there, like on profiles and target
packages lists
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Tue, 19 Jun 2018 08:06:50 +0000 (10:06 +0200)]
ramips: limit dictionary size for lzma compression
In some cases, recent builds fail to boot from flash with at least some
MT7621 based devices. The error message is:
"LZMA ERROR 1 - must RESET board to recover"
Booting the same kernel via TFTP works for some reason.
Through testing I figured out that limiting the LZMA dictionary size
seems to prevent these errors
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Stijn Segers [Fri, 29 Jun 2018 20:29:06 +0000 (22:29 +0200)]
kernel: bump 4.14 to 4.14.52 for 18.06
Compile-tested on: ramips/mt7621, x86/64.
Run-tested on: ramips/mt7621.
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Stijn Segers [Fri, 29 Jun 2018 20:29:05 +0000 (22:29 +0200)]
kernel: bump 4.9 to 4.9.110 for 18.06
Compile-tested on ar71xx.
Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Andrey Jr. Melnikov [Wed, 27 Jun 2018 17:32:23 +0000 (20:32 +0300)]
ramips: move mt7620n i2c_pins definition to right place
Move to i2c pins pinmux node to the pinctrl node.
Fixes: a0685deec458 ("ramips: Add i2c support for mt7620n")
Signed-off-by: Andrey Jr. Melnikov <temnota.am@gmail.com>
[fix commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
Hannu Nyman [Wed, 27 Jun 2018 18:52:45 +0000 (21:52 +0300)]
ipq806x: remove "firmware" partition definition from netgear routers
Remove the "firmware" partition definition from the DTS of R7800
to fix sysupgrade.
Commit
4645a6d3 defined CONFIG_MTD_SPLIT_UIMAGE_FW=y for ipq806x
and that causes mtd to misbehave as additional kernel and ubi
partitions are detected from inside the "firmware" partition.
[ 1.111324] 0x000001480000-0x000001880000 : "kernel"
[ 1.121005] 0x000001880000-0x000007900000 : "ubi"
[ 1.283912] 0x000007900000-0x000008000000 : "reserve"
[ 1.296407] 0x000001480000-0x000007900000 : "firmware"
[ 1.468043] no rootfs found after FIT image in "firmware"
[ 2.426860] 2 uimage-fw partitions found on MTD device firmware
[ 2.426931] 0x000001480000-0x000001880000 : "kernel"
[ 2.440420] 0x000001880000-0x000007900000 : "ubi"
Both kernel and ubi are already defined in DTS, so this duplication
leads into errors in sysupgrade:
Writing from <stdin> to kernel ...
ubiattach: error!: strtoul: unable to parse the number '6 mtd10'
ubiattach: error!: bad MTD device number: "6 mtd10"
The partition is defined to same area as kernel+ubi, and is not
needed for sysupgrade anymore. Remove it to fix things.
Only tested for the R7800 but all of them should behave equal.
Fixes: FS#1617
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
[squashed commits, add "tested on" note]
Signed-off-by: Mathias Kresin <dev@kresin.me>
Hannu Nyman [Sun, 3 Jun 2018 13:33:15 +0000 (16:33 +0300)]
ipq806x: Enlarge R7800 flash - use netgear partition
Increase the available flash memory size in Netgear R7800
by taking into the use the unused "netgear" partition
that is located after the firmware partition.
Available flash space for kernel+rootfs+overlay increases
by 68 MB from 32 MB to 100 MB.
In a typical build, overlay space increases from 15 to 85,
increasing the package installation possibilities greatly.
Reverting to the OEM firmware is still possible, as the OEM
firmware contains logic to initialise the "netgear" partition
if its contents do not match expectations. In OEM firmware,
"netgear" contains 6 UBI sub-partitions that are defined in
/etc/netgear.cfg and initialisation is done by /etc/preinit
Tested with Openwrt master r7093-
4fdc6ca31b and OEM V1.0.2.52
Reference to forum discussion in Netgear R7800 exploration thread:
https://forum.lede-project.org/t/netgear-r7800-exploration-ipq8065-qca9984/285/1118
(messages 1118-1158)
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
INAGAKI Hiroshi [Wed, 27 Jun 2018 05:51:25 +0000 (14:51 +0900)]
ramips: add switch port index for I-O DATA WN-GX300GR
WN-GX300GR has 5x RJ45 ports (port 0-4), and these ports are
orderd on the device as follows:
4 3 2 1 0
1-4: lan
0: wan
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Alberto Bursi [Tue, 26 Jun 2018 19:48:09 +0000 (21:48 +0200)]
uboot-kirkwood: fix malformed boot configuration
With current uboot default configuration the bootloader will
fail to start the OpenWrt firmware with the following error:
-----
unexpected character 'b' at the end of partition
Error initializing mtdparts!
incorrect device type in ubi
Partition ubi not found!
Error, no UBI device/partition selected!
Wrong Image Format for bootm command
Error occured, error code = 112
-----
If the uboot configuration is examined with printenv
I can see that mdtparts line (on a nsa310) is wrong:
-----
mtdparts=mtdparts=orion_nand:0x0c0000(uboot),
0x80000(uboot_env),0x7ec0000(ubi)bootargs_root=
----
The "bootargs_root=" that was appended to it should not be there.
Fix the issue by adding a \0 line terminator at the end of affected lines,
mimicking what is also done by uboot upstream.
This issue was detected and confirmed on a nsa310, nsa325 and
a pogoplug v4, but it's not hardware-specific, so apply the same fix
to other devices as well.
Note that the issue is with the uboot's integrated boot configuration,
which is not used unless the uboot configuration in flash is unavailable
(erased or corrupted), which happens only on first time installation,
or if the user deletes the uboot configuration when upgrading uboot.
People just upgrading from an older uboot without erasing their previous
uboot configuration stored in flash would not have noticed this issue.
Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
John Crispin [Tue, 26 Jun 2018 14:00:33 +0000 (16:00 +0200)]
mac80211: make rtl8xxxu build again
we only wanted to drop rtl8xxxue support
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit
d8981133b27e7deebc79dc5fc51beb06b3b0a221)
John Crispin [Tue, 26 Jun 2018 13:39:38 +0000 (15:39 +0200)]
mac80211: rtl8xxxu: drop support patches
After a very enlightening but unfortunately far too short exchange with Jes
we mutually agreed to drop the patches. They are unfortunately not ready
yet.
Acked-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit
66c5696cdf9599ccef652a651f52c0f7f53da44a)
Sven Roederer [Tue, 12 Jun 2018 20:48:39 +0000 (22:48 +0200)]
base-files: fix links in banner.failsafe
Update the link to the current section in the documentaion wiki.
This fixes https://github.com/openwrt/packages/issues/6282
Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
Matthias Schiffer [Sun, 24 Jun 2018 15:20:43 +0000 (17:20 +0200)]
musl: sys/socket.h: fix SO_PEERSEC value on MIPS
Differing from all other archs supported by musl, MIPS defines SO_PEERSEC
to 30 instead of 31.
Patch has also been submitted upstream.
Reported-by: Andrey Jr. Mlenikov <temnota.am@gmail.com>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit
4b50854a60fce73aa83b50c445ea93970322d442)
Adrian Schmutzler [Fri, 19 Jan 2018 13:45:42 +0000 (14:45 +0100)]
ar71xx: Add support for TP-Link CPE210 v2
This PR adds support for a popular low-cost 2.4GHz N based AP
Specifications:
- SoC: Qualcomm Atheros QCA9533 (650MHz)
- RAM: 64MB
- Storage: 8 MB SPI NOR
- Wireless: 2.4GHz N based built into SoC 2x2
- Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN
Installation:
Flash factory image through stock firmware WEB UI
or through TFTP
To get to TFTP recovery just hold reset button while powering on for
around 4-5 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP adress:192.168.0.254
Notes:
TP-Link does not use bootstrap registers so without this patch reference
clock detects as 40MHz while it is actually 25MHz.
This is due to messed up bootstrap resistor configuration on the PCB.
Provided GPL code just forces 25MHz reference clock.
That causes booting with completely wrong clocks, for example, CPU tries
to boot at 1040MHz while the stock is 650MHz.
So this PR depends on PR #672 to remove 40MHz reference clock.
Thanks to Sven Eckelmann <sven@narfation.org> for properly patching that.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit
5c5bf8b8658a588423f6ec445d7ef6a36f99a396)
Adrian Schmutzler [Fri, 19 Jan 2018 11:58:40 +0000 (12:58 +0100)]
ar71xx: Add TP-Link Pharos v2 board detection
Add support for detecting TP-Link Pharos v2 boards.
They use different format in product-info partition than v1 boards.
Code was written mostly by Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit
2524febf7927a1bf430d64b7790feb126023e3d1)
Rafał Miłecki [Mon, 18 Jun 2018 05:32:34 +0000 (07:32 +0200)]
mac80211: backport brcmfmac changes from kernel 4.18
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
c446e38c862201dd4d6a4fb8ea6e49172980952d)
Rafał Miłecki [Mon, 18 Jun 2018 05:09:14 +0000 (07:09 +0200)]
mac80211: backport brcmfmac firmware & clm_blob loading rework
It backports remaining brcmfmac changes from 4.17.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
7e8eb7f309a802ba10a13ddb807c6a31fecc9183)
Rafał Miłecki [Sun, 17 Jun 2018 20:46:35 +0000 (22:46 +0200)]
mac80211: backport brcmfmac data structure rework
It backports brcmfmac commits from kernel 4.17.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
3c8bb92655c68a07abf5358ef23eb98422ed8d6d)
Rafał Miłecki [Sun, 17 Jun 2018 20:46:29 +0000 (22:46 +0200)]
mac80211: backport "brcmfmac: cleanup and some rework" from 4.17
It was described by Arend as:
> This series is intended for 4.17 and includes following:
>
> * rework bus layer attach code.
> * remove duplicate variable declaration.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
0da9303e5b444e2c98c24719c48c09f4c976c5a7)
Rafał Miłecki [Sun, 17 Jun 2018 20:39:20 +0000 (22:39 +0200)]
bcm53xx: fix NAND partitions on D-Link DIR-885L
This fixes missing rootfs on above device:
[ 2.652292] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
(...)
[ 2.687909] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Fixes: 05cb6aa69f66 ("bcm53xx: replace linux,part-probe with a proper partitions subnode")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit
e53d0da775082ee5d1d18949b00850590cf81650)
Jo-Philipp Wich [Fri, 22 Jun 2018 11:45:03 +0000 (13:45 +0200)]
build: change version.mk defaults to OpenWrt
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit
333e609703ff40a272b8f8832a8af682826fb572)
Jo-Philipp Wich [Fri, 22 Jun 2018 10:30:02 +0000 (12:30 +0200)]
OpenWrt v18.06.0-rc1: revert to branch defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich [Fri, 22 Jun 2018 10:30:02 +0000 (12:30 +0200)]
OpenWrt v18.06.0-rc1: adjust config defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich [Fri, 22 Jun 2018 10:22:30 +0000 (12:22 +0200)]
Revert "LEDE v18.06.0-rc1: adjust config defaults"
This reverts commit
97b1765a45499ecc56db44f79453d3c6040bb5e7.
The tree is in an inconsistent state and we need to complete some rebranding.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich [Fri, 22 Jun 2018 10:21:46 +0000 (12:21 +0200)]
Revert "LEDE v18.06.0-rc1: revert to branch defaults"
This reverts commit
55df39e684f8fde90c52212350062440dc6c9754.
The tree is in an inconsistent state and we need to complete some rebranding.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich [Fri, 22 Jun 2018 10:12:13 +0000 (12:12 +0200)]
LEDE v18.06.0-rc1: revert to branch defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich [Fri, 22 Jun 2018 10:12:09 +0000 (12:12 +0200)]
LEDE v18.06.0-rc1: adjust config defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
John Crispin [Fri, 22 Jun 2018 09:46:21 +0000 (11:46 +0200)]
iptables: set nonshared flag
this makes sure that offloading support is properly included for v4.14 targets.
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit
ebe1216c7cd10357c3277fb25bae4e508d4b165a)
Chen Minqiang [Sun, 29 Apr 2018 06:15:59 +0000 (14:15 +0800)]
kernel: cleanup offload hooks on netdev unregister
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit
e317bb06fdfb46cf0c6496e3db4eb020ea28b656)
John Crispin [Fri, 22 Jun 2018 08:51:22 +0000 (10:51 +0200)]
mac80211: fix up ath10k led patch
Signed-off-by: John Crispin <john@phrozen.org>
John Crispin [Fri, 22 Jun 2018 07:43:56 +0000 (09:43 +0200)]
mac80211: drop 355-ath9k-limit-retries-for-powersave-response-frames.patch
several people reported this bug to be causing drop out issues
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit
cac1a4be66f548735878beccc10dc4b1ec7ad364)
Ansuel Smith [Sun, 17 Jun 2018 20:35:42 +0000 (22:35 +0200)]
mac80211: ath10k fix vht160 firmware crash
When the 160mhz width is selected the ath10k firmware crash. This fix this problem.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit
134e832814f1986c7ee06ac00806ebb6e762fd15)
Ansuel Smith [Sun, 17 Jun 2018 20:36:46 +0000 (22:36 +0200)]
mac80211: ath10k add leds support
This adds support for leds handled by the wireless chipset.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit
61d57a2f88b90ba951012e66c7c6fae9234c97b4)
David Thornley [Fri, 22 Jun 2018 06:25:22 +0000 (16:25 +1000)]
wwan: Add support for Gemalto Cinterion cellular modules
Includes specific support for PH8(1e2d-0053) / ELS61(1e2d-005b) modules.
Note for ELS61, the serial driver changes from serial option(ttyUSB) to usb-cdc (ttyACM).
Two additional fixes in this commit resolve issues with ttyACM devices: -
* wwan.sh - sys-fs has a subdirectory indirection (*/tty/ttyACMx) which was not handled properly
* wwan.usb - dependent scripts were not included, so this never actually called proto_set_available for example (and relied on inadvertent call for ttyUSB case)
Signed-off-by: David Thornley <david.thornley@touchstargroup.com>
(cherry picked from commit
cb262b09396edd171eb3903e50ce5ddeb593f963)
Hans Dedecker [Thu, 21 Jun 2018 20:26:18 +0000 (22:26 +0200)]
busybox: udhcpc: replace udhcpc_no_msg_dontroute patch by upstream fix
Replace 204-udhcpc_no_msg_dontroute patch by the upstream busybox fix
which removes the code which requires the server ID to be on local
network
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Thu, 21 Jun 2018 20:09:12 +0000 (22:09 +0200)]
kernel: backport fix for missing tunnel encapsulation limit option
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Mathias Kresin [Thu, 21 Jun 2018 18:45:53 +0000 (20:45 +0200)]
lantiq: fix arcadyan vg3503j switch port indexing
Both version of the vg3503j have the LAN1 labelled port connected to
switch port 4 and the LAN2 labelled port connected to switch port 2.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Chuanhong Guo [Wed, 20 Jun 2018 16:56:38 +0000 (00:56 +0800)]
ramips: Add support for Phicomm K2G
Specification:
- SoC: MediaTek MT7620A
- Flash: 8 MB
- RAM: 64 MB
- Ethernet: 4 FE ports and 1 GE port (RTL8211F on port 5)
- Wireless radio: MT7620 for 2.4G and MT7612E for 5G, both equipped with external PA.
- UART: 1 x UART on PCB - 57600 8N1
Flash instruction:
The U-boot is based on Ralink SDK so we can flash the firmware using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put the firmware into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press 2, follow the instruction to
set device and tftp server IP address and input the firmware
file name. U-boot will then load the firmware and write it into
the flash.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Hans Dedecker [Thu, 21 Jun 2018 19:40:48 +0000 (21:40 +0200)]
Revert "base-files: fix UCI config parsing and callback handling"
This reverts commit
023944853241920c20842c0f4649d1dd4e7e273b as users
report Qos scripts are broken (FS#1602)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Felix Fietkau [Mon, 18 Jun 2018 10:35:49 +0000 (12:35 +0200)]
mt76: update to the latest version
072fdac mt76x2: mac: consider multicast/broadcast frames in ewma rssi estimation
f450659 mt76x2: improve gain adjustment in noisy environments
1d4ca10 mt76x2: track rssi for gain adjustment per station
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Arvid E. Picciani [Mon, 16 Apr 2018 11:18:37 +0000 (13:18 +0200)]
ar71xx: add support for TP-LINK Archer C7 v5
TP-Link Archer C7 v5 is a dual-band AC1750 router, based on Qualcomm/Atheros
QCA9563+QCA9880.
Specification:
- 750/400/250 MHz (CPU/DDR/AHB
- 128 MB of RAM (DDR2)
- 16 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 3T3R 5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 10x LED, 2x button
- UART header on PCB
Flash instruction:
1. Upload lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin via Web interface
Flash instruction using TFTP recovery:
1. Set PC to fixed ip address 192.168.0.66
2. Download lede-ar71xx-generic-archer-c7-v5-squashfs-factory.bin
and rename it to ArcherC7v5_tp_recovery.bin
3. Start a tftp server with the file tp_recovery.bin in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.
Signed-off-by: Arvid E. Picciani <aep@exys.org>
(cherry picked from commit
bf39d5594b3c8f9409e6d9408a1f370c9f18d0dd)
David Bauer [Sat, 26 May 2018 16:19:53 +0000 (18:19 +0200)]
ar71xx: add support for Fritz!WLAN Repeater 450E
This commit adds support for the AVM Fritz!WLAN Repeater 450E
SOC: Qualcomm QCA9556 (Scorpion) 560MHz MIPS74Kc
RAM: 64MB Zentel A3R12E40CBF DDR2
FLASH: 16MiB Winbond W25Q128 SPI NOR
WLAN1: QCA9556 2.4 GHz 802.11b/g/n 3x3
INPUT: WPS button
LED: Power, WiFi, LAN, RSSI indicator
Serial: Header Next to Black metal shield
Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V)
The Serial setting is 115200-8-N-1.
Tested and working:
- Ethernet
- 2.4GHz WiFi (correct MAC)
- Installation via EVA bootloader
- OpenWRT sysupgrade
- Buttons
- Most LEDs
Not working:
- 2 RSSI LEDs
AVM used for RSSI{0,1} two of the Ethernet PHYs LEDs which they
control over MDIO. Our driver doesn't expose these LEDs as GPIOs.
While it is possible to implement this feature, it would require an
additional kernel patch for a minor functionality.
Installation via EVA:
In the first seconds after Power is connected, the bootloader will
listen for FTP connections on 192.168.178.1. Firmware can be uploaded
like following:
ftp> quote USER adam2
ftp> quote PASS adam2
ftp> binary
ftp> debug
ftp> passive
ftp> quote MEDIA FLSH
ftp> put openwrt-sysupgrade.bin mtd1
Note that this procedure might take up to two minutes.
You need to powercycle the Device afterwards to boot OpenWRT.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
b4bf43c66767648f98494dd5f44e1301024b577c)
Magnus Frühling [Mon, 11 Jun 2018 21:10:43 +0000 (23:10 +0200)]
ipq40xx: add support for ZyXEL WRE6606
Specifications:
SOC: Qualcomm IPQ4018 (DAKOTA) ARM Quad-Core
RAM: 128 MB Nanya NT5CC64M16GP-DI
FLASH: 16 MiB Macronix MX25L12845EMI-12G
ETH: Qualcomm QCA8072
WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11n/ac W2 2x2
INPUT: WPS, Mode-toggle-switch
LED: Power, WLAN 2.4GHz, WLAN 5GHz, LAN, WPS
(LAN not controllable by software)
(WLAN each green / red)
SERIAL: Header next to eth-phy.
VCC, TX, GND, RX (Square hole is VCC)
The Serial setting is 115200-8-N-1.
Tested and working:
- Ethernet (Correct MAC-address)
- 2.4 GHz WiFi (Correct MAC-address)
- 5 GHz WiFi (Correct MAC-address)
- Factory installation from tftp
- OpenWRT sysupgrade
- LEDs
- WPS Button
Not Working:
- Mode-toggle-switch
Install via TFTP:
Connect to the devices serial. Hit Enter-Key in bootloader to stop
autobooting. Command `tftpboot` will pull an initramfs image named
`
C0A86302.img` from a tftp server at `192.168.99.08/24`.
After successfull transfer, boot the image with `bootm`.
To persistently write the firmware, flash an openwrt sysupgrade image
from inside the initramfs, for example transfer
via `scp <sysupgrade> root@192.168.1.1:/tmp` and flash on the device
with `sysupgrade -n /tmp/<sysupgrade>`.
append-cmdline patch taken from chunkeeys work on the NBG6617.
Signed-off-by: Magnus Frühling <skorpy@frankfurt.ccc.de>
Co-authored-by: David Bauer <mail@david-bauer.net>
Co-authored-by: Christian Lamparter <chunkeey@googlemail.com>
(cherry picked from commit
4b280ad91a6b155ac71c417aaa7bb5f4e328712f)
David Bauer [Tue, 29 May 2018 15:00:53 +0000 (17:00 +0200)]
ar71xx: add support for OCEDO Koala
This commit adds support for the OCEDO Koala
SOC: Qualcomm QCA9558 (Scorpion)
RAM: 128MB
FLASH: 16MiB
WLAN1: QCA9558 2.4 GHz 802.11bgn 3x3
WLAN2: QCA9880 5 GHz 802.11nac 3x3
INPUT: RESET button
LED: Power, LAN, WiFi 2.4, WiFi 5, SYS
Serial: Header Next to Black metal shield
Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V)
The Serial setting is 115200-8-N-1.
Tested and working:
- Ethernet
- 2.4 GHz WiFi
- 5 GHz WiFi
- TFTP boot from ramdisk image
- Installation via ramdisk image
- OpenWRT sysupgrade
- Buttons
- LEDs
Installation seems to be possible only through booting an OpenWRT
ramdisk image.
Hold down the reset button while powering on the device. It will load a
ramdisk image named 'koala-uImage-initramfs-lzma.bin' from 192.168.100.8.
Note: depending on the present software, the device might also try to
pull a file called 'koala-uimage-factory'. Only the name differs, it
is still used as a ramdisk image.
Wait for the ramdisk image to boot. OpenWRT can be written to the flash
via sysupgrade or mtd.
Due to the flip-flop bootloader which we not (yet) support, you need to
set the partition the bootloader is selecting. It is possible from the
initramfs image with
> fw_setenv bootcmd run bootcmd_1
Afterwards you can reboot the device.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
e36f8b3f3980903d5cefc51fe274c19c7a0719f2)
David Bauer [Tue, 8 May 2018 18:59:05 +0000 (20:59 +0200)]
ar71xx: fix incorrect speed setting on QCA9556
The QCA9556 only has a SGMII interface. However the speed on the
ethernet link is set for the non-existant xMII interface.
This commit fixes this behavior.
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit
abb4ab076f37961a4dcaef4e87167b834f84e44e)
Tobias Schramm [Fri, 4 May 2018 01:47:23 +0000 (03:47 +0200)]
ramips: Add support for Mikrotik RouterBOARD RBM33g
This commit adds support for the Mikrotik RouterBOARD RBM33g.
=Hardware=
The RBM33g is a mt7621 based device featuring three gigabit ports, 2
miniPCIe slots with sim card sockets, 1 M.2 slot, 1 USB 3.0 port and a male
onboard RS-232 serial port. Additionally there are a lot of accessible
GPIO ports and additional buses like i2c, mdio, spi and uart.
==Switch==
The three Ethernet ports are all connected to the internal switch of the
mt7621 SoC:
port 0: Ethernet Port next to barrel jack with PoE printed on it
port 1: Innermost Ethernet Port on opposite side of RS-232 port
port 2: Outermost Ethernet Port on opposite side of RS-232 port
port 6: CPU
==Flash==
The device has two spi flash chips. The first flash chips is rather small
(512 kB), connected to CS0 by default and contains only the RouterBOOT
bootloader and some factory information (e.g. mac address).
The second chip has a size of 16 MB, is by default connected to CS1 and
contains the firmware image.
==PCIe==
The board features three PCIe-enabled slots. Two of them are miniPCIe
slots (PCIe0, PCIe1) and one is a M.2 (Key M) slot (PCIe2).
Each of the miniPCIe slots is connected to a dedicated mini SIM socket
on the back of the board.
Power to all three PCIe-enabled slots is controlled via GPIOs on the
mt7621 SoC:
PCIe0: GPIO9
PCIe1: GPIO10
PCIe2: GPIO11
==USB==
The board has one external USB 3.0 port at the rear. Additionally PCIe
port 0 has a permanently enabled USB interface. PCIe slot 1 shares its
USB interface with the rear USB port. Thus only either the rear USB port
or the USB interface of PCIe slot 1 can be active at the same time. The
jumper next to the rear USB port controls which one is active:
open: USB on PCIe 1 is active
closed: USB on rear USB port is active
==Power==
The board can accept both, passive PoE and external power via a 2.1 mm
barrel jack. The input voltage range is 11-32 V.
=Installation=
==Prerequisites==
A USB -> RS-232 Adapter and a null modem cable are required for
installation.
To install an OpenWRT image to the device two components must be built:
1. A openwrt initramfs image
2. A openwrt sysupgrade image
===initramfs & sysupgrade image===
Select target devices "Mikrotik RBM33G" in
openwrt menuconfig and build the images. This will create the images
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" and
"openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" in the output
directory.
==Installing==
**Make sure to back up your RouterOS license in case you do ever want to
go back to RouterOS using "/system license output" and back up the created
license file.**
Serial settings: 115200 8N1
The installation is a two-step process. First the
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" must be booted
via tftp:
1. Set up a dhcp server that points the bootfile to tftp server serving
the "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin"
initramfs image
2. Connect to WAN port (left side, next to sys-LED and power indicator)
3. Connect to serial port of board
4. Power on board and enter RouterBOOT setup menu
5. Set boot device to "boot over ethernet"
6. Set boot protocol to "dhcp protocol" (can be omitted if DHCP server
allows dynamic bootp)
6. Save config
7. Wait for board to boot via Ethernet
On the serial port you should now be presented with the OpenWRT boot log.
The next steps will install OpenWRT persistently.
1. Copy "openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin" to the device
using scp.
2. Write openwrt to flash using "sysupgrade
openwrt-ramips-mt7621-mikrotik_rbm33g-squashfs-sysupgrade.bin"
Once the flashing completes reboot the router and let it boot from flash.
It should boot straight to OpenWRT.
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
Tobias Schramm [Thu, 3 May 2018 16:44:27 +0000 (18:44 +0200)]
ramips: Add lzma-loader targets
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
Tobias Schramm [Thu, 3 May 2018 14:27:10 +0000 (16:27 +0200)]
ramips: Add support for mt7621 to lzma-loader
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
Deng Qingfang [Wed, 20 Jun 2018 17:34:51 +0000 (01:34 +0800)]
ramips: fix Newifi D1 mtd partition
Newifi D1 has 32 MiB flash, so the firmware partition size should be 0x1fb0000
Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Kevin Darbyshire-Bryant [Wed, 20 Jun 2018 19:59:42 +0000 (19:59 +0000)]
wireguard: bump to 0.0.
20180620
0bc4230 version: bump snapshot
ed04799 poly1305: add missing string.h header
cbd4e34 compat: use stabler lkml links
caa718c ratelimiter: do not allow concurrent init and uninit
894ddae ratelimiter: mitigate reference underflow
0a8a62c receive: drop handshake packets if rng is not initialized
cad9e52 noise: wait for crng before taking locks
83c0690 netlink: maintain static_identity lock over entire private key update
0913f1c noise: take locks for ss precomputation
073f31a qemu: bump default kernel
bec4c48 wg-quick: android: don't forget to free compiled regexes
7ce2ef3 wg-quick: android: disable roaming to v6 networks when v4 is specified
9132be4 dns-hatchet: apply resolv.conf's selinux context to new resolv.conf
41a5747 simd: no need to restore fpu state when no preemption
6d7f0b0 simd: encapsulate fpu amortization into nice functions
f8b57d5 queueing: re-enable preemption periodically to lower latency
b7b193f queueing: remove useless spinlocks on sc
5bb62fe tools: getentropy requires 10.12
4e9f120 chacha20poly1305: use slow crypto on -rt kernels on arm too
Compiled-for: ar71xx, lantiq
Run-tested-on: ar71xx Archer C7 v2 & lantiq HH5a
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Hans Dedecker [Wed, 20 Jun 2018 11:21:28 +0000 (13:21 +0200)]
dnsmasq: fix dnsmasq startup issue
Commit
ecd954d530 installs specific interface triggers which rewrites the dnsmasq config
file and restarts dnsmasq if the network interface becomes active for which a trigger
has been installed.
In case no dhcp sections are specified or ignore is set to 1 dnsmasq will not be started
at startup which breaks DNS resolving.
Fix this by ditching the BOOT check in start_service and always start dnsmasq at startup.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
INAGAKI Hiroshi [Fri, 15 Jun 2018 15:27:51 +0000 (00:27 +0900)]
ramips: add support for ELECOM WRC-1167GHBK2-S
ELECOM WRC-1167GHBK2-S is a 2.4/5 GHz band 11ac router, based on
MediaTek MT7621A.
Specification:
- MT7621A (2-Cores, 4-Threads)
- 128 MB of RAM (DDR3)
- 16 MB of Flash (SPI)
- 2T2R 2.4/5 GHz
- MediaTek MT7615D
- 5x 10/100/1000 Mbps Ethernet
- 6x LEDs, 2x keys
- UART header on PCB
- Vcc, GND, TX, RX from ethernet port side
- baudrate: 57600 bps
Flash instruction using factory image:
1. Rename the factory image to "wrc-1167ghbk2-s_v0.00.bin"
2. Connect the computer to the LAN port of WRC-1167GHBK2-S
3. Connect power cable to WRC-1167GHBK2-S and turn on it
4. Access to "http://192.168.2.1/details.html" and open firmware
update page ("手動更新(アップデート)")
5. Select the factory image and click apply ("適用") button
6. Wait ~150 seconds to complete flashing
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Wed, 16 May 2018 12:42:48 +0000 (21:42 +0900)]
ramips: add support for I-O DATA WN-GX300GR
I-O DATA WN-GX300GR is a 2.4 GHz band 11n router, based on MediaTek
MT7621S.
Specification:
- MT7621S (1-Core, 2-Threads)
- 64 MB of RAM
- 8 MB of Flash (SPI)
- 2T2R 2.4 GHz
- 5x 10/100/1000 Mbps Ethernet
- 2x LEDs, 4x keys (2x buttons, 1x slide switch)
- UART header on PCB
- Vcc, GND, TX, RX from ethernet port side
- baudrate: 115200 bps (U-Boot, OpenWrt)
Flash instruction using initramfs image:
1. Connect serial cable to UART header
2. Rename OpenWrt initramfs image for WN-GX300GR to "uImageWN-GX300GR"
and place it in the TFTP directory
3. Set the IP address of the computer to 192.168.99.8, connect to the
LAN port of WN-GX300GR, and start the TFTP server on the computer
4. Connect power cable to WN-GX300GR and turn on the router
5. Press "1" key on the serial console to interrupt boot process on
U-Boot, press Enter key 3 times and start firmware download via TFTP
6. WN-GX300GR downloads initramfs image and boot with it
7. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with sysupgrade image for WN-GX300GR
8. Wait ~150 seconds to complete flasing
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
INAGAKI Hiroshi [Thu, 17 May 2018 07:06:02 +0000 (16:06 +0900)]
ipq806x: add support for NEC Aterm WG2600HP
NEC Aterm WG2600HP is a 2.4/5 GHz band 11ac router, based on Qualcomm
IPQ8064.
Specification:
- IPQ8064 (384 - 1,400 MHz)
- 512 MB of RAM
- 32 MB of Flash (SPI)
- 4T4R 2.4/5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 12x LEDs, 4x keys
- 1x USB 3.0 Type-A
- UART header on PCB
- RX, TX, NC, GND, Vcc from power connector side
- baudrate: 115200 bps
Flash instruction using initramfs image:
1. Connect serial cable to UART header
2. Connect power cable and turn on the router
3. When the "Press the [f] key and hit [enter] to enter failsafe mode"
message is displayed on the console, press the "f" key and Enter key
sequentially to enter the failsafe mode
4. create fw_env.config file with following contents on failsafe mode:
/dev/mtd9 0x0 0x10000 0x10000
5. Execute following commands to add and change the environment
variables of U-Boot
fw_setenv ipaddr "192.168.0.1"
fw_setenv serverip "192.168.0.2"
fw_setenv autostart "yes"
fw_setenv bootcmd "tftpboot 0x44000000 wg2600hp-initramfs.bin;
bootipq"
6. Set the IP address of the computer to 192.168.0.2, connect to the LAN
port of WG2600HP, and start the TFTP server on the computer
7. Rename OpenWrt initramfs image for WG2600HP to
"wg2600hp-initramfs.bin" and place it in the TFTP directory
8. Remove power cable from WG2600HP, reconnect it and restart WG2600HP
9. WG2600HP downloads initramfs image from TFTP server on the computer,
loads it and boot with initramfs image
10. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with the sysupgrade image
11. Wait ~180 seconds to complete flashing
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Mathias Kresin [Tue, 19 Jun 2018 18:44:36 +0000 (20:44 +0200)]
ramips: mt7621: fix wireless package selection
Add wpad-mini if wireless drivers are included. Drop the mt76 package if
both of the provided drivers are included with their own packages.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Hans Dedecker [Tue, 29 May 2018 13:18:16 +0000 (15:18 +0200)]
ds-lite: make tunnel encapsulation limit support configurable (FS#1501)
Be compatible with ISPs which don't support the destination option header containing
the tunnel encapsulation limit as reported in FS#1501.
Setting the uci parameter encaplimit to ignore; allows to disable the insertion
of the destination option header in the ds-lite packets.
Otherwise the tunnel encapsulation limit value can be set to a value from 0 till 255
by setting the encaplimit uci parameter accordingly.
If no encaplimit value is specified the default value is 4 as before.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Tue, 29 May 2018 13:31:21 +0000 (15:31 +0200)]
odhcp6c: make ds-lite/map tunnel encapsulation limit support configurable (FS#1501)
Be compatible with ISPs which don't support the destination option header containing
the tunnel encapsulation limit as reported in FS#1501 for dynamic created ds-lite/map
interfaces.
Setting the uci parameter encaplimit_dslite/map to ignore; allows to disable the insertion
of the destination option header for the dynamic created ds-lite/map interface.
Otherwise the tunnel encapsulation limit value can be set to a value from 0 till 255
by setting the encaplimit_dslite/map uci parameter accordingly.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Wed, 30 May 2018 20:15:48 +0000 (22:15 +0200)]
netifd: update to latest git HEAD (FS#1501)
a580028 system-linux: make encaplimit configurable for ip6 tunnels (FS#1501)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Mon, 4 Jun 2018 15:00:32 +0000 (17:00 +0200)]
map: make tunnel encapsulation limit support configurable (FS#1501)
Be compatible with ISPs which don't support the destination option header containing
the tunnel encapsulation limit as reported in FS#1501.
Setting the uci parameter encaplimit to ignore; allows to disable the insertion
of the destination option header in the map-e packets.
Otherwise the tunnel encapsulation limit value can be set to a value from 0 till 255
by setting the encaplimit uci parameter accordingly.
If no encaplimit value is specified the default value is 4 as before.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Tomasz Maciej Nowak [Thu, 14 Jun 2018 19:15:59 +0000 (21:15 +0200)]
mvebu: reduce speed to gen1 for espressobin pcie
Since the beginning there's been an issue with initializing the Atheros
based MiniPCIe wireless cards. Here's an example of kerenel log:
OF: PCI: host bridge /soc/pcie@
d0070000 ranges:
OF: PCI: MEM 0xe8000000..0xe8ffffff -> 0xe8000000
OF: PCI: IO 0xe9000000..0xe900ffff -> 0xe9000000
advk-pcie
d0070000.pcie: link up
advk-pcie
d0070000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [mem0xe8000000-0xe8ffffff]
pci_bus 0000:00: root bus resource [io 0x0000-0xffff](bus address[0xe9000000-0xe900ffff])
pci 0000:00:00.0: BAR 0: assigned [mem0xe8000000-0xe801ffff 64bit]
pci 0000:00:00.0: BAR 6: assigned [mem0xe8020000-0xe802ffff pref]
[...]
advk-pcie
d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c
advk-pcie
d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x44
advk-pcie
d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
ath9k 0000:00:00.0: enabling device (0000 -> 0002)
advk-pcie
d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c
advk-pcie
d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0xc
advk-pcie
d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
advk-pcie
d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x40
ath9k 0000:00:00.0: request_irq failed
advk-pcie
d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
ath9k: probe of 0000:00:00.0 failed with error -22
The same happens for ath5k cards, while ath10k card didn't appear at
all (not detected):
OF: PCI: host bridge /soc/pcie@
d0070000 ranges:
OF: PCI: MEM 0xe8000000..0xe8ffffff -> 0xe8000000
OF: PCI: IO 0xe9000000..0xe900ffff -> 0xe9000000
advk-pcie
d0070000.pcie: link never came up
advk-pcie
d0070000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [mem0xe8000000-0xe8ffffff]
pci_bus 0000:00: root bus resource [io 0x0000-0xffff](bus address[0xe9000000-0xe900ffff])
advk-pcie
d0070000.pcie: config read/write timed out
Following the issue on esppressobin.net forum [1] the workaround seems
to be limiting the speed of PCIe bridge to 1st generation. This fixed
the initialisation of all tested Atheros wireless cards.
The change shouldn't affect the performance for wireless cards,
it could reduce the performance of storage controller cards but since
OpenWrt focuses on wireless connectivity, fixing compatibility with
wireless cards should be a priority.
For the record, the iwlwifi and mt76 cards were not affected by this
issue.
1. http://espressobin.net/forums/topic/which-pcie-wlan-cards-are-supported
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
(cherry picked from commit
772258044b48036699302840abf96cd34c4e5078)
Tomasz Maciej Nowak [Sat, 9 Jun 2018 14:13:40 +0000 (16:13 +0200)]
mvebu: add fix for armada 37xx cpufreq driver
Backport from stable kernel tree fixing clock leak.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
(cherry picked from commit
4ec8c8c23ed50dbe9cabbfc544ae2780f0287fd0)
John Crispin [Sun, 27 May 2018 07:22:40 +0000 (09:22 +0200)]
kernel: add missing softdog symbol
Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit
9c409cb4e2670edddd8de5e8536ea295d44b9e16)
Andy Boyett [Thu, 17 May 2018 05:09:57 +0000 (22:09 -0700)]
build: add busybox support to `time` prereq-check
Busybox time supports the GNU time '-f' syntax used by the build time
logging implemented in
ff6e62b288c, however the prerequisite check added
only works with GNU time installed as `time` or `gtime`.
As busybox is a multicall binary, the name of the symlink setup by
SetupHostCommand also must be changed from `gtime` to `time` to fix the
value of argv[0]. This causes a number of shells (including bash) to use
their builtin impelementation of time, so the sole invocation has been
changed to use `env time` to use the value found on the $PATH.
Signed-off-by: Andy Boyett <agb@agb.io>
(cherry picked from commit
591780615b304fb4624e363135942e9ee8f6caa3)
Mathew McBride [Wed, 28 Mar 2018 02:34:52 +0000 (13:34 +1100)]
build: use busybox gzip compatible force option
commit
138c763 ("build: add --force option to gzip in Build/gzip")
added the --force flag to the gzip invocation.
Under environments with busybox gzip (e.g Alpine Linux), this fails
as busybox only recognizes "-f".
Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit
fba168f5745acac95db519a9984b62e3e508df6a)