Compare commits

...

78 Commits

Author SHA1 Message Date
Matthias Schiffer
a7d28bc965
docs, README: Gluon v2017.1.5 2018-01-31 21:39:04 +01:00
Matthias Schiffer
e7a4eb5337
docs: releases/v2017.1.5: add UBNT ERX, mention BLA fix 2018-01-30 18:38:56 +01:00
Matthias Schiffer
c2c439013c
gluon-ebtables-filter-multicast: do not filter out Bridge Loop Avoidance
batman-adv uses gratuitous ARP packets with certain target addresses for
BLA.

Fixes #1198
2018-01-30 18:36:41 +01:00
Matthias Schiffer
0cffad5376
docs: add release notes for v2017.1.5 2018-01-30 18:19:27 +01:00
Andreas Ziegler
9295abcea7 ar71xx: correct model name for TL-WR1043N v5, fixes #1307 2018-01-17 11:54:07 +01:00
Matthias Schiffer
d2d8bfa7bd Backport patches for rx buffer stalls on QCA953x and QCA956x
Fixes #1101
2018-01-17 11:46:47 +01:00
David Bauer
a72820939f ar71xx: add support for TP-Link TL-WR1043N v5 (#1279) 2018-01-17 11:46:44 +01:00
Matthias Schiffer
a4ce8474ff
Merge pull request #1290 from kb-light/er-x-sfp-v2017.1.x
Backport er-x-sfp (master -> v2017.1.x)
2018-01-04 22:02:30 +01:00
Matthias Schiffer
9ed6ff752e
modules: update Gluon packages
906f5ef tunneldigger: clean up version variables in Makefile
b969e70 tunneldigger: Update to newest upstream commit: (#178)
2018-01-04 21:58:18 +01:00
Christof Schulze
cc247bc050
modules: update url to lede-project git repository after upstream move (#1292) 2018-01-03 12:58:31 +01:00
Karsten
3ad5937b37 gluon-web-network: make 'PoE Power Port[0-9]' translatable (#1173)
(cherry picked from commit 35237c2ca1)
2017-12-30 22:24:46 +01:00
kb-light
7e9627c5dd ramips-mt7621: do not tag ubnt-erx(-sfp) as broken
There is no wifi, so there is no bad wifi.

[Matthias Schiffer: rebase onto master]

(cherry picked from commit 17d1c65610)
2017-12-30 22:24:46 +01:00
kb-light
21ded59c33 ramips-mt7621: add support for UBNT EdgeRouter X-SFP
(backported from commit 64cfd648cb)
2017-12-30 22:24:31 +01:00
kb-light
2ae74fe737 docs: update ffho site repo (#1145)
(cherry picked from commit 56d74e41c1)
2017-11-26 14:21:54 +01:00
Andreas Ziegler
83bb7ef820 ramips-mt7621: ZBT-WG3526 has no factory image 2017-11-24 00:50:56 +01:00
Andreas Ziegler
afbdc4ede1 ramips-mt7621: add ZBT-WG3526 2017-11-24 00:50:51 +01:00
Matthias Schiffer
36bbe88f21
scripts: run feeds.sh with bash like the other scripts handling modules
Fixes #1262
2017-11-23 17:45:48 +01:00
Matthias Schiffer
55706d391d
docs, README: Gluon v2017.1.4 2017-11-15 23:00:19 +01:00
Matthias Schiffer
94f6f2766e
docs: v2017.1.4 release notes 2017-11-15 22:57:18 +01:00
kb-light
7c2636d282
gluon-web-network: make poe_passthrough more generic 2017-11-15 22:51:12 +01:00
kb-light
7268e49a30
gluon-core: update lib/gluon/upgrade/150-poe-passthrough for naming within lede 2017-11-15 22:51:08 +01:00
kb-light
20f693bc4a
gluon-core: lib/gluon/upgrade/150-poe-passthrough: fix indentation 2017-11-15 22:50:59 +01:00
Matthias Schiffer
017fbe88bb
modules: update LEDE
6b6578feec wireguard: version bump to 0.0.20171101
9740523763 ar71xx: fix LED config for DIR-869 A1
bdf19eec35 ipq806x: nbg6817: sync MAC addresses to the upstream values
2aff2add31 ipq806x: nbg6817: add kmod-fs-ext4 to device packages
63f6408ccc uclient: update to the latest version, fixes fetch of multiple files
2017-11-07 13:47:38 +01:00
Matthias Schiffer
5a3f7b33b4
modules: update Gluon packages
2e5a247 libpacketmark: fix call of initialization function (again)

Fixes #1245
2017-11-04 21:04:44 +01:00
Florian Beier
f4703a3aa6 ar71xx-generic: add support for GL.INet GL-AR300M (#1163) 2017-10-31 16:43:12 +01:00
Matthias Schiffer
ad0824136e
modules: update LEDE
3eae19acee ramips: fix Youku-YK1 support
8a48a53dcb tools/squashfs4: include sysmacros.h explicitly
8406e50df5 tools/squashfs: include sysmacros.h explicitly
96dbf59e5a tools/mtd-utils: include sysmacros.h explicitly
d2fd6412a6 tools/findutils: include sysmacros.h explicitly
367b4563b4 dnsmasq: restore ability to include/exclude raw device names
ee6fa8d839 lantiq: add missing default lan interface
2bee675d33 ipq806x: fix Zyxel NBG6817 WiFi button
f5935f78a1 ramips: fix default usb support for nexx wt3020-8M
2017-10-29 20:49:20 +01:00
Matthias Schiffer
0684272823
modules: update OpenWrt packages
Fixes a build issue in kmod-jool.

82ef2fd7 jool: fix PKG_BUILD_DIR to avoid kernel ABI mismatch
fee9a0aa monit: update to 5.24, use https download url
5a6fcfbc monit: update to 5.23
4479fada monit: update to 5.20, use PKG_HASH
9ce3deb8 sqlite3: update to 3.19.3
6bca8579 libs/sqlite3: Update to 3190200
0a279576 sqlite: update to 3.17.0
58a1a733 libwebsockets: add PROVIDES to both variants
e967fd8c icu: fix CVE-2017-14952 Double-Free Vulnerability [lede-17.01]
3c29b149 Revert "Provides a way to acquire the list of installed packages without the"
27bdc743 Revert "add ubus call to perform a sysupgrade and acl file for the attended"
cdcf6ad2 Revert "due to renaming .rpcd was forgotten in the Makefile"
04cbc70c due to renaming .rpcd was forgotten in the Makefile
f6c287f1 add ubus call to perform a sysupgrade and acl file for the attended sysupgrade use case as well uci defaults. Package is a part of the GSoC 17 project implementing easy sysupgrade functionality.
983819f3 Provides a way to acquire the list of installed packages without the need to have opkg available. It is being used for the GSoC 17 project implementing easy sysupgrade functionality.
cd5c4487 wireguard: drop package
9040b270 noddos: new backport of noddos from master branch
72e88678 wireguard: bump to release 0.0.20171005 for 17.01
de79f4c7 bluez: fix CVE-2017-1000250
b56e6504 tor: update to version 0.2.9.12
c69b0774 tor: update to version 0.2.9.11
ea9ca5ed ruby: bump to 2.4.2
fa3a118d collectd: uptime plugin: apply fix from upstream
4739584c mwan3: fix interface-bound traffic when interface is offline
d61bf45c haproxy: update to 1.7.8 and pending patches  - fixes reload issue with hanging process
a6a44f91 pcre: Added fix for CVE-2017-11164 by adding stack recursion limit
1434dbdf pcre: upgrade to version 8.41  - fixes security issues
ad256bbf strongswan: fix typo
a7007291 strongswan: add curve25519 plugin
1143cb9b strongswan: bump to 5.5.3
384e89b3 strongswan: bump to 5.5.2
fe233e35 net/mwan3: update Makefile
42f46570 unbound: update to 1.6.5
a3c78648 net/mwan3: remove lock file on mwan3 stop
282e9001 net/mwan3: fix ping issue if last interface recovers from failure
94a52336 net/mwan3: fix ipset generation in hotplug script with an lock
822bc96b net/mwan3: add lock for mwan3 hotplug script
70d96f5d net/mwan3: add connected network regardless of mwan3 interface enable state
8a111b5b net/mwan3: mwan3track interrupt sleep on signal (trap) event
eefc65b0 net/mwan3: fix hotplug on ACTION ifdown
7fb33ad6 mosquitto: properly use localhost instead of ipv4
75f50611 mosquitto: support more config options in UCI
956ef7a8 acme: Make sure postrm script doesn't fail
788f17e9 acme: Fix for curl linked against mbed TLS. (#4254)
5383fd42 nlbwmon: update to latest version
29fb31fe nlbwmon: add package
ce5ff274 mosquitto: update to 1.4.14
bdac4914 mosquitto: update to 1.4.13
e4e22eb9 zabbix: update to 3.2.6
4ea3c274 zabbix: partially fix zabbix-extra-mac80211
26897f09 zabbix: update to 3.2.4, use PKG_HASH
f2539c58 lighttpd: backport more mod_cgi fixes queued for 1.4.46
46014e36 coreutils: stdbuf: fix missing libstdbuf.so
e8af9ce4 gnutls: updated to 3.5.13
4c26df19 libtasn1: updated to 4.12
b91c48ba openconnect: new option mtu
7af43217 openconnect: drop stale config: interface
9c9571fd openconnect: Bump openconnect to 7.08
72928442 minidlna: backport fixes from 1.1.6 and 1.2.0 releases
ca5d4b08 openldap: update to 2.4.45
dc558eaa mosquitto: fix empty client-nossl package
33d8f9e5 libdmapsharing: update to 2.9.38
53d18a45 tor: update to version 0.2.9.10
2017-10-29 20:49:18 +01:00
Matthias Schiffer
43c92f25fa
build: delete lede/tmp on module updates
LEDE doesn't always notice that the metadata needs to be refreshed.
2017-10-29 20:49:16 +01:00
Matthias Schiffer
8d0dba79e5
modules: update Gluon packages
c2fedc5 libpacketmark: fix call of initialization function
1a8fd4b respondd-module-airtime: Give more helpful error messages

Fixes #1245
2017-10-25 15:03:01 +02:00
Andreas Ziegler
dfa11d663d
ar71xx: add TP-Link Archer C25 (#1238)
BROKEN because of stability issues with 5GHz enabled.
2017-10-24 00:34:11 +02:00
Matthias Schiffer
ba56b41dda
modules: update LEDE (2017-10-23)
0780e12483 opkg: bump to 2017-10-23 (lede-17.01)
98c003e3da lantiq: ARV752DPW22: fix wireless mac address
50db9a4004 lantiq: ARV752DPW22: set correct wireless led trigger

Fixes #1246
2017-10-23 23:59:10 +02:00
Matthias Schiffer
b62af904bb
modules: update LEDE base
373fa54d35 kernel: bump 4.4 to 4.4.93 for 17.01
586a721d3f mountd: bump to git HEAD version (fixes SIGSEV crashes)
cdb2684dce LEDE v17.01.4: revert to branch defaults
444add156f LEDE v17.01.4: adjust config defaults
79f57e422d wireguard: version bump to 0.0.20171017
d501786ff2 hostapd: add wpa_disable_eapol_key_retries option
b6c3931ad6 hostapd: backport extra changes related to KRACK
a5e1f7f5ef mac80211: backport kernel fix for CVE-2017-13080
46e29bd078 x86: partly revert cabf775
707305a19d mac80211: Update wireless-regdb to master-2017-03-07
907d8703f4 wireguard: add wireguard to base packages
bff16304b0 brcmfmac: backport length check in brcmf_cfg80211_escan_handler()
fa0b5fce1f kernel: bump 4.4 to 4.4.92
e6fd17d04c ramips: fix compile warning in MT7621 NAND driver
2e9f3c6225 ramips: fix typo in MT7621 NAND driver
63c17142c8 hostapd: merge fixes for WPA packet number reuse with replayed messages and key reinstallation
cdd093b539 x86/64: add xen DomU support
cabf775e64 x86: Refresh subtargets kernel config
da0219ed9f x86: Fix xen serial console by removing conflicting PATA driver
f52b404aee x86/generic: use HIGHMEM64G instead of HIGHMEM4G to fix PAE and Xen
8ad1b09c6d kernel: add fix for bgmac with B50212E B1 PHY
c1023c8075 mt76: sync with version 878456caf60d from master
baa8eaaba6 bcm53xx: backport DTS changes up to the first 4.15 queued commits
94aa2b8af0 ar71xx: add rssileds to WA850RE v1 image
f67c22e0c2 toolchain/gdb: update to version 8.0.1
067221360e cmake: fix build error with Xcode 9 on macOS 12
a999f91ca3 gcc: fix build error with macOS + Xcode 9
2ce9c84a92 build: add a darwin sitefile to deal with macOS 10.12 + Xcode 9 build errors
f9a849ca84 ramips: mt7620: do not pad sysupgrade Archer images
2017-10-23 19:38:51 +02:00
lrnzo
72e585ceed
docs: change group name gluon-fastd to gluon-mesh-vpn
The group was renamed during the development of Gluon v2017.1, adjust the
documentation accordingly.
2017-10-22 20:32:23 +02:00
hexa-
e859de8c39 docs: fix typo in v2017.1.3 release notes (#1234) 2017-10-11 02:01:20 +02:00
Matthias Schiffer
3e2e72729f
docs, README: Gluon v2017.1.3 2017-10-04 22:35:45 +02:00
Matthias Schiffer
41f5cdf526
docs: v2017.1.3 release notes 2017-10-04 21:12:03 +02:00
Matthias Schiffer
a94d6d3cf8
modules: update LEDE (2017-10-03)
Update to LEDE v17.01.3.

ee32de4426 LEDE v17.01.3: revert to branch defaults
df54a8f583 LEDE v17.01.3: adjust config defaults
d0bf257c46 uhttp: update to latest version
2017-10-04 01:22:07 +02:00
Matthias Schiffer
9cecb1e836
gluon-mesh-batman-adv: filter out all packages between bat0 and local-port
Filtering by MAC address won't filter out multicast packages like router
solicitations, causing uradvd to send out router advertisements with
maximum frequency (every 3 seconds) in active meshes, even when no local
client is actually interested in the advertisements.

Fixes #1230
2017-10-03 17:18:27 +02:00
Matthias Schiffer
ff4932e477
modules: update LEDE (2017-10-02)
783465d783 odhcpd: don't enable server mode on non-static lan port
c92c1894a5 odhcpd: backport fixes from master branch (FS#402, FS#524)
4b4a4af814 dnsmasq: bump to v2.78
b8357e87d7 base-files: create /etc/config/ directory
3350137bd3 sunxi: clean up modules definitions
a881323cb2 ltq-vdsl-mei: revert disable optimized firmware download
f483a35f08 curl: fix security problems
e232c6754d mbedtls: update to 2.6.0 CVE-2017-14032
37e1bd27d0 generic: drop 704-phy-no-genphy-soft-reset.patch
720b0e2e2d kernel: update 4.4 to 4.4.89
b428f45c06 ltq-vdsl-mei: disable optimized firmware download
39e5cd9556 ltq-vdsl: fix PM thread suspend and resume handling
86f0e8b091 openvpn: add "extra-certs" option
af802bc687 lantiq: fix missing otg_cap on danube platform
12a0da6315 tcpdump: noop commit to refer CVEs fixed in 4.9.2
f66c6e1d8a tcpdump: bump to 4.9.2
a131f7cb69 utils/tcpdump: Rework URLs
7f1359c14e base-files: fix wan6 interface config generation for pppoe
97ebdf93a3 ipq806x: Archer C2600: fix switch ports numbering
d33f7905df treewide: fix shellscript syntax errors/typos
4f162ac3ce ramips: fix hg255d LED status support
2017-10-03 17:17:21 +02:00
Matthias Schiffer
3576c8e6a7
modules: update LEDE
Fixes #1223
2017-09-11 20:28:41 +02:00
Matthias Schiffer
8239d87e8c
modules: update LEDE 2017-09-11 20:28:36 +02:00
Matthias Schiffer
491e8e0332
modules: update LEDE 2017-09-11 20:28:25 +02:00
Matthias Schiffer
5463f925ea
gluon-autoupdater: mirror URLs must start with http://
The older busybox-based wget erroneously accepted URLs without protocol.
Add validator to avoid building firmwares with broken autoupdates.
2017-09-05 19:06:30 +02:00
Matthias Schiffer
77b39908bd
README: fix typo 2017-08-14 02:07:35 +02:00
Matthias Schiffer
f4d642d516
docs, README: Gluon v2017.1.2 2017-08-14 02:01:24 +02:00
Matthias Schiffer
41d28c9332
docs: import v2016.2.7 release notes 2017-08-14 01:57:31 +02:00
Matthias Schiffer
973c6dd479
gluon-mesh-batman-adv: fix radvd start with dns.servers, but without next_node.ip config 2017-08-11 20:58:41 +02:00
Matthias Schiffer
d513b22e37
gluon-mesh-vpn: fix fastd <-> tunneldigger migration
The generic upgrade script is moved to run after the more specific scripts.
In addition, the script will now remove the configuration sections of
uninstalled VPN packages, so both positive and negative changes of the
default enable state can be migrated correctly.

Based-on-patch-by: Cyrus Fox <cyrus@lambdacore.de>
Fixes: #1187
2017-08-08 01:59:41 +02:00
Matthias Schiffer
b0a6cb7226
modules: update openwrt-routing packages
Updates batman-adv and alfred to 2017.2 and adds the batman-adv TT-sync
fix.

Fixes #1183
2017-08-07 22:05:59 +02:00
Matthias Schiffer
e740c592ab
docs: add v2017.1.2 release notes 2017-08-07 21:37:58 +02:00
Matthias Schiffer
6114630e3b
modules: update LEDE 2017-08-07 18:01:27 +02:00
Matthias Schiffer
1d16f0d433
modules: update LEDE 2017-07-30 22:20:32 +02:00
Matthias Schiffer
c197d028ec
gluon-mesh-batman-adv: preserve gw_mode on upgrades
When a Gluon node is used to connect to an uplink router/DHCP server (for
example in deployments without VPN tunnels), the gw_mode must be set to
server; this should be preserved on upgrades.

Fixes #1196
2017-07-25 23:56:03 +02:00
Steffen Förster
826ac88493
gluon-mesh-batman-adv: enable routing algorithm configuration through site.conf
[Matthias Schiffer: move to proto_gluon_bat0_setup() and default to BATMAN_IV]
2017-07-19 18:12:29 +02:00
Matthias Schiffer
bba83bffcc
modules: update LEDE 2017-07-19 17:41:44 +02:00
Matthias Schiffer
4a75648658
Backport a few more sysupgrade packages
Improve error handling a bit, and fix upgrade for some (unsupported or
broken) targets.
2017-07-13 17:59:09 +02:00
Matthias Schiffer
145984eed9
modules: update LEDE 2017-07-13 10:58:09 +02:00
Matthias Schiffer
808723b9fb
Backport sysupgrade patches preventing hangs on certain sysupgrade failures 2017-07-13 01:08:18 +02:00
Matthias Schiffer
1c1b5bdbc3
modules: update LEDE 2017-07-13 01:07:06 +02:00
Matthias Schiffer
b854555a3d
modules: update LEDE 2017-07-13 01:06:55 +02:00
Matthias Schiffer
d7ace5b8b1
modules: update LEDE 2017-07-08 15:20:58 +02:00
Sunz3r
568997f10f
gluon-config-mode-mesh-vpn: add tunneldigger to reboot page (#1172) 2017-07-06 13:24:45 +02:00
kb-light
113688d83d
build: add show-release make target (#1159)
`make show-release` can be used to discover the current release in scripts.
2017-07-05 16:19:26 +02:00
Matthias Schiffer
7db9bfc273
docs, README: Gluon v2017.1.1 2017-07-03 16:48:38 +02:00
Matthias Schiffer
dce540bee5
docs: releases/v2017.1.1: update regarding busybox segfault issue 2017-07-03 01:48:07 +02:00
Matthias Schiffer
be55bd4d52
Revert "generic: busybox: enable sha512sum to workaround segfault issue"
This reverts commit dcff68029e.
2017-07-03 01:47:18 +02:00
Matthias Schiffer
ad1c3a2f6c
busybox: compile with debug information
The added debug information is stripped of during packaging, so it does not
increase the package size. It does however slightly change offsets in the
code, preventing the weird ash segfaults we've been seeing. Also, if the
issue returns, we'll have debug information matching the coredumps.
2017-07-03 01:47:03 +02:00
Ruben Barkow
7559df3050
gluon-web-admin: typo "your node" (#1169) 2017-07-03 01:45:46 +02:00
Matthias Schiffer
45c62c32cb
docs: add v2017.1.1 release notes 2017-06-26 15:26:32 +02:00
Matthias Schiffer
c6a3afa130
generic: batman-adv: disable multicast optimizations for now
A bug in batman-adv can lead to a large amount of management traffic being
exchanged between nodes when the multicast optimizations are enabled,
effectively making the mesh unusable. It's safer to disable the feature
for now, until we have a real fix.
2017-06-26 14:37:31 +02:00
David Lutz
5ec5304f80
ramips-rt305x: Add support for A5-V11 (#1151) 2017-06-23 13:24:16 +02:00
Matthias Schiffer
224321c230
generic: busybox: enable sha512sum to workaround segfault issue
sha512sum doesn't add much code that is not also used by sha256sum, but the
change of the configuration hides the segfault issue described in:

  https://bugs.lede-project.org/index.php?do=details&task_id=822

While the issue only seemed to affect dhcpv6.script, it would clutter /tmp
with coredumps, eventually leading to OOM.
2017-06-23 13:14:26 +02:00
Matthias Schiffer
76998cb5ed
generic: mtd: backport unlock support and asserted fixes for certain Winbond/Spansion flash chips
This patch got lost in the OpenWrt -> LEDE transition and fixes flash
writes on new UBNT PicoStations.
2017-06-21 14:26:54 +02:00
Matthias Fritzsche
fbf6807fb8
docs: add note that GCC 4.8 is needed to build gluon
The used nodejs 4.4.5 needs at least GCC 4.8 to be build
https://github.com/nodejs/node/blob/v4.x/BUILDING.md

Signed-off-by: Matthias Fritzsche <matthias@chemnitz.freifunk.net>
[Matthias Schiffer: moved information to the first section]
2017-06-14 10:14:24 +02:00
Matthias Schiffer
e9caeaf30d
x86-generic: add manifest aliases for x86-kvm and x86-xen_domu
Allow the autoupdater to work when updating from the removed targets.
2017-06-13 12:21:56 +02:00
Matthias Schiffer
75f2c45ec2
scripts: add support for manifest-only model aliases 2017-06-13 12:21:55 +02:00
Matthias Schiffer
bcca4a2f11
docs: releases/v2017.1: add some more information on updating v2016.2.x build setups 2017-06-13 12:21:55 +02:00
Matthias Schiffer
45f05c9a84
docs: site-example: remove redundant "iptables" package
iptables will be pulled in anyways.
2017-06-13 12:21:55 +02:00
84 changed files with 2780 additions and 296 deletions

View File

@ -26,6 +26,9 @@ GLUON_RELEASE ?= $(error GLUON_RELEASE not set. GLUON_RELEASE can be set in site
export GLUON_RELEASE GLUON_ATH10K_MESH GLUON_REGION GLUON_DEBUG
show-release:
@echo '$(GLUON_RELEASE)'
update: FORCE
@GLUON_SITEDIR='$(GLUON_SITEDIR)' scripts/update.sh

View File

@ -18,8 +18,8 @@ the future development of Gluon.
## Use a release!
Please refrain from using the `master` branch for anything else but development purposes!
Use the most recent release instead. You can list all relaseses by running `git tag`
and switch to one by running `git checkout v2017.1 && make update`.
Use the most recent release instead. You can list all releases by running `git tag`
and switch to one by running `git checkout v2017.1.5 && make update`.
If you're using the autoupdater, do not autoupdate nodes with anything but releases.
If you upgrade using random master commits the nodes *will break* eventually.

View File

@ -54,9 +54,9 @@ copyright = '2015-2017, Project Gluon'
# built documents.
#
# The short X.Y version.
version = '2017.1'
version = '2017.1.5'
# The full version, including alpha/beta/rc tags.
release = '2017.1'
release = '2017.1.5'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -46,4 +46,4 @@ so the WAN DNS servers aren't leaked to the primary DNS daemon.
*libpacketmark* is used to make the secondary DNS daemon send its requests over the WAN interface.
The package ``gluon-mesh-vpn-fastd`` provides an iptables rule which will redirect all DNS requests from processes running
with the primary group ``gluon-fastd`` to ``127.0.0.1:54``, thus making fastd use the secondary DNS daemon.
with the primary group ``gluon-mesh-vpn`` to ``127.0.0.1:54``, thus making fastd use the secondary DNS daemon.

View File

@ -64,7 +64,13 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre
:caption: Releases
:maxdepth: 1
releases/v2017.1.5
releases/v2017.1.4
releases/v2017.1.3
releases/v2017.1.2
releases/v2017.1.1
releases/v2017.1
releases/v2016.2.7
releases/v2016.2.6
releases/v2016.2.5
releases/v2016.2.4

View File

@ -0,0 +1,31 @@
Gluon 2016.2.7
==============
This release only fixes a single regression introduced in Gluon v2016.2.6, and
add support for building using Perl 5.26.
Bugfixes
~~~~~~~~
* Improve sysupgrade error handling (`#1160 <https://github.com/freifunk-gluon/gluon/issues/1160>`_)
If for some reason processes don't react to SIGKILL (usually because of a kernel bug),
a node could hang forever in sysupgrade, requiring a power cycle. This has been
fixed, triggering a reboot instead.
* Backport fixes to support building with Perl 5.26 or newer (`76753ed <https://github.com/freifunk-gluon/gluon/commit/76753ede0da78e24208f10675fa288247deec961>`_)
Known Issues
~~~~~~~~~~~~
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
* Inconsistent respondd API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.

View File

@ -0,0 +1,41 @@
Gluon 2017.1.1
==============
Bugfixes
~~~~~~~~
* The autoupdater manifest has been extended to allow automatic upgrades from
old *x86-kvm* and *x86-xen_domu* systems to the new *x86-generic* image
(`869ceb4 <https://github.com/freifunk-gluon/gluon/commit/869ceb425cd5f9db3eafddcc52377fd94c6ba0dd>`_)
* Make flash writable again on Ubiquiti PicoStations with certain bootloader
versions (and possibly other devices)
(`9a787c9 <https://github.com/freifunk-gluon/gluon/commit/9a787c9878069158151c843b8fd9aa338815d61e>`_)
Units affected by this issue running Gluon v2017.1 can't leave config mode and
no regular sysupgrades are possible. TFTP recovery is necessary to make them
work again.
* Add workaround to prevent sporadic segfaults of busybox (ash) when running shell scripts on ar71xx
(`#1157 <https://github.com/freifunk-gluon/gluon/issues/1157>`_)
* Disable batman-adv multicast optimizations to work around issue causing large
amounts of management traffic
(`819758f <https://github.com/freifunk-gluon/gluon/commit/819758f4250af8820851945ba1a6c17748b0ab4b>`_)
Multicast optimizations will be enabled again when a proper fix is available.
Known issues
~~~~~~~~~~~~
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
* Inconsistent respondd API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.

View File

@ -0,0 +1,84 @@
Gluon 2017.1.2
==============
New features
~~~~~~~~~~~~
* Preserve *gw_mode* on sysupgrades (`#1196 <https://github.com/freifunk-gluon/gluon/issues/1196>`_)
When a Gluon node is used as uplink (for example by connecting it to a router with
a DHCP server directly, instead of using non-Gluon servers for the internet uplink),
the *gw_mode* must be set to *server* on that node. The changed *gw_mode* is now
preserved on upgrades.
* Allow configuring the batman-adv routing algorithm (*BATMAN IV* or *BATMAN V*)
in *site.conf* (`#1185 <https://github.com/freifunk-gluon/gluon/issues/1185>`_)
*BATMAN V* still hasn't received extensive testing (and is incompatible with *BATMAN IV*).
This new option allows to set up *BATMAN V*-based test meshes. If unset, the routing
algorithm will default to *BATMAN IV*.
Configuration:
.. code-block:: lua
mesh = {
batman_adv = {
routing_algo = 'BATMAN_V'
}
}
* New *show-release* Make target
The command ``make show-release`` can be used to print the release number
defined by *GLUON_RELEASE* to the standard output. This can be useful for build scripts
when a ``$(shell ...)`` expression is used in *site.mk* to generate the release
number.
Bugfixes
~~~~~~~~
* The image build code used for some devices has been fixed, solving multiple
issues (`#1193 <https://github.com/freifunk-gluon/gluon/issues/1193>`_)
Problems caused by this issue include:
- sysupgrade rejecting Allnet images
- OpenMesh devices losing their configuration on upgrades
This is a regression introduced in Gluon v2017.1.
* Improve sysupgrade error handling (`#1160 <https://github.com/freifunk-gluon/gluon/issues/1160>`_)
If for some reason processes don't react to SIGKILL (usually because of a kernel bug),
a node could hang forever in sysupgrade, requiring a power cycle. This has been
fixed, triggering a reboot instead.
* Also display *gluon-config-mode:novpn* message when Tunneldigger is installed, but disabled
(`#1172 <https://github.com/freifunk-gluon/gluon/issues/1172>`_)
It was only displayed on nodes with fastd before.
* Fix migration of enabled/disabled state between fastd and Tunneldigger
(`#1187 <https://github.com/freifunk-gluon/gluon/issues/1187>`_)
Known issues
~~~~~~~~~~~~
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
* Inconsistent respondd API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.
* Sporadic segfaults of busybox (ash) when running shell scripts on ar71xx
(`#1157 <https://github.com/freifunk-gluon/gluon/issues/1157>`_)
The workaround added in Gluon v2017.1.1 has greatly reduced the frequency of
segfaults, but did not make them disappear completely.

View File

@ -0,0 +1,65 @@
Gluon 2017.1.3
==============
The LEDE base of Gluon has been updated to v17.01.3, including various updates,
stability improvements and security fixes. This includes some critical fixes
to core packages like dnsmasq (see below for details); upgrading all Gluon
nodes to v2017.1.3 is highly recommended.
Bugfixes
~~~~~~~~
* dnsmasq has been upgraded to v2.78, fixing CVE-2017-13704, CVE-2017-14491,
CVE-2017-14492, CVE-2017-14493, CVE-2017-14494, 2017-CVE-14495 and
2017-CVE-14496
While many of the most severe (remote code execution) vulnarabilities are in
the DHCP component of dnsmasq, which is not active on a Gluon node unless in
Config Mode, CVE-2017-14491 does affect us. An attacker can cause memory
corruption and possibly remote code execution by deploying a malicious DNS
server and tricking a node into querying this server.
* The Linux kernel has been upgraded to v4.4.89
* Multiple security issues have been fixed in packages that are not usually part
of the Gluon build, including tcpdump, curl and mbedtls
Please refer to the
`LEDE commit log <https://git.lede-project.org/?p=source.git;a=shortlog;h=refs/heads/lede-17.01>`_
for details.
* Filtering of multicast packets between the mesh and the *local-node* interface
has been fixed (`#1230 <https://github.com/freifunk-gluon/gluon/issues/1230>`_)
This issue was causing gluon-radvd to send a router advertisement to the local
clients whenever a router solicitation from the mesh was received. In busy
meshes, it would continuously send router advertisements every 3 seconds.
* Reject autoupdater mirror URLs not starting with ``http://`` during build
(`9ab93992d1fc <https://github.com/freifunk-gluon/gluon/commit/9ab93992d1fca1b9cfa09c54d39cc92d3699055a>`_)
* Fix MAC addresses on TP-Link TL-WR1043ND v4 when installing Gluon over newer
stock firmwares (`#1223 <https://github.com/freifunk-gluon/gluon/issues/1223>`_)
Known issues
~~~~~~~~~~~~
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
* Inconsistent respondd API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.
* Sporadic segfaults of busybox (ash) when running shell scripts on ar71xx
(`#1157 <https://github.com/freifunk-gluon/gluon/issues/1157>`_)
The workaround added in Gluon v2017.1.1 has greatly reduced the frequency of
segfaults, but did not make them disappear completely.

View File

@ -0,0 +1,56 @@
Gluon 2017.1.4
==============
Added hardware support
~~~~~~~~~~~~~~~~~~~~~~
ar71xx-generic
^^^^^^^^^^^^^^
* GL Innovations GL-AR300M
Bugfixes
~~~~~~~~
* LEDE has been updated to the latest stable commit, including various fixes for
the kernel (including security updates), and making opkg work again. This also
includes fixes for the KRACK issue (which is irrelevant for most Gluon
deployments, as Gluon nodes are rarely used as WLAN clients)
(`b62af904bbfd <https://github.com/freifunk-gluon/gluon/commit/b62af904bbfd6360ed728fc9ae69af3d8e8db1d7>`_,
`ba56b41ddaf6 <https://github.com/freifunk-gluon/gluon/commit/ba56b41ddaf6033e3cdef18d30da6b34cd438e8c>`_,
`ad0824136e5b <https://github.com/freifunk-gluon/gluon/commit/ad0824136e5b47482e11483c50e7bc88ba2c506e>`_,
`017fbe88bb8a <https://github.com/freifunk-gluon/gluon/commit/017fbe88bb8a89623464b02e09178696c1d077a6>`_)
* Fix DNS resolution for mesh VPN (fastd / tunneldigger) on ARM-based targets
(`#1245 <https://github.com/freifunk-gluon/gluon/issues/1245>`_)
* Fix a build issue in *kmod-jool*
(`06842728233a <https://github.com/freifunk-gluon/gluon/commit/06842728233a39784c437767eb9df4167ab07a87>`_)
* Fix enabling/disabling PoE Passthrough in *site.conf* or in the
advanced settings
(`7268e49a301f <https://github.com/freifunk-gluon/gluon/commit/7268e49a301fcd643a49b329bd6097a0f85bdaBb>`_,
`7c2636d28264 <https://github.com/freifunk-gluon/gluon/commit/7c2636d28264df20b448b0160b69f5059c40b84a>`_)
Known issues
~~~~~~~~~~~~
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
* Inconsistent respondd API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.
* Sporadic segfaults of busybox (ash) when running shell scripts on ar71xx
(`#1157 <https://github.com/freifunk-gluon/gluon/issues/1157>`_)
The workaround added in Gluon v2017.1.1 has greatly reduced the frequency of
segfaults, but it did not make them disappear completely.

View File

@ -0,0 +1,57 @@
Gluon 2017.1.5
==============
Added hardware support
~~~~~~~~~~~~~~~~~~~~~~
ar71xx-generic
^^^^^^^^^^^^^^
* TP-Link TL-WR1043N v5
ramips-mt7621
^^^^^^^^^^^^^
* Ubiquiti EdgeRouter-X
* Ubiquiti EdgeRouter-X SFP
Bugfixes
~~~~~~~~
* Fix build with empty ``site/modules``
(`#1262 <https://github.com/freifunk-gluon/gluon/issues/1262>`_)
* Fix Ethernet stalls at high throughput on certain devices
(`#1101 <https://github.com/freifunk-gluon/gluon/issues/1101>`_)
* Update Tunneldigger to support connections with servers running newer kernel
versions (`9ed6ff752eb7 <https://github.com/freifunk-gluon/gluon/commit/9ed6ff752eb7972d90b138197641f12eeb4572fb>`_)
* Fix batman-adv Bridge Loop Avoidance (BLA) with *gluon-ebtables-filter-multicast*
(`#1198 <https://github.com/freifunk-gluon/gluon/issues/1198>`_)
Known issues
~~~~~~~~~~~~
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
* Inconsistent respondd API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.
* Sporadic segfaults of busybox (ash) when running shell scripts on ar71xx
(`#1157 <https://github.com/freifunk-gluon/gluon/issues/1157>`_)
The workaround added in Gluon v2017.1.1 has greatly reduced the frequency of
segfaults, but it did not make them disappear completely.
* Frequent reboots due to out-of-memory on weak hardware in larger meshes
(`#1243 <https://github.com/freifunk-gluon/gluon/issues/1243>`_)

View File

@ -13,6 +13,10 @@ many hacks that were required to make the build work with older OpenWrt releases
The *output/modules* directory is now called *output/packages* and provides a
replacement for the whole repository with target-specific packages of LEDE (in
contrast to packages that are common for all targets of the same architecture).
Another change to the build system makes it necessary that the same *GLUON_RELEASE*
value that is used to build the images is also set for ``make manifest``.
GCC 4.8 or newer is now required to build Gluon.
**Note: There is an issue in all Gluon versions before 2016.2.6 that will
lead to x86 systems losing their configuration when upgrading to Gluon 2017.1!**
@ -127,7 +131,8 @@ site.mk
^^^^^^^
* The *gluon-legacy* package does not exist anymore
* All *gluon-luci-* packages have been renamed to *gluon-web-*
* All *gluon-luci-* packages have been renamed to *gluon-web-*;
*gluon-luci-portconfig* is now called *gluon-web-network*
* The *gluon-next-node* package has been merged into the Gluon core and must not
be specified in *site.mk* anymore

View File

@ -1,4 +1,4 @@
-- This is an example site configuration for Gluon v2017.1
-- This is an example site configuration for Gluon v2017.1.5
--
-- Take a look at the documentation located at
-- http://gluon.readthedocs.org/ for details.

View File

@ -25,7 +25,6 @@ GLUON_SITE_PACKAGES := \
gluon-setup-mode \
gluon-status-page \
haveged \
iptables \
iwinfo
## DEFAULT_GLUON_RELEASE

View File

@ -8,7 +8,7 @@ Gluon's releases are managed using `Git tags`_. If you are just getting
started with Gluon we recommend to use the latest stable release of Gluon.
Take a look at the `list of gluon releases`_ and notice the latest release,
e.g. *v2017.1*. Always get Gluon using git and don't try to download it
e.g. *v2017.1.5*. Always get Gluon using git and don't try to download it
as a Zip archive as the archive will be missing version information.
Please keep in mind that there is no "default Gluon" build; a site configuration
@ -43,7 +43,7 @@ Building the images
-------------------
To build Gluon, first check out the repository. Replace *RELEASE* with the
version you'd like to checkout, e.g. *v2017.1*.
version you'd like to checkout, e.g. *v2017.1.5*.
::

View File

@ -512,7 +512,7 @@ This is a non-exhaustive list of site-repos from various communities:
* `site-ffgoe <https://github.com/freifunk-goettingen/site-ffgoe>`_ (Göttingen)
* `site-ffgt-rhw <https://github.com/ffgtso/site-ffgt-rhw>`_ (Guetersloh)
* `site-ffhh <https://github.com/freifunkhamburg/site-ffhh>`_ (Hamburg)
* `site-ffho <https://git.c3pb.de/freifunk-pb/site-ffho>`_ (Hochstift)
* `site-ffho <https://git.ffho.net/freifunkhochstift/ffho-site>`_ (Hochstift)
* `site-ffhgw <https://github.com/lorenzo-greifswald/site-ffhgw>`_ (Greifswald)
* `site-ffka <https://github.com/ffka/site-ffka>`_ (Karlsruhe)
* `site-ffki <http://git.freifunk.in-kiel.de/ffki-site/>`_ (Kiel)

11
modules
View File

@ -1,18 +1,19 @@
GLUON_FEEDS='openwrt gluon routing luci'
LEDE_REPO=https://git.lede-project.org/source.git
LEDE_REPO=https://git.lede-project.org/openwrt/openwrt.git
LEDE_BRANCH=lede-17.01
LEDE_COMMIT=65eec8bd5f6337956b972d07fde49eb5db9cb4a0
LEDE_COMMIT=6b6578feec74dfe1f5767c573d75ba08cc57c885
PACKAGES_OPENWRT_REPO=https://github.com/openwrt/packages.git
PACKAGES_OPENWRT_BRANCH=lede-17.01
PACKAGES_OPENWRT_COMMIT=8844d7e2d4f717898c55c6345ad3b43fca52c440
PACKAGES_OPENWRT_COMMIT=82ef2fd773987a72678a32b862f50085c3f57d56
PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=71823713c0e9451d1cd459cb10309f468188eb6e
PACKAGES_GLUON_BRANCH=v2017.1.x
PACKAGES_GLUON_COMMIT=906f5ef13ec91dd7433bd1a6bd4ffbd15614bbb3
PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_COMMIT=8d9d70510b2c86f7503962308846ec874f0eb39f
PACKAGES_ROUTING_COMMIT=e656a6e0e69dd45b7caa24775bc86b6eb5dcfe7f
PACKAGES_LUCI_REPO=https://github.com/openwrt/luci.git
PACKAGES_LUCI_BRANCH=lede-17.01

View File

@ -6,7 +6,7 @@ local function check_branch(k, _)
local prefix = string.format('autoupdater.branches[%q].', k)
need_string(prefix .. 'name')
need_string_array(prefix .. 'mirrors')
need_string_array_match(prefix .. 'mirrors', '^http://')
need_number(prefix .. 'good_signatures')
need_string_array_match(prefix .. 'pubkeys', '^%x+$')
end

View File

@ -1,5 +1,6 @@
local uci = require("simple-uci").cursor()
local lutil = require "gluon.web.util"
local fs = require "nixio.fs"
local site = require 'gluon.site_config'
local sysconfig = require 'gluon.sysconfig'
@ -8,7 +9,10 @@ local util = require "gluon.util"
local pretty_hostname = require 'pretty_hostname'
local meshvpn_enabled = uci:get_bool("fastd", "mesh_vpn", "enabled")
local has_fastd = fs.access('/lib/gluon/mesh-vpn/fastd')
local has_tunneldigger = fs.access('/lib/gluon/mesh-vpn/tunneldigger')
local hostname = pretty_hostname.get(uci)
local contact = uci:get_first("gluon-node-info", "owner", "contact")
@ -16,11 +20,20 @@ local contact = uci:get_first("gluon-node-info", "owner", "contact")
local pubkey
local msg
if meshvpn_enabled then
pubkey = util.trim(lutil.exec("/etc/init.d/fastd show_key mesh_vpn"))
msg = _translate('gluon-config-mode:pubkey')
else
msg = _translate('gluon-config-mode:novpn')
if has_tunneldigger then
local tunneldigger_enabled = uci:get_bool("tunneldigger", "mesh_vpn", "enabled")
if not tunneldigger_enabled then
msg = _translate('gluon-config-mode:novpn')
end
elseif has_fastd then
local fastd_enabled = uci:get_bool("fastd", "mesh_vpn", "enabled")
if fastd_enabled then
pubkey = util.trim(lutil.exec("/etc/init.d/fastd show_key mesh_vpn"))
msg = _translate('gluon-config-mode:pubkey')
else
msg = _translate('gluon-config-mode:novpn')
end
end
if not msg then return end

View File

@ -6,8 +6,8 @@ local site = require 'gluon.site_config'
if (not sysconfig.gluon_version) and site.poe_passthrough then
local uci = require('simple-uci').cursor()
if uci:get('system', 'gpio_switch_poe_passthrough') then
uci:set('system', 'gpio_switch_poe_passthrough', 'value', true)
uci:save('system')
end
if uci:get('system', 'poe_passthrough') then
uci:set('system', 'poe_passthrough', 'value', true)
uci:save('system')
end
end

View File

@ -1,3 +1,7 @@
# Bridge loop avoidance
rule 'MULTICAST_OUT -p ARP --arp-opcode Reply --arp-gratuitous --arp-mac-dst ff:43:05:00:00:00/ff:ff:ff:fc:00:00 -j RETURN'
rule 'MULTICAST_OUT -p ARP --arp-opcode Reply --arp-gratuitous --arp-mac-dst ff:43:05:05:00:00/ff:ff:ff:ff:00:00 -j RETURN'
rule 'MULTICAST_OUT -p ARP --arp-opcode Reply --arp-ip-src 0.0.0.0 -j DROP'
rule 'MULTICAST_OUT -p ARP --arp-opcode Request --arp-ip-dst 0.0.0.0 -j DROP'
rule 'MULTICAST_OUT -p ARP -j RETURN'

View File

@ -1,3 +1,4 @@
if need_table('mesh', nil, false) and need_table('mesh.batman_adv', nil, false) then
need_number('mesh.batman_adv.gw_sel_class', false)
need_number('mesh.batman_adv.gw_sel_class', false)
need_one_of('mesh.batman_adv.routing_algo', {'BATMAN_IV', 'BATMAN_V'}, false)
end

View File

@ -1,6 +1,9 @@
local site = require 'gluon.site_config'
local next_node = site.next_node
rule('FORWARD --logical-out br-client -i bat0 -o local-port -j DROP')
rule('FORWARD --logical-out br-client -i local-port -o bat0 -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -s ' .. next_node.mac .. ' -j DROP')

View File

@ -41,6 +41,10 @@ proto_gluon_bat0_setup() {
ip link add primary0 type dummy
echo 1 > /proc/sys/net/ipv6/conf/primary0/disable_ipv6
ip link set primary0 address "$primary0_mac" mtu 1532 up
local routing_algo="$(uci -q get batman-adv.bat0.routing_algo || echo 'BATMAN_IV')"
(echo "$routing_algo" >/sys/module/batman_adv/parameters/routing_algo) 2>/dev/null
echo bat0 > /sys/class/net/primary0/batman_adv/mesh_iface
proto_init_update primary0 1

View File

@ -1,6 +1,9 @@
#!/usr/bin/lua
local site = require "gluon.site_config"
io.write("-i local-node -p " .. site.prefix6)
if site.dns and site.dns.servers then
if site.dns and site.dns.servers and site.next_node and site.next_node.ip6 then
io.write(" --rdnss " .. site.next_node.ip6)
end

View File

@ -7,17 +7,23 @@ local util = require 'gluon.util'
local uci = require('simple-uci').cursor()
local gw_sel_class
local gw_mode, gw_sel_class, routing_algo
gw_mode = uci:get('batman-adv', 'bat0', 'gw_mode') or 'client'
if site.mesh and site.mesh.batman_adv then
gw_sel_class = site.mesh.batman_adv.gw_sel_class
routing_algo = site.mesh.batman_adv.routing_algo
end
uci:delete('batman-adv', 'bat0')
uci:section('batman-adv', 'mesh', 'bat0', {
orig_interval = 5000,
gw_mode = 'client',
gw_mode = gw_mode,
gw_sel_class = gw_sel_class,
hop_penalty = 15,
routing_algo = routing_algo,
multicast_mode = false,
})
uci:save('batman-adv')

View File

@ -62,15 +62,36 @@ uci:save('firewall')
-- VPN migration
local has_fastd = fs.access('/lib/gluon/mesh-vpn/fastd')
local fastd_enabled = uci:get_bool("fastd", "mesh_vpn", "enabled")
local fastd_enabled = uci:get('fastd', 'mesh_vpn', 'enabled')
local has_tunneldigger = fs.access('/lib/gluon/mesh-vpn/tunneldigger')
local tunneldigger_enabled = uci:get_bool("tunneldigger", "mesh_vpn", "enabled")
local tunneldigger_enabled = uci:get('tunneldigger', 'mesh_vpn', 'enabled')
local enabled = fastd_enabled or tunneldigger_enabled or false
local enabled
uci:set("fastd", "mesh_vpn", "enabled", has_fastd and enabled)
uci:save("fastd")
-- If the installed VPN package has its enabled state set, keep the value
if has_fastd and fastd_enabled then
enabled = fastd_enabled == '1'
elseif has_tunneldigger and tunneldigger_enabled then
enabled = tunneldigger_enabled == '1'
-- Otherwise, migrate the other package's value if any is set
elseif fastd_enabled or tunneldigger_enabled then
enabled = fastd_enabled == '1' or tunneldigger_enabled == '1'
-- If nothing is set, use the default
else
enabled = site.mesh_vpn.enabled or false
end
uci:set("tunneldigger", "mesh_vpn", "enabled", has_tunneldigger and enabled)
uci:save("tunneldigger")
if has_fastd then
uci:set('fastd', 'mesh_vpn', 'enabled', enabled)
else
uci:delete('fastd', 'mesh_vpn')
end
uci:save('fastd')
if has_tunneldigger then
uci:set('tunneldigger', 'mesh_vpn', 'enabled', enabled)
else
uci:delete('tunneldigger', 'mesh_vpn')
end
uci:save('tunneldigger')

View File

@ -6,11 +6,6 @@ local util = require 'gluon.util'
local uci = require('simple-uci').cursor()
local enabled = uci:get('fastd', 'mesh_vpn', 'enabled')
if enabled == nil then
enabled = site.mesh_vpn.enabled or false
end
local syslog_level = uci:get('fastd', 'mesh_vpn', 'syslog_level') or 'verbose'
local methods
@ -40,7 +35,6 @@ end
uci:section('fastd', 'fastd', 'mesh_vpn', {
enabled = enabled,
group = 'gluon-mesh-vpn',
syslog_level = syslog_level,
interface = 'mesh-vpn',

View File

@ -6,18 +6,17 @@ local util = require 'gluon.util'
local uci = require('simple-uci').cursor()
local enabled = uci:get('tunneldigger', 'mesh_vpn', 'enabled')
if enabled == nil then
if uci:get_first('tunneldigger', 'broker', 'interface') == "mesh-vpn" then
local enabled
-- Delete old broker config section (remove in 2019)
if not uci:get('tunneldigger', 'mesh_vpn') then
if uci:get_first('tunneldigger', 'broker', 'interface') == 'mesh-vpn' then
enabled = uci:get_first('tunneldigger', 'broker', 'enabled')
end
end
if enabled == nil then
enabled = site.mesh_vpn.enabled or false
end
-- Delete old broker config section
if not uci:get('tunneldigger', 'mesh_vpn') then
-- In the usual case (no migration from old tunneldigger package), the
-- enabled state is set in the 500-mesh-vpn script
uci:delete_all('tunneldigger', 'broker')
end

View File

@ -17,7 +17,7 @@ msgid "Advanced settings"
msgstr "Erweiterte Einstellungen"
msgid ""
"Alternatively, you can set a password to access you node. Please choose a "
"Alternatively, you can set a password to access your node. Please choose a "
"secure password you don't use anywhere else.<br /><br />If you set an empty "
"password, login via password will be disabled. This is the default."
msgstr ""

View File

@ -17,7 +17,7 @@ msgid "Advanced settings"
msgstr "Paramètres avancés"
msgid ""
"Alternatively, you can set a password to access you node. Please choose a "
"Alternatively, you can set a password to access your node. Please choose a "
"secure password you don't use anywhere else.<br /><br />If you set an empty "
"password, login via password will be disabled. This is the default."
msgstr ""

View File

@ -8,7 +8,7 @@ msgid "Advanced settings"
msgstr ""
msgid ""
"Alternatively, you can set a password to access you node. Please choose a "
"Alternatively, you can set a password to access your node. Please choose a "
"secure password you don't use anywhere else.<br /><br />If you set an empty "
"password, login via password will be disabled. This is the default."
msgstr ""

View File

@ -33,7 +33,7 @@ end
local f_password = Form(translate("Password"),
translate(
"Alternatively, you can set a password to access you node. Please choose a secure password you don't use anywhere else.<br /><br />"
"Alternatively, you can set a password to access your node. Please choose a secure password you don't use anywhere else.<br /><br />"
.. "If you set an empty password, login via password will be disabled. This is the default."
), 'password'
)

View File

@ -19,9 +19,12 @@ msgstr "Automatisch (RA/DHCPv6)"
msgid "Disabled"
msgstr "Deaktiviert"
msgid "Enable PoE passthrough"
msgid "Enable PoE Passthrough"
msgstr "PoE-Passthrough aktivieren"
msgid "Enable PoE Power Port %s"
msgstr "PoE-Ausgabe auf Port %s aktivieren"
msgid "Enable meshing on the LAN interface"
msgstr "Mesh auf dem LAN-Port aktivieren"

View File

@ -19,7 +19,10 @@ msgstr "Automatique (RA/DHCPv6)"
msgid "Disabled"
msgstr "Désactivé"
msgid "Enable PoE passthrough"
msgid "Enable PoE Passthrough"
msgstr ""
msgid "Enable PoE Power Port %s"
msgstr ""
msgid "Enable meshing on the LAN interface"

View File

@ -10,7 +10,10 @@ msgstr ""
msgid "Disabled"
msgstr ""
msgid "Enable PoE passthrough"
msgid "Enable PoE Passthrough"
msgstr ""
msgid "Enable PoE Power Port %s"
msgstr ""
msgid "Enable meshing on the LAN interface"

View File

@ -104,15 +104,28 @@ if sysconfig.lan_ifname then
end
end
if uci:get('system', 'gpio_switch_poe_passthrough') then
local s = f:section(Section)
local poe_passthrough = s:option(Flag, "poe_passthrough", translate("Enable PoE passthrough"))
poe_passthrough.default = uci:get_bool("system", "gpio_switch_poe_passthrough", "value")
local section
uci:foreach("system", "gpio_switch", function(s)
if s[".name"]:match("poe") then
if not section then
section = f:section(Section)
end
function poe_passthrough:write(data)
uci:set('system', 'gpio_switch_poe_passthrough', 'value', data)
local port = s.name:match("^PoE Power Port(%d*)$")
local name
if port then
name = translatef("Enable PoE Power Port %s", port)
else
name = translate("Enable " .. s.name)
end
local poe = section:option(Flag, s[".name"], name)
poe.default = uci:get_bool("system", s[".name"], "value")
function poe:write(data)
uci:set("system", s[".name"], "value", data)
end
end
end
end)
function f:write()
uci:set("network", "wan", "proto", ipv4.data)

View File

@ -47,10 +47,10 @@ index 5a403cbf41e2bbd6bdb843492639a01aff8cf75b..900dae1d4afc6007f8ac04179dd7f092
define Build/Configure/Default
diff --git a/include/host-build.mk b/include/host-build.mk
index 70bf6e5a399615edb91edfae3c43a93504d7b5d8..6c2f91581b895bda1ee9f2ee94afc2e5c06de380 100644
index b5f1a6bfa79f5a2a7b442506d72b6192191018a2..cb0d60fd7c5930a3a71f00e70bf25340c98f5744 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -122,7 +122,7 @@ ifneq ($(if $(HOST_QUILT),,$(CONFIG_AUTOREBUILD)),)
@@ -126,7 +126,7 @@ ifneq ($(if $(HOST_QUILT),,$(CONFIG_AUTOREBUILD)),)
endif
define Host/Exports/Default

View File

@ -0,0 +1,21 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 13 Jul 2017 17:15:21 +0200
Subject: procd: switch to latest master
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index cbbd95f1ee71a8b3d118dfa6efc8db15ba8fd4f4..4598711c2252e2c0ffc322fa2d00508de3e5a775 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2017-08-08
-PKG_SOURCE_VERSION:=66be6a23d71fcc068d6b813f0e0be2f8f0b6aa88
-PKG_MIRROR_HASH:=286dcc8855f1dc403895bc9252f617c14be6f7f6ec36f13d4f4de7c4a715f08c
+PKG_SOURCE_DATE:=2017-08-22
+PKG_SOURCE_VERSION:=54b46a351fab736a92221a6f9c750b5f9da499a1
+PKG_MIRROR_HASH:=dcbeea89910bbdf7d6cf20c38892d6c51de375c8b35c372a7106ae17090694f3
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@ -1,26 +0,0 @@
From: Hans Dedecker <dedeckeh@gmail.com>
Date: Mon, 6 Mar 2017 17:25:44 +0100
Subject: procd: update to git HEAD version
8f218f5 procd: service gets deleted when its last instance is freed
35209a0 procd: update modprobe path
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index fd1bca3f4b9665581f9e9ddd9b9294fa500a9d3d..43ea23aab00918a2b664e9a5da7767f90cd568db 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2017-02-15
-PKG_SOURCE_VERSION:=5f9124103410c178d816bb5229fba7dd2286a49b
-PKG_MIRROR_HASH:=ec887b349fc60ad3882fc9eaefb5cd299d64e7d43c062df9f7b7500591ba3e85
+PKG_SOURCE_DATE:=2017-03-05
+PKG_SOURCE_VERSION:=8f218f5626a3cb3900dbe9801ee8ace236b0e4a5
+PKG_MIRROR_HASH:=8ac8691888b64726453bd726fe0c98fc906540bbd2ae666dae6bea592b0b4e4d
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@ -1,128 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 4 May 2017 07:00:06 +0200
Subject: sunxi: clean up modules definitions
Module definitions for kmod-wdt-sunxi and kmod-eeprom-sunxi are removed
(wdt-sunxi was builtin anyways; nvmem-sunxi, which is the new name of
eeprom-sunxi is changed to builtin). As kmod-eeprom-sunxi was specified
in DEFAULT_PACKAGES, but not available on kernel 4.4, it was breaking the
image builder.
Support for kmod-sunxi-ir is added for kernel 4.4 (it is unclear why it
was disable before, it builds fine with with kernel 4.4).
Condtionals only relevant for pre-4.4 kernels are removed from modules.mk,
as sunxi does't support older kernels anymore.
Fixes FS#755.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
index b0bc1bab398af55b77909deccd8f059e17d96e67..3c2f14b8418e1d296a239027f6fdee9b5ba8f9b2 100644
--- a/target/linux/sunxi/Makefile
+++ b/target/linux/sunxi/Makefile
@@ -27,7 +27,7 @@ KERNELNAME:=zImage dtbs
include $(INCLUDE_DIR)/target.mk
-DEFAULT_PACKAGES += uboot-envtools kmod-eeprom-sunxi kmod-wdt-sunxi
+DEFAULT_PACKAGES += uboot-envtools
DEFAULT_PACKAGES += mkf2fs e2fsprogs
$(eval $(call BuildTarget))
diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4
index 2253afa124ad6c3d6b9d6798dc29f68437455341..a978e9d15b8c358f69669d3afdbf4a14bba83d31 100644
--- a/target/linux/sunxi/config-4.4
+++ b/target/linux/sunxi/config-4.4
@@ -356,7 +356,7 @@ CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
CONFIG_NR_CPUS=8
CONFIG_NVMEM=y
-# CONFIG_NVMEM_SUNXI_SID is not set
+CONFIG_NVMEM_SUNXI_SID=y
CONFIG_OF=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/sunxi/modules.mk b/target/linux/sunxi/modules.mk
index 6f4991798decb4a65f615d3a7282270960a7555a..99b82a3b5f17348049458ced5823f7c90f784269 100644
--- a/target/linux/sunxi/modules.mk
+++ b/target/linux/sunxi/modules.mk
@@ -25,7 +25,7 @@ $(eval $(call KernelPackage,rtc-sunxi))
define KernelPackage/sunxi-ir
SUBMENU:=$(OTHER_MENU)
TITLE:=Sunxi SoC built-in IR support (A20)
- DEPENDS:=@TARGET_sunxi @!LINUX_4_4 +kmod-input-core
+ DEPENDS:=@TARGET_sunxi +kmod-input-core
$(call AddDepends/rtc)
KCONFIG:= \
CONFIG_MEDIA_SUPPORT=y \
@@ -42,22 +42,6 @@ endef
$(eval $(call KernelPackage,sunxi-ir))
-define KernelPackage/eeprom-sunxi
- SUBMENU:=$(OTHER_MENU)
- TITLE:=AllWinner Security ID fuse support
- DEPENDS:=@TARGET_sunxi @!LINUX_4_4
- KCONFIG:= \
- CONFIG_EEPROM_SUNXI_SID
- FILES:=$(LINUX_DIR)/drivers/misc/eeprom/sunxi_sid.ko
- AUTOLOAD:=$(call AutoLoad,50,sunxi_sid)
-endef
-
-define KernelPackage/eeprom-sunxi/description
- Support for the AllWinner Security ID fuse support
-endef
-
-$(eval $(call KernelPackage,eeprom-sunxi))
-
define KernelPackage/ata-sunxi
TITLE:=AllWinner sunXi AHCI SATA support
SUBMENU:=$(BLOCK_MENU)
@@ -76,7 +60,7 @@ $(eval $(call KernelPackage,ata-sunxi))
define KernelPackage/sun4i-emac
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=AllWinner EMAC Ethernet support
- DEPENDS:=@TARGET_sunxi +LINUX_4_4:kmod-of-mdio +LINUX_4_4:kmod-libphy
+ DEPENDS:=@TARGET_sunxi +kmod-of-mdio +kmod-libphy
KCONFIG:=CONFIG_SUN4I_EMAC
FILES:=$(LINUX_DIR)/drivers/net/ethernet/allwinner/sun4i-emac.ko
AUTOLOAD:=$(call AutoProbe,sun4i-emac)
@@ -85,35 +69,11 @@ endef
$(eval $(call KernelPackage,sun4i-emac))
-define KernelPackage/wdt-sunxi
- SUBMENU:=$(OTHER_MENU)
- TITLE:=AllWinner sunXi Watchdog timer
- DEPENDS:=@TARGET_sunxi
- KCONFIG:=CONFIG_SUNXI_WATCHDOG
- FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/sunxi_wdt.ko
- AUTOLOAD:=$(call AutoLoad,51,sunxi_wdt)
-endef
-
-define KernelPackage/wdt-sunxi/description
- Kernel module for AllWinner sunXi watchdog timer.
-endef
-
-$(eval $(call KernelPackage,wdt-sunxi))
-
-
define KernelPackage/sound-soc-sunxi
TITLE:=AllWinner built-in SoC sound support
- KCONFIG:= \
- CONFIG_SND_SUNXI_SOC_CODEC \
- CONFIG_SND_SUN4I_CODEC
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,4.4.0)),1)
- FILES+=$(LINUX_DIR)/sound/soc/sunxi/sunxi-codec.ko
- AUTOLOAD:=$(call AutoLoad,65,sunxi-codec)
-endif
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,4.4.0)),1)
+ KCONFIG:=CONFIG_SND_SUN4I_CODEC
FILES:=$(LINUX_DIR)/sound/soc/sunxi/sun4i-codec.ko
AUTOLOAD:=$(call AutoLoad,65,sun4i-codec)
-endif
DEPENDS:=@TARGET_sunxi +kmod-sound-soc-core
$(call AddDepends/sound)
endef

View File

@ -12,21 +12,21 @@ as a separate package.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index ac3fe2f52b4863260a2e8efa58dac5da6bbb9ec1..4cc3e5079b9cf25909acef92526753945ba5f9de 100644
index fdeda95a17cd463f0348bf0606ad40dde717d21f..54f752c802ae2125bf65415807e5b55b45d16190 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -18,7 +18,9 @@ PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=usign/host
@@ -19,7 +19,9 @@ PKG_BUILD_DEPENDS:=usign/host
PKG_LICENSE:=GPL-2.0
-PKG_CONFIG_DEPENDS := CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE
+PKG_CONFIG_DEPENDS := \
# Extend depends from version.mk
-PKG_CONFIG_DEPENDS += CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE
+PKG_CONFIG_DEPENDS += \
+ CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \
+ CONFIG_NAND_SUPPORT
include $(INCLUDE_DIR)/package.mk
@@ -30,7 +32,7 @@ endif
@@ -31,7 +33,7 @@ endif
define Package/base-files
SECTION:=base
CATEGORY:=Base system
@ -35,7 +35,7 @@ index ac3fe2f52b4863260a2e8efa58dac5da6bbb9ec1..4cc3e5079b9cf25909acef9252675394
TITLE:=Base filesystem for Lede
URL:=http://openwrt.org/
VERSION:=$(PKG_RELEASE)-$(REVISION)
@@ -105,9 +107,16 @@ ifdef CONFIG_SIGNED_PACKAGES
@@ -106,9 +108,16 @@ ifdef CONFIG_SIGNED_PACKAGES
endef
endif
@ -435,7 +435,7 @@ index 0000000000000000000000000000000000000000..6bd2005344c081df20e5a330a69e49e3
+ nand_upgrade_stage1
+}
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 805583143fa865d9ffb38355f10ad300e222400e..775b9a64e172b250b3ba27e71fbf07aff46ede14 100644
index 4598711c2252e2c0ffc322fa2d00508de3e5a775..5f2d21c102c7781ce047b166d61354f0f7430eb7 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -22,11 +22,9 @@ PKG_LICENSE_FILES:=

View File

@ -1,35 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 29 May 2017 23:15:22 +0200
Subject: procd: update to latest git HEAD
992b796 rcS: add missing fcntl.h include
63789e5 init: add support for sysupgrades triggered from preinit
5b1fb35 Remove code that has become unnecessary after sysupgrade changes
5918b6d upgraded: add support for passing a "command" argument to stage2
056d8dd upgraded: link dynamically, chroot during exec
7c6cf55 system: always support staged sysupgrade
d42b21e procd/rcS: Use /dev/null as stdin
e0098d4 service/instance: add an auto start option
1247db1 procd: Log initscript output prefixed with script name
8d720b2 procd: Don't use syslog before its initialization
2555474 procd: Add missing \n in debug message
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 43ea23aab00918a2b664e9a5da7767f90cd568db..805583143fa865d9ffb38355f10ad300e222400e 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2017-03-05
-PKG_SOURCE_VERSION:=8f218f5626a3cb3900dbe9801ee8ace236b0e4a5
-PKG_MIRROR_HASH:=8ac8691888b64726453bd726fe0c98fc906540bbd2ae666dae6bea592b0b4e4d
+PKG_SOURCE_DATE:=2017-05-29
+PKG_SOURCE_VERSION:=992b796204caf5b0290ea4a1246b43b353b6c1d7
+PKG_MIRROR_HASH:=effecf66ef6a7396dd26d54a5d232b4a895d9fe7aaca83063aaffc7b39a051d5
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@ -8,7 +8,7 @@ by upgraded.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 28f68b57d6f82dd066410a577e84e32a3a54dc37..2789424c5f5fb50cc1f004d2ab5223a7fecbf53a 100644
index 43febd4727b94bca1311987558b0363eb5319180..b73e8ad67da478d2b9b5fa7038d240372c618f97 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -8,7 +8,7 @@

View File

@ -0,0 +1,139 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 20 Jun 2017 11:01:27 +0200
Subject: generic: mtd: backport unlock support and asserted fixes for certain Winbond/Spansion flash chips
diff --git a/target/linux/generic/patches-4.4/049-0001-mtd-spi-nor-wait-until-lock-unlock-operations-are-re.patch b/target/linux/generic/patches-4.4/049-0001-mtd-spi-nor-wait-until-lock-unlock-operations-are-re.patch
new file mode 100644
index 0000000000000000000000000000000000000000..c8aafe2ebbf7368f47e8f4d7a24dd5e45583a136
--- /dev/null
+++ b/target/linux/generic/patches-4.4/049-0001-mtd-spi-nor-wait-until-lock-unlock-operations-are-re.patch
@@ -0,0 +1,66 @@
+From 32321e950d8a237d7e8f3a9b76220007dfa87544 Mon Sep 17 00:00:00 2001
+Message-Id: <32321e950d8a237d7e8f3a9b76220007dfa87544.1462572686.git.mschiffer@universe-factory.net>
+From: =?UTF-8?q?Ezequiel=20Garc=C3=ADa?= <ezequiel@vanguardiasur.com.ar>
+Date: Mon, 28 Dec 2015 17:54:51 -0300
+Subject: [PATCH] mtd: spi-nor: wait until lock/unlock operations are ready
+
+On Micron and Numonyx devices, the status register write command
+(WRSR), raises a work-in-progress bit (WIP) on the status register.
+The datasheets for these devices specify that while the status
+register write is in progress, the status register WIP bit can still
+be read to check the end of the operation.
+
+This commit adds a wait_till_ready call on lock/unlock operations,
+which is required for Micron and Numonyx but should be harmless for
+others. This is needed to prevent applications from issuing erase or
+program operations before the unlock operation is completed.
+
+Reported-by: Stas Sergeev <stsp@list.ru>
+Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
+Signed-off-by: Brian Norris <computersforpeace@gmail.com>
+---
+ drivers/mtd/spi-nor/spi-nor.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -463,6 +463,7 @@ static int stm_lock(struct spi_nor *nor,
+ u8 status_old, status_new;
+ u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
+ u8 shift = ffs(mask) - 1, pow, val;
++ int ret;
+
+ status_old = read_sr(nor);
+
+@@ -499,7 +500,10 @@ static int stm_lock(struct spi_nor *nor,
+ return -EINVAL;
+
+ write_enable(nor);
+- return write_sr(nor, status_new);
++ ret = write_sr(nor, status_new);
++ if (ret)
++ return ret;
++ return spi_nor_wait_till_ready(nor);
+ }
+
+ /*
+@@ -513,6 +517,7 @@ static int stm_unlock(struct spi_nor *no
+ uint8_t status_old, status_new;
+ u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
+ u8 shift = ffs(mask) - 1, pow, val;
++ int ret;
+
+ status_old = read_sr(nor);
+
+@@ -547,7 +552,10 @@ static int stm_unlock(struct spi_nor *no
+ return -EINVAL;
+
+ write_enable(nor);
+- return write_sr(nor, status_new);
++ ret = write_sr(nor, status_new);
++ if (ret)
++ return ret;
++ return spi_nor_wait_till_ready(nor);
+ }
+
+ /*
diff --git a/target/linux/generic/patches-4.4/049-0002-mtd-spi-nor-wait-for-SR_WIP-to-clear-on-initial-unlo.patch b/target/linux/generic/patches-4.4/049-0002-mtd-spi-nor-wait-for-SR_WIP-to-clear-on-initial-unlo.patch
new file mode 100644
index 0000000000000000000000000000000000000000..0541c95594ec14f62b5db787f4d52d5a42777cdc
--- /dev/null
+++ b/target/linux/generic/patches-4.4/049-0002-mtd-spi-nor-wait-for-SR_WIP-to-clear-on-initial-unlo.patch
@@ -0,0 +1,33 @@
+From edf891ef9ab773363f8e58022a26d7d31604aed6 Mon Sep 17 00:00:00 2001
+Message-Id: <edf891ef9ab773363f8e58022a26d7d31604aed6.1462572703.git.mschiffer@universe-factory.net>
+From: Brian Norris <computersforpeace@gmail.com>
+Date: Fri, 29 Jan 2016 11:25:30 -0800
+Subject: [PATCH] mtd: spi-nor: wait for SR_WIP to clear on initial unlock
+
+Fixup a piece leftover by commit 32321e950d8a ("mtd: spi-nor: wait until
+lock/unlock operations are ready"). That commit made us wait for the WIP
+bit to settle after lock/unlock operations, but it missed the open-coded
+"unlock" that happens at probe() time.
+
+We should probably have this code utilize the unlock() routines in the
+future, to avoid duplication, but unfortunately, flash which need to be
+unlocked don't all have a proper ->flash_unlock() callback.
+
+Signed-off-by: Brian Norris <computersforpeace@gmail.com>
+Cc: Stas Sergeev <stsp@users.sourceforge.net>
+Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
+Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
+---
+ drivers/mtd/spi-nor/spi-nor.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -1169,6 +1169,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+ info->flags & SPI_NOR_HAS_LOCK) {
+ write_enable(nor);
+ write_sr(nor, 0);
++ spi_nor_wait_till_ready(nor);
+ }
+
+ if (!mtd->name)
diff --git a/target/linux/generic/patches-4.4/466-revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch b/target/linux/generic/patches-4.4/466-revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
new file mode 100644
index 0000000000000000000000000000000000000000..7c6530a5e0e8bc144e1d4497428e3c3691c2ef22
--- /dev/null
+++ b/target/linux/generic/patches-4.4/466-revert-mtd-spi-nor-fix-Spansion-regressions-aliased-.patch
@@ -0,0 +1,18 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -1161,6 +1161,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+ JEDEC_MFR(info) == SNOR_MFR_INTEL ||
+ JEDEC_MFR(info) == SNOR_MFR_MACRONIX ||
+ JEDEC_MFR(info) == SNOR_MFR_SST ||
++ JEDEC_MFR(info) == SNOR_MFR_WINBOND ||
+ info->flags & SPI_NOR_HAS_LOCK) {
+ write_enable(nor);
+ write_sr(nor, 0);
+@@ -1178,6 +1179,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+
+ /* NOR protection support for STmicro/Micron chips and similar */
+ if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
++ JEDEC_MFR(info) == SNOR_MFR_WINBOND ||
+ info->flags & SPI_NOR_HAS_LOCK) {
+ nor->flash_lock = stm_lock;
+ nor->flash_unlock = stm_unlock;

View File

@ -0,0 +1,22 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 3 Jul 2017 01:40:32 +0200
Subject: busybox: compile with debug information
The added debug information is stripped of during packaging, so it does not
increase the package size. It does however slightly change offsets in the
code, preventing the weird ash segfaults we've been seeing. Also, if the
issue returns, we'll have debug information matching the coredumps.
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 40bddd6b58195828951d1e48c12848f4fbfc1430..bba1a40568d4bd0543e4768439a249c89779f29a 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -91,6 +91,8 @@ ifdef CONFIG_BUSYBOX_DEFAULT_NSLOOKUP_LEDE
endif
endif
+TARGET_CFLAGS += -g
+
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \

View File

@ -1,25 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 30 May 2017 07:29:25 +0200
Subject: procd: update to latest git HEAD
e7bb2c8 upgraded: define __GNU_SOURCE
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 775b9a64e172b250b3ba27e71fbf07aff46ede14..f9d2f4d34f866a169eb1665ac2699c54422c3c4b 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2017-05-29
-PKG_SOURCE_VERSION:=992b796204caf5b0290ea4a1246b43b353b6c1d7
-PKG_MIRROR_HASH:=effecf66ef6a7396dd26d54a5d232b4a895d9fe7aaca83063aaffc7b39a051d5
+PKG_SOURCE_DATE:=2017-05-30
+PKG_SOURCE_VERSION:=e7bb2c8d631862e1535cf6eead18387f02a69ad2
+PKG_MIRROR_HASH:=97bb96aba2db4730fd8b2edeb15f94e18caa6017d9e50a73777c14532154cade
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0

View File

@ -0,0 +1,33 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 10 Jul 2017 10:35:19 +0200
Subject: base-files: upgrade: correctly handle nand_do_upgrade argument passed from preupgrade
Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index fc59bf2323498d332159b00eb7ab443bfe6b147e..c8b71015c2e44210696a4e28a5b7babbd0233184 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -211,7 +211,7 @@ default_do_upgrade() {
do_upgrade_stage2() {
v "Performing system upgrade..."
if [ -n "$do_upgrade" ]; then
- $do_upgrade "$IMAGE"
+ eval "$do_upgrade"
elif type 'platform_do_upgrade' >/dev/null 2>/dev/null; then
platform_do_upgrade "$IMAGE"
else
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index 1e69c8f9657b39adf2a2c33bd9bac9303bcbc3d7..72f0fe0e10312e74ce085ad53f0adceb921fd013 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -289,7 +289,7 @@ nand_do_upgrade() {
# hook; this piece of code handles scripts that haven't been
# updated. All scripts should gradually move to call nand_do_upgrade
# from platform_do_upgrade instead.
- export do_upgrade=nand_do_upgrade
+ export do_upgrade="nand_do_upgrade '$1'"
return
fi

View File

@ -0,0 +1,42 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 13 Jul 2017 00:19:32 +0200
Subject: base-files: upgrade: don't loop forever trying to kill processes
When processes don't die on SIGKILL (usually because of kernel bugs), it's
better to give up instead of looping forever.
upgraded will trigger a reboot in this case (and if this fails, a hardware
watchdog will eventually time out and reset the system, if present).
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index bdbb8926643287f48a4ae62c5d1d4b4a29130859..097ad63adfecdd70019acaa5b652d2056e774c3f 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -87,6 +87,8 @@ switch_to_ramfs() {
}
kill_remaining() { # [ <signal> [ <loop> ] ]
+ local loop_limit=10
+
local sig="${1:-TERM}"
local loop="${2:-0}"
local run=true
@@ -117,8 +119,15 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
[ $loop -eq 1 ] && run=true
done
+
+ let loop_limit--
+ [ $loop_limit -eq 0 ] && {
+ echo
+ echo "Failed to kill all processes."
+ exit 1
+ }
done
- echo ""
+ echo
}

View File

@ -0,0 +1,39 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 10 Jun 2017 16:14:54 +0200
Subject: bcm53xx: upgrade: fix RAMFS_COPY_*
Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index 097ad63adfecdd70019acaa5b652d2056e774c3f..8cc8c8b34e9f349f1d1283ac00f9782b52ab01c1 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/package/base-files/files/lib/upgrade/stage2
@@ -48,7 +48,7 @@ switch_to_ramfs() {
/bin/sleep /bin/zcat /usr/bin/bzcat /usr/bin/printf /usr/bin/wc \
/bin/cut /usr/bin/printf /bin/sync /bin/mkdir /bin/rmdir \
/bin/rm /usr/bin/basename /bin/kill /bin/chmod /usr/bin/find \
- /bin/mknod /bin/touch
+ /bin/mknod /bin/touch /bin/sed
install_bin /sbin/mtd
install_bin /sbin/mount_root
diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
index eb6dc823e3890497389716c32ec7e4caf8d30c45..a90a58299dc293afbe15a0b491ef6898402deca4 100644
--- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
@@ -1,3 +1,5 @@
+RAMFS_COPY_BIN='/usr/bin/osafeloader /usr/bin/oseama'
+
PART_NAME=firmware
# $(1): file to read magic from
@@ -260,8 +262,6 @@ platform_pre_upgrade_seama() {
}
platform_pre_upgrade() {
- export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /usr/bin/osafeloader /usr/bin/oseama /bin/sed"
-
local file_type=$(platform_identify "$1")
[ "$(platform_flash_type)" != "nand" ] && return

View File

@ -0,0 +1,68 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 10 Jul 2017 18:03:39 +0200
Subject: ipq806x: upgrade: fix RAMFS_COPY_*
RAMFS_COPY_* are moved to platform.sh toplevel. The unneeded
linksys_preupgrade function is removed, and the nand_do_upgrade call is
moved to platform_do_upgrade.
Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh b/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh
index 12f25efdae87979e79a252237f735932cb66d42f..0234ce0a51a0a92dcd719102f83e19686442574a 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh
@@ -99,12 +99,3 @@ platform_do_upgrade_linksys() {
fi
}
}
-
-linksys_preupgrade() {
- export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /usr/sbin/fw_printenv /usr/sbin/fw_setenv"
- export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /bin/mkdir /bin/touch"
- export RAMFS_COPY_DATA="${RAMFS_COPY_DATA} /etc/fw_env.config /var/lock/fw_printenv.lock"
-
-}
-
-append sysupgrade_pre_upgrade linksys_preupgrade
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
index c3741f9ff242cddb3c185c2f638c7b4dff781e1b..6455b57cfb1346b7cc9e103065080d8ae92edc19 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
@@ -3,11 +3,14 @@
PART_NAME=firmware
REQUIRE_IMAGE_METADATA=1
+RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv'
+RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
+
platform_check_image() {
return 0;
}
-platform_pre_upgrade() {
+platform_do_upgrade() {
local board=$(ipq806x_board_name)
case "$board" in
@@ -17,18 +20,8 @@ platform_pre_upgrade() {
r7500 |\
r7500v2 |\
r7800)
- nand_do_upgrade "$1"
- ;;
- ea8500)
- linksys_preupgrade "$1"
+ nand_do_upgrade "$ARGV"
;;
- esac
-}
-
-platform_do_upgrade() {
- local board=$(ipq806x_board_name)
-
- case "$board" in
c2600)
PART_NAME="os-image:rootfs"
MTD_CONFIG_ARGS="-s 0x200000"

View File

@ -0,0 +1,60 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 10 Jul 2017 18:16:23 +0200
Subject: kirkwood: upgrade: fix RAMFS_COPY_*
RAMFS_COPY_* are moved to platform.sh toplevel. The nand_do_upgrade call is
moved to platform_do_upgrade.
Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh b/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
index 13a8f1cb554462acf39a59c9d5c1e6cd4ec222f5..dde3bd1b2190d68ce54e6c2883a45032d58599b2 100644
--- a/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
+++ b/target/linux/kirkwood/base-files/lib/upgrade/linksys.sh
@@ -69,11 +69,3 @@ platform_do_upgrade_linksys() {
fi
}
}
-
-linksys_preupgrade() {
- export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /usr/sbin/fw_printenv /usr/sbin/fw_setenv"
- export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /bin/mkdir /bin/touch"
- export RAMFS_COPY_DATA="${RAMFS_COPY_DATA} /etc/fw_env.config /var/lock/fw_printenv.lock"
-}
-
-append sysupgrade_pre_upgrade linksys_preupgrade
diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
index e7c6a1120a90147380f4fcf644eb7078c1bc1659..c8c66c1b9d67759305ee836f9d84b9a2968a9493 100644
--- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
+++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
@@ -1,5 +1,8 @@
. /lib/kirkwood.sh
+RAMFS_COPY_BIN='/usr/sbin/fw_printenv /usr/sbin/fw_setenv'
+RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
+
platform_check_image() {
[ "$#" -gt 1 ] && return 1
local board="$(kirkwood_board_name)"
@@ -33,19 +36,7 @@ platform_do_upgrade() {
platform_do_upgrade_linksys "$ARGV"
;;
*)
- default_do_upgrade "$@"
- ;;
- esac
-}
-
-platform_pre_upgrade() {
- local board=$(kirkwood_board_name)
-
- case "$board" in
- "linksys-audi"|\
- "linksys-viper") ;;
- *)
- nand_do_upgrade $1
+ nand_do_upgrade "$ARGV"
;;
esac
}

View File

@ -0,0 +1,29 @@
From: Andreas Ziegler <github@andreas-ziegler.de>
Date: Sun, 6 Aug 2017 16:27:53 +0200
Subject: ar71xx: add uImageArcher to tp-link.mk
backport from e39dc8d823c86559eedbbdcee5f5c14b827fed0f
ar71xx: add support to TP-Link Archer C59v1 and C60v1
Based-on-patch-by: Henryk Heisig <hyniu@o2.pl>
Signed-off-by: Andreas Ziegler <github@andreas-ziegler.de>
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
index b76ed02ca394fc1a8b15218d64b5dc722552bbfd..9cd6c6372ac8f7e509a0a2422616097c1c19edf6 100644
--- a/target/linux/ar71xx/image/tp-link.mk
+++ b/target/linux/ar71xx/image/tp-link.mk
@@ -45,6 +45,14 @@ define Build/mktplinkfw-kernel
@mv $@.new $@
endef
+define Build/uImageArcher
+ mkimage -A $(LINUX_KARCH) \
+ -O linux -T kernel \
+ -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
+ -n '$(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION)' -d $@ $@.new
+ @mv $@.new $@
+endef
+
define Device/tplink
TPLINK_HWREV := 0x1
TPLINK_HEADER_VERSION := 1

View File

@ -0,0 +1,444 @@
From: Ludwig Thomeczek <ledesrc@wxorx.net>
Date: Sat, 22 Apr 2017 18:21:47 +0200
Subject: ar71xx: add support for TP-Link Archer C25 v1
The TP-Link Archer C25 is a low-cost dual-band router.
Specification:
- CPU: Atheros QCA9561 775 MHz
- RAM: 64 MB
- Flash: 8 MB
- Wifi: 3x3 2.4 GHz (integrated), 1x1 5 GHz QCA9887
- NET: 5x 10/100 Mbps Ethernet
Some LEDs are controlled by an additional 74HC595 chip.
Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
[minor code style fixes, boards alphabetical order fixes,
reworked commit message]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 833522f27b61ac2208c2862bc0f29f34dea5e701..e1efb561b33da4dcfcb82ee953cd888170476dfb 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -53,6 +53,15 @@ ap121f)
ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
;;
+archer-c25-v1)
+ ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
+ ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt"
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
+ ucidef_set_led_switch "lan1" "LAN1" "$board:green:lan1" "switch0" "0x10"
+ ucidef_set_led_switch "lan2" "LAN2" "$board:green:lan2" "switch0" "0x08"
+ ucidef_set_led_switch "lan3" "LAN3" "$board:green:lan3" "switch0" "0x04"
+ ucidef_set_led_switch "lan4" "LAN4" "$board:green:lan4" "switch0" "0x02"
+ ;;
arduino-yun)
ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt"
ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index cb707f6169f48a9390b622cb26e8fab8de94e4bb..24ead87850f13346ea4be4f9bfb5582e64a2c4ad 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -122,6 +122,7 @@ ar71xx_setup_interfaces()
a60|\
alfa-ap96|\
alfa-nx|\
+ archer-c25-v1|\
dr344|\
gl-ar150|\
gl-ar300m|\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index bc2fc2f774c4f2f0bbfa6e43d9b9a55e9b63153d..38cc5d7853c79f2a7800a387310a95abb3b4de1b 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -50,6 +50,7 @@ get_status_led() {
ap135-020)
status_led="ap135:green:status"
;;
+ archer-c25-v1|\
mr12|\
mr16|\
nbg6616|\
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index b3e23c9a8f8c56870ef36fb55ae52e6b5ea61134..68f90de802ddd18e09a1da39c0d56292eea9489c 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -92,6 +92,7 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2)
;;
+ archer-c25-v1|\
tl-wdr6500-v2)
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index bf365988acbd332d5eb4b2f6fb9e7744f8c1b817..46711af2b26159ebb105fa97cd8a85bb9c00911a 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -460,6 +460,9 @@ ar71xx_board_detect() {
*AP90Q)
name="ap90q"
;;
+ *"Archer C25 v1")
+ name="archer-c25-v1"
+ ;;
*"Archer C5")
name="archer-c5"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 21ad2a617db2fe4ff5801aba3a7fae5ba103570a..e65f6e2f7594ba373fbc9a26620859b9005c8532 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -206,6 +206,7 @@ platform_check_image() {
ap121f|\
ap132|\
ap90q|\
+ archer-c25-v1|\
bullet-m|\
c-55|\
carambola2|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index a8622454b421c1c74a8a71134b53c50399114aa5..e10401d42ae06506f82f2f5538fbc7df79fd4c65 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -51,6 +51,7 @@ CONFIG_ATH79_MACH_AP152=y
# CONFIG_ATH79_MACH_AP81 is not set
CONFIG_ATH79_MACH_AP90Q=y
CONFIG_ATH79_MACH_AP96=y
+CONFIG_ATH79_MACH_ARCHER_C25_V1=y
CONFIG_ATH79_MACH_ARCHER_C7=y
CONFIG_ATH79_MACH_ARDUINO_YUN=y
CONFIG_ATH79_MACH_AW_NR580=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 58d7e435362e0bac105e8183206e593329e4ae96..fb2afb965c4641df7cdcaf0920f2d56b3717fa9b 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1234,6 +1234,16 @@ config ATH79_MACH_BSB
select ATH79_DEV_USB
select ATH79_DEV_WMAC
+config ATH79_MACH_ARCHER_C25_V1
+ bool "TP-LINK Archer C25 v1 support"
+ select SOC_QCA956X
+ select ATH79_DEV_AP9X_PCI if PCI
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_WMAC
+
config ATH79_MACH_ARCHER_C7
bool "TP-LINK Archer C5/C7/TL-WDR4900 v2 board support"
select SOC_QCA955X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 7aee76019552e14ebdbf7bea357859dedb1a5bbb..3365a43ce16fc77b3212b39b92081efe678e8803 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -56,6 +56,7 @@ obj-$(CONFIG_ATH79_MACH_AP147) += mach-ap147.o
obj-$(CONFIG_ATH79_MACH_AP152) += mach-ap152.o
obj-$(CONFIG_ATH79_MACH_AP90Q) += mach-ap90q.o
obj-$(CONFIG_ATH79_MACH_AP96) += mach-ap96.o
+obj-$(CONFIG_ATH79_MACH_ARCHER_C25_V1) += mach-archer-c25-v1.o
obj-$(CONFIG_ATH79_MACH_ARCHER_C7) += mach-archer-c7.o
obj-$(CONFIG_ATH79_MACH_ARDUINO_YUN) += mach-arduino-yun.o
obj-$(CONFIG_ATH79_MACH_AW_NR580) += mach-aw-nr580.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c25-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c25-v1.c
new file mode 100644
index 0000000000000000000000000000000000000000..a0f001cb49af5aa501c6825c40f3a98ab99503b2
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c25-v1.c
@@ -0,0 +1,227 @@
+/*
+ * TP-Link Archer C25 v1 board support
+ *
+ * Copyright (C) 2017 Ludwig Thomeczek <ledesrc@wxorx.net>
+ * based on mach-archer-c60/C59-v1.c
+ * Copyright (C) 2016 Henryk Heisig <hyniu@o2.pl>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+#include <linux/platform_device.h>
+#include <linux/ath9k_platform.h>
+#include <linux/ar8216_platform.h>
+#include <asm/mach-ath79/ar71xx_regs.h>
+#include <linux/gpio.h>
+
+#include "common.h"
+#include "dev-m25p80.h"
+#include "machtypes.h"
+#include "pci.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-spi.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include <linux/spi/spi_gpio.h>
+#include <linux/spi/74x164.h>
+
+#define ARCHER_C25_GPIO_SHIFT_OE 21 /* OE, Output Enable */
+#define ARCHER_C25_GPIO_SHIFT_SER 14 /* DS, Data Serial Input */
+#define ARCHER_C25_GPIO_SHIFT_SRCLK 15 /* SHCP, Shift Reg Clock Input */
+#define ARCHER_C25_GPIO_SHIFT_SRCLR 19 /* MR, Master Reset */
+#define ARCHER_C25_GPIO_SHIFT_RCLK 16 /* STCP, Storage Reg Clock Input */
+
+#define ARCHER_C25_74HC_GPIO_BASE QCA956X_GPIO_COUNT
+#define ARCHER_C25_74HC_GPIO_LED_WAN_AMBER 27
+#define ARCHER_C25_74HC_GPIO_LED_WAN_GREEN 28
+#define ARCHER_C25_74HC_GPIO_LED_WLAN2 29
+#define ARCHER_C25_74HC_GPIO_LED_WLAN5 30
+#define ARCHER_C25_74HC_GPIO_LED_LAN1 23
+#define ARCHER_C25_74HC_GPIO_LED_LAN2 24
+#define ARCHER_C25_74HC_GPIO_LED_LAN3 25
+#define ARCHER_C25_74HC_GPIO_LED_LAN4 26
+
+#define ARCHER_C25_V1_SSR_BIT_0 0
+#define ARCHER_C25_V1_SSR_BIT_1 1
+#define ARCHER_C25_V1_SSR_BIT_2 2
+#define ARCHER_C25_V1_SSR_BIT_3 3
+#define ARCHER_C25_V1_SSR_BIT_4 4
+#define ARCHER_C25_V1_SSR_BIT_5 5
+#define ARCHER_C25_V1_SSR_BIT_6 6
+#define ARCHER_C25_V1_SSR_BIT_7 7
+
+
+#define ARCHER_C25_V1_KEYS_POLL_INTERVAL 20
+#define ARCHER_C25_V1_KEYS_DEBOUNCE_INTERVAL \
+ (3 * ARCHER_C25_V1_KEYS_POLL_INTERVAL)
+
+#define ARCHER_C25_V1_GPIO_BTN_RESET 1
+#define ARCHER_C25_V1_GPIO_BTN_RFKILL 22
+
+#define ARCHER_C25_V1_GPIO_LED_POWER 17
+#define ARCHER_C25_V1_GPIO_LED_WPS 2
+
+#define ARCHER_C25_V1_WMAC_CALDATA_OFFSET 0x1000
+
+static struct spi_gpio_platform_data archer_c25_v1_spi_data = {
+ .sck = ARCHER_C25_GPIO_SHIFT_SRCLK,
+ .miso = SPI_GPIO_NO_MISO,
+ .mosi = ARCHER_C25_GPIO_SHIFT_SER,
+ .num_chipselect = 1,
+};
+
+static u8 archer_c25_v1_ssr_initdata[] __initdata = {
+ BIT(ARCHER_C25_V1_SSR_BIT_7) |
+ BIT(ARCHER_C25_V1_SSR_BIT_6) |
+ BIT(ARCHER_C25_V1_SSR_BIT_5) |
+ BIT(ARCHER_C25_V1_SSR_BIT_4) |
+ BIT(ARCHER_C25_V1_SSR_BIT_3) |
+ BIT(ARCHER_C25_V1_SSR_BIT_2) |
+ BIT(ARCHER_C25_V1_SSR_BIT_1)
+};
+
+static struct gen_74x164_chip_platform_data archer_c25_v1_ssr_data = {
+ .base = ARCHER_C25_74HC_GPIO_BASE,
+ .num_registers = ARRAY_SIZE(archer_c25_v1_ssr_initdata),
+ .init_data = archer_c25_v1_ssr_initdata,
+};
+
+static struct platform_device archer_c25_v1_spi_device = {
+ .name = "spi_gpio",
+ .id = 1,
+ .dev = {
+ .platform_data = &archer_c25_v1_spi_data,
+ },
+};
+
+static struct spi_board_info archer_c25_v1_spi_info[] = {
+ {
+ .bus_num = 1,
+ .chip_select = 0,
+ .max_speed_hz = 10000000,
+ .modalias = "74x164",
+ .platform_data = &archer_c25_v1_ssr_data,
+ .controller_data = (void *) ARCHER_C25_GPIO_SHIFT_RCLK,
+ },
+};
+
+static struct gpio_led archer_c25_v1_leds_gpio[] __initdata = {
+ {
+ .name = "archer-c25-v1:green:power",
+ .gpio = ARCHER_C25_V1_GPIO_LED_POWER,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:green:wps",
+ .gpio = ARCHER_C25_V1_GPIO_LED_WPS,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:green:wlan2g",
+ .gpio = ARCHER_C25_74HC_GPIO_LED_WLAN2,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:green:wlan5g",
+ .gpio = ARCHER_C25_74HC_GPIO_LED_WLAN5,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:green:lan1",
+ .gpio = ARCHER_C25_74HC_GPIO_LED_LAN1,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:green:lan2",
+ .gpio = ARCHER_C25_74HC_GPIO_LED_LAN2,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:green:lan3",
+ .gpio = ARCHER_C25_74HC_GPIO_LED_LAN3,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:green:lan4",
+ .gpio = ARCHER_C25_74HC_GPIO_LED_LAN4,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:green:wan",
+ .gpio = ARCHER_C25_74HC_GPIO_LED_WAN_GREEN,
+ .active_low = 1,
+ }, {
+ .name = "archer-c25-v1:amber:wan",
+ .gpio = ARCHER_C25_74HC_GPIO_LED_WAN_AMBER,
+ .active_low = 1,
+ },
+};
+
+static struct gpio_keys_button archer_c25_v1_gpio_keys[] __initdata = {
+ {
+ .desc = "Reset button",
+ .type = EV_KEY,
+ .code = KEY_RESTART,
+ .debounce_interval = ARCHER_C25_V1_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = ARCHER_C25_V1_GPIO_BTN_RESET,
+ .active_low = 1,
+ }, {
+ .desc = "RFKILL button",
+ .type = EV_KEY,
+ .code = KEY_RFKILL,
+ .debounce_interval = ARCHER_C25_V1_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = ARCHER_C25_V1_GPIO_BTN_RFKILL,
+ .active_low = 1,
+ },
+};
+
+static void __init archer_c25_v1_setup(void)
+{
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f7e0008);
+ u8 *art = (u8 *) KSEG1ADDR(0x1f7f0000);
+
+ ath79_register_m25p80(NULL);
+
+ spi_register_board_info(archer_c25_v1_spi_info,
+ ARRAY_SIZE(archer_c25_v1_spi_info));
+
+ platform_device_register(&archer_c25_v1_spi_device);
+
+ gpio_request_one(ARCHER_C25_GPIO_SHIFT_OE,
+ GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ "LED control");
+
+ gpio_request_one(ARCHER_C25_GPIO_SHIFT_SRCLR,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "LED reset");
+
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c25_v1_leds_gpio),
+ archer_c25_v1_leds_gpio);
+
+ ath79_register_gpio_keys_polled(-1, ARCHER_C25_V1_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(archer_c25_v1_gpio_keys),
+ archer_c25_v1_gpio_keys);
+
+ ath79_register_mdio(0, 0x0);
+ ath79_register_mdio(1, 0x0);
+
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+ ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
+
+ /* WAN port */
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+ ath79_eth0_data.speed = SPEED_100;
+ ath79_eth0_data.duplex = DUPLEX_FULL;
+ ath79_eth0_data.phy_mask = BIT(4);
+ ath79_register_eth(0);
+
+ /* LAN ports */
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
+ ath79_eth1_data.speed = SPEED_1000;
+ ath79_eth1_data.duplex = DUPLEX_FULL;
+ ath79_switch_data.phy_poll_mask |= BIT(4);
+ ath79_switch_data.phy4_mii_en = 1;
+ ath79_register_eth(1);
+
+ ath79_register_wmac(art + ARCHER_C25_V1_WMAC_CALDATA_OFFSET, mac);
+ ap91_pci_init(NULL, NULL);
+}
+
+MIPS_MACHINE(ATH79_MACH_ARCHER_C25_V1, "ARCHER-C25-V1", "TP-LINK Archer C25 v1",
+ archer_c25_v1_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index a12685cd11a7a6cefe9b69991a5e41db55ccea85..8864e0deda57b926e88dceebd26056a2f8099380 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -40,6 +40,7 @@ enum ath79_mach_type {
ATH79_MACH_AP152, /* Atheros AP152 reference board */
ATH79_MACH_AP90Q, /* YunCore AP90Q */
ATH79_MACH_AP96, /* Atheros AP96 */
+ ATH79_MACH_ARCHER_C25_V1, /* TP-LINK Archer C25 V1 board */
ATH79_MACH_ARCHER_C5, /* TP-LINK Archer C5 board */
ATH79_MACH_ARCHER_C7, /* TP-LINK Archer C7 board */
ATH79_MACH_ARCHER_C7_V2, /* TP-LINK Archer C7 V2 board */
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
index 9cd6c6372ac8f7e509a0a2422616097c1c19edf6..6933654e575a1ef2c92e4c656696a479cba4c594 100644
--- a/target/linux/ar71xx/image/tp-link.mk
+++ b/target/linux/ar71xx/image/tp-link.mk
@@ -103,6 +103,22 @@ $(Device/tplink)
IMAGE_SIZE := 15872k
endef
+define Device/archer-c25-v1
+ DEVICE_TITLE := TP-LINK Archer C25 v1
+ DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887
+ BOARDNAME := ARCHER-C25-V1
+ TPLINK_BOARD_NAME := ARCHER-C25-V1
+ DEVICE_PROFILE := ARCHERC25V1
+ IMAGE_SIZE := 7808k
+ LOADER_TYPE := elf
+ KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
+ IMAGES := sysupgrade.bin factory.bin
+ IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
+ IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
+ MTDPARTS := spi0.0:128k(factory-uboot)ro,64k(u-boot)ro,1536k(kernel),6272k(rootfs),128k(config)ro,64k(art)ro,7808k@0x30000(firmware)
+endef
+TARGET_DEVICES += archer-c25-v1
+
define Device/cpe510-520
DEVICE_TITLE := TP-LINK CPE510/520
DEVICE_PACKAGES := rssileds
diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
index f8d255fd87b8c53511b34b42f4117422218219fe..376835a703f91532300d0dd7c8ef66704acc6e05 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -16,6 +16,7 @@
# CONFIG_ATH79_MACH_AP152 is not set
# CONFIG_ATH79_MACH_AP90Q is not set
# CONFIG_ATH79_MACH_AP96 is not set
+# CONFIG_ATH79_MACH_ARCHER_C25_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C7 is not set
# CONFIG_ATH79_MACH_ARDUINO_YUN is not set
# CONFIG_ATH79_MACH_AW_NR580 is not set
diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default
index c1b5e61c3e9e5f02979584f72621f5e54cde2e36..62be218e33cc6366ea89f363983f36523c419650 100644
--- a/target/linux/ar71xx/nand/config-default
+++ b/target/linux/ar71xx/nand/config-default
@@ -9,6 +9,7 @@
# CONFIG_ATH79_MACH_AP136 is not set
# CONFIG_ATH79_MACH_AP147 is not set
# CONFIG_ATH79_MACH_AP96 is not set
+# CONFIG_ATH79_MACH_ARCHER_C25_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C7 is not set
# CONFIG_ATH79_MACH_AW_NR580 is not set
# CONFIG_ATH79_MACH_CAP324 is not set

View File

@ -0,0 +1,102 @@
From: Ludwig Thomeczek <ledesrc@wxorx.net>
Date: Sat, 13 May 2017 11:40:48 +0200
Subject: firmware-utils: tplink-safeloader: add TP-Link Archer C25 v1
This adds the necessary firmware layout definitions for the Archer C25.
It has an addtional partition containing some static data ("extra-para")
without which no factory flash is possible, therefore put_data() has been
added.
Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index 4e3d2058b286fb7220e5a8308dcdfb25626a1b59..7617566829e159ae9fec00d5de95919a0fb234c6 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -293,6 +293,48 @@ static struct device_info boards[] = {
.last_sysupgrade_partition = "file-system"
},
+ /** Firmware layout for the C25v1 */
+ {
+ .id = "ARCHER-C25-V1",
+ .support_list =
+ "SupportList:\n"
+ "{product_name:ArcherC25,product_ver:1.0.0,special_id:00000000}\n"
+ "{product_name:ArcherC25,product_ver:1.0.0,special_id:55530000}\n"
+ "{product_name:ArcherC25,product_ver:1.0.0,special_id:45550000}\n",
+ .support_trail = '\x00',
+ .soft_ver = "soft_ver:1.0.0\n",
+
+ /**
+ We use a bigger os-image partition than the stock images (and thus
+ smaller file-system), as our kernel doesn't fit in the stock firmware's
+ 1MB os-image.
+ */
+ .partitions = {
+ {"factory-boot", 0x00000, 0x20000},
+ {"fs-uboot", 0x20000, 0x10000},
+ {"os-image", 0x30000, 0x180000}, /* Stock: base 0x30000 size 0x100000 */
+ {"file-system", 0x1b0000, 0x620000}, /* Stock: base 0x130000 size 0x6a0000 */
+ {"user-config", 0x7d0000, 0x04000},
+ {"default-mac", 0x7e0000, 0x00100},
+ {"device-id", 0x7e0100, 0x00100},
+ {"extra-para", 0x7e0200, 0x00100},
+ {"pin", 0x7e0300, 0x00100},
+ {"support-list", 0x7e0400, 0x00400},
+ {"soft-version", 0x7e0800, 0x00400},
+ {"product-info", 0x7e0c00, 0x01400},
+ {"partition-table", 0x7e2000, 0x01000},
+ {"profile", 0x7e3000, 0x01000},
+ {"default-config", 0x7e4000, 0x04000},
+ {"merge-config", 0x7ec000, 0x02000},
+ {"qos-db", 0x7ee000, 0x02000},
+ {"radio", 0x7f0000, 0x10000},
+ {NULL, 0, 0}
+ },
+
+ .first_sysupgrade_partition = "os-image",
+ .last_sysupgrade_partition = "file-system",
+ },
+
/** Firmware layout for the C5 */
{
.id = "ARCHER-C5-V2",
@@ -615,6 +657,15 @@ static struct image_partition_entry read_file(const char *part_name, const char
return entry;
}
+/** Creates a new image partition from arbitrary data */
+static struct image_partition_entry put_data(const char *part_name, const char *datain, size_t len) {
+
+ struct image_partition_entry entry = alloc_image_partition(part_name, len);
+
+ memcpy(entry.data, datain, len);
+
+ return entry;
+}
/**
Copies a list of image partitions into an image buffer and generates the image partition table while doing so
@@ -796,7 +847,8 @@ static void build_image(const char *output,
bool add_jffs2_eof,
bool sysupgrade,
const struct device_info *info) {
- struct image_partition_entry parts[6] = {};
+
+ struct image_partition_entry parts[7] = {};
parts[0] = make_partition_table(info->partitions);
parts[1] = make_soft_version(rev);
@@ -804,6 +856,11 @@ static void build_image(const char *output,
parts[3] = read_file("os-image", kernel_image, false);
parts[4] = read_file("file-system", rootfs_image, add_jffs2_eof);
+ if (strcasecmp(info->id, "ARCHER-C25-V1") == 0) {
+ const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00};
+ parts[5] = put_data("extra-para", mdat, 11);
+ }
+
size_t len;
void *image;
if (sysupgrade)

View File

@ -0,0 +1,152 @@
From: Jan Niehusmann <jan@gondor.com>
Date: Fri, 19 May 2017 09:42:24 +0200
Subject: firmware-utils: tplink-safeloader: support strings as soft_version
Some TP-Link routers (C25, C59, C60) contain a version string instead
of a binary structure in the soft_version partition.
Flashing LEDE from the original firmware's GUI, this version string
taken from the soft_ver partition of the firmware image is written to
the router's config partition.
When using tftp recovery to go back to the original Archer C25 firmware,
a version check compares that version to the version of the firmware to
be flashed.
Without proper contents in the config partition, reverting to the
original firmware fails.
Therefore, write the string "soft_ver:1.0.0\n" to that soft_ver
partition.
Signed-off-by: Jan Niehusmann <jan@gondor.com>
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index 7617566829e159ae9fec00d5de95919a0fb234c6..24684268b1a3fe491c4eb876a5ebefc700f2e56e 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -75,6 +75,7 @@ struct device_info {
const char *vendor;
const char *support_list;
char support_trail;
+ const char *soft_ver;
const struct flash_partition_entry partitions[MAX_PARTITIONS+1];
const char *first_sysupgrade_partition;
const char *last_sysupgrade_partition;
@@ -130,6 +131,7 @@ static struct device_info boards[] = {
"CPE220(TP-LINK|US|N300-2):1.1\r\n"
"CPE220(TP-LINK|EU|N300-2):1.1\r\n",
.support_trail = '\xff',
+ .soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x20000},
@@ -167,6 +169,7 @@ static struct device_info boards[] = {
"CPE520(TP-LINK|US|N300-5):1.1\r\n"
"CPE520(TP-LINK|EU|N300-5):1.1\r\n",
.support_trail = '\xff',
+ .soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x20000},
@@ -198,6 +201,7 @@ static struct device_info boards[] = {
"WBS210(TP-LINK|US|N300-2):1.20\r\n"
"WBS210(TP-LINK|EU|N300-2):1.20\r\n",
.support_trail = '\xff',
+ .soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x20000},
@@ -229,6 +233,7 @@ static struct device_info boards[] = {
"WBS510(TP-LINK|US|N300-5):1.20\r\n"
"WBS510(TP-LINK|EU|N300-5):1.20\r\n",
.support_trail = '\xff',
+ .soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x20000},
@@ -259,6 +264,7 @@ static struct device_info boards[] = {
"SupportList:\r\n"
"{product_name:Archer C2600,product_ver:1.0.0,special_id:00000000}\r\n",
.support_trail = '\x00',
+ .soft_ver = NULL,
.partitions = {
{"SBL1", 0x00000, 0x20000},
@@ -345,6 +351,7 @@ static struct device_info boards[] = {
"product_ver:2.0.0,"
"special_id:00000000}\r\n",
.support_trail = '\x00',
+ .soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x40000},
@@ -379,6 +386,7 @@ static struct device_info boards[] = {
"product_ver:1.0.0,"
"special_id:00000000}\n",
.support_trail = '\x00',
+ .soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x40000},
@@ -411,6 +419,7 @@ static struct device_info boards[] = {
"SupportList:\r\n"
"EAP120(TP-LINK|UN|N300-2):1.0\r\n",
.support_trail = '\xff',
+ .soft_ver = NULL,
.partitions = {
{"fs-uboot", 0x00000, 0x20000},
@@ -440,6 +449,7 @@ static struct device_info boards[] = {
"SupportList:\n"
"{product_name:TL-WR1043ND,product_ver:4.0.0,special_id:45550000}\n",
.support_trail = '\x00',
+ .soft_ver = NULL,
/**
We use a bigger os-image partition than the stock images (and thus
@@ -483,6 +493,7 @@ static struct device_info boards[] = {
"{product_name:RE450,product_ver:1.0.0,special_id:4B520000}\r\n"
"{product_name:RE450,product_ver:1.0.0,special_id:55534100}\r\n",
.support_trail = '\x00',
+ .soft_ver = NULL,
/**
The flash partition table for RE450;
@@ -611,6 +622,23 @@ static struct image_partition_entry make_soft_version(uint32_t rev) {
return entry;
}
+static struct image_partition_entry make_soft_version_from_string(const char *soft_ver) {
+ /** String length _including_ the terminating zero byte */
+ uint32_t ver_len = strlen(soft_ver) + 1;
+ /** Partition contains 64 bit header, the version string, and one additional null byte */
+ size_t partition_len = 2*sizeof(uint32_t) + ver_len + 1;
+ struct image_partition_entry entry = alloc_image_partition("soft-version", partition_len);
+
+ uint32_t *len = (uint32_t *)entry.data;
+ len[0] = htonl(ver_len);
+ len[1] = 0;
+ memcpy(&len[2], soft_ver, ver_len);
+
+ entry.data[partition_len - 1] = 0;
+
+ return entry;
+}
+
/** Generates the support-list partition */
static struct image_partition_entry make_support_list(const struct device_info *info) {
size_t len = strlen(info->support_list);
@@ -851,7 +879,11 @@ static void build_image(const char *output,
struct image_partition_entry parts[7] = {};
parts[0] = make_partition_table(info->partitions);
- parts[1] = make_soft_version(rev);
+ if (info->soft_ver)
+ parts[1] = make_soft_version_from_string(info->soft_ver);
+ else
+ parts[1] = make_soft_version(rev);
+
parts[2] = make_support_list(info);
parts[3] = read_file("os-image", kernel_image, false);
parts[4] = read_file("file-system", rootfs_image, add_jffs2_eof);

View File

@ -0,0 +1,30 @@
From: Andreas Ziegler <github@andreas-ziegler.de>
Date: Thu, 3 Aug 2017 03:34:19 +0200
Subject: add CONFIG_GPIO_74X164 and CONFIG_SPI_GPIO for Archer C25
backport from e39dc8d823c86559eedbbdcee5f5c14b827fed0f
introduced for Archer C59/C60
Based-on-patch-by: Henryk Heisig <hyniu@o2.pl>
Signed-off-by: Andreas Ziegler <github@andreas-ziegler.de>
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index e10401d42ae06506f82f2f5538fbc7df79fd4c65..c82fcf09228be7063967f2517e0942651234afb8 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -272,6 +272,7 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_DEVRES=y
+CONFIG_GPIO_74X164=y
# CONFIG_GPIO_LATCH is not set
CONFIG_GPIO_NXP_74HC153=y
CONFIG_GPIO_PCF857X=y
@@ -429,6 +430,7 @@ CONFIG_SOC_QCA956X=y
CONFIG_SPI=y
CONFIG_SPI_ATH79=y
CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
CONFIG_SPI_MASTER=y
# CONFIG_SPI_RB4XX is not set
# CONFIG_SPI_VSC7385 is not set

View File

@ -0,0 +1,35 @@
From: Sven Roederer <devel-sven@geroedel.de>
Date: Fri, 5 May 2017 22:18:44 +0200
Subject: ramips: use GPIO_ACTIVE macros in UBNT-ERX.dts
- reorder includes
- use GPIO_ACTIVE_LOW macro instead of hardcoded "1"
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
diff --git a/target/linux/ramips/dts/UBNT-ERX.dts b/target/linux/ramips/dts/UBNT-ERX.dts
index 0b2da95b30f0e181e1929502b8ef1aa50a684f69..cf86bbb7e67b1c521c279367ee9e99fee88fae85 100644
--- a/target/linux/ramips/dts/UBNT-ERX.dts
+++ b/target/linux/ramips/dts/UBNT-ERX.dts
@@ -1,9 +1,10 @@
-#include <dt-bindings/input/input.h>
-
/dts-v1/;
#include "mt7621.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
/ {
model = "UBNT-ERX";
@@ -24,7 +25,7 @@
reset {
label = "reset";
- gpios = <&gpio0 12 1>;
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};

View File

@ -0,0 +1,413 @@
From: Sven Roederer <devel-sven@geroedel.de>
Date: Mon, 29 May 2017 11:24:49 +0200
Subject: ramips: add support for Ubiquiti EdgeRouter X-SFP
This patch adds support for the Ubiquiti EdgeRouter X-SFP and
improves support for the EdgeRouter X (PoE-passthrough).
Specification:
- SoC: MediaTek MT7621AT
- Flash: 256 MiB
- RAM: 265 MiB
- Ethernet: 5 x LAN (1000 Mbps)
- UART: 1 x UART on PCB (3.3V, RX, TX, GND) - 57600 8N1
- EdgeRouter X:
- 1 x PoE-Passtrough (Eth4)
- powered by Wallwart or passive PoE
- EdgeRouter X-SFP:
- 5 x PoE-Out (24V, passive)
- 1 x SFP (unknown status)
- powered by Wallwart (24V)
Doesn't work:
* SoC has crypto engine but no open driver.
* SoC has nat acceleration, but no open driver.
* This router has 2MB spi flash soldered in but MT
nand/spi drivers do not support pin sharing,
so it is not accessable and disabled. Stock
firmware could read it and it was empty.
Installation
via vendor firmware:
- build an Initrd-image (> 3MiB) and upload the factory-image
- initrd can have luci-mod-failsafe
- flash final firmware via LuCI / sysupgrade on rebooted system
via TFTP:
- stop uboot into tftp-load into option "1"
- upload factory.bin image
Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 1778dc93297136e3196ad3f74e4b3bea7535cee0..1f5c6429201ba05fc14ff09c6c562d2c114f2a63 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -146,6 +146,7 @@ ramips_setup_interfaces()
rb750gr3|\
rt-n14u|\
ubnt-erx|\
+ ubnt-erx-sfp|\
ur-326n4g|\
wrtnode|\
wrtnode2p | \
diff --git a/target/linux/ramips/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches
new file mode 100755
index 0000000000000000000000000000000000000000..859dfb31f51244e69d3dce5fc80b329cb57729f3
--- /dev/null
+++ b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+. /lib/functions/uci-defaults.sh
+. /lib/ramips.sh
+
+board_config_update
+
+board=$(ramips_board_name)
+
+case "$board" in
+ubnt-erx)
+ ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0"
+ ;;
+ubnt-erx-sfp)
+ ucidef_add_gpio_switch "poe_power_port0" "PoE Power Port0" "496"
+ ucidef_add_gpio_switch "poe_power_port1" "PoE Power Port1" "497"
+ ucidef_add_gpio_switch "poe_power_port2" "PoE Power Port2" "498"
+ ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "499"
+ ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "500"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 17ada648931f16d3e85630dd341defb89ba50d6f..b1091f66b2897a19bd01d4a26a1b3647656fa62b 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -466,6 +466,9 @@ ramips_board_detect() {
*"UBNT-ERX")
name="ubnt-erx"
;;
+ *"UBNT-ERX-SFP")
+ name="ubnt-erx-sfp"
+ ;;
*"UR-326N4G")
name="ur-326n4g"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index a5cca2080d3b96cef92286b1b15f4f8832d9f8c5..d3efc2dd37ed855a1c0e966e448b67ae73324d5f 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -234,7 +234,8 @@ platform_check_image() {
}
return 0
;;
- ubnt-erx)
+ ubnt-erx|\
+ ubnt-erx-sfp)
nand_do_platform_check "$board" "$1"
return $?;
;;
@@ -248,7 +249,8 @@ platform_nand_pre_upgrade() {
local board=$(ramips_board_name)
case "$board" in
- ubnt-erx)
+ ubnt-erx|\
+ ubnt-erx-sfp)
platform_upgrade_ubnt_erx "$ARGV"
;;
esac
@@ -258,7 +260,8 @@ platform_do_upgrade() {
local board=$(ramips_board_name)
case "$board" in
- ubnt-erx)
+ ubnt-erx|\
+ ubnt-erx-sfp)
nand_do_upgrade "$ARGV"
;;
*)
diff --git a/target/linux/ramips/dts/UBNT-ER-e50.dtsi b/target/linux/ramips/dts/UBNT-ER-e50.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..b38c7194942db9f0a713fd8f707b53820d07c78e
--- /dev/null
+++ b/target/linux/ramips/dts/UBNT-ER-e50.dtsi
@@ -0,0 +1,106 @@
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "ubiquiti,edgerouterx";
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x10000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x22>;
+};
+
+&nand {
+ status = "okay";
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ label = "u-boot-env";
+ reg = <0x80000 0x60000>;
+ read-only;
+ };
+
+ factory: partition@e0000 {
+ label = "factory";
+ reg = <0xe0000 0x60000>;
+ };
+
+ partition@140000 {
+ label = "kernel1";
+ reg = <0x140000 0x300000>;
+ };
+
+ partition@440000 {
+ label = "kernel2";
+ reg = <0x440000 0x300000>;
+ };
+
+ partition@740000 {
+ label = "ubi";
+ reg = <0x740000 0xf7c0000>;
+ };
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "uart2", "uart3", "i2c", "pcie", "rgmii2", "jtag";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&spi0 {
+ /* This board has 2Mb spi flash soldered in and visible
+ from manufacturer's firmware.
+ But this SoC shares spi and nand pins,
+ and current driver does't handle this sharing well */
+ status = "disabled";
+
+ m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <1>;
+ spi-max-frequency = <10000000>;
+ m25p,chunked-io = <32>;
+
+ partition@0 {
+ label = "spi";
+ reg = <0x0 0x200000>;
+ read-only;
+ };
+ };
+};
+
+&xhci {
+ status = "disabled";
+};
diff --git a/target/linux/ramips/dts/UBNT-ERX-SFP.dts b/target/linux/ramips/dts/UBNT-ERX-SFP.dts
new file mode 100644
index 0000000000000000000000000000000000000000..ca26d817211e5a5a20a7da926cd2aee726875780
--- /dev/null
+++ b/target/linux/ramips/dts/UBNT-ERX-SFP.dts
@@ -0,0 +1,24 @@
+/dts-v1/;
+
+#include "UBNT-ER-e50.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "UBNT-ERX-SFP";
+ compatible = "ubiquiti,edgerouterx-sfp";
+
+ i2c-gpio {
+ compatible = "i2c-gpio";
+ gpios = <&gpio0 3 GPIO_ACTIVE_HIGH /* sda */
+ &gpio0 4 GPIO_ACTIVE_HIGH /* scl */
+ >;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pca9555@25 {
+ compatible = "pca9555";
+ reg = <0x25>;
+ };
+ };
+};
diff --git a/target/linux/ramips/dts/UBNT-ERX.dts b/target/linux/ramips/dts/UBNT-ERX.dts
index cf86bbb7e67b1c521c279367ee9e99fee88fae85..556d1156c352f76a94c6e39bc3b58c88f08815be 100644
--- a/target/linux/ramips/dts/UBNT-ERX.dts
+++ b/target/linux/ramips/dts/UBNT-ERX.dts
@@ -1,108 +1,7 @@
/dts-v1/;
-#include "mt7621.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "UBNT-ER-e50.dtsi"
/ {
model = "UBNT-ERX";
-
- memory@0 {
- device_type = "memory";
- reg = <0x0 0x10000000>;
- };
-
- chosen {
- bootargs = "console=ttyS0,57600";
- };
-
- gpio-keys-polled {
- compatible = "gpio-keys-polled";
- #address-cells = <1>;
- #size-cells = <0>;
- poll-interval = <20>;
-
- reset {
- label = "reset";
- gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
-};
-
-&ethernet {
- mtd-mac-address = <&factory 0x22>;
-};
-
-&nand {
- status = "okay";
-
- partition@0 {
- label = "u-boot";
- reg = <0x0 0x80000>;
- read-only;
- };
-
- partition@80000 {
- label = "u-boot-env";
- reg = <0x80000 0x60000>;
- read-only;
- };
-
- factory: partition@e0000 {
- label = "factory";
- reg = <0xe0000 0x60000>;
- };
-
- partition@140000 {
- label = "kernel1";
- reg = <0x140000 0x300000>;
- };
-
- partition@440000 {
- label = "kernel2";
- reg = <0x440000 0x300000>;
- };
-
- partition@740000 {
- label = "ubi";
- reg = <0x740000 0xf7c0000>;
- };
-};
-
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "uart2", "uart3", "i2c", "pcie", "rgmii2", "jtag";
- ralink,function = "gpio";
- };
- };
-};
-
-&spi0 {
- /* This board has 2Mb spi flash soldered in and visible
- from manufacturer's firmware.
- But this SoC shares spi and nand pins,
- and current driver does't handle this sharing well */
- status = "disabled";
-
- m25p80@0 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "jedec,spi-nor";
- reg = <1>;
- spi-max-frequency = <10000000>;
- m25p,chunked-io = <32>;
-
- partition@0 {
- label = "spi";
- reg = <0x0 0x200000>;
- read-only;
- };
- };
-};
-
-&xhci {
- status = "disabled";
};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 15ea9a13b6310b1454b5b3b92cd8ed30ee6255b3..8218bea84410536151a216cd2cc0300369ad977a 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -144,6 +144,19 @@ define Device/ubnt-erx
endef
TARGET_DEVICES += ubnt-erx
+define Device/ubnt-erx-sfp
+ DTS := UBNT-ERX-SFP
+ FILESYSTEMS := squashfs
+ KERNEL_SIZE := 3145728
+ KERNEL := $(KERNEL_DTB) | uImage lzma
+ IMAGES := sysupgrade.tar
+ KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
+ IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
+ DEVICE_TITLE := Ubiquiti EdgeRouter X-SFP
+ DEVICE_PACKAGES := -kmod-mt76 -kmod-rt2x00-lib -kmod-mac80211 -kmod-cfg80211 -wpad-mini -iwinfo kmod-i2c-algo-pca kmod-gpio-pca953x kmod-i2c-gpio-custom
+endef
+TARGET_DEVICES += ubnt-erx-sfp
+
define Device/vr500
DTS := VR500
IMAGE_SIZE := 66453504

View File

@ -0,0 +1,367 @@
From: Tim Thorpe <tim@tfthorpe.net>
Date: Mon, 25 Sep 2017 04:38:49 -0500
Subject: ar71xx: add support for TP-Link TL-WR1043N v5
TP-Link TL-WR1043N v5 appears to be identical to the TL-WR1043ND v4,
except that the USB port has been removed and there is no longer a
removable antenna option.
The software is more in line with the Archer series in that it uses a
nested bootloader scheme.
Specifications:
- QCA9563 at 775 MHz
- 64 MB RAM
- 16 MB flash
- 3 (non-detachable) Antennas / 450 Mbit
- 1x/4x WAN/LAN Gbps Ethernet (QCA8337)
- reset and Wi-Fi buttons
Signed-off-by: Tim Thorpe <tim@tfthorpe.net>
Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index e1efb561b33da4dcfcb82ee953cd888170476dfb..e67b5e38561e841b88e486341950c52e1d454322 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -666,14 +666,20 @@ tl-wr1043nd-v2)
ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
;;
+tl-wr1043n-v5|\
tl-wr1043nd-v4)
- ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
+
+ case "$board" in
+ tl-wr1043nd-v4)
+ ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
+ ;;
+ esac
;;
tl-wr2543n)
ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 24ead87850f13346ea4be4f9bfb5582e64a2c4ad..27a0266923743d4856919b9c8772a40e59febe83 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -237,7 +237,8 @@ ar71xx_setup_interfaces()
mynet-n750|\
sr3200|\
wndr3700v4|\
- wndr4300)
+ wndr4300|\
+ tl-wr1043n-v5)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
;;
@@ -481,6 +482,7 @@ ar71xx_setup_macs()
lan_mac=$(mtd_get_mac_binary caldata 0)
wan_mac=$(mtd_get_mac_binary caldata 6)
;;
+ tl-wr1043n-v5|\
tl-wr1043nd-v4)
lan_mac=$(mtd_get_mac_binary product-info 8)
wan_mac=$(macaddr_add "$lan_mac" 1)
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 38cc5d7853c79f2a7800a387310a95abb3b4de1b..61db387c9ecefd7090c25a5f5d75fdbf65a44d65 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -359,6 +359,7 @@ get_status_led() {
tl-wdr3320-v2|\
tl-wdr3500|\
tl-wr1041n-v2|\
+ tl-wr1043n-v5|\
tl-wr1043nd|\
tl-wr1043nd-v2|\
tl-wr1043nd-v4|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 46711af2b26159ebb105fa97cd8a85bb9c00911a..de6042b202bbd07e64833743933be1cbaf1ed495 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -944,6 +944,9 @@ ar71xx_board_detect() {
*"TL-WR1043ND v4")
name="tl-wr1043nd-v4"
;;
+ *"TL-WR1043N v5")
+ name="tl-wr1043n-v5"
+ ;;
*TL-WR2543N*)
name="tl-wr2543n"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index e65f6e2f7594ba373fbc9a26620859b9005c8532..e748a2559cdb3a0ca6618429b0f613a656e39388 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -261,6 +261,7 @@ platform_check_image() {
tew-712br|\
tew-732br|\
tew-823dru|\
+ tl-wr1043n-v5|\
unifi-outdoor|\
unifiac-lite|\
unifiac-pro|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index c82fcf09228be7063967f2517e0942651234afb8..57b6d2e541d7ef9dea8570ba8de72164d97b9775 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -181,6 +181,7 @@ CONFIG_ATH79_MACH_TL_WR1041N_V2=y
CONFIG_ATH79_MACH_TL_WR1043ND=y
CONFIG_ATH79_MACH_TL_WR1043ND_V2=y
CONFIG_ATH79_MACH_TL_WR1043ND_V4=y
+CONFIG_ATH79_MACH_TL_WR1043N_V5=y
CONFIG_ATH79_MACH_TL_WR2543N=y
CONFIG_ATH79_MACH_TL_WR703N=y
CONFIG_ATH79_MACH_TL_WR720N_V3=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index fb2afb965c4641df7cdcaf0920f2d56b3717fa9b..7ad5419f51ec9909d8b59f33178221a7d81ec184 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1564,6 +1564,15 @@ config ATH79_MACH_TL_WR1041N_V2
select ATH79_DEV_USB
select ATH79_DEV_WMAC
+config ATH79_MACH_TL_WR1043N_V5
+ bool "TP-LINK TL-WR1043N v5 support"
+ select SOC_QCA956X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_WMAC
+
config ATH79_MACH_TL_WR1043ND
bool "TP-LINK TL-WR1043ND support"
select SOC_AR913X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
index b1539c5d71a61806b88c50f1a78f6a27d98d7a2d..450819a9e6baa997dab2dfba4c5a19261aae9664 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
@@ -5,6 +5,7 @@
* Copyright (C) 2016 Matthias Schiffer <mschiffer@universe-factory.net>
* Copyright (C) 2016 Andreas Ziegler <github@andreas-ziegler.de>
* Copyright (C) 2016 Ludwig Thomeczek <ledesrc@wxorx.net>
+ * Copyright (C) 2017 Tim Thorpe <tim@tfthorpe.net>
*
* Derived from: mach-dir-869-a1.c
*
@@ -62,6 +63,8 @@
#define TL_WR1043_V4_EEPROM_ADDR 0x1fff0000
#define TL_WR1043_V4_WMAC_CALDATA_OFFSET 0x1000
+#define TL_WR1043N_V5_MAC_LOCATION 0x1ff00008
+
static struct gpio_led tl_wr1043nd_v4_leds_gpio[] __initdata = {
{
.name = "tp-link:green:wps",
@@ -188,3 +191,82 @@ static void __init tl_wr1043nd_v4_setup(void)
MIPS_MACHINE(ATH79_MACH_TL_WR1043ND_V4, "TL-WR1043ND-v4",
"TP-LINK TL-WR1043ND v4", tl_wr1043nd_v4_setup);
+
+static struct gpio_led tl_wr1043n_v5_leds_gpio[] __initdata = {
+ {
+ .name = "tp-link:green:wps",
+ .gpio = TL_WR1043_V4_GPIO_LED_WPS,
+ .active_low = 1,
+ },
+ {
+ .name = "tp-link:green:system",
+ .gpio = TL_WR1043_V4_GPIO_LED_SYSTEM,
+ .active_low = 1,
+ },
+ {
+ .name = "tp-link:green:wlan",
+ .gpio = TL_WR1043_V4_GPIO_LED_WLAN,
+ .active_low = 1,
+ },
+ {
+ .name = "tp-link:green:wan",
+ .gpio = TL_WR1043_V4_GPIO_LED_WAN,
+ .active_low = 1,
+ },
+ {
+ .name = "tp-link:green:lan1",
+ .gpio = TL_WR1043_V4_GPIO_LED_LAN1,
+ .active_low = 1,
+ },
+ {
+ .name = "tp-link:green:lan2",
+ .gpio = TL_WR1043_V4_GPIO_LED_LAN2,
+ .active_low = 1,
+ },
+ {
+ .name = "tp-link:green:lan3",
+ .gpio = TL_WR1043_V4_GPIO_LED_LAN3,
+ .active_low = 1,
+ },
+ {
+ .name = "tp-link:green:lan4",
+ .gpio = TL_WR1043_V4_GPIO_LED_LAN4,
+ .active_low = 1,
+ },
+};
+
+/* The 1043Nv5 is identical to the 1043NDv4,
+ * only missing the usb and small firmware layout changes */
+static void __init tl_wr1043nv5_setup(void)
+{
+ u8 *art = (u8 *) KSEG1ADDR(TL_WR1043_V4_EEPROM_ADDR);
+ u8 *mac = (u8 *) KSEG1ADDR(TL_WR1043N_V5_MAC_LOCATION);
+
+ ath79_register_m25p80(NULL);
+
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr1043n_v5_leds_gpio),
+ tl_wr1043n_v5_leds_gpio);
+ ath79_register_gpio_keys_polled(-1, TL_WR1043_V4_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(tl_wr1043nd_v4_gpio_keys),
+ tl_wr1043nd_v4_gpio_keys);
+
+ platform_device_register(&ath79_mdio0_device);
+
+ mdiobus_register_board_info(tl_wr1043nd_v4_mdio0_info,
+ ARRAY_SIZE(tl_wr1043nd_v4_mdio0_info));
+
+ ath79_register_wmac(art + TL_WR1043_V4_WMAC_CALDATA_OFFSET, mac);
+
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+
+ /* GMAC0 is connected to an AR8337 switch */
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+ ath79_eth0_data.speed = SPEED_1000;
+ ath79_eth0_data.duplex = DUPLEX_FULL;
+ ath79_eth0_data.phy_mask = BIT(0);
+ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+ ath79_register_eth(0);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WR1043N_V5, "TL-WR1043N-v5", "TP-LINK TL-WR1043N v5",
+ tl_wr1043nv5_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 8864e0deda57b926e88dceebd26056a2f8099380..9cb4a7f2e1df641232289721b676a9b0149c76e5 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -214,6 +214,7 @@ enum ath79_mach_type {
ATH79_MACH_TL_WDR6500_V2, /* TP-LINK TL-WDR6500 v2 */
ATH79_MACH_TL_WPA8630, /* TP-Link TL-WPA8630 */
ATH79_MACH_TL_WR1041N_V2, /* TP-LINK TL-WR1041N v2 */
+ ATH79_MACH_TL_WR1043N_V5, /* TP-LINK TL-WR1043N v5 */
ATH79_MACH_TL_WR1043ND, /* TP-LINK TL-WR1043ND */
ATH79_MACH_TL_WR1043ND_V2, /* TP-LINK TL-WR1043ND v2 */
ATH79_MACH_TL_WR1043ND_V4, /* TP-LINK TL-WR1043ND v4 */
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
index 6933654e575a1ef2c92e4c656696a479cba4c594..5be7cbfbd4ab7d73d679d52d2581459250e04302 100644
--- a/target/linux/ar71xx/image/tp-link.mk
+++ b/target/linux/ar71xx/image/tp-link.mk
@@ -858,7 +858,22 @@ define Device/tl-wr1043nd-v4
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
-TARGET_DEVICES += tl-wr1043nd-v1 tl-wr1043nd-v2 tl-wr1043nd-v3 tl-wr1043nd-v4
+
+define Device/tl-wr1043n-v5
+ DEVICE_TITLE := TP-LINK TL-WR1043N v5
+ BOARDNAME := TL-WR1043N-v5
+ SUPPORTED_DEVICES := tl-wr1043n-v5
+ DEVICE_PROFILE := TLWR1043
+ MTDPARTS := spi0.0:128k(factory-uboot)ro,128k(u-boot)ro,15104k(firmware),128k(product-info)ro,640k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(art)ro
+ IMAGE_SIZE := 15104k
+ KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
+ IMAGES := sysupgrade.bin factory.bin
+ IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
+ append-metadata | check-size $$$$(IMAGE_SIZE)
+ IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
+ TPLINK_BOARD_NAME := TLWR1043NV5
+endef
+TARGET_DEVICES += tl-wr1043nd-v1 tl-wr1043nd-v2 tl-wr1043nd-v3 tl-wr1043nd-v4 tl-wr1043n-v5
define Device/tl-wr2543-v1
$(Device/tplink-8mlzma)
diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
index 376835a703f91532300d0dd7c8ef66704acc6e05..f5af38a726f5ce33391223a4dbeb2fc0a8cac613 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -143,6 +143,7 @@ CONFIG_ATH79_MACH_RBSXTLITE=y
# CONFIG_ATH79_MACH_TL_WDR6500_V2 is not set
# CONFIG_ATH79_MACH_TL_WPA8630 is not set
# CONFIG_ATH79_MACH_TL_WR1041N_V2 is not set
+# CONFIG_ATH79_MACH_TL_WR1043N_V5 is not set
# CONFIG_ATH79_MACH_TL_WR1043ND is not set
# CONFIG_ATH79_MACH_TL_WR1043ND_V2 is not set
# CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default
index 62be218e33cc6366ea89f363983f36523c419650..5c18f5d594d625f91ff10e21ddc5af2b3b4d768f 100644
--- a/target/linux/ar71xx/nand/config-default
+++ b/target/linux/ar71xx/nand/config-default
@@ -52,6 +52,7 @@
# CONFIG_ATH79_MACH_TL_WDR3500 is not set
# CONFIG_ATH79_MACH_TL_WDR4300 is not set
# CONFIG_ATH79_MACH_TL_WR1041N_V2 is not set
+# CONFIG_ATH79_MACH_TL_WR1043N_V5 is not set
# CONFIG_ATH79_MACH_TL_WR1043ND is not set
# CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
# CONFIG_ATH79_MACH_TL_WR2543N is not set
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index 24684268b1a3fe491c4eb876a5ebefc700f2e56e..478d5d8e9b43bbe37694732c138048c8fe8d807c 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -478,6 +478,42 @@ static struct device_info boards[] = {
.last_sysupgrade_partition = "file-system"
},
+ /** Firmware layout for the TL-WR1043 v5 */
+ {
+ .id = "TLWR1043NV5",
+ .vendor = "",
+ .support_list =
+ "SupportList:\n"
+ "{product_name:TL-WR1043N,product_ver:5.0.0,special_id:45550000}\n"
+ "{product_name:TL-WR1043N,product_ver:5.0.0,special_id:55530000}\n",
+ .support_trail = '\x00',
+ .soft_ver = "soft_ver:1.0.0\n",
+ .partitions = {
+ {"factory-boot", 0x00000, 0x20000},
+ {"fs-uboot", 0x20000, 0x20000},
+ {"os-image", 0x40000, 0x180000},
+ {"file-system", 0x1c0000, 0xd40000},
+ {"default-mac", 0xf00000, 0x00200},
+ {"pin", 0xf00200, 0x00200},
+ {"device-id", 0xf00400, 0x00100},
+ {"product-info", 0xf00500, 0x0fb00},
+ {"soft-version", 0xf10000, 0x01000},
+ {"extra-para", 0xf11000, 0x01000},
+ {"support-list", 0xf12000, 0x0a000},
+ {"profile", 0xf1c000, 0x04000},
+ {"default-config", 0xf20000, 0x10000},
+ {"user-config", 0xf30000, 0x40000},
+ {"qos-db", 0xf70000, 0x40000},
+ {"certificate", 0xfb0000, 0x10000},
+ {"partition-table", 0xfc0000, 0x10000},
+ {"log", 0xfd0000, 0x20000},
+ {"radio", 0xff0000, 0x10000},
+ {NULL, 0, 0}
+ },
+ .first_sysupgrade_partition = "os-image",
+ .last_sysupgrade_partition = "file-system"
+ },
+
/** Firmware layout for the RE450 */
{
.id = "RE450",
@@ -888,7 +924,9 @@ static void build_image(const char *output,
parts[3] = read_file("os-image", kernel_image, false);
parts[4] = read_file("file-system", rootfs_image, add_jffs2_eof);
- if (strcasecmp(info->id, "ARCHER-C25-V1") == 0) {
+ /* Some devices need the extra-para partition to accept the firmware */
+ if (strcasecmp(info->id, "ARCHER-C25-V1") == 0 ||
+ strcasecmp(info->id, "TLWR1043NV5") == 0) {
const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00};
parts[5] = put_data("extra-para", mdat, 11);
}

View File

@ -0,0 +1,162 @@
From: Henryk Heisig <hyniu@o2.pl>
Date: Fri, 6 Jan 2017 21:21:11 +0100
Subject: ar71xx: QCA956X: add missing register
Signed-off-by: Henryk Heisig <hyniu@o2.pl>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index 790c2d3396ffd0a0d00d13403b7f22e32863eef4..a8b19b68b2a46545fdd3ed6bdf14006f8a741185 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -686,7 +686,6 @@ static int __init ath79_setup_phy_if_mode(unsigned int id,
case ATH79_SOC_AR7241:
case ATH79_SOC_AR9330:
case ATH79_SOC_AR9331:
- case ATH79_SOC_QCA956X:
case ATH79_SOC_TP9343:
pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII;
break;
@@ -698,6 +697,7 @@ static int __init ath79_setup_phy_if_mode(unsigned int id,
case ATH79_SOC_AR9342:
case ATH79_SOC_AR9344:
case ATH79_SOC_QCA9533:
+ case ATH79_SOC_QCA956X:
switch (pdata->phy_if_mode) {
case PHY_INTERFACE_MODE_MII:
case PHY_INTERFACE_MODE_GMII:
@@ -814,6 +814,27 @@ void __init ath79_setup_qca955x_eth_cfg(u32 mask)
iounmap(base);
}
+void __init ath79_setup_qca956x_eth_cfg(u32 mask)
+{
+ void __iomem *base;
+ u32 t;
+
+ base = ioremap(QCA956X_GMAC_BASE, QCA956X_GMAC_SIZE);
+
+ t = __raw_readl(base + QCA956X_GMAC_REG_ETH_CFG);
+
+ t &= ~(QCA956X_ETH_CFG_SW_ONLY_MODE |
+ QCA956X_ETH_CFG_SW_PHY_SWAP);
+
+ t |= mask;
+
+ __raw_writel(t, base + QCA956X_GMAC_REG_ETH_CFG);
+ /* flush write */
+ __raw_readl(base + QCA956X_GMAC_REG_ETH_CFG);
+
+ iounmap(base);
+}
+
static int ath79_eth_instance __initdata;
void __init ath79_register_eth(unsigned int id)
{
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h
index 5a226e40284b6853b59812ffc791e0612c91fa9b..fb9e4f63c66ef9008e423007ecff02c93c321fb8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.h
@@ -49,5 +49,6 @@ void ath79_setup_ar933x_phy4_switch(bool mac, bool mdio);
void ath79_setup_ar934x_eth_cfg(u32 mask);
void ath79_setup_ar934x_eth_rx_delay(unsigned int rxd, unsigned int rxdv);
void ath79_setup_qca955x_eth_cfg(u32 mask);
+void ath79_setup_qca956x_eth_cfg(u32 mask);
#endif /* _ATH79_DEV_ETH_H */
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
index 5fd352c638a75063945adadb64b1043cd81b506c..078fa157f242ce4350185d97a61ef5d1f3f16fc5 100644
--- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
+++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
@@ -37,11 +37,13 @@ struct ag71xx_platform_data {
u8 is_ar724x:1;
u8 has_ar8216:1;
u8 use_flow_control:1;
+ u8 is_qca956x:1;
struct ag71xx_switch_platform_data *switch_data;
void (*ddr_flush)(void);
void (*set_speed)(int speed);
+ void (*update_pll)(u32 pll_10, u32 pll_100, u32 pll_1000);
u32 fifo_cfg1;
u32 fifo_cfg2;
diff --git a/target/linux/ar71xx/patches-4.4/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-4.4/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch
new file mode 100644
index 0000000000000000000000000000000000000000..dff354398cd2ab6556b13be9f7ce45f4d7f311e8
--- /dev/null
+++ b/target/linux/ar71xx/patches-4.4/622-MIPS-ath79-add-more-register-defines-for-QCA956x-SoC.patch
@@ -0,0 +1,38 @@
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -157,6 +157,10 @@
+ #define QCA956X_EHCI0_BASE 0x1b000000
+ #define QCA956X_EHCI1_BASE 0x1b400000
+ #define QCA956X_EHCI_SIZE 0x200
++#define QCA956X_GMAC_SGMII_BASE (AR71XX_APB_BASE + 0x00070000)
++#define QCA956X_GMAC_SGMII_SIZE 0x64
++#define QCA956X_PLL_BASE (AR71XX_APB_BASE + 0x00050000)
++#define QCA956X_PLL_SIZE 0x50
+ #define QCA956X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000)
+ #define QCA956X_GMAC_SIZE 0x64
+
+@@ -404,6 +408,7 @@
+ #define QCA956X_PLL_DDR_CONFIG_REG 0x08
+ #define QCA956X_PLL_DDR_CONFIG1_REG 0x0c
+ #define QCA956X_PLL_CLK_CTRL_REG 0x10
++#define QCA956X_PLL_ETH_XMII_CONTROL_REG 0x30
+
+ #define QCA956X_PLL_CPU_CONFIG_REFDIV_SHIFT 12
+ #define QCA956X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f
+@@ -1186,4 +1191,16 @@
+ #define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3
+ #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20
+
++/*
++ * QCA956X GMAC Interface
++ */
++
++#define QCA956X_GMAC_REG_ETH_CFG 0x00
++
++#define QCA956X_ETH_CFG_SW_ONLY_MODE BIT(7)
++#define QCA956X_ETH_CFG_SW_PHY_SWAP BIT(8)
++#define QCA956X_ETH_CFG_SW_PHY_ADDR_SWAP BIT(9)
++#define QCA956X_ETH_CFG_SW_APB_ACCESS BIT(10)
++#define QCA956X_ETH_CFG_SW_ACC_MSB_FIRST BIT(13)
++
+ #endif /* __ASM_MACH_AR71XX_REGS_H */
diff --git a/target/linux/ar71xx/patches-4.4/640-MIPS-ath79-add-QCA955x-wmac-reset.patch b/target/linux/ar71xx/patches-4.4/640-MIPS-ath79-add-QCA955x-wmac-reset.patch
index add2992186ad1d82ce924d2f1ccdf3c36c390a3d..8aa5957a7152af27854f6f7c197120b8029cf9e8 100644
--- a/target/linux/ar71xx/patches-4.4/640-MIPS-ath79-add-QCA955x-wmac-reset.patch
+++ b/target/linux/ar71xx/patches-4.4/640-MIPS-ath79-add-QCA955x-wmac-reset.patch
@@ -20,7 +20,7 @@
#define AR71XX_UART_BASE (AR71XX_APB_BASE + 0x00020000)
#define AR71XX_UART_SIZE 0x100
#define AR71XX_USB_CTRL_BASE (AR71XX_APB_BASE + 0x00030000)
-@@ -218,6 +218,9 @@
+@@ -222,6 +222,9 @@
#define QCA953X_DDR_REG_FLUSH_PCIE 0xa8
#define QCA953X_DDR_REG_FLUSH_WMAC 0xac
diff --git a/target/linux/ar71xx/patches-4.4/820-MIPS-ath79-add_gpio_function2_setup.patch b/target/linux/ar71xx/patches-4.4/820-MIPS-ath79-add_gpio_function2_setup.patch
index 7db6ad361fa21252118e589195b0bc73222cf4f5..6b331587d157511a40fc1e46630c416a60565a0b 100644
--- a/target/linux/ar71xx/patches-4.4/820-MIPS-ath79-add_gpio_function2_setup.patch
+++ b/target/linux/ar71xx/patches-4.4/820-MIPS-ath79-add_gpio_function2_setup.patch
@@ -48,7 +48,7 @@ functions on the Arduino Yun.
void __iomem *reg = ath79_gpio_get_function_reg();
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -850,6 +850,7 @@
+@@ -855,6 +855,7 @@
#define AR71XX_GPIO_REG_INT_PENDING 0x20
#define AR71XX_GPIO_REG_INT_ENABLE 0x24
#define AR71XX_GPIO_REG_FUNC 0x28
@@ -56,7 +56,7 @@ functions on the Arduino Yun.
#define AR934X_GPIO_REG_OUT_FUNC0 0x2c
#define AR934X_GPIO_REG_OUT_FUNC1 0x30
-@@ -974,6 +975,8 @@
+@@ -979,6 +980,8 @@
#define AR724X_GPIO_FUNC_UART_EN BIT(1)
#define AR724X_GPIO_FUNC_JTAG_DISABLE BIT(0)

View File

@ -0,0 +1,71 @@
From: Vittorio Gambaletta <openwrt@vittgam.net>
Date: Sat, 25 Mar 2017 18:08:02 +0100
Subject: ag71xx: Fix rx ring buffer stall on small packets flood on qca956x and qca953x.
Backported from Code Aurora QSDK
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index a8b19b68b2a46545fdd3ed6bdf14006f8a741185..427de6a50d0fcbc9dae11f8e6921194c0a5b09ed 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -996,6 +996,9 @@ void __init ath79_register_eth(unsigned int id)
pdata->reset_bit = AR934X_RESET_GE0_MAC |
AR934X_RESET_GE0_MDIO;
pdata->set_speed = ar934x_set_speed_ge0;
+
+ if (ath79_soc == ATH79_SOC_QCA9533)
+ pdata->disable_inline_checksum_engine = 1;
} else {
pdata->reset_bit = AR934X_RESET_GE1_MAC |
AR934X_RESET_GE1_MDIO;
@@ -1097,6 +1100,8 @@ void __init ath79_register_eth(unsigned int id)
pdata->set_speed = qca956x_set_speed_sgmii;
else
pdata->set_speed = ar934x_set_speed_ge0;
+
+ pdata->disable_inline_checksum_engine = 1;
} else {
pdata->reset_bit = QCA955X_RESET_GE1_MAC |
QCA955X_RESET_GE1_MDIO;
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
index 078fa157f242ce4350185d97a61ef5d1f3f16fc5..5fdc59c7b78b84670daefa9fd831b154ded84ddc 100644
--- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
+++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
@@ -37,7 +37,7 @@ struct ag71xx_platform_data {
u8 is_ar724x:1;
u8 has_ar8216:1;
u8 use_flow_control:1;
- u8 is_qca956x:1;
+ u8 disable_inline_checksum_engine:1;
struct ag71xx_switch_platform_data *switch_data;
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 566e9513d8b7c6ef101902ae7d281dcc1c233893..72dd654a691355c881b15d796fad0d640e05fc15 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -629,6 +629,22 @@ __ag71xx_link_adjust(struct ag71xx *ag, bool update)
ag71xx_wr(ag, AG71XX_REG_MAC_CFG2, cfg2);
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG5, fifo5);
ag71xx_wr(ag, AG71XX_REG_MAC_IFCTL, ifctl);
+
+ if (pdata->disable_inline_checksum_engine) {
+ /*
+ * The rx ring buffer can stall on small packets on QCA953x and
+ * QCA956x. Disabling the inline checksum engine fixes the stall.
+ * The wr, rr functions cannot be used since this hidden register
+ * is outside of the normal ag71xx register block.
+ */
+ void __iomem *dam = ioremap_nocache(0xb90001bc, 0x4);
+ if (dam) {
+ __raw_writel(__raw_readl(dam) & ~BIT(27), dam);
+ (void)__raw_readl(dam);
+ iounmap(dam);
+ }
+ }
+
ag71xx_hw_start(ag);
netif_carrier_on(ag->dev);

View File

@ -18,6 +18,10 @@ alias() {
:
}
manifest_alias() {
:
}
packages() {
:
}

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e
@ -14,6 +14,7 @@ FEEDS="$GLUON_SITE_FEEDS $GLUON_FEEDS"
done
) > lede/feeds.conf
rm -rf lede/tmp
rm -rf lede/feeds
rm -rf lede/package/feeds

View File

@ -9,6 +9,7 @@ default_sysupgrade_ext='.bin'
output=
aliases=
manifest_aliases=
sysupgrade_ext=
@ -33,6 +34,10 @@ generate() {
for alias in $aliases; do
generate_line "$alias" "gluon-${SITE_CODE}-${GLUON_RELEASE}-${alias}-sysupgrade${sysupgrade_ext}"
done
for alias in $manifest_aliases; do
generate_line "$alias" "gluon-${SITE_CODE}-${GLUON_RELEASE}-${output}-sysupgrade${sysupgrade_ext}"
done
fi
}
@ -44,6 +49,7 @@ device() {
output="$1"
aliases=
manifest_aliases=
sysupgrade_ext="$default_sysupgrade_ext"
}
@ -53,6 +59,7 @@ sysupgrade_image() {
output="$1"
aliases=
manifest_aliases=
if [ "$3" ]; then
sysupgrade_ext="$3"
@ -65,6 +72,10 @@ alias() {
aliases="$aliases $1"
}
manifest_alias() {
manifest_aliases="$manifest_aliases $1"
}
sysupgrade() {
if [ "$2" ]; then
sysupgrade_ext="$2"

View File

@ -1,10 +1,12 @@
ATH10K_PACKAGES=
ATH10K_PACKAGES_QCA9887=
if [ "$GLUON_ATH10K_MESH" = '11s' ]; then
ATH10K_PACKAGES='-kmod-ath10k kmod-ath10k-ct'
fi
if [ "$GLUON_ATH10K_MESH" = 'ibss' ]; then
ATH10K_PACKAGES='-kmod-ath10k kmod-ath10k-ct -ath10k-firmware-qca988x ath10k-firmware-qca988x-ct'
ATH10K_PACKAGES_QCA9887='-kmod-ath10k kmod-ath10k-ct -ath10k-firmware-qca9887 ath10k-firmware-qca9887-ct'
fi
@ -60,6 +62,8 @@ device gl-inet-6416a-v1 gl-inet-6416A-v1
device gl-ar150 gl-ar150
factory
device gl-ar300m gl-ar300m
factory
# Linksys by Cisco
@ -164,6 +168,7 @@ device tp-link-tl-wr1043n-nd-v1 tl-wr1043nd-v1
device tp-link-tl-wr1043n-nd-v2 tl-wr1043nd-v2
device tp-link-tl-wr1043n-nd-v3 tl-wr1043nd-v3
device tp-link-tl-wr1043n-nd-v4 tl-wr1043nd-v4
device tp-link-tl-wr1043n-v5 tl-wr1043n-v5
device tp-link-tl-wdr3500-v1 tl-wdr3500-v1
device tp-link-tl-wdr3600-v1 tl-wdr3600-v1
@ -179,6 +184,11 @@ device tp-link-archer-c7-v2 archer-c7-v2
packages $ATH10K_PACKAGES
factory -squashfs-factory${GLUON_REGION:+-${GLUON_REGION}} .bin
if [ "$BROKEN" ]; then
device tp-link-archer-c25-v1 archer-c25-v1 # instability with 5GHz mesh in some environments
packages $ATH10K_PACKAGES_QCA9887
fi
device tp-link-re450 re450
packages $ATH10K_PACKAGES
fi

View File

@ -6,6 +6,8 @@ config 'CONFIG_BUSYBOX_CUSTOM=y'
config 'CONFIG_BUSYBOX_CONFIG_SHA256SUM=y'
config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set'
config '# CONFIG_KMOD_BATMAN_ADV_MCAST is not set'
config 'CONFIG_PACKAGE_ATH_DEBUG=y'
config 'CONFIG_TARGET_MULTI_PROFILE=y'

View File

@ -1,10 +1,29 @@
# D-Link
# BROKEN: No AP+IBSS support, 11s has high packet loss
if [ "$BROKEN" ]; then
## D-Link
device d-link-dir-860l-b1 dir-860l-b1
# Ubiquiti
## ZBT
device zbt-wg3526 zbt-wg3526
factory
fi
# Devices without WLAN
## Ubiquiti
device ubnt-erx ubnt-erx
packages '-hostapd-mini'
factory
sysupgrade '.tar'
device ubnt-erx-sfp ubnt-erx-sfp
packages '-hostapd-mini'
factory
sysupgrade '.tar'

View File

@ -5,3 +5,5 @@ factory
device vocore-16M vocore-16M
factory
device a5-v11 a5-v11

View File

@ -4,6 +4,7 @@ $(eval $(call GluonTarget,ar71xx,nand))
$(eval $(call GluonTarget,brcm2708,bcm2708))
$(eval $(call GluonTarget,brcm2708,bcm2709))
$(eval $(call GluonTarget,mpc85xx,generic))
$(eval $(call GluonTarget,ramips,mt7621))
$(eval $(call GluonTarget,x86,generic))
$(eval $(call GluonTarget,x86,geode))
$(eval $(call GluonTarget,x86,64))
@ -12,7 +13,6 @@ ifneq ($(BROKEN),)
$(eval $(call GluonTarget,ar71xx,mikrotik)) # BROKEN: no sysupgrade support
$(eval $(call GluonTarget,ipq806x)) # BROKEN: Untested
$(eval $(call GluonTarget,mvebu)) # BROKEN: No AP+IBSS or 11s support
$(eval $(call GluonTarget,ramips,mt7621)) # BROKEN: No AP+IBSS support, 11s has high packet loss
$(eval $(call GluonTarget,ramips,mt7628)) # BROKEN: No AP+IBSS support
$(eval $(call GluonTarget,ramips,rt305x)) # BROKEN: No AP+IBSS support
$(eval $(call GluonTarget,sunxi)) # BROKEN: Untested

View File

@ -7,3 +7,5 @@ factory_image x86-generic combined-ext4 .img.gz
factory_image x86-generic combined-ext4 .vdi
factory_image x86-generic combined-ext4 .vmdk
sysupgrade_image x86-generic combined-ext4 .img.gz
manifest_alias x86-kvm
manifest_alias x86-xen_domu