Compare commits
86 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ee597c6676 | ||
|
c98cad3656 | ||
|
a7c77f6e20 | ||
|
7d95f0d9a9 | ||
|
adff3daed6 | ||
|
3eff2c496f | ||
|
16648ce242 | ||
|
17e45badd9 | ||
|
6903503181 | ||
|
6a7363d9c5 | ||
|
1c5f92e3b9 | ||
|
eba555d315 | ||
|
a984652074 | ||
|
9095c9a706 | ||
|
88fba507ba | ||
|
f109d859db | ||
|
02c27480ab | ||
|
3b916a554e | ||
|
d5b45c0bee | ||
|
c29a187d9f | ||
|
867d9396cd | ||
|
deac14e629 | ||
|
f6dab1233b | ||
|
4ce711fc89 | ||
|
d224d99470 | ||
|
426f07755d | ||
|
f6b390ca33 | ||
|
0aa46df890 | ||
|
bb94629f0d | ||
|
6899e50c97 | ||
|
d75df2413e | ||
|
61b77b9a80 | ||
|
3f472cbc6a | ||
|
e76efb2659 | ||
|
15886fb65b | ||
|
cebb753e1d | ||
|
e112aa6593 | ||
|
1f400189cf | ||
|
5a31cacee4 | ||
|
2b01506b71 | ||
|
27e87da4a2 | ||
|
4add3d7204 | ||
|
a2cbb02254 | ||
|
495a3ab9fc | ||
|
310079cd2b | ||
|
41062d9582 | ||
|
b788b6684d | ||
|
63fb516bd3 | ||
|
8adce872cb | ||
|
6922fb8197 | ||
|
14ccbd2f5d | ||
|
e44043f647 | ||
|
337b43c715 | ||
|
9017bb3cb0 | ||
|
6e832e2b76 | ||
|
b493e1bb1a | ||
|
d610ba31ff | ||
|
c11f88397d | ||
|
679a199671 | ||
|
5b0a3eae68 | ||
|
b704308446 | ||
|
e9db7d16ad | ||
|
f980024379 | ||
|
d9eecf7f79 | ||
|
a57dd3bebb | ||
|
fabd3819eb | ||
|
9847b41c8e | ||
|
041730ae9b | ||
|
43182295c7 | ||
|
9bd10ea8a6 | ||
|
c52725d611 | ||
|
4a6a3b696b | ||
|
70d586c3bd | ||
|
35922740e6 | ||
|
34d45986b5 | ||
|
59ab532be7 | ||
|
04fc018006 | ||
|
dfd5d7bdff | ||
|
6a6eb6282f | ||
|
4b213277f6 | ||
|
6daacdd484 | ||
|
40f3251f61 | ||
|
8f7deca01e | ||
|
48c7039d53 | ||
|
a155149601 | ||
|
44bdf37e3c |
20
Makefile
20
Makefile
@ -4,11 +4,16 @@ LC_ALL:=C
|
|||||||
LANG:=C
|
LANG:=C
|
||||||
export LC_ALL LANG
|
export LC_ALL LANG
|
||||||
|
|
||||||
|
export SHELL:=/usr/bin/env bash
|
||||||
|
|
||||||
|
GLUONPATH ?= $(PATH)
|
||||||
|
export GLUONPATH := $(GLUONPATH)
|
||||||
|
|
||||||
empty:=
|
empty:=
|
||||||
space:= $(empty) $(empty)
|
space:= $(empty) $(empty)
|
||||||
|
|
||||||
GLUONMAKE_EARLY = $(SUBMAKE) -C $(GLUON_ORIGOPENWRTDIR) -f $(GLUONDIR)/Makefile GLUON_TOOLS=0 QUILT=
|
GLUONMAKE_EARLY = PATH=$(GLUONPATH) $(SUBMAKE) -C $(GLUON_ORIGOPENWRTDIR) -f $(GLUONDIR)/Makefile GLUON_TOOLS=0 QUILT=
|
||||||
GLUONMAKE = $(SUBMAKE) -C $(GLUON_OPENWRTDIR) -f $(GLUONDIR)/Makefile
|
GLUONMAKE = PATH=$(GLUONPATH) $(SUBMAKE) -C $(GLUON_OPENWRTDIR) -f $(GLUONDIR)/Makefile
|
||||||
|
|
||||||
ifneq ($(OPENWRT_BUILD),1)
|
ifneq ($(OPENWRT_BUILD),1)
|
||||||
|
|
||||||
@ -24,12 +29,6 @@ update: FORCE
|
|||||||
$(GLUONDIR)/scripts/update.sh
|
$(GLUONDIR)/scripts/update.sh
|
||||||
$(GLUONDIR)/scripts/patch.sh
|
$(GLUONDIR)/scripts/patch.sh
|
||||||
|
|
||||||
patch: FORCE
|
|
||||||
$(GLUONDIR)/scripts/patch.sh
|
|
||||||
|
|
||||||
unpatch: FORCE
|
|
||||||
$(GLUONDIR)/scripts/unpatch.sh
|
|
||||||
|
|
||||||
update-patches: FORCE
|
update-patches: FORCE
|
||||||
$(GLUONDIR)/scripts/update.sh
|
$(GLUONDIR)/scripts/update.sh
|
||||||
$(GLUONDIR)/scripts/update-patches.sh
|
$(GLUONDIR)/scripts/update-patches.sh
|
||||||
@ -236,7 +235,7 @@ $(early_prepared_stamp):
|
|||||||
|
|
||||||
$(GLUON_OPKG_KEY): $(early_prepared_stamp) FORCE
|
$(GLUON_OPKG_KEY): $(early_prepared_stamp) FORCE
|
||||||
[ -s $(GLUON_OPKG_KEY) -a -s $(GLUON_OPKG_KEY).pub ] || \
|
[ -s $(GLUON_OPKG_KEY) -a -s $(GLUON_OPKG_KEY).pub ] || \
|
||||||
mkdir -p $$(dirname $(GLUON_OPKG_KEY)) && $(STAGING_DIR_HOST)/bin/usign -G -s $(GLUON_OPKG_KEY) -p $(GLUON_OPKG_KEY).pub -c "Gluon opkg key"
|
( mkdir -p $$(dirname $(GLUON_OPKG_KEY)) && $(STAGING_DIR_HOST)/bin/usign -G -s $(GLUON_OPKG_KEY) -p $(GLUON_OPKG_KEY).pub -c "Gluon opkg key" )
|
||||||
|
|
||||||
$(GLUON_OPKG_KEY).pub: $(GLUON_OPKG_KEY)
|
$(GLUON_OPKG_KEY).pub: $(GLUON_OPKG_KEY)
|
||||||
|
|
||||||
@ -299,7 +298,8 @@ prepare-target: $(GLUON_OPKG_KEY).pub
|
|||||||
$(target_prepared_stamp):
|
$(target_prepared_stamp):
|
||||||
+$(GLUONMAKE_EARLY) prepare-target
|
+$(GLUONMAKE_EARLY) prepare-target
|
||||||
|
|
||||||
maybe-prepare-target: $(GLUON_OPKG_KEY).pub $(target_prepared_stamp)
|
maybe-prepare-target: $(target_prepared_stamp)
|
||||||
|
+$(GLUONMAKE_EARLY) $(GLUON_OPKG_KEY).pub
|
||||||
|
|
||||||
$(BUILD_DIR)/.prepared: Makefile
|
$(BUILD_DIR)/.prepared: Makefile
|
||||||
@mkdir -p $$(dirname $@)
|
@mkdir -p $$(dirname $@)
|
||||||
|
@ -16,7 +16,7 @@ our mailinglist to discuss it first.
|
|||||||
|
|
||||||
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 branch -a`
|
Use the most recent release instead. You can list all relaseses by running `git branch -a`
|
||||||
and switch to one by running `git checkout v2016.1 && make update`.
|
and switch to one by running `git checkout v2016.1.5 && 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.
|
||||||
|
@ -47,16 +47,16 @@ master_doc = 'index'
|
|||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = 'Gluon'
|
project = 'Gluon'
|
||||||
copyright = '2015, Project Gluon'
|
copyright = '2016, Project Gluon'
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '2016.1'
|
version = '2016.1.5'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '2016.1'
|
release = '2016.1.5'
|
||||||
|
|
||||||
# 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.
|
||||||
|
@ -60,6 +60,12 @@ Releases
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
|
releases/v2016.1.6
|
||||||
|
releases/v2016.1.5
|
||||||
|
releases/v2016.1.4
|
||||||
|
releases/v2016.1.3
|
||||||
|
releases/v2016.1.2
|
||||||
|
releases/v2016.1.1
|
||||||
releases/v2016.1
|
releases/v2016.1
|
||||||
releases/v2015.1.2
|
releases/v2015.1.2
|
||||||
releases/v2015.1.1
|
releases/v2015.1.1
|
||||||
@ -75,6 +81,16 @@ Supported Devices & Architectures
|
|||||||
ar71xx-generic
|
ar71xx-generic
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
* 8devices
|
||||||
|
|
||||||
|
- Carambola 2
|
||||||
|
|
||||||
|
* ALFA Network
|
||||||
|
|
||||||
|
- AP121
|
||||||
|
- AP121U
|
||||||
|
- Hornet-UB
|
||||||
|
|
||||||
* Allnet
|
* Allnet
|
||||||
|
|
||||||
- ALL0315N
|
- ALL0315N
|
||||||
@ -85,6 +101,11 @@ ar71xx-generic
|
|||||||
- WZR-HP-G300NH
|
- WZR-HP-G300NH
|
||||||
- WZR-HP-G450H
|
- WZR-HP-G450H
|
||||||
|
|
||||||
|
* Cisco Meraki
|
||||||
|
|
||||||
|
- MR12 / MR62
|
||||||
|
- MR16 / MR66
|
||||||
|
|
||||||
* D-Link
|
* D-Link
|
||||||
|
|
||||||
- DIR-505 (A1)
|
- DIR-505 (A1)
|
||||||
@ -106,18 +127,34 @@ ar71xx-generic
|
|||||||
- WNDR3800
|
- WNDR3800
|
||||||
- WNDRMAC (v2)
|
- WNDRMAC (v2)
|
||||||
|
|
||||||
|
* Onion
|
||||||
|
|
||||||
|
- Omega
|
||||||
|
|
||||||
|
* OpenMesh
|
||||||
|
|
||||||
|
- MR600 (v1, v2)
|
||||||
|
- MR900 (v1, v2)
|
||||||
|
- OM2P (v1, v2)
|
||||||
|
- OM2P-HS (v1, v2)
|
||||||
|
- OM2P-LC
|
||||||
|
- OM5P
|
||||||
|
- OM5P-AN
|
||||||
|
|
||||||
* TP-Link
|
* TP-Link
|
||||||
|
|
||||||
- CPE210 (v1.0, v1.1)
|
- CPE210 (v1.0, v1.1)
|
||||||
- CPE220 (v1.0, v1.1)
|
- CPE220 (v1.0, v1.1)
|
||||||
- CPE510 (v1.0, v1.1)
|
- CPE510 (v1.0, v1.1)
|
||||||
- CPE520 (v1.0, v1.1)
|
- CPE520 (v1.0, v1.1)
|
||||||
|
- TL-MR13U (v1)
|
||||||
- TL-MR3020 (v1)
|
- TL-MR3020 (v1)
|
||||||
- TL-MR3040 (v1, v2)
|
- TL-MR3040 (v1, v2)
|
||||||
- TL-MR3220 (v1, v2)
|
- TL-MR3220 (v1, v2)
|
||||||
- TL-MR3420 (v1, v2)
|
- TL-MR3420 (v1, v2)
|
||||||
- TL-WA701N/ND (v1, v2)
|
- TL-WA701N/ND (v1, v2)
|
||||||
- TL-WA750RE (v1)
|
- TL-WA750RE (v1)
|
||||||
|
- TL-WA7510N (v1)
|
||||||
- TL-WA801N/ND (v1, v2)
|
- TL-WA801N/ND (v1, v2)
|
||||||
- TL-WA830RE (v1, v2)
|
- TL-WA830RE (v1, v2)
|
||||||
- TL-WA850RE (v1)
|
- TL-WA850RE (v1)
|
||||||
@ -132,7 +169,7 @@ ar71xx-generic
|
|||||||
- TL-WR741N/ND (v1, v2, v4, v5)
|
- TL-WR741N/ND (v1, v2, v4, v5)
|
||||||
- TL-WR743N/ND (v1, v2)
|
- TL-WR743N/ND (v1, v2)
|
||||||
- TL-WR801N/ND (v1, v2)
|
- TL-WR801N/ND (v1, v2)
|
||||||
- TL-WR841N/ND (v3, v5, v7, v8, v9, v10)
|
- TL-WR841N/ND (v3, v5, v7, v8, v9, v10, v11)
|
||||||
- TL-WR842N/ND (v1, v2)
|
- TL-WR842N/ND (v1, v2)
|
||||||
- TL-WR843N/ND (v1)
|
- TL-WR843N/ND (v1)
|
||||||
- TL-WR940N (v1, v2, v3)
|
- TL-WR940N (v1, v2, v3)
|
||||||
@ -145,11 +182,13 @@ ar71xx-generic
|
|||||||
- Air Gateway
|
- Air Gateway
|
||||||
- Air Router
|
- Air Router
|
||||||
- Bullet M
|
- Bullet M
|
||||||
|
- Loco M
|
||||||
|
- Loco M XW
|
||||||
- Nanostation M
|
- Nanostation M
|
||||||
- Nanostation M XW
|
- Nanostation M XW
|
||||||
- Loco M XW
|
|
||||||
- Picostation M
|
- Picostation M
|
||||||
- Rocket M
|
- Rocket M
|
||||||
|
- Rocket M XW
|
||||||
- UniFi AP
|
- UniFi AP
|
||||||
- UniFi AP Pro
|
- UniFi AP Pro
|
||||||
- UniFi AP Outdoor
|
- UniFi AP Outdoor
|
||||||
|
64
docs/releases/v2016.1.1.rst
Normal file
64
docs/releases/v2016.1.1.rst
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
Gluon 2016.1.1
|
||||||
|
==============
|
||||||
|
|
||||||
|
Added hardware support
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
ar71xx-generic
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
* Onion Omega
|
||||||
|
* TP-Link TL-MR13U v1
|
||||||
|
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
Build
|
||||||
|
^^^^^
|
||||||
|
|
||||||
|
Don't overwrite the opkg repository key on each build.
|
||||||
|
|
||||||
|
AirOS 5.6.x compatiblity
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Downgrading to AirOS 5.5.x before flashing Gluon on Airmax M XM/XW devices
|
||||||
|
(NanoStation, Bullet, ...) is not necessary anymore.
|
||||||
|
|
||||||
|
Status page
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
* Fix purging of disappered neighbours from the list
|
||||||
|
* Don't clear the signal graphs when scrolling in mobile browsers
|
||||||
|
* Improve browser compability (don't assume the Internationalization API is available,
|
||||||
|
fixes the display of numbers in Firefox for Android)
|
||||||
|
|
||||||
|
Config mode
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
* Strip trailing whitespace from number input fields (LuCI's validator doesn't catch this)
|
||||||
|
* Don't allow negative bandwidth limits
|
||||||
|
|
||||||
|
Failsafe mode
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
* Fix entering the failsafe mode on the TL-WDR4900.
|
||||||
|
|
||||||
|
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 Expert Mode 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/announced 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.
|
||||||
|
|
||||||
|
* Nondeterministic production of broken images for some (very old) hardware (`#669 <https://github.com/freifunk-gluon/gluon/issues/669>`_)
|
||||||
|
|
||||||
|
At the moment it seems like only the TL-WR841N v5 is affected.
|
29
docs/releases/v2016.1.2.rst
Normal file
29
docs/releases/v2016.1.2.rst
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Gluon 2016.1.2
|
||||||
|
==============
|
||||||
|
|
||||||
|
Added hardware support
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The *x86-generic* images now contain the ATIIXP PATA driver, adding support for
|
||||||
|
FUTRO Thin Clients.
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
A nondeterministic boot hang (`#669 <https://github.com/freifunk-gluon/gluon/issues/669>`_) has been fixed.
|
||||||
|
The TL-WR841N v5 seems to be affected in particular, but the kernel bug is not hardware-specific per se.
|
||||||
|
|
||||||
|
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 Expert Mode 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.
|
43
docs/releases/v2016.1.3.rst
Normal file
43
docs/releases/v2016.1.3.rst
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Gluon 2016.1.3
|
||||||
|
==============
|
||||||
|
|
||||||
|
Added hardware support
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
ar71xx-generic
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
* ALFA Hornet UB / AP121 / AP121U
|
||||||
|
* TP-Link TL-WA7510N
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
* The nondeterministic boot hang (`#669 <https://github.com/freifunk-gluon/gluon/issues/669>`_) that was thought to
|
||||||
|
be fixed in Gluon v2016.1.2 has resurfaced on other hardware. We believe it is now fixed properly.
|
||||||
|
* Sysupgrades on the Xen DomU have been fixed.
|
||||||
|
* Gluon can now be built on systems that use LibreSSL instead of OpenSSL.
|
||||||
|
|
||||||
|
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 Expert Mode 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.
|
||||||
|
|
||||||
|
* Unwritable flash on some Ubiquiti PicoStations (`#687 <https://github.com/freifunk-gluon/gluon/issues/687>`_)
|
||||||
|
|
||||||
|
Gluon v2016.1.1 added support for Ubiquiti AirMAX devices with AirOS 5.6.x without downgrading AirOS first before
|
||||||
|
flashing Gluon. It was discovered that on Ubiquiti PicoStations, this downgrade is still necessary, as the
|
||||||
|
flash is not correctly unlocked, leaving the device unable to leave Config Mode and making regular sysupgrades
|
||||||
|
impossible.
|
||||||
|
|
||||||
|
TFTP recovery can be used in this state to flash a new firmware.
|
46
docs/releases/v2016.1.4.rst
Normal file
46
docs/releases/v2016.1.4.rst
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
Gluon 2016.1.4
|
||||||
|
==============
|
||||||
|
|
||||||
|
Added hardware support
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
ar71xx-generic
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
* 8devices Carambola 2
|
||||||
|
* Meraki MR12/MR62/MR16/MR66
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
* Major update of all WLAN drivers
|
||||||
|
|
||||||
|
We've taken the unusual step of updating the WLAN drivers ("wireless-backports") to a much newer version, as
|
||||||
|
it was reported that the new version fixes unstable WLAN seen in many setups
|
||||||
|
* Build fix: a race condition causing parallel builds to fail has been fixed
|
||||||
|
* Build fix: the Gluon tree could get into a state in which all commands fail with "Too many levels of symbolic links"
|
||||||
|
* Build fix: allow building Gluon on systems with certain versions of *dash* as */bin/sh*
|
||||||
|
|
||||||
|
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 Expert Mode 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.
|
||||||
|
|
||||||
|
* Unwritable flash on some Ubiquiti PicoStations (`#687 <https://github.com/freifunk-gluon/gluon/issues/687>`_)
|
||||||
|
|
||||||
|
Gluon v2016.1.1 added support for Ubiquiti AirMAX devices with AirOS 5.6.x without downgrading AirOS first before
|
||||||
|
flashing Gluon. It was discovered that on Ubiquiti PicoStations, this downgrade is still necessary, as the
|
||||||
|
flash is not correctly unlocked, leaving the device unable to leave Config Mode and making regular sysupgrades
|
||||||
|
impossible.
|
||||||
|
|
||||||
|
TFTP recovery can be used in this state to flash a new firmware.
|
66
docs/releases/v2016.1.5.rst
Normal file
66
docs/releases/v2016.1.5.rst
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
Gluon 2016.1.5
|
||||||
|
==============
|
||||||
|
|
||||||
|
Added hardware support
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
ar71xx-generic
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
* OpenMesh
|
||||||
|
|
||||||
|
- MR600 (v1, v2)
|
||||||
|
- MR900 (v1, v2)
|
||||||
|
- OM2P (v1, v2)
|
||||||
|
- OM2P-HS (v1, v2)
|
||||||
|
- OM2P-LC
|
||||||
|
- OM5P
|
||||||
|
- OM5P-AN
|
||||||
|
|
||||||
|
* Ubiquiti
|
||||||
|
|
||||||
|
- Rocket M XW
|
||||||
|
|
||||||
|
* TP-LINK
|
||||||
|
|
||||||
|
- TL-WR841N/ND v11
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
* build: fix race condition caused by using certain make targets (like *clean*, *images* or *package/\**)
|
||||||
|
with parallel build options without doing a full build before
|
||||||
|
* build: fix package dependency issue causing "recursive dependency" warning
|
||||||
|
|
||||||
|
This dependency issue could lead to broken configurations and reportedly caused failed builds in some cases
|
||||||
|
when additional (site-specific) packages were used.
|
||||||
|
* build: Gluon will now build correctly with GCC 6 as host compiler
|
||||||
|
* Fix configuration of batman-adv when VLANs are used on top of IBSS interfaces (regression due to netifd update in :doc:`v2016.1.4`)
|
||||||
|
* Add back missing ath10k firmware (regression due to mac80211 update in :doc:`v2016.1.4`)
|
||||||
|
* Gluon can now be used on all supported Ubiquiti AirMAX devices without downgrading to AirOS 5.5.x before
|
||||||
|
|
||||||
|
:doc:`v2016.1.1` added support for most Ubiquiti AirMAX devices with AirOS 5.6.x without downgrading AirOS,
|
||||||
|
but left some devices (at least some PicoStations and Bullets) with unwritable flash. This issue has been
|
||||||
|
resolved (`#687 <https://github.com/freifunk-gluon/gluon/issues/687>`_).
|
||||||
|
* Add upgrade script to automatically remove whitespace from configured geolocation
|
||||||
|
|
||||||
|
The new respondd implementation included in :doc:`v2016.1` is stricter about the number format than the
|
||||||
|
old one and doesn't accept trailing whitespace (so one or both coordinates are missing from the output).
|
||||||
|
|
||||||
|
The Config Mode has been fixed to strip whitespace from numeric fields in new configurations since :doc:`v2016.1.1`.
|
||||||
|
This still left old configurations, which are now fixed by this script.
|
||||||
|
|
||||||
|
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 Expert Mode 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.
|
55
docs/releases/v2016.1.6.rst
Normal file
55
docs/releases/v2016.1.6.rst
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
Gluon 2016.1.6
|
||||||
|
==============
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
* build: fix nodejs host build on Debian Wheezy (`#776 <https://github.com/freifunk-gluon/gluon/issues/776>`_)
|
||||||
|
* build: fix parallel builds with Make 4.2+
|
||||||
|
|
||||||
|
Trying to use ``-j N`` with Make 4.2 would spawn an unlimited number of processes,
|
||||||
|
eventually leading to memory exhaustion.
|
||||||
|
|
||||||
|
* build: fix occasional build failure in libpcap package
|
||||||
|
* build: don't require hexdump for x86 builds (`#811 <https://github.com/freifunk-gluon/gluon/issues/811>`_)
|
||||||
|
|
||||||
|
Trying to build Gluon for x86 on systems without hexdump would silently generate
|
||||||
|
broken images.
|
||||||
|
|
||||||
|
* Add support for DNS servers given by their link-local IPv6 address in Router Advertisements
|
||||||
|
(`#854 <https://github.com/freifunk-gluon/gluon/issues/854>`_)
|
||||||
|
|
||||||
|
* ar71xx-generic: correctly setup LNA GPIOs on CPE210/510 (`#796 <https://github.com/freifunk-gluon/gluon/issues/796>`_)
|
||||||
|
|
||||||
|
Improves the reception by about 20dB.
|
||||||
|
|
||||||
|
* ar71xx-generic: switch default WAN/LAN assignment on Ubiquiti UAP Pro
|
||||||
|
(`#764 <https://github.com/freifunk-gluon/gluon/issues/764>`_)
|
||||||
|
|
||||||
|
Switch to the usual "PoE is WAN/setup mode, secondary is LAN" scheme. This only affects
|
||||||
|
new installations; the assignment won't be changed on updates unless the configuration is
|
||||||
|
reset.
|
||||||
|
|
||||||
|
* ar71xx-generic: fix ath10k memory leak (`#690 <https://github.com/freifunk-gluon/gluon/issues/690>`_)
|
||||||
|
* ar71xx-generic: add support for new TP-Link region codes
|
||||||
|
(`#860 <https://github.com/freifunk-gluon/gluon/issues/860>`_)
|
||||||
|
|
||||||
|
TP-Link has started providing US- and EU-specific firmwares for the Archer C7 v2. To generate
|
||||||
|
Gluon images installable from these new firmwares, the ``GLUON_REGION`` variable must be set
|
||||||
|
to ``eu`` or ``us`` in ``site.mk`` or on the ``make`` command line (the images will still be
|
||||||
|
installable from all old firmwares without region codes).
|
||||||
|
|
||||||
|
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 Expert Mode 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.
|
@ -1,4 +1,4 @@
|
|||||||
-- This is an example site configuration for Gluon v2016.1
|
-- This is an example site configuration for Gluon v2016.1.5
|
||||||
--
|
--
|
||||||
-- 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.
|
||||||
|
@ -52,5 +52,8 @@ GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
|
|||||||
# Default priority for updates.
|
# Default priority for updates.
|
||||||
GLUON_PRIORITY ?= 0
|
GLUON_PRIORITY ?= 0
|
||||||
|
|
||||||
|
# Region code required for some images; supported values: us eu
|
||||||
|
GLUON_REGION ?= eu
|
||||||
|
|
||||||
# Languages to include
|
# Languages to include
|
||||||
GLUON_LANGS ?= en de
|
GLUON_LANGS ?= en de
|
||||||
|
@ -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. *v2016.1*. Always get Gluon using git and don't try to download it
|
e.g. *v2016.1.5*. Always get Gluon using git and don't try to download it
|
||||||
as a Zip archive as the archive will be missing version information.
|
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
|
||||||
@ -42,7 +42,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. *v2016.1*.
|
version you'd like to checkout, e.g. *v2016.1.5*.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
@ -314,6 +314,10 @@ GLUON_PRIORITY
|
|||||||
The default priority for the generated manifests (see the autoupdater documentation
|
The default priority for the generated manifests (see the autoupdater documentation
|
||||||
for more information).
|
for more information).
|
||||||
|
|
||||||
|
GLUON_REGION
|
||||||
|
Region code to build into images where necessary. Valid values are the empty string,
|
||||||
|
``us`` and ``eu``.
|
||||||
|
|
||||||
GLUON_LANGS
|
GLUON_LANGS
|
||||||
List of languages (as two-letter-codes) to be included in the web interface. Should always contain
|
List of languages (as two-letter-codes) to be included in the web interface. Should always contain
|
||||||
``en``.
|
``en``.
|
||||||
@ -393,15 +397,16 @@ This is a non-exhaustive list of site-repos from various communities:
|
|||||||
* `site-ffda <https://github.com/freifunk-darmstadt/site-ffda>`_ (Darmstadt)
|
* `site-ffda <https://github.com/freifunk-darmstadt/site-ffda>`_ (Darmstadt)
|
||||||
* `site-ffgoe <https://github.com/freifunk-goettingen/site-ffgoe>`_ (Göttingen)
|
* `site-ffgoe <https://github.com/freifunk-goettingen/site-ffgoe>`_ (Göttingen)
|
||||||
* `site-ffhh <https://github.com/freifunkhamburg/site-ffhh>`_ (Hamburg)
|
* `site-ffhh <https://github.com/freifunkhamburg/site-ffhh>`_ (Hamburg)
|
||||||
|
* `site-ffho <https://git.c3pb.de/freifunk-pb/site-ffho>`_ (Hochstift)
|
||||||
* `site-ffhgw <https://github.com/lorenzo-greifswald/site-ffhgw>`_ (Greifswald)
|
* `site-ffhgw <https://github.com/lorenzo-greifswald/site-ffhgw>`_ (Greifswald)
|
||||||
|
* `site-ffl <https://github.com/freifunk-leipzig/freifunk-gluon-leipzig>`_ (Leipzig)
|
||||||
* `site-ffhl <https://github.com/freifunk-luebeck/site-ffhl>`_ (Lübeck)
|
* `site-ffhl <https://github.com/freifunk-luebeck/site-ffhl>`_ (Lübeck)
|
||||||
* `site-ffmd <https://github.com/FreifunkMD/site-ffmd>`_ (Magdeburg)
|
* `site-ffmd <https://github.com/FreifunkMD/site-ffmd>`_ (Magdeburg)
|
||||||
* `site-ffmwu <https://github.com/freifunk-mwu/site-ffmwu>`_ (Mainz, Wiesbaden & Umgebung)
|
* `site-ffmwu <https://github.com/freifunk-mwu/site-ffmwu>`_ (Mainz, Wiesbaden & Umgebung)
|
||||||
* `site-ffmyk <https://github.com/FreifunkMYK/site-ffmyk>`_ (Mayen-Koblenz)
|
* `site-ffmyk <https://github.com/FreifunkMYK/site-ffmyk>`_ (Mayen-Koblenz)
|
||||||
* `site-ffm <https://github.com/freifunkMUC/site-ffm>`_ (München)
|
* `site-ffm <https://github.com/freifunkMUC/site-ffm>`_ (München)
|
||||||
* `site-ffms <https://github.com/FreiFunkMuenster/site-ffms>`_ (Münsterland)
|
* `site-ffms <https://github.com/FreiFunkMuenster/site-ffms>`_ (Münsterland)
|
||||||
* `site-ffnw <https://git.nordwest.freifunk.net/ffnw/siteconf/tree/master>`_ (Nordwest)
|
* `site-ffnw <https://git.nordwest.freifunk.net/ffnw-firmware/siteconf/tree/master>`_ (Nordwest)
|
||||||
* `site-ffpb <https://git.c3pb.de/freifunk-pb/site-ffpb>`_ (Paderborn)
|
|
||||||
* `site-ffka <https://github.com/ffka/site-ffka>`_ (Karlsruhe)
|
* `site-ffka <https://github.com/ffka/site-ffka>`_ (Karlsruhe)
|
||||||
* `site-ffrl <https://github.com/ffrl/sites-ffrl>`_ (Rheinland)
|
* `site-ffrl <https://github.com/ffrl/sites-ffrl>`_ (Rheinland)
|
||||||
* `site-ffrg <https://github.com/ffruhr/site-ffruhr>`_ (Ruhrgebiet)
|
* `site-ffrg <https://github.com/ffruhr/site-ffruhr>`_ (Ruhrgebiet)
|
||||||
|
12
modules
12
modules
@ -1,18 +1,20 @@
|
|||||||
GLUON_FEEDS='openwrt gluon routing luci'
|
GLUON_FEEDS='openwrt gluon routing luci'
|
||||||
|
|
||||||
OPENWRT_REPO=git://git.openwrt.org/15.05/openwrt.git
|
OPENWRT_REPO=git://github.com/openwrt/openwrt.git
|
||||||
OPENWRT_COMMIT=363508bcabd8e9205f5fffc8ff282439e61d618f
|
OPENWRT_COMMIT=e663db7bb1797740c4a29ac0fc96eda1b88f9e6e
|
||||||
|
OPENWRT_BRANCH=chaos_calmer
|
||||||
|
|
||||||
PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git
|
PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git
|
||||||
PACKAGES_OPENWRT_COMMIT=f8a70fc188673d0ae8739b0a3095f7f61335fc10
|
PACKAGES_OPENWRT_COMMIT=9622fe984bba3a4547f48bc507ebaba7637eb2b0
|
||||||
PACKAGES_OPENWRT_BRANCH=for-15.05
|
PACKAGES_OPENWRT_BRANCH=for-15.05
|
||||||
|
|
||||||
PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git
|
PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git
|
||||||
PACKAGES_GLUON_COMMIT=fd06c7d67da69713f0361dadab16393c26cb609b
|
PACKAGES_GLUON_COMMIT=6935eca5afc9494341994ca6afaa009938dea29b
|
||||||
|
PACKAGES_GLUON_BRANCH=v2016.1.x
|
||||||
|
|
||||||
PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
|
PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
|
||||||
PACKAGES_ROUTING_COMMIT=ae65d4fe027592652376f8dbd3ff2ef37f5a84bc
|
PACKAGES_ROUTING_COMMIT=ae65d4fe027592652376f8dbd3ff2ef37f5a84bc
|
||||||
|
|
||||||
PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git
|
PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git
|
||||||
PACKAGES_LUCI_COMMIT=8832d534e96d3a934bd02711884371fc78a0d506
|
PACKAGES_LUCI_COMMIT=cdcdfd2594634804ab09dc8105e46116edce0cd6
|
||||||
PACKAGES_LUCI_BRANCH=for-15.05
|
PACKAGES_LUCI_BRANCH=for-15.05
|
||||||
|
@ -16,4 +16,3 @@ c:section('alfred', 'alfred', 'alfred',
|
|||||||
)
|
)
|
||||||
|
|
||||||
c:save('alfred')
|
c:save('alfred')
|
||||||
c:commit('alfred')
|
|
||||||
|
@ -40,7 +40,6 @@ end
|
|||||||
c:set('autoupdater', 'settings', 'version_file', '/lib/gluon/release')
|
c:set('autoupdater', 'settings', 'version_file', '/lib/gluon/release')
|
||||||
|
|
||||||
c:save('autoupdater')
|
c:save('autoupdater')
|
||||||
c:commit('autoupdater')
|
|
||||||
|
|
||||||
|
|
||||||
local autoupdater_util = require 'autoupdater.util'
|
local autoupdater_util = require 'autoupdater.util'
|
||||||
|
@ -24,4 +24,3 @@ end
|
|||||||
uci:set('network', 'client', 'macaddr', sysconfig.primary_mac)
|
uci:set('network', 'client', 'macaddr', sysconfig.primary_mac)
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
|
@ -45,4 +45,3 @@ end
|
|||||||
util.iterate_radios(configure_radio)
|
util.iterate_radios(configure_radio)
|
||||||
|
|
||||||
uci:save('wireless')
|
uci:save('wireless')
|
||||||
uci:commit('wireless')
|
|
||||||
|
@ -45,10 +45,10 @@ function M.handle(data)
|
|||||||
|
|
||||||
uci:set("gluon-node-info", sname, "share_location", data._location)
|
uci:set("gluon-node-info", sname, "share_location", data._location)
|
||||||
if data._location and data._latitude ~= nil and data._longitude ~= nil then
|
if data._location and data._latitude ~= nil and data._longitude ~= nil then
|
||||||
uci:set("gluon-node-info", sname, "latitude", data._latitude)
|
uci:set("gluon-node-info", sname, "latitude", data._latitude:trim())
|
||||||
uci:set("gluon-node-info", sname, "longitude", data._longitude)
|
uci:set("gluon-node-info", sname, "longitude", data._longitude:trim())
|
||||||
if data._altitude ~= nil then
|
if data._altitude ~= nil then
|
||||||
uci:set("gluon-node-info", sname, "altitude", data._altitude)
|
uci:set("gluon-node-info", sname, "altitude", data._altitude:trim())
|
||||||
else
|
else
|
||||||
uci:delete("gluon-node-info", sname, "altitude")
|
uci:delete("gluon-node-info", sname, "altitude")
|
||||||
end
|
end
|
||||||
|
@ -28,13 +28,13 @@ function M.section(form)
|
|||||||
o:depends("_limit_enabled", "1")
|
o:depends("_limit_enabled", "1")
|
||||||
o.value = uci:get("simple-tc", "mesh_vpn", "limit_ingress")
|
o.value = uci:get("simple-tc", "mesh_vpn", "limit_ingress")
|
||||||
o.rmempty = false
|
o.rmempty = false
|
||||||
o.datatype = "integer"
|
o.datatype = "uinteger"
|
||||||
|
|
||||||
o = s:option(cbi.Value, "_limit_egress", i18n.translate("Upstream (kbit/s)"))
|
o = s:option(cbi.Value, "_limit_egress", i18n.translate("Upstream (kbit/s)"))
|
||||||
o:depends("_limit_enabled", "1")
|
o:depends("_limit_enabled", "1")
|
||||||
o.value = uci:get("simple-tc", "mesh_vpn", "limit_egress")
|
o.value = uci:get("simple-tc", "mesh_vpn", "limit_egress")
|
||||||
o.rmempty = false
|
o.rmempty = false
|
||||||
o.datatype = "integer"
|
o.datatype = "uinteger"
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.handle(data)
|
function M.handle(data)
|
||||||
@ -49,14 +49,14 @@ function M.handle(data)
|
|||||||
uci:set("simple-tc", "mesh_vpn", "ifname", "mesh-vpn")
|
uci:set("simple-tc", "mesh_vpn", "ifname", "mesh-vpn")
|
||||||
|
|
||||||
if data._limit_ingress ~= nil then
|
if data._limit_ingress ~= nil then
|
||||||
uci:set("simple-tc", "mesh_vpn", "limit_ingress", data._limit_ingress)
|
uci:set("simple-tc", "mesh_vpn", "limit_ingress", data._limit_ingress:trim())
|
||||||
end
|
end
|
||||||
|
|
||||||
if data._limit_egress ~= nil then
|
if data._limit_egress ~= nil then
|
||||||
uci:set("simple-tc", "mesh_vpn", "limit_egress", data._limit_egress)
|
uci:set("simple-tc", "mesh_vpn", "limit_egress", data._limit_egress:trim())
|
||||||
end
|
end
|
||||||
|
|
||||||
uci:commit("simple-tc")
|
uci:save("simple-tc")
|
||||||
uci:commit("simple-tc")
|
uci:commit("simple-tc")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -24,7 +24,15 @@ end
|
|||||||
|
|
||||||
if platform.match('ar71xx', 'generic', {'tl-wdr3600', 'tl-wdr4300'}) then
|
if platform.match('ar71xx', 'generic', {'tl-wdr3600', 'tl-wdr4300'}) then
|
||||||
table.insert(try_files, 1, '/sys/class/ieee80211/phy1/macaddress')
|
table.insert(try_files, 1, '/sys/class/ieee80211/phy1/macaddress')
|
||||||
elseif platform.match('ar71xx', 'generic', {'unifi-outdoor-plus'}) then
|
elseif platform.match('ar71xx', 'generic', {'unifi-outdoor-plus', 'carambola2',
|
||||||
|
'mr600', 'mr600v2',
|
||||||
|
'mr900', 'mr900v2',
|
||||||
|
'mr1750',
|
||||||
|
'om2p', 'om2pv2',
|
||||||
|
'om2p-hs', 'om2p-hsv2',
|
||||||
|
'om2p-lc',
|
||||||
|
'om5p', 'om5p-an',
|
||||||
|
'om5p-ac', 'om5p-acv2'}) then
|
||||||
table.insert(try_files, 1, '/sys/class/net/eth0/address')
|
table.insert(try_files, 1, '/sys/class/net/eth0/address')
|
||||||
elseif platform.match('ar71xx', 'generic', {'archer-c5', 'archer-c7'}) then
|
elseif platform.match('ar71xx', 'generic', {'archer-c5', 'archer-c7'}) then
|
||||||
table.insert(try_files, 1, '/sys/class/net/eth1/address')
|
table.insert(try_files, 1, '/sys/class/net/eth1/address')
|
||||||
|
@ -16,7 +16,7 @@ if not (sysconfig.lan_ifname or sysconfig.wan_ifname) then
|
|||||||
local lan_ifname = uci:get('network', 'lan', 'ifname')
|
local lan_ifname = uci:get('network', 'lan', 'ifname')
|
||||||
local wan_ifname = uci:get('network', 'wan', 'ifname')
|
local wan_ifname = uci:get('network', 'wan', 'ifname')
|
||||||
|
|
||||||
if platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus'}) then
|
if platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro'}) then
|
||||||
lan_ifname, wan_ifname = wan_ifname, lan_ifname
|
lan_ifname, wan_ifname = wan_ifname, lan_ifname
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -32,5 +32,4 @@ if not (sysconfig.lan_ifname or sysconfig.wan_ifname) then
|
|||||||
uci:delete('network', 'wan')
|
uci:delete('network', 'wan')
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
end
|
end
|
||||||
|
@ -14,5 +14,4 @@ if not sysconfig.gluon_version then
|
|||||||
uci:set('system', system, 'timezone', site.timezone)
|
uci:set('system', system, 'timezone', site.timezone)
|
||||||
|
|
||||||
uci:save('system')
|
uci:save('system')
|
||||||
uci:commit('system')
|
|
||||||
end
|
end
|
||||||
|
@ -53,7 +53,6 @@ uci:section('network', 'route6', 'wan6_unreachable',
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
|
|
||||||
|
|
||||||
sysctl.set('net.ipv6.conf.all.accept_ra', 0)
|
sysctl.set('net.ipv6.conf.all.accept_ra', 0)
|
||||||
|
@ -11,4 +11,3 @@ local c = uci.cursor()
|
|||||||
c:delete('system', 'ntp', 'server')
|
c:delete('system', 'ntp', 'server')
|
||||||
c:set_list('system', 'ntp', 'server', site.ntp_servers)
|
c:set_list('system', 'ntp', 'server', site.ntp_servers)
|
||||||
c:save('system')
|
c:save('system')
|
||||||
c:commit('system')
|
|
||||||
|
@ -27,4 +27,3 @@ c:section('firewall', 'rule', 'wan_ssh',
|
|||||||
)
|
)
|
||||||
|
|
||||||
c:save('firewall')
|
c:save('firewall')
|
||||||
c:commit('firewall')
|
|
||||||
|
@ -23,4 +23,3 @@ end
|
|||||||
util.iterate_radios(configure_radio)
|
util.iterate_radios(configure_radio)
|
||||||
|
|
||||||
uci:save('wireless')
|
uci:save('wireless')
|
||||||
uci:commit('wireless')
|
|
||||||
|
3
package/gluon-core/files/lib/gluon/upgrade/998-commit
Executable file
3
package/gluon-core/files/lib/gluon/upgrade/998-commit
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
exec uci commit
|
@ -7,7 +7,7 @@ local function get_site_config()
|
|||||||
local file = assert(io.open(config))
|
local file = assert(io.open(config))
|
||||||
|
|
||||||
local decoder = json.new()
|
local decoder = json.new()
|
||||||
ltn12.pump.all(ltn12.source.file(io.open(config)), decoder:sink())
|
ltn12.pump.all(ltn12.source.file(file), decoder:sink())
|
||||||
|
|
||||||
file:close()
|
file:close()
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ if sysconfig.gluon_version == 'legacy' then
|
|||||||
uci:delete('network', 'wan')
|
uci:delete('network', 'wan')
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,5 +20,4 @@ if sysconfig.gluon_version == 'legacy' then
|
|||||||
uci:delete_all('wireless', 'wifi-iface', delete_legacy_iface)
|
uci:delete_all('wireless', 'wifi-iface', delete_legacy_iface)
|
||||||
|
|
||||||
uci:save('wireless')
|
uci:save('wireless')
|
||||||
uci:commit('wireless')
|
|
||||||
end
|
end
|
||||||
|
@ -12,9 +12,7 @@ if sysconfig.gluon_version == 'legacy' then
|
|||||||
if old == '1' then
|
if old == '1' then
|
||||||
local setup_mode = uci:get_first('gluon-setup-mode', 'setup_mode')
|
local setup_mode = uci:get_first('gluon-setup-mode', 'setup_mode')
|
||||||
uci:set('gluon-setup-mode', setup_mode, 'configured', '1')
|
uci:set('gluon-setup-mode', setup_mode, 'configured', '1')
|
||||||
|
|
||||||
uci:save('gluon-setup-mode')
|
uci:save('gluon-setup-mode')
|
||||||
uci:commit('gluon-setup-mode')
|
|
||||||
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
@ -21,7 +21,6 @@ if sysconfig.gluon_version == 'legacy' then
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('simple-tc')
|
uci:save('simple-tc')
|
||||||
uci:commit('simple-tc')
|
|
||||||
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
@ -33,5 +33,4 @@ if sysconfig.gluon_version == 'legacy' then
|
|||||||
end
|
end
|
||||||
|
|
||||||
uci:save('fastd')
|
uci:save('fastd')
|
||||||
uci:commit('fastd')
|
|
||||||
end
|
end
|
||||||
|
@ -101,9 +101,7 @@ end
|
|||||||
function image_supported(tmpfile)
|
function image_supported(tmpfile)
|
||||||
-- XXX: yay...
|
-- XXX: yay...
|
||||||
return ( 0 == os.execute(
|
return ( 0 == os.execute(
|
||||||
". /lib/functions.sh; " ..
|
"/sbin/sysupgrade -T %q >/dev/null"
|
||||||
"include /lib/upgrade; " ..
|
|
||||||
"platform_check_image %q >/dev/null"
|
|
||||||
% tmpfile
|
% tmpfile
|
||||||
) )
|
) )
|
||||||
end
|
end
|
||||||
|
@ -99,9 +99,9 @@ function f.handle(self, state, data)
|
|||||||
if state == FORM_VALID then
|
if state == FORM_VALID then
|
||||||
uci:set("network", "wan", "proto", data.ipv4)
|
uci:set("network", "wan", "proto", data.ipv4)
|
||||||
if data.ipv4 == "static" then
|
if data.ipv4 == "static" then
|
||||||
uci:set("network", "wan", "ipaddr", data.ipv4_addr)
|
uci:set("network", "wan", "ipaddr", data.ipv4_addr:trim())
|
||||||
uci:set("network", "wan", "netmask", data.ipv4_netmask)
|
uci:set("network", "wan", "netmask", data.ipv4_netmask:trim())
|
||||||
uci:set("network", "wan", "gateway", data.ipv4_gateway)
|
uci:set("network", "wan", "gateway", data.ipv4_gateway:trim())
|
||||||
else
|
else
|
||||||
uci:delete("network", "wan", "ipaddr")
|
uci:delete("network", "wan", "ipaddr")
|
||||||
uci:delete("network", "wan", "netmask")
|
uci:delete("network", "wan", "netmask")
|
||||||
@ -110,8 +110,8 @@ function f.handle(self, state, data)
|
|||||||
|
|
||||||
uci:set("network", "wan6", "proto", data.ipv6)
|
uci:set("network", "wan6", "proto", data.ipv6)
|
||||||
if data.ipv6 == "static" then
|
if data.ipv6 == "static" then
|
||||||
uci:set("network", "wan6", "ip6addr", data.ipv6_addr)
|
uci:set("network", "wan6", "ip6addr", data.ipv6_addr:trim())
|
||||||
uci:set("network", "wan6", "ip6gw", data.ipv6_gateway)
|
uci:set("network", "wan6", "ip6gw", data.ipv6_gateway:trim())
|
||||||
else
|
else
|
||||||
uci:delete("network", "wan6", "ip6addr")
|
uci:delete("network", "wan6", "ip6addr")
|
||||||
uci:delete("network", "wan6", "ip6gw")
|
uci:delete("network", "wan6", "ip6gw")
|
||||||
|
@ -98,7 +98,7 @@ for _, radio in ipairs(radios) do
|
|||||||
if config.path then
|
if config.path then
|
||||||
phy = find_phy_by_path(config.path)
|
phy = find_phy_by_path(config.path)
|
||||||
elseif config.macaddr then
|
elseif config.macaddr then
|
||||||
phy = find_phy_by_path(config.macaddr)
|
phy = find_phy_by_macaddr(config.macaddr)
|
||||||
end
|
end
|
||||||
|
|
||||||
if phy then
|
if phy then
|
||||||
|
@ -45,4 +45,3 @@ end
|
|||||||
|
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
|
@ -45,4 +45,3 @@ end
|
|||||||
|
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
|
@ -7,5 +7,4 @@ local uci = require('luci.model.uci').cursor()
|
|||||||
-- fix up duplicate mac addresses (for mesh-on-WAN)
|
-- fix up duplicate mac addresses (for mesh-on-WAN)
|
||||||
uci:set('network', 'wan', 'macaddr', util.generate_mac(1, 0))
|
uci:set('network', 'wan', 'macaddr', util.generate_mac(1, 0))
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ uci:section('batman-adv', 'mesh', 'bat0',
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
uci:save('batman-adv')
|
uci:save('batman-adv')
|
||||||
uci:commit('batman-adv')
|
|
||||||
|
|
||||||
if not uci:get('network', 'client', 'ifname') then
|
if not uci:get('network', 'client', 'ifname') then
|
||||||
uci:add_to_set('network', 'client', 'ifname', 'bat0')
|
uci:add_to_set('network', 'client', 'ifname', 'bat0')
|
||||||
@ -52,7 +51,6 @@ uci:section('network', 'interface', 'bat0',
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
|
|
||||||
|
|
||||||
uci:delete('firewall', 'client')
|
uci:delete('firewall', 'client')
|
||||||
@ -76,7 +74,6 @@ uci:section('firewall', 'rule', 'client_dns',
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('firewall')
|
uci:save('firewall')
|
||||||
uci:commit('firewall')
|
|
||||||
|
|
||||||
|
|
||||||
local dnsmasq = uci:get_first('dhcp', 'dnsmasq')
|
local dnsmasq = uci:get_first('dhcp', 'dnsmasq')
|
||||||
@ -93,7 +90,6 @@ uci:section('dhcp', 'dhcp', 'client',
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('dhcp')
|
uci:save('dhcp')
|
||||||
uci:commit('dhcp')
|
|
||||||
|
|
||||||
|
|
||||||
sysctl.set('net.ipv6.conf.br-client.forwarding', 0)
|
sysctl.set('net.ipv6.conf.br-client.forwarding', 0)
|
||||||
|
@ -131,5 +131,3 @@ util.iterate_radios(configure_radio)
|
|||||||
|
|
||||||
uci:save('wireless')
|
uci:save('wireless')
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('wireless')
|
|
||||||
uci:commit('network')
|
|
||||||
|
@ -15,4 +15,3 @@ if not c:get('network', 'mesh_wan') then
|
|||||||
end
|
end
|
||||||
|
|
||||||
c:save('network')
|
c:save('network')
|
||||||
c:commit('network')
|
|
||||||
|
@ -32,6 +32,5 @@ if sysconfig.lan_ifname and not uci:get('network', 'mesh_lan') then
|
|||||||
})
|
})
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -6,5 +6,4 @@ if uci:get('system', 'rssid_wlan0') then
|
|||||||
uci:set('system', 'rssid_wlan0', 'dev', 'mesh0')
|
uci:set('system', 'rssid_wlan0', 'dev', 'mesh0')
|
||||||
|
|
||||||
uci:save('system')
|
uci:save('system')
|
||||||
uci:commit('system')
|
|
||||||
end
|
end
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
local nixio = require 'nixio'
|
|
||||||
|
|
||||||
module 'gluon.batman_adv'
|
|
||||||
|
|
||||||
function interfaces(bat_if)
|
|
||||||
local iter = nixio.fs.glob('/sys/class/net/' .. bat_if .. '/lower_*')
|
|
||||||
return function()
|
|
||||||
local path = iter()
|
|
||||||
if path == nil then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
local ifname = path:match('/lower_([^/]+)$')
|
|
||||||
return ifname
|
|
||||||
end
|
|
||||||
end
|
|
@ -12,7 +12,7 @@ define Package/gluon-mesh-vpn-fastd
|
|||||||
SECTION:=gluon
|
SECTION:=gluon
|
||||||
CATEGORY:=Gluon
|
CATEGORY:=Gluon
|
||||||
TITLE:=Support for connecting batman-adv meshes via fastd
|
TITLE:=Support for connecting batman-adv meshes via fastd
|
||||||
DEPENDS:=+gluon-core +libgluonutil gluon-mesh-batman-adv +gluon-wan-dnsmasq +fastd +iptables-mod-extra +simple-tc
|
DEPENDS:=+gluon-core +libgluonutil gluon-mesh-batman-adv +gluon-wan-dnsmasq +fastd +iptables +iptables-mod-extra +simple-tc
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
|
@ -119,7 +119,6 @@ add_groups('mesh_vpn', site.fastd_mesh_vpn.groups)
|
|||||||
|
|
||||||
|
|
||||||
uci:save('fastd')
|
uci:save('fastd')
|
||||||
uci:commit('fastd')
|
|
||||||
|
|
||||||
|
|
||||||
uci:section('network', 'interface', 'mesh_vpn',
|
uci:section('network', 'interface', 'mesh_vpn',
|
||||||
@ -133,7 +132,6 @@ uci:section('network', 'interface', 'mesh_vpn',
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('network')
|
uci:save('network')
|
||||||
uci:commit('network')
|
|
||||||
|
|
||||||
|
|
||||||
uci:section('firewall', 'include', 'mesh_vpn_dns',
|
uci:section('firewall', 'include', 'mesh_vpn_dns',
|
||||||
@ -145,4 +143,3 @@ uci:section('firewall', 'include', 'mesh_vpn_dns',
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('firewall')
|
uci:save('firewall')
|
||||||
uci:commit('firewall')
|
|
||||||
|
@ -9,5 +9,4 @@ local secret = c:get("fastd", "mesh_vpn", "secret")
|
|||||||
if not secret or not secret:match(("%x"):rep(64)) then
|
if not secret or not secret:match(("%x"):rep(64)) then
|
||||||
c:set("fastd", "mesh_vpn", "secret", "generate")
|
c:set("fastd", "mesh_vpn", "secret", "generate")
|
||||||
c:save("fastd")
|
c:save("fastd")
|
||||||
c:commit("fastd")
|
|
||||||
end
|
end
|
||||||
|
@ -28,5 +28,4 @@ if not uci:get('simple-tc', 'mesh_vpn') then
|
|||||||
|
|
||||||
uci:section('simple-tc', 'interface', 'mesh_vpn', config)
|
uci:section('simple-tc', 'interface', 'mesh_vpn', config)
|
||||||
uci:save('simple-tc')
|
uci:save('simple-tc')
|
||||||
uci:commit('simple-tc')
|
|
||||||
end
|
end
|
||||||
|
@ -17,4 +17,3 @@ uci:section('firewall', 'rule', 'wan_respondd_reply',
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('firewall')
|
uci:save('firewall')
|
||||||
uci:commit('firewall')
|
|
||||||
|
@ -39,7 +39,6 @@ c:section('network', 'route6', 'local_node_route6',
|
|||||||
)
|
)
|
||||||
|
|
||||||
c:save('network')
|
c:save('network')
|
||||||
c:commit('network')
|
|
||||||
|
|
||||||
c:delete('firewall', 'local_node')
|
c:delete('firewall', 'local_node')
|
||||||
c:section('firewall', 'zone', 'local_node',
|
c:section('firewall', 'zone', 'local_node',
|
||||||
@ -52,4 +51,3 @@ c:section('firewall', 'zone', 'local_node',
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
c:save('firewall')
|
c:save('firewall')
|
||||||
c:commit('firewall')
|
|
||||||
|
@ -7,5 +7,4 @@ local config = 'gluon-node-info'
|
|||||||
if not uci:get_first(config, 'system') then
|
if not uci:get_first(config, 'system') then
|
||||||
uci:section(config, 'system')
|
uci:section(config, 'system')
|
||||||
uci:save(config)
|
uci:save(config)
|
||||||
uci:commit(config)
|
|
||||||
end
|
end
|
||||||
|
@ -15,5 +15,4 @@ end
|
|||||||
if not role then
|
if not role then
|
||||||
uci:set(config, uci:get_first(config, 'system'), 'role', default_role)
|
uci:set(config, uci:get_first(config, 'system'), 'role', default_role)
|
||||||
uci:save(config)
|
uci:save(config)
|
||||||
uci:commit(config)
|
|
||||||
end
|
end
|
||||||
|
14
package/gluon-node-info/files/lib/gluon/upgrade/520-node-info-whitespace-fix
Executable file
14
package/gluon-node-info/files/lib/gluon/upgrade/520-node-info-whitespace-fix
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/lua
|
||||||
|
local uci = require('luci.model.uci').cursor()
|
||||||
|
|
||||||
|
local sname = uci:get_first('gluon-node-info', 'location')
|
||||||
|
if sname then
|
||||||
|
local options = {'longitude', 'latitude', 'altitude'}
|
||||||
|
for _, option in ipairs(options) do
|
||||||
|
local value = uci:get('gluon-node-info', sname, option)
|
||||||
|
if value then
|
||||||
|
uci:set('gluon-node-info', sname, option, value:trim())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
uci:save('gluon-node-info')
|
||||||
|
end
|
@ -29,4 +29,3 @@ uci:section('firewall', 'rule', 'client_respondd',
|
|||||||
)
|
)
|
||||||
|
|
||||||
uci:save('firewall')
|
uci:save('firewall')
|
||||||
uci:commit('firewall')
|
|
||||||
|
@ -11,6 +11,5 @@ if site.setup_mode
|
|||||||
local name = c:get_first("gluon-setup-mode", "setup_mode")
|
local name = c:get_first("gluon-setup-mode", "setup_mode")
|
||||||
c:set("gluon-setup-mode", name, "configured", 1)
|
c:set("gluon-setup-mode", name, "configured", 1)
|
||||||
c:save('gluon-setup-mode')
|
c:save('gluon-setup-mode')
|
||||||
c:commit('gluon-setup-mode')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ if old == '1' then
|
|||||||
c:set('gluon-setup-mode', setup_mode, 'configured', '1')
|
c:set('gluon-setup-mode', setup_mode, 'configured', '1')
|
||||||
|
|
||||||
c:save('gluon-setup-mode')
|
c:save('gluon-setup-mode')
|
||||||
c:commit('gluon-setup-mode')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
os.remove('/etc/config/gluon-config-mode')
|
os.remove('/etc/config/gluon-config-mode')
|
||||||
|
@ -8,7 +8,7 @@ if sysconfig.setup_ifname then
|
|||||||
os.exit(0)
|
os.exit(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
if platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus'}) then
|
if platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro'}) then
|
||||||
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.wan_ifname or sysconfig.lan_ifname
|
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.wan_ifname or sysconfig.lan_ifname
|
||||||
else
|
else
|
||||||
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.lan_ifname or sysconfig.wan_ifname
|
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.lan_ifname or sysconfig.wan_ifname
|
||||||
|
@ -10,6 +10,4 @@ uci batch <<-EOF
|
|||||||
set uhttpd.main.home=/lib/gluon/status-page/www
|
set uhttpd.main.home=/lib/gluon/status-page/www
|
||||||
|
|
||||||
set uhttpd.main.max_requests=32
|
set uhttpd.main.max_requests=32
|
||||||
|
|
||||||
commit uhttpd
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -198,11 +198,11 @@ function (Helper, SignalGraph, Signal) {
|
|||||||
notUpdated.delete(id)
|
notUpdated.delete(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (id in notUpdated) {
|
notUpdated.forEach(function (id) {
|
||||||
managedNeighbours[id].views.forEach( function (d) { d.destroy() })
|
managedNeighbours[id].views.forEach( function (d) { d.destroy() })
|
||||||
colors.push(managedNeighbours[id].color)
|
colors.push(managedNeighbours[id].color)
|
||||||
delete managedNeighbours[id]
|
delete managedNeighbours[id]
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ define(function () {
|
|||||||
function resize() {
|
function resize() {
|
||||||
var newWidth = canvas.parentNode.clientWidth
|
var newWidth = canvas.parentNode.clientWidth
|
||||||
|
|
||||||
if (newWidth === 0)
|
if (newWidth === 0 || newWidth === canvas.width)
|
||||||
return
|
return
|
||||||
|
|
||||||
var lastImage = ctx.getImageData(0, 0, newWidth, canvas.height)
|
var lastImage = ctx.getImageData(0, 0, newWidth, canvas.height)
|
||||||
|
@ -171,28 +171,32 @@ define(["lib/helper"], function (Helper) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function prettyPackets(d) {
|
function prettyPackets(d) {
|
||||||
var v = new Intl.NumberFormat("de-DE", {maximumFractionDigits: 0}).format(d)
|
var v = Helper.formatNumberFixed(d, 0)
|
||||||
return v + " Pakete/s"
|
return v + " Pakete/s"
|
||||||
}
|
}
|
||||||
|
|
||||||
function prettyPrefix(prefixes, step, d) {
|
function prettyPrefix(prefixes, step, d) {
|
||||||
var prefix = 0
|
var prefix = 0
|
||||||
|
|
||||||
while (d > step && prefix < 4) {
|
while (d > step && prefix < prefixes.length - 1) {
|
||||||
d /= step
|
d /= step
|
||||||
prefix++
|
prefix++
|
||||||
}
|
}
|
||||||
|
|
||||||
d = new Intl.NumberFormat("de-DE", {maximumSignificantDigits: 3}).format(d)
|
d = Helper.formatNumber(d, 3)
|
||||||
return d + " " + prefixes[prefix]
|
return d + " " + prefixes[prefix]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prettySize(d) {
|
||||||
|
return prettyPrefix([ "", "k", "M", "G", "T" ], 1024, d)
|
||||||
|
}
|
||||||
|
|
||||||
function prettyBits(d) {
|
function prettyBits(d) {
|
||||||
return prettyPrefix([ "bps", "kbps", "Mbps", "Gbps" ], 1024, d * 8)
|
return prettySize(d * 8) + "bps"
|
||||||
}
|
}
|
||||||
|
|
||||||
function prettyBytes(d) {
|
function prettyBytes(d) {
|
||||||
return prettyPrefix([ "B", "kB", "MB", "GB", "TB" ], 1024, d)
|
return prettySize(d) + "B"
|
||||||
}
|
}
|
||||||
|
|
||||||
function prettyUptime(seconds) {
|
function prettyUptime(seconds) {
|
||||||
@ -220,11 +224,11 @@ define(["lib/helper"], function (Helper) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function prettyNVRAM(usage) {
|
function prettyNVRAM(usage) {
|
||||||
return new Intl.NumberFormat("de-DE", {maximumSignificantDigits: 3}).format(usage * 100) + "% belegt"
|
return Helper.formatNumber(usage * 100, 3) + "% belegt"
|
||||||
}
|
}
|
||||||
|
|
||||||
function prettyLoad(load) {
|
function prettyLoad(load) {
|
||||||
return new Intl.NumberFormat("de-DE", {maximumSignificantDigits: 3}).format(load)
|
return Helper.formatNumberFixed(load, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
function prettyRAM(memory) {
|
function prettyRAM(memory) {
|
||||||
|
@ -51,6 +51,25 @@ define([ "bacon" ], function (Bacon) {
|
|||||||
return dictGet(dict[k], key)
|
return dictGet(dict[k], key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function localizeNumber(d) {
|
||||||
|
var sep = ','
|
||||||
|
return d.replace('.', sep)
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatNumberFixed(d, digits) {
|
||||||
|
return localizeNumber(d.toFixed(digits))
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatNumber(d, digits) {
|
||||||
|
digits--
|
||||||
|
|
||||||
|
for (var v = d; v >= 10 && digits > 0; v /= 10)
|
||||||
|
digits--
|
||||||
|
|
||||||
|
// avoid toPrecision as it might produce strings in exponential notation
|
||||||
|
return formatNumberFixed(d, digits)
|
||||||
|
}
|
||||||
|
|
||||||
function haversine() {
|
function haversine() {
|
||||||
var radians = Array.prototype.map.call(arguments, function(deg) { return deg / 180.0 * Math.PI })
|
var radians = Array.prototype.map.call(arguments, function(deg) { return deg / 180.0 * Math.PI })
|
||||||
var lat1 = radians[0], lon1 = radians[1], lat2 = radians[2], lon2 = radians[3]
|
var lat1 = radians[0], lon1 = radians[1], lat2 = radians[2], lon2 = radians[3]
|
||||||
@ -66,6 +85,8 @@ define([ "bacon" ], function (Bacon) {
|
|||||||
, request: request
|
, request: request
|
||||||
, getJSON: getJSON
|
, getJSON: getJSON
|
||||||
, dictGet: dictGet
|
, dictGet: dictGet
|
||||||
|
, formatNumber: formatNumber
|
||||||
|
, formatNumberFixed: formatNumberFixed
|
||||||
, haversine: haversine
|
, haversine: haversine
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -11,22 +11,35 @@ local fs = require 'nixio.fs'
|
|||||||
|
|
||||||
local new_servers = ''
|
local new_servers = ''
|
||||||
|
|
||||||
|
local function append_server(server)
|
||||||
|
new_servers = new_servers .. 'nameserver ' .. server .. '\n'
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function handle_interface(status)
|
||||||
|
local ifname = status.device
|
||||||
|
local servers = status.inactive['dns-server']
|
||||||
|
|
||||||
local function append_servers(servers)
|
|
||||||
for _, server in ipairs(servers) do
|
for _, server in ipairs(servers) do
|
||||||
new_servers = new_servers .. 'nameserver ' .. server .. '\n'
|
if server:match('^fe80:') then
|
||||||
|
append_server(server .. '%' .. ifname)
|
||||||
|
else
|
||||||
|
append_server(server)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function append_interface_servers(iface)
|
local function append_interface_servers(iface)
|
||||||
append_servers(ubus:call('network.interface.' .. iface, 'status', {}).inactive['dns-server'])
|
handle_interface(ubus:call('network.interface.' .. iface, 'status', {}))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local static = uci:get_first('gluon-wan-dnsmasq', 'static', 'server')
|
local static = uci:get_first('gluon-wan-dnsmasq', 'static', 'server')
|
||||||
|
|
||||||
if type(static) == 'table' and #static > 0 then
|
if type(static) == 'table' and #static > 0 then
|
||||||
append_servers(static)
|
for _, server in ipairs(static) do
|
||||||
|
append_server(server)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
pcall(append_interface_servers, 'wan6')
|
pcall(append_interface_servers, 'wan6')
|
||||||
pcall(append_interface_servers, 'wan')
|
pcall(append_interface_servers, 'wan')
|
||||||
|
@ -0,0 +1,184 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Tue, 9 Feb 2016 18:22:29 +0100
|
||||||
|
Subject: ath10k-firmware: update to LEDE 0a0caa2656c8db73518a1783743ede772e3ac40f
|
||||||
|
|
||||||
|
diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
|
||||||
|
index b03d644..4f63cdd 100644
|
||||||
|
--- a/package/firmware/ath10k-firmware/Makefile
|
||||||
|
+++ b/package/firmware/ath10k-firmware/Makefile
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=ath10k-firmware
|
||||||
|
-PKG_SOURCE_VERSION:=77f72b5f7dd940386d9e619a17904987759b7186
|
||||||
|
+PKG_SOURCE_VERSION:=b00eb8d30fbebb6a5047ccacefa8c37e072fca9c
|
||||||
|
PKG_VERSION:=2014-11-13-$(PKG_SOURCE_VERSION)
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git
|
||||||
|
|
||||||
|
-PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||||
|
+PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@@ -28,14 +28,18 @@ define Package/ath10k-firmware-default
|
||||||
|
CATEGORY:=Kernel modules
|
||||||
|
SUBMENU:=$(WMENU)
|
||||||
|
URL:=$(PKG_SOURCE_URL)
|
||||||
|
+ DEPENDS:=kmod-ath10k
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/ath10k-firmware-qca988x
|
||||||
|
$(Package/ath10k-firmware-default)
|
||||||
|
+ DEFAULT:=PACKAGE_kmod-ath10k
|
||||||
|
TITLE:=ath10k firmware for QCA988x devices
|
||||||
|
endef
|
||||||
|
|
||||||
|
QCA988X_FIRMWARE_FILE:=firmware-5.bin_10.2.4.97-1
|
||||||
|
+QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-16.bin-lede
|
||||||
|
+QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-7.bin-lede.001
|
||||||
|
|
||||||
|
define Download/ath10k-firmware-qca988x
|
||||||
|
URL:=https://www.codeaurora.org/cgit/quic/qsdk/oss/firmware/ath10k-firmware/plain/10.2.4/
|
||||||
|
@@ -44,11 +48,63 @@ define Download/ath10k-firmware-qca988x
|
||||||
|
endef
|
||||||
|
$(eval $(call Download,ath10k-firmware-qca988x))
|
||||||
|
|
||||||
|
+define Download/ath10k-firmware-qca988x-ct
|
||||||
|
+ URL:=https://www.candelatech.com/downloads/
|
||||||
|
+ FILE:=$(QCA988X_FIRMWARE_FILE_CT)
|
||||||
|
+ MD5SUM:=5b651c0458bcf5c20701308b5e519976
|
||||||
|
+endef
|
||||||
|
+$(eval $(call Download,ath10k-firmware-qca988x-ct))
|
||||||
|
+
|
||||||
|
+define Download/ath10k-firmware-qca99x0-ct
|
||||||
|
+ URL:=https://www.candelatech.com/downloads/ath10k-10-4/
|
||||||
|
+ FILE:=$(QCA99X0_FIRMWARE_FILE_CT)
|
||||||
|
+ MD5SUM:=eb710949ff79142954aadae24616169c
|
||||||
|
+endef
|
||||||
|
+$(eval $(call Download,ath10k-firmware-qca99x0-ct))
|
||||||
|
+
|
||||||
|
define Package/ath10k-firmware-qca99x0
|
||||||
|
$(Package/ath10k-firmware-default)
|
||||||
|
TITLE:=ath10k firmware for QCA99x0 devices
|
||||||
|
endef
|
||||||
|
|
||||||
|
+define Package/ath10k-firmware-qca988x-ct
|
||||||
|
+$(Package/ath10k-firmware-default)
|
||||||
|
+ TITLE:=ath10k CT 10.1 firmware for QCA988x devices
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
+define Package/ath10k-firmware-qca988x-ct/description
|
||||||
|
+Alternative ath10k firmware for QCA988X from Candela Technologies.
|
||||||
|
+Enables IBSS and other features. See:
|
||||||
|
+http://www.candelatech.com/ath10k-10.1.php
|
||||||
|
+This firmware will NOT be used unless the standard ath10k-firmware-qca988x
|
||||||
|
+is un-selected since the driver will try to load firmware-5.bin before
|
||||||
|
+firmware-2.bin
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
+define Package/ath10k-firmware-qca99x0-ct/description
|
||||||
|
+Alternative ath10k firmware for QCA99x0 from Candela Technologies.
|
||||||
|
+Enables IBSS and other features. See:
|
||||||
|
+http://www.candelatech.com/ath10k-10.4.php
|
||||||
|
+This firmware conflicts with the standard 99x0 firmware, so select only
|
||||||
|
+one.
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
+define Package/ath10k-firmware-qca99x0/description
|
||||||
|
+Standard ath10k firmware for QCA99x0 from QCA
|
||||||
|
+This firmware conflicts with the CT 99x0 firmware, so select only
|
||||||
|
+one.
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
+define Package/ath10k-firmware-qca99x0-ct
|
||||||
|
+$(Package/ath10k-firmware-default)
|
||||||
|
+ TITLE:=ath10k CT 10.4.3 firmware for QCA99x0 devices
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
+define Package/ath10k-firmware-qca9984
|
||||||
|
+$(Package/ath10k-firmware-default)
|
||||||
|
+ TITLE:=ath10k firmware for QCA9984 devices
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
define Package/ath10k-firmware-qca6174
|
||||||
|
$(Package/ath10k-firmware-default)
|
||||||
|
TITLE:=ath10k firmware for QCA6174 devices
|
||||||
|
@@ -58,8 +114,8 @@ QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
|
||||||
|
QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
|
||||||
|
|
||||||
|
define Download/qca99x0-board
|
||||||
|
- URL:=https://www.codeaurora.org/cgit/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
|
||||||
|
- URL_FILE:=board-2.bin?id=ddcec9efd245da9365c474f513a855a55f3ac7fe
|
||||||
|
+ URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
|
||||||
|
+ URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD_REV)
|
||||||
|
FILE:=$(QCA99X0_BOARD_FILE)
|
||||||
|
MD5SUM:=a2b3c653c2363a5641200051d6333d0a
|
||||||
|
endef
|
||||||
|
@@ -79,6 +135,16 @@ define Package/ath10k-firmware-qca988x/install
|
||||||
|
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
|
||||||
|
endef
|
||||||
|
|
||||||
|
+define Package/ath10k-firmware-qca988x-ct/install
|
||||||
|
+ $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
|
||||||
|
+ $(INSTALL_DATA) \
|
||||||
|
+ $(PKG_BUILD_DIR)/QCA988X/board.bin \
|
||||||
|
+ $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
|
||||||
|
+ $(INSTALL_DATA) \
|
||||||
|
+ $(DL_DIR)/$(QCA988X_FIRMWARE_FILE_CT) \
|
||||||
|
+ $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
define Package/ath10k-firmware-qca6174/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/ath10k
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
|
||||||
|
@@ -97,6 +163,33 @@ define Package/ath10k-firmware-qca99x0/install
|
||||||
|
$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
|
||||||
|
endef
|
||||||
|
|
||||||
|
+define Package/ath10k-firmware-qca99x0-ct/install
|
||||||
|
+ $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
|
||||||
|
+ $(INSTALL_DATA) \
|
||||||
|
+ $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
|
||||||
|
+ $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
|
||||||
|
+ $(INSTALL_DATA) \
|
||||||
|
+ $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
|
||||||
|
+ $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
|
||||||
|
+ $(INSTALL_DATA) \
|
||||||
|
+ $(DL_DIR)/$(QCA99X0_FIRMWARE_FILE_CT) \
|
||||||
|
+ $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
+define Package/ath10k-firmware-qca9984/install
|
||||||
|
+ $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
|
||||||
|
+ $(INSTALL_DATA) \
|
||||||
|
+ $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
|
||||||
|
+ $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
|
||||||
|
+ $(INSTALL_DATA) \
|
||||||
|
+ $(PKG_BUILD_DIR)/QCA9984/hw1.0/firmware-5.bin_10.4-3.2-00072 \
|
||||||
|
+ $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
|
||||||
|
+endef
|
||||||
|
+
|
||||||
|
$(eval $(call BuildPackage,ath10k-firmware-qca988x))
|
||||||
|
$(eval $(call BuildPackage,ath10k-firmware-qca99x0))
|
||||||
|
$(eval $(call BuildPackage,ath10k-firmware-qca6174))
|
||||||
|
+$(eval $(call BuildPackage,ath10k-firmware-qca9984))
|
||||||
|
+
|
||||||
|
+$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
|
||||||
|
+$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
|
||||||
|
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
|
||||||
|
index 30da1cf..cd8d670 100644
|
||||||
|
--- a/package/kernel/mac80211/Makefile
|
||||||
|
+++ b/package/kernel/mac80211/Makefile
|
||||||
|
@@ -247,7 +247,7 @@ define KernelPackage/ath10k
|
||||||
|
$(call KernelPackage/mac80211/Default)
|
||||||
|
TITLE:=Atheros 802.11ac wireless cards support
|
||||||
|
URL:=https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
|
||||||
|
- DEPENDS+= @PCI_SUPPORT +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11W_SUPPORT +@KERNEL_RELAY +ath10k-firmware-qca988x
|
||||||
|
+ DEPENDS+= @PCI_SUPPORT +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11W_SUPPORT +@KERNEL_RELAY
|
||||||
|
FILES:= \
|
||||||
|
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \
|
||||||
|
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
|
File diff suppressed because it is too large
Load Diff
@ -1,39 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Sun, 21 Jun 2015 22:50:48 +0200
|
|
||||||
Subject: ar71xx: add support for tp-link wr740n v5.0 (EU)
|
|
||||||
|
|
||||||
TP-Link ships wr740n v5.0 to Romania (so probably everywhere except
|
|
||||||
China) with 4 MB flash and 32 MB memory (confirmed by their local
|
|
||||||
support). This patch adds support for the v5.0 clone of v4, i just
|
|
||||||
tested it on my own v5.0 router and it works.
|
|
||||||
|
|
||||||
Signed-off-by: Daniel Petre <daniel.petre@posteo.net>
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
|
||||||
index 013a215..37ce8a4 100644
|
|
||||||
--- a/target/linux/ar71xx/image/Makefile
|
|
||||||
+++ b/target/linux/ar71xx/image/Makefile
|
|
||||||
@@ -501,6 +501,14 @@ define Device/tl-wr740n-v4
|
|
||||||
CONSOLE := ttyATH0,115200
|
|
||||||
endef
|
|
||||||
|
|
||||||
+define Device/tl-wr740n-v5
|
|
||||||
+ $(Device/tplink-4mlzma)
|
|
||||||
+ BOARDNAME := TL-WR741ND-v4
|
|
||||||
+ DEVICE_PROFILE := TLWR740
|
|
||||||
+ TPLINK_HWID := 0x07400005
|
|
||||||
+ CONSOLE := ttyATH0,115200
|
|
||||||
+endef
|
|
||||||
+
|
|
||||||
define Device/tl-wr741nd-v1
|
|
||||||
$(Device/tplink-4m)
|
|
||||||
BOARDNAME := TL-WR741ND
|
|
||||||
@@ -530,7 +538,7 @@ define Device/tl-wr743nd-v2
|
|
||||||
TPLINK_HWID := 0x07430002
|
|
||||||
CONSOLE := ttyATH0,115200
|
|
||||||
endef
|
|
||||||
-TARGET_DEVICES += tl-wr740n-v4 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
|
|
||||||
+TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
|
|
||||||
|
|
||||||
define Device/tl-wr841n-v8
|
|
||||||
$(Device/tplink-4mlzma)
|
|
@ -1,35 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Sun, 21 Jun 2015 22:48:04 +0200
|
|
||||||
Subject: ar71xx: add support for TL-WR741ND v5
|
|
||||||
|
|
||||||
This device is identical to the TL-WR740N v5, it even uses the same HWID (which
|
|
||||||
wasn't the case for older TL-WR741ND revisions).
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
|
||||||
index 37ce8a4..8a25832 100644
|
|
||||||
--- a/target/linux/ar71xx/image/Makefile
|
|
||||||
+++ b/target/linux/ar71xx/image/Makefile
|
|
||||||
@@ -531,6 +531,14 @@ define Device/tl-wr741nd-v4
|
|
||||||
CONSOLE := ttyATH0,115200
|
|
||||||
endef
|
|
||||||
|
|
||||||
+define Device/tl-wr741nd-v5
|
|
||||||
+ $(Device/tplink-4mlzma)
|
|
||||||
+ BOARDNAME := TL-WR741ND-v4
|
|
||||||
+ DEVICE_PROFILE := TLWR741
|
|
||||||
+ TPLINK_HWID := 0x07400005
|
|
||||||
+ CONSOLE := ttyATH0,115200
|
|
||||||
+endef
|
|
||||||
+
|
|
||||||
define Device/tl-wr743nd-v2
|
|
||||||
$(Device/tplink-4mlzma)
|
|
||||||
BOARDNAME := TL-WR741ND-v4
|
|
||||||
@@ -538,7 +546,7 @@ define Device/tl-wr743nd-v2
|
|
||||||
TPLINK_HWID := 0x07430002
|
|
||||||
CONSOLE := ttyATH0,115200
|
|
||||||
endef
|
|
||||||
-TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
|
|
||||||
+TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2
|
|
||||||
|
|
||||||
define Device/tl-wr841n-v8
|
|
||||||
$(Device/tplink-4mlzma)
|
|
@ -1,87 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Fri, 17 Jul 2015 20:51:23 +0200
|
|
||||||
Subject: brcm2708: Implement sysupgrade
|
|
||||||
|
|
||||||
Implement sysupgrade for Raspberry Pi, similar to the way it is done on x86:
|
|
||||||
The config files are saved in the boot partition and moved to where they are
|
|
||||||
normally expected in preinit.
|
|
||||||
|
|
||||||
Also add optional gzip compression for the SD card image, since this can save
|
|
||||||
a lot of space (76M vs 6M), also similar to x86.
|
|
||||||
|
|
||||||
Signed-off-by: Bruno Randolf <br1@einfach.org>
|
|
||||||
|
|
||||||
diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
|
|
||||||
index 30f6e1d..015aa9c 100644
|
|
||||||
--- a/target/linux/brcm2708/Makefile
|
|
||||||
+++ b/target/linux/brcm2708/Makefile
|
|
||||||
@@ -19,7 +19,7 @@ SUBTARGETS:=bcm2708 bcm2709
|
|
||||||
KERNEL_PATCHVER:=3.18
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/target.mk
|
|
||||||
-DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core kmod-sound-arm-bcm2835
|
|
||||||
+DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core kmod-sound-arm-bcm2835 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
|
|
||||||
|
|
||||||
define Target/Description
|
|
||||||
Build firmware image for Broadcom BCM2708/BCM2709 SoC devices.
|
|
||||||
diff --git a/target/linux/brcm2708/base-files/lib/preinit/79_move_config b/target/linux/brcm2708/base-files/lib/preinit/79_move_config
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..7bcea7b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/target/linux/brcm2708/base-files/lib/preinit/79_move_config
|
|
||||||
@@ -0,0 +1,18 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+# Copyright (C) 2015 OpenWrt.org
|
|
||||||
+
|
|
||||||
+BOOTPART=/dev/mmcblk0p1
|
|
||||||
+
|
|
||||||
+move_config() {
|
|
||||||
+ if [ -b $BOOTPART ]; then
|
|
||||||
+ insmod nls_cp437
|
|
||||||
+ insmod nls_iso8859-1
|
|
||||||
+ insmod fat
|
|
||||||
+ insmod vfat
|
|
||||||
+ mount -t vfat -o rw,noatime $BOOTPART /mnt
|
|
||||||
+ [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
|
|
||||||
+ umount /mnt
|
|
||||||
+ fi
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+boot_hook_add preinit_mount_root move_config
|
|
||||||
diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..3e1ee00
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
|
|
||||||
@@ -0,0 +1,17 @@
|
|
||||||
+platform_check_image() {
|
|
||||||
+ # i know no way to verify the image
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+platform_do_upgrade() {
|
|
||||||
+ sync
|
|
||||||
+ get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync
|
|
||||||
+ sleep 1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+platform_copy_config() {
|
|
||||||
+ mount -t vfat -o rw,noatime /dev/mmcblk0p1 /mnt
|
|
||||||
+ cp -af "$CONF_TAR" /mnt/
|
|
||||||
+ sync
|
|
||||||
+ umount /mnt
|
|
||||||
+}
|
|
||||||
diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile
|
|
||||||
index e70bdd0..2c18baf 100644
|
|
||||||
--- a/target/linux/brcm2708/image/Makefile
|
|
||||||
+++ b/target/linux/brcm2708/image/Makefile
|
|
||||||
@@ -28,6 +28,9 @@ define Image/Build/RaspberryPi
|
|
||||||
mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img # Copy OpenWrt built kernel
|
|
||||||
./gen_rpi_sdcard_img.sh $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img $(KDIR)/boot.img $(KDIR)/root.$(1) \
|
|
||||||
$(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
|
||||||
+ ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
|
|
||||||
+ gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img
|
|
||||||
+ endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Image/Build
|
|
@ -1,131 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Thu, 16 Jul 2015 22:01:02 +0200
|
|
||||||
Subject: sunxi: fix uboot install location
|
|
||||||
|
|
||||||
Install uboot files to KERNEL_BUILD_DIR instead of BIN_DIR to fix the
|
|
||||||
ImageBuilder. Similar fixes are necessary for many (all?) other uboot
|
|
||||||
targets.
|
|
||||||
|
|
||||||
Also remove the DTS copy command, BIN_DIR was unnecessarily cluttered with
|
|
||||||
DTS files unrelated to the chosen profile.
|
|
||||||
|
|
||||||
diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
|
|
||||||
index 14ba922..9032600 100644
|
|
||||||
--- a/package/boot/uboot-sunxi/Makefile
|
|
||||||
+++ b/package/boot/uboot-sunxi/Makefile
|
|
||||||
@@ -6,6 +6,7 @@
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
+include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
|
|
||||||
PKG_NAME:=u-boot
|
|
||||||
PKG_VERSION:=2015.01
|
|
||||||
@@ -16,7 +17,7 @@ PKG_SOURCE_URL:= \
|
|
||||||
|
|
||||||
PKG_MD5SUM:=7f08dc9e98a71652bd6968888ed6ec95
|
|
||||||
|
|
||||||
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
||||||
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
|
||||||
PKG_LICENSE_FILES:=Licenses/README
|
|
||||||
@@ -136,16 +137,16 @@ define Build/Compile
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/uboot/install/default
|
|
||||||
- $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
|
|
||||||
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
|
|
||||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
|
|
||||||
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin
|
|
||||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
|
|
||||||
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin
|
|
||||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
|
|
||||||
$(CP) uEnv.txt \
|
|
||||||
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt
|
|
||||||
- mkimage -C none -A arm -T script -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.scr
|
|
||||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt
|
|
||||||
+ mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \
|
|
||||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/uboot/install/template
|
|
||||||
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
|
|
||||||
index 6fcd61f..19ab935 100644
|
|
||||||
--- a/target/linux/sunxi/image/Makefile
|
|
||||||
+++ b/target/linux/sunxi/image/Makefile
|
|
||||||
@@ -11,28 +11,12 @@ include $(INCLUDE_DIR)/host.mk
|
|
||||||
FAT32_BLOCK_SIZE=1024
|
|
||||||
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
|
||||||
|
|
||||||
-BOARDS:= \
|
|
||||||
- sun4i-a10-cubieboard \
|
|
||||||
- sun4i-a10-olinuxino-lime \
|
|
||||||
- sun4i-a10-pcduino \
|
|
||||||
- sun5i-a13-olinuxino \
|
|
||||||
- sun6i-a31-colombus \
|
|
||||||
- sun6i-a31-m9 \
|
|
||||||
- sun7i-a20-bananapi \
|
|
||||||
- sun7i-a20-bananapro \
|
|
||||||
- sun7i-a20-cubieboard2 \
|
|
||||||
- sun7i-a20-cubietruck \
|
|
||||||
- sun7i-a20-olinuxino-lime \
|
|
||||||
- sun7i-a20-olinuxino-micro \
|
|
||||||
- sun7i-a20-pcduino3 \
|
|
||||||
- sun7i-a20-lamobo-r1
|
|
||||||
-
|
|
||||||
define Image/BuildKernel
|
|
||||||
mkimage -A arm -O linux -T kernel -C none \
|
|
||||||
-a 0x40008000 -e 0x40008000 \
|
|
||||||
-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
|
|
||||||
-d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
|
|
||||||
-
|
|
||||||
+
|
|
||||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
|
||||||
$(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
|
|
||||||
echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
|
|
||||||
@@ -42,27 +26,23 @@ define Image/BuildKernel
|
|
||||||
$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \
|
|
||||||
)
|
|
||||||
endif
|
|
||||||
-
|
|
||||||
- $(foreach board,$(BOARDS),
|
|
||||||
- $(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/
|
|
||||||
- )
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Image/Build/SDCard
|
|
||||||
rm -f $(KDIR)/boot.img
|
|
||||||
mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS)
|
|
||||||
-
|
|
||||||
- mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr
|
|
||||||
- mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(2).dtb ::dtb
|
|
||||||
+
|
|
||||||
+ mcopy -i $(KDIR)/boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr
|
|
||||||
+ mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb
|
|
||||||
mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage
|
|
||||||
-
|
|
||||||
+
|
|
||||||
./gen_sunxi_sdcard_img.sh \
|
|
||||||
$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \
|
|
||||||
$(KDIR)/boot.img \
|
|
||||||
$(KDIR)/root.$(1) \
|
|
||||||
$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
|
|
||||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
|
|
||||||
- $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-u-boot-with-spl.bin
|
|
||||||
+ $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Image/Build/Profile/A10-OLinuXino-Lime
|
|
||||||
@@ -124,7 +104,7 @@ endef
|
|
||||||
define Image/Build
|
|
||||||
$(call Image/Build/$(1),$(1))
|
|
||||||
$(call Image/Build/Profile/$(PROFILE),$(1))
|
|
||||||
-
|
|
||||||
+
|
|
||||||
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
|
|
||||||
endef
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Thu, 16 Jul 2015 22:13:59 +0200
|
|
||||||
Subject: sunxi: respect CONFIG_TARGET_IMAGES_GZIP
|
|
||||||
|
|
||||||
The ext4 images are huge uncompressed.
|
|
||||||
|
|
||||||
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
|
|
||||||
index 19ab935..d3f4409 100644
|
|
||||||
--- a/target/linux/sunxi/image/Makefile
|
|
||||||
+++ b/target/linux/sunxi/image/Makefile
|
|
||||||
@@ -43,6 +43,10 @@ define Image/Build/SDCard
|
|
||||||
$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
|
|
||||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
|
|
||||||
$(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin
|
|
||||||
+
|
|
||||||
+ ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
|
|
||||||
+ gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img
|
|
||||||
+ endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Image/Build/Profile/A10-OLinuXino-Lime
|
|
@ -1,62 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Sat, 18 Jul 2015 17:13:23 +0200
|
|
||||||
Subject: odhcp6c: add option "sourcefilter" to disable source filter
|
|
||||||
|
|
||||||
Signed-off-by: Steven Barth <steven@midlink.org>
|
|
||||||
|
|
||||||
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
|
|
||||||
index 5bf43bd..75de54c 100644
|
|
||||||
--- a/package/network/ipv6/odhcp6c/Makefile
|
|
||||||
+++ b/package/network/ipv6/odhcp6c/Makefile
|
|
||||||
@@ -8,7 +8,7 @@
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=odhcp6c
|
|
||||||
-PKG_VERSION:=2015-07-13
|
|
||||||
+PKG_VERSION:=2015-07-18
|
|
||||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
||||||
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
|
||||||
index b8cbddb..33f6d9b 100755
|
|
||||||
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
|
||||||
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
|
||||||
@@ -76,7 +76,7 @@ setup_interface () {
|
|
||||||
done
|
|
||||||
|
|
||||||
for entry in $RA_ROUTES; do
|
|
||||||
- local duplicate=0
|
|
||||||
+ local duplicate=$NOSOURCEFILTER
|
|
||||||
local addr="${entry%%/*}"
|
|
||||||
entry="${entry#*/}"
|
|
||||||
local mask="${entry%%,*}"
|
|
||||||
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
|
|
||||||
index adcb100..4a453fd 100755
|
|
||||||
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
|
|
||||||
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
|
|
||||||
@@ -28,14 +28,15 @@ proto_dhcpv6_init_config() {
|
|
||||||
proto_config_add_boolean delegate
|
|
||||||
proto_config_add_int "soltimeout"
|
|
||||||
proto_config_add_boolean fakeroutes
|
|
||||||
+ proto_config_add_boolean sourcefilter
|
|
||||||
}
|
|
||||||
|
|
||||||
proto_dhcpv6_setup() {
|
|
||||||
local config="$1"
|
|
||||||
local iface="$2"
|
|
||||||
|
|
||||||
- local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
|
|
||||||
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
|
|
||||||
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
|
|
||||||
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
|
|
||||||
|
|
||||||
|
|
||||||
# Configure
|
|
||||||
@@ -76,6 +77,7 @@ proto_dhcpv6_setup() {
|
|
||||||
[ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat"
|
|
||||||
[ -n "$zone" ] && proto_export "ZONE=$zone"
|
|
||||||
[ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1"
|
|
||||||
+ [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1"
|
|
||||||
|
|
||||||
proto_export "INTERFACE=$config"
|
|
||||||
proto_run_command "$config" odhcp6c \
|
|
@ -0,0 +1,25 @@
|
|||||||
|
From: Alexander Dahl <alex@netz39.de>
|
||||||
|
Date: Thu, 17 Mar 2016 15:04:09 +0100
|
||||||
|
Subject: x86: fix platform_export_bootpart() for Xen virtual disks
|
||||||
|
|
||||||
|
Virtual disk devices in a Xen virtual machine (DomU) can be /dev/xvda,
|
||||||
|
/dev/xvdb and so on with partitions like /dev/xdva1. Devices named like
|
||||||
|
this where not considered before. This resulted in a non working
|
||||||
|
sysupgrade, because the boot partition could not be found.
|
||||||
|
|
||||||
|
Signed-off-by: Alexander Dahl <alex@netz39.de>
|
||||||
|
Suggested-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
|
||||||
|
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh
|
||||||
|
index 73ab5ef..adc119c 100644
|
||||||
|
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
|
||||||
|
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
|
||||||
|
@@ -17,7 +17,7 @@ platform_export_bootpart() {
|
||||||
|
PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
|
||||||
|
uuid="${disk#PARTUUID=}"
|
||||||
|
uuid="${uuid%-02}"
|
||||||
|
- for disk in /dev/[hsv]d[a-z]; do
|
||||||
|
+ for disk in /dev/[hsv]d[a-z] /dev/xvd[a-z]; do
|
||||||
|
set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
|
||||||
|
if [ "$4$3$2$1" = "$uuid" ]; then
|
||||||
|
export BOOTPART="${disk}1"
|
@ -0,0 +1,27 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Wed, 30 Mar 2016 02:59:19 +0200
|
||||||
|
Subject: Support LibreSSL as provider of openssl
|
||||||
|
|
||||||
|
The build scripts check for openssl by grepping the string "OpenSSL" in
|
||||||
|
the output of openssl version command. LibreSSL fails this test as it
|
||||||
|
outputs something like "LibreSSL 2.2.4". This patch fix the
|
||||||
|
prereq-bulid.mk file so that it accepts LibreSSL as openssl provider as
|
||||||
|
well.
|
||||||
|
|
||||||
|
Signed-off-by: Marek Behun <kabel@blackhole.sk>
|
||||||
|
|
||||||
|
Backport of r48267
|
||||||
|
|
||||||
|
diff --git a/include/prereq-build.mk b/include/prereq-build.mk
|
||||||
|
index 32c4ada..f36d57c 100644
|
||||||
|
--- a/include/prereq-build.mk
|
||||||
|
+++ b/include/prereq-build.mk
|
||||||
|
@@ -151,7 +151,7 @@ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
|
||||||
|
file --version 2>&1 | grep file))
|
||||||
|
|
||||||
|
$(eval $(call SetupHostCommand,openssl,Please install the 'openssl' utility, \
|
||||||
|
- openssl version | grep OpenSSL))
|
||||||
|
+ openssl version | grep '\(OpenSSL\|LibreSSL\)'))
|
||||||
|
|
||||||
|
|
||||||
|
# Install ldconfig stub
|
@ -1,26 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Thu, 23 Jul 2015 01:31:05 +0200
|
|
||||||
Subject: ar71xx: fix wndr3700_board_detect for some NETGEAR WNDR3700v2
|
|
||||||
|
|
||||||
There are a few NETGEAR devices which don't terminate the model name in the
|
|
||||||
ART with a NUL byte, at least some NETGEAR WNDR3700v2. The current awk
|
|
||||||
expression doesn't match 0xFF bytes, so AR71XX_MODEL contains lots of
|
|
||||||
trailing 0xFF garbage in this case.
|
|
||||||
|
|
||||||
Fix this by matching for the first non-printable character and explicitly
|
|
||||||
setting LC_CTYPE=C (probably not strictly necessary on OpenWrt, but will
|
|
||||||
definitely work like this, even when awk supports locales and LANG is set).
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
|
||||||
index 839abc7..af92b01 100755
|
|
||||||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
|
||||||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
|
||||||
@@ -38,7 +38,7 @@ wndr3700_board_detect() {
|
|
||||||
;;
|
|
||||||
"33373031")
|
|
||||||
# Use awk to remove everything after the first zero byte
|
|
||||||
- model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')"
|
|
||||||
+ model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')"
|
|
||||||
case $model in
|
|
||||||
$'\xff'*)
|
|
||||||
if [ "${model:24:1}" = 'N' ]; then
|
|
@ -1,47 +0,0 @@
|
|||||||
From: Nils Schneider <nils@nilsschneider.net>
|
|
||||||
Date: Fri, 24 Jul 2015 21:52:12 +0200
|
|
||||||
Subject: mac80211: set mcast-rate for mesh point interfaces
|
|
||||||
|
|
||||||
In order to set the multicast rate for mesh point interfaces the "mesh join"
|
|
||||||
was made explicit and moved to mac80211_setup_vif(), similar to how it is
|
|
||||||
done for IBSS interfaces.
|
|
||||||
|
|
||||||
Previously, the mesh join was made implicit in case authentication (i.e.
|
|
||||||
$key) was not used when creating the interface in mac80211_prepare_vif(),
|
|
||||||
while using authentication would create the interface first, then join
|
|
||||||
later in mac80211_setup_vif() by starting authsae.
|
|
||||||
|
|
||||||
Signed-off-by: Nils Schneider <nils@nilsschneider.net>
|
|
||||||
|
|
||||||
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
|
||||||
index 2a8d2f9..8d31a80 100644
|
|
||||||
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
|
||||||
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
|
||||||
@@ -455,12 +455,7 @@ mac80211_prepare_vif() {
|
|
||||||
}
|
|
||||||
;;
|
|
||||||
mesh)
|
|
||||||
- json_get_vars key mesh_id
|
|
||||||
- if [ -n "$key" ]; then
|
|
||||||
- iw phy "$phy" interface add "$ifname" type mp
|
|
||||||
- else
|
|
||||||
- iw phy "$phy" interface add "$ifname" type mp mesh_id "$mesh_id"
|
|
||||||
- fi
|
|
||||||
+ iw phy "$phy" interface add "$ifname" type mp
|
|
||||||
;;
|
|
||||||
monitor)
|
|
||||||
iw phy "$phy" interface add "$ifname" type monitor
|
|
||||||
@@ -603,6 +598,13 @@ mac80211_setup_vif() {
|
|
||||||
wireless_vif_parse_encryption
|
|
||||||
mac80211_setup_supplicant || failed=1
|
|
||||||
fi
|
|
||||||
+ else
|
|
||||||
+ json_get_vars mesh_id mcast_rate
|
|
||||||
+
|
|
||||||
+ mcval=
|
|
||||||
+ [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
|
|
||||||
+
|
|
||||||
+ iw dev "$ifname" mesh join "$mesh_id" ${mcval:+mcast-rate $mcval}
|
|
||||||
fi
|
|
||||||
|
|
||||||
for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,81 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Sun, 24 Apr 2016 08:44:30 +0200
|
||||||
|
Subject: tools: add tar host build, required for --sort=name which was only added in the latest version
|
||||||
|
|
||||||
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||||
|
|
||||||
|
Backport of r46876
|
||||||
|
|
||||||
|
diff --git a/tools/Makefile b/tools/Makefile
|
||||||
|
index c6cded8..98ce8c5 100644
|
||||||
|
--- a/tools/Makefile
|
||||||
|
+++ b/tools/Makefile
|
||||||
|
@@ -81,6 +81,9 @@ endif
|
||||||
|
# dependency for tools which have patches directory
|
||||||
|
$(foreach tool, $(tools-y), $(if $(wildcard $(curdir)/$(tool)/patches),$(eval $(curdir)/$(tool)/compile += $(curdir)/patch/install)))
|
||||||
|
|
||||||
|
+$(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(curdir)/tar/install))
|
||||||
|
+tools-y += tar
|
||||||
|
+
|
||||||
|
$(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
|
||||||
|
$(curdir)/builddirs-default := $(tools-y)
|
||||||
|
|
||||||
|
diff --git a/tools/tar/Makefile b/tools/tar/Makefile
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..975e783
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tools/tar/Makefile
|
||||||
|
@@ -0,0 +1,30 @@
|
||||||
|
+#
|
||||||
|
+# Copyright (C) 2015 OpenWrt.org
|
||||||
|
+#
|
||||||
|
+# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
+# See /LICENSE for more information.
|
||||||
|
+#
|
||||||
|
+include $(TOPDIR)/rules.mk
|
||||||
|
+
|
||||||
|
+PKG_NAME:=tar
|
||||||
|
+PKG_VERSION:=1.28
|
||||||
|
+
|
||||||
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
+PKG_SOURCE_URL:=@GNU/tar
|
||||||
|
+PKG_MD5SUM:=49b6306167724fe48f419a33a5beb857
|
||||||
|
+
|
||||||
|
+HOST_BUILD_PARALLEL := 1
|
||||||
|
+
|
||||||
|
+include $(INCLUDE_DIR)/host-build.mk
|
||||||
|
+
|
||||||
|
+HOSTCC := $(HOSTCC_NOCACHE)
|
||||||
|
+HOSTCXX := $(HOSTCXX_NOCACHE)
|
||||||
|
+
|
||||||
|
+HOST_CONFIGURE_ARGS += \
|
||||||
|
+ --without-posix-acls \
|
||||||
|
+ --without-selinux \
|
||||||
|
+ --without-xattrs \
|
||||||
|
+ --disable-acl \
|
||||||
|
+ --disable-nls
|
||||||
|
+
|
||||||
|
+$(eval $(call HostBuild))
|
||||||
|
diff --git a/tools/tar/patches/100-fix_xattr_disable.patch b/tools/tar/patches/100-fix_xattr_disable.patch
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..5735bd2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tools/tar/patches/100-fix_xattr_disable.patch
|
||||||
|
@@ -0,0 +1,17 @@
|
||||||
|
+--- a/lib/xattr-at.c
|
||||||
|
++++ b/lib/xattr-at.c
|
||||||
|
+@@ -18,6 +18,8 @@
|
||||||
|
+
|
||||||
|
+ #include <config.h>
|
||||||
|
+
|
||||||
|
++#ifdef HAVE_XATTRS
|
||||||
|
++
|
||||||
|
+ #include "xattr-at.h"
|
||||||
|
+ #include "openat.h"
|
||||||
|
+
|
||||||
|
+@@ -108,3 +110,5 @@
|
||||||
|
+ #undef AT_FUNC_RESULT
|
||||||
|
+ #undef AT_FUNC_POST_FILE_PARAM_DECLS
|
||||||
|
+ #undef AT_FUNC_POST_FILE_ARGS
|
||||||
|
++
|
||||||
|
++#endif
|
@ -1,57 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Thu, 6 Aug 2015 03:01:38 +0200
|
|
||||||
Subject: ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND v9, Compex WPJ531)
|
|
||||||
|
|
||||||
The initialization routines for these boards were relying on some (wrong)
|
|
||||||
defaults for the QCA953x ethernet. Make these defaults explicit to prevent
|
|
||||||
breaking them when the QCA953x defaults are fixed.
|
|
||||||
|
|
||||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
|
|
||||||
index c28afc6..3e5c2a2 100644
|
|
||||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
|
|
||||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
|
|
||||||
@@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void)
|
|
||||||
ath79_register_mdio(0, 0x0);
|
|
||||||
|
|
||||||
/* LAN */
|
|
||||||
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
|
|
||||||
+ ath79_eth1_data.duplex = DUPLEX_FULL;
|
|
||||||
+ ath79_switch_data.phy_poll_mask |= BIT(4);
|
|
||||||
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
|
|
||||||
ath79_register_eth(1);
|
|
||||||
|
|
||||||
/* WAN */
|
|
||||||
ath79_switch_data.phy4_mii_en = 1;
|
|
||||||
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
|
|
||||||
+ ath79_eth0_data.duplex = DUPLEX_FULL;
|
|
||||||
+ ath79_eth0_data.speed = SPEED_100;
|
|
||||||
+ ath79_eth0_data.phy_mask = BIT(4);
|
|
||||||
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
|
|
||||||
ath79_register_eth(0);
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
|
|
||||||
index bc13d70..e665a2e 100644
|
|
||||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
|
|
||||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
|
|
||||||
@@ -105,12 +105,19 @@ static void __init common_setup(void)
|
|
||||||
ath79_register_mdio(0, 0x0);
|
|
||||||
|
|
||||||
/* LAN */
|
|
||||||
+ ath79_eth0_data.duplex = DUPLEX_FULL;
|
|
||||||
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
|
|
||||||
+ ath79_eth0_data.speed = SPEED_100;
|
|
||||||
+ ath79_eth0_data.phy_mask = BIT(4);
|
|
||||||
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
|
|
||||||
ath79_register_eth(0);
|
|
||||||
|
|
||||||
/* WAN */
|
|
||||||
ath79_switch_data.phy4_mii_en = 1;
|
|
||||||
+ ath79_eth1_data.duplex = DUPLEX_FULL;
|
|
||||||
ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
|
|
||||||
+ ath79_eth1_data.speed = SPEED_100;
|
|
||||||
+ ath79_switch_data.phy_poll_mask |= BIT(4);
|
|
||||||
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
|
|
||||||
ath79_register_eth(1);
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Sun, 24 Apr 2016 08:44:47 +0200
|
||||||
|
Subject: tools: compile flock before everything else
|
||||||
|
|
||||||
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||||
|
|
||||||
|
Backport of r48413
|
||||||
|
|
||||||
|
diff --git a/tools/Makefile b/tools/Makefile
|
||||||
|
index 98ce8c5..3402c08 100644
|
||||||
|
--- a/tools/Makefile
|
||||||
|
+++ b/tools/Makefile
|
||||||
|
@@ -26,7 +26,7 @@ endif
|
||||||
|
tools-$(BUILD_TOOLCHAIN) += gmp mpfr mpc libelf
|
||||||
|
tools-y += m4 libtool autoconf automake flex bison pkg-config sed mklibs
|
||||||
|
tools-y += sstrip make-ext4fs e2fsprogs mtd-utils mkimage
|
||||||
|
-tools-y += firmware-utils patch-image patch quilt yaffs2 flock padjffs2
|
||||||
|
+tools-y += firmware-utils patch-image patch quilt yaffs2 padjffs2
|
||||||
|
tools-y += mm-macros missing-macros xz cmake scons bc findutils gengetopt patchelf
|
||||||
|
tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
|
||||||
|
tools-$(CONFIG_powerpc) += upx
|
||||||
|
@@ -84,6 +84,9 @@ $(foreach tool, $(tools-y), $(if $(wildcard $(curdir)/$(tool)/patches),$(eval $(
|
||||||
|
$(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(curdir)/tar/install))
|
||||||
|
tools-y += tar
|
||||||
|
|
||||||
|
+$(curdir)/tar/compile := $(curdir)/flock/install
|
||||||
|
+tools-y += flock
|
||||||
|
+
|
||||||
|
$(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
|
||||||
|
$(curdir)/builddirs-default := $(tools-y)
|
||||||
|
|
@ -1,909 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Thu, 6 Aug 2015 03:01:47 +0200
|
|
||||||
Subject: ar71xx: rework patch for qca953x/956x
|
|
||||||
|
|
||||||
Patch cherry-picked from the following location:
|
|
||||||
https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?h=release/coconut_ioe4531_2.0&id=5c357bf6c763e4140dddcc9a3bc5f005525a9c0e
|
|
||||||
|
|
||||||
Changelist,
|
|
||||||
- add more register defines
|
|
||||||
- add EHCI support
|
|
||||||
- fix GPIO pin count to 18
|
|
||||||
- fix chained irq disabled
|
|
||||||
- fix GMAC0/GMAC1 initial
|
|
||||||
- fix WMAC irq number to 47
|
|
||||||
- merge the changes of dev-eth.c from the patch to file.
|
|
||||||
|
|
||||||
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
|
|
||||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
|
||||||
index ae3db4c..ff94e2e 100644
|
|
||||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
|
||||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
|
||||||
@@ -198,6 +198,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask)
|
|
||||||
case ATH79_SOC_AR9330:
|
|
||||||
case ATH79_SOC_AR9331:
|
|
||||||
case ATH79_SOC_QCA9533:
|
|
||||||
+ case ATH79_SOC_QCA9561:
|
|
||||||
+ case ATH79_SOC_TP9343:
|
|
||||||
mdio_dev = &ath79_mdio1_device;
|
|
||||||
mdio_data = &ath79_mdio1_data;
|
|
||||||
break;
|
|
||||||
@@ -256,6 +258,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask)
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ATH79_SOC_QCA9533:
|
|
||||||
+ case ATH79_SOC_QCA9561:
|
|
||||||
+ case ATH79_SOC_TP9343:
|
|
||||||
mdio_data->builtin_switch = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -571,6 +575,8 @@ static void __init ath79_init_eth_pll_data(unsigned int id)
|
|
||||||
case ATH79_SOC_QCA9533:
|
|
||||||
case ATH79_SOC_QCA9556:
|
|
||||||
case ATH79_SOC_QCA9558:
|
|
||||||
+ case ATH79_SOC_QCA9561:
|
|
||||||
+ case ATH79_SOC_TP9343:
|
|
||||||
pll_10 = AR934X_PLL_VAL_10;
|
|
||||||
pll_100 = AR934X_PLL_VAL_100;
|
|
||||||
pll_1000 = AR934X_PLL_VAL_1000;
|
|
||||||
@@ -627,6 +633,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id,
|
|
||||||
case ATH79_SOC_AR9330:
|
|
||||||
case ATH79_SOC_AR9331:
|
|
||||||
case ATH79_SOC_QCA9533:
|
|
||||||
+ case ATH79_SOC_QCA9561:
|
|
||||||
+ case ATH79_SOC_TP9343:
|
|
||||||
pdata->phy_if_mode = PHY_INTERFACE_MODE_MII;
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -687,7 +695,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id,
|
|
||||||
case ATH79_SOC_AR7241:
|
|
||||||
case ATH79_SOC_AR9330:
|
|
||||||
case ATH79_SOC_AR9331:
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
+ case ATH79_SOC_QCA9561:
|
|
||||||
+ case ATH79_SOC_TP9343:
|
|
||||||
pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII;
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -697,6 +706,7 @@ static int __init ath79_setup_phy_if_mode(unsigned int id,
|
|
||||||
case ATH79_SOC_AR9341:
|
|
||||||
case ATH79_SOC_AR9342:
|
|
||||||
case ATH79_SOC_AR9344:
|
|
||||||
+ case ATH79_SOC_QCA9533:
|
|
||||||
switch (pdata->phy_if_mode) {
|
|
||||||
case PHY_INTERFACE_MODE_MII:
|
|
||||||
case PHY_INTERFACE_MODE_GMII:
|
|
||||||
@@ -986,6 +996,7 @@ void __init ath79_register_eth(unsigned int id)
|
|
||||||
case ATH79_SOC_AR9341:
|
|
||||||
case ATH79_SOC_AR9342:
|
|
||||||
case ATH79_SOC_AR9344:
|
|
||||||
+ case ATH79_SOC_QCA9533:
|
|
||||||
if (id == 0) {
|
|
||||||
pdata->reset_bit = AR934X_RESET_GE0_MAC |
|
|
||||||
AR934X_RESET_GE0_MDIO;
|
|
||||||
@@ -1017,7 +1028,8 @@ void __init ath79_register_eth(unsigned int id)
|
|
||||||
pdata->fifo_cfg3 = 0x01f00140;
|
|
||||||
break;
|
|
||||||
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
+ case ATH79_SOC_QCA9561:
|
|
||||||
+ case ATH79_SOC_TP9343:
|
|
||||||
if (id == 0) {
|
|
||||||
pdata->reset_bit = AR933X_RESET_GE0_MAC |
|
|
||||||
AR933X_RESET_GE0_MDIO;
|
|
||||||
@@ -1123,6 +1135,8 @@ void __init ath79_register_eth(unsigned int id)
|
|
||||||
case ATH79_SOC_AR9330:
|
|
||||||
case ATH79_SOC_AR9331:
|
|
||||||
case ATH79_SOC_QCA9533:
|
|
||||||
+ case ATH79_SOC_QCA9561:
|
|
||||||
+ case ATH79_SOC_TP9343:
|
|
||||||
pdata->mii_bus_dev = &ath79_mdio1_device.dev;
|
|
||||||
break;
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
|
||||||
index 5041619..403897a 100644
|
|
||||||
--- a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
|
||||||
+++ b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
|
||||||
@@ -44,7 +44,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
config ATH79_NVRAM
|
|
||||||
--- a/arch/mips/ath79/clock.c
|
|
||||||
+++ b/arch/mips/ath79/clock.c
|
|
||||||
-@@ -350,6 +350,91 @@ static void __init ar934x_clocks_init(vo
|
|
||||||
+@@ -350,6 +350,91 @@ static void __init ar934x_clocks_init(void)
|
|
||||||
iounmap(dpll_base);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -175,6 +175,48 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
soc_is_qca955x()) {
|
|
||||||
ath79_uart_data[0].uartclk = uart_clk_rate;
|
|
||||||
platform_device_register(&ath79_uart_device);
|
|
||||||
+--- a/arch/mips/ath79/dev-usb.c
|
|
||||||
++++ b/arch/mips/ath79/dev-usb.c
|
|
||||||
+@@ -236,6 +236,30 @@ static void __init ar934x_usb_setup(void)
|
|
||||||
+ &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
++static void __init qca953x_usb_setup(void)
|
|
||||||
++{
|
|
||||||
++ u32 bootstrap;
|
|
||||||
++
|
|
||||||
++ bootstrap = ath79_reset_rr(QCA953X_RESET_REG_BOOTSTRAP);
|
|
||||||
++
|
|
||||||
++ ath79_device_reset_set(QCA953X_RESET_USBSUS_OVERRIDE);
|
|
||||||
++ udelay(1000);
|
|
||||||
++
|
|
||||||
++ ath79_device_reset_clear(QCA953X_RESET_USB_PHY);
|
|
||||||
++ udelay(1000);
|
|
||||||
++
|
|
||||||
++ ath79_device_reset_clear(QCA953X_RESET_USB_PHY_ANALOG);
|
|
||||||
++ udelay(1000);
|
|
||||||
++
|
|
||||||
++ ath79_device_reset_clear(QCA953X_RESET_USB_HOST);
|
|
||||||
++ udelay(1000);
|
|
||||||
++
|
|
||||||
++ ath79_usb_register("ehci-platform", -1,
|
|
||||||
++ QCA953X_EHCI_BASE, QCA953X_EHCI_SIZE,
|
|
||||||
++ ATH79_CPU_IRQ(3),
|
|
||||||
++ &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
|
|
||||||
++}
|
|
||||||
++
|
|
||||||
+ static void qca955x_usb_reset_notifier(struct platform_device *pdev)
|
|
||||||
+ {
|
|
||||||
+ u32 base;
|
|
||||||
+@@ -286,6 +310,8 @@ void __init ath79_register_usb(void)
|
|
||||||
+ ar933x_usb_setup();
|
|
||||||
+ else if (soc_is_ar934x())
|
|
||||||
+ ar934x_usb_setup();
|
|
||||||
++ else if (soc_is_qca953x())
|
|
||||||
++ qca953x_usb_setup();
|
|
||||||
+ else if (soc_is_qca955x())
|
|
||||||
+ qca955x_usb_setup();
|
|
||||||
+ else
|
|
||||||
--- a/arch/mips/ath79/dev-wmac.c
|
|
||||||
+++ b/arch/mips/ath79/dev-wmac.c
|
|
||||||
@@ -101,7 +101,7 @@ static int ar933x_wmac_reset(void)
|
|
||||||
@@ -186,7 +228,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
{
|
|
||||||
return ath79_soc_rev;
|
|
||||||
}
|
|
||||||
-@@ -126,7 +126,7 @@ static void __init ar933x_wmac_setup(voi
|
|
||||||
+@@ -126,7 +126,7 @@ static void __init ar933x_wmac_setup(void)
|
|
||||||
ath79_wmac_data.is_clk_25mhz = true;
|
|
||||||
|
|
||||||
if (ath79_soc_rev == 1)
|
|
||||||
@@ -195,8 +237,8 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
|
|
||||||
ath79_wmac_data.external_reset = ar933x_wmac_reset;
|
|
||||||
}
|
|
||||||
-@@ -149,6 +149,26 @@ static void ar934x_wmac_setup(void)
|
|
||||||
- ath79_wmac_data.is_clk_25mhz = true;
|
|
||||||
+@@ -151,6 +151,26 @@ static void ar934x_wmac_setup(void)
|
|
||||||
+ ath79_wmac_data.get_mac_revision = ar93xx_get_soc_revision;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void qca953x_wmac_setup(void)
|
|
||||||
@@ -207,8 +249,8 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
+
|
|
||||||
+ ath79_wmac_resources[0].start = QCA953X_WMAC_BASE;
|
|
||||||
+ ath79_wmac_resources[0].end = QCA953X_WMAC_BASE + QCA953X_WMAC_SIZE - 1;
|
|
||||||
-+ ath79_wmac_resources[1].start = ATH79_CPU_IRQ(2);
|
|
||||||
-+ ath79_wmac_resources[1].end = ATH79_CPU_IRQ(2);
|
|
||||||
++ ath79_wmac_resources[1].start = ATH79_IP2_IRQ(1);
|
|
||||||
++ ath79_wmac_resources[1].end = ATH79_IP2_IRQ(1);
|
|
||||||
+
|
|
||||||
+ t = ath79_reset_rr(QCA953X_RESET_REG_BOOTSTRAP);
|
|
||||||
+ if (t & QCA953X_BOOTSTRAP_REF_CLK_40)
|
|
||||||
@@ -222,7 +264,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
static void qca955x_wmac_setup(void)
|
|
||||||
{
|
|
||||||
u32 t;
|
|
||||||
-@@ -366,6 +386,8 @@ void __init ath79_register_wmac(u8 *cal_
|
|
||||||
+@@ -368,6 +388,8 @@ void __init ath79_register_wmac(u8 *cal_data, u8 *mac_addr)
|
|
||||||
ar933x_wmac_setup();
|
|
||||||
else if (soc_is_ar934x())
|
|
||||||
ar934x_wmac_setup();
|
|
||||||
@@ -244,6 +286,24 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
_prom_putchar = prom_putchar_ar71xx;
|
|
||||||
--- a/arch/mips/ath79/gpio.c
|
|
||||||
+++ b/arch/mips/ath79/gpio.c
|
|
||||||
+@@ -148,7 +148,7 @@ static void __iomem *ath79_gpio_get_function_reg(void)
|
|
||||||
+ soc_is_ar913x() ||
|
|
||||||
+ soc_is_ar933x())
|
|
||||||
+ reg = AR71XX_GPIO_REG_FUNC;
|
|
||||||
+- else if (soc_is_ar934x())
|
|
||||||
++ else if (soc_is_ar934x() || soc_is_qca953x())
|
|
||||||
+ reg = AR934X_GPIO_REG_FUNC;
|
|
||||||
+ else
|
|
||||||
+ BUG();
|
|
||||||
+@@ -187,7 +187,7 @@ void __init ath79_gpio_output_select(unsigned gpio, u8 val)
|
|
||||||
+ unsigned int reg;
|
|
||||||
+ u32 t, s;
|
|
||||||
+
|
|
||||||
+- BUG_ON(!soc_is_ar934x());
|
|
||||||
++ BUG_ON(!soc_is_ar934x() && !soc_is_qca953x());
|
|
||||||
+
|
|
||||||
+ if (gpio >= AR934X_GPIO_COUNT)
|
|
||||||
+ return;
|
|
||||||
@@ -224,6 +224,8 @@ void __init ath79_gpio_init(void)
|
|
||||||
ath79_gpio_count = AR933X_GPIO_COUNT;
|
|
||||||
else if (soc_is_ar934x())
|
|
||||||
@@ -264,7 +324,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
}
|
|
||||||
--- a/arch/mips/ath79/irq.c
|
|
||||||
+++ b/arch/mips/ath79/irq.c
|
|
||||||
-@@ -106,6 +106,7 @@ static void __init ath79_misc_irq_init(v
|
|
||||||
+@@ -106,6 +106,7 @@ static void __init ath79_misc_irq_init(void)
|
|
||||||
else if (soc_is_ar724x() ||
|
|
||||||
soc_is_ar933x() ||
|
|
||||||
soc_is_ar934x() ||
|
|
||||||
@@ -272,19 +332,80 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
soc_is_qca955x())
|
|
||||||
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
|
||||||
else
|
|
||||||
-@@ -352,6 +353,9 @@ void __init arch_init_irq(void)
|
|
||||||
+@@ -153,6 +154,38 @@ static void ar934x_ip2_irq_init(void)
|
|
||||||
+ irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
++static void qca953x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc)
|
|
||||||
++{
|
|
||||||
++ u32 status;
|
|
||||||
++
|
|
||||||
++ disable_irq_nosync(irq);
|
|
||||||
++
|
|
||||||
++ status = ath79_reset_rr(QCA953X_RESET_REG_PCIE_WMAC_INT_STATUS);
|
|
||||||
++
|
|
||||||
++ if (status & QCA953X_PCIE_WMAC_INT_PCIE_ALL) {
|
|
||||||
++ ath79_ddr_wb_flush(QCA953X_DDR_REG_FLUSH_PCIE);
|
|
||||||
++ generic_handle_irq(ATH79_IP2_IRQ(0));
|
|
||||||
++ } else if (status & QCA953X_PCIE_WMAC_INT_WMAC_ALL) {
|
|
||||||
++ ath79_ddr_wb_flush(QCA953X_DDR_REG_FLUSH_WMAC);
|
|
||||||
++ generic_handle_irq(ATH79_IP2_IRQ(1));
|
|
||||||
++ } else {
|
|
||||||
++ spurious_interrupt();
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ enable_irq(irq);
|
|
||||||
++}
|
|
||||||
++
|
|
||||||
++static void qca953x_irq_init(void)
|
|
||||||
++{
|
|
||||||
++ int i;
|
|
||||||
++
|
|
||||||
++ for (i = ATH79_IP2_IRQ_BASE;
|
|
||||||
++ i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
|
||||||
++ irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
|
||||||
++
|
|
||||||
++ irq_set_chained_handler(ATH79_CPU_IRQ(2), qca953x_ip2_irq_dispatch);
|
|
||||||
++}
|
|
||||||
++
|
|
||||||
+ static void qca955x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc)
|
|
||||||
+ {
|
|
||||||
+ u32 status;
|
|
||||||
+@@ -335,6 +368,12 @@ static void ar934x_ip3_handler(void)
|
|
||||||
+ do_IRQ(ATH79_CPU_IRQ(3));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
++static void qca953x_ip3_handler(void)
|
|
||||||
++{
|
|
||||||
++ ath79_ddr_wb_flush(QCA953X_DDR_REG_FLUSH_USB);
|
|
||||||
++ do_IRQ(ATH79_CPU_IRQ(3));
|
|
||||||
++}
|
|
||||||
++
|
|
||||||
+ void __init arch_init_irq(void)
|
|
||||||
+ {
|
|
||||||
+ if (soc_is_ar71xx()) {
|
|
||||||
+@@ -352,6 +391,9 @@ void __init arch_init_irq(void)
|
|
||||||
} else if (soc_is_ar934x()) {
|
|
||||||
ath79_ip2_handler = ath79_default_ip2_handler;
|
|
||||||
ath79_ip3_handler = ar934x_ip3_handler;
|
|
||||||
+ } else if (soc_is_qca953x()) {
|
|
||||||
+ ath79_ip2_handler = ath79_default_ip2_handler;
|
|
||||||
-+ ath79_ip3_handler = ath79_default_ip3_handler;
|
|
||||||
++ ath79_ip3_handler = qca953x_ip3_handler;
|
|
||||||
} else if (soc_is_qca955x()) {
|
|
||||||
ath79_ip2_handler = ath79_default_ip2_handler;
|
|
||||||
ath79_ip3_handler = ath79_default_ip3_handler;
|
|
||||||
+@@ -365,6 +407,8 @@ void __init arch_init_irq(void)
|
|
||||||
+
|
|
||||||
+ if (soc_is_ar934x())
|
|
||||||
+ ar934x_ip2_irq_init();
|
|
||||||
++ else if (soc_is_qca953x())
|
|
||||||
++ qca953x_irq_init();
|
|
||||||
+ else if (soc_is_qca955x())
|
|
||||||
+ qca955x_irq_init();
|
|
||||||
+ }
|
|
||||||
--- a/arch/mips/ath79/setup.c
|
|
||||||
+++ b/arch/mips/ath79/setup.c
|
|
||||||
-@@ -59,6 +59,7 @@ static void __init ath79_detect_sys_type
|
|
||||||
+@@ -60,6 +60,7 @@ static void __init ath79_detect_sys_type(void)
|
|
||||||
u32 major;
|
|
||||||
u32 minor;
|
|
||||||
u32 rev = 0;
|
|
||||||
@@ -292,7 +413,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
|
|
||||||
id = ath79_reset_rr(AR71XX_RESET_REG_REV_ID);
|
|
||||||
major = id & REV_ID_MAJOR_MASK;
|
|
||||||
-@@ -151,6 +152,16 @@ static void __init ath79_detect_sys_type
|
|
||||||
+@@ -152,6 +153,16 @@ static void __init ath79_detect_sys_type(void)
|
|
||||||
rev = id & AR934X_REV_ID_REVISION_MASK;
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -309,38 +430,60 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
case REV_ID_MAJOR_QCA9556:
|
|
||||||
ath79_soc = ATH79_SOC_QCA9556;
|
|
||||||
chip = "9556";
|
|
||||||
-@@ -169,9 +180,9 @@ static void __init ath79_detect_sys_type
|
|
||||||
+@@ -170,7 +181,7 @@ static void __init ath79_detect_sys_type(void)
|
|
||||||
|
|
||||||
ath79_soc_rev = rev;
|
|
||||||
|
|
||||||
- if (soc_is_qca955x())
|
|
||||||
-- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u",
|
|
||||||
-- chip, rev);
|
|
||||||
+ if (soc_is_qca953x() || soc_is_qca955x())
|
|
||||||
-+ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u",
|
|
||||||
-+ chip, ver, rev);
|
|
||||||
+ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u",
|
|
||||||
+ chip, rev);
|
|
||||||
else
|
|
||||||
- sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev);
|
|
||||||
- pr_info("SoC: %s\n", ath79_sys_type);
|
|
||||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
|
||||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
|
||||||
-@@ -105,6 +105,9 @@
|
|
||||||
+@@ -105,6 +105,21 @@
|
|
||||||
#define AR934X_SRIF_BASE (AR71XX_APB_BASE + 0x00116000)
|
|
||||||
#define AR934X_SRIF_SIZE 0x1000
|
|
||||||
|
|
||||||
++#define QCA953X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000)
|
|
||||||
++#define QCA953X_GMAC_SIZE 0x14
|
|
||||||
+#define QCA953X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
|
|
||||||
+#define QCA953X_WMAC_SIZE 0x20000
|
|
||||||
++#define QCA953X_EHCI_BASE 0x1b000000
|
|
||||||
++#define QCA953X_EHCI_SIZE 0x200
|
|
||||||
++#define QCA953X_SRIF_BASE (AR71XX_APB_BASE + 0x00116000)
|
|
||||||
++#define QCA953X_SRIF_SIZE 0x1000
|
|
||||||
++
|
|
||||||
++#define QCA953X_PCI_CFG_BASE0 0x14000000
|
|
||||||
++#define QCA953X_PCI_CTRL_BASE0 (AR71XX_APB_BASE + 0x000f0000)
|
|
||||||
++#define QCA953X_PCI_CRP_BASE0 (AR71XX_APB_BASE + 0x000c0000)
|
|
||||||
++#define QCA953X_PCI_MEM_BASE0 0x10000000
|
|
||||||
++#define QCA953X_PCI_MEM_SIZE 0x02000000
|
|
||||||
+
|
|
||||||
#define QCA955X_PCI_MEM_BASE0 0x10000000
|
|
||||||
#define QCA955X_PCI_MEM_BASE1 0x12000000
|
|
||||||
#define QCA955X_PCI_MEM_SIZE 0x02000000
|
|
||||||
-@@ -279,6 +282,43 @@
|
|
||||||
+@@ -173,6 +188,12 @@
|
|
||||||
+ #define AR934X_DDR_REG_FLUSH_PCIE 0xa8
|
|
||||||
+ #define AR934X_DDR_REG_FLUSH_WMAC 0xac
|
|
||||||
+
|
|
||||||
++#define QCA953X_DDR_REG_FLUSH_GE0 0x9c
|
|
||||||
++#define QCA953X_DDR_REG_FLUSH_GE1 0xa0
|
|
||||||
++#define QCA953X_DDR_REG_FLUSH_USB 0xa4
|
|
||||||
++#define QCA953X_DDR_REG_FLUSH_PCIE 0xa8
|
|
||||||
++#define QCA953X_DDR_REG_FLUSH_WMAC 0xac
|
|
||||||
++
|
|
||||||
+ /*
|
|
||||||
+ * PLL block
|
|
||||||
+ */
|
|
||||||
+@@ -279,6 +300,44 @@
|
|
||||||
|
|
||||||
#define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL BIT(6)
|
|
||||||
|
|
||||||
+#define QCA953X_PLL_CPU_CONFIG_REG 0x00
|
|
||||||
+#define QCA953X_PLL_DDR_CONFIG_REG 0x04
|
|
||||||
+#define QCA953X_PLL_CLK_CTRL_REG 0x08
|
|
||||||
++#define QCA953X_PLL_SWITCH_CLOCK_CONTROL_REG 0x24
|
|
||||||
+#define QCA953X_PLL_ETH_XMII_CONTROL_REG 0x2c
|
|
||||||
+#define QCA953X_PLL_ETH_SGMII_CONTROL_REG 0x48
|
|
||||||
+
|
|
||||||
@@ -351,7 +494,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
+#define QCA953X_PLL_CPU_CONFIG_REFDIV_SHIFT 12
|
|
||||||
+#define QCA953X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f
|
|
||||||
+#define QCA953X_PLL_CPU_CONFIG_OUTDIV_SHIFT 19
|
|
||||||
-+#define QCA953X_PLL_CPU_CONFIG_OUTDIV_MASK 0x3
|
|
||||||
++#define QCA953X_PLL_CPU_CONFIG_OUTDIV_MASK 0x7
|
|
||||||
+
|
|
||||||
+#define QCA953X_PLL_DDR_CONFIG_NFRAC_SHIFT 0
|
|
||||||
+#define QCA953X_PLL_DDR_CONFIG_NFRAC_MASK 0x3ff
|
|
||||||
@@ -378,27 +521,85 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
#define QCA955X_PLL_CPU_CONFIG_REG 0x00
|
|
||||||
#define QCA955X_PLL_DDR_CONFIG_REG 0x04
|
|
||||||
#define QCA955X_PLL_CLK_CTRL_REG 0x08
|
|
||||||
-@@ -355,6 +395,10 @@
|
|
||||||
+@@ -355,6 +414,10 @@
|
|
||||||
#define AR934X_RESET_REG_BOOTSTRAP 0xb0
|
|
||||||
#define AR934X_RESET_REG_PCIE_WMAC_INT_STATUS 0xac
|
|
||||||
|
|
||||||
+#define QCA953X_RESET_REG_RESET_MODULE 0x1c
|
|
||||||
+#define QCA953X_RESET_REG_BOOTSTRAP 0xb0
|
|
||||||
-+#define QCA953X_RESET_REG_EXT_INT_STATUS 0xac
|
|
||||||
++#define QCA953X_RESET_REG_PCIE_WMAC_INT_STATUS 0xac
|
|
||||||
+
|
|
||||||
#define QCA955X_RESET_REG_RESET_MODULE 0x1c
|
|
||||||
#define QCA955X_RESET_REG_BOOTSTRAP 0xb0
|
|
||||||
#define QCA955X_RESET_REG_EXT_INT_STATUS 0xac
|
|
||||||
-@@ -503,6 +547,8 @@
|
|
||||||
+@@ -450,6 +513,27 @@
|
|
||||||
+ #define AR934X_RESET_MBOX BIT(1)
|
|
||||||
+ #define AR934X_RESET_I2S BIT(0)
|
|
||||||
+
|
|
||||||
++#define QCA953X_RESET_USB_EXT_PWR BIT(29)
|
|
||||||
++#define QCA953X_RESET_EXTERNAL BIT(28)
|
|
||||||
++#define QCA953X_RESET_RTC BIT(27)
|
|
||||||
++#define QCA953X_RESET_FULL_CHIP BIT(24)
|
|
||||||
++#define QCA953X_RESET_GE1_MDIO BIT(23)
|
|
||||||
++#define QCA953X_RESET_GE0_MDIO BIT(22)
|
|
||||||
++#define QCA953X_RESET_CPU_NMI BIT(21)
|
|
||||||
++#define QCA953X_RESET_CPU_COLD BIT(20)
|
|
||||||
++#define QCA953X_RESET_DDR BIT(16)
|
|
||||||
++#define QCA953X_RESET_USB_PHY_PLL_PWD_EXT BIT(15)
|
|
||||||
++#define QCA953X_RESET_GE1_MAC BIT(13)
|
|
||||||
++#define QCA953X_RESET_ETH_SWITCH_ANALOG BIT(12)
|
|
||||||
++#define QCA953X_RESET_USB_PHY_ANALOG BIT(11)
|
|
||||||
++#define QCA953X_RESET_GE0_MAC BIT(9)
|
|
||||||
++#define QCA953X_RESET_ETH_SWITCH BIT(8)
|
|
||||||
++#define QCA953X_RESET_PCIE_PHY BIT(7)
|
|
||||||
++#define QCA953X_RESET_PCIE BIT(6)
|
|
||||||
++#define QCA953X_RESET_USB_HOST BIT(5)
|
|
||||||
++#define QCA953X_RESET_USB_PHY BIT(4)
|
|
||||||
++#define QCA953X_RESET_USBSUS_OVERRIDE BIT(3)
|
|
||||||
++
|
|
||||||
+ #define QCA955X_RESET_HOST BIT(31)
|
|
||||||
+ #define QCA955X_RESET_SLIC BIT(30)
|
|
||||||
+ #define QCA955X_RESET_HDMA BIT(29)
|
|
||||||
+@@ -503,6 +587,13 @@
|
|
||||||
#define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1)
|
|
||||||
#define AR934X_BOOTSTRAP_DDR1 BIT(0)
|
|
||||||
|
|
||||||
++#define QCA953X_BOOTSTRAP_SW_OPTION2 BIT(12)
|
|
||||||
++#define QCA953X_BOOTSTRAP_SW_OPTION1 BIT(11)
|
|
||||||
++#define QCA953X_BOOTSTRAP_EJTAG_MODE BIT(5)
|
|
||||||
+#define QCA953X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
|
||||||
++#define QCA953X_BOOTSTRAP_SDRAM_DISABLED BIT(1)
|
|
||||||
++#define QCA953X_BOOTSTRAP_DDR1 BIT(0)
|
|
||||||
+
|
|
||||||
#define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
|
||||||
|
|
||||||
#define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0)
|
|
||||||
-@@ -565,6 +611,8 @@
|
|
||||||
+@@ -523,6 +614,24 @@
|
|
||||||
+ AR934X_PCIE_WMAC_INT_PCIE_RC1 | AR934X_PCIE_WMAC_INT_PCIE_RC2 | \
|
|
||||||
+ AR934X_PCIE_WMAC_INT_PCIE_RC3)
|
|
||||||
+
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_MISC BIT(0)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_TX BIT(1)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_RXLP BIT(2)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_RXHP BIT(3)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC BIT(4)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC0 BIT(5)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC1 BIT(6)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC2 BIT(7)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC3 BIT(8)
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_ALL \
|
|
||||||
++ (QCA953X_PCIE_WMAC_INT_WMAC_MISC | QCA953X_PCIE_WMAC_INT_WMAC_TX | \
|
|
||||||
++ QCA953X_PCIE_WMAC_INT_WMAC_RXLP | QCA953X_PCIE_WMAC_INT_WMAC_RXHP)
|
|
||||||
++
|
|
||||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_ALL \
|
|
||||||
++ (QCA953X_PCIE_WMAC_INT_PCIE_RC | QCA953X_PCIE_WMAC_INT_PCIE_RC0 | \
|
|
||||||
++ QCA953X_PCIE_WMAC_INT_PCIE_RC1 | QCA953X_PCIE_WMAC_INT_PCIE_RC2 | \
|
|
||||||
++ QCA953X_PCIE_WMAC_INT_PCIE_RC3)
|
|
||||||
++
|
|
||||||
+ #define QCA955X_EXT_INT_WMAC_MISC BIT(0)
|
|
||||||
+ #define QCA955X_EXT_INT_WMAC_TX BIT(1)
|
|
||||||
+ #define QCA955X_EXT_INT_WMAC_RXLP BIT(2)
|
|
||||||
+@@ -565,6 +674,8 @@
|
|
||||||
#define REV_ID_MAJOR_AR9341 0x0120
|
|
||||||
#define REV_ID_MAJOR_AR9342 0x1120
|
|
||||||
#define REV_ID_MAJOR_AR9344 0x2120
|
|
||||||
@@ -407,7 +608,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
#define REV_ID_MAJOR_QCA9556 0x0130
|
|
||||||
#define REV_ID_MAJOR_QCA9558 0x1130
|
|
||||||
|
|
||||||
-@@ -587,6 +635,8 @@
|
|
||||||
+@@ -587,6 +698,8 @@
|
|
||||||
|
|
||||||
#define AR934X_REV_ID_REVISION_MASK 0xf
|
|
||||||
|
|
||||||
@@ -416,14 +617,81 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
|
||||||
#define QCA955X_REV_ID_REVISION_MASK 0xf
|
|
||||||
|
|
||||||
/*
|
|
||||||
-@@ -640,6 +690,7 @@
|
|
||||||
+@@ -634,12 +747,32 @@
|
|
||||||
+ #define AR934X_GPIO_REG_OUT_FUNC5 0x40
|
|
||||||
+ #define AR934X_GPIO_REG_FUNC 0x6c
|
|
||||||
+
|
|
||||||
++#define QCA953X_GPIO_REG_OUT_FUNC0 0x2c
|
|
||||||
++#define QCA953X_GPIO_REG_OUT_FUNC1 0x30
|
|
||||||
++#define QCA953X_GPIO_REG_OUT_FUNC2 0x34
|
|
||||||
++#define QCA953X_GPIO_REG_OUT_FUNC3 0x38
|
|
||||||
++#define QCA953X_GPIO_REG_OUT_FUNC4 0x3c
|
|
||||||
++#define QCA953X_GPIO_REG_IN_ENABLE0 0x44
|
|
||||||
++#define QCA953X_GPIO_REG_FUNC 0x6c
|
|
||||||
++
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_SPI_CS1 10
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_SPI_CS2 11
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_SPI_CS0 9
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_SPI_CLK 8
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_SPI_MOSI 12
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK1 41
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK2 42
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK3 43
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK4 44
|
|
||||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK5 45
|
|
||||||
++
|
|
||||||
+ #define AR71XX_GPIO_COUNT 16
|
|
||||||
+ #define AR7240_GPIO_COUNT 18
|
|
||||||
+ #define AR7241_GPIO_COUNT 20
|
|
||||||
#define AR913X_GPIO_COUNT 22
|
|
||||||
#define AR933X_GPIO_COUNT 30
|
|
||||||
#define AR934X_GPIO_COUNT 23
|
|
||||||
-+#define QCA953X_GPIO_COUNT 24
|
|
||||||
++#define QCA953X_GPIO_COUNT 18
|
|
||||||
#define QCA955X_GPIO_COUNT 24
|
|
||||||
|
|
||||||
/*
|
|
||||||
+@@ -663,6 +796,24 @@
|
|
||||||
+ #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
|
|
||||||
+ #define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
|
|
||||||
+
|
|
||||||
++#define QCA953X_SRIF_CPU_DPLL1_REG 0x1c0
|
|
||||||
++#define QCA953X_SRIF_CPU_DPLL2_REG 0x1c4
|
|
||||||
++#define QCA953X_SRIF_CPU_DPLL3_REG 0x1c8
|
|
||||||
++
|
|
||||||
++#define QCA953X_SRIF_DDR_DPLL1_REG 0x240
|
|
||||||
++#define QCA953X_SRIF_DDR_DPLL2_REG 0x244
|
|
||||||
++#define QCA953X_SRIF_DDR_DPLL3_REG 0x248
|
|
||||||
++
|
|
||||||
++#define QCA953X_SRIF_DPLL1_REFDIV_SHIFT 27
|
|
||||||
++#define QCA953X_SRIF_DPLL1_REFDIV_MASK 0x1f
|
|
||||||
++#define QCA953X_SRIF_DPLL1_NINT_SHIFT 18
|
|
||||||
++#define QCA953X_SRIF_DPLL1_NINT_MASK 0x1ff
|
|
||||||
++#define QCA953X_SRIF_DPLL1_NFRAC_MASK 0x0003ffff
|
|
||||||
++
|
|
||||||
++#define QCA953X_SRIF_DPLL2_LOCAL_PLL BIT(30)
|
|
||||||
++#define QCA953X_SRIF_DPLL2_OUTDIV_SHIFT 13
|
|
||||||
++#define QCA953X_SRIF_DPLL2_OUTDIV_MASK 0x7
|
|
||||||
++
|
|
||||||
+ #define AR71XX_GPIO_FUNC_STEREO_EN BIT(17)
|
|
||||||
+ #define AR71XX_GPIO_FUNC_SLIC_EN BIT(16)
|
|
||||||
+ #define AR71XX_GPIO_FUNC_SPI_CS2_EN BIT(13)
|
|
||||||
+@@ -804,6 +955,16 @@
|
|
||||||
+ #define AR934X_ETH_CFG_RDV_DELAY_SHIFT 16
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
++ * QCA953X GMAC Interface
|
|
||||||
++ */
|
|
||||||
++#define QCA953X_GMAC_REG_ETH_CFG 0x00
|
|
||||||
++
|
|
||||||
++#define QCA953X_ETH_CFG_SW_ONLY_MODE BIT(6)
|
|
||||||
++#define QCA953X_ETH_CFG_SW_PHY_SWAP BIT(7)
|
|
||||||
++#define QCA953X_ETH_CFG_SW_APB_ACCESS BIT(9)
|
|
||||||
++#define QCA953X_ETH_CFG_SW_ACC_MSB_FIRST BIT(13)
|
|
||||||
++
|
|
||||||
++/*
|
|
||||||
+ * QCA955X GMAC Interface
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
--- a/arch/mips/include/asm/mach-ath79/ath79.h
|
|
||||||
+++ b/arch/mips/include/asm/mach-ath79/ath79.h
|
|
||||||
@@ -32,6 +32,7 @@ enum ath79_soc_type {
|
|
||||||
diff --git a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
|
|
||||||
index 491a7aa..2bdc744 100644
|
|
||||||
--- a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
|
|
||||||
+++ b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
|
|
||||||
@@ -142,74 +142,9 @@
|
|
||||||
ath79_uart_data[0].uartclk = uart_clk_rate;
|
|
||||||
platform_device_register(&ath79_uart_device);
|
|
||||||
} else if (soc_is_ar933x()) {
|
|
||||||
---- a/arch/mips/ath79/dev-eth.c
|
|
||||||
-+++ b/arch/mips/ath79/dev-eth.c
|
|
||||||
-@@ -198,6 +198,8 @@ void __init ath79_register_mdio(unsigned
|
|
||||||
- case ATH79_SOC_AR9330:
|
|
||||||
- case ATH79_SOC_AR9331:
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
-+ case ATH79_SOC_QCA9561:
|
|
||||||
-+ case ATH79_SOC_TP9343:
|
|
||||||
- mdio_dev = &ath79_mdio1_device;
|
|
||||||
- mdio_data = &ath79_mdio1_data;
|
|
||||||
- break;
|
|
||||||
-@@ -256,6 +258,8 @@ void __init ath79_register_mdio(unsigned
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
-+ case ATH79_SOC_QCA9561:
|
|
||||||
-+ case ATH79_SOC_TP9343:
|
|
||||||
- mdio_data->builtin_switch = 1;
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
-@@ -571,6 +575,8 @@ static void __init ath79_init_eth_pll_da
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
- case ATH79_SOC_QCA9556:
|
|
||||||
- case ATH79_SOC_QCA9558:
|
|
||||||
-+ case ATH79_SOC_QCA9561:
|
|
||||||
-+ case ATH79_SOC_TP9343:
|
|
||||||
- pll_10 = AR934X_PLL_VAL_10;
|
|
||||||
- pll_100 = AR934X_PLL_VAL_100;
|
|
||||||
- pll_1000 = AR934X_PLL_VAL_1000;
|
|
||||||
-@@ -627,6 +633,8 @@ static int __init ath79_setup_phy_if_mod
|
|
||||||
- case ATH79_SOC_AR9330:
|
|
||||||
- case ATH79_SOC_AR9331:
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
-+ case ATH79_SOC_QCA9561:
|
|
||||||
-+ case ATH79_SOC_TP9343:
|
|
||||||
- pdata->phy_if_mode = PHY_INTERFACE_MODE_MII;
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
-@@ -688,6 +696,8 @@ static int __init ath79_setup_phy_if_mod
|
|
||||||
- case ATH79_SOC_AR9330:
|
|
||||||
- case ATH79_SOC_AR9331:
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
-+ case ATH79_SOC_QCA9561:
|
|
||||||
-+ case ATH79_SOC_TP9343:
|
|
||||||
- pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII;
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
-@@ -1018,6 +1028,8 @@ void __init ath79_register_eth(unsigned
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
-+ case ATH79_SOC_QCA9561:
|
|
||||||
-+ case ATH79_SOC_TP9343:
|
|
||||||
- if (id == 0) {
|
|
||||||
- pdata->reset_bit = AR933X_RESET_GE0_MAC |
|
|
||||||
- AR933X_RESET_GE0_MDIO;
|
|
||||||
-@@ -1123,6 +1135,8 @@ void __init ath79_register_eth(unsigned
|
|
||||||
- case ATH79_SOC_AR9330:
|
|
||||||
- case ATH79_SOC_AR9331:
|
|
||||||
- case ATH79_SOC_QCA9533:
|
|
||||||
-+ case ATH79_SOC_QCA9561:
|
|
||||||
-+ case ATH79_SOC_TP9343:
|
|
||||||
- pdata->mii_bus_dev = &ath79_mdio1_device.dev;
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
--- a/arch/mips/ath79/dev-usb.c
|
|
||||||
+++ b/arch/mips/ath79/dev-usb.c
|
|
||||||
-@@ -272,6 +272,19 @@ static void __init qca955x_usb_setup(voi
|
|
||||||
+@@ -296,6 +296,19 @@ static void __init qca955x_usb_setup(voi
|
|
||||||
&ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -229,8 +164,8 @@
|
|
||||||
void __init ath79_register_usb(void)
|
|
||||||
{
|
|
||||||
if (soc_is_ar71xx())
|
|
||||||
-@@ -288,6 +301,8 @@ void __init ath79_register_usb(void)
|
|
||||||
- ar934x_usb_setup();
|
|
||||||
+@@ -314,6 +327,8 @@ void __init ath79_register_usb(void)
|
|
||||||
+ qca953x_usb_setup();
|
|
||||||
else if (soc_is_qca955x())
|
|
||||||
qca955x_usb_setup();
|
|
||||||
+ else if (soc_is_qca9561())
|
|
||||||
@@ -291,9 +226,9 @@
|
|
||||||
soc_is_ar913x() ||
|
|
||||||
soc_is_ar933x())
|
|
||||||
reg = AR71XX_GPIO_REG_FUNC;
|
|
||||||
-- else if (soc_is_ar934x())
|
|
||||||
+- else if (soc_is_ar934x() || soc_is_qca953x())
|
|
||||||
+ else if (soc_is_ar934x() ||
|
|
||||||
-+ soc_is_qca956x())
|
|
||||||
++ soc_is_qca953x() || soc_is_qca956x())
|
|
||||||
reg = AR934X_GPIO_REG_FUNC;
|
|
||||||
else
|
|
||||||
BUG();
|
|
||||||
@@ -326,7 +261,7 @@
|
|
||||||
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
|
||||||
else
|
|
||||||
BUG();
|
|
||||||
-@@ -236,6 +237,99 @@ static void qca955x_irq_init(void)
|
|
||||||
+@@ -268,6 +269,97 @@ static void qca955x_irq_init(void)
|
|
||||||
irq_set_chained_handler(ATH79_CPU_IRQ(3), qca955x_ip3_irq_dispatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -406,15 +341,13 @@
|
|
||||||
+
|
|
||||||
+ for (i = ATH79_IP2_IRQ_BASE;
|
|
||||||
+ i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
|
||||||
-+ irq_set_chip_and_handler(i, &dummy_irq_chip,
|
|
||||||
-+ handle_level_irq);
|
|
||||||
++ irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
|
||||||
+
|
|
||||||
+ irq_set_chained_handler(ATH79_CPU_IRQ(2), qca956x_ip2_irq_dispatch);
|
|
||||||
+
|
|
||||||
+ for (i = ATH79_IP3_IRQ_BASE;
|
|
||||||
+ i < ATH79_IP3_IRQ_BASE + ATH79_IP3_IRQ_COUNT; i++)
|
|
||||||
-+ irq_set_chip_and_handler(i, &dummy_irq_chip,
|
|
||||||
-+ handle_level_irq);
|
|
||||||
++ irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
|
||||||
+
|
|
||||||
+ irq_set_chained_handler(ATH79_CPU_IRQ(3), qca956x_ip3_irq_dispatch);
|
|
||||||
+
|
|
||||||
@@ -426,7 +359,7 @@
|
|
||||||
asmlinkage void plat_irq_dispatch(void)
|
|
||||||
{
|
|
||||||
unsigned long pending;
|
|
||||||
-@@ -359,6 +453,9 @@ void __init arch_init_irq(void)
|
|
||||||
+@@ -397,6 +489,9 @@ void __init arch_init_irq(void)
|
|
||||||
} else if (soc_is_qca955x()) {
|
|
||||||
ath79_ip2_handler = ath79_default_ip2_handler;
|
|
||||||
ath79_ip3_handler = ath79_default_ip3_handler;
|
|
||||||
@@ -436,8 +369,8 @@
|
|
||||||
} else {
|
|
||||||
BUG();
|
|
||||||
}
|
|
||||||
-@@ -371,4 +468,6 @@ void __init arch_init_irq(void)
|
|
||||||
- ar934x_ip2_irq_init();
|
|
||||||
+@@ -411,4 +506,6 @@ void __init arch_init_irq(void)
|
|
||||||
+ qca953x_irq_init();
|
|
||||||
else if (soc_is_qca955x())
|
|
||||||
qca955x_irq_init();
|
|
||||||
+ else if (soc_is_qca956x())
|
|
||||||
@@ -519,7 +452,7 @@
|
|
||||||
return -ENODEV;
|
|
||||||
--- a/arch/mips/ath79/setup.c
|
|
||||||
+++ b/arch/mips/ath79/setup.c
|
|
||||||
-@@ -175,15 +175,30 @@ static void __init ath79_detect_sys_type
|
|
||||||
+@@ -175,14 +175,29 @@ static void __init ath79_detect_sys_type
|
|
||||||
rev = id & QCA955X_REV_ID_REVISION_MASK;
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -542,18 +475,18 @@
|
|
||||||
ath79_soc_rev = rev;
|
|
||||||
|
|
||||||
- if (soc_is_qca953x() || soc_is_qca955x())
|
|
||||||
+- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u",
|
|
||||||
+ if (soc_is_qca953x() || soc_is_qca955x() || soc_is_qca9561())
|
|
||||||
- sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u",
|
|
||||||
- chip, ver, rev);
|
|
||||||
++ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u",
|
|
||||||
++ chip, ver, rev);
|
|
||||||
+ else if (soc_is_tp9343())
|
|
||||||
+ sprintf(ath79_sys_type, "Qualcomm Atheros TP%s rev %u",
|
|
||||||
-+ chip, rev);
|
|
||||||
+ chip, rev);
|
|
||||||
else
|
|
||||||
sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev);
|
|
||||||
- pr_info("SoC: %s\n", ath79_sys_type);
|
|
||||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
|
||||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
|
||||||
-@@ -131,6 +131,23 @@
|
|
||||||
+@@ -143,6 +143,23 @@
|
|
||||||
#define QCA955X_NFC_BASE 0x1b800200
|
|
||||||
#define QCA955X_NFC_SIZE 0xb8
|
|
||||||
|
|
||||||
@@ -577,7 +510,7 @@
|
|
||||||
#define AR9300_OTP_BASE 0x14000
|
|
||||||
#define AR9300_OTP_STATUS 0x15f18
|
|
||||||
#define AR9300_OTP_STATUS_TYPE 0x7
|
|
||||||
-@@ -356,6 +373,49 @@
|
|
||||||
+@@ -375,6 +392,49 @@
|
|
||||||
#define QCA955X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21)
|
|
||||||
#define QCA955X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24)
|
|
||||||
|
|
||||||
@@ -627,7 +560,7 @@
|
|
||||||
/*
|
|
||||||
* USB_CONFIG block
|
|
||||||
*/
|
|
||||||
-@@ -403,6 +463,11 @@
|
|
||||||
+@@ -422,6 +482,11 @@
|
|
||||||
#define QCA955X_RESET_REG_BOOTSTRAP 0xb0
|
|
||||||
#define QCA955X_RESET_REG_EXT_INT_STATUS 0xac
|
|
||||||
|
|
||||||
@@ -639,7 +572,7 @@
|
|
||||||
#define MISC_INT_ETHSW BIT(12)
|
|
||||||
#define MISC_INT_TIMER4 BIT(10)
|
|
||||||
#define MISC_INT_TIMER3 BIT(9)
|
|
||||||
-@@ -551,6 +616,8 @@
|
|
||||||
+@@ -596,6 +661,8 @@
|
|
||||||
|
|
||||||
#define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
|
||||||
|
|
||||||
@@ -648,7 +581,7 @@
|
|
||||||
#define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0)
|
|
||||||
#define AR934X_PCIE_WMAC_INT_WMAC_TX BIT(1)
|
|
||||||
#define AR934X_PCIE_WMAC_INT_WMAC_RXLP BIT(2)
|
|
||||||
-@@ -600,6 +667,37 @@
|
|
||||||
+@@ -663,6 +730,37 @@
|
|
||||||
QCA955X_EXT_INT_PCIE_RC2_INT1 | QCA955X_EXT_INT_PCIE_RC2_INT2 | \
|
|
||||||
QCA955X_EXT_INT_PCIE_RC2_INT3)
|
|
||||||
|
|
||||||
@@ -686,7 +619,7 @@
|
|
||||||
#define REV_ID_MAJOR_MASK 0xfff0
|
|
||||||
#define REV_ID_MAJOR_AR71XX 0x00a0
|
|
||||||
#define REV_ID_MAJOR_AR913X 0x00b0
|
|
||||||
-@@ -615,6 +713,8 @@
|
|
||||||
+@@ -678,6 +776,8 @@
|
|
||||||
#define REV_ID_MAJOR_QCA9533_V2 0x0160
|
|
||||||
#define REV_ID_MAJOR_QCA9556 0x0130
|
|
||||||
#define REV_ID_MAJOR_QCA9558 0x1130
|
|
||||||
@@ -695,7 +628,7 @@
|
|
||||||
|
|
||||||
#define AR71XX_REV_ID_MINOR_MASK 0x3
|
|
||||||
#define AR71XX_REV_ID_MINOR_AR7130 0x0
|
|
||||||
-@@ -639,6 +739,8 @@
|
|
||||||
+@@ -702,6 +802,8 @@
|
|
||||||
|
|
||||||
#define QCA955X_REV_ID_REVISION_MASK 0xf
|
|
||||||
|
|
||||||
@@ -704,9 +637,9 @@
|
|
||||||
/*
|
|
||||||
* SPI block
|
|
||||||
*/
|
|
||||||
-@@ -684,6 +786,19 @@
|
|
||||||
- #define AR934X_GPIO_REG_OUT_FUNC5 0x40
|
|
||||||
- #define AR934X_GPIO_REG_FUNC 0x6c
|
|
||||||
+@@ -766,6 +868,19 @@
|
|
||||||
+ #define QCA953X_GPIO_OUT_MUX_LED_LINK4 44
|
|
||||||
+ #define QCA953X_GPIO_OUT_MUX_LED_LINK5 45
|
|
||||||
|
|
||||||
+#define QCA956X_GPIO_REG_OUT_FUNC0 0x2c
|
|
||||||
+#define QCA956X_GPIO_REG_OUT_FUNC1 0x30
|
|
||||||
@@ -724,9 +657,9 @@
|
|
||||||
#define AR71XX_GPIO_COUNT 16
|
|
||||||
#define AR7240_GPIO_COUNT 18
|
|
||||||
#define AR7241_GPIO_COUNT 20
|
|
||||||
-@@ -692,6 +807,7 @@
|
|
||||||
+@@ -774,6 +889,7 @@
|
|
||||||
#define AR934X_GPIO_COUNT 23
|
|
||||||
- #define QCA953X_GPIO_COUNT 24
|
|
||||||
+ #define QCA953X_GPIO_COUNT 18
|
|
||||||
#define QCA955X_GPIO_COUNT 24
|
|
||||||
+#define QCA956X_GPIO_COUNT 23
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/patches-3.18/736-MIPS-ath79-fix-chained-irq-disable.patch b/target/linux/ar71xx/patches-3.18/736-MIPS-ath79-fix-chained-irq-disable.patch
|
|
||||||
index 8cb38d3..8c0cc95 100644
|
|
||||||
--- a/target/linux/ar71xx/patches-3.18/736-MIPS-ath79-fix-chained-irq-disable.patch
|
|
||||||
+++ b/target/linux/ar71xx/patches-3.18/736-MIPS-ath79-fix-chained-irq-disable.patch
|
|
||||||
@@ -19,7 +19,16 @@
|
|
||||||
|
|
||||||
irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch);
|
|
||||||
}
|
|
||||||
-@@ -224,15 +225,13 @@ static void qca955x_irq_init(void)
|
|
||||||
+@@ -182,7 +183,7 @@ static void qca953x_irq_init(void)
|
|
||||||
+
|
|
||||||
+ for (i = ATH79_IP2_IRQ_BASE;
|
|
||||||
+ i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
|
||||||
+- irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
|
||||||
++ irq_set_chip_and_handler(i, &ip2_chip, handle_level_irq);
|
|
||||||
+
|
|
||||||
+ irq_set_chained_handler(ATH79_CPU_IRQ(2), qca953x_ip2_irq_dispatch);
|
|
||||||
+ }
|
|
||||||
+@@ -256,15 +257,13 @@ static void qca955x_irq_init(void)
|
|
||||||
|
|
||||||
for (i = ATH79_IP2_IRQ_BASE;
|
|
||||||
i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
|
||||||
@@ -37,25 +46,23 @@
|
|
||||||
|
|
||||||
irq_set_chained_handler(ATH79_CPU_IRQ(3), qca955x_ip3_irq_dispatch);
|
|
||||||
}
|
|
||||||
-@@ -313,15 +312,13 @@ static void qca956x_irq_init(void)
|
|
||||||
+@@ -345,13 +344,13 @@ static void qca956x_irq_init(void)
|
|
||||||
|
|
||||||
for (i = ATH79_IP2_IRQ_BASE;
|
|
||||||
i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
|
||||||
-- irq_set_chip_and_handler(i, &dummy_irq_chip,
|
|
||||||
-- handle_level_irq);
|
|
||||||
+- irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
|
||||||
+ irq_set_chip_and_handler(i, &ip2_chip, handle_level_irq);
|
|
||||||
|
|
||||||
irq_set_chained_handler(ATH79_CPU_IRQ(2), qca956x_ip2_irq_dispatch);
|
|
||||||
|
|
||||||
for (i = ATH79_IP3_IRQ_BASE;
|
|
||||||
i < ATH79_IP3_IRQ_BASE + ATH79_IP3_IRQ_COUNT; i++)
|
|
||||||
-- irq_set_chip_and_handler(i, &dummy_irq_chip,
|
|
||||||
-- handle_level_irq);
|
|
||||||
+- irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
|
||||||
+ irq_set_chip_and_handler(i, &ip3_chip, handle_level_irq);
|
|
||||||
|
|
||||||
irq_set_chained_handler(ATH79_CPU_IRQ(3), qca956x_ip3_irq_dispatch);
|
|
||||||
|
|
||||||
-@@ -430,8 +427,35 @@ static void ar934x_ip3_handler(void)
|
|
||||||
+@@ -466,8 +465,35 @@ static void qca953x_ip3_handler(void)
|
|
||||||
do_IRQ(ATH79_CPU_IRQ(3));
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Sun, 24 Apr 2016 08:45:44 +0200
|
||||||
|
Subject: rules.mk: make the locked template available even if flock has not been built yet (fall back to unlocked shell command)
|
||||||
|
|
||||||
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||||
|
|
||||||
|
Backport of r48414
|
||||||
|
|
||||||
|
diff --git a/rules.mk b/rules.mk
|
||||||
|
index 9d0134d..ece5026 100644
|
||||||
|
--- a/rules.mk
|
||||||
|
+++ b/rules.mk
|
||||||
|
@@ -310,12 +310,16 @@ endef
|
||||||
|
# Execute commands under flock
|
||||||
|
# $(1) => The shell expression.
|
||||||
|
# $(2) => The lock name. If not given, the global lock will be used.
|
||||||
|
-define locked
|
||||||
|
+ifneq ($(wildcard $(STAGING_DIR_HOST)/bin/flock),)
|
||||||
|
+ define locked
|
||||||
|
SHELL= \
|
||||||
|
- $(STAGING_DIR_HOST)/bin/flock \
|
||||||
|
+ flock \
|
||||||
|
$(TMP_DIR)/.$(if $(2),$(strip $(2)),global).flock \
|
||||||
|
-c '$(subst ','\'',$(1))'
|
||||||
|
-endef
|
||||||
|
+ endef
|
||||||
|
+else
|
||||||
|
+ locked=$(1)
|
||||||
|
+endif
|
||||||
|
|
||||||
|
# Recursively copy paths into another directory, purge dangling
|
||||||
|
# symlinks before.
|
@ -1,44 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Fri, 7 Aug 2015 18:45:42 +0200
|
|
||||||
Subject: base-files: default_postinst: propagate the real postinst return code
|
|
||||||
|
|
||||||
Using the postinst script for sanity checks and expecting opkg to fail
|
|
||||||
if the postinst didn't return 0 was possible in Barrier Breaker, propagate
|
|
||||||
the real postinst return code through default_postinst to restore this
|
|
||||||
behaviour.
|
|
||||||
|
|
||||||
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
|
|
||||||
index 8d045fa..2f78d67 100755
|
|
||||||
--- a/package/base-files/files/lib/functions.sh
|
|
||||||
+++ b/package/base-files/files/lib/functions.sh
|
|
||||||
@@ -174,7 +174,8 @@ default_prerm() {
|
|
||||||
}
|
|
||||||
|
|
||||||
default_postinst() {
|
|
||||||
- local pkgname rusers
|
|
||||||
+ local pkgname rusers ret
|
|
||||||
+ ret=0
|
|
||||||
pkgname=$(basename ${1%.*})
|
|
||||||
rusers=$(grep "Require-User:" ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.control)
|
|
||||||
[ -n "$rusers" ] && {
|
|
||||||
@@ -215,7 +216,10 @@ default_postinst() {
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
- [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg )
|
|
||||||
+ if [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ]; then
|
|
||||||
+ ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg )
|
|
||||||
+ ret=$?
|
|
||||||
+ fi
|
|
||||||
[ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null
|
|
||||||
|
|
||||||
[ "$PKG_UPGRADE" = "1" ] || for i in `cat ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.list | grep "^/etc/init.d/"`; do
|
|
||||||
@@ -225,7 +229,7 @@ default_postinst() {
|
|
||||||
$i start
|
|
||||||
}
|
|
||||||
done
|
|
||||||
- return 0
|
|
||||||
+ return $ret
|
|
||||||
}
|
|
||||||
|
|
||||||
include() {
|
|
@ -0,0 +1,20 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Sun, 24 Apr 2016 08:48:45 +0200
|
||||||
|
Subject: build: add locking for downloads (fixes race conditions with multiple variants)
|
||||||
|
|
||||||
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||||
|
|
||||||
|
Backport of r48416
|
||||||
|
|
||||||
|
diff --git a/include/download.mk b/include/download.mk
|
||||||
|
index e518cce..9176b11 100644
|
||||||
|
--- a/include/download.mk
|
||||||
|
+++ b/include/download.mk
|
||||||
|
@@ -182,6 +182,6 @@ define Download
|
||||||
|
|
||||||
|
$(DL_DIR)/$(FILE):
|
||||||
|
mkdir -p $(DL_DIR)
|
||||||
|
- $(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown))
|
||||||
|
+ $(call locked,$(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown)),$(FILE))
|
||||||
|
|
||||||
|
endef
|
@ -0,0 +1,26 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Sun, 24 Apr 2016 08:49:27 +0200
|
||||||
|
Subject: download.mk: fix packed checkout mirroring support
|
||||||
|
|
||||||
|
Changeset r48416 broke the downloading of mirrored, packed scm checkouts.
|
||||||
|
|
||||||
|
Fix this by removing the "@" sign in front of the download command which is
|
||||||
|
now executed as part of a larger shell command under flock.
|
||||||
|
|
||||||
|
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
||||||
|
|
||||||
|
Backport of r48733
|
||||||
|
|
||||||
|
diff --git a/include/download.mk b/include/download.mk
|
||||||
|
index 9176b11..130bbc5 100644
|
||||||
|
--- a/include/download.mk
|
||||||
|
+++ b/include/download.mk
|
||||||
|
@@ -48,7 +48,7 @@ define DownloadMethod/default
|
||||||
|
endef
|
||||||
|
|
||||||
|
define wrap_mirror
|
||||||
|
- $(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" "" || ( $(1) ),$(1))
|
||||||
|
+$(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" "" || ( $(1) ),$(1))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define DownloadMethod/cvs
|
@ -1,22 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Fri, 28 Aug 2015 10:43:55 +0200
|
|
||||||
Subject: opkg: work around unconditional libopenssl build dependency
|
|
||||||
|
|
||||||
As the OpenWrt build system only resolves build dependencies per directory,
|
|
||||||
all opkg variants were causing libopenssl to be downloaded and built,
|
|
||||||
not only opkg-smime. Fix this by applying the same workaround as in
|
|
||||||
ustream-ssl.
|
|
||||||
|
|
||||||
diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile
|
|
||||||
index 76688f5..3e39cf8 100644
|
|
||||||
--- a/package/system/opkg/Makefile
|
|
||||||
+++ b/package/system/opkg/Makefile
|
|
||||||
@@ -72,7 +72,7 @@ endef
|
|
||||||
define Package/opkg-smime
|
|
||||||
$(call Package/opkg/Default)
|
|
||||||
TITLE+= (with S/MIME signature support)
|
|
||||||
- DEPENDS+=+libopenssl
|
|
||||||
+ DEPENDS+=+PACKAGE_opkg-smime:libopenssl
|
|
||||||
VARIANT:=smime
|
|
||||||
endef
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Fri, 28 Aug 2015 10:46:11 +0200
|
|
||||||
Subject: hostapd: work around unconditional libopenssl build dependency
|
|
||||||
|
|
||||||
As the OpenWrt build system only resolves build dependencies per directory,
|
|
||||||
all hostapd variants were causing libopenssl to be downloaded and built,
|
|
||||||
not only wpad-mesh. Fix this by applying the same workaround as in
|
|
||||||
ustream-ssl.
|
|
||||||
|
|
||||||
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
|
|
||||||
index c16cb11..c39b6b4 100644
|
|
||||||
--- a/package/network/services/hostapd/Makefile
|
|
||||||
+++ b/package/network/services/hostapd/Makefile
|
|
||||||
@@ -177,7 +177,7 @@ endef
|
|
||||||
define Package/wpad-mesh
|
|
||||||
$(call Package/wpad/Default)
|
|
||||||
TITLE+= (with 802.11s mesh and SAE support)
|
|
||||||
- DEPENDS:=$(DRV_DEPENDS) +libubus +libopenssl +@CONFIG_WPA_SUPPLICANT_OPENSSL @(!TARGET_uml||BROKEN)
|
|
||||||
+ DEPENDS:=$(DRV_DEPENDS) +libubus +PACKAGE_wpad-mesh:libopenssl +@CONFIG_WPA_SUPPLICANT_OPENSSL @(!TARGET_uml||BROKEN)
|
|
||||||
CONFLICTS:=@WPA_SUPPLICANT_INTERNAL
|
|
||||||
VARIANT:=wpad-mesh
|
|
||||||
endef
|
|
182
patches/openwrt/0022-netifd-update-to-latest-git-master.patch
Normal file
182
patches/openwrt/0022-netifd-update-to-latest-git-master.patch
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Wed, 9 Mar 2016 06:46:44 +0100
|
||||||
|
Subject: netifd: update to latest git master
|
||||||
|
|
||||||
|
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
|
||||||
|
index 619024b..84a4592 100644
|
||||||
|
--- a/package/network/config/netifd/Makefile
|
||||||
|
+++ b/package/network/config/netifd/Makefile
|
||||||
|
@@ -1,13 +1,13 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=netifd
|
||||||
|
-PKG_VERSION:=2015-12-16
|
||||||
|
+PKG_VERSION:=2016-03-31
|
||||||
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
-PKG_SOURCE_URL:=http://git.openwrt.org/project/netifd.git
|
||||||
|
+PKG_SOURCE_URL=$(OPENWRT_GIT)/project/netifd.git
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
-PKG_SOURCE_VERSION:=245527193e90906451be35c2b8e972b8712ea6ab
|
||||||
|
+PKG_SOURCE_VERSION:=6fd6be6b7f3fc4883fdc464fcbcb2b5e8d8e8174
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||||
|
# PKG_MIRROR_MD5SUM:=
|
||||||
|
diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network
|
||||||
|
index 542fc08..bdadbbc 100755
|
||||||
|
--- a/package/network/config/netifd/files/etc/init.d/network
|
||||||
|
+++ b/package/network/config/netifd/files/etc/init.d/network
|
||||||
|
@@ -21,7 +21,6 @@ start_service() {
|
||||||
|
procd_set_param watch network.interface
|
||||||
|
[ -e /proc/sys/kernel/core_pattern ] && {
|
||||||
|
procd_set_param limits core="unlimited"
|
||||||
|
- echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
|
||||||
|
}
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
|
diff --git a/package/network/config/netifd/files/sbin/ifup b/package/network/config/netifd/files/sbin/ifup
|
||||||
|
index af3aaa8..5515b91 100755
|
||||||
|
--- a/package/network/config/netifd/files/sbin/ifup
|
||||||
|
+++ b/package/network/config/netifd/files/sbin/ifup
|
||||||
|
@@ -67,12 +67,10 @@ if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
- local radio_devs
|
||||||
|
- local network="$1"
|
||||||
|
+ network="$1"
|
||||||
|
config_load wireless
|
||||||
|
config_foreach find_related_radios wifi-iface
|
||||||
|
|
||||||
|
- local dev
|
||||||
|
for dev in $(echo "$radio_devs" | sort -u); do
|
||||||
|
/sbin/wifi up "$dev"
|
||||||
|
done
|
||||||
|
diff --git a/package/network/config/netifd/patches/0001-Revert-device-Don-t-process-link-events-anymore-in-d.patch b/package/network/config/netifd/patches/0001-Revert-device-Don-t-process-link-events-anymore-in-d.patch
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..312964f
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/package/network/config/netifd/patches/0001-Revert-device-Don-t-process-link-events-anymore-in-d.patch
|
||||||
|
@@ -0,0 +1,121 @@
|
||||||
|
+From e0f19fdae88f3ef505e22533915f8328f4793980 Mon Sep 17 00:00:00 2001
|
||||||
|
+Message-Id: <e0f19fdae88f3ef505e22533915f8328f4793980.1462479663.git.mschiffer@universe-factory.net>
|
||||||
|
+From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
+Date: Thu, 5 May 2016 21:49:33 +0200
|
||||||
|
+Subject: [PATCH] Revert "device: Don't process link events anymore in device
|
||||||
|
+ user specific callback handlers"
|
||||||
|
+
|
||||||
|
+This reverts commit 4902ba2999dec02e82066d70ab6096b852a33007.
|
||||||
|
+---
|
||||||
|
+ device.h | 2 ++
|
||||||
|
+ macvlan.c | 8 ++++++++
|
||||||
|
+ system-linux.c | 2 +-
|
||||||
|
+ vlan.c | 6 ++++++
|
||||||
|
+ vlandev.c | 8 ++++++++
|
||||||
|
+ 5 files changed, 25 insertions(+), 1 deletion(-)
|
||||||
|
+
|
||||||
|
+diff --git a/device.h b/device.h
|
||||||
|
+index ac77cfb..ef1c608 100644
|
||||||
|
+--- a/device.h
|
||||||
|
++++ b/device.h
|
||||||
|
+@@ -59,6 +59,8 @@ struct device_type {
|
||||||
|
+ struct list_head list;
|
||||||
|
+ const char *name;
|
||||||
|
+
|
||||||
|
++ bool keep_link_status;
|
||||||
|
++
|
||||||
|
+ const struct uci_blob_param_list *config_params;
|
||||||
|
+
|
||||||
|
+ struct device *(*create)(const char *name, struct blob_attr *attr);
|
||||||
|
+diff --git a/macvlan.c b/macvlan.c
|
||||||
|
+index a0f11ae..051fe05 100644
|
||||||
|
+--- a/macvlan.c
|
||||||
|
++++ b/macvlan.c
|
||||||
|
+@@ -72,6 +72,12 @@ macvlan_base_cb(struct device_user *dev, enum device_event ev)
|
||||||
|
+ case DEV_EVENT_REMOVE:
|
||||||
|
+ device_set_present(&mvdev->dev, false);
|
||||||
|
+ break;
|
||||||
|
++ case DEV_EVENT_LINK_UP:
|
||||||
|
++ device_set_link(&mvdev->dev, true);
|
||||||
|
++ break;
|
||||||
|
++ case DEV_EVENT_LINK_DOWN:
|
||||||
|
++ device_set_link(&mvdev->dev, false);
|
||||||
|
++ break;
|
||||||
|
+ default:
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+@@ -255,6 +261,8 @@ macvlan_create(const char *name, struct blob_attr *attr)
|
||||||
|
+ const struct device_type macvlan_device_type = {
|
||||||
|
+ .name = "MAC VLAN",
|
||||||
|
+ .config_params = &macvlan_attr_list,
|
||||||
|
++ .keep_link_status = true,
|
||||||
|
++
|
||||||
|
+ .create = macvlan_create,
|
||||||
|
+ .config_init = macvlan_config_init,
|
||||||
|
+ .reload = macvlan_reload,
|
||||||
|
+diff --git a/system-linux.c b/system-linux.c
|
||||||
|
+index 351a994..794c1dd 100644
|
||||||
|
+--- a/system-linux.c
|
||||||
|
++++ b/system-linux.c
|
||||||
|
+@@ -464,7 +464,7 @@ static int cb_rtnl_event(struct nl_msg *msg, void *arg)
|
||||||
|
+ goto out;
|
||||||
|
+
|
||||||
|
+ struct device *dev = device_get(nla_data(nla[IFLA_IFNAME]), false);
|
||||||
|
+- if (!dev)
|
||||||
|
++ if (!dev || dev->type->keep_link_status)
|
||||||
|
+ goto out;
|
||||||
|
+
|
||||||
|
+ if (!system_get_dev_sysctl("/sys/class/net/%s/carrier", dev->ifname, buf, sizeof(buf)))
|
||||||
|
+diff --git a/vlan.c b/vlan.c
|
||||||
|
+index ac434ce..8d93799 100644
|
||||||
|
+--- a/vlan.c
|
||||||
|
++++ b/vlan.c
|
||||||
|
+@@ -79,6 +79,11 @@ static void vlan_dev_cb(struct device_user *dep, enum device_event ev)
|
||||||
|
+ case DEV_EVENT_REMOVE:
|
||||||
|
+ device_set_present(&vldev->dev, new_state);
|
||||||
|
+ break;
|
||||||
|
++ case DEV_EVENT_LINK_UP:
|
||||||
|
++ new_state = true;
|
||||||
|
++ case DEV_EVENT_LINK_DOWN:
|
||||||
|
++ device_set_link(&vldev->dev, new_state);
|
||||||
|
++ break;
|
||||||
|
+ case DEV_EVENT_UPDATE_IFNAME:
|
||||||
|
+ vlan_dev_set_name(vldev, dep->dev);
|
||||||
|
+ device_broadcast_event(&vldev->dev, ev);
|
||||||
|
+@@ -97,6 +102,7 @@ static struct device *get_vlan_device(struct device *dev, int id, bool create)
|
||||||
|
+ static const struct device_type vlan_type = {
|
||||||
|
+ .name = "VLAN",
|
||||||
|
+ .config_params = &device_attr_list,
|
||||||
|
++ .keep_link_status = true,
|
||||||
|
+ .free = free_vlan_if,
|
||||||
|
+ };
|
||||||
|
+ struct vlan_device *vldev;
|
||||||
|
+diff --git a/vlandev.c b/vlandev.c
|
||||||
|
+index b93527c..884e6ef 100644
|
||||||
|
+--- a/vlandev.c
|
||||||
|
++++ b/vlandev.c
|
||||||
|
+@@ -63,6 +63,12 @@ vlandev_base_cb(struct device_user *dev, enum device_event ev)
|
||||||
|
+ case DEV_EVENT_REMOVE:
|
||||||
|
+ device_set_present(&mvdev->dev, false);
|
||||||
|
+ break;
|
||||||
|
++ case DEV_EVENT_LINK_UP:
|
||||||
|
++ device_set_link(&mvdev->dev, true);
|
||||||
|
++ break;
|
||||||
|
++ case DEV_EVENT_LINK_DOWN:
|
||||||
|
++ device_set_link(&mvdev->dev, false);
|
||||||
|
++ break;
|
||||||
|
+ default:
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+@@ -243,6 +249,8 @@ vlandev_create(const char *name, struct blob_attr *attr)
|
||||||
|
+ const struct device_type vlandev_device_type = {
|
||||||
|
+ .name = "VLANDEV",
|
||||||
|
+ .config_params = &vlandev_attr_list,
|
||||||
|
++ .keep_link_status = true,
|
||||||
|
++
|
||||||
|
+ .create = vlandev_create,
|
||||||
|
+ .config_init = vlandev_config_init,
|
||||||
|
+ .reload = vlandev_reload,
|
||||||
|
+--
|
||||||
|
+2.8.2
|
||||||
|
+
|
@ -1,77 +0,0 @@
|
|||||||
From: Nils Schneider <nils@nilsschneider.net>
|
|
||||||
Date: Thu, 3 Sep 2015 18:07:17 +0200
|
|
||||||
Subject: odhcp6c: minor fixes
|
|
||||||
|
|
||||||
Better synchronize RA & DHCPv6 events
|
|
||||||
Accumulate some events to avoid flooding
|
|
||||||
Restart softwires for address and prefix changes
|
|
||||||
|
|
||||||
Signed-off-by: Steven Barth <steven@midlink.org>
|
|
||||||
|
|
||||||
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
|
|
||||||
index 75de54c..aa81e02 100644
|
|
||||||
--- a/package/network/ipv6/odhcp6c/Makefile
|
|
||||||
+++ b/package/network/ipv6/odhcp6c/Makefile
|
|
||||||
@@ -8,14 +8,14 @@
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=odhcp6c
|
|
||||||
-PKG_VERSION:=2015-07-18
|
|
||||||
+PKG_VERSION:=2015-07-29
|
|
||||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
||||||
PKG_SOURCE_URL:=https://github.com/sbyx/odhcp6c.git
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
-PKG_SOURCE_VERSION:=024525798c5f6aba3af9b2ef7b3af2f3c14f1db8
|
|
||||||
+PKG_SOURCE_VERSION:=dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9
|
|
||||||
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
|
||||||
|
|
||||||
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
|
||||||
index 33f6d9b..677d35f 100755
|
|
||||||
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
|
||||||
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
|
||||||
@@ -5,6 +5,8 @@
|
|
||||||
|
|
||||||
setup_interface () {
|
|
||||||
local device="$1"
|
|
||||||
+ local prefsig=""
|
|
||||||
+ local addrsig=""
|
|
||||||
proto_init_update "*" 1
|
|
||||||
|
|
||||||
# Merge RA-DNS
|
|
||||||
@@ -34,6 +36,7 @@ setup_interface () {
|
|
||||||
|
|
||||||
for prefix in $PREFIXES; do
|
|
||||||
proto_add_ipv6_prefix "$prefix"
|
|
||||||
+ prefsig="$prefsig ${prefix%%,*}"
|
|
||||||
local entry="${prefix#*/}"
|
|
||||||
entry="${entry#*,}"
|
|
||||||
entry="${entry#*,}"
|
|
||||||
@@ -68,6 +71,7 @@ setup_interface () {
|
|
||||||
local valid="${entry%%,*}"
|
|
||||||
|
|
||||||
proto_add_ipv6_address "$addr" "$mask" "$preferred" "$valid" 1
|
|
||||||
+ addrsig="$addrsig $addr/$mask"
|
|
||||||
|
|
||||||
if [ -z "$RA_ADDRESSES" -a -z "$RA_ROUTES" -a \
|
|
||||||
-z "$RA_DNS" -a "$FAKE_ROUTES" = 1 ]; then
|
|
||||||
@@ -136,6 +140,8 @@ setup_interface () {
|
|
||||||
json_add_string ifname "@$INTERFACE"
|
|
||||||
json_add_string proto map
|
|
||||||
json_add_string type "$MAPTYPE"
|
|
||||||
+ json_add_string _prefsig "$prefsig"
|
|
||||||
+ [ "$MAPTYPE" = lw4o6 ] && json_add_string _addrsig "$addrsig"
|
|
||||||
json_add_string rule "$MAPRULE"
|
|
||||||
json_add_string tunlink "$INTERFACE"
|
|
||||||
[ -n "$ZONE_MAP" ] || ZONE_MAP=$ZONE
|
|
||||||
@@ -163,6 +169,7 @@ setup_interface () {
|
|
||||||
json_add_string ifname "@$INTERFACE"
|
|
||||||
json_add_string proto "464xlat"
|
|
||||||
json_add_string tunlink "$INTERFACE"
|
|
||||||
+ json_add_string _addrsig "$addrsig"
|
|
||||||
[ -n "$ZONE_464XLAT" ] || ZONE_464XLAT=$ZONE
|
|
||||||
[ -n "$ZONE_464XLAT" ] && json_add_string zone "$ZONE_464XLAT"
|
|
||||||
[ -n "$IFACE_464XLAT_DELEGATE" ] && json_add_boolean delegate "$IFACE_464XLAT_DELEGATE"
|
|
@ -0,0 +1,37 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Sun, 8 May 2016 15:53:14 +0200
|
||||||
|
Subject: tools: pkg-config: fix build with GCC 6
|
||||||
|
|
||||||
|
Fixes the following error:
|
||||||
|
|
||||||
|
gdate.c: In function ‘g_date_strftime’:
|
||||||
|
gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
|
||||||
|
tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
|
||||||
|
^~~~~~
|
||||||
|
|
||||||
|
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
|
||||||
|
diff --git a/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch b/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..6849299
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch
|
||||||
|
@@ -0,0 +1,18 @@
|
||||||
|
+--- a/glib/glib/gdate.c
|
||||||
|
++++ b/glib/glib/gdate.c
|
||||||
|
+@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
|
||||||
|
+ *
|
||||||
|
+ * Returns: number of characters written to the buffer, or 0 the buffer was too small
|
||||||
|
+ */
|
||||||
|
++#pragma GCC diagnostic push
|
||||||
|
++#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||||
|
++
|
||||||
|
+ gsize
|
||||||
|
+ g_date_strftime (gchar *s,
|
||||||
|
+ gsize slen,
|
||||||
|
+@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
|
||||||
|
+ return retval;
|
||||||
|
+ #endif
|
||||||
|
+ }
|
||||||
|
++
|
||||||
|
++#pragma GCC diagnostic pop
|
@ -0,0 +1,815 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Sun, 8 May 2016 22:06:51 +0200
|
||||||
|
Subject: tools: mkimage: sync include/linux/compiler*.h with u-boot master
|
||||||
|
|
||||||
|
Fixes build with GCC 6.
|
||||||
|
|
||||||
|
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
|
||||||
|
diff --git a/tools/mkimage/patches/200-compiler-support.patch b/tools/mkimage/patches/200-compiler-support.patch
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..ca9c5b5
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tools/mkimage/patches/200-compiler-support.patch
|
||||||
|
@@ -0,0 +1,702 @@
|
||||||
|
+diff --git b/include/linux/compiler-gcc.h a/include/linux/compiler-gcc.h
|
||||||
|
+index e057bd2..22ab246 100644
|
||||||
|
+--- b/include/linux/compiler-gcc.h
|
||||||
|
++++ a/include/linux/compiler-gcc.h
|
||||||
|
+@@ -5,14 +5,28 @@
|
||||||
|
+ /*
|
||||||
|
+ * Common definitions for all gcc versions go here.
|
||||||
|
+ */
|
||||||
|
+-#define GCC_VERSION (__GNUC__ * 10000 \
|
||||||
|
+- + __GNUC_MINOR__ * 100 \
|
||||||
|
+- + __GNUC_PATCHLEVEL__)
|
||||||
|
+-
|
||||||
|
++#define GCC_VERSION (__GNUC__ * 10000 \
|
||||||
|
++ + __GNUC_MINOR__ * 100 \
|
||||||
|
++ + __GNUC_PATCHLEVEL__)
|
||||||
|
+
|
||||||
|
+ /* Optimization barrier */
|
||||||
|
++
|
||||||
|
+ /* The "volatile" is due to gcc bugs */
|
||||||
|
+ #define barrier() __asm__ __volatile__("": : :"memory")
|
||||||
|
++/*
|
||||||
|
++ * This version is i.e. to prevent dead stores elimination on @ptr
|
||||||
|
++ * where gcc and llvm may behave differently when otherwise using
|
||||||
|
++ * normal barrier(): while gcc behavior gets along with a normal
|
||||||
|
++ * barrier(), llvm needs an explicit input variable to be assumed
|
||||||
|
++ * clobbered. The issue is as follows: while the inline asm might
|
||||||
|
++ * access any memory it wants, the compiler could have fit all of
|
||||||
|
++ * @ptr into memory registers instead, and since @ptr never escaped
|
||||||
|
++ * from that, it proofed that the inline asm wasn't touching any of
|
||||||
|
++ * it. This version works well with both compilers, i.e. we're telling
|
||||||
|
++ * the compiler that the inline asm absolutely may see the contents
|
||||||
|
++ * of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495
|
||||||
|
++ */
|
||||||
|
++#define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory")
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * This macro obfuscates arithmetic on a variable address so that gcc
|
||||||
|
+@@ -32,58 +46,63 @@
|
||||||
|
+ * the inline assembly constraint from =g to =r, in this particular
|
||||||
|
+ * case either is valid.
|
||||||
|
+ */
|
||||||
|
+-#define RELOC_HIDE(ptr, off) \
|
||||||
|
+- ({ unsigned long __ptr; \
|
||||||
|
+- __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
|
||||||
|
+- (typeof(ptr)) (__ptr + (off)); })
|
||||||
|
++#define RELOC_HIDE(ptr, off) \
|
||||||
|
++({ \
|
||||||
|
++ unsigned long __ptr; \
|
||||||
|
++ __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
|
||||||
|
++ (typeof(ptr)) (__ptr + (off)); \
|
||||||
|
++})
|
||||||
|
+
|
||||||
|
+ /* Make the optimizer believe the variable can be manipulated arbitrarily. */
|
||||||
|
+-#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var))
|
||||||
|
++#define OPTIMIZER_HIDE_VAR(var) \
|
||||||
|
++ __asm__ ("" : "=r" (var) : "0" (var))
|
||||||
|
+
|
||||||
|
+ #ifdef __CHECKER__
|
||||||
|
+-#define __must_be_array(arr) 0
|
||||||
|
++#define __must_be_array(a) 0
|
||||||
|
+ #else
|
||||||
|
+ /* &a[0] degrades to a pointer: a different type from an array */
|
||||||
|
+-#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
|
||||||
|
++#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Force always-inline if the user requests it so via the .config,
|
||||||
|
+ * or if gcc is too old:
|
||||||
|
+ */
|
||||||
|
+-#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
|
||||||
|
++#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
|
||||||
|
+ !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
|
||||||
|
+-# define inline inline __attribute__((always_inline)) notrace
|
||||||
|
+-# define __inline__ __inline__ __attribute__((always_inline)) notrace
|
||||||
|
+-# define __inline __inline __attribute__((always_inline)) notrace
|
||||||
|
++#define inline inline __attribute__((always_inline)) notrace
|
||||||
|
++#define __inline__ __inline__ __attribute__((always_inline)) notrace
|
||||||
|
++#define __inline __inline __attribute__((always_inline)) notrace
|
||||||
|
+ #else
|
||||||
|
+ /* A lot of inline functions can cause havoc with function tracing */
|
||||||
|
+-# define inline inline notrace
|
||||||
|
+-# define __inline__ __inline__ notrace
|
||||||
|
+-# define __inline __inline notrace
|
||||||
|
++#define inline inline notrace
|
||||||
|
++#define __inline__ __inline__ notrace
|
||||||
|
++#define __inline __inline notrace
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
+-#define __deprecated __attribute__((deprecated))
|
||||||
|
+-#ifndef __packed
|
||||||
|
+-#define __packed __attribute__((packed))
|
||||||
|
+-#endif
|
||||||
|
+-#ifndef __weak
|
||||||
|
+-#define __weak __attribute__((weak))
|
||||||
|
+-#endif
|
||||||
|
++#define __always_inline inline __attribute__((always_inline))
|
||||||
|
++#define noinline __attribute__((noinline))
|
||||||
|
++
|
||||||
|
++#define __deprecated __attribute__((deprecated))
|
||||||
|
++#define __packed __attribute__((packed))
|
||||||
|
++#define __weak __attribute__((weak))
|
||||||
|
++#define __alias(symbol) __attribute__((alias(#symbol)))
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+- * it doesn't make sense on ARM (currently the only user of __naked) to trace
|
||||||
|
+- * naked functions because then mcount is called without stack and frame pointer
|
||||||
|
+- * being set up and there is no chance to restore the lr register to the value
|
||||||
|
+- * before mcount was called.
|
||||||
|
++ * it doesn't make sense on ARM (currently the only user of __naked)
|
||||||
|
++ * to trace naked functions because then mcount is called without
|
||||||
|
++ * stack and frame pointer being set up and there is no chance to
|
||||||
|
++ * restore the lr register to the value before mcount was called.
|
||||||
|
++ *
|
||||||
|
++ * The asm() bodies of naked functions often depend on standard calling
|
||||||
|
++ * conventions, therefore they must be noinline and noclone.
|
||||||
|
+ *
|
||||||
|
+- * The asm() bodies of naked functions often depend on standard calling conventions,
|
||||||
|
+- * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce
|
||||||
|
+- * this, so we must do so ourselves. See GCC PR44290.
|
||||||
|
++ * GCC 4.[56] currently fail to enforce this, so we must do so ourselves.
|
||||||
|
++ * See GCC PR44290.
|
||||||
|
+ */
|
||||||
|
+-#define __naked __attribute__((naked)) noinline __noclone notrace
|
||||||
|
++#define __naked __attribute__((naked)) noinline __noclone notrace
|
||||||
|
+
|
||||||
|
+-#define __noreturn __attribute__((noreturn))
|
||||||
|
++#define __noreturn __attribute__((noreturn))
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * From the GCC manual:
|
||||||
|
+@@ -95,34 +114,170 @@
|
||||||
|
+ * would be.
|
||||||
|
+ * [...]
|
||||||
|
+ */
|
||||||
|
+-#ifndef __pure
|
||||||
|
+-#define __pure __attribute__((pure))
|
||||||
|
++#define __pure __attribute__((pure))
|
||||||
|
++#define __aligned(x) __attribute__((aligned(x)))
|
||||||
|
++#define __printf(a, b) __attribute__((format(printf, a, b)))
|
||||||
|
++#define __scanf(a, b) __attribute__((format(scanf, a, b)))
|
||||||
|
++#define __attribute_const__ __attribute__((__const__))
|
||||||
|
++#define __maybe_unused __attribute__((unused))
|
||||||
|
++#define __always_unused __attribute__((unused))
|
||||||
|
++
|
||||||
|
++/* gcc version specific checks */
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION < 30200
|
||||||
|
++# error Sorry, your compiler is too old - please upgrade it.
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION < 30300
|
||||||
|
++# define __used __attribute__((__unused__))
|
||||||
|
++#else
|
||||||
|
++# define __used __attribute__((__used__))
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++#ifdef CONFIG_GCOV_KERNEL
|
||||||
|
++# if GCC_VERSION < 30400
|
||||||
|
++# error "GCOV profiling support for gcc versions below 3.4 not included"
|
||||||
|
++# endif /* __GNUC_MINOR__ */
|
||||||
|
++#endif /* CONFIG_GCOV_KERNEL */
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 30400
|
||||||
|
++#define __must_check __attribute__((warn_unused_result))
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 40000
|
||||||
|
++
|
||||||
|
++/* GCC 4.1.[01] miscompiles __weak */
|
||||||
|
++#ifdef __KERNEL__
|
||||||
|
++# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101
|
||||||
|
++# error Your version of gcc miscompiles the __weak directive
|
||||||
|
++# endif
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++#define __used __attribute__((__used__))
|
||||||
|
++#define __compiler_offsetof(a, b) \
|
||||||
|
++ __builtin_offsetof(a, b)
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 40100 && GCC_VERSION < 40600
|
||||||
|
++# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 40300
|
||||||
|
++/* Mark functions as cold. gcc will assume any path leading to a call
|
||||||
|
++ * to them will be unlikely. This means a lot of manual unlikely()s
|
||||||
|
++ * are unnecessary now for any paths leading to the usual suspects
|
||||||
|
++ * like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||||
|
++ * older compilers]
|
||||||
|
++ *
|
||||||
|
++ * Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||||
|
++ * in the preprocessor, but we can live with this because they're unreleased.
|
||||||
|
++ * Maketime probing would be overkill here.
|
||||||
|
++ *
|
||||||
|
++ * gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||||
|
++ * a special section, but I don't see any sense in this right now in
|
||||||
|
++ * the kernel context
|
||||||
|
++ */
|
||||||
|
++#define __cold __attribute__((__cold__))
|
||||||
|
++
|
||||||
|
++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||||
|
++
|
||||||
|
++#ifndef __CHECKER__
|
||||||
|
++# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||||
|
++# define __compiletime_error(message) __attribute__((error(message)))
|
||||||
|
++#endif /* __CHECKER__ */
|
||||||
|
++#endif /* GCC_VERSION >= 40300 */
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 40500
|
||||||
|
++/*
|
||||||
|
++ * Mark a position in code as unreachable. This can be used to
|
||||||
|
++ * suppress control flow warnings after asm blocks that transfer
|
||||||
|
++ * control elsewhere.
|
||||||
|
++ *
|
||||||
|
++ * Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||||
|
++ * this in the preprocessor, but we can live with this because they're
|
||||||
|
++ * unreleased. Really, we need to have autoconf for the kernel.
|
||||||
|
++ */
|
||||||
|
++#define unreachable() __builtin_unreachable()
|
||||||
|
++
|
||||||
|
++/* Mark a function definition as prohibited from being cloned. */
|
||||||
|
++#define __noclone __attribute__((__noclone__))
|
||||||
|
++
|
||||||
|
++#endif /* GCC_VERSION >= 40500 */
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 40600
|
||||||
|
++/*
|
||||||
|
++ * When used with Link Time Optimization, gcc can optimize away C functions or
|
||||||
|
++ * variables which are referenced only from assembly code. __visible tells the
|
||||||
|
++ * optimizer that something else uses this function or variable, thus preventing
|
||||||
|
++ * this.
|
||||||
|
++ */
|
||||||
|
++#define __visible __attribute__((externally_visible))
|
||||||
|
+ #endif
|
||||||
|
+-#ifndef __aligned
|
||||||
|
+-#define __aligned(x) __attribute__((aligned(x)))
|
||||||
|
++
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 40900 && !defined(__CHECKER__)
|
||||||
|
++/*
|
||||||
|
++ * __assume_aligned(n, k): Tell the optimizer that the returned
|
||||||
|
++ * pointer can be assumed to be k modulo n. The second argument is
|
||||||
|
++ * optional (default 0), so we use a variadic macro to make the
|
||||||
|
++ * shorthand.
|
||||||
|
++ *
|
||||||
|
++ * Beware: Do not apply this to functions which may return
|
||||||
|
++ * ERR_PTRs. Also, it is probably unwise to apply it to functions
|
||||||
|
++ * returning extra information in the low bits (but in that case the
|
||||||
|
++ * compiler should see some alignment anyway, when the return value is
|
||||||
|
++ * massaged by 'flags = ptr & 3; ptr &= ~3;').
|
||||||
|
++ */
|
||||||
|
++#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__)))
|
||||||
|
+ #endif
|
||||||
|
+-#define __printf(a, b) __attribute__((format(printf, a, b)))
|
||||||
|
+-#define __scanf(a, b) __attribute__((format(scanf, a, b)))
|
||||||
|
+-#define noinline __attribute__((noinline))
|
||||||
|
+-#define __attribute_const__ __attribute__((__const__))
|
||||||
|
+-#define __maybe_unused __attribute__((unused))
|
||||||
|
+-#define __always_unused __attribute__((unused))
|
||||||
|
+
|
||||||
|
+-#define __gcc_header(x) #x
|
||||||
|
+-#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
|
||||||
|
+-#define gcc_header(x) _gcc_header(x)
|
||||||
|
+-#include gcc_header(__GNUC__)
|
||||||
|
++/*
|
||||||
|
++ * GCC 'asm goto' miscompiles certain code sequences:
|
||||||
|
++ *
|
||||||
|
++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||||
|
++ *
|
||||||
|
++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||||
|
++ *
|
||||||
|
++ * (asm goto is automatically volatile - the naming reflects this.)
|
||||||
|
++ */
|
||||||
|
++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||||
|
++
|
||||||
|
++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||||
|
++#if GCC_VERSION >= 40400
|
||||||
|
++#define __HAVE_BUILTIN_BSWAP32__
|
||||||
|
++#define __HAVE_BUILTIN_BSWAP64__
|
||||||
|
++#endif
|
||||||
|
++#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600)
|
||||||
|
++#define __HAVE_BUILTIN_BSWAP16__
|
||||||
|
++#endif
|
||||||
|
++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 50000
|
||||||
|
++#define KASAN_ABI_VERSION 4
|
||||||
|
++#elif GCC_VERSION >= 40902
|
||||||
|
++#define KASAN_ABI_VERSION 3
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++#if GCC_VERSION >= 40902
|
||||||
|
++/*
|
||||||
|
++ * Tell the compiler that address safety instrumentation (KASAN)
|
||||||
|
++ * should not be applied to that function.
|
||||||
|
++ * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
|
||||||
|
++ */
|
||||||
|
++#define __no_sanitize_address __attribute__((no_sanitize_address))
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++#endif /* gcc version >= 40000 specific checks */
|
||||||
|
+
|
||||||
|
+ #if !defined(__noclone)
|
||||||
|
+ #define __noclone /* not needed */
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
++#if !defined(__no_sanitize_address)
|
||||||
|
++#define __no_sanitize_address
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
+ /*
|
||||||
|
+ * A trick to suppress uninitialized variable warning without generating any
|
||||||
|
+ * code
|
||||||
|
+ */
|
||||||
|
+ #define uninitialized_var(x) x = x
|
||||||
|
+-
|
||||||
|
+-#ifndef __always_inline
|
||||||
|
+-#define __always_inline inline __attribute__((always_inline))
|
||||||
|
+-#endif
|
||||||
|
+diff --git b/include/linux/compiler-gcc3.h a/include/linux/compiler-gcc3.h
|
||||||
|
+deleted file mode 100644
|
||||||
|
+index 7d89feb..0000000
|
||||||
|
+--- b/include/linux/compiler-gcc3.h
|
||||||
|
++++ /dev/null
|
||||||
|
+@@ -1,23 +0,0 @@
|
||||||
|
+-#ifndef __LINUX_COMPILER_H
|
||||||
|
+-#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead."
|
||||||
|
+-#endif
|
||||||
|
+-
|
||||||
|
+-#if GCC_VERSION < 30200
|
||||||
|
+-# error Sorry, your compiler is too old - please upgrade it.
|
||||||
|
+-#endif
|
||||||
|
+-
|
||||||
|
+-#if GCC_VERSION >= 30300
|
||||||
|
+-# define __used __attribute__((__used__))
|
||||||
|
+-#else
|
||||||
|
+-# define __used __attribute__((__unused__))
|
||||||
|
+-#endif
|
||||||
|
+-
|
||||||
|
+-#if GCC_VERSION >= 30400
|
||||||
|
+-#define __must_check __attribute__((warn_unused_result))
|
||||||
|
+-#endif
|
||||||
|
+-
|
||||||
|
+-#ifdef CONFIG_GCOV_KERNEL
|
||||||
|
+-# if GCC_VERSION < 30400
|
||||||
|
+-# error "GCOV profiling support for gcc versions below 3.4 not included"
|
||||||
|
+-# endif /* __GNUC_MINOR__ */
|
||||||
|
+-#endif /* CONFIG_GCOV_KERNEL */
|
||||||
|
+diff --git b/include/linux/compiler-gcc4.h a/include/linux/compiler-gcc4.h
|
||||||
|
+deleted file mode 100644
|
||||||
|
+index c982a09..0000000
|
||||||
|
+--- b/include/linux/compiler-gcc4.h
|
||||||
|
++++ /dev/null
|
||||||
|
+@@ -1,81 +0,0 @@
|
||||||
|
+-#ifndef __LINUX_COMPILER_H
|
||||||
|
+-#error "Please don't include <linux/compiler-gcc4.h> directly, include <linux/compiler.h> instead."
|
||||||
|
+-#endif
|
||||||
|
+-
|
||||||
|
+-#define __used __attribute__((__used__))
|
||||||
|
+-#define __must_check __attribute__((warn_unused_result))
|
||||||
|
+-#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
|
||||||
|
+-
|
||||||
|
+-#if GCC_VERSION >= 40100 && GCC_VERSION < 40600
|
||||||
|
+-# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
|
||||||
|
+-#endif
|
||||||
|
+-
|
||||||
|
+-#if GCC_VERSION >= 40300
|
||||||
|
+-/* Mark functions as cold. gcc will assume any path leading to a call
|
||||||
|
+- to them will be unlikely. This means a lot of manual unlikely()s
|
||||||
|
+- are unnecessary now for any paths leading to the usual suspects
|
||||||
|
+- like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||||
|
+- older compilers]
|
||||||
|
+-
|
||||||
|
+- Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||||
|
+- in the preprocessor, but we can live with this because they're unreleased.
|
||||||
|
+- Maketime probing would be overkill here.
|
||||||
|
+-
|
||||||
|
+- gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||||
|
+- a special section, but I don't see any sense in this right now in
|
||||||
|
+- the kernel context */
|
||||||
|
+-#define __cold __attribute__((__cold__))
|
||||||
|
+-
|
||||||
|
+-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||||
|
+-
|
||||||
|
+-#ifndef __CHECKER__
|
||||||
|
+-# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||||
|
+-# define __compiletime_error(message) __attribute__((error(message)))
|
||||||
|
+-#endif /* __CHECKER__ */
|
||||||
|
+-#endif /* GCC_VERSION >= 40300 */
|
||||||
|
+-
|
||||||
|
+-#if GCC_VERSION >= 40500
|
||||||
|
+-/*
|
||||||
|
+- * Mark a position in code as unreachable. This can be used to
|
||||||
|
+- * suppress control flow warnings after asm blocks that transfer
|
||||||
|
+- * control elsewhere.
|
||||||
|
+- *
|
||||||
|
+- * Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||||
|
+- * this in the preprocessor, but we can live with this because they're
|
||||||
|
+- * unreleased. Really, we need to have autoconf for the kernel.
|
||||||
|
+- */
|
||||||
|
+-#define unreachable() __builtin_unreachable()
|
||||||
|
+-
|
||||||
|
+-/* Mark a function definition as prohibited from being cloned. */
|
||||||
|
+-#define __noclone __attribute__((__noclone__))
|
||||||
|
+-
|
||||||
|
+-#endif /* GCC_VERSION >= 40500 */
|
||||||
|
+-
|
||||||
|
+-#if GCC_VERSION >= 40600
|
||||||
|
+-/*
|
||||||
|
+- * Tell the optimizer that something else uses this function or variable.
|
||||||
|
+- */
|
||||||
|
+-#define __visible __attribute__((externally_visible))
|
||||||
|
+-#endif
|
||||||
|
+-
|
||||||
|
+-/*
|
||||||
|
+- * GCC 'asm goto' miscompiles certain code sequences:
|
||||||
|
+- *
|
||||||
|
+- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||||
|
+- *
|
||||||
|
+- * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||||
|
+- * Fixed in GCC 4.8.2 and later versions.
|
||||||
|
+- *
|
||||||
|
+- * (asm goto is automatically volatile - the naming reflects this.)
|
||||||
|
+- */
|
||||||
|
+-#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||||
|
+-
|
||||||
|
+-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||||
|
+-#if GCC_VERSION >= 40400
|
||||||
|
+-#define __HAVE_BUILTIN_BSWAP32__
|
||||||
|
+-#define __HAVE_BUILTIN_BSWAP64__
|
||||||
|
+-#endif
|
||||||
|
+-#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600)
|
||||||
|
+-#define __HAVE_BUILTIN_BSWAP16__
|
||||||
|
+-#endif
|
||||||
|
+-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||||
|
+diff --git b/include/linux/compiler-intel.h a/include/linux/compiler-intel.h
|
||||||
|
+index ba147a1..d4c7113 100644
|
||||||
|
+--- b/include/linux/compiler-intel.h
|
||||||
|
++++ a/include/linux/compiler-intel.h
|
||||||
|
+@@ -13,9 +13,14 @@
|
||||||
|
+ /* Intel ECC compiler doesn't support gcc specific asm stmts.
|
||||||
|
+ * It uses intrinsics to do the equivalent things.
|
||||||
|
+ */
|
||||||
|
++#undef barrier
|
||||||
|
++#undef barrier_data
|
||||||
|
+ #undef RELOC_HIDE
|
||||||
|
+ #undef OPTIMIZER_HIDE_VAR
|
||||||
|
+
|
||||||
|
++#define barrier() __memory_barrier()
|
||||||
|
++#define barrier_data(ptr) barrier()
|
||||||
|
++
|
||||||
|
+ #define RELOC_HIDE(ptr, off) \
|
||||||
|
+ ({ unsigned long __ptr; \
|
||||||
|
+ __ptr = (unsigned long) (ptr); \
|
||||||
|
+diff --git b/include/linux/compiler.h a/include/linux/compiler.h
|
||||||
|
+index d5ad7b1..020ad16 100644
|
||||||
|
+--- b/include/linux/compiler.h
|
||||||
|
++++ a/include/linux/compiler.h
|
||||||
|
+@@ -17,6 +17,7 @@
|
||||||
|
+ # define __release(x) __context__(x,-1)
|
||||||
|
+ # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
|
||||||
|
+ # define __percpu __attribute__((noderef, address_space(3)))
|
||||||
|
++# define __pmem __attribute__((noderef, address_space(5)))
|
||||||
|
+ #ifdef CONFIG_SPARSE_RCU_POINTER
|
||||||
|
+ # define __rcu __attribute__((noderef, address_space(4)))
|
||||||
|
+ #else
|
||||||
|
+@@ -42,6 +43,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
|
||||||
|
+ # define __cond_lock(x,c) (c)
|
||||||
|
+ # define __percpu
|
||||||
|
+ # define __rcu
|
||||||
|
++# define __pmem
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
+ /* Indirect macros required for expanded argument pasting, eg. __LINE__. */
|
||||||
|
+@@ -54,7 +56,11 @@ extern void __chk_io_ptr(const volatile void __iomem *);
|
||||||
|
+ #include <linux/compiler-gcc.h>
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
++#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__)
|
||||||
|
++#define notrace __attribute__((hotpatch(0,0)))
|
||||||
|
++#else
|
||||||
|
+ #define notrace __attribute__((no_instrument_function))
|
||||||
|
++#endif
|
||||||
|
+
|
||||||
|
+ /* Intel compiler defines __GNUC__. So we will overwrite implementations
|
||||||
|
+ * coming from above header files here
|
||||||
|
+@@ -138,7 +144,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||||
|
+ */
|
||||||
|
+ #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
|
||||||
|
+ #define __trace_if(cond) \
|
||||||
|
+- if (__builtin_constant_p((cond)) ? !!(cond) : \
|
||||||
|
++ if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
|
||||||
|
+ ({ \
|
||||||
|
+ int ______r; \
|
||||||
|
+ static struct ftrace_branch_data \
|
||||||
|
+@@ -165,6 +171,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||||
|
+ # define barrier() __memory_barrier()
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
++#ifndef barrier_data
|
||||||
|
++# define barrier_data(ptr) barrier()
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
+ /* Unreachable code */
|
||||||
|
+ #ifndef unreachable
|
||||||
|
+ # define unreachable() do { } while (1)
|
||||||
|
+@@ -186,6 +196,126 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||||
|
+ # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
++#include <linux/types.h>
|
||||||
|
++
|
||||||
|
++#define __READ_ONCE_SIZE \
|
||||||
|
++({ \
|
||||||
|
++ switch (size) { \
|
||||||
|
++ case 1: *(__u8 *)res = *(volatile __u8 *)p; break; \
|
||||||
|
++ case 2: *(__u16 *)res = *(volatile __u16 *)p; break; \
|
||||||
|
++ case 4: *(__u32 *)res = *(volatile __u32 *)p; break; \
|
||||||
|
++ case 8: *(__u64 *)res = *(volatile __u64 *)p; break; \
|
||||||
|
++ default: \
|
||||||
|
++ barrier(); \
|
||||||
|
++ __builtin_memcpy((void *)res, (const void *)p, size); \
|
||||||
|
++ barrier(); \
|
||||||
|
++ } \
|
||||||
|
++})
|
||||||
|
++
|
||||||
|
++static __always_inline
|
||||||
|
++void __read_once_size(const volatile void *p, void *res, int size)
|
||||||
|
++{
|
||||||
|
++ __READ_ONCE_SIZE;
|
||||||
|
++}
|
||||||
|
++
|
||||||
|
++#ifdef CONFIG_KASAN
|
||||||
|
++/*
|
||||||
|
++ * This function is not 'inline' because __no_sanitize_address confilcts
|
||||||
|
++ * with inlining. Attempt to inline it may cause a build failure.
|
||||||
|
++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
|
||||||
|
++ * '__maybe_unused' allows us to avoid defined-but-not-used warnings.
|
||||||
|
++ */
|
||||||
|
++static __no_sanitize_address __maybe_unused
|
||||||
|
++void __read_once_size_nocheck(const volatile void *p, void *res, int size)
|
||||||
|
++{
|
||||||
|
++ __READ_ONCE_SIZE;
|
||||||
|
++}
|
||||||
|
++#else
|
||||||
|
++static __always_inline
|
||||||
|
++void __read_once_size_nocheck(const volatile void *p, void *res, int size)
|
||||||
|
++{
|
||||||
|
++ __READ_ONCE_SIZE;
|
||||||
|
++}
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++static __always_inline void __write_once_size(volatile void *p, void *res, int size)
|
||||||
|
++{
|
||||||
|
++ switch (size) {
|
||||||
|
++ case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
|
||||||
|
++ case 2: *(volatile __u16 *)p = *(__u16 *)res; break;
|
||||||
|
++ case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
|
||||||
|
++ case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
|
||||||
|
++ default:
|
||||||
|
++ barrier();
|
||||||
|
++ __builtin_memcpy((void *)p, (const void *)res, size);
|
||||||
|
++ barrier();
|
||||||
|
++ }
|
||||||
|
++}
|
||||||
|
++
|
||||||
|
++/*
|
||||||
|
++ * Prevent the compiler from merging or refetching reads or writes. The
|
||||||
|
++ * compiler is also forbidden from reordering successive instances of
|
||||||
|
++ * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the
|
||||||
|
++ * compiler is aware of some particular ordering. One way to make the
|
||||||
|
++ * compiler aware of ordering is to put the two invocations of READ_ONCE,
|
||||||
|
++ * WRITE_ONCE or ACCESS_ONCE() in different C statements.
|
||||||
|
++ *
|
||||||
|
++ * In contrast to ACCESS_ONCE these two macros will also work on aggregate
|
||||||
|
++ * data types like structs or unions. If the size of the accessed data
|
||||||
|
++ * type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
|
||||||
|
++ * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a
|
||||||
|
++ * compile-time warning.
|
||||||
|
++ *
|
||||||
|
++ * Their two major use cases are: (1) Mediating communication between
|
||||||
|
++ * process-level code and irq/NMI handlers, all running on the same CPU,
|
||||||
|
++ * and (2) Ensuring that the compiler does not fold, spindle, or otherwise
|
||||||
|
++ * mutilate accesses that either do not require ordering or that interact
|
||||||
|
++ * with an explicit memory barrier or atomic instruction that provides the
|
||||||
|
++ * required ordering.
|
||||||
|
++ */
|
||||||
|
++
|
||||||
|
++#define __READ_ONCE(x, check) \
|
||||||
|
++({ \
|
||||||
|
++ union { typeof(x) __val; char __c[1]; } __u; \
|
||||||
|
++ if (check) \
|
||||||
|
++ __read_once_size(&(x), __u.__c, sizeof(x)); \
|
||||||
|
++ else \
|
||||||
|
++ __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
|
||||||
|
++ __u.__val; \
|
||||||
|
++})
|
||||||
|
++#define READ_ONCE(x) __READ_ONCE(x, 1)
|
||||||
|
++
|
||||||
|
++/*
|
||||||
|
++ * Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need
|
||||||
|
++ * to hide memory access from KASAN.
|
||||||
|
++ */
|
||||||
|
++#define READ_ONCE_NOCHECK(x) __READ_ONCE(x, 0)
|
||||||
|
++
|
||||||
|
++#define WRITE_ONCE(x, val) \
|
||||||
|
++({ \
|
||||||
|
++ union { typeof(x) __val; char __c[1]; } __u = \
|
||||||
|
++ { .__val = (__force typeof(x)) (val) }; \
|
||||||
|
++ __write_once_size(&(x), __u.__c, sizeof(x)); \
|
||||||
|
++ __u.__val; \
|
||||||
|
++})
|
||||||
|
++
|
||||||
|
++/**
|
||||||
|
++ * smp_cond_acquire() - Spin wait for cond with ACQUIRE ordering
|
||||||
|
++ * @cond: boolean expression to wait for
|
||||||
|
++ *
|
||||||
|
++ * Equivalent to using smp_load_acquire() on the condition variable but employs
|
||||||
|
++ * the control dependency of the wait to reduce the barrier on many platforms.
|
||||||
|
++ *
|
||||||
|
++ * The control dependency provides a LOAD->STORE order, the additional RMB
|
||||||
|
++ * provides LOAD->LOAD order, together they provide LOAD->{LOAD,STORE} order,
|
||||||
|
++ * aka. ACQUIRE.
|
||||||
|
++ */
|
||||||
|
++#define smp_cond_acquire(cond) do { \
|
||||||
|
++ while (!(cond)) \
|
||||||
|
++ cpu_relax(); \
|
||||||
|
++ smp_rmb(); /* ctrl + rmb := acquire */ \
|
||||||
|
++} while (0)
|
||||||
|
++
|
||||||
|
+ #endif /* __KERNEL__ */
|
||||||
|
+
|
||||||
|
+ #endif /* __ASSEMBLY__ */
|
||||||
|
+@@ -304,6 +434,14 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||||
|
+ #define __visible
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
++/*
|
||||||
|
++ * Assume alignment of return value.
|
||||||
|
++ */
|
||||||
|
++#ifndef __assume_aligned
|
||||||
|
++#define __assume_aligned(a, ...)
|
||||||
|
++#endif
|
||||||
|
++
|
||||||
|
++
|
||||||
|
+ /* Are two types/vars the same type (ignoring qualifiers)? */
|
||||||
|
+ #ifndef __same_type
|
||||||
|
+ # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
|
||||||
|
+@@ -311,7 +449,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||||
|
+
|
||||||
|
+ /* Is this type a native word size -- useful for atomic operations */
|
||||||
|
+ #ifndef __native_word
|
||||||
|
+-# define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
|
||||||
|
++# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
+ /* Compile time object size, -1 for unknown */
|
||||||
|
+@@ -373,12 +511,38 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
||||||
|
+ * to make the compiler aware of ordering is to put the two invocations of
|
||||||
|
+ * ACCESS_ONCE() in different C statements.
|
||||||
|
+ *
|
||||||
|
+- * This macro does absolutely -nothing- to prevent the CPU from reordering,
|
||||||
|
+- * merging, or refetching absolutely anything at any time. Its main intended
|
||||||
|
+- * use is to mediate communication between process-level code and irq/NMI
|
||||||
|
+- * handlers, all running on the same CPU.
|
||||||
|
++ * ACCESS_ONCE will only work on scalar types. For union types, ACCESS_ONCE
|
||||||
|
++ * on a union member will work as long as the size of the member matches the
|
||||||
|
++ * size of the union and the size is smaller than word size.
|
||||||
|
++ *
|
||||||
|
++ * The major use cases of ACCESS_ONCE used to be (1) Mediating communication
|
||||||
|
++ * between process-level code and irq/NMI handlers, all running on the same CPU,
|
||||||
|
++ * and (2) Ensuring that the compiler does not fold, spindle, or otherwise
|
||||||
|
++ * mutilate accesses that either do not require ordering or that interact
|
||||||
|
++ * with an explicit memory barrier or atomic instruction that provides the
|
||||||
|
++ * required ordering.
|
||||||
|
++ *
|
||||||
|
++ * If possible use READ_ONCE()/WRITE_ONCE() instead.
|
||||||
|
++ */
|
||||||
|
++#define __ACCESS_ONCE(x) ({ \
|
||||||
|
++ __maybe_unused typeof(x) __var = (__force typeof(x)) 0; \
|
||||||
|
++ (volatile typeof(x) *)&(x); })
|
||||||
|
++#define ACCESS_ONCE(x) (*__ACCESS_ONCE(x))
|
||||||
|
++
|
||||||
|
++/**
|
||||||
|
++ * lockless_dereference() - safely load a pointer for later dereference
|
||||||
|
++ * @p: The pointer to load
|
||||||
|
++ *
|
||||||
|
++ * Similar to rcu_dereference(), but for situations where the pointed-to
|
||||||
|
++ * object's lifetime is managed by something other than RCU. That
|
||||||
|
++ * "something other" might be reference counting or simple immortality.
|
||||||
|
+ */
|
||||||
|
+-#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
|
||||||
|
++#define lockless_dereference(p) \
|
||||||
|
++({ \
|
||||||
|
++ typeof(p) _________p1 = READ_ONCE(p); \
|
||||||
|
++ smp_read_barrier_depends(); /* Dependency order vs. p above. */ \
|
||||||
|
++ (_________p1); \
|
||||||
|
++})
|
||||||
|
+
|
||||||
|
+ /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */
|
||||||
|
+ #ifdef CONFIG_KPROBES
|
||||||
|
diff --git a/tools/mkimage/patches/200-gcc5_compat.patch b/tools/mkimage/patches/200-gcc5_compat.patch
|
||||||
|
deleted file mode 100644
|
||||||
|
index 4d55f00..0000000
|
||||||
|
--- a/tools/mkimage/patches/200-gcc5_compat.patch
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,93 +0,0 @@
|
||||||
|
-From 478b02f1a7043b673565075ea5016376f3293b23 Mon Sep 17 00:00:00 2001
|
||||||
|
-From: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
-Date: Sat, 7 Feb 2015 22:52:40 +0100
|
||||||
|
-Subject: [PATCH] Add linux/compiler-gcc5.h to fix builds with gcc5
|
||||||
|
-
|
||||||
|
-Add linux/compiler-gcc5/h from the kernel sources at:
|
||||||
|
-
|
||||||
|
-commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b
|
||||||
|
-Author: Steven Noonan <steven@uplinklabs.net>
|
||||||
|
-Date: Sat Oct 25 15:09:42 2014 -0700
|
||||||
|
-
|
||||||
|
- compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles
|
||||||
|
-
|
||||||
|
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
----
|
||||||
|
- include/linux/compiler-gcc5.h | 65 +++++++++++++++++++++++++++++++++++++++++
|
||||||
|
- 1 file changed, 65 insertions(+)
|
||||||
|
- create mode 100644 include/linux/compiler-gcc5.h
|
||||||
|
-
|
||||||
|
-diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
|
||||||
|
-new file mode 100644
|
||||||
|
-index 0000000..c8c5659
|
||||||
|
---- /dev/null
|
||||||
|
-+++ b/include/linux/compiler-gcc5.h
|
||||||
|
-@@ -0,0 +1,65 @@
|
||||||
|
-+#ifndef __LINUX_COMPILER_H
|
||||||
|
-+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
|
||||||
|
-+#endif
|
||||||
|
-+
|
||||||
|
-+#define __used __attribute__((__used__))
|
||||||
|
-+#define __must_check __attribute__((warn_unused_result))
|
||||||
|
-+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||||
|
-+
|
||||||
|
-+/* Mark functions as cold. gcc will assume any path leading to a call
|
||||||
|
-+ to them will be unlikely. This means a lot of manual unlikely()s
|
||||||
|
-+ are unnecessary now for any paths leading to the usual suspects
|
||||||
|
-+ like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||||
|
-+ older compilers]
|
||||||
|
-+
|
||||||
|
-+ Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||||
|
-+ in the preprocessor, but we can live with this because they're unreleased.
|
||||||
|
-+ Maketime probing would be overkill here.
|
||||||
|
-+
|
||||||
|
-+ gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||||
|
-+ a special section, but I don't see any sense in this right now in
|
||||||
|
-+ the kernel context */
|
||||||
|
-+#define __cold __attribute__((__cold__))
|
||||||
|
-+
|
||||||
|
-+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||||
|
-+
|
||||||
|
-+#ifndef __CHECKER__
|
||||||
|
-+# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||||
|
-+# define __compiletime_error(message) __attribute__((error(message)))
|
||||||
|
-+#endif /* __CHECKER__ */
|
||||||
|
-+
|
||||||
|
-+/*
|
||||||
|
-+ * Mark a position in code as unreachable. This can be used to
|
||||||
|
-+ * suppress control flow warnings after asm blocks that transfer
|
||||||
|
-+ * control elsewhere.
|
||||||
|
-+ *
|
||||||
|
-+ * Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||||
|
-+ * this in the preprocessor, but we can live with this because they're
|
||||||
|
-+ * unreleased. Really, we need to have autoconf for the kernel.
|
||||||
|
-+ */
|
||||||
|
-+#define unreachable() __builtin_unreachable()
|
||||||
|
-+
|
||||||
|
-+/* Mark a function definition as prohibited from being cloned. */
|
||||||
|
-+#define __noclone __attribute__((__noclone__))
|
||||||
|
-+
|
||||||
|
-+/*
|
||||||
|
-+ * Tell the optimizer that something else uses this function or variable.
|
||||||
|
-+ */
|
||||||
|
-+#define __visible __attribute__((externally_visible))
|
||||||
|
-+
|
||||||
|
-+/*
|
||||||
|
-+ * GCC 'asm goto' miscompiles certain code sequences:
|
||||||
|
-+ *
|
||||||
|
-+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||||
|
-+ *
|
||||||
|
-+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||||
|
-+ *
|
||||||
|
-+ * (asm goto is automatically volatile - the naming reflects this.)
|
||||||
|
-+ */
|
||||||
|
-+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||||
|
-+
|
||||||
|
-+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||||
|
-+#define __HAVE_BUILTIN_BSWAP32__
|
||||||
|
-+#define __HAVE_BUILTIN_BSWAP64__
|
||||||
|
-+#define __HAVE_BUILTIN_BSWAP16__
|
||||||
|
-+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||||
|
---
|
||||||
|
-1.7.10.4
|
||||||
|
-
|
@ -1,31 +0,0 @@
|
|||||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
||||||
Date: Sun, 11 Oct 2015 18:00:27 +0200
|
|
||||||
Subject: ar71xx: add support for TP-LINK TL-WR841N/ND v10
|
|
||||||
|
|
||||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
|
||||||
index 8a25832..3a17420 100644
|
|
||||||
--- a/target/linux/ar71xx/image/Makefile
|
|
||||||
+++ b/target/linux/ar71xx/image/Makefile
|
|
||||||
@@ -562,6 +562,13 @@ define Device/tl-wr841n-v9
|
|
||||||
TPLINK_HWID := 0x08410009
|
|
||||||
endef
|
|
||||||
|
|
||||||
+define Device/tl-wr841n-v10
|
|
||||||
+ $(Device/tplink-4mlzma)
|
|
||||||
+ BOARDNAME := TL-WR841N-v9
|
|
||||||
+ DEVICE_PROFILE := TLWR841
|
|
||||||
+ TPLINK_HWID := 0x08410010
|
|
||||||
+endef
|
|
||||||
+
|
|
||||||
define Device/tl-wr842n-v2
|
|
||||||
$(Device/tplink-8mlzma)
|
|
||||||
BOARDNAME := TL-WR842N-v2
|
|
||||||
@@ -582,7 +589,7 @@ define Device/tl-wr847n-v8
|
|
||||||
DEVICE_PROFILE := TLWR841
|
|
||||||
TPLINK_HWID := 0x08470008
|
|
||||||
endef
|
|
||||||
-TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8
|
|
||||||
+TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr841n-v10 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8
|
|
||||||
|
|
||||||
define Device/tl-wr941nd-v5
|
|
||||||
$(Device/tplink-4mlzma)
|
|
144
patches/openwrt/0025-toolchain-gcc-fix-build-with-GCC-6.patch
Normal file
144
patches/openwrt/0025-toolchain-gcc-fix-build-with-GCC-6.patch
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
Date: Mon, 9 May 2016 00:16:38 +0200
|
||||||
|
Subject: toolchain: gcc: fix build with GCC 6
|
||||||
|
|
||||||
|
At least for GCC 4.8, which is used by most targets.
|
||||||
|
|
||||||
|
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||||
|
|
||||||
|
diff --git a/toolchain/gcc/patches/4.8-linaro/030-gcc-6-compile.patch b/toolchain/gcc/patches/4.8-linaro/030-gcc-6-compile.patch
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..c74f2aa
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/toolchain/gcc/patches/4.8-linaro/030-gcc-6-compile.patch
|
||||||
|
@@ -0,0 +1,130 @@
|
||||||
|
+Upstream commit r233721
|
||||||
|
+
|
||||||
|
+diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
|
||||||
|
+index bd1c1d7..a0ea0d4 100644
|
||||||
|
+--- a/gcc/cp/Make-lang.in
|
||||||
|
++++ b/gcc/cp/Make-lang.in
|
||||||
|
+@@ -111,7 +111,7 @@ else
|
||||||
|
+ # deleting the $(srcdir)/cp/cfns.h file.
|
||||||
|
+ $(srcdir)/cp/cfns.h:
|
||||||
|
+ endif
|
||||||
|
+- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
|
||||||
|
++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
|
||||||
|
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
|
||||||
|
+
|
||||||
|
+ #
|
||||||
|
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
|
||||||
|
+index 05ca753..d9b16b8 100644
|
||||||
|
+--- a/gcc/cp/cfns.gperf
|
||||||
|
++++ b/gcc/cp/cfns.gperf
|
||||||
|
+@@ -1,3 +1,5 @@
|
||||||
|
++%language=C++
|
||||||
|
++%define class-name libc_name
|
||||||
|
+ %{
|
||||||
|
+ /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+@@ -16,14 +18,6 @@ for more details.
|
||||||
|
+ You should have received a copy of the GNU General Public License
|
||||||
|
+ along with GCC; see the file COPYING3. If not see
|
||||||
|
+ <http://www.gnu.org/licenses/>. */
|
||||||
|
+-#ifdef __GNUC__
|
||||||
|
+-__inline
|
||||||
|
+-#endif
|
||||||
|
+-static unsigned int hash (const char *, unsigned int);
|
||||||
|
+-#ifdef __GNUC__
|
||||||
|
+-__inline
|
||||||
|
+-#endif
|
||||||
|
+-const char * libc_name_p (const char *, unsigned int);
|
||||||
|
+ %}
|
||||||
|
+ %%
|
||||||
|
+ # The standard C library functions, for feeding to gperf; the result is used
|
||||||
|
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
|
||||||
|
+index c845ddf..65801d1 100644
|
||||||
|
+--- a/gcc/cp/cfns.h
|
||||||
|
++++ b/gcc/cp/cfns.h
|
||||||
|
+@@ -1,5 +1,5 @@
|
||||||
|
+-/* ANSI-C code produced by gperf version 3.0.3 */
|
||||||
|
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
|
||||||
|
++/* C++ code produced by gperf version 3.0.4 */
|
||||||
|
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
|
||||||
|
+
|
||||||
|
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
+@@ -28,7 +28,7 @@
|
||||||
|
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
||||||
|
+ #endif
|
||||||
|
+
|
||||||
|
+-#line 1 "cfns.gperf"
|
||||||
|
++#line 3 "cfns.gperf"
|
||||||
|
+
|
||||||
|
+ /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
|
||||||
|
+
|
||||||
|
+@@ -47,25 +47,18 @@ for more details.
|
||||||
|
+ You should have received a copy of the GNU General Public License
|
||||||
|
+ along with GCC; see the file COPYING3. If not see
|
||||||
|
+ <http://www.gnu.org/licenses/>. */
|
||||||
|
+-#ifdef __GNUC__
|
||||||
|
+-__inline
|
||||||
|
+-#endif
|
||||||
|
+-static unsigned int hash (const char *, unsigned int);
|
||||||
|
+-#ifdef __GNUC__
|
||||||
|
+-__inline
|
||||||
|
+-#endif
|
||||||
|
+-const char * libc_name_p (const char *, unsigned int);
|
||||||
|
+ /* maximum key range = 391, duplicates = 0 */
|
||||||
|
+
|
||||||
|
+-#ifdef __GNUC__
|
||||||
|
+-__inline
|
||||||
|
+-#else
|
||||||
|
+-#ifdef __cplusplus
|
||||||
|
+-inline
|
||||||
|
+-#endif
|
||||||
|
+-#endif
|
||||||
|
+-static unsigned int
|
||||||
|
+-hash (register const char *str, register unsigned int len)
|
||||||
|
++class libc_name
|
||||||
|
++{
|
||||||
|
++private:
|
||||||
|
++ static inline unsigned int hash (const char *str, unsigned int len);
|
||||||
|
++public:
|
||||||
|
++ static const char *libc_name_p (const char *str, unsigned int len);
|
||||||
|
++};
|
||||||
|
++
|
||||||
|
++inline unsigned int
|
||||||
|
++libc_name::hash (register const char *str, register unsigned int len)
|
||||||
|
+ {
|
||||||
|
+ static const unsigned short asso_values[] =
|
||||||
|
+ {
|
||||||
|
+@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
|
||||||
|
+ return hval + asso_values[(unsigned char)str[len - 1]];
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+-#ifdef __GNUC__
|
||||||
|
+-__inline
|
||||||
|
+-#ifdef __GNUC_STDC_INLINE__
|
||||||
|
+-__attribute__ ((__gnu_inline__))
|
||||||
|
+-#endif
|
||||||
|
+-#endif
|
||||||
|
+ const char *
|
||||||
|
+-libc_name_p (register const char *str, register unsigned int len)
|
||||||
|
++libc_name::libc_name_p (register const char *str, register unsigned int len)
|
||||||
|
+ {
|
||||||
|
+ enum
|
||||||
|
+ {
|
||||||
|
+diff --git a/gcc/cp/except.c b/gcc/cp/except.c
|
||||||
|
+index 221971a..32340f5 100644
|
||||||
|
+--- a/gcc/cp/except.c
|
||||||
|
++++ b/gcc/cp/except.c
|
||||||
|
+@@ -1030,7 +1030,8 @@ nothrow_libfn_p (const_tree fn)
|
||||||
|
+ unless the system headers are playing rename tricks, and if
|
||||||
|
+ they are, we don't want to be confused by them. */
|
||||||
|
+ id = DECL_NAME (fn);
|
||||||
|
+- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||||
|
++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
|
||||||
|
++ IDENTIFIER_LENGTH (id));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Returns nonzero if an exception of type FROM will be caught by a
|
||||||
|
+--
|
||||||
|
+1.7.1
|
||||||
|
+
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user