Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
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
|
||||||
|
@ -19,7 +19,7 @@ the future development of Gluon.
|
|||||||
|
|
||||||
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 relaseses 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.2 && 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.2'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '2017.1'
|
release = '2017.1.2'
|
||||||
|
|
||||||
# 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.
|
||||||
|
@ -64,7 +64,10 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre
|
|||||||
:caption: Releases
|
:caption: Releases
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
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.
|
@ -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.2
|
||||||
--
|
--
|
||||||
-- 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.2*. 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.2*.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
4
modules
4
modules
@ -2,7 +2,7 @@ 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=982612dba26f042f8b9a524996b0774d3c8e747a
|
||||||
|
|
||||||
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
|
||||||
@ -12,7 +12,7 @@ PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
|
|||||||
PACKAGES_GLUON_COMMIT=71823713c0e9451d1cd459cb10309f468188eb6e
|
PACKAGES_GLUON_COMMIT=71823713c0e9451d1cd459cb10309f468188eb6e
|
||||||
|
|
||||||
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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
patches/lede/0012-procd-switch-to-latest-master.patch
Normal file
19
patches/lede/0012-procd-switch-to-latest-master.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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 7587170f0286fc6aba132d3c477fc14ab6be316e..b878ad06b73512fff08246978dbbf11ba47cdfc8 100644
|
||||||
|
--- a/package/system/procd/Makefile
|
||||||
|
+++ b/package/system/procd/Makefile
|
||||||
|
@@ -13,8 +13,8 @@ PKG_RELEASE:=1
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git
|
||||||
|
PKG_SOURCE_DATE:=2017-07-31
|
||||||
|
-PKG_SOURCE_VERSION:=3e68cdfdc5221d2a9268e9b30fbd474ea20b92f8
|
||||||
|
-PKG_MIRROR_HASH:=9b16f8d88ebff47ce55c09a34a68d3f4b04f7db7632d4ce73ae68b7fb8d66f73
|
||||||
|
+PKG_SOURCE_VERSION:=f062b305b5ea2c77bb8286f8982f08e4c5b133ae
|
||||||
|
+PKG_MIRROR_HASH:=419f99b484bc5698c3e096bbc40af768d01361da10ab25d22e95038bfbb2b724
|
||||||
|
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
|
|
@ -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 305d0bfd333fd17f0f7c57ee2298dbfd4b97fe29..fe4430d59092dae9ba2ffbea61f58ac7b4b41dc6 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 b878ad06b73512fff08246978dbbf11ba47cdfc8..d35248e66d7252d4851f456876a6eb61002fdb66 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;
|
@ -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,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)" \
|
@ -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/0033-bcm53xx-upgrade-fix-RAMFS_COPY_.patch
Normal file
39
patches/lede/0033-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/0034-ipq806x-upgrade-fix-RAMFS_COPY_.patch
Normal file
68
patches/lede/0034-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/0035-kirkwood-upgrade-fix-RAMFS_COPY_.patch
Normal file
60
patches/lede/0035-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
|
||||||
|
}
|
@ -18,6 +18,10 @@ alias() {
|
|||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
manifest_alias() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
packages() {
|
packages() {
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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