Compare commits
61 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
55706d391d | ||
|
94f6f2766e | ||
|
7c2636d282 | ||
|
7268e49a30 | ||
|
20f693bc4a | ||
|
017fbe88bb | ||
|
5a3f7b33b4 | ||
|
f4703a3aa6 | ||
|
ad0824136e | ||
|
0684272823 | ||
|
43c92f25fa | ||
|
8d0dba79e5 | ||
|
dfa11d663d | ||
|
ba56b41dda | ||
|
b62af904bb | ||
|
72e585ceed | ||
|
e859de8c39 | ||
|
3e2e72729f | ||
|
41f5cdf526 | ||
|
a94d6d3cf8 | ||
|
9cecb1e836 | ||
|
ff4932e477 | ||
|
3576c8e6a7 | ||
|
8239d87e8c | ||
|
491e8e0332 | ||
|
5463f925ea | ||
|
77b39908bd | ||
|
f4d642d516 | ||
|
41d28c9332 | ||
|
973c6dd479 | ||
|
d513b22e37 | ||
|
b0a6cb7226 | ||
|
e740c592ab | ||
|
6114630e3b | ||
|
1d16f0d433 | ||
|
c197d028ec | ||
|
826ac88493 | ||
|
bba83bffcc | ||
|
4a75648658 | ||
|
145984eed9 | ||
|
808723b9fb | ||
|
1c1b5bdbc3 | ||
|
b854555a3d | ||
|
d7ace5b8b1 | ||
|
568997f10f | ||
|
113688d83d | ||
|
7db9bfc273 | ||
|
dce540bee5 | ||
|
be55bd4d52 | ||
|
ad1c3a2f6c | ||
|
7559df3050 | ||
|
45c62c32cb | ||
|
c6a3afa130 | ||
|
5ec5304f80 | ||
|
224321c230 | ||
|
76998cb5ed | ||
|
fbf6807fb8 | ||
|
e9caeaf30d | ||
|
75f2c45ec2 | ||
|
bcca4a2f11 | ||
|
45f05c9a84 |
3
Makefile
3
Makefile
@ -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
|
export GLUON_RELEASE GLUON_ATH10K_MESH GLUON_REGION GLUON_DEBUG
|
||||||
|
|
||||||
|
show-release:
|
||||||
|
@echo '$(GLUON_RELEASE)'
|
||||||
|
|
||||||
|
|
||||||
update: FORCE
|
update: FORCE
|
||||||
@GLUON_SITEDIR='$(GLUON_SITEDIR)' scripts/update.sh
|
@GLUON_SITEDIR='$(GLUON_SITEDIR)' scripts/update.sh
|
||||||
|
@ -18,8 +18,8 @@ the future development of Gluon.
|
|||||||
## Use a release!
|
## Use a release!
|
||||||
|
|
||||||
Please refrain from using the `master` branch for anything else but development purposes!
|
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`
|
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 && make update`.
|
and switch to one by running `git checkout v2017.1.4 && make update`.
|
||||||
|
|
||||||
If you're using the autoupdater, do not autoupdate nodes with anything but releases.
|
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.
|
If you upgrade using random master commits the nodes *will break* eventually.
|
||||||
|
@ -54,9 +54,9 @@ copyright = '2015-2017, Project Gluon'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '2017.1'
|
version = '2017.1.4'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '2017.1'
|
release = '2017.1.4'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@ -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.
|
*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
|
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.
|
||||||
|
@ -64,7 +64,12 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre
|
|||||||
:caption: Releases
|
:caption: Releases
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
releases/v2017.1.4
|
||||||
|
releases/v2017.1.3
|
||||||
|
releases/v2017.1.2
|
||||||
|
releases/v2017.1.1
|
||||||
releases/v2017.1
|
releases/v2017.1
|
||||||
|
releases/v2016.2.7
|
||||||
releases/v2016.2.6
|
releases/v2016.2.6
|
||||||
releases/v2016.2.5
|
releases/v2016.2.5
|
||||||
releases/v2016.2.4
|
releases/v2016.2.4
|
||||||
|
31
docs/releases/v2016.2.7.rst
Normal file
31
docs/releases/v2016.2.7.rst
Normal 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.
|
41
docs/releases/v2017.1.1.rst
Normal file
41
docs/releases/v2017.1.1.rst
Normal 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.
|
84
docs/releases/v2017.1.2.rst
Normal file
84
docs/releases/v2017.1.2.rst
Normal 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.
|
65
docs/releases/v2017.1.3.rst
Normal file
65
docs/releases/v2017.1.3.rst
Normal 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.
|
56
docs/releases/v2017.1.4.rst
Normal file
56
docs/releases/v2017.1.4.rst
Normal 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.
|
@ -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
|
The *output/modules* directory is now called *output/packages* and provides a
|
||||||
replacement for the whole repository with target-specific packages of LEDE (in
|
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).
|
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
|
**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!**
|
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
|
* 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
|
* The *gluon-next-node* package has been merged into the Gluon core and must not
|
||||||
be specified in *site.mk* anymore
|
be specified in *site.mk* anymore
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-- This is an example site configuration for Gluon v2017.1
|
-- This is an example site configuration for Gluon v2017.1.4
|
||||||
--
|
--
|
||||||
-- Take a look at the documentation located at
|
-- Take a look at the documentation located at
|
||||||
-- http://gluon.readthedocs.org/ for details.
|
-- http://gluon.readthedocs.org/ for details.
|
||||||
|
@ -25,7 +25,6 @@ GLUON_SITE_PACKAGES := \
|
|||||||
gluon-setup-mode \
|
gluon-setup-mode \
|
||||||
gluon-status-page \
|
gluon-status-page \
|
||||||
haveged \
|
haveged \
|
||||||
iptables \
|
|
||||||
iwinfo
|
iwinfo
|
||||||
|
|
||||||
## DEFAULT_GLUON_RELEASE
|
## DEFAULT_GLUON_RELEASE
|
||||||
|
@ -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.
|
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,
|
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.4*. Always get Gluon using git and don't try to download it
|
||||||
as a Zip archive as the archive will be missing version information.
|
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
|
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
|
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.4*.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
9
modules
9
modules
@ -2,17 +2,18 @@ GLUON_FEEDS='openwrt gluon routing luci'
|
|||||||
|
|
||||||
LEDE_REPO=https://git.lede-project.org/source.git
|
LEDE_REPO=https://git.lede-project.org/source.git
|
||||||
LEDE_BRANCH=lede-17.01
|
LEDE_BRANCH=lede-17.01
|
||||||
LEDE_COMMIT=65eec8bd5f6337956b972d07fde49eb5db9cb4a0
|
LEDE_COMMIT=6b6578feec74dfe1f5767c573d75ba08cc57c885
|
||||||
|
|
||||||
PACKAGES_OPENWRT_REPO=https://github.com/openwrt/packages.git
|
PACKAGES_OPENWRT_REPO=https://github.com/openwrt/packages.git
|
||||||
PACKAGES_OPENWRT_BRANCH=lede-17.01
|
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_REPO=https://github.com/freifunk-gluon/packages.git
|
||||||
PACKAGES_GLUON_COMMIT=71823713c0e9451d1cd459cb10309f468188eb6e
|
PACKAGES_GLUON_BRANCH=v2017.1.x
|
||||||
|
PACKAGES_GLUON_COMMIT=2e5a247a9f6c5bfa77e90796015c5f14026f4850
|
||||||
|
|
||||||
PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git
|
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_REPO=https://github.com/openwrt/luci.git
|
||||||
PACKAGES_LUCI_BRANCH=lede-17.01
|
PACKAGES_LUCI_BRANCH=lede-17.01
|
||||||
|
@ -6,7 +6,7 @@ local function check_branch(k, _)
|
|||||||
local prefix = string.format('autoupdater.branches[%q].', k)
|
local prefix = string.format('autoupdater.branches[%q].', k)
|
||||||
|
|
||||||
need_string(prefix .. 'name')
|
need_string(prefix .. 'name')
|
||||||
need_string_array(prefix .. 'mirrors')
|
need_string_array_match(prefix .. 'mirrors', '^http://')
|
||||||
need_number(prefix .. 'good_signatures')
|
need_number(prefix .. 'good_signatures')
|
||||||
need_string_array_match(prefix .. 'pubkeys', '^%x+$')
|
need_string_array_match(prefix .. 'pubkeys', '^%x+$')
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local uci = require("simple-uci").cursor()
|
local uci = require("simple-uci").cursor()
|
||||||
local lutil = require "gluon.web.util"
|
local lutil = require "gluon.web.util"
|
||||||
|
local fs = require "nixio.fs"
|
||||||
|
|
||||||
local site = require 'gluon.site_config'
|
local site = require 'gluon.site_config'
|
||||||
local sysconfig = require 'gluon.sysconfig'
|
local sysconfig = require 'gluon.sysconfig'
|
||||||
@ -8,7 +9,10 @@ local util = require "gluon.util"
|
|||||||
local pretty_hostname = require 'pretty_hostname'
|
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 hostname = pretty_hostname.get(uci)
|
||||||
local contact = uci:get_first("gluon-node-info", "owner", "contact")
|
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 pubkey
|
||||||
local msg
|
local msg
|
||||||
|
|
||||||
if meshvpn_enabled then
|
|
||||||
pubkey = util.trim(lutil.exec("/etc/init.d/fastd show_key mesh_vpn"))
|
if has_tunneldigger then
|
||||||
msg = _translate('gluon-config-mode:pubkey')
|
local tunneldigger_enabled = uci:get_bool("tunneldigger", "mesh_vpn", "enabled")
|
||||||
else
|
if not tunneldigger_enabled then
|
||||||
msg = _translate('gluon-config-mode:novpn')
|
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
|
end
|
||||||
|
|
||||||
if not msg then return end
|
if not msg then return end
|
||||||
|
@ -6,8 +6,8 @@ local site = require 'gluon.site_config'
|
|||||||
if (not sysconfig.gluon_version) and site.poe_passthrough then
|
if (not sysconfig.gluon_version) and site.poe_passthrough then
|
||||||
local uci = require('simple-uci').cursor()
|
local uci = require('simple-uci').cursor()
|
||||||
|
|
||||||
if uci:get('system', 'gpio_switch_poe_passthrough') then
|
if uci:get('system', 'poe_passthrough') then
|
||||||
uci:set('system', 'gpio_switch_poe_passthrough', 'value', true)
|
uci:set('system', 'poe_passthrough', 'value', true)
|
||||||
uci:save('system')
|
uci:save('system')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
if need_table('mesh', nil, false) and need_table('mesh.batman_adv', nil, false) then
|
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
|
end
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
local site = require 'gluon.site_config'
|
local site = require 'gluon.site_config'
|
||||||
local next_node = site.next_node
|
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('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('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')
|
rule('FORWARD --logical-out br-client -o bat0 -s ' .. next_node.mac .. ' -j DROP')
|
||||||
|
@ -41,6 +41,10 @@ proto_gluon_bat0_setup() {
|
|||||||
ip link add primary0 type dummy
|
ip link add primary0 type dummy
|
||||||
echo 1 > /proc/sys/net/ipv6/conf/primary0/disable_ipv6
|
echo 1 > /proc/sys/net/ipv6/conf/primary0/disable_ipv6
|
||||||
ip link set primary0 address "$primary0_mac" mtu 1532 up
|
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
|
echo bat0 > /sys/class/net/primary0/batman_adv/mesh_iface
|
||||||
|
|
||||||
proto_init_update primary0 1
|
proto_init_update primary0 1
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#!/usr/bin/lua
|
#!/usr/bin/lua
|
||||||
|
|
||||||
local site = require "gluon.site_config"
|
local site = require "gluon.site_config"
|
||||||
|
|
||||||
io.write("-i local-node -p " .. site.prefix6)
|
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)
|
io.write(" --rdnss " .. site.next_node.ip6)
|
||||||
end
|
end
|
||||||
|
@ -7,17 +7,23 @@ local util = require 'gluon.util'
|
|||||||
local uci = require('simple-uci').cursor()
|
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
|
if site.mesh and site.mesh.batman_adv then
|
||||||
gw_sel_class = site.mesh.batman_adv.gw_sel_class
|
gw_sel_class = site.mesh.batman_adv.gw_sel_class
|
||||||
|
routing_algo = site.mesh.batman_adv.routing_algo
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
uci:delete('batman-adv', 'bat0')
|
uci:delete('batman-adv', 'bat0')
|
||||||
uci:section('batman-adv', 'mesh', 'bat0', {
|
uci:section('batman-adv', 'mesh', 'bat0', {
|
||||||
orig_interval = 5000,
|
orig_interval = 5000,
|
||||||
gw_mode = 'client',
|
gw_mode = gw_mode,
|
||||||
gw_sel_class = gw_sel_class,
|
gw_sel_class = gw_sel_class,
|
||||||
hop_penalty = 15,
|
hop_penalty = 15,
|
||||||
|
routing_algo = routing_algo,
|
||||||
multicast_mode = false,
|
multicast_mode = false,
|
||||||
})
|
})
|
||||||
uci:save('batman-adv')
|
uci:save('batman-adv')
|
||||||
|
@ -62,15 +62,36 @@ uci:save('firewall')
|
|||||||
|
|
||||||
-- VPN migration
|
-- VPN migration
|
||||||
local has_fastd = fs.access('/lib/gluon/mesh-vpn/fastd')
|
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 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)
|
-- If the installed VPN package has its enabled state set, keep the value
|
||||||
uci:save("fastd")
|
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)
|
if has_fastd then
|
||||||
uci:save("tunneldigger")
|
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')
|
@ -6,11 +6,6 @@ local util = require 'gluon.util'
|
|||||||
local uci = require('simple-uci').cursor()
|
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 syslog_level = uci:get('fastd', 'mesh_vpn', 'syslog_level') or 'verbose'
|
||||||
|
|
||||||
local methods
|
local methods
|
||||||
@ -40,7 +35,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
uci:section('fastd', 'fastd', 'mesh_vpn', {
|
uci:section('fastd', 'fastd', 'mesh_vpn', {
|
||||||
enabled = enabled,
|
|
||||||
group = 'gluon-mesh-vpn',
|
group = 'gluon-mesh-vpn',
|
||||||
syslog_level = syslog_level,
|
syslog_level = syslog_level,
|
||||||
interface = 'mesh-vpn',
|
interface = 'mesh-vpn',
|
||||||
|
@ -6,18 +6,17 @@ local util = require 'gluon.util'
|
|||||||
local uci = require('simple-uci').cursor()
|
local uci = require('simple-uci').cursor()
|
||||||
|
|
||||||
|
|
||||||
local enabled = uci:get('tunneldigger', 'mesh_vpn', 'enabled')
|
local enabled
|
||||||
if enabled == nil then
|
|
||||||
if uci:get_first('tunneldigger', 'broker', 'interface') == "mesh-vpn" then
|
-- 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')
|
enabled = uci:get_first('tunneldigger', 'broker', 'enabled')
|
||||||
end
|
end
|
||||||
end
|
|
||||||
if enabled == nil then
|
|
||||||
enabled = site.mesh_vpn.enabled or false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Delete old broker config section
|
-- In the usual case (no migration from old tunneldigger package), the
|
||||||
if not uci:get('tunneldigger', 'mesh_vpn') then
|
-- enabled state is set in the 500-mesh-vpn script
|
||||||
|
|
||||||
uci:delete_all('tunneldigger', 'broker')
|
uci:delete_all('tunneldigger', 'broker')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ msgid "Advanced settings"
|
|||||||
msgstr "Erweiterte Einstellungen"
|
msgstr "Erweiterte Einstellungen"
|
||||||
|
|
||||||
msgid ""
|
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 "
|
"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, login via password will be disabled. This is the default."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -17,7 +17,7 @@ msgid "Advanced settings"
|
|||||||
msgstr "Paramètres avancés"
|
msgstr "Paramètres avancés"
|
||||||
|
|
||||||
msgid ""
|
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 "
|
"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, login via password will be disabled. This is the default."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -8,7 +8,7 @@ msgid "Advanced settings"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid ""
|
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 "
|
"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, login via password will be disabled. This is the default."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -33,7 +33,7 @@ end
|
|||||||
|
|
||||||
local f_password = Form(translate("Password"),
|
local f_password = Form(translate("Password"),
|
||||||
translate(
|
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."
|
.. "If you set an empty password, login via password will be disabled. This is the default."
|
||||||
), 'password'
|
), 'password'
|
||||||
)
|
)
|
||||||
|
@ -19,7 +19,7 @@ msgstr "Automatisch (RA/DHCPv6)"
|
|||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "Deaktiviert"
|
msgstr "Deaktiviert"
|
||||||
|
|
||||||
msgid "Enable PoE passthrough"
|
msgid "Enable PoE Passthrough"
|
||||||
msgstr "PoE-Passthrough aktivieren"
|
msgstr "PoE-Passthrough aktivieren"
|
||||||
|
|
||||||
msgid "Enable meshing on the LAN interface"
|
msgid "Enable meshing on the LAN interface"
|
||||||
|
@ -19,7 +19,7 @@ msgstr "Automatique (RA/DHCPv6)"
|
|||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "Désactivé"
|
msgstr "Désactivé"
|
||||||
|
|
||||||
msgid "Enable PoE passthrough"
|
msgid "Enable PoE Passthrough"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Enable meshing on the LAN interface"
|
msgid "Enable meshing on the LAN interface"
|
||||||
|
@ -10,7 +10,7 @@ msgstr ""
|
|||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Enable PoE passthrough"
|
msgid "Enable PoE Passthrough"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Enable meshing on the LAN interface"
|
msgid "Enable meshing on the LAN interface"
|
||||||
|
@ -104,15 +104,20 @@ if sysconfig.lan_ifname then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if uci:get('system', 'gpio_switch_poe_passthrough') then
|
local section
|
||||||
local s = f:section(Section)
|
uci:foreach("system", "gpio_switch", function(s)
|
||||||
local poe_passthrough = s:option(Flag, "poe_passthrough", translate("Enable PoE passthrough"))
|
if s[".name"]:match("poe") then
|
||||||
poe_passthrough.default = uci:get_bool("system", "gpio_switch_poe_passthrough", "value")
|
if not section then
|
||||||
|
section = f:section(Section)
|
||||||
|
end
|
||||||
|
local poe = section:option(Flag, s[".name"], translate("Enable " .. s.name))
|
||||||
|
poe.default = uci:get_bool("system", s[".name"], "value")
|
||||||
|
|
||||||
function poe_passthrough:write(data)
|
function poe:write(data)
|
||||||
uci:set('system', 'gpio_switch_poe_passthrough', 'value', data)
|
uci:set("system", s[".name"], "value", data)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end)
|
||||||
|
|
||||||
function f:write()
|
function f:write()
|
||||||
uci:set("network", "wan", "proto", ipv4.data)
|
uci:set("network", "wan", "proto", ipv4.data)
|
||||||
|
@ -47,10 +47,10 @@ index 5a403cbf41e2bbd6bdb843492639a01aff8cf75b..900dae1d4afc6007f8ac04179dd7f092
|
|||||||
|
|
||||||
define Build/Configure/Default
|
define Build/Configure/Default
|
||||||
diff --git a/include/host-build.mk b/include/host-build.mk
|
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
|
--- a/include/host-build.mk
|
||||||
+++ b/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
|
endif
|
||||||
|
|
||||||
define Host/Exports/Default
|
define Host/Exports/Default
|
||||||
|
21
patches/lede/0012-procd-switch-to-latest-master.patch
Normal file
21
patches/lede/0012-procd-switch-to-latest-master.patch
Normal 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
|
@ -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
|
|
@ -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
|
|
@ -12,21 +12,21 @@ as a separate package.
|
|||||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
|
||||||
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
|
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
|
--- a/package/base-files/Makefile
|
||||||
+++ b/package/base-files/Makefile
|
+++ b/package/base-files/Makefile
|
||||||
@@ -18,7 +18,9 @@ PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
@@ -19,7 +19,9 @@ PKG_BUILD_DEPENDS:=usign/host
|
||||||
PKG_BUILD_DEPENDS:=usign/host
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
||||||
-PKG_CONFIG_DEPENDS := CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE
|
# Extend depends from version.mk
|
||||||
+PKG_CONFIG_DEPENDS := \
|
-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_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \
|
||||||
+ CONFIG_NAND_SUPPORT
|
+ CONFIG_NAND_SUPPORT
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
@@ -30,7 +32,7 @@ endif
|
@@ -31,7 +33,7 @@ endif
|
||||||
define Package/base-files
|
define Package/base-files
|
||||||
SECTION:=base
|
SECTION:=base
|
||||||
CATEGORY:=Base system
|
CATEGORY:=Base system
|
||||||
@ -35,7 +35,7 @@ index ac3fe2f52b4863260a2e8efa58dac5da6bbb9ec1..4cc3e5079b9cf25909acef9252675394
|
|||||||
TITLE:=Base filesystem for Lede
|
TITLE:=Base filesystem for Lede
|
||||||
URL:=http://openwrt.org/
|
URL:=http://openwrt.org/
|
||||||
VERSION:=$(PKG_RELEASE)-$(REVISION)
|
VERSION:=$(PKG_RELEASE)-$(REVISION)
|
||||||
@@ -105,9 +107,16 @@ ifdef CONFIG_SIGNED_PACKAGES
|
@@ -106,9 +108,16 @@ ifdef CONFIG_SIGNED_PACKAGES
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -435,7 +435,7 @@ index 0000000000000000000000000000000000000000..6bd2005344c081df20e5a330a69e49e3
|
|||||||
+ nand_upgrade_stage1
|
+ nand_upgrade_stage1
|
||||||
+}
|
+}
|
||||||
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
|
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
|
--- a/package/system/procd/Makefile
|
||||||
+++ b/package/system/procd/Makefile
|
+++ b/package/system/procd/Makefile
|
||||||
@@ -22,11 +22,9 @@ PKG_LICENSE_FILES:=
|
@@ -22,11 +22,9 @@ PKG_LICENSE_FILES:=
|
@ -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
|
|
@ -8,7 +8,7 @@ by upgraded.
|
|||||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
|
||||||
diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
|
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
|
--- a/package/system/fstools/Makefile
|
||||||
+++ b/package/system/fstools/Makefile
|
+++ b/package/system/fstools/Makefile
|
||||||
@@ -8,7 +8,7 @@
|
@@ -8,7 +8,7 @@
|
@ -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;
|
@ -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)" \
|
@ -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
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
39
patches/lede/0032-bcm53xx-upgrade-fix-RAMFS_COPY_.patch
Normal file
39
patches/lede/0032-bcm53xx-upgrade-fix-RAMFS_COPY_.patch
Normal 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
|
68
patches/lede/0033-ipq806x-upgrade-fix-RAMFS_COPY_.patch
Normal file
68
patches/lede/0033-ipq806x-upgrade-fix-RAMFS_COPY_.patch
Normal 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"
|
60
patches/lede/0034-kirkwood-upgrade-fix-RAMFS_COPY_.patch
Normal file
60
patches/lede/0034-kirkwood-upgrade-fix-RAMFS_COPY_.patch
Normal 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
|
||||||
|
}
|
@ -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
|
@ -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
|
@ -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)
|
@ -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);
|
@ -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
|
@ -18,6 +18,10 @@ alias() {
|
|||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
manifest_alias() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
packages() {
|
packages() {
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ FEEDS="$GLUON_SITE_FEEDS $GLUON_FEEDS"
|
|||||||
done
|
done
|
||||||
) > lede/feeds.conf
|
) > lede/feeds.conf
|
||||||
|
|
||||||
|
rm -rf lede/tmp
|
||||||
rm -rf lede/feeds
|
rm -rf lede/feeds
|
||||||
rm -rf lede/package/feeds
|
rm -rf lede/package/feeds
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ default_sysupgrade_ext='.bin'
|
|||||||
|
|
||||||
output=
|
output=
|
||||||
aliases=
|
aliases=
|
||||||
|
manifest_aliases=
|
||||||
|
|
||||||
sysupgrade_ext=
|
sysupgrade_ext=
|
||||||
|
|
||||||
@ -33,6 +34,10 @@ generate() {
|
|||||||
for alias in $aliases; do
|
for alias in $aliases; do
|
||||||
generate_line "$alias" "gluon-${SITE_CODE}-${GLUON_RELEASE}-${alias}-sysupgrade${sysupgrade_ext}"
|
generate_line "$alias" "gluon-${SITE_CODE}-${GLUON_RELEASE}-${alias}-sysupgrade${sysupgrade_ext}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for alias in $manifest_aliases; do
|
||||||
|
generate_line "$alias" "gluon-${SITE_CODE}-${GLUON_RELEASE}-${output}-sysupgrade${sysupgrade_ext}"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,6 +49,7 @@ device() {
|
|||||||
|
|
||||||
output="$1"
|
output="$1"
|
||||||
aliases=
|
aliases=
|
||||||
|
manifest_aliases=
|
||||||
|
|
||||||
sysupgrade_ext="$default_sysupgrade_ext"
|
sysupgrade_ext="$default_sysupgrade_ext"
|
||||||
}
|
}
|
||||||
@ -53,6 +59,7 @@ sysupgrade_image() {
|
|||||||
|
|
||||||
output="$1"
|
output="$1"
|
||||||
aliases=
|
aliases=
|
||||||
|
manifest_aliases=
|
||||||
|
|
||||||
if [ "$3" ]; then
|
if [ "$3" ]; then
|
||||||
sysupgrade_ext="$3"
|
sysupgrade_ext="$3"
|
||||||
@ -65,6 +72,10 @@ alias() {
|
|||||||
aliases="$aliases $1"
|
aliases="$aliases $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
manifest_alias() {
|
||||||
|
manifest_aliases="$manifest_aliases $1"
|
||||||
|
}
|
||||||
|
|
||||||
sysupgrade() {
|
sysupgrade() {
|
||||||
if [ "$2" ]; then
|
if [ "$2" ]; then
|
||||||
sysupgrade_ext="$2"
|
sysupgrade_ext="$2"
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
ATH10K_PACKAGES=
|
ATH10K_PACKAGES=
|
||||||
|
ATH10K_PACKAGES_QCA9887=
|
||||||
|
|
||||||
if [ "$GLUON_ATH10K_MESH" = '11s' ]; then
|
if [ "$GLUON_ATH10K_MESH" = '11s' ]; then
|
||||||
ATH10K_PACKAGES='-kmod-ath10k kmod-ath10k-ct'
|
ATH10K_PACKAGES='-kmod-ath10k kmod-ath10k-ct'
|
||||||
fi
|
fi
|
||||||
if [ "$GLUON_ATH10K_MESH" = 'ibss' ]; then
|
if [ "$GLUON_ATH10K_MESH" = 'ibss' ]; then
|
||||||
ATH10K_PACKAGES='-kmod-ath10k kmod-ath10k-ct -ath10k-firmware-qca988x ath10k-firmware-qca988x-ct'
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -60,6 +62,8 @@ device gl-inet-6416a-v1 gl-inet-6416A-v1
|
|||||||
|
|
||||||
device gl-ar150 gl-ar150
|
device gl-ar150 gl-ar150
|
||||||
factory
|
factory
|
||||||
|
device gl-ar300m gl-ar300m
|
||||||
|
factory
|
||||||
|
|
||||||
|
|
||||||
# Linksys by Cisco
|
# Linksys by Cisco
|
||||||
@ -179,6 +183,11 @@ device tp-link-archer-c7-v2 archer-c7-v2
|
|||||||
packages $ATH10K_PACKAGES
|
packages $ATH10K_PACKAGES
|
||||||
factory -squashfs-factory${GLUON_REGION:+-${GLUON_REGION}} .bin
|
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
|
device tp-link-re450 re450
|
||||||
packages $ATH10K_PACKAGES
|
packages $ATH10K_PACKAGES
|
||||||
fi
|
fi
|
||||||
|
@ -6,6 +6,8 @@ config 'CONFIG_BUSYBOX_CUSTOM=y'
|
|||||||
config 'CONFIG_BUSYBOX_CONFIG_SHA256SUM=y'
|
config 'CONFIG_BUSYBOX_CONFIG_SHA256SUM=y'
|
||||||
config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set'
|
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_PACKAGE_ATH_DEBUG=y'
|
||||||
|
|
||||||
config 'CONFIG_TARGET_MULTI_PROFILE=y'
|
config 'CONFIG_TARGET_MULTI_PROFILE=y'
|
||||||
|
@ -5,3 +5,5 @@ factory
|
|||||||
|
|
||||||
device vocore-16M vocore-16M
|
device vocore-16M vocore-16M
|
||||||
factory
|
factory
|
||||||
|
|
||||||
|
device a5-v11 a5-v11
|
||||||
|
@ -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 .vdi
|
||||||
factory_image x86-generic combined-ext4 .vmdk
|
factory_image x86-generic combined-ext4 .vmdk
|
||||||
sysupgrade_image x86-generic combined-ext4 .img.gz
|
sysupgrade_image x86-generic combined-ext4 .img.gz
|
||||||
|
manifest_alias x86-kvm
|
||||||
|
manifest_alias x86-xen_domu
|
||||||
|
Loading…
Reference in New Issue
Block a user