Merge pull request #1 from freifunk-gluon/master
update the fork from upstream
This commit is contained in:
commit
33e85c7888
25
Makefile
25
Makefile
@ -121,12 +121,11 @@ PROFILE_PACKAGES :=
|
||||
define Profile
|
||||
$(eval $(call Profile/Default))
|
||||
$(eval $(call Profile/$(1)))
|
||||
$(1)_PACKAGES := $(PACKAGES)
|
||||
endef
|
||||
|
||||
define GluonProfile
|
||||
PROFILES += $(1)
|
||||
PROFILE_PACKAGES += $(filter-out -%,$($(1)_PACKAGES) $(2) $(GLUON_$(1)_SITE_PACKAGES))
|
||||
PROFILE_PACKAGES += $(filter-out -%,$(2) $(GLUON_$(1)_SITE_PACKAGES))
|
||||
GLUON_$(1)_DEFAULT_PACKAGES := $(2)
|
||||
GLUON_$(1)_MODELS :=
|
||||
endef
|
||||
@ -153,8 +152,9 @@ include $(INCLUDE_DIR)/target.mk
|
||||
prereq: FORCE
|
||||
+$(NO_TRACE_MAKE) prereq
|
||||
|
||||
package/lua/host/install: tools/sed/install
|
||||
gluon-tools: package/lua/host/install
|
||||
gluon-tools: FORCE
|
||||
+$(GLUONMAKE_EARLY) tools/sed/install
|
||||
+$(GLUONMAKE_EARLY) package/lua/host/install
|
||||
|
||||
prepare-tmpinfo: FORCE
|
||||
mkdir -p tmp/info
|
||||
@ -187,7 +187,7 @@ prepare-target: FORCE
|
||||
for dir in build_dir dl staging_dir tmp; do \
|
||||
mkdir -p $(GLUON_ORIGOPENWRTDIR)/$$dir; \
|
||||
done
|
||||
for link in build_dir Config.in dl include Makefile package rules.mk scripts staging_dir target tmp toolchain tools; do \
|
||||
for link in build_dir config Config.in dl include Makefile package rules.mk scripts staging_dir target tmp toolchain tools; do \
|
||||
ln -sf $(GLUON_ORIGOPENWRTDIR)/$$link $(GLUON_OPENWRTDIR); \
|
||||
done
|
||||
+$(GLUONMAKE_EARLY) feeds
|
||||
@ -302,7 +302,7 @@ enable_initscripts: FORCE
|
||||
|
||||
|
||||
# Generate package list
|
||||
$(eval $(call merge-lists,INSTALL_PACKAGES,DEFAULT_PACKAGES $(PROFILE)_PACKAGES GLUON_DEFAULT_PACKAGES GLUON_SITE_PACKAGES GLUON_$(PROFILE)_DEFAULT_PACKAGES GLUON_$(PROFILE)_SITE_PACKAGES))
|
||||
$(eval $(call merge-lists,INSTALL_PACKAGES,DEFAULT_PACKAGES GLUON_DEFAULT_PACKAGES GLUON_SITE_PACKAGES GLUON_$(PROFILE)_DEFAULT_PACKAGES GLUON_$(PROFILE)_SITE_PACKAGES))
|
||||
|
||||
package_install: FORCE
|
||||
$(OPKG) update
|
||||
@ -314,12 +314,25 @@ package_install: FORCE
|
||||
|
||||
rm -f $(TARGET_DIR)/usr/lib/opkg/lists/* $(TARGET_DIR)/tmp/opkg.lock
|
||||
|
||||
ifeq ($(GLUON_OPKG_CONFIG),1)
|
||||
include $(INCLUDE_DIR)/version.mk
|
||||
endif
|
||||
|
||||
opkg_config: FORCE
|
||||
cp $(GLUON_OPENWRTDIR)/package/system/opkg/files/opkg.conf $(TARGET_DIR)/etc/opkg.conf
|
||||
for d in base luci packages routing telephony management oldpackages; do \
|
||||
echo "src/gz %n_$$d %U/$$d" >> $(TARGET_DIR)/etc/opkg.conf; \
|
||||
done
|
||||
$(VERSION_SED) $(TARGET_DIR)/etc/opkg.conf
|
||||
|
||||
|
||||
image: FORCE
|
||||
rm -rf $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(PROFILE_KDIR)
|
||||
mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(TARGET_DIR)/tmp $(GLUON_IMAGEDIR)/factory $(GLUON_IMAGEDIR)/sysupgrade
|
||||
cp -r $(BOARD_KDIR) $(PROFILE_KDIR)
|
||||
|
||||
+$(GLUONMAKE) package_install
|
||||
+$(GLUONMAKE) opkg_config GLUON_OPKG_CONFIG=1
|
||||
|
||||
$(call Image/mkfs/prepare)
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -C $(TOPDIR)/target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 IMG_PREFIX=gluon \
|
||||
|
@ -6,6 +6,15 @@ If you're new to Gluon and ready to get your feet wet, have a look at the
|
||||
|
||||
**Gluon IRC channel: `#gluon` in [hackint](http://hackint.org/)**
|
||||
|
||||
## Use a release!
|
||||
|
||||
Please refrain from using the master branch for anything else but development purposes!
|
||||
Use the most recent release instead. You can list all relaseses by running `git branch -a`
|
||||
and switch to one by running `git checkout v2014.3;make update`.
|
||||
|
||||
If you're using the autoupdater, do not autoupdate nodes with anything but releases.
|
||||
If you upgrade using random master commits the nodes *will break* eventually.
|
||||
|
||||
## Mailinglist (mostly for announcements)
|
||||
|
||||
I can handle administrative requests automatically. Please
|
||||
|
92
docs/dev/configmode.rst
Normal file
92
docs/dev/configmode.rst
Normal file
@ -0,0 +1,92 @@
|
||||
Config Mode
|
||||
===========
|
||||
|
||||
As of 2014.4 `gluon-config-mode` consists of several modules.
|
||||
|
||||
gluon-config-mode-core
|
||||
This modules provides the core functionality for the config mode.
|
||||
All modules must depend on it.
|
||||
|
||||
gluon-config-mode-hostname
|
||||
Provides a hostname field.
|
||||
|
||||
gluon-config-mode-autoupdater
|
||||
Informs whether the autoupdater is enabled.
|
||||
|
||||
gluon-config-mode-mesh-vpn
|
||||
Allows toggling of mesh-vpn-fastd and setting a bandwidth limit.
|
||||
|
||||
gluon-config-mode-geo-location
|
||||
Enables the user to set the geographical location of the node.
|
||||
|
||||
gluon-config-mode-contact-info
|
||||
Adds a field where the user can provide contact information.
|
||||
|
||||
In order to get a config mode close to the one found in 2014.3.x you may add
|
||||
these modules to your `site.mk`:
|
||||
gluon-config-mode-hostname,
|
||||
gluon-config-mode-autoupdater,
|
||||
gluon-config-mode-mesh-vpn,
|
||||
gluon-config-mode-geo-location,
|
||||
gluon-config-mode-contact-info
|
||||
|
||||
Writing Config Mode Modules
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Config mode modules are located at `/lib/gluon/config-mode/wizard` and
|
||||
`/lib/gluon/config-mode/reboot`. Modules are named like `0000-name.lua` and
|
||||
are executed in lexical order. If you take the standard set of modules, the
|
||||
order is, for wizard modules:
|
||||
|
||||
- 0050-autoupdater-info
|
||||
- 0100-hostname
|
||||
- 0300-mesh-vpn
|
||||
- 0400-geo-location
|
||||
- 0500-contact-info
|
||||
|
||||
While for reboot modules it is:
|
||||
|
||||
- 0100-mesh-vpn
|
||||
- 0900-msg-reboot
|
||||
|
||||
Wizards
|
||||
-------
|
||||
|
||||
Wizard modules return a UCI section. A simple module capable of changing the
|
||||
hostname might look like this::
|
||||
|
||||
local cbi = require "luci.cbi"
|
||||
local uci = luci.model.uci.cursor()
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.section(form)
|
||||
local s = form:section(cbi.SimpleSection, nil, nil)
|
||||
local o = s:option(cbi.Value, "_hostname", "Hostname")
|
||||
o.value = uci:get_first("system", "system", "hostname")
|
||||
o.rmempty = false
|
||||
o.datatype = "hostname"
|
||||
end
|
||||
|
||||
function M.handle(data)
|
||||
uci:set("system", uci:get_first("system", "system"), "hostname", data._hostname)
|
||||
uci:save("system")
|
||||
uci:commit("system")
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reboot page
|
||||
-----------
|
||||
|
||||
Reboot modules return a function that will be called when the page is to be
|
||||
rendered or nil (i.e. the module is skipped)::
|
||||
|
||||
if no_hello_world_today then
|
||||
return nil
|
||||
else
|
||||
return function ()
|
||||
luci.template.render_string("Hello World!")
|
||||
end
|
||||
end
|
||||
|
102
docs/dev/hardware.rst
Normal file
102
docs/dev/hardware.rst
Normal file
@ -0,0 +1,102 @@
|
||||
Adding support for new hardware
|
||||
===============================
|
||||
This page will give a short overview on how to add support
|
||||
for new hardware to Gluon.
|
||||
|
||||
Hardware requirements
|
||||
---------------------
|
||||
Having an ath9k (or ath10k) based WLAN adapter is highly recommended,
|
||||
although other chipsets may also work. VAP (multiple SSID) support
|
||||
is a requirement. At the moment, Gluon's scripts can't handle devices
|
||||
without WLAN adapters (although such environments may also be interesting,
|
||||
e.g. for automated testing in virtual machines).
|
||||
|
||||
.. _hardware-adding-profiles:
|
||||
|
||||
Adding profiles
|
||||
---------------
|
||||
The vast majority of devices with ath9k WLAN uses the ar71xx target of OpenWrt.
|
||||
If the hardware you want to add support for is also ar71xx, adding a new profile
|
||||
is enough.
|
||||
|
||||
Profiles are defined in ``targets/<target>-<subtarget>/profiles.mk``. There are two macros
|
||||
used to define which images are generated: ``GluonProfile`` and ``GluonModel``. The following examples
|
||||
are taken from ``profiles.mk`` of the ``ar71xx-generic`` target::
|
||||
|
||||
$(eval $(call GluonProfile,TLWR1043))
|
||||
$(eval $(call GluonModel,TLWR1043,tl-wr1043nd-v1-squashfs,tp-link-tl-wr1043n-nd-v1))
|
||||
$(eval $(call GluonModel,TLWR1043,tl-wr1043nd-v2-squashfs,tp-link-tl-wr1043n-nd-v2))
|
||||
|
||||
The ``GluonProfile`` macro takes at least one parameter, the profile name as it is
|
||||
defined in the Makefiles of OpenWrt (``openwrt/target/linux/<target>/<subtarget>/profiles/*``
|
||||
and ``openwrt/target/linux/<target>/image/Makefile``). If the target you are on doesn't define
|
||||
profiles (e.g. on x86), just add a single profile called ``Generic`` or similar.
|
||||
|
||||
It may optionally take a second parameter which defines additional packages to include for the profile
|
||||
(e.g. ath10k). The additional packages defined in ``openwrt/target/linux/<target>/<subtarget>/profiles/*``
|
||||
aren't used.
|
||||
|
||||
The ``GluonModel`` macro takes three parameters: The profile name, the suffix of the image file
|
||||
generated by OpenWrt (without the file extension), and the final image name of the Gluon image.
|
||||
The final image name must be the same that is returned by the following command.
|
||||
|
||||
::
|
||||
|
||||
lua -e 'print(require("platform_info").get_image_name())'
|
||||
|
||||
|
||||
This is just for the autoupdater can work. The command has to be executed _on_ the target (eg. the hardware router with a flashed image). So you'll first have to build an image with a guessed name, and afterwards build a new, correctly named image. On targets which aren't supported by the autoupdater,
|
||||
``require("platform_info").get_image_name()`` will just return ``nil`` and the final image name
|
||||
may be defined arbitrarily.
|
||||
|
||||
On devices with multiple WLAN adapters, care must also be taken that the primary MAC address is
|
||||
configured correctly. ``/lib/gluon/core/sysconfig/primary_mac`` should contain the MAC address which
|
||||
can be found on a label on most hardware; if it does not, ``/lib/gluon/upgrade/core/initial/001-sysconfig``
|
||||
in ``gluon-core`` might need a fix. (There have also been cases in which the address was incorrect
|
||||
even on devices with only one WLAN adapter, in these cases an OpenWrt bug was the cause).
|
||||
|
||||
Adding support for new hardware targets
|
||||
---------------------------------------
|
||||
Adding a new target is much more complex than adding a new profile. There are two basic steps
|
||||
required for adding a new target:
|
||||
|
||||
Adjust packages
|
||||
'''''''''''''''
|
||||
One package that definitely needs adjustments for every new target added is ``lua-platform-info``. Just
|
||||
start with a copy of an existing platform info script, adjust it for the new target, and add the new target
|
||||
to the list of supported targets in the package Makefile.
|
||||
|
||||
On many targets, Gluon's network setup scripts (mainly in the packages ``gluon-core`` and ``gluon-mesh-batman-adv-core``)
|
||||
won't run correctly without some adjustments, so better double check that everything is fine there (and the files
|
||||
``primary_mac``, ``lan_ifname`` and ``wan_ifname`` in ``/lib/gluon/core/sysconfig/`` contain sensible values).
|
||||
|
||||
Add support to the build system
|
||||
'''''''''''''''''''''''''''''''
|
||||
A directory for the new target must be created under ``targets``, and it must be added
|
||||
to ``targets/targets.mk``. In the new target directory, four files must be created:
|
||||
|
||||
* config
|
||||
* kernel-config
|
||||
* kernel-vermagic
|
||||
* profiles.mk
|
||||
|
||||
The file ``config`` can be used to add additional, target-specific options to the OpenWrt config. If such options
|
||||
aren't necessary, it can be left empty. For ``profiles.mk``, see :ref:`hardware-adding-profiles`.
|
||||
|
||||
The files ``kernel-config`` and ``kernel-vermagic`` must have the correct content so kernel modules from the upstream repositories
|
||||
can be easily installed. The OpenWrt version a Gluon release is based on is defined by the upstream package repo URL in ``include/gluon.mk``
|
||||
(in the variable ``CONFIG_VERSION_REPO``); at the time this documentation was written, this was ``barrier_breaker/14.07-rc3``; whenever
|
||||
the package repo is updated, all ``kernel-config`` and ``kernel-vermagic`` files must be updated as well.
|
||||
|
||||
The file ``kernel-vermagic`` just contains a hash which is part of the version number of the kernel package. So in the case of ``ar71xx-generic`` on
|
||||
``barrier_breaker/14.07-rc3``, we look in the directory ``https://downloads.openwrt.org/barrier_breaker/14.07-rc3/ar71xx/generic/packages/`` and
|
||||
find that the kernel package is called ``kernel_3.10.49-1-94831e5bcf361d1c03e87a15e152b0e8_ar71xx.ipk``. This makes the ``kernel-vermagic`` the
|
||||
string ``94831e5bcf361d1c03e87a15e152b0e8``.
|
||||
|
||||
For ``kernel-config``, the OpenWrt image builder must be downloaded. Again, for ``ar71xx-generic`` on
|
||||
``barrier_breaker/14.07-rc3``, we download ``OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2``
|
||||
from ``https://downloads.openwrt.org/barrier_breaker/14.07-rc3/ar71xx/generic/``. After unpacking it, we use the file
|
||||
``OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.10.49/.config``
|
||||
as our ``kernel-config``.
|
||||
|
||||
After this, is should be sufficient to call ``make GLUON_TARGET=<target>-<subtarget>`` to build the images for the new target.
|
15
docs/features/authorized-keys.rst
Normal file
15
docs/features/authorized-keys.rst
Normal file
@ -0,0 +1,15 @@
|
||||
Adding SSH public keys
|
||||
======================
|
||||
|
||||
By using the package ``gluon-authorized-keys`` it is possible to add
|
||||
SSH public keys to an image to permit root login.
|
||||
|
||||
If you select this package, add a list of authorized keys to ``site.conf`` like this:::
|
||||
|
||||
{
|
||||
authorized_keys = { 'ssh-rsa AAA.... user1@host',
|
||||
'ssh-rsa AAA.... user2@host },
|
||||
hostname_prefix = ...
|
||||
...
|
||||
|
||||
Existing keys in ``/etc/dropbear/authorized_keys`` will be preserved.
|
@ -69,7 +69,7 @@ These commands can be used on a node.
|
||||
::
|
||||
|
||||
# Update with some probability
|
||||
autoupdate
|
||||
autoupdater
|
||||
|
||||
::
|
||||
|
||||
|
@ -1,15 +1,13 @@
|
||||
Mesh on WAN
|
||||
===========
|
||||
|
||||
It's possible to enable the mesh on the WAN port like this:
|
||||
It's possible to enable the mesh on the WAN port like this::
|
||||
|
||||
::
|
||||
uci set network.mesh_wan.auto=1
|
||||
uci commit
|
||||
|
||||
It may also be disabled again by running:
|
||||
It may also be disabled again by running::
|
||||
|
||||
::
|
||||
uci set network.mesh_wan.auto=0
|
||||
uci commit
|
||||
|
||||
|
28
docs/features/private-wlan.rst
Normal file
28
docs/features/private-wlan.rst
Normal file
@ -0,0 +1,28 @@
|
||||
Private WLAN
|
||||
============
|
||||
|
||||
It is possible to set up a private WLAN that bridges the WAN port and is seperated from the mesh network.
|
||||
Please note that you should not enable ``mesh_on_wan`` simultaneously.
|
||||
|
||||
The private WLAN can be enabled through the config mode if the package ``gluon-luci-private-wifi`` is installed.
|
||||
You may also enable a private WLAN using the command line::
|
||||
|
||||
uci set wireless.wan_radio0=wifi-iface
|
||||
uci set wireless.wan_radio0.device=radio0
|
||||
uci set wireless.wan_radio0.network=wan
|
||||
uci set wireless.wan_radio0.mode=ap
|
||||
uci set wireless.wan_radio0.encryption=psk2
|
||||
uci set wireless.wan_radio0.ssid="$SSID"
|
||||
uci set wireless.wan_radio0.key="$KEY"
|
||||
uci set wireless.wan_radio0.disabled=0
|
||||
uci commit
|
||||
wifi
|
||||
|
||||
Please replace ``$SSID`` by the name of the WLAN and ``$KEY`` by your passphrase (8-63 characters).
|
||||
If you have two radios (e.g. 2.4 and 5 GHz) you need to do this for radio0 and radio1.
|
||||
|
||||
It may also be disabled by running::
|
||||
|
||||
uci set wireless.wan_radio0.disabled=1
|
||||
uci commit
|
||||
wifi
|
@ -13,7 +13,6 @@ User Documentation
|
||||
|
||||
user/getting_started
|
||||
user/site
|
||||
user/builds
|
||||
user/faq
|
||||
|
||||
Features
|
||||
@ -24,8 +23,10 @@ Features
|
||||
|
||||
features/configmode
|
||||
features/autoupdater
|
||||
features/private-wlan
|
||||
features/mesh-on-wan
|
||||
features/announce
|
||||
features/authorized-keys
|
||||
|
||||
Developer Documentation
|
||||
-----------------------
|
||||
@ -34,6 +35,8 @@ Developer Documentation
|
||||
:maxdepth: 2
|
||||
|
||||
dev/basics
|
||||
dev/hardware
|
||||
dev/configmode
|
||||
|
||||
Supported Devices
|
||||
-----------------
|
||||
@ -45,7 +48,7 @@ Supported Devices
|
||||
- TL-WR841N/ND (v3, v5, v7, v8, v9)
|
||||
- TL-WR842N/ND (v1, v2)
|
||||
- TL-WR941N/ND (v2, v3, v4)
|
||||
- TL-WR1043N/ND (v1)
|
||||
- TL-WR1043N/ND (v1, v2)
|
||||
- TL-WDR3500 (v1)
|
||||
- TL-WDR3600 (v1)
|
||||
- TL-WDR4300 (v1)
|
||||
@ -78,6 +81,8 @@ Releases
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
releases/v2014.4
|
||||
releases/v2014.3.1
|
||||
releases/v2014.3
|
||||
|
||||
|
||||
|
40
docs/releases/v2014.3.1.rst
Normal file
40
docs/releases/v2014.3.1.rst
Normal file
@ -0,0 +1,40 @@
|
||||
Gluon 2014.3.1
|
||||
==============
|
||||
|
||||
This is a bugfix release.
|
||||
|
||||
Bugfixes
|
||||
~~~~~~~~
|
||||
|
||||
* gluon-announced zombie process bug
|
||||
|
||||
gluon-announced was creating zombie processes when answering requests, causing issues
|
||||
with the new status page which is currently in development.
|
||||
|
||||
* fastd peers removed from ``site.conf`` weren't removed correctly from the fastd configuration
|
||||
on firmware upgrades
|
||||
* Expert Mode: setting a password will not remove SSH keys anymore
|
||||
* alfred has been updated to 2014.3.0
|
||||
|
||||
We hope this solves the alfred stability issues noted by several people.
|
||||
|
||||
* ``gluon-ebtables-filter-ra-dhcp`` and ``gluon-ebtables-filter-multicast`` have been fixed
|
||||
to allow DHCPv6 to work
|
||||
|
||||
* Another ath9k patch has been added, which might further improve WLAN stability and performance
|
||||
|
||||
New features
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Support for static WAN setups instead of (DHCP/Router Advertisement) has been added;
|
||||
configuration is possible on the port config page of the Expert Mode.
|
||||
|
||||
Site changes
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* ``site.conf``
|
||||
|
||||
- The new boolean option ``fastd_mesh_vpn.enabled`` allows
|
||||
enabling the mesh VPN by default. This value is optional;
|
||||
if it isn't specified, the mesh VPN will be disabled.
|
||||
|
@ -28,7 +28,7 @@ the probability will proportional to the time passed. I.e. the update probabilit
|
||||
and slowly increase to 1 until ``PRIORITY`` days have passed. From then, the probability will be fixed at 1.
|
||||
|
||||
**Note:** For the new update logic to work, a valid NTP server reachable over the mesh (using IPv6) must
|
||||
be configured in ``site.mk``. If the autoupdater is unable to determine the correct time, it will fall back to
|
||||
be configured in ``site.conf``. If the autoupdater is unable to determine the correct time, it will fall back to
|
||||
a behavior similar to the old implementation (i.e. hourly update attempts).
|
||||
|
||||
Seperation of announced data
|
||||
@ -94,7 +94,7 @@ Improved ath9k stability
|
||||
Multiple bugs in the WLAN driver ath9k have been fixed upstream. This should greatly improve the WLAN stability.
|
||||
|
||||
odhcp6c 50 day bug
|
||||
---------------
|
||||
------------------
|
||||
An important update for odhcp6c fixes a bug which caused Gluon nodes to lose their IPv6 addresses on br-client after an uptime
|
||||
of 50 days, making the nodes unable perform automated updates (besides other issues).
|
||||
|
||||
|
39
docs/releases/v2014.4.rst
Normal file
39
docs/releases/v2014.4.rst
Normal file
@ -0,0 +1,39 @@
|
||||
Gluon 2014.4 (In development)
|
||||
=============================
|
||||
|
||||
New hardware support
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
* TP-Link TL-WR1043N/ND v2
|
||||
|
||||
New features
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Modular config mode
|
||||
-------------------
|
||||
|
||||
Bugfixes
|
||||
~~~~~~~~
|
||||
|
||||
Site changes
|
||||
~~~~~~~~~~~~
|
||||
* ``site.conf``
|
||||
|
||||
* ``site.mk``
|
||||
|
||||
- Obsolete packages:
|
||||
|
||||
+ ``gluon-config-mode``
|
||||
+ ``gluon-mesh-batman-adv``
|
||||
|
||||
- Recommended new packages:
|
||||
|
||||
+ ``gluon-config-mode-autoupdater``
|
||||
+ ``gluon-config-mode-hostname``
|
||||
+ ``gluon-config-mode-mesh-vpn``
|
||||
+ ``gluon-config-mode-geo-location``
|
||||
+ ``gluon-config-mode-contact-info``
|
||||
+ ``gluon-mesh-batman-adv-14`` or ``gluon-mesh-batman-adv-15`` (specify this before all other packages in the list)
|
||||
|
||||
Internals
|
||||
~~~~~~~~~
|
||||
* We're on Barrier Breaker now!
|
22
docs/site-example/modules
Normal file
22
docs/site-example/modules
Normal file
@ -0,0 +1,22 @@
|
||||
# This file allows specifying additional repositories to use
|
||||
# when building gluon.
|
||||
#
|
||||
# In most cases, it is not required so don't add it.
|
||||
|
||||
## GLUON_SITE_FEEDS
|
||||
# for each feed name given, add the corresponding PACKAGES_* lines
|
||||
# documented below
|
||||
#GLUON_SITE_FEEDS='my_own_packages'
|
||||
|
||||
## PACKAGES_$feedname_REPO
|
||||
# the git repository from where to clone the package feed
|
||||
#PACKAGES_MY_OWN_PACKAGES_REPO=https://github.com/.../my-own-packages.git
|
||||
|
||||
|
||||
## PACKAGES_$feedname_COMMIT
|
||||
# the version/commit of the git repository to clone
|
||||
#PACKAGES_MY_OWN_PACKAGES_COMMIT=123456789aabcda1a69b04278e4d38f2a3f57e49
|
||||
|
||||
## PACKAGES_$feedname_BRANCH
|
||||
# the branch to check out
|
||||
#PACKAGES_MY_OWN_PACKAGES_BRANCH=my_branch
|
187
docs/site-example/site.conf
Normal file
187
docs/site-example/site.conf
Normal file
@ -0,0 +1,187 @@
|
||||
-- This is an example site configuration for Gluon v2014.4
|
||||
--
|
||||
-- Take a look at the documentation located at
|
||||
-- http://gluon.readthedocs.org/ for details.
|
||||
--
|
||||
-- This configuration will not work as it. You're required to make
|
||||
-- community specific changes to it!
|
||||
{
|
||||
-- Used for generated hostnames, e.g. freifunk-abcdef123456.
|
||||
hostname_prefix = 'freifunk',
|
||||
|
||||
-- Name of the community.
|
||||
site_name = 'Freifunk Lübeck',
|
||||
|
||||
-- Shorthand of the community.
|
||||
site_code = 'ffhl',
|
||||
|
||||
-- Prefixes used within the mesh. Both are required.
|
||||
prefix4 = '10.130.0.0/20',
|
||||
prefix6 = 'fdef:ffc0:3dd7::/64',
|
||||
|
||||
-- Timezone of your community.
|
||||
-- See http://wiki.openwrt.org/doc/uci/system#time.zones
|
||||
timezone = 'CET-1CEST,M3.5.0,M10.5.0/3',
|
||||
|
||||
-- List of NTP servers in your community.
|
||||
-- Must be reachable using IPv6!
|
||||
ntp_servers = {'1.ntp.services.ffhl'},
|
||||
|
||||
-- Wireless regulatory domain of your community.
|
||||
regdom = 'DE',
|
||||
|
||||
-- Wireless configuratoin for 2.4 GHz interfaces.
|
||||
wifi24 = {
|
||||
-- Wireless channel.
|
||||
channel = 1,
|
||||
|
||||
-- ESSID used for client network.
|
||||
ssid = 'luebeck.freifunk.net',
|
||||
|
||||
-- Specifies the channel width in 802.11n and 802.11ac mode.
|
||||
-- Possible values are:
|
||||
-- HT20 (single 20MHz channel),
|
||||
-- HT40- (2x 20MHz channels, secondary below)
|
||||
-- HT40+ (2x 20MHz channels, secondary above)
|
||||
htmode = 'HT20',
|
||||
|
||||
-- Adjust these values!
|
||||
mesh_ssid = 'XX:XX:XX:XX:XX:XX', -- ESSID used for mesh
|
||||
mesh_bssid = 'XX:XX:XX:XX:XX:XX', -- BSSID used for mesh
|
||||
|
||||
-- Bitrate used for multicast/broadcast packets.
|
||||
mesh_mcast_rate = 12000,
|
||||
},
|
||||
|
||||
-- Wireless configuration for 5 GHz interfaces.
|
||||
-- This should be equal to the 2.4 GHz variant, except
|
||||
-- for channel and htmode.
|
||||
wifi5 = {
|
||||
ssid = 'luebeck.freifunk.net',
|
||||
channel = 44,
|
||||
htmode = 'HT20',
|
||||
mesh_ssid = 'XX:XX:XX:XX:XX:XX',
|
||||
mesh_bssid = 'XX:XX:XX:XX:XX:XX',
|
||||
mesh_mcast_rate = 12000,
|
||||
},
|
||||
|
||||
-- The next node feature allows clients to always reach the node it is
|
||||
-- connected to using a known IP address.
|
||||
next_node = {
|
||||
-- anycast IPs of all nodes
|
||||
ip4 = '10.130.0.1',
|
||||
ip6 = 'fdef:ffc0:3dd7::1',
|
||||
|
||||
-- anycast MAC of all nodes
|
||||
mac = '16:41:95:40:f7:dc',
|
||||
},
|
||||
|
||||
-- Refer to http://fastd.readthedocs.org/en/latest/ to better understand
|
||||
-- what these options do.
|
||||
fastd_mesh_vpn = {
|
||||
-- List of crypto-methods to use.
|
||||
methods = {'salsa2012+gmac'},
|
||||
mtu = 1426,
|
||||
backbone = {
|
||||
-- Limit number of connected peers to reduce bandwidth.
|
||||
limit = 2,
|
||||
|
||||
-- List of peers.
|
||||
peers = {
|
||||
burgtor = {
|
||||
key = '657af03e36ff1b8bbe5a5134982a4f110c8523a9a63293870caf548916a95a03',
|
||||
|
||||
-- This is a list, so you might add multiple entries.
|
||||
remotes = {'ipv4 "burgtor.mesh.ffhl.chaotikum.org" port 10000'},
|
||||
},
|
||||
holstentor = {
|
||||
key = '8c660f7511bf101ea1b599fe53af20e1146cd923c9e9d2a3a0d534ee75af9067',
|
||||
remotes = {'ipv4 "holstentor.mesh.ffhl.chaotikum.org" port 10000'},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
autoupdater = {
|
||||
-- Default branch. Don't forget to set GLUON_BRANCH when building!
|
||||
branch = 'stable',
|
||||
|
||||
-- List of branches. You may define multiple branches.
|
||||
branches = {
|
||||
stable = {
|
||||
name = 'stable',
|
||||
|
||||
-- List of mirrors to fetch images from. IPv6 required!
|
||||
mirrors = {'http://1.updates.services.ffhl/stable/sysupgrade'},
|
||||
|
||||
-- Number of good signatures required.
|
||||
-- Have multiple maintainers sign your build and only
|
||||
-- accept it when a sufficient number of them have
|
||||
-- signed it.
|
||||
good_signatures = 2,
|
||||
|
||||
-- List of public keys of maintainers.
|
||||
pubkeys = {
|
||||
'daa19b44bbd7033965e02088127bad9516ba0fea8f34267a777144a23ec8900c', -- Linus
|
||||
'a8dd60765b07330a4bbfdf8406102befca132881a4b65f3efda32cf2d5b362d9', -- Nils
|
||||
'323bd3285c4e5547a89cd6da1f2aef67f1654b0928bbd5b104efc9dab2156d0b', -- NeoRaider
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Bandwidth limiting
|
||||
simple_tc = {
|
||||
mesh_vpn = {
|
||||
ifname = 'mesh-vpn',
|
||||
|
||||
-- You may enable it by default here.
|
||||
enabled = false,
|
||||
|
||||
-- Default upload limit (kbit/s).
|
||||
limit_egress = 200,
|
||||
|
||||
-- Default download limit (kbit/s).
|
||||
limit_ingress = 3000,
|
||||
},
|
||||
},
|
||||
|
||||
-- These strings are shown in config mode. Some HTML is permissible.
|
||||
--
|
||||
-- msg_welcome: shown at startup
|
||||
-- msg_pubkey: shown when VPN is enabled
|
||||
-- msg_reboot: shown during reboot (after finishing configuration)
|
||||
--
|
||||
-- You may use some variables, e.g.:
|
||||
--
|
||||
-- <%=hostname%> - the node's hostname
|
||||
-- <%=pubkey%> - the fastd public key
|
||||
-- <%=sysconfig.primary_mac%> - the node's primary MAC
|
||||
config_mode = {
|
||||
msg_welcome = [[
|
||||
Willkommen zum Einrichtungsassistenten für deinen neuen Lübecker
|
||||
Freifunk-Knoten. Fülle das folgende Formular deinen Vorstellungen
|
||||
entsprechend aus und sende es ab.
|
||||
]],
|
||||
msg_pubkey = [[
|
||||
Dies ist der öffentliche Schlüssel deines Freifunk-Knotens. Erst nachdem
|
||||
er auf den Servern des Lübecker Freifunk-Projektes eingetragen wurde,
|
||||
kann sich dein Knoten mit dem Lübecker Mesh-VPN zu verbinden. Bitte
|
||||
schicke dazu diesen Schlüssel und den Namen deines Knotens
|
||||
(<em><%=hostname%></em>) an
|
||||
<a href="mailto:keys@luebeck.freifunk.net">keys@luebeck.freifunk.net</a>.
|
||||
]],
|
||||
msg_reboot = [[
|
||||
<p>
|
||||
Dein Knoten startet gerade neu und wird anschließend versuchen,
|
||||
sich anschließend mit anderen Freifunk-Knoten in seiner Nähe zu
|
||||
verbinden. Weitere Informationen zur
|
||||
Lübecker Freifunk-Community findest du auf
|
||||
<a href="https://luebeck.freifunk.net/">unserer Webseite</a>.
|
||||
</p>
|
||||
<p>
|
||||
Viel Spaß mit deinem Knoten und der Erkundung von Freifunk!
|
||||
</p>
|
||||
]],
|
||||
},
|
||||
}
|
50
docs/site-example/site.mk
Normal file
50
docs/site-example/site.mk
Normal file
@ -0,0 +1,50 @@
|
||||
## gluon site.mk makefile example
|
||||
|
||||
## GLUON_SITE_PACKAGES
|
||||
# specify gluon/openwrt packages to include here
|
||||
# The gluon-mesh-batman-adv-* package must come first because of the dependency resolution
|
||||
|
||||
GLUON_SITE_PACKAGES := \
|
||||
gluon-mesh-batman-adv-14 \
|
||||
gluon-alfred \
|
||||
gluon-announced \
|
||||
gluon-autoupdater \
|
||||
gluon-config-mode-hostname \
|
||||
gluon-config-mode-autoupdater \
|
||||
gluon-config-mode-mesh-vpn \
|
||||
gluon-config-mode-geo-location \
|
||||
gluon-config-mode-contact-info \
|
||||
gluon-ebtables-filter-multicast \
|
||||
gluon-ebtables-filter-ra-dhcp \
|
||||
gluon-luci-admin \
|
||||
gluon-luci-autoupdater \
|
||||
gluon-luci-portconfig \
|
||||
gluon-next-node \
|
||||
gluon-mesh-vpn-fastd \
|
||||
gluon-radvd \
|
||||
gluon-status-page \
|
||||
iwinfo \
|
||||
iptables \
|
||||
haveged
|
||||
|
||||
## DEFAULT_GLUON_RELEASE
|
||||
# version string to use for images
|
||||
# gluon relies on
|
||||
# opkg compare-versions "$1" '>>' "$2"
|
||||
# to decide if a version is newer or not.
|
||||
|
||||
DEFAULT_GLUON_RELEASE := 0.4+0-exp$(shell date '+%Y%m%d')
|
||||
|
||||
|
||||
## GLUON_RELEASE
|
||||
# call make with custom GLUON_RELEASE flag, to use your own release version scheme.
|
||||
# e.g.:
|
||||
# $ make images GLUON_RELEASE=23.42+5
|
||||
# would generate images named like this:
|
||||
# gluon-ff%site_code%-23.42+5-%router_model%.bin
|
||||
|
||||
# Allow overriding the release number from the command line
|
||||
GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
|
||||
|
||||
# Default priority for updates.
|
||||
GLUON_PRIORITY ?= 0
|
@ -1,63 +0,0 @@
|
||||
Builds
|
||||
======
|
||||
|
||||
For the build reserve 6GB of disk space. The building requires packages
|
||||
for ``subversion``, ncurses headers (``libncurses-dev``) and zlib headers
|
||||
(``libz-dev``).
|
||||
|
||||
Building Gluon
|
||||
--------------
|
||||
|
||||
To build Gluon, after checking out the repository change to the source root directory to perform the following commands:
|
||||
|
||||
::
|
||||
|
||||
git clone git://github.com/freifunk-gluon/site-ffhl.git site # Get the Freifunk Lübeck site repository - or use your own!
|
||||
make update # Get other repositories used by Gluon
|
||||
make # Build Gluon
|
||||
|
||||
When calling ``make``, the OpenWRT build environment is prepared and updated. To rebuild
|
||||
the images only, just use:
|
||||
|
||||
::
|
||||
|
||||
make images
|
||||
|
||||
The built images can be found in the directory ``images``.
|
||||
|
||||
Cleaning up
|
||||
-----------
|
||||
|
||||
There are three levels of ``make clean``:
|
||||
|
||||
::
|
||||
|
||||
make clean
|
||||
|
||||
will only clean the Gluon-specific files;
|
||||
|
||||
::
|
||||
|
||||
make cleanall
|
||||
|
||||
will also call ``make clean`` on the OpenWRT tree, and
|
||||
|
||||
::
|
||||
|
||||
make dirclean
|
||||
|
||||
will do all this, and call ``make dirclean`` on the OpenWRT tree.
|
||||
|
||||
Environment variables
|
||||
---------------------
|
||||
|
||||
Gluon's build process can be controlled by various environment variables.
|
||||
|
||||
GLUON_SITEDIR
|
||||
Path to the site configuration. Defaults to ``site/``.
|
||||
|
||||
GLUON_IMAGEDIR
|
||||
Path where images will be stored. Defaults to ``images/``.
|
||||
|
||||
GLUON_BUILDDIR
|
||||
Working directory during build. Defaults to ``build/``.
|
@ -1,17 +1,79 @@
|
||||
Getting Started
|
||||
===============
|
||||
|
||||
To build Gluon, after checking out the repository change to the source root directory
|
||||
to perform the following commands:
|
||||
Selecting the right version
|
||||
---------------------------
|
||||
|
||||
Gluon's releases are managed using `Git tags`_. If you're a community getting
|
||||
started with Gluon we recommend to use the latest stable release if Gluon.
|
||||
|
||||
Take a look at the `list of gluon releases`_ and notice the latest release,
|
||||
e.g. *v2014.3*.
|
||||
|
||||
Please keep in mind that a matching site configuration for your community
|
||||
is required. Due to new features being added (or sometimes being removed)
|
||||
the format of the site configuration changes slightly between releases.
|
||||
|
||||
Recent releases (starting with *v2014.3.1*) will come with an example
|
||||
configuration located in *docs/site-example/*.
|
||||
|
||||
.. _Git tags: http://git-scm.com/book/en/Git-Basics-Tagging
|
||||
.. _list of gluon releases: https://github.com/freifunk-gluon/gluon/releases
|
||||
|
||||
Building the image
|
||||
------------------
|
||||
|
||||
.. note:: Make sure you have configured your `Git identity`_.
|
||||
If you neglect this, you'll get strange error messages.
|
||||
|
||||
.. _Git identity: http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup#Your-Identity
|
||||
|
||||
To build Gluon, first check out the repository. Replace *RELEASE* with the
|
||||
version you'd like to checkout, e.g. *v2014.3*.
|
||||
|
||||
::
|
||||
|
||||
git clone git://github.com/freifunk-gluon/site-ffhl.git site # Get the Freifunk Lübeck site repository - or use your own!
|
||||
make update # Get other repositories used by Gluon
|
||||
make # Build Gluon
|
||||
git clone https://github.com/freifunk-gluon/gluon.git gluon -b RELEASE
|
||||
|
||||
When calling make, the OpenWRT build environment is prepared/updated. To rebuild
|
||||
the images only, just use:
|
||||
This command will create a directory named *gluon/*.
|
||||
It might also tell a scary message about being in a *detached state*.
|
||||
**Don't panic!** Everything's fine.
|
||||
Now, enter the freshly created directory:
|
||||
|
||||
::
|
||||
|
||||
cd gluon
|
||||
|
||||
It's time to add (or create) your site configuration.
|
||||
So let's create the directory *site/*:
|
||||
|
||||
::
|
||||
|
||||
mkdir site
|
||||
cd site
|
||||
|
||||
Copy *site.conf* and *site.mk* from *docs/site-example*:
|
||||
|
||||
::
|
||||
|
||||
cp ../docs/site-example/site.conf .
|
||||
cp ../docs/site-example/site.mk .
|
||||
|
||||
.. note:: On **v2014.3**, take both files from
|
||||
https://github.com/freifunk-gluon/gluon/tree/2014.3.x/docs/site-example
|
||||
|
||||
Edit both files to match your community, then go back to the top-level Gluon
|
||||
directory and build Gluon:
|
||||
|
||||
::
|
||||
|
||||
cd ..
|
||||
make update # Get other repositories used by Gluon
|
||||
make # Build Gluon
|
||||
|
||||
When calling make, the OpenWRT build environment is prepared/updated.
|
||||
In case of errors read the messages carefully and try to fix the stated issues (e.g. install tools not available yet).
|
||||
To rebuild the images only, just use:
|
||||
|
||||
::
|
||||
|
||||
@ -42,6 +104,22 @@ will ensure all packages are rebuilt; this is what you normally want to do after
|
||||
will clean the entire tree, so the toolchain will be rebuilt as well, which is
|
||||
not necessary in most cases, and will take a while.
|
||||
|
||||
|
||||
Environment variables
|
||||
---------------------
|
||||
|
||||
Gluon's build process can be controlled by various environment variables.
|
||||
|
||||
GLUON_SITEDIR
|
||||
Path to the site configuration. Defaults to ``site/``.
|
||||
|
||||
GLUON_IMAGEDIR
|
||||
Path where images will be stored. Defaults to ``images/``.
|
||||
|
||||
GLUON_BUILDDIR
|
||||
Working directory during build. Defaults to ``build/``.
|
||||
|
||||
|
||||
So all in all, to update and rebuild a Gluon build tree, the following commands should be used:
|
||||
|
||||
::
|
||||
@ -51,5 +129,3 @@ So all in all, to update and rebuild a Gluon build tree, the following commands
|
||||
make update
|
||||
make clean
|
||||
make
|
||||
|
||||
|
||||
|
@ -188,4 +188,39 @@ GLUON_PRIORITY
|
||||
Examples
|
||||
--------
|
||||
|
||||
An example configuration is maintained at https://github.com/freifunk-gluon/site-example.
|
||||
site.mk
|
||||
^^^^^^^
|
||||
|
||||
.. literalinclude:: ../site-example/site.mk
|
||||
:language: makefile
|
||||
|
||||
site.conf
|
||||
^^^^^^^^^
|
||||
|
||||
.. literalinclude:: ../site-example/site.conf
|
||||
:language: lua
|
||||
|
||||
modules
|
||||
^^^^^^^
|
||||
|
||||
.. literalinclude:: ../site-example/modules
|
||||
:language: makefile
|
||||
|
||||
site-repos in the wild
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This is a non-exhaustive list of site-repos from various communities:
|
||||
|
||||
* `site-ffbs <https://github.com/ffbs/site-ffbs>`_ (Braunschweig)
|
||||
* `site-ffhb <https://github.com/FreifunkBremen/gluon-site-ffhb>`_ (Bremen)
|
||||
* `site-ffhh <https://github.com/freifunkhamburg/site-ffhh>`_ (Hamburg)
|
||||
* `site-ffhgw <https://github.com/lorenzo-greifswald/site-ffhgw>`_ (Greifswald)
|
||||
* `site-ffhl <https://github.com/freifunk-gluon/site-ffhl>`_ (Lübeck)
|
||||
* `site-ffmd <https://github.com/FreifunkMD/site-ffmd>`_ (Magdeburg)
|
||||
* `site-ffmz <https://github.com/freifunk-mwu/site-ffmz>`_ (Mainz, Wiesbaden & Umgebung)
|
||||
* `site-ffm <https://github.com/freifunkMUC/site-ffm>`_ (München)
|
||||
* `site-ffnw <https://git.freifunk-ol.de/root/siteconf.git>`_ (Nordwest)
|
||||
* `site-ffpb <https://git.c3pb.de/freifunk-pb/site-ffpb>`_ (Paderborn)
|
||||
* `site-ffka <https://github.com/ffka/site-ffka>`_ (Karlsruhe)
|
||||
* `site-ffrl <https://github.com/ffrl/sites-ffrl>`_ (Rheinland)
|
||||
* `site-ffs <https://github.com/freifunk-stuttgart/site-ffs>`_ (Stuttgart)
|
||||
|
@ -1,7 +1,7 @@
|
||||
override BuildImage :=
|
||||
override define BuildImage
|
||||
prepare: FORCE
|
||||
$(call Image/Prepare)
|
||||
endef
|
||||
|
||||
# The Makefile included here is $(TOPDIR)/target/linux/$(BOARD)/image/Makefile
|
||||
include Makefile
|
||||
|
||||
prepare: FORCE
|
||||
$(call Image/Prepare)
|
||||
|
@ -1,3 +1,7 @@
|
||||
CONFIG_IMAGEOPT=y
|
||||
# CONFIG_PER_FEED_REPO is not set
|
||||
|
||||
CONFIG_BUSYBOX_CUSTOM=y
|
||||
CONFIG_BUSYBOX_CONFIG_SHA512SUM=y
|
||||
# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
|
||||
CONFIG_BUSYBOX_CONFIG_IP=y
|
||||
@ -11,4 +15,4 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_IP_SHORT_FORMS=y
|
||||
CONFIG_ATH_USER_REGD=y
|
||||
CONFIG_PACKAGE_ATH_DEBUG=y
|
||||
|
||||
CONFIG_PACKAGE_luci-lib-core_srcdiet=y
|
||||
CONFIG_PACKAGE_luci-base_srcdiet=y
|
||||
|
@ -28,7 +28,7 @@ export GLUON_VERSION
|
||||
ifeq ($(OPENWRT_BUILD),1)
|
||||
ifeq ($(GLUON_TOOLS),1)
|
||||
|
||||
CONFIG_VERSION_REPO := $(shell $(GLUONDIR)/scripts/site.sh opkg_repo || echo http://downloads.openwrt.org/attitude_adjustment/12.09/%S/packages)
|
||||
CONFIG_VERSION_REPO := $(shell $(GLUONDIR)/scripts/site.sh opkg_repo || echo http://downloads.openwrt.org/barrier_breaker/14.07/%S/packages)
|
||||
export CONFIG_VERSION_REPO
|
||||
|
||||
GLUON_SITE_CODE := $(shell $(GLUONDIR)/scripts/site.sh site_code)
|
||||
@ -45,7 +45,7 @@ endif
|
||||
|
||||
define merge-lists
|
||||
$(1) :=
|
||||
$(foreach var,$(2),$(1) := $$(sort $$(filter-out -% $$(patsubst -%,%,$$(filter -%,$$($(var)))),$$($(1)) $$($(var))))
|
||||
$(foreach var,$(2),$(1) := $$(filter-out -% $$(patsubst -%,%,$$(filter -%,$$($(var)))),$$($(1)) $$($(var)))
|
||||
)
|
||||
endef
|
||||
|
||||
@ -60,7 +60,7 @@ endef
|
||||
|
||||
regex-escape = $(shell echo '$(1)' | sed -e 's/[]\/()$*.^|[]/\\&/g')
|
||||
|
||||
GLUON_DEFAULT_PACKAGES := gluon-core kmod-ipv6 firewall ip6tables -uboot-envtools -kmod-usb-core -kmod-usb2 -kmod-ledtrig-usbdev
|
||||
GLUON_DEFAULT_PACKAGES := gluon-core kmod-ipv6 firewall ip6tables -uboot-envtools
|
||||
|
||||
override DEFAULT_PACKAGES.router :=
|
||||
|
||||
|
@ -1,15 +1,17 @@
|
||||
# Makefile for OpenWrt
|
||||
#
|
||||
# Copyright (C) 2007-2011 OpenWrt.org
|
||||
# Copyright (C) 2013 Project Gluon
|
||||
# Copyright (C) 2007-2012 OpenWrt.org
|
||||
# Copyright (C) 2013-2014 Project Gluon
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
RELEASE:=Attitude Adjustment
|
||||
RELEASE:=Barrier Breaker
|
||||
PREP_MK= OPENWRT_BUILD= QUIET=0
|
||||
|
||||
export IS_TTY=$(shell tty -s && echo 1 || echo 0)
|
||||
|
||||
include $(GLUONDIR)/include/verbose.mk
|
||||
|
||||
REVISION:=$(shell [ -d $(TOPDIR) ] && cd $(TOPDIR) && ./scripts/getver.sh 2>/dev/null)
|
||||
@ -39,11 +41,24 @@ unexport LPATH
|
||||
# make sure that a predefined CFLAGS variable does not disturb packages
|
||||
export CFLAGS=
|
||||
|
||||
ifneq ($(shell $(HOSTCC) 2>&1 | grep clang),)
|
||||
export HOSTCC_REAL?=$(HOSTCC)
|
||||
export HOSTCC_WRAPPER:=$(TOPDIR)/scripts/clang-gcc-wrapper
|
||||
else
|
||||
export HOSTCC_WRAPPER:=$(HOSTCC)
|
||||
endif
|
||||
|
||||
ifeq ($(FORCE),)
|
||||
.config scripts/config/conf scripts/config/mconf: tmp/.prereq-build
|
||||
endif
|
||||
|
||||
SCAN_COOKIE?=$(shell echo $$$$)
|
||||
export SCAN_COOKIE
|
||||
|
||||
SUBMAKE:=umask 022; $(SUBMAKE)
|
||||
|
||||
ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024 ] || ulimit -n 1024;
|
||||
|
||||
FORCE: ;
|
||||
|
||||
.PHONY: FORCE
|
||||
|
@ -27,6 +27,7 @@ endif
|
||||
ifeq ($(IS_TTY),1)
|
||||
ifneq ($(strip $(NO_COLOR)),1)
|
||||
_Y:=\\033[33m
|
||||
_R:=\\033[31m
|
||||
_N:=\\033[m
|
||||
endif
|
||||
endif
|
||||
@ -36,6 +37,10 @@ ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
|
||||
printf "$(_Y)%s$(_N)\n" "$(1)" >&8
|
||||
endef
|
||||
|
||||
define ERROR_MESSAGE
|
||||
printf "$(_R)%s$(_N)\n" "$(1)" >&8
|
||||
endef
|
||||
|
||||
ifeq ($(QUIET),1)
|
||||
ifneq ($(CURDIR),$(TOPDIR))
|
||||
_DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
|
||||
@ -58,4 +63,5 @@ else
|
||||
define MESSAGE
|
||||
printf "%s\n" "$(1)"
|
||||
endef
|
||||
ERROR_MESSAGE=$(MESSAGE)
|
||||
endif
|
||||
|
18
modules
18
modules
@ -1,16 +1,18 @@
|
||||
GLUON_FEEDS='openwrt gluon routing luci'
|
||||
|
||||
OPENWRT_REPO=git://git.openwrt.org/12.09/openwrt.git
|
||||
OPENWRT_COMMIT=b0a05d4f7c194c7db43c3c5f1818449e4ecfe653
|
||||
OPENWRT_REPO=git://git.openwrt.org/14.07/openwrt.git
|
||||
OPENWRT_COMMIT=58e9eadd67bf5f83b9546395ed68698ca574c6e2
|
||||
|
||||
PACKAGES_OPENWRT_REPO=git://git.openwrt.org/12.09/packages.git
|
||||
PACKAGES_OPENWRT_COMMIT=381bbea65989b63e30f43ab87e51b042325bbff3
|
||||
PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git
|
||||
PACKAGES_OPENWRT_COMMIT=e27831d568f5689602abae58f5ae92f060421ada
|
||||
PACKAGES_OPENWRT_BRANCH=for-14.07
|
||||
|
||||
PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git
|
||||
PACKAGES_GLUON_COMMIT=52e2b9e15993925a6c1f36212132b66be8bd68c6
|
||||
PACKAGES_GLUON_COMMIT=eed0315cd2934eb51efa00a5754ed9553e7550ba
|
||||
|
||||
PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
|
||||
PACKAGES_ROUTING_COMMIT=0e4201a983df967e88e6ce5451f5f5f99bab2370
|
||||
PACKAGES_ROUTING_COMMIT=c08fe48bcd3a38d47387eb6dd8474770847e3b66
|
||||
PACKAGES_ROUTING_BRANCH=for-14.07
|
||||
|
||||
PACKAGES_LUCI_REPO=git://github.com/freifunk-gluon/luci.git
|
||||
PACKAGES_LUCI_COMMIT=bed710786d8a3a63f5908823e6382a51efc91003
|
||||
PACKAGES_LUCI_REPO=git://github.com/openwrt/luci.git
|
||||
PACKAGES_LUCI_COMMIT=f81be49ae756dab82e1758a6c9de145f0d36960e
|
||||
|
@ -1,20 +1,12 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Wed, 7 May 2014 22:57:10 +0200
|
||||
Date: Sat, 26 Jul 2014 06:10:23 +0200
|
||||
Subject: tools/Makefile: fix host tools build dependencies
|
||||
|
||||
diff --git a/tools/Makefile b/tools/Makefile
|
||||
index 6658f8c..26a3fb1 100644
|
||||
index 13bb028..137ad61 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -75,6 +75,7 @@ endif
|
||||
$(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
|
||||
$(curdir)/builddirs-default := $(tools-y)
|
||||
|
||||
+
|
||||
ifndef DUMP_TARGET_DB
|
||||
define PrepareStaging
|
||||
@for dir in $(1); do ( \
|
||||
@@ -86,10 +87,16 @@ define PrepareStaging
|
||||
@@ -97,10 +97,16 @@ define PrepareStaging
|
||||
endef
|
||||
|
||||
# preparatory work
|
||||
@ -31,7 +23,7 @@ index 6658f8c..26a3fb1 100644
|
||||
|
||||
$(STAGING_DIR_HOST)/.prepared: $(TMP_DIR)/.build
|
||||
$(call PrepareStaging,$(STAGING_DIR_HOST))
|
||||
@@ -101,7 +108,7 @@ $(STAGING_DIR_HOST)/.prepared: $(TMP_DIR)/.build
|
||||
@@ -112,7 +118,7 @@ $(STAGING_DIR_HOST)/.prepared: $(TMP_DIR)/.build
|
||||
|
||||
|
||||
define PrepareCommand
|
||||
@ -40,7 +32,7 @@ index 6658f8c..26a3fb1 100644
|
||||
@mkdir -p "$$(dir $$@)"; rm -f "$$@"
|
||||
@export FILE="$$$$(which $(2) 2>/dev/null | grep -v 'not found' | head -n1)"; [ -n "$$$$FILE" ] || { \
|
||||
echo "Command $(1) not found."; false; \
|
||||
@@ -110,7 +117,7 @@ $(STAGING_DIR_HOST)/bin/$(1): $(STAGING_DIR)/.prepared
|
||||
@@ -121,7 +127,7 @@ $(STAGING_DIR_HOST)/bin/$(1): $(STAGING_DIR)/.prepared
|
||||
endef
|
||||
endif
|
||||
|
||||
@ -49,10 +41,10 @@ index 6658f8c..26a3fb1 100644
|
||||
@rm -f $@
|
||||
@if stat --version > /dev/null 2>&1; then \
|
||||
ln -s `which stat` $@; \
|
||||
@@ -128,8 +135,8 @@ $(eval $(call PrepareCommand,seq,gseq seq))
|
||||
$(eval $(call PrepareCommand,python,python2 python))
|
||||
@@ -145,8 +151,8 @@ $(eval $(call PrepareCommand,tar,gtar tar))
|
||||
$(eval $(call PrepareCommand,diff,gdiff diff))
|
||||
|
||||
$(curdir)/cmddeps = $(patsubst %,$(STAGING_DIR_HOST)/bin/%,find md5sum cp stat seq python)
|
||||
$(curdir)/cmddeps = $(patsubst %,$(STAGING_DIR_HOST)/bin/%,md5sum cp stat seq python awk getopt grep tar diff)
|
||||
-$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared $($(curdir)/cmddeps)
|
||||
-$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared $($(curdir)/cmddeps)
|
||||
+$(curdir)//prepare = $(staging_prepared) $(STAGING_DIR_HOST)/.prepared $($(curdir)/cmddeps)
|
||||
|
@ -1,19 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 27 Dec 2013 18:48:19 +0100
|
||||
Subject: Make Unifi images flashable
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index 9ebe486..8e82f7f 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -896,8 +896,8 @@ $(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTAIRROUTER,ubnt-airrouter,UBNT-A
|
||||
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTBULLETM,ubnt-bullet-m,UBNT-BM,ttyS0,115200,XM,XM,ar7240))
|
||||
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTROCKETM,ubnt-rocket-m,UBNT-RM,ttyS0,115200,XM,XM,ar7240))
|
||||
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTNANOM,ubnt-nano-m,UBNT-NM,ttyS0,115200,XM,XM,ar7240))
|
||||
-$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTUNIFI,ubnt-unifi,UBNT-UF,ttyS0,115200,XM,XM,ar7240))
|
||||
-$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTUNIFIOUTDOOR,ubnt-unifi-outdoor,UBNT-U20,ttyS0,115200,XM,XM,ar7240))
|
||||
+$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTUNIFI,ubnt-unifi,UBNT-UF,ttyS0,115200,XM,BZ,ar7240))
|
||||
+$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTUNIFIOUTDOOR,ubnt-unifi-outdoor,UBNT-U20,ttyS0,115200,XM,BZ,ar7240))
|
||||
|
||||
$(eval $(call SingleProfile,WHRHPG300N,$(fs_64k),WHRG301N,whr-g301n,WHR-G301N,ttyS0,115200,$$(whrhpg300n_mtdlayout),WHR-G301N))
|
||||
$(eval $(call SingleProfile,WHRHPG300N,$(fs_64k),WHRHPG300N,whr-hp-g300n,WHR-HP-G300N,ttyS0,115200,$$(whrhpg300n_mtdlayout),WHR-HP-G300N))
|
@ -0,0 +1,107 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Wed, 6 Aug 2014 19:12:00 +0200
|
||||
Subject: procd: add support for alternative rc.d directories
|
||||
|
||||
diff --git a/package/system/procd/patches/0001-Add-support-for-alternative-rc.d-directories.patch b/package/system/procd/patches/0001-Add-support-for-alternative-rc.d-directories.patch
|
||||
new file mode 100644
|
||||
index 0000000..bc24342
|
||||
--- /dev/null
|
||||
+++ b/package/system/procd/patches/0001-Add-support-for-alternative-rc.d-directories.patch
|
||||
@@ -0,0 +1,97 @@
|
||||
+From 03a2bc70e4260ec9f669391c47b9a7a9ecd0b75d Mon Sep 17 00:00:00 2001
|
||||
+Message-Id: <03a2bc70e4260ec9f669391c47b9a7a9ecd0b75d.1407329621.git.mschiffer@universe-factory.net>
|
||||
+From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
+Date: Wed, 6 Aug 2014 14:51:49 +0200
|
||||
+Subject: [PATCH] Add support for alternative rc.d directories
|
||||
+
|
||||
+---
|
||||
+ initd/preinit.c | 38 ++++++++++++++++++++++++++++++++++++++
|
||||
+ rcS.c | 2 +-
|
||||
+ 2 files changed, 39 insertions(+), 1 deletion(-)
|
||||
+
|
||||
+diff --git a/initd/preinit.c b/initd/preinit.c
|
||||
+index fb94527..8b832a7 100644
|
||||
+--- a/initd/preinit.c
|
||||
++++ b/initd/preinit.c
|
||||
+@@ -12,6 +12,8 @@
|
||||
+ * GNU General Public License for more details.
|
||||
+ */
|
||||
+
|
||||
++#define _GNU_SOURCE
|
||||
++
|
||||
+ #include <sys/stat.h>
|
||||
+ #include <sys/types.h>
|
||||
+ #include <sys/mount.h>
|
||||
+@@ -46,6 +48,35 @@ check_dbglvl(void)
|
||||
+ debug = lvl;
|
||||
+ }
|
||||
+
|
||||
++static char*
|
||||
++get_rc_d(void)
|
||||
++{
|
||||
++ size_t n = 0;
|
||||
++ ssize_t len;
|
||||
++ char *ret = NULL;
|
||||
++
|
||||
++ FILE *fp = fopen("/tmp/rc_d_path", "r");
|
||||
++
|
||||
++ if (!fp)
|
||||
++ return NULL;
|
||||
++
|
||||
++ len = getline(&ret, &n, fp);
|
||||
++
|
||||
++ fclose(fp);
|
||||
++
|
||||
++ unlink("/tmp/rc_d_path");
|
||||
++
|
||||
++ if (len <= 0) {
|
||||
++ free(ret);
|
||||
++ return NULL;
|
||||
++ }
|
||||
++
|
||||
++ if (ret[len-1] == '\n')
|
||||
++ ret[len-1] = 0;
|
||||
++
|
||||
++ return ret;
|
||||
++}
|
||||
++
|
||||
+ static void
|
||||
+ spawn_procd(struct uloop_process *proc, int ret)
|
||||
+ {
|
||||
+@@ -53,6 +84,7 @@ spawn_procd(struct uloop_process *proc, int ret)
|
||||
+ char *argv[] = { "/sbin/procd", NULL};
|
||||
+ struct stat s;
|
||||
+ char dbg[2];
|
||||
++ char *rc_d_path;
|
||||
+
|
||||
+ if (plugd_proc.pid > 0)
|
||||
+ kill(plugd_proc.pid, SIGKILL);
|
||||
+@@ -72,6 +104,12 @@ spawn_procd(struct uloop_process *proc, int ret)
|
||||
+ setenv("DBGLVL", dbg, 1);
|
||||
+ }
|
||||
+
|
||||
++ rc_d_path = get_rc_d();
|
||||
++ if (rc_d_path) {
|
||||
++ setenv("RC_D_PATH", rc_d_path, 1);
|
||||
++ free(rc_d_path);
|
||||
++ }
|
||||
++
|
||||
+ execvp(argv[0], argv);
|
||||
+ }
|
||||
+
|
||||
+diff --git a/rcS.c b/rcS.c
|
||||
+index 0e1b0ba..1b00831 100644
|
||||
+--- a/rcS.c
|
||||
++++ b/rcS.c
|
||||
+@@ -150,7 +150,7 @@ int rcS(char *pattern, char *param, void (*q_empty)(struct runqueue *))
|
||||
+ q.empty_cb = q_empty;
|
||||
+ q.max_running_tasks = 1;
|
||||
+
|
||||
+- return _rc(&q, "/etc/rc.d", pattern, "*", param);
|
||||
++ return _rc(&q, getenv("RC_D_PATH") ?: "/etc/rc.d", pattern, "*", param);
|
||||
+ }
|
||||
+
|
||||
+ int rc(const char *file, char *param)
|
||||
+--
|
||||
+2.0.4
|
||||
+
|
@ -1,379 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 11 Jan 2014 11:47:31 +0100
|
||||
Subject: Update netifd and its dependencies from Barrier Breaker (r41888)
|
||||
|
||||
diff --git a/package/libubox/Makefile b/package/libubox/Makefile
|
||||
index bcf4481..6cbfc08 100644
|
||||
--- a/package/libubox/Makefile
|
||||
+++ b/package/libubox/Makefile
|
||||
@@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libubox
|
||||
-PKG_VERSION:=2013-10-19
|
||||
+PKG_VERSION:=2014-07-16
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
-PKG_SOURCE_URL:=git://nbd.name/luci2/libubox.git
|
||||
+PKG_SOURCE_URL:=http://git.openwrt.org/project/libubox.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
-PKG_SOURCE_VERSION:=734d28eb1a46358743cf8837c91e5d46695c3b91
|
||||
+PKG_SOURCE_VERSION:=bd388d2b6c2c151bf513c1e449417d18ce02d10b
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_MD5SUM:=
|
||||
CMAKE_INSTALL:=1
|
||||
@@ -26,6 +26,7 @@ define Package/libubox
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Basic utility library
|
||||
+ ABI_VERSION:=$(PKG_VERSION)
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
@@ -54,6 +55,13 @@ define Package/libjson-script
|
||||
TITLE:=Minimalistic JSON based scripting engine
|
||||
endef
|
||||
|
||||
+define Package/libubox-lua
|
||||
+ SECTION:=libs
|
||||
+ CATEGORY:=Libraries
|
||||
+ DEPENDS:=+libubox +liblua
|
||||
+ TITLE:=Lua binding for the OpenWrt Basic utility library
|
||||
+endef
|
||||
+
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
||||
CMAKE_OPTIONS = \
|
||||
-DLUAPATH=/usr/lib/lua
|
||||
@@ -79,7 +87,13 @@ define Package/libjson-script/install
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so $(1)/lib/
|
||||
endef
|
||||
|
||||
+define Package/libubox-lua/install
|
||||
+ $(INSTALL_DIR) $(1)/usr/lib/lua
|
||||
+ $(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
|
||||
+endef
|
||||
+
|
||||
$(eval $(call BuildPackage,libubox))
|
||||
$(eval $(call BuildPackage,libblobmsg-json))
|
||||
$(eval $(call BuildPackage,jshn))
|
||||
$(eval $(call BuildPackage,libjson-script))
|
||||
+$(eval $(call BuildPackage,libubox-lua))
|
||||
diff --git a/package/netifd/Makefile b/package/netifd/Makefile
|
||||
index 5f2ee03..faf3e09 100644
|
||||
--- a/package/netifd/Makefile
|
||||
+++ b/package/netifd/Makefile
|
||||
@@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netifd
|
||||
-PKG_VERSION:=2013-07-16
|
||||
+PKG_VERSION:=2014-07-29
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
-PKG_SOURCE_URL:=git://nbd.name/luci2/netifd.git
|
||||
+PKG_SOURCE_URL:=http://git.openwrt.org/project/netifd.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
-PKG_SOURCE_VERSION:=2674941b06c1ec67f1aff1bff9212e1372106641
|
||||
+PKG_SOURCE_VERSION:=4bf89afc22b43d5bd155d32d3998348a77179c1a
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||
# PKG_MIRROR_MD5SUM:=
|
||||
@@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/cmake.mk
|
||||
define Package/netifd
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
- DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn
|
||||
+ DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox
|
||||
TITLE:=OpenWrt Network Interface Configuration Daemon
|
||||
endef
|
||||
|
||||
@@ -40,7 +40,7 @@ define Package/netifd/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/
|
||||
$(CP) ./files/* $(1)/
|
||||
- $(CP) $(PKG_BUILD_DIR)/dummy/netifd-proto.sh $(1)/lib/netifd/
|
||||
+ $(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,netifd))
|
||||
diff --git a/package/netifd/files/etc/hotplug.d/iface/00-netstate b/package/netifd/files/etc/hotplug.d/iface/00-netstate
|
||||
index c50cda6..023025c 100644
|
||||
--- a/package/netifd/files/etc/hotplug.d/iface/00-netstate
|
||||
+++ b/package/netifd/files/etc/hotplug.d/iface/00-netstate
|
||||
@@ -1,6 +1,5 @@
|
||||
[ ifup = "$ACTION" ] && {
|
||||
uci_toggle_state network "$INTERFACE" up 1
|
||||
- uci_toggle_state network "$INTERFACE" connect_time $(sed -ne 's![^0-9].*$!!p' /proc/uptime)
|
||||
[ -n "$DEVICE" ] && {
|
||||
uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
|
||||
uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
|
||||
diff --git a/package/netifd/files/lib/netifd/dhcp.script b/package/netifd/files/lib/netifd/dhcp.script
|
||||
index 50163da..db3fc01 100755
|
||||
--- a/package/netifd/files/lib/netifd/dhcp.script
|
||||
+++ b/package/netifd/files/lib/netifd/dhcp.script
|
||||
@@ -33,9 +33,15 @@ setup_interface () {
|
||||
for domain in $domain; do
|
||||
proto_add_dns_search "$domain"
|
||||
done
|
||||
+
|
||||
+ proto_add_data
|
||||
+ [ -n "$ZONE" ] && json_add_string zone "$ZONE"
|
||||
+ proto_close_data
|
||||
+
|
||||
proto_send_update "$INTERFACE"
|
||||
|
||||
- if [ -n "$IFACE6RD" -a -n "$ip6rd" ]; then
|
||||
+
|
||||
+ if [ "$IFACE6RD" != 0 -a -n "$ip6rd" ]; then
|
||||
local v4mask="${ip6rd%% *}"
|
||||
ip6rd="${ip6rd#* }"
|
||||
local ip6rdprefixlen="${ip6rd%% *}"
|
||||
@@ -44,19 +50,24 @@ setup_interface () {
|
||||
ip6rd="${ip6rd#* }"
|
||||
local ip6rdbr="${ip6rd%% *}"
|
||||
|
||||
-uci -q batch <<-EOF >/dev/null
|
||||
-set network.$IFACE6RD.proto=6rd
|
||||
-set network.$IFACE6RD.auto=0
|
||||
-set network.$IFACE6RD.peeraddr=$ip6rdbr
|
||||
-set network.$IFACE6RD.ip4prefixlen=$v4mask
|
||||
-set network.$IFACE6RD.ip6prefix=$ip6rdprefix
|
||||
-set network.$IFACE6RD.ip6prefixlen=$ip6rdprefixlen
|
||||
-commit network
|
||||
-EOF
|
||||
-
|
||||
- ifdown "$IFACE6RD"
|
||||
- /etc/init.d/network reload
|
||||
- ifup "$IFACE6RD"
|
||||
+ [ -n "$ZONE" ] || ZONE=$(fw3 network $INTERFACE)
|
||||
+ [ -z "$IFACE6RD" -o "$IFACE6RD" = 1 ] && IFACE6RD=${INTERFACE}_6rd
|
||||
+
|
||||
+ json_init
|
||||
+ json_add_string name "$IFACE6RD"
|
||||
+ json_add_string ifname "@$INTERFACE"
|
||||
+ json_add_string proto "6rd"
|
||||
+ json_add_string peeraddr "$ip6rdbr"
|
||||
+ json_add_int ip4prefixlen "$v4mask"
|
||||
+ json_add_string ip6prefix "$ip6rdprefix"
|
||||
+ json_add_int ip6prefixlen "$ip6rdprefixlen"
|
||||
+ json_add_string tunlink "$INTERFACE"
|
||||
+ [ -n "$IFACE6RD_DELEGATE" ] && json_add_boolean delegate "$IFACE6RD_DELEGATE"
|
||||
+ [ -n "$ZONE6RD" ] || ZONE6RD=$ZONE
|
||||
+ [ -n "$ZONE6RD" ] && json_add_string zone "$ZONE6RD"
|
||||
+ json_close_object
|
||||
+
|
||||
+ ubus call network add_dynamic "$(json_dump)"
|
||||
fi
|
||||
|
||||
# TODO
|
||||
diff --git a/package/netifd/files/lib/netifd/proto/dhcp.sh b/package/netifd/files/lib/netifd/proto/dhcp.sh
|
||||
index a270c68..b14f7be 100755
|
||||
--- a/package/netifd/files/lib/netifd/proto/dhcp.sh
|
||||
+++ b/package/netifd/files/lib/netifd/proto/dhcp.sh
|
||||
@@ -5,31 +5,44 @@
|
||||
init_proto "$@"
|
||||
|
||||
proto_dhcp_init_config() {
|
||||
- proto_config_add_string "ipaddr"
|
||||
- proto_config_add_string "netmask"
|
||||
- proto_config_add_string "hostname"
|
||||
- proto_config_add_string "clientid"
|
||||
- proto_config_add_string "vendorid"
|
||||
- proto_config_add_boolean "broadcast"
|
||||
- proto_config_add_string "reqopts"
|
||||
- proto_config_add_string "iface6rd"
|
||||
+ renew_handler=1
|
||||
+
|
||||
+ proto_config_add_string 'ipaddr:ipaddr'
|
||||
+ proto_config_add_string 'hostname:hostname'
|
||||
+ proto_config_add_string clientid
|
||||
+ proto_config_add_string vendorid
|
||||
+ proto_config_add_boolean 'broadcast:bool'
|
||||
+ proto_config_add_string 'reqopts:list(string)'
|
||||
+ proto_config_add_string iface6rd
|
||||
+ proto_config_add_string sendopts
|
||||
+ proto_config_add_boolean delegate
|
||||
+ proto_config_add_string zone6rd
|
||||
+ proto_config_add_string zone
|
||||
}
|
||||
|
||||
proto_dhcp_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
- local ipaddr hostname clientid vendorid broadcast reqopts iface6rd
|
||||
- json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd
|
||||
+ local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone
|
||||
+ json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone
|
||||
|
||||
local opt dhcpopts
|
||||
for opt in $reqopts; do
|
||||
append dhcpopts "-O $opt"
|
||||
done
|
||||
|
||||
+ for opt in $sendopts; do
|
||||
+ append dhcpopts "-x $opt"
|
||||
+ done
|
||||
+
|
||||
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
|
||||
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
|
||||
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
|
||||
+ [ -n "$iface6rd" ] && append dhcpopts "-O 212"
|
||||
+ [ -n "$zone6rd" ] && proto_export "ZONE6RD=$zone6rd"
|
||||
+ [ -n "$zone" ] && proto_export "ZONE=$zone"
|
||||
+ [ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
|
||||
|
||||
proto_export "INTERFACE=$config"
|
||||
proto_run_command "$config" udhcpc \
|
||||
@@ -42,10 +55,16 @@ proto_dhcp_setup() {
|
||||
$clientid $broadcast $dhcpopts
|
||||
}
|
||||
|
||||
+proto_dhcp_renew() {
|
||||
+ local interface="$1"
|
||||
+ # SIGUSR1 forces udhcpc to renew its lease
|
||||
+ local sigusr1="$(kill -l SIGUSR1)"
|
||||
+ [ -n "$sigusr1" ] && proto_kill_command "$interface" $sigusr1
|
||||
+}
|
||||
+
|
||||
proto_dhcp_teardown() {
|
||||
local interface="$1"
|
||||
proto_kill_command "$interface"
|
||||
}
|
||||
|
||||
add_protocol dhcp
|
||||
-
|
||||
diff --git a/package/netifd/patches/001-musl_af_inet_include.patch b/package/netifd/patches/001-musl_af_inet_include.patch
|
||||
new file mode 100644
|
||||
index 0000000..510ee05
|
||||
--- /dev/null
|
||||
+++ b/package/netifd/patches/001-musl_af_inet_include.patch
|
||||
@@ -0,0 +1,11 @@
|
||||
+diff -urN netifd-2012-10-29/utils.c netifd-2012-10-29.new/utils.c
|
||||
+--- netifd-2012-10-29/utils.c 2012-11-23 17:15:39.000000000 +0100
|
||||
++++ netifd-2012-10-29.new/utils.c 2012-11-23 17:16:53.409244361 +0100
|
||||
+@@ -17,6 +17,7 @@
|
||||
+
|
||||
+ #include <arpa/inet.h>
|
||||
+ #include <netinet/in.h>
|
||||
++#include <sys/socket.h>
|
||||
+
|
||||
+ void
|
||||
+ __vlist_simple_init(struct vlist_simple_tree *tree, int offset)
|
||||
diff --git a/package/netifd/patches/002-fix_compile_with_old_includes.patch b/package/netifd/patches/002-fix_compile_with_old_includes.patch
|
||||
new file mode 100644
|
||||
index 0000000..361b2d1
|
||||
--- /dev/null
|
||||
+++ b/package/netifd/patches/002-fix_compile_with_old_includes.patch
|
||||
@@ -0,0 +1,34 @@
|
||||
+--- a/system-linux.c
|
||||
++++ b/system-linux.c
|
||||
+@@ -43,6 +43,31 @@
|
||||
+ #define RTN_FAILED_POLICY 12
|
||||
+ #endif
|
||||
+
|
||||
++
|
||||
++#ifndef IFLA_IPTUN_MAX
|
||||
++enum {
|
||||
++ IFLA_IPTUN_UNSPEC,
|
||||
++ IFLA_IPTUN_LINK,
|
||||
++ IFLA_IPTUN_LOCAL,
|
||||
++ IFLA_IPTUN_REMOTE,
|
||||
++ IFLA_IPTUN_TTL,
|
||||
++ IFLA_IPTUN_TOS,
|
||||
++ IFLA_IPTUN_ENCAP_LIMIT,
|
||||
++ IFLA_IPTUN_FLOWINFO,
|
||||
++ IFLA_IPTUN_FLAGS,
|
||||
++ IFLA_IPTUN_PROTO,
|
||||
++ IFLA_IPTUN_PMTUDISC,
|
||||
++ IFLA_IPTUN_6RD_PREFIX,
|
||||
++ IFLA_IPTUN_6RD_RELAY_PREFIX,
|
||||
++ IFLA_IPTUN_6RD_PREFIXLEN,
|
||||
++ IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
|
||||
++ __IFLA_IPTUN_MAX,
|
||||
++};
|
||||
++#define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1)
|
||||
++#endif
|
||||
++
|
||||
++
|
||||
++
|
||||
+ #include <string.h>
|
||||
+ #include <fcntl.h>
|
||||
+ #include <glob.h>
|
||||
diff --git a/package/ubus/Makefile b/package/ubus/Makefile
|
||||
index be18fb5..ba96b3b 100644
|
||||
--- a/package/ubus/Makefile
|
||||
+++ b/package/ubus/Makefile
|
||||
@@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ubus
|
||||
-PKG_VERSION:=2013-08-08
|
||||
+PKG_VERSION:=2014-07-03
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git://nbd.name/luci2/ubus.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
-PKG_SOURCE_VERSION:=b20a8a01c7faea5bcc9d34d10dcf7736589021b8
|
||||
+PKG_SOURCE_VERSION:=f688c7ad0b2435a89bfd13f5496cabf596b54c8f
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_MD5SUM:=
|
||||
CMAKE_INSTALL:=1
|
||||
@@ -38,6 +38,7 @@ define Package/libubus
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=+libubox
|
||||
+ ABI_VERSION:=$(PKG_VERSION)
|
||||
TITLE:=OpenWrt RPC client library
|
||||
endef
|
||||
|
||||
@@ -66,7 +67,7 @@ endef
|
||||
|
||||
define Package/libubus/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/lib/
|
||||
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/lib/
|
||||
endef
|
||||
|
||||
define Package/libubus-lua/install
|
||||
@@ -74,8 +75,7 @@ define Package/libubus-lua/install
|
||||
$(CP) $(PKG_BUILD_DIR)/lua/ubus.so $(1)/usr/lib/lua/
|
||||
endef
|
||||
|
||||
-$(eval $(call BuildPackage,ubus))
|
||||
-$(eval $(call BuildPackage,ubusd))
|
||||
$(eval $(call BuildPackage,libubus))
|
||||
$(eval $(call BuildPackage,libubus-lua))
|
||||
-
|
||||
+$(eval $(call BuildPackage,ubus))
|
||||
+$(eval $(call BuildPackage,ubusd))
|
||||
diff --git a/package/uci/Makefile b/package/uci/Makefile
|
||||
index 54ad80b..29f9ef3 100644
|
||||
--- a/package/uci/Makefile
|
||||
+++ b/package/uci/Makefile
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
-# Copyright (C) 2008-2013 OpenWrt.org
|
||||
+# Copyright (C) 2008-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
-UCI_VERSION=2013-06-11
|
||||
+UCI_VERSION=2014-04-11
|
||||
UCI_RELEASE=1
|
||||
|
||||
PKG_NAME:=uci
|
||||
PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
|
||||
PKG_RELEASE:=1
|
||||
-PKG_REV:=c9c9d5cb085acc58b6579ace83fb79c085a9db27
|
||||
+PKG_REV:=e339407372ffc70b1451e4eda218c01aa95a6a7f
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=git://nbd.name/uci.git
|
@ -0,0 +1,31 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 16 Aug 2014 17:52:34 +0200
|
||||
Subject: ar71xx: correctly detect hardware revision on TP-Link Archer C5 and C7
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
index 1e96b6d..5aceaee 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
@@ -214,6 +214,13 @@ tplink_board_detect() {
|
||||
"934100"*)
|
||||
model="NC-LINK SMART-300"
|
||||
;;
|
||||
+ "c50000"*)
|
||||
+ model="TP-Link Archer C5"
|
||||
+ ;;
|
||||
+ "750000"*|\
|
||||
+ "c70000"*)
|
||||
+ model="TP-Link Archer C7"
|
||||
+ ;;
|
||||
*)
|
||||
hwver=""
|
||||
;;
|
||||
@@ -745,7 +752,7 @@ ar71xx_board_detect() {
|
||||
esac
|
||||
|
||||
case "$machine" in
|
||||
- *TL-WR* | *TL-WA* | *TL-MR* | *TL-WD*)
|
||||
+ *TL-WR* | *TL-WA* | *TL-MR* | *TL-WD* | *Archer*)
|
||||
tplink_board_detect "$machine"
|
||||
;;
|
||||
esac
|
@ -1,283 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 11 Jan 2014 11:47:58 +0100
|
||||
Subject: Update odhcp6c from Barrier Breaker (r41830)
|
||||
|
||||
diff --git a/package/odhcp6c/Makefile b/package/odhcp6c/Makefile
|
||||
index e767064..3ec58e1 100644
|
||||
--- a/package/odhcp6c/Makefile
|
||||
+++ b/package/odhcp6c/Makefile
|
||||
@@ -8,26 +8,55 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=odhcp6c
|
||||
-PKG_VERSION:=2013-10-02
|
||||
-PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
|
||||
+PKG_VERSION:=2014-07-21
|
||||
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=git://github.com/sbyx/odhcp6c.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
-PKG_SOURCE_VERSION:=357ecc1f5163bc7f74c64f4bca387e8d44a2eac5
|
||||
+PKG_SOURCE_VERSION:=67b311ab81736b35858664219d345844ab08fcc7
|
||||
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
+ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_prefix_class),0)
|
||||
+ CMAKE_OPTIONS += -DEXT_PREFIX_CLASS=$(CONFIG_PACKAGE_odhcp6c_ext_prefix_class)
|
||||
+endif
|
||||
+
|
||||
+ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_cer_id),0)
|
||||
+ CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcp6c_ext_cer_id)
|
||||
+endif
|
||||
+
|
||||
+ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_s46),0)
|
||||
+ CMAKE_OPTIONS += -DEXT_S46=$(CONFIG_PACKAGE_odhcp6c_ext_s46)
|
||||
+endif
|
||||
+
|
||||
define Package/odhcp6c
|
||||
- SECTION:=ipv6
|
||||
- CATEGORY:=IPv6
|
||||
+ SECTION:=net
|
||||
+ CATEGORY:=Network
|
||||
TITLE:=Embedded DHCPv6-client for OpenWrt
|
||||
DEPENDS:=+kmod-ipv6
|
||||
endef
|
||||
|
||||
+define Package/odhcp6c/config
|
||||
+ config PACKAGE_odhcp6c_ext_prefix_class
|
||||
+ int "Prefix Class Extension ID (0 = disabled)"
|
||||
+ depends on PACKAGE_odhcp6c
|
||||
+ default 0
|
||||
+
|
||||
+ config PACKAGE_odhcp6c_ext_cer_id
|
||||
+ int "CER-ID Extension ID (0 = disabled)"
|
||||
+ depends on PACKAGE_odhcp6c
|
||||
+ default 0
|
||||
+
|
||||
+ config PACKAGE_odhcp6c_ext_s46
|
||||
+ int "Softwire MAP Extension ID (0 = disabled)"
|
||||
+ depends on PACKAGE_odhcp6c
|
||||
+ default 0
|
||||
+endef
|
||||
+
|
||||
define Package/odhcp6c/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcp6c $(1)/usr/sbin/
|
||||
diff --git a/package/odhcp6c/files/dhcpv6.script b/package/odhcp6c/files/dhcpv6.script
|
||||
index 324a823..8c1ba18 100755
|
||||
--- a/package/odhcp6c/files/dhcpv6.script
|
||||
+++ b/package/odhcp6c/files/dhcpv6.script
|
||||
@@ -64,23 +64,68 @@ setup_interface () {
|
||||
entry="${entry#*,}"
|
||||
local metric="${entry%%,*}"
|
||||
|
||||
- proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
|
||||
+ if [ -z "$SOURCE_ROUTING" -o -z "$gw" ]; then
|
||||
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
|
||||
+ else
|
||||
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "::/128"
|
||||
+ for prefix in $PREFIXES $ADDRESSES; do
|
||||
+ local paddr="${prefix%%,*}"
|
||||
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "$paddr"
|
||||
+ done
|
||||
+ fi
|
||||
done
|
||||
|
||||
+ proto_add_data
|
||||
+ [ -n "$CER" ] && json_add_string cer "$CER"
|
||||
+ [ -n "$PASSTHRU" ] && json_add_string passthru "$PASSTHRU"
|
||||
+ [ -n "$ZONE" ] && json_add_string zone "$ZONE"
|
||||
+ proto_close_data
|
||||
+
|
||||
proto_send_update "$INTERFACE"
|
||||
|
||||
- if [ -n "$AFTR_IP " -a -n "$IFACE_DSLITE" ]; then
|
||||
-uci -q batch <<-EOF >/dev/null
|
||||
-set network.$IFACE_DSLITE.proto=dslite
|
||||
-set network.$IFACE_DSLITE.auto=0
|
||||
-set network.$IFACE_DSLITE.peeraddr=$AFTR_IP
|
||||
-set network.$IFACE_DSLITE.tunlink=$INTERFACE
|
||||
-commit network
|
||||
-EOF
|
||||
-
|
||||
- ifdown "$IFACE_DSLITE"
|
||||
- /etc/init.d/network reload
|
||||
- ifup "$IFACE_DSLITE"
|
||||
+ MAPTYPE=""
|
||||
+ MAPRULE=""
|
||||
+
|
||||
+ if [ -n "$MAPE" -a -f /lib/netifd/proto/map.sh ]; then
|
||||
+ MAPTYPE="map-e"
|
||||
+ MAPRULE="$MAPE"
|
||||
+ elif [ -n "$MAPT" -a -f /lib/netifd/proto/map.sh -a -f /proc/net/nat46/control ]; then
|
||||
+ MAPTYPE="map-t"
|
||||
+ MAPRULE="$MAPT"
|
||||
+ elif [ -n "$LW4O6" -a -f /lib/netifd/proto/map.sh ]; then
|
||||
+ MAPTYPE="lw4o6"
|
||||
+ MAPRULE="$LW4O6"
|
||||
+ fi
|
||||
+
|
||||
+ [ -n "$ZONE" ] || ZONE=$(fw3 network $INTERFACE)
|
||||
+
|
||||
+ if [ "$IFACE_MAP" != 0 -a -n "$MAPTYPE" -a -n "$MAPRULE" ]; then
|
||||
+ [ -z "$IFACE_MAP" -o "$IFACE_MAP" = 1 ] && IFACE_MAP=${INTERFACE}_map
|
||||
+ json_init
|
||||
+ json_add_string name "$IFACE_MAP"
|
||||
+ json_add_string ifname "@$INTERFACE"
|
||||
+ json_add_string proto map
|
||||
+ json_add_string type "$MAPTYPE"
|
||||
+ json_add_string rule "$MAPRULE"
|
||||
+ json_add_string tunlink "$INTERFACE"
|
||||
+ [ -n "$ZONE_MAP" ] || ZONE_MAP=$ZONE
|
||||
+ [ -n "$ZONE_MAP" ] && json_add_string zone "$ZONE_MAP"
|
||||
+ [ -n "$IFACE_MAP_DELEGATE" ] && json_add_boolean delegate "$IFACE_MAP_DELEGATE"
|
||||
+ json_close_object
|
||||
+ ubus call network add_dynamic "$(json_dump)"
|
||||
+ elif [ -n "$AFTR_IP " -a "$IFACE_DSLITE" != 0 -a -f /lib/netifd/proto/dslite.sh ]; then
|
||||
+ [ -z "$IFACE_DSLITE" -o "$IFACE_DSLITE" = 1 ] && IFACE_DSLITE=${INTERFACE}_dslite
|
||||
+ json_init
|
||||
+ json_add_string name "$IFACE_DSLITE"
|
||||
+ json_add_string ifname "@$INTERFACE"
|
||||
+ json_add_string proto "dslite"
|
||||
+ json_add_string peeraddr "$AFTR_IP"
|
||||
+ json_add_string tunlink "$INTERFACE"
|
||||
+ [ -n "$ZONE_DSLITE" ] || ZONE_DSLITE=$ZONE
|
||||
+ [ -n "$ZONE_DSLITE" ] && json_add_string zone "$ZONE_DSLITE"
|
||||
+ [ -n "$IFACE_DSLITE_DELEGATE" ] && json_add_boolean delegate "$IFACE_DSLITE_DELEGATE"
|
||||
+ json_close_object
|
||||
+ ubus call network add_dynamic "$(json_dump)"
|
||||
fi
|
||||
|
||||
# TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN
|
||||
diff --git a/package/odhcp6c/files/dhcpv6.sh b/package/odhcp6c/files/dhcpv6.sh
|
||||
index bf6cd9a..0690bd1 100755
|
||||
--- a/package/odhcp6c/files/dhcpv6.sh
|
||||
+++ b/package/odhcp6c/files/dhcpv6.sh
|
||||
@@ -5,23 +5,35 @@
|
||||
init_proto "$@"
|
||||
|
||||
proto_dhcpv6_init_config() {
|
||||
- proto_config_add_string "reqaddress"
|
||||
- proto_config_add_string "reqprefix"
|
||||
- proto_config_add_string "clientid"
|
||||
- proto_config_add_string "reqopts"
|
||||
- proto_config_add_string "noslaaconly"
|
||||
- proto_config_add_string "norelease"
|
||||
- proto_config_add_string "ip6prefix"
|
||||
- proto_config_add_string "iface_dslite"
|
||||
- proto_config_add_string "ifaceid"
|
||||
+ renew_handler=1
|
||||
+
|
||||
+ proto_config_add_string 'reqaddress:or("try","force","none")'
|
||||
+ proto_config_add_string 'reqprefix:or("auto","no",range(0, 64))'
|
||||
+ proto_config_add_string clientid
|
||||
+ proto_config_add_string 'reqopts:list(uinteger)'
|
||||
+ proto_config_add_string 'noslaaconly:bool'
|
||||
+ proto_config_add_string 'forceprefix:bool'
|
||||
+ proto_config_add_string 'norelease:bool'
|
||||
+ proto_config_add_string 'ip6prefix:ip6addr'
|
||||
+ proto_config_add_string iface_dslite
|
||||
+ proto_config_add_string zone_dslite
|
||||
+ proto_config_add_string iface_map
|
||||
+ proto_config_add_string zone_map
|
||||
+ proto_config_add_string zone
|
||||
+ proto_config_add_string 'ifaceid:ip6addr'
|
||||
+ proto_config_add_string 'sourcerouting:bool'
|
||||
+ proto_config_add_string "userclass"
|
||||
+ proto_config_add_string "vendorclass"
|
||||
+ proto_config_add_boolean delegate
|
||||
+ proto_config_add_int "soltimeout"
|
||||
}
|
||||
|
||||
proto_dhcpv6_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
- local reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix iface_dslite ifaceid
|
||||
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix iface_dslite ifaceid
|
||||
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map ifaceid sourcerouting userclass vendorclass delegate zone_dslite zone_map zone soltimeout
|
||||
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map ifaceid sourcerouting userclass vendorclass delegate zone_dslite zone_map zone soltimeout
|
||||
|
||||
|
||||
# Configure
|
||||
@@ -35,16 +47,31 @@ proto_dhcpv6_setup() {
|
||||
|
||||
[ "$noslaaconly" = "1" ] && append opts "-S"
|
||||
|
||||
+ [ "$forceprefix" = "1" ] && append opts "-F"
|
||||
+
|
||||
[ "$norelease" = "1" ] && append opts "-k"
|
||||
|
||||
[ -n "$ifaceid" ] && append opts "-i$ifaceid"
|
||||
|
||||
+ [ -n "$vendorclass" ] && append opts "-V$vendorclass"
|
||||
+
|
||||
+ [ -n "$userclass" ] && append opts "-u$userclass"
|
||||
+
|
||||
for opt in $reqopts; do
|
||||
append opts "-r$opt"
|
||||
done
|
||||
|
||||
+ append opts "-t${soltimeout:-120}"
|
||||
+
|
||||
[ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix"
|
||||
[ -n "$iface_dslite" ] && proto_export "IFACE_DSLITE=$iface_dslite"
|
||||
+ [ -n "$iface_map" ] && proto_export "IFACE_MAP=$iface_map"
|
||||
+ [ "$sourcerouting" != "0" ] && proto_export "SOURCE_ROUTING=1"
|
||||
+ [ "$delegate" = "0" ] && proto_export "IFACE_DSLITE_DELEGATE=0"
|
||||
+ [ "$delegate" = "0" ] && proto_export "IFACE_MAP_DELEGATE=0"
|
||||
+ [ -n "$zone_dslite" ] && proto_export "ZONE_DSLITE=$zone_dslite"
|
||||
+ [ -n "$zone_map" ] && proto_export "ZONE_MAP=$zone_map"
|
||||
+ [ -n "$zone" ] && proto_export "ZONE=$zone"
|
||||
|
||||
proto_export "INTERFACE=$config"
|
||||
proto_run_command "$config" odhcp6c \
|
||||
@@ -52,6 +79,13 @@ proto_dhcpv6_setup() {
|
||||
$opts $iface
|
||||
}
|
||||
|
||||
+proto_dhcpv6_renew() {
|
||||
+ local interface="$1"
|
||||
+ # SIGUSR1 forces odhcp6c to renew its lease
|
||||
+ local sigusr1="$(kill -l SIGUSR1)"
|
||||
+ [ -n "$sigusr1" ] && proto_kill_command "$interface" $sigusr1
|
||||
+}
|
||||
+
|
||||
proto_dhcpv6_teardown() {
|
||||
local interface="$1"
|
||||
proto_kill_command "$interface"
|
||||
diff --git a/package/odhcp6c/patches/001-fix-integer-overflow-after-50-days.patch b/package/odhcp6c/patches/001-fix-integer-overflow-after-50-days.patch
|
||||
deleted file mode 100644
|
||||
index 292d023..0000000
|
||||
--- a/package/odhcp6c/patches/001-fix-integer-overflow-after-50-days.patch
|
||||
+++ /dev/null
|
||||
@@ -1,25 +0,0 @@
|
||||
-From 5b98f902f616bd9b96a2128587bc6995555a43c1 Mon Sep 17 00:00:00 2001
|
||||
-From: Steven Barth <steven@midlink.org>
|
||||
-Date: Fri, 7 Mar 2014 10:33:49 +0100
|
||||
-Subject: [PATCH] fix integer overflow after 50 days (thx Hauke Mehrtens)
|
||||
-
|
||||
----
|
||||
- src/odhcp6c.c | 2 +-
|
||||
- 1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
-
|
||||
-diff --git a/src/odhcp6c.c b/src/odhcp6c.c
|
||||
-index 3c6b3b0..ba11ced 100644
|
||||
---- a/src/odhcp6c.c
|
||||
-+++ b/src/odhcp6c.c
|
||||
-@@ -470,7 +470,7 @@ uint64_t odhcp6c_get_milli_time(void)
|
||||
- {
|
||||
- struct timespec t = {0, 0};
|
||||
- syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &t);
|
||||
-- return t.tv_sec * 1000 + t.tv_nsec / 1000000;
|
||||
-+ return ((uint64_t)t.tv_sec) * 1000 + ((uint64_t)t.tv_nsec) / 1000000;
|
||||
- }
|
||||
-
|
||||
-
|
||||
---
|
||||
-1.7.10.4
|
||||
-
|
@ -0,0 +1,26 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 13 Nov 2014 01:17:24 +0100
|
||||
Subject: odhcp6c: always accept RDNSS, independent of the default router lifetime
|
||||
|
||||
diff --git a/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch b/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch
|
||||
new file mode 100644
|
||||
index 0000000..ae4e18d
|
||||
--- /dev/null
|
||||
+++ b/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch
|
||||
@@ -0,0 +1,16 @@
|
||||
+--- a/src/ra.c
|
||||
++++ b/src/ra.c
|
||||
+@@ -409,13 +409,6 @@ bool ra_process(void)
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+-
|
||||
+- size_t ra_dns_len;
|
||||
+- struct odhcp6c_entry *entry = odhcp6c_get_state(STATE_RA_DNS, &ra_dns_len);
|
||||
+- for (size_t i = 0; i < ra_dns_len / sizeof(*entry); ++i)
|
||||
+- if (IN6_ARE_ADDR_EQUAL(&entry[i].router, &from.sin6_addr) &&
|
||||
+- entry[i].valid > router_valid)
|
||||
+- entry[i].valid = router_valid;
|
||||
+ }
|
||||
+
|
||||
+ if (found)
|
@ -1,22 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 11 Jan 2014 13:31:13 +0100
|
||||
Subject: package/base-files: change sysctl handling
|
||||
|
||||
Add hotplug script that applies interface specific sysctls for interfaces that
|
||||
only appear later - this allows to reliably configure per-interface parameters
|
||||
in sysctl.conf, e.g. to disable ipv6 autoconfig on a specific iface.
|
||||
|
||||
Cherry-picked from Barrier Breaker
|
||||
|
||||
diff --git a/package/base-files/files/etc/hotplug.d/net/00-sysctl b/package/base-files/files/etc/hotplug.d/net/00-sysctl
|
||||
new file mode 100644
|
||||
index 0000000..5d9da8a
|
||||
--- /dev/null
|
||||
+++ b/package/base-files/files/etc/hotplug.d/net/00-sysctl
|
||||
@@ -0,0 +1,6 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
|
||||
+ sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
|
||||
+ sysctl -e -p - | logger -t sysctl
|
||||
+fi
|
@ -1,39 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 11 Jan 2014 17:08:59 +0100
|
||||
Subject: Fix ping6 sender address
|
||||
|
||||
diff --git a/package/busybox/patches/960-ping6_sender_address.patch b/package/busybox/patches/960-ping6_sender_address.patch
|
||||
new file mode 100644
|
||||
index 0000000..7c56a6d
|
||||
--- /dev/null
|
||||
+++ b/package/busybox/patches/960-ping6_sender_address.patch
|
||||
@@ -0,0 +1,29 @@
|
||||
+--- a/networking/ping.c
|
||||
++++ b/networking/ping.c
|
||||
+@@ -638,7 +638,7 @@ static void unpack4(char *buf, int sz, s
|
||||
+ }
|
||||
+ }
|
||||
+ #if ENABLE_PING6
|
||||
+-static void unpack6(char *packet, int sz, /*struct sockaddr_in6 *from,*/ int hoplimit)
|
||||
++static void unpack6(char *packet, int sz, struct sockaddr_in6 *from, int hoplimit)
|
||||
+ {
|
||||
+ struct icmp6_hdr *icmppkt;
|
||||
+ char buf[INET6_ADDRSTRLEN];
|
||||
+@@ -658,7 +658,7 @@ static void unpack6(char *packet, int sz
|
||||
+ if (sz >= sizeof(struct icmp6_hdr) + sizeof(uint32_t))
|
||||
+ tp = (uint32_t *) &icmppkt->icmp6_data8[4];
|
||||
+ unpack_tail(sz, tp,
|
||||
+- inet_ntop(AF_INET6, &pingaddr.sin6.sin6_addr,
|
||||
++ inet_ntop(AF_INET6, &from->sin6_addr,
|
||||
+ buf, sizeof(buf)),
|
||||
+ recv_seq, hoplimit);
|
||||
+ } else if (icmppkt->icmp6_type != ICMP6_ECHO_REQUEST) {
|
||||
+@@ -808,7 +808,7 @@ static void ping6(len_and_sockaddr *lsa)
|
||||
+ move_from_unaligned_int(hoplimit, CMSG_DATA(mp));
|
||||
+ }
|
||||
+ }
|
||||
+- unpack6(G.rcv_packet, c, /*&from,*/ hoplimit);
|
||||
++ unpack6(G.rcv_packet, c, &from, hoplimit);
|
||||
+ if (pingcount && nreceived >= pingcount)
|
||||
+ break;
|
||||
+ }
|
@ -1,246 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Fri, 1 Feb 2013 15:50:29 +0000
|
||||
Subject: ar71xx: add kernel support for the TL-WDR3500 board
|
||||
|
||||
WDR3500 is similar to WDR3600 except it doesn't have gigabit ethernet,
|
||||
and has only 1 USB port.
|
||||
|
||||
Pending issues:
|
||||
|
||||
* Leds are not working at all (except power and wlan_5g)
|
||||
* LAN switch ethernet ports are reversed with respect to case label.
|
||||
|
||||
[Label] -> soft device
|
||||
[LAN1] -> eth0.4
|
||||
[LAN2] -> eth0.3
|
||||
[LAN3] -> eth0.2
|
||||
[LAN4] -> eth0.1
|
||||
|
||||
Based on http://patchwork.openwrt.org/patch/3208/
|
||||
|
||||
Thanks-to: Paul Fertser <fercerpav@gmail.com>
|
||||
Signed-off-by: Gui Iribarren <gui@altermundi.net>
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35423 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
Conflicts:
|
||||
target/linux/ar71xx/config-3.7
|
||||
|
||||
diff --git a/target/linux/ar71xx/config-3.3 b/target/linux/ar71xx/config-3.3
|
||||
index 446f202..dfc5bf2 100644
|
||||
--- a/target/linux/ar71xx/config-3.3
|
||||
+++ b/target/linux/ar71xx/config-3.3
|
||||
@@ -60,6 +60,7 @@ CONFIG_ATH79_MACH_TL_MR3020=y
|
||||
CONFIG_ATH79_MACH_TL_MR3X20=y
|
||||
CONFIG_ATH79_MACH_TL_WA901ND=y
|
||||
CONFIG_ATH79_MACH_TL_WA901ND_V2=y
|
||||
+CONFIG_ATH79_MACH_TL_WDR3500=y
|
||||
CONFIG_ATH79_MACH_TL_WDR4300=y
|
||||
CONFIG_ATH79_MACH_TL_WR1041N_V2=y
|
||||
CONFIG_ATH79_MACH_TL_WR1043ND=y
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
new file mode 100644
|
||||
index 0000000..05fe83d
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
@@ -0,0 +1,153 @@
|
||||
+/*
|
||||
+ * TP-LINK TL-WDR3500 board support
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
|
||||
+ * Copyright (C) 2013 Gui Iribarren <gui@altermundi.net>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 as published
|
||||
+ * by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/pci.h>
|
||||
+#include <linux/phy.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/ath9k_platform.h>
|
||||
+#include <linux/ar8216_platform.h>
|
||||
+
|
||||
+#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
+
|
||||
+#include "common.h"
|
||||
+#include "dev-ap9x-pci.h"
|
||||
+#include "dev-eth.h"
|
||||
+#include "dev-gpio-buttons.h"
|
||||
+#include "dev-leds-gpio.h"
|
||||
+#include "dev-m25p80.h"
|
||||
+#include "dev-spi.h"
|
||||
+#include "dev-usb.h"
|
||||
+#include "dev-wmac.h"
|
||||
+#include "machtypes.h"
|
||||
+
|
||||
+#define WDR3500_GPIO_LED_USB1 11
|
||||
+#define WDR3500_GPIO_LED_WLAN2G 13
|
||||
+#define WDR3500_GPIO_LED_SYSTEM 14
|
||||
+#define WDR3500_GPIO_LED_QSS 15
|
||||
+
|
||||
+#define WDR3500_GPIO_BTN_WPS 16
|
||||
+#define WDR3500_GPIO_BTN_RFKILL 17
|
||||
+
|
||||
+#define WDR3500_GPIO_USB1_POWER 22
|
||||
+
|
||||
+#define WDR3500_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||
+#define WDR3500_KEYS_DEBOUNCE_INTERVAL (3 * WDR3500_KEYS_POLL_INTERVAL)
|
||||
+
|
||||
+#define WDR3500_MAC0_OFFSET 0
|
||||
+#define WDR3500_MAC1_OFFSET 6
|
||||
+#define WDR3500_WMAC_CALDATA_OFFSET 0x1000
|
||||
+#define WDR3500_PCIE_CALDATA_OFFSET 0x5000
|
||||
+
|
||||
+static const char *wdr3500_part_probes[] = {
|
||||
+ "tp-link",
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static struct flash_platform_data wdr3500_flash_data = {
|
||||
+ .part_probes = wdr3500_part_probes,
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led wdr3500_leds_gpio[] __initdata = {
|
||||
+ {
|
||||
+ .name = "tp-link:green:qss",
|
||||
+ .gpio = WDR3500_GPIO_LED_QSS,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:green:system",
|
||||
+ .gpio = WDR3500_GPIO_LED_SYSTEM,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:green:usb1",
|
||||
+ .gpio = WDR3500_GPIO_LED_USB1,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:green:wlan2g",
|
||||
+ .gpio = WDR3500_GPIO_LED_WLAN2G,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_keys_button wdr3500_gpio_keys[] __initdata = {
|
||||
+ {
|
||||
+ .desc = "QSS button",
|
||||
+ .type = EV_KEY,
|
||||
+ .code = KEY_WPS_BUTTON,
|
||||
+ .debounce_interval = WDR3500_KEYS_DEBOUNCE_INTERVAL,
|
||||
+ .gpio = WDR3500_GPIO_BTN_WPS,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .desc = "RFKILL switch",
|
||||
+ .type = EV_SW,
|
||||
+ .code = KEY_RFKILL,
|
||||
+ .debounce_interval = WDR3500_KEYS_DEBOUNCE_INTERVAL,
|
||||
+ .gpio = WDR3500_GPIO_BTN_RFKILL,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static void __init wdr3500_setup(void)
|
||||
+{
|
||||
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
|
||||
+ u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
|
||||
+ u8 tmpmac[ETH_ALEN];
|
||||
+
|
||||
+ ath79_register_m25p80(&wdr3500_flash_data);
|
||||
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(wdr3500_leds_gpio),
|
||||
+ wdr3500_leds_gpio);
|
||||
+ ath79_register_gpio_keys_polled(-1, WDR3500_KEYS_POLL_INTERVAL,
|
||||
+ ARRAY_SIZE(wdr3500_gpio_keys),
|
||||
+ wdr3500_gpio_keys);
|
||||
+
|
||||
+ ath79_init_mac(tmpmac, mac, 0);
|
||||
+ ath79_register_wmac(art + WDR3500_WMAC_CALDATA_OFFSET, tmpmac);
|
||||
+
|
||||
+ ath79_init_mac(tmpmac, mac, 1);
|
||||
+ ap9x_pci_setup_wmac_led_pin(0, 0);
|
||||
+ ap91_pci_init(art + WDR3500_PCIE_CALDATA_OFFSET, tmpmac);
|
||||
+
|
||||
+ ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_ONLY_MODE);
|
||||
+
|
||||
+ ath79_register_mdio(1, 0x0);
|
||||
+
|
||||
+ /* LAN */
|
||||
+ ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
|
||||
+
|
||||
+ /* GMAC1 is connected to the internal switch */
|
||||
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
|
||||
+
|
||||
+ ath79_register_eth(1);
|
||||
+
|
||||
+ /* WAN */
|
||||
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac, 2);
|
||||
+
|
||||
+ /* GMAC0 is connected to the PHY4 of the internal switch */
|
||||
+ ath79_switch_data.phy4_mii_en = 1;
|
||||
+ ath79_switch_data.phy_poll_mask = BIT(4);
|
||||
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
|
||||
+ ath79_eth0_data.phy_mask = BIT(4);
|
||||
+ ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev;
|
||||
+
|
||||
+ ath79_register_eth(0);
|
||||
+
|
||||
+ gpio_request_one(WDR3500_GPIO_USB1_POWER,
|
||||
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||
+ "USB1 power");
|
||||
+ ath79_register_usb();
|
||||
+}
|
||||
+
|
||||
+MIPS_MACHINE(ATH79_MACH_TL_WDR3500, "TL-WDR3500",
|
||||
+ "TP-LINK TL-WDR3500",
|
||||
+ wdr3500_setup);
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch
|
||||
new file mode 100644
|
||||
index 0000000..0a2c3bd
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch
|
||||
@@ -0,0 +1,40 @@
|
||||
+--- a/arch/mips/ath79/machtypes.h
|
||||
++++ b/arch/mips/ath79/machtypes.h
|
||||
+@@ -84,6 +84,7 @@ enum ath79_mach_type {
|
||||
+ ATH79_MACH_TL_WA7510N_V1, /* TP-LINK TL-WA7510N v1*/
|
||||
+ ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
|
||||
+ ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
|
||||
++ ATH79_MACH_TL_WDR3500, /* TP-LINK TL-WDR3500 */
|
||||
+ ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */
|
||||
+ ATH79_MACH_TL_WR1041N_V2, /* TP-LINK TL-WR1041N v2 */
|
||||
+ ATH79_MACH_TL_WR1043ND, /* TP-LINK TL-WR1043ND */
|
||||
+--- a/arch/mips/ath79/Kconfig
|
||||
++++ b/arch/mips/ath79/Kconfig
|
||||
+@@ -514,6 +514,17 @@ config ATH79_MACH_TL_WA901ND_V2
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
++config ATH79_MACH_TL_WDR3500
|
||||
++ bool "TP-LINK TL-WDR3500 board support"
|
||||
++ select SOC_AR934X
|
||||
++ select ATH79_DEV_AP9X_PCI if PCI
|
||||
++ select ATH79_DEV_ETH
|
||||
++ select ATH79_DEV_GPIO_BUTTONS
|
||||
++ select ATH79_DEV_LEDS_GPIO
|
||||
++ select ATH79_DEV_M25P80
|
||||
++ select ATH79_DEV_USB
|
||||
++ select ATH79_DEV_WMAC
|
||||
++
|
||||
+ config ATH79_MACH_TL_WDR4300
|
||||
+ bool "TP-LINK TL-WDR3600/4300/4310 board support"
|
||||
+ select SOC_AR934X
|
||||
+--- a/arch/mips/ath79/Makefile
|
||||
++++ b/arch/mips/ath79/Makefile
|
||||
+@@ -81,6 +81,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR3020) += ma
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_MR3X20) += mach-tl-mr3x20.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o
|
||||
++obj-$(CONFIG_ATH79_MACH_TL_WDR3500) += mach-tl-wdr3500.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WR741ND) += mach-tl-wr741nd.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WR741ND_V4) += mach-tl-wr741nd-v4.o
|
@ -1,48 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Fri, 1 Feb 2013 15:50:32 +0000
|
||||
Subject: ar71xx: add user-space support for TL-WDR3500 board
|
||||
|
||||
Based on http://patchwork.openwrt.org/patch/3208/
|
||||
|
||||
Thanks-to: Paul Fertser <fercerpav@gmail.com>
|
||||
Signed-off-by: Gui Iribarren <gui@altermundi.net>
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35424 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
index fe7c910..8d71352 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
@@ -123,6 +123,9 @@ tplink_board_detect() {
|
||||
"342000"*)
|
||||
model="TP-Link TL-MR3420"
|
||||
;;
|
||||
+ "350000"*)
|
||||
+ model="TP-Link TL-WDR3500"
|
||||
+ ;;
|
||||
"360000"*)
|
||||
model="TP-Link TL-WDR3600"
|
||||
;;
|
||||
@@ -357,6 +360,9 @@ ar71xx_board_detect() {
|
||||
*"TL-WA901ND v2")
|
||||
name="tl-wa901nd-v2"
|
||||
;;
|
||||
+ *"TL-WDR3500")
|
||||
+ name="tl-wdr3500"
|
||||
+ ;;
|
||||
*"TL-WDR3600/4300/4310")
|
||||
name="tl-wdr4300"
|
||||
;;
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
index 49b1de9..e52ad9e 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
@@ -155,6 +155,7 @@ platform_check_image() {
|
||||
tl-wa7510n | \
|
||||
tl-wa901nd | \
|
||||
tl-wa901nd-v2 | \
|
||||
+ tl-wdr3500 | \
|
||||
tl-wdr4300 | \
|
||||
tl-wr703n | \
|
||||
tl-wr741nd | \
|
@ -1,55 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Fri, 1 Feb 2013 15:50:34 +0000
|
||||
Subject: ar71xx: build image for the TL-WDR3500 board
|
||||
|
||||
Based on http://patchwork.openwrt.org/patch/3208/
|
||||
|
||||
Thanks-to: Paul Fertser <fercerpav@gmail.com>
|
||||
Signed-off-by: Gui Iribarren <gui@altermundi.net>
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35425 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
Conflicts:
|
||||
target/linux/ar71xx/image/Makefile
|
||||
|
||||
diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk
|
||||
index 07d7059..3d7859c 100644
|
||||
--- a/target/linux/ar71xx/generic/profiles/tp-link.mk
|
||||
+++ b/target/linux/ar71xx/generic/profiles/tp-link.mk
|
||||
@@ -105,12 +105,12 @@ $(eval $(call Profile,TLWA901))
|
||||
|
||||
|
||||
define Profile/TLWDR4300
|
||||
- NAME:=TP-LINK TL-WDR3600/4300/4310
|
||||
+ NAME:=TP-LINK TL-WDR3500/3600/4300/4310
|
||||
PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
|
||||
endef
|
||||
|
||||
define Profile/TLWDR4300/Description
|
||||
- Package set optimized for the TP-LINK TL-WDR3600/4300/4310.
|
||||
+ Package set optimized for the TP-LINK TL-WDR3500/3600/4300/4310.
|
||||
endef
|
||||
$(eval $(call Profile,TLWDR4300))
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index 8e82f7f..01d1e67 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -881,6 +881,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-wr741nd-v4,TL
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))
|
||||
+$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR3500V1,tl-wdr3500-v1,TL-WDR3500,ttyS0,115200,0x35000001,1,8Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR3600V1,tl-wdr3600-v1,TL-WDR4300,ttyS0,115200,0x36000001,1,8Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR4300V1,tl-wdr4300-v1,TL-WDR4300,ttyS0,115200,0x43000001,1,8Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR4310V1,tl-wdr4310-v1,TL-WDR4300,ttyS0,115200,0x43100001,1,8Mlzma))
|
||||
@@ -925,7 +926,7 @@ $(eval $(call MultiProfile,TLWR740,TLWR740NV1 TLWR740NV3 TLWR740NV4))
|
||||
$(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4))
|
||||
$(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8))
|
||||
$(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4))
|
||||
-$(eval $(call MultiProfile,TLWDR4300,TLWDR3600V1 TLWDR4300V1 TLWDR4310V1))
|
||||
+$(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4310V1))
|
||||
$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTUNIFI UBNTUNIFIOUTDOOR))
|
||||
$(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDRMAC WNDRMACV2))
|
||||
$(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
|
@ -1,23 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sun, 24 Mar 2013 19:23:36 +0000
|
||||
Subject: ar71xx: add default switch configuration for the TL-WDR3500
|
||||
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36116 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
Conflicts:
|
||||
target/linux/ar71xx/base-files/etc/uci-defaults/02_network
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
index 7fa219d..a36036f 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
@@ -188,6 +188,7 @@ tew-632brp |\
|
||||
tew-712br |\
|
||||
tl-mr3220 |\
|
||||
tl-mr3420 |\
|
||||
+tl-wdr3500 |\
|
||||
tl-wr741nd |\
|
||||
tl-wr741nd-v4 |\
|
||||
tl-wr841n-v7 |\
|
@ -1,20 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sun, 24 Mar 2013 19:23:43 +0000
|
||||
Subject: ar71xx: add diag support for the TL-WDR3500
|
||||
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36117 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
index 416322d..b206438 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
@@ -129,6 +129,7 @@ get_status_led() {
|
||||
tl-mr3420 | \
|
||||
tl-wa901nd | \
|
||||
tl-wa901nd-v2 | \
|
||||
+ tl-wdr3500 | \
|
||||
tl-wr1041n-v2 | \
|
||||
tl-wr1043nd | \
|
||||
tl-wr741nd | \
|
@ -1,53 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sun, 24 Mar 2013 19:23:45 +0000
|
||||
Subject: ar71xx: remove numeric suffix of the TL-WDR3500 USB LED
|
||||
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36118 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
index 05fe83d..785b21f 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "dev-wmac.h"
|
||||
#include "machtypes.h"
|
||||
|
||||
-#define WDR3500_GPIO_LED_USB1 11
|
||||
+#define WDR3500_GPIO_LED_USB 11
|
||||
#define WDR3500_GPIO_LED_WLAN2G 13
|
||||
#define WDR3500_GPIO_LED_SYSTEM 14
|
||||
#define WDR3500_GPIO_LED_QSS 15
|
||||
@@ -37,7 +37,7 @@
|
||||
#define WDR3500_GPIO_BTN_WPS 16
|
||||
#define WDR3500_GPIO_BTN_RFKILL 17
|
||||
|
||||
-#define WDR3500_GPIO_USB1_POWER 22
|
||||
+#define WDR3500_GPIO_USB_POWER 22
|
||||
|
||||
#define WDR3500_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||
#define WDR3500_KEYS_DEBOUNCE_INTERVAL (3 * WDR3500_KEYS_POLL_INTERVAL)
|
||||
@@ -68,8 +68,8 @@ static struct gpio_led wdr3500_leds_gpio[] __initdata = {
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
- .name = "tp-link:green:usb1",
|
||||
- .gpio = WDR3500_GPIO_LED_USB1,
|
||||
+ .name = "tp-link:green:usb",
|
||||
+ .gpio = WDR3500_GPIO_LED_USB,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
@@ -142,9 +142,9 @@ static void __init wdr3500_setup(void)
|
||||
|
||||
ath79_register_eth(0);
|
||||
|
||||
- gpio_request_one(WDR3500_GPIO_USB1_POWER,
|
||||
+ gpio_request_one(WDR3500_GPIO_USB_POWER,
|
||||
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||
- "USB1 power");
|
||||
+ "USB power");
|
||||
ath79_register_usb();
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sun, 24 Mar 2013 19:23:47 +0000
|
||||
Subject: ar71xx: fix USB power GPIO on the TL-WDR3500
|
||||
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36119 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
index 785b21f..5020ba4 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
@@ -37,7 +37,7 @@
|
||||
#define WDR3500_GPIO_BTN_WPS 16
|
||||
#define WDR3500_GPIO_BTN_RFKILL 17
|
||||
|
||||
-#define WDR3500_GPIO_USB_POWER 22
|
||||
+#define WDR3500_GPIO_USB_POWER 12
|
||||
|
||||
#define WDR3500_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||
#define WDR3500_KEYS_DEBOUNCE_INTERVAL (3 * WDR3500_KEYS_POLL_INTERVAL)
|
@ -1,27 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sun, 24 Mar 2013 21:07:21 +0000
|
||||
Subject: ar71xx: add default LED configuration for the WL-WRD3500
|
||||
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36120 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
Conflicts:
|
||||
target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/leds b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
index 7be4ce9..48b8154 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
@@ -126,6 +126,11 @@ tl-wa901nd-v2)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
;;
|
||||
|
||||
+tl-wdr3500)
|
||||
+ ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
|
||||
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:green:wlan2g" "phy0tpt"
|
||||
+ ;;
|
||||
+
|
||||
tl-wdr4300)
|
||||
ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1.1"
|
||||
ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "1-1.2"
|
@ -1,42 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Mon, 25 Mar 2013 06:40:03 +0000
|
||||
Subject: ar71xx: fix ethernet LEDs on the TL-WDR3500
|
||||
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36122 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
index 5020ba4..452c20b 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c
|
||||
@@ -33,6 +33,11 @@
|
||||
#define WDR3500_GPIO_LED_WLAN2G 13
|
||||
#define WDR3500_GPIO_LED_SYSTEM 14
|
||||
#define WDR3500_GPIO_LED_QSS 15
|
||||
+#define WDR3500_GPIO_LED_WAN 18
|
||||
+#define WDR3500_GPIO_LED_LAN1 19
|
||||
+#define WDR3500_GPIO_LED_LAN2 20
|
||||
+#define WDR3500_GPIO_LED_LAN3 21
|
||||
+#define WDR3500_GPIO_LED_LAN4 22
|
||||
|
||||
#define WDR3500_GPIO_BTN_WPS 16
|
||||
#define WDR3500_GPIO_BTN_RFKILL 17
|
||||
@@ -146,6 +151,17 @@ static void __init wdr3500_setup(void)
|
||||
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||
"USB power");
|
||||
ath79_register_usb();
|
||||
+
|
||||
+ ath79_gpio_output_select(WDR3500_GPIO_LED_LAN1,
|
||||
+ AR934X_GPIO_OUT_LED_LINK3);
|
||||
+ ath79_gpio_output_select(WDR3500_GPIO_LED_LAN2,
|
||||
+ AR934X_GPIO_OUT_LED_LINK2);
|
||||
+ ath79_gpio_output_select(WDR3500_GPIO_LED_LAN3,
|
||||
+ AR934X_GPIO_OUT_LED_LINK1);
|
||||
+ ath79_gpio_output_select(WDR3500_GPIO_LED_LAN4,
|
||||
+ AR934X_GPIO_OUT_LED_LINK0);
|
||||
+ ath79_gpio_output_select(WDR3500_GPIO_LED_WAN,
|
||||
+ AR934X_GPIO_OUT_LED_LINK4);
|
||||
}
|
||||
|
||||
MIPS_MACHINE(ATH79_MACH_TL_WDR3500, "TL-WDR3500",
|
@ -1,38 +0,0 @@
|
||||
From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Mon, 25 Mar 2013 06:40:00 +0000
|
||||
Subject: ar71xx: add GPIO output select values for AR934x
|
||||
|
||||
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36121 3c298f89-4303-0410-b956-a3cf2f4a3e73
|
||||
|
||||
Conflicts:
|
||||
target/linux/ar71xx/patches-3.8/601-MIPS-ath79-add-more-register-defines.patch
|
||||
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-3.3/601-MIPS-ath79-add-more-register-defines.patch
|
||||
index 8411d58..12522c1 100644
|
||||
--- a/target/linux/ar71xx/patches-3.3/601-MIPS-ath79-add-more-register-defines.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.3/601-MIPS-ath79-add-more-register-defines.patch
|
||||
@@ -166,7 +166,7 @@
|
||||
#define AR934X_GPIO_REG_FUNC 0x6c
|
||||
|
||||
#define AR71XX_GPIO_COUNT 16
|
||||
-@@ -550,4 +618,139 @@
|
||||
+@@ -550,4 +618,144 @@
|
||||
#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
|
||||
#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
|
||||
|
||||
@@ -237,7 +237,12 @@
|
||||
+#define AR934X_GPIO_FUNC_CLK_OBS0_EN BIT(2)
|
||||
+#define AR934X_GPIO_FUNC_JTAG_DISABLE BIT(1)
|
||||
+
|
||||
-+#define AR934X_GPIO_OUT_GPIO 0x00
|
||||
++#define AR934X_GPIO_OUT_GPIO 0
|
||||
++#define AR934X_GPIO_OUT_LED_LINK0 41
|
||||
++#define AR934X_GPIO_OUT_LED_LINK1 42
|
||||
++#define AR934X_GPIO_OUT_LED_LINK2 43
|
||||
++#define AR934X_GPIO_OUT_LED_LINK3 44
|
||||
++#define AR934X_GPIO_OUT_LED_LINK4 45
|
||||
+
|
||||
+/*
|
||||
+ * MII_CTRL block
|
File diff suppressed because it is too large
Load Diff
@ -1,546 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 29 Mar 2014 21:55:41 +0100
|
||||
Subject: ar71xx: add support for QCA953x SoC
|
||||
|
||||
diff --git a/target/linux/ar71xx/config-3.3 b/target/linux/ar71xx/config-3.3
|
||||
index dfc5bf2..1c3ba3c 100644
|
||||
--- a/target/linux/ar71xx/config-3.3
|
||||
+++ b/target/linux/ar71xx/config-3.3
|
||||
@@ -40,11 +40,11 @@ CONFIG_ATH79_MACH_EW_DORIN=y
|
||||
CONFIG_ATH79_MACH_HORNET_UB=y
|
||||
CONFIG_ATH79_MACH_JA76PF=y
|
||||
CONFIG_ATH79_MACH_JWAP003=y
|
||||
+CONFIG_ATH79_MACH_MR600=y
|
||||
CONFIG_ATH79_MACH_MZK_W04NU=y
|
||||
CONFIG_ATH79_MACH_MZK_W300NH=y
|
||||
CONFIG_ATH79_MACH_NBG460N=y
|
||||
CONFIG_ATH79_MACH_OM2P=y
|
||||
-CONFIG_ATH79_MACH_MR600=y
|
||||
CONFIG_ATH79_MACH_PB42=y
|
||||
CONFIG_ATH79_MACH_PB44=y
|
||||
CONFIG_ATH79_MACH_PB92=y
|
||||
@@ -214,6 +214,7 @@ CONFIG_SOC_AR724X=y
|
||||
CONFIG_SOC_AR913X=y
|
||||
CONFIG_SOC_AR933X=y
|
||||
CONFIG_SOC_AR934X=y
|
||||
+CONFIG_SOC_QCA953X=y
|
||||
CONFIG_SOC_QCA955X=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_AP83=y
|
||||
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 5a0b950..1a9b0df 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
||||
@@ -195,6 +195,7 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask)
|
||||
case ATH79_SOC_AR7241:
|
||||
case ATH79_SOC_AR9330:
|
||||
case ATH79_SOC_AR9331:
|
||||
+ case ATH79_SOC_QCA9533:
|
||||
mdio_dev = &ath79_mdio1_device;
|
||||
mdio_data = &ath79_mdio1_data;
|
||||
break;
|
||||
@@ -250,6 +251,11 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask)
|
||||
}
|
||||
mdio_data->is_ar934x = 1;
|
||||
break;
|
||||
+
|
||||
+ case ATH79_SOC_QCA9533:
|
||||
+ mdio_data->builtin_switch = 1;
|
||||
+ break;
|
||||
+
|
||||
case ATH79_SOC_QCA9558:
|
||||
if (id == 1)
|
||||
mdio_data->builtin_switch = 1;
|
||||
@@ -540,6 +546,7 @@ static void __init ath79_init_eth_pll_data(unsigned int id)
|
||||
case ATH79_SOC_AR9341:
|
||||
case ATH79_SOC_AR9342:
|
||||
case ATH79_SOC_AR9344:
|
||||
+ case ATH79_SOC_QCA9533:
|
||||
case ATH79_SOC_QCA9558:
|
||||
pll_10 = AR934X_PLL_VAL_10;
|
||||
pll_100 = AR934X_PLL_VAL_100;
|
||||
@@ -596,6 +603,7 @@ 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:
|
||||
pdata->phy_if_mode = PHY_INTERFACE_MODE_MII;
|
||||
break;
|
||||
|
||||
@@ -645,6 +653,7 @@ 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:
|
||||
pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII;
|
||||
break;
|
||||
|
||||
@@ -882,6 +891,37 @@ void __init ath79_register_eth(unsigned int id)
|
||||
pdata->fifo_cfg3 = 0x01f00140;
|
||||
break;
|
||||
|
||||
+ case ATH79_SOC_QCA9533:
|
||||
+ if (id == 0) {
|
||||
+ pdata->reset_bit = AR933X_RESET_GE0_MAC |
|
||||
+ AR933X_RESET_GE0_MDIO;
|
||||
+ pdata->set_speed = ath79_set_speed_dummy;
|
||||
+
|
||||
+ pdata->phy_mask = BIT(4);
|
||||
+ } else {
|
||||
+ pdata->reset_bit = AR933X_RESET_GE1_MAC |
|
||||
+ AR933X_RESET_GE1_MDIO;
|
||||
+ pdata->set_speed = ath79_set_speed_dummy;
|
||||
+
|
||||
+ pdata->speed = SPEED_1000;
|
||||
+ pdata->duplex = DUPLEX_FULL;
|
||||
+ pdata->switch_data = &ath79_switch_data;
|
||||
+
|
||||
+ ath79_switch_data.phy_poll_mask |= BIT(4);
|
||||
+ }
|
||||
+
|
||||
+ pdata->ddr_flush = ath79_ddr_no_flush;
|
||||
+ pdata->has_gbit = 1;
|
||||
+ pdata->is_ar724x = 1;
|
||||
+
|
||||
+ if (!pdata->fifo_cfg1)
|
||||
+ pdata->fifo_cfg1 = 0x0010ffff;
|
||||
+ if (!pdata->fifo_cfg2)
|
||||
+ pdata->fifo_cfg2 = 0x015500aa;
|
||||
+ if (!pdata->fifo_cfg3)
|
||||
+ pdata->fifo_cfg3 = 0x01f00140;
|
||||
+ break;
|
||||
+
|
||||
case ATH79_SOC_AR9341:
|
||||
case ATH79_SOC_AR9342:
|
||||
case ATH79_SOC_AR9344:
|
||||
@@ -953,6 +993,7 @@ void __init ath79_register_eth(unsigned int id)
|
||||
case ATH79_SOC_AR7241:
|
||||
case ATH79_SOC_AR9330:
|
||||
case ATH79_SOC_AR9331:
|
||||
+ case ATH79_SOC_QCA9533:
|
||||
pdata->mii_bus_dev = &ath79_mdio1_device.dev;
|
||||
break;
|
||||
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.3/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
||||
new file mode 100644
|
||||
index 0000000..4c9e761
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ar71xx/patches-3.3/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
||||
@@ -0,0 +1,417 @@
|
||||
+From 5300a7cd7ed2f88488ddba62947b9c6bb9663777 Mon Sep 17 00:00:00 2001
|
||||
+Message-Id: <5300a7cd7ed2f88488ddba62947b9c6bb9663777.1396122227.git.mschiffer@universe-factory.net>
|
||||
+From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
+Date: Sat, 29 Mar 2014 20:26:08 +0100
|
||||
+Subject: [PATCH 1/2] MIPS: ath79: add support for QCA953x SoC
|
||||
+
|
||||
+Note that the clock calculation looks very similar to the QCA955x, but actually
|
||||
+some bits' meanings are slightly different.
|
||||
+---
|
||||
+ arch/mips/ath79/Kconfig | 6 +-
|
||||
+ arch/mips/ath79/clock.c | 78 ++++++++++++++++++++++++++
|
||||
+ arch/mips/ath79/common.c | 4 ++
|
||||
+ arch/mips/ath79/dev-common.c | 1 +
|
||||
+ arch/mips/ath79/dev-wmac.c | 20 +++++++
|
||||
+ arch/mips/ath79/early_printk.c | 1 +
|
||||
+ arch/mips/ath79/gpio.c | 4 +-
|
||||
+ arch/mips/ath79/irq.c | 4 ++
|
||||
+ arch/mips/ath79/setup.c | 8 ++-
|
||||
+ arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 48 ++++++++++++++++
|
||||
+ arch/mips/include/asm/mach-ath79/ath79.h | 11 ++++
|
||||
+ 11 files changed, 182 insertions(+), 3 deletions(-)
|
||||
+
|
||||
+--- a/arch/mips/ath79/Kconfig
|
||||
++++ b/arch/mips/ath79/Kconfig
|
||||
+@@ -688,6 +688,10 @@ config SOC_AR934X
|
||||
+ select PCI_AR724X if PCI
|
||||
+ def_bool n
|
||||
+
|
||||
++config SOC_QCA953X
|
||||
++ select USB_ARCH_HAS_EHCI
|
||||
++ def_bool n
|
||||
++
|
||||
+ config SOC_QCA955X
|
||||
+ select USB_ARCH_HAS_EHCI
|
||||
+ select HW_HAS_PCI
|
||||
+@@ -731,7 +735,7 @@ config ATH79_DEV_USB
|
||||
+ def_bool n
|
||||
+
|
||||
+ config ATH79_DEV_WMAC
|
||||
+- depends on (SOC_AR913X || SOC_AR933X || SOC_AR934X || SOC_QCA955X)
|
||||
++ depends on (SOC_AR913X || SOC_AR933X || SOC_AR934X || SOC_QCA953X || SOC_QCA955X)
|
||||
+ def_bool n
|
||||
+
|
||||
+ config ATH79_NVRAM
|
||||
+--- a/arch/mips/ath79/clock.c
|
||||
++++ b/arch/mips/ath79/clock.c
|
||||
+@@ -295,6 +295,82 @@ static void __init ar934x_clocks_init(vo
|
||||
+ iounmap(dpll_base);
|
||||
+ }
|
||||
+
|
||||
++static void __init qca953x_clocks_init(void)
|
||||
++{
|
||||
++ u32 pll, out_div, ref_div, nint, frac, clk_ctrl, postdiv;
|
||||
++ u32 cpu_pll, ddr_pll;
|
||||
++ u32 bootstrap;
|
||||
++
|
||||
++ bootstrap = ath79_reset_rr(QCA953X_RESET_REG_BOOTSTRAP);
|
||||
++ if (bootstrap & QCA953X_BOOTSTRAP_REF_CLK_40)
|
||||
++ ath79_ref_clk.rate = 40 * 1000 * 1000;
|
||||
++ else
|
||||
++ ath79_ref_clk.rate = 25 * 1000 * 1000;
|
||||
++
|
||||
++ pll = ath79_pll_rr(QCA953X_PLL_CPU_CONFIG_REG);
|
||||
++ out_div = (pll >> QCA953X_PLL_CPU_CONFIG_OUTDIV_SHIFT) &
|
||||
++ QCA953X_PLL_CPU_CONFIG_OUTDIV_MASK;
|
||||
++ ref_div = (pll >> QCA953X_PLL_CPU_CONFIG_REFDIV_SHIFT) &
|
||||
++ QCA953X_PLL_CPU_CONFIG_REFDIV_MASK;
|
||||
++ nint = (pll >> QCA953X_PLL_CPU_CONFIG_NINT_SHIFT) &
|
||||
++ QCA953X_PLL_CPU_CONFIG_NINT_MASK;
|
||||
++ frac = (pll >> QCA953X_PLL_CPU_CONFIG_NFRAC_SHIFT) &
|
||||
++ QCA953X_PLL_CPU_CONFIG_NFRAC_MASK;
|
||||
++
|
||||
++ cpu_pll = nint * ath79_ref_clk.rate / ref_div;
|
||||
++ cpu_pll += frac * (ath79_ref_clk.rate >> 6) / ref_div;
|
||||
++ cpu_pll /= (1 << out_div);
|
||||
++
|
||||
++ pll = ath79_pll_rr(QCA953X_PLL_DDR_CONFIG_REG);
|
||||
++ out_div = (pll >> QCA953X_PLL_DDR_CONFIG_OUTDIV_SHIFT) &
|
||||
++ QCA953X_PLL_DDR_CONFIG_OUTDIV_MASK;
|
||||
++ ref_div = (pll >> QCA953X_PLL_DDR_CONFIG_REFDIV_SHIFT) &
|
||||
++ QCA953X_PLL_DDR_CONFIG_REFDIV_MASK;
|
||||
++ nint = (pll >> QCA953X_PLL_DDR_CONFIG_NINT_SHIFT) &
|
||||
++ QCA953X_PLL_DDR_CONFIG_NINT_MASK;
|
||||
++ frac = (pll >> QCA953X_PLL_DDR_CONFIG_NFRAC_SHIFT) &
|
||||
++ QCA953X_PLL_DDR_CONFIG_NFRAC_MASK;
|
||||
++
|
||||
++ ddr_pll = nint * ath79_ref_clk.rate / ref_div;
|
||||
++ ddr_pll += frac * (ath79_ref_clk.rate >> 6) / (ref_div << 4);
|
||||
++ ddr_pll /= (1 << out_div);
|
||||
++
|
||||
++ clk_ctrl = ath79_pll_rr(QCA953X_PLL_CLK_CTRL_REG);
|
||||
++
|
||||
++ postdiv = (clk_ctrl >> QCA953X_PLL_CLK_CTRL_CPU_POST_DIV_SHIFT) &
|
||||
++ QCA953X_PLL_CLK_CTRL_CPU_POST_DIV_MASK;
|
||||
++
|
||||
++ if (clk_ctrl & QCA953X_PLL_CLK_CTRL_CPU_PLL_BYPASS)
|
||||
++ ath79_cpu_clk.rate = ath79_ref_clk.rate;
|
||||
++ else if (clk_ctrl & QCA953X_PLL_CLK_CTRL_CPUCLK_FROM_CPUPLL)
|
||||
++ ath79_cpu_clk.rate = cpu_pll / (postdiv + 1);
|
||||
++ else
|
||||
++ ath79_cpu_clk.rate = ddr_pll / (postdiv + 1);
|
||||
++
|
||||
++ postdiv = (clk_ctrl >> QCA953X_PLL_CLK_CTRL_DDR_POST_DIV_SHIFT) &
|
||||
++ QCA953X_PLL_CLK_CTRL_DDR_POST_DIV_MASK;
|
||||
++
|
||||
++ if (clk_ctrl & QCA953X_PLL_CLK_CTRL_DDR_PLL_BYPASS)
|
||||
++ ath79_ddr_clk.rate = ath79_ref_clk.rate;
|
||||
++ else if (clk_ctrl & QCA953X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL)
|
||||
++ ath79_ddr_clk.rate = ddr_pll / (postdiv + 1);
|
||||
++ else
|
||||
++ ath79_ddr_clk.rate = cpu_pll / (postdiv + 1);
|
||||
++
|
||||
++ postdiv = (clk_ctrl >> QCA953X_PLL_CLK_CTRL_AHB_POST_DIV_SHIFT) &
|
||||
++ QCA953X_PLL_CLK_CTRL_AHB_POST_DIV_MASK;
|
||||
++
|
||||
++ if (clk_ctrl & QCA953X_PLL_CLK_CTRL_AHB_PLL_BYPASS)
|
||||
++ ath79_ahb_clk.rate = ath79_ref_clk.rate;
|
||||
++ else if (clk_ctrl & QCA953X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL)
|
||||
++ ath79_ahb_clk.rate = ddr_pll / (postdiv + 1);
|
||||
++ else
|
||||
++ ath79_ahb_clk.rate = cpu_pll / (postdiv + 1);
|
||||
++
|
||||
++ ath79_wdt_clk.rate = ath79_ref_clk.rate;
|
||||
++ ath79_uart_clk.rate = ath79_ref_clk.rate;
|
||||
++}
|
||||
++
|
||||
+ static void __init qca955x_clocks_init(void)
|
||||
+ {
|
||||
+ u32 pll, out_div, ref_div, nint, frac, clk_ctrl, postdiv;
|
||||
+@@ -383,6 +459,8 @@ void __init ath79_clocks_init(void)
|
||||
+ ar933x_clocks_init();
|
||||
+ else if (soc_is_ar934x())
|
||||
+ ar934x_clocks_init();
|
||||
++ else if (soc_is_qca953x())
|
||||
++ qca953x_clocks_init();
|
||||
+ else if (soc_is_qca955x())
|
||||
+ qca955x_clocks_init();
|
||||
+ else
|
||||
+--- a/arch/mips/ath79/common.c
|
||||
++++ b/arch/mips/ath79/common.c
|
||||
+@@ -74,6 +74,8 @@ void ath79_device_reset_set(u32 mask)
|
||||
+ else if (soc_is_ar934x() ||
|
||||
+ soc_is_qca955x())
|
||||
+ reg = AR934X_RESET_REG_RESET_MODULE;
|
||||
++ else if (soc_is_qca953x())
|
||||
++ reg = QCA953X_RESET_REG_RESET_MODULE;
|
||||
+ else
|
||||
+ BUG();
|
||||
+
|
||||
+@@ -101,6 +103,8 @@ void ath79_device_reset_clear(u32 mask)
|
||||
+ else if (soc_is_ar934x() ||
|
||||
+ soc_is_qca955x())
|
||||
+ reg = AR934X_RESET_REG_RESET_MODULE;
|
||||
++ else if (soc_is_qca953x())
|
||||
++ reg = QCA953X_RESET_REG_RESET_MODULE;
|
||||
+ else
|
||||
+ BUG();
|
||||
+
|
||||
+--- a/arch/mips/ath79/dev-common.c
|
||||
++++ b/arch/mips/ath79/dev-common.c
|
||||
+@@ -100,6 +100,7 @@ void __init ath79_register_uart(void)
|
||||
+ soc_is_ar724x() ||
|
||||
+ soc_is_ar913x() ||
|
||||
+ soc_is_ar934x() ||
|
||||
++ soc_is_qca953x() ||
|
||||
+ soc_is_qca955x()) {
|
||||
+ ath79_uart_data[0].uartclk = clk_get_rate(clk);
|
||||
+ platform_device_register(&ath79_uart_device);
|
||||
+--- a/arch/mips/ath79/dev-wmac.c
|
||||
++++ b/arch/mips/ath79/dev-wmac.c
|
||||
+@@ -99,7 +99,7 @@ static int ar933x_wmac_reset(void)
|
||||
+ return -ETIMEDOUT;
|
||||
+ }
|
||||
+
|
||||
+-static int ar933x_r1_get_wmac_revision(void)
|
||||
++static int ar93xx_get_soc_revision(void)
|
||||
+ {
|
||||
+ return ath79_soc_rev;
|
||||
+ }
|
||||
+@@ -124,7 +124,7 @@ static void __init ar933x_wmac_setup(voi
|
||||
+ ath79_wmac_data.is_clk_25mhz = true;
|
||||
+
|
||||
+ if (ath79_soc_rev == 1)
|
||||
+- ath79_wmac_data.get_mac_revision = ar933x_r1_get_wmac_revision;
|
||||
++ ath79_wmac_data.get_mac_revision = ar93xx_get_soc_revision;
|
||||
+
|
||||
+ ath79_wmac_data.external_reset = ar933x_wmac_reset;
|
||||
+ }
|
||||
+@@ -147,6 +147,26 @@ static void ar934x_wmac_setup(void)
|
||||
+ ath79_wmac_data.is_clk_25mhz = true;
|
||||
+ }
|
||||
+
|
||||
++static void qca953x_wmac_setup(void)
|
||||
++{
|
||||
++ u32 t;
|
||||
++
|
||||
++ ath79_wmac_device.name = "qca953x_wmac";
|
||||
++
|
||||
++ 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_IP2;
|
||||
++ ath79_wmac_resources[1].end = ATH79_CPU_IRQ_IP2;
|
||||
++
|
||||
++ t = ath79_reset_rr(QCA953X_RESET_REG_BOOTSTRAP);
|
||||
++ if (t & QCA953X_BOOTSTRAP_REF_CLK_40)
|
||||
++ ath79_wmac_data.is_clk_25mhz = false;
|
||||
++ else
|
||||
++ ath79_wmac_data.is_clk_25mhz = true;
|
||||
++
|
||||
++ ath79_wmac_data.get_mac_revision = ar93xx_get_soc_revision;
|
||||
++}
|
||||
++
|
||||
+ static void qca955x_wmac_setup(void)
|
||||
+ {
|
||||
+ u32 t;
|
||||
+@@ -314,6 +334,8 @@ void __init ath79_register_wmac(u8 *cal_
|
||||
+ ar933x_wmac_setup();
|
||||
+ else if (soc_is_ar934x())
|
||||
+ ar934x_wmac_setup();
|
||||
++ else if (soc_is_qca953x())
|
||||
++ qca953x_wmac_setup();
|
||||
+ else if (soc_is_qca955x())
|
||||
+ qca955x_wmac_setup();
|
||||
+ else
|
||||
+--- a/arch/mips/ath79/early_printk.c
|
||||
++++ b/arch/mips/ath79/early_printk.c
|
||||
+@@ -114,6 +114,7 @@ static void prom_putchar_init(void)
|
||||
+ case REV_ID_MAJOR_AR9341:
|
||||
+ case REV_ID_MAJOR_AR9342:
|
||||
+ case REV_ID_MAJOR_AR9344:
|
||||
++ case REV_ID_MAJOR_QCA9533:
|
||||
+ case REV_ID_MAJOR_QCA9558:
|
||||
+ _prom_putchar = prom_putchar_ar71xx;
|
||||
+ break;
|
||||
+--- a/arch/mips/ath79/gpio.c
|
||||
++++ b/arch/mips/ath79/gpio.c
|
||||
+@@ -240,6 +240,8 @@ void __init ath79_gpio_init(void)
|
||||
+ ath79_gpio_count = AR933X_GPIO_COUNT;
|
||||
+ else if (soc_is_ar934x())
|
||||
+ ath79_gpio_count = AR934X_GPIO_COUNT;
|
||||
++ else if (soc_is_qca953x())
|
||||
++ ath79_gpio_count = QCA953X_GPIO_COUNT;
|
||||
+ else if (soc_is_qca955x())
|
||||
+ ath79_gpio_count = QCA955X_GPIO_COUNT;
|
||||
+ else
|
||||
+@@ -247,7 +249,7 @@ void __init ath79_gpio_init(void)
|
||||
+
|
||||
+ ath79_gpio_base = ioremap_nocache(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE);
|
||||
+ ath79_gpio_chip.ngpio = ath79_gpio_count;
|
||||
+- if (soc_is_ar934x() || soc_is_qca955x()) {
|
||||
++ if (soc_is_ar934x() || soc_is_qca953x() || soc_is_qca955x()) {
|
||||
+ ath79_gpio_chip.direction_input = ar934x_gpio_direction_input;
|
||||
+ ath79_gpio_chip.direction_output = ar934x_gpio_direction_output;
|
||||
+ }
|
||||
+--- a/arch/mips/ath79/irq.c
|
||||
++++ b/arch/mips/ath79/irq.c
|
||||
+@@ -106,6 +106,7 @@ static void __init ath79_misc_irq_init(v
|
||||
+ else if (soc_is_ar724x() ||
|
||||
+ soc_is_ar933x() ||
|
||||
+ soc_is_ar934x() ||
|
||||
++ soc_is_qca953x() ||
|
||||
+ soc_is_qca955x())
|
||||
+ ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
||||
+ else
|
||||
+@@ -352,6 +353,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;
|
||||
+ } else if (soc_is_qca955x()) {
|
||||
+ ath79_ip2_handler = ath79_default_ip2_handler;
|
||||
+ ath79_ip3_handler = ath79_default_ip3_handler;
|
||||
+--- a/arch/mips/ath79/setup.c
|
||||
++++ b/arch/mips/ath79/setup.c
|
||||
+@@ -164,6 +164,12 @@ static void __init ath79_detect_sys_type
|
||||
+ rev = id & AR934X_REV_ID_REVISION_MASK;
|
||||
+ break;
|
||||
+
|
||||
++ case REV_ID_MAJOR_QCA9533:
|
||||
++ ath79_soc = ATH79_SOC_QCA9533;
|
||||
++ chip = "9533";
|
||||
++ rev = id & AR944X_REV_ID_REVISION_MASK;
|
||||
++ break;
|
||||
++
|
||||
+ case REV_ID_MAJOR_QCA9558:
|
||||
+ ath79_soc = ATH79_SOC_QCA9558;
|
||||
+ chip = "9558";
|
||||
+@@ -176,7 +182,7 @@ static void __init ath79_detect_sys_type
|
||||
+
|
||||
+ ath79_soc_rev = rev;
|
||||
+
|
||||
+- if (soc_is_qca955x())
|
||||
++ if (soc_is_qca953x() || soc_is_qca955x())
|
||||
+ sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u",
|
||||
+ chip, rev);
|
||||
+ else
|
||||
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+@@ -106,6 +106,9 @@
|
||||
+ #define AR934X_NFC_BASE 0x1b000200
|
||||
+ #define AR934X_NFC_SIZE 0xb8
|
||||
+
|
||||
++#define QCA953X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
|
||||
++#define QCA953X_WMAC_SIZE 0x20000
|
||||
++
|
||||
+ #define QCA955X_PCI_MEM_BASE0 0x10000000
|
||||
+ #define QCA955X_PCI_MEM_BASE1 0x12000000
|
||||
+ #define QCA955X_PCI_MEM_SIZE 0x02000000
|
||||
+@@ -280,6 +283,43 @@
|
||||
+
|
||||
+ #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_ETH_XMII_CONTROL_REG 0x2c
|
||||
++#define QCA953X_PLL_ETH_SGMII_CONTROL_REG 0x48
|
||||
++
|
||||
++#define QCA953X_PLL_CPU_CONFIG_NFRAC_SHIFT 0
|
||||
++#define QCA953X_PLL_CPU_CONFIG_NFRAC_MASK 0x3f
|
||||
++#define QCA953X_PLL_CPU_CONFIG_NINT_SHIFT 6
|
||||
++#define QCA953X_PLL_CPU_CONFIG_NINT_MASK 0x3f
|
||||
++#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_DDR_CONFIG_NFRAC_SHIFT 0
|
||||
++#define QCA953X_PLL_DDR_CONFIG_NFRAC_MASK 0x3ff
|
||||
++#define QCA953X_PLL_DDR_CONFIG_NINT_SHIFT 10
|
||||
++#define QCA953X_PLL_DDR_CONFIG_NINT_MASK 0x3f
|
||||
++#define QCA953X_PLL_DDR_CONFIG_REFDIV_SHIFT 16
|
||||
++#define QCA953X_PLL_DDR_CONFIG_REFDIV_MASK 0x1f
|
||||
++#define QCA953X_PLL_DDR_CONFIG_OUTDIV_SHIFT 23
|
||||
++#define QCA953X_PLL_DDR_CONFIG_OUTDIV_MASK 0x7
|
||||
++
|
||||
++#define QCA953X_PLL_CLK_CTRL_CPU_PLL_BYPASS BIT(2)
|
||||
++#define QCA953X_PLL_CLK_CTRL_DDR_PLL_BYPASS BIT(3)
|
||||
++#define QCA953X_PLL_CLK_CTRL_AHB_PLL_BYPASS BIT(4)
|
||||
++#define QCA953X_PLL_CLK_CTRL_CPU_POST_DIV_SHIFT 5
|
||||
++#define QCA953X_PLL_CLK_CTRL_CPU_POST_DIV_MASK 0x1f
|
||||
++#define QCA953X_PLL_CLK_CTRL_DDR_POST_DIV_SHIFT 10
|
||||
++#define QCA953X_PLL_CLK_CTRL_DDR_POST_DIV_MASK 0x1f
|
||||
++#define QCA953X_PLL_CLK_CTRL_AHB_POST_DIV_SHIFT 15
|
||||
++#define QCA953X_PLL_CLK_CTRL_AHB_POST_DIV_MASK 0x1f
|
||||
++#define QCA953X_PLL_CLK_CTRL_CPUCLK_FROM_CPUPLL BIT(20)
|
||||
++#define QCA953X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21)
|
||||
++#define QCA953X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24)
|
||||
++
|
||||
+ #define QCA955X_PLL_CPU_CONFIG_REG 0x00
|
||||
+ #define QCA955X_PLL_DDR_CONFIG_REG 0x04
|
||||
+ #define QCA955X_PLL_CLK_CTRL_REG 0x08
|
||||
+@@ -354,6 +394,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 QCA955X_RESET_REG_BOOTSTRAP 0xb0
|
||||
+ #define QCA955X_RESET_REG_EXT_INT_STATUS 0xac
|
||||
+
|
||||
+@@ -468,6 +512,8 @@
|
||||
+ #define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1)
|
||||
+ #define AR934X_BOOTSTRAP_DDR1 BIT(0)
|
||||
+
|
||||
++#define QCA953X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
||||
++
|
||||
+ #define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
||||
+
|
||||
+ #define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0)
|
||||
+@@ -530,6 +576,7 @@
|
||||
+ #define REV_ID_MAJOR_AR9341 0x0120
|
||||
+ #define REV_ID_MAJOR_AR9342 0x1120
|
||||
+ #define REV_ID_MAJOR_AR9344 0x2120
|
||||
++#define REV_ID_MAJOR_QCA9533 0x0140
|
||||
+ #define REV_ID_MAJOR_QCA9558 0x1130
|
||||
+
|
||||
+ #define AR71XX_REV_ID_MINOR_MASK 0x3
|
||||
+@@ -603,6 +650,7 @@
|
||||
+ #define AR913X_GPIO_COUNT 22
|
||||
+ #define AR933X_GPIO_COUNT 30
|
||||
+ #define AR934X_GPIO_COUNT 23
|
||||
++#define QCA953X_GPIO_COUNT 24 /* (?) */
|
||||
+ #define QCA955X_GPIO_COUNT 24
|
||||
+
|
||||
+ /*
|
||||
+--- 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 {
|
||||
+ ATH79_SOC_AR9341,
|
||||
+ ATH79_SOC_AR9342,
|
||||
+ ATH79_SOC_AR9344,
|
||||
++ ATH79_SOC_QCA9533,
|
||||
+ ATH79_SOC_QCA9558,
|
||||
+ };
|
||||
+
|
||||
+@@ -99,6 +100,16 @@ static inline int soc_is_ar934x(void)
|
||||
+ return soc_is_ar9341() || soc_is_ar9342() || soc_is_ar9344();
|
||||
+ }
|
||||
+
|
||||
++static inline int soc_is_qca9533(void)
|
||||
++{
|
||||
++ return ath79_soc == ATH79_SOC_QCA9533;
|
||||
++}
|
||||
++
|
||||
++static inline int soc_is_qca953x(void)
|
||||
++{
|
||||
++ return soc_is_qca9533();
|
||||
++}
|
||||
++
|
||||
+ static inline int soc_is_qca9558(void)
|
||||
+ {
|
||||
+ return ath79_soc == ATH79_SOC_QCA9558;
|
@ -1,297 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 29 Mar 2014 21:12:15 +0100
|
||||
Subject: ar71xx: add support for the TP-LINK TL-WR841N/ND v9
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
index b206438..0bf2dd1 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
@@ -144,6 +144,9 @@ get_status_led() {
|
||||
tl-wr703n)
|
||||
status_led="tp-link:blue:system"
|
||||
;;
|
||||
+ tl-wr841n-v9)
|
||||
+ status_led="tp-link:green:qss"
|
||||
+ ;;
|
||||
tl-wr2543n)
|
||||
status_led="tp-link:green:wps"
|
||||
;;
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/leds b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
index 48b8154..43bc24d 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
@@ -163,6 +163,15 @@ tl-wr841n-v8)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
;;
|
||||
|
||||
+tl-wr841n-v9)
|
||||
+ ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
|
||||
+ ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
||||
+ ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
||||
+ ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
|
||||
+ ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
||||
+ ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
+ ;;
|
||||
+
|
||||
tl-wr941nd | \
|
||||
tl-wr1041n-v2)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
index a36036f..a1dfda0 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
@@ -192,6 +192,7 @@ tl-wdr3500 |\
|
||||
tl-wr741nd |\
|
||||
tl-wr741nd-v4 |\
|
||||
tl-wr841n-v7 |\
|
||||
+tl-wr841n-v9 |\
|
||||
whr-g301n |\
|
||||
whr-hp-g300n |\
|
||||
whr-hp-gn |\
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
index 8d71352..ca174da 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
@@ -381,6 +381,9 @@ ar71xx_board_detect() {
|
||||
*"TL-WR841N/ND v8")
|
||||
name="tl-wr841n-v8"
|
||||
;;
|
||||
+ *"TL-WR841N/ND v9")
|
||||
+ name="tl-wr841n-v9"
|
||||
+ ;;
|
||||
*TL-WR941ND)
|
||||
name="tl-wr941nd"
|
||||
;;
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
index e52ad9e..7168b4e 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
@@ -163,6 +163,7 @@ platform_check_image() {
|
||||
tl-wr841n-v1 | \
|
||||
tl-wr841n-v7 | \
|
||||
tl-wr841n-v8 | \
|
||||
+ tl-wr841n-v9 | \
|
||||
tl-wr941nd | \
|
||||
tl-wr1041n-v2 | \
|
||||
tl-wr1043nd | \
|
||||
diff --git a/target/linux/ar71xx/config-3.3 b/target/linux/ar71xx/config-3.3
|
||||
index 1c3ba3c..82d4d21 100644
|
||||
--- a/target/linux/ar71xx/config-3.3
|
||||
+++ b/target/linux/ar71xx/config-3.3
|
||||
@@ -70,6 +70,7 @@ CONFIG_ATH79_MACH_TL_WR741ND=y
|
||||
CONFIG_ATH79_MACH_TL_WR741ND_V4=y
|
||||
CONFIG_ATH79_MACH_TL_WR841N_V1=y
|
||||
CONFIG_ATH79_MACH_TL_WR841N_V8=y
|
||||
+CONFIG_ATH79_MACH_TL_WR841N_V9=y
|
||||
CONFIG_ATH79_MACH_TL_WR941ND=y
|
||||
CONFIG_ATH79_MACH_UBNT=y
|
||||
CONFIG_ATH79_MACH_UBNT_XM=y
|
||||
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
|
||||
new file mode 100644
|
||||
index 0000000..c28afc6
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
|
||||
@@ -0,0 +1,138 @@
|
||||
+/*
|
||||
+ * TP-LINK TL-WR841N/ND v9
|
||||
+ *
|
||||
+ * Copyright (C) 2014 Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License version 2 as published
|
||||
+ * by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+
|
||||
+#include <asm/mach-ath79/ath79.h>
|
||||
+#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
+
|
||||
+#include "common.h"
|
||||
+#include "dev-eth.h"
|
||||
+#include "dev-gpio-buttons.h"
|
||||
+#include "dev-leds-gpio.h"
|
||||
+#include "dev-m25p80.h"
|
||||
+#include "dev-wmac.h"
|
||||
+#include "machtypes.h"
|
||||
+
|
||||
+#define TL_WR841NV9_GPIO_LED_WLAN 13
|
||||
+#define TL_WR841NV9_GPIO_LED_QSS 3
|
||||
+#define TL_WR841NV9_GPIO_LED_WAN 4
|
||||
+#define TL_WR841NV9_GPIO_LED_LAN1 16
|
||||
+#define TL_WR841NV9_GPIO_LED_LAN2 15
|
||||
+#define TL_WR841NV9_GPIO_LED_LAN3 14
|
||||
+#define TL_WR841NV9_GPIO_LED_LAN4 11
|
||||
+
|
||||
+#define TL_WR841NV9_GPIO_BTN_RESET 12
|
||||
+#define TL_WR841NV9_GPIO_BTN_WIFI 17
|
||||
+
|
||||
+#define TL_WR841NV9_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||
+#define TL_WR841NV9_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR841NV9_KEYS_POLL_INTERVAL)
|
||||
+
|
||||
+static const char *tl_wr841n_v9_part_probes[] = {
|
||||
+ "tp-link",
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static struct flash_platform_data tl_wr841n_v9_flash_data = {
|
||||
+ .part_probes = tl_wr841n_v9_part_probes,
|
||||
+};
|
||||
+
|
||||
+static struct gpio_led tl_wr841n_v9_leds_gpio[] __initdata = {
|
||||
+ {
|
||||
+ .name = "tp-link:green:lan1",
|
||||
+ .gpio = TL_WR841NV9_GPIO_LED_LAN1,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .name = "tp-link:green:lan2",
|
||||
+ .gpio = TL_WR841NV9_GPIO_LED_LAN2,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .name = "tp-link:green:lan3",
|
||||
+ .gpio = TL_WR841NV9_GPIO_LED_LAN3,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .name = "tp-link:green:lan4",
|
||||
+ .gpio = TL_WR841NV9_GPIO_LED_LAN4,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .name = "tp-link:green:qss",
|
||||
+ .gpio = TL_WR841NV9_GPIO_LED_QSS,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .name = "tp-link:green:wan",
|
||||
+ .gpio = TL_WR841NV9_GPIO_LED_WAN,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .name = "tp-link:green:wlan",
|
||||
+ .gpio = TL_WR841NV9_GPIO_LED_WLAN,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_keys_button tl_wr841n_v9_gpio_keys[] __initdata = {
|
||||
+ {
|
||||
+ .desc = "Reset button",
|
||||
+ .type = EV_KEY,
|
||||
+ .code = KEY_RESTART,
|
||||
+ .debounce_interval = TL_WR841NV9_KEYS_DEBOUNCE_INTERVAL,
|
||||
+ .gpio = TL_WR841NV9_GPIO_BTN_RESET,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .desc = "WIFI button",
|
||||
+ .type = EV_KEY,
|
||||
+ .code = KEY_RFKILL,
|
||||
+ .debounce_interval = TL_WR841NV9_KEYS_DEBOUNCE_INTERVAL,
|
||||
+ .gpio = TL_WR841NV9_GPIO_BTN_WIFI,
|
||||
+ .active_low = 1,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static void __init tl_ap143_setup(void)
|
||||
+{
|
||||
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
|
||||
+ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
|
||||
+ u8 tmpmac[ETH_ALEN];
|
||||
+
|
||||
+ ath79_register_m25p80(&tl_wr841n_v9_flash_data);
|
||||
+
|
||||
+ ath79_setup_ar933x_phy4_switch(false, false);
|
||||
+
|
||||
+ ath79_register_mdio(0, 0x0);
|
||||
+
|
||||
+ /* LAN */
|
||||
+ 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_init_mac(ath79_eth0_data.mac_addr, mac, 1);
|
||||
+ ath79_register_eth(0);
|
||||
+
|
||||
+ ath79_init_mac(tmpmac, mac, 0);
|
||||
+ ath79_register_wmac(ee, tmpmac);
|
||||
+}
|
||||
+
|
||||
+static void __init tl_wr841n_v9_setup(void)
|
||||
+{
|
||||
+ tl_ap143_setup();
|
||||
+
|
||||
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v9_leds_gpio),
|
||||
+ tl_wr841n_v9_leds_gpio);
|
||||
+
|
||||
+ ath79_register_gpio_keys_polled(1, TL_WR841NV9_KEYS_POLL_INTERVAL,
|
||||
+ ARRAY_SIZE(tl_wr841n_v9_gpio_keys),
|
||||
+ tl_wr841n_v9_gpio_keys);
|
||||
+}
|
||||
+
|
||||
+MIPS_MACHINE(ATH79_MACH_TL_WR841N_V9, "TL-WR841N-v9", "TP-LINK TL-WR841N/ND v9",
|
||||
+ tl_wr841n_v9_setup);
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index 01d1e67..c270f73 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -879,6 +879,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR703,tl-wr703n-v1,TL-WR7
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma))
|
||||
+$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV9,tl-wr841n-v9,TL-WR841N-v9,ttyS0,115200,0x08410009,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR3500V1,tl-wdr3500-v1,TL-WDR3500,ttyS0,115200,0x35000001,1,8Mlzma))
|
||||
@@ -924,7 +925,7 @@ $(eval $(call MultiProfile,TLWA901,TLWA901NV1 TLWA901NV2))
|
||||
$(eval $(call MultiProfile,TLWA7510,TLWA7510NV1))
|
||||
$(eval $(call MultiProfile,TLWR740,TLWR740NV1 TLWR740NV3 TLWR740NV4))
|
||||
$(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4))
|
||||
-$(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8))
|
||||
+$(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8 TLWR841NV9))
|
||||
$(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4))
|
||||
$(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4310V1))
|
||||
$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTUNIFI UBNTUNIFIOUTDOOR))
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch b/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch
|
||||
new file mode 100644
|
||||
index 0000000..37425a6
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch
|
||||
@@ -0,0 +1,38 @@
|
||||
+--- a/arch/mips/ath79/Kconfig
|
||||
++++ b/arch/mips/ath79/Kconfig
|
||||
+@@ -547,6 +547,15 @@ config ATH79_MACH_TL_WR841N_V8
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
++config ATH79_MACH_TL_WR841N_V9
|
||||
++ bool "TP-LINK TL-WR841N/ND v9 support"
|
||||
++ select SOC_QCA953X
|
||||
++ select ATH79_DEV_ETH
|
||||
++ select ATH79_DEV_GPIO_BUTTONS
|
||||
++ select ATH79_DEV_LEDS_GPIO
|
||||
++ select ATH79_DEV_M25P80
|
||||
++ select ATH79_DEV_WMAC
|
||||
++
|
||||
+ config ATH79_MACH_TL_WR941ND
|
||||
+ bool "TP-LINK TL-WR941ND support"
|
||||
+ select SOC_AR913X
|
||||
+--- a/arch/mips/ath79/Makefile
|
||||
++++ b/arch/mips/ath79/Makefile
|
||||
+@@ -85,6 +85,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WR741ND) += m
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WR741ND_V4) += mach-tl-wr741nd-v4.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WR841N_V1) += mach-tl-wr841n.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WR841N_V8) += mach-tl-wr841n-v8.o
|
||||
++obj-$(CONFIG_ATH79_MACH_TL_WR841N_V9) += mach-tl-wr841n-v9.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WR941ND) += mach-tl-wr941nd.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WR1041N_V2) += mach-tl-wr1041n-v2.o
|
||||
+ obj-$(CONFIG_ATH79_MACH_TL_WR1043ND) += mach-tl-wr1043nd.o
|
||||
+--- a/arch/mips/ath79/machtypes.h
|
||||
++++ b/arch/mips/ath79/machtypes.h
|
||||
+@@ -90,6 +90,7 @@ enum ath79_mach_type {
|
||||
+ ATH79_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
|
||||
+ ATH79_MACH_TL_WR841N_V7, /* TP-LINK TL-WR841N/ND v7 */
|
||||
+ ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */
|
||||
++ ATH79_MACH_TL_WR841N_V9, /* TP-LINK TL-WR841N/ND v9 */
|
||||
+ ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
|
||||
+ ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
|
||||
+ ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
|
@ -1,427 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 1 May 2014 02:26:02 +0200
|
||||
Subject: Backport support for TL-WR842N v2 and TL-MR3420 v2
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
index 0bf2dd1..0d01119 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
@@ -127,6 +127,7 @@ get_status_led() {
|
||||
;;
|
||||
tl-mr3220 | \
|
||||
tl-mr3420 | \
|
||||
+ tl-mr3420-v2 | \
|
||||
tl-wa901nd | \
|
||||
tl-wa901nd-v2 | \
|
||||
tl-wdr3500 | \
|
||||
@@ -137,6 +138,7 @@ get_status_led() {
|
||||
tl-wr841n-v1 | \
|
||||
tl-wr841n-v7 | \
|
||||
tl-wr841n-v8 | \
|
||||
+ tl-wr842n-v2 | \
|
||||
tl-wr941nd)
|
||||
status_led="tp-link:green:system"
|
||||
;;
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/leds b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
index 43bc24d..f1ac9ec 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
@@ -118,6 +118,16 @@ tl-mr3420 )
|
||||
ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
|
||||
;;
|
||||
|
||||
+tl-mr3420-v2)
|
||||
+ ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
|
||||
+ ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
|
||||
+ ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
||||
+ ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
|
||||
+ ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
||||
+ ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
+ ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
|
||||
+ ;;
|
||||
+
|
||||
tl-wa901nd)
|
||||
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
|
||||
;;
|
||||
@@ -172,6 +182,16 @@ tl-wr841n-v9)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
;;
|
||||
|
||||
+tl-wr842n-v2)
|
||||
+ ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
|
||||
+ ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
|
||||
+ ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
||||
+ ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
|
||||
+ ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
||||
+ ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
+ ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
|
||||
+ ;;
|
||||
+
|
||||
tl-wr941nd | \
|
||||
tl-wr1041n-v2)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
index a1dfda0..e38a9b8 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
@@ -128,7 +128,9 @@ tl-wr941nd)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
||||
;;
|
||||
|
||||
-tl-wr841n-v8)
|
||||
+tl-mr3420-v2 |\
|
||||
+tl-wr841n-v8 |\
|
||||
+tl-wr842n-v2)
|
||||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
ucidef_add_switch "switch0" "1" "1"
|
||||
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
index ca174da..11aa31b 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
@@ -351,6 +351,9 @@ ar71xx_board_detect() {
|
||||
*TL-MR3420)
|
||||
name="tl-mr3420"
|
||||
;;
|
||||
+ *"TL-MR3420 v2")
|
||||
+ name="tl-mr3420-v2"
|
||||
+ ;;
|
||||
*TL-WA7510N)
|
||||
name="tl-wa7510n"
|
||||
;;
|
||||
@@ -384,6 +387,9 @@ ar71xx_board_detect() {
|
||||
*"TL-WR841N/ND v9")
|
||||
name="tl-wr841n-v9"
|
||||
;;
|
||||
+ *"TL-WR842N/ND v2")
|
||||
+ name="tl-wr842n-v2"
|
||||
+ ;;
|
||||
*TL-WR941ND)
|
||||
name="tl-wr941nd"
|
||||
;;
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
index 7168b4e..b25df6c 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
@@ -152,6 +152,7 @@ platform_check_image() {
|
||||
tl-mr3040 | \
|
||||
tl-mr3220 | \
|
||||
tl-mr3420 | \
|
||||
+ tl-mr3420-v2 | \
|
||||
tl-wa7510n | \
|
||||
tl-wa901nd | \
|
||||
tl-wa901nd-v2 | \
|
||||
@@ -164,6 +165,7 @@ platform_check_image() {
|
||||
tl-wr841n-v7 | \
|
||||
tl-wr841n-v8 | \
|
||||
tl-wr841n-v9 | \
|
||||
+ tl-wr842n-v2 | \
|
||||
tl-wr941nd | \
|
||||
tl-wr1041n-v2 | \
|
||||
tl-wr1043nd | \
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
|
||||
index ffaf8d1..0099b15 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * TP-LINK TL-WR841N/ND v8 board support
|
||||
+ * TP-LINK TL-WR841N/ND v8/TL-MR3420 v2 board support
|
||||
*
|
||||
* Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
|
||||
*
|
||||
@@ -8,6 +8,7 @@
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
+#include <linux/gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/mach-ath79/ath79.h>
|
||||
@@ -18,6 +19,7 @@
|
||||
#include "dev-gpio-buttons.h"
|
||||
#include "dev-leds-gpio.h"
|
||||
#include "dev-m25p80.h"
|
||||
+#include "dev-usb.h"
|
||||
#include "dev-wmac.h"
|
||||
#include "machtypes.h"
|
||||
|
||||
@@ -31,7 +33,10 @@
|
||||
#define TL_WR841NV8_GPIO_LED_SYSTEM 14
|
||||
|
||||
#define TL_WR841NV8_GPIO_BTN_RESET 17
|
||||
-#define TL_WR841NV8_GPIO_SW_RFKILL 16
|
||||
+#define TL_WR841NV8_GPIO_SW_RFKILL 16 /* WPS for MR3420 v2 */
|
||||
+
|
||||
+#define TL_MR3420V2_GPIO_LED_3G 11
|
||||
+#define TL_MR3420V2_GPIO_USB_POWER 4
|
||||
|
||||
#define TL_WR841NV8_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||
#define TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR841NV8_KEYS_POLL_INTERVAL)
|
||||
@@ -78,6 +83,11 @@ static struct gpio_led tl_wr841n_v8_leds_gpio[] __initdata = {
|
||||
.name = "tp-link:green:wlan",
|
||||
.gpio = TL_WR841NV8_GPIO_LED_WLAN,
|
||||
.active_low = 1,
|
||||
+ }, {
|
||||
+ /* the 3G LED is only present on the MR3420 v2 */
|
||||
+ .name = "tp-link:green:3g",
|
||||
+ .gpio = TL_MR3420V2_GPIO_LED_3G,
|
||||
+ .active_low = 1,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -99,17 +109,37 @@ static struct gpio_keys_button tl_wr841n_v8_gpio_keys[] __initdata = {
|
||||
}
|
||||
};
|
||||
|
||||
-static void __init tl_wr841n_v8_setup(void)
|
||||
+static struct gpio_keys_button tl_mr3420v2_gpio_keys[] __initdata = {
|
||||
+ {
|
||||
+ .desc = "Reset button",
|
||||
+ .type = EV_KEY,
|
||||
+ .code = KEY_RESTART,
|
||||
+ .debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
|
||||
+ .gpio = TL_WR841NV8_GPIO_BTN_RESET,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .desc = "WPS",
|
||||
+ .type = EV_KEY,
|
||||
+ .code = KEY_WPS_BUTTON,
|
||||
+ .debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
|
||||
+ .gpio = TL_WR841NV8_GPIO_SW_RFKILL,
|
||||
+ .active_low = 0,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+static void __init tl_ap123_setup(void)
|
||||
{
|
||||
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
|
||||
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
|
||||
|
||||
- ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
|
||||
- tl_wr841n_v8_leds_gpio);
|
||||
+ /* Disable JTAG, enabling GPIOs 0-3 */
|
||||
+ /* Configure OBS4 line, for GPIO 4*/
|
||||
+ ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE,
|
||||
+ AR934X_GPIO_FUNC_CLK_OBS4_EN);
|
||||
|
||||
- ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
|
||||
- ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
|
||||
- tl_wr841n_v8_gpio_keys);
|
||||
+ /* config gpio4 as normal gpio function */
|
||||
+ ath79_gpio_output_select(TL_MR3420V2_GPIO_USB_POWER,
|
||||
+ AR934X_GPIO_OUT_GPIO);
|
||||
|
||||
ath79_register_m25p80(&tl_wr841n_v8_flash_data);
|
||||
|
||||
@@ -135,5 +165,61 @@ static void __init tl_wr841n_v8_setup(void)
|
||||
ath79_register_wmac(ee, mac);
|
||||
}
|
||||
|
||||
+static void __init tl_wr841n_v8_setup(void)
|
||||
+{
|
||||
+ tl_ap123_setup();
|
||||
+
|
||||
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio) - 1,
|
||||
+ tl_wr841n_v8_leds_gpio);
|
||||
+
|
||||
+ ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
|
||||
+ ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
|
||||
+ tl_wr841n_v8_gpio_keys);
|
||||
+}
|
||||
+
|
||||
MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8", "TP-LINK TL-WR841N/ND v8",
|
||||
tl_wr841n_v8_setup);
|
||||
+
|
||||
+
|
||||
+static void __init tl_wr842n_v2_setup(void)
|
||||
+{
|
||||
+ tl_ap123_setup();
|
||||
+
|
||||
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
|
||||
+ tl_wr841n_v8_leds_gpio);
|
||||
+
|
||||
+ ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
|
||||
+ ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
|
||||
+ tl_wr841n_v8_gpio_keys);
|
||||
+
|
||||
+ gpio_request_one(TL_MR3420V2_GPIO_USB_POWER,
|
||||
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||
+ "USB power");
|
||||
+
|
||||
+ ath79_register_usb();
|
||||
+}
|
||||
+
|
||||
+MIPS_MACHINE(ATH79_MACH_TL_WR842N_V2, "TL-WR842N-v2", "TP-LINK TL-WR842N/ND v2",
|
||||
+ tl_wr842n_v2_setup);
|
||||
+
|
||||
+static void __init tl_mr3420v2_setup(void)
|
||||
+{
|
||||
+ tl_ap123_setup();
|
||||
+
|
||||
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
|
||||
+ tl_wr841n_v8_leds_gpio);
|
||||
+
|
||||
+ ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
|
||||
+ ARRAY_SIZE(tl_mr3420v2_gpio_keys),
|
||||
+ tl_mr3420v2_gpio_keys);
|
||||
+
|
||||
+ /* enable power for the USB port */
|
||||
+ gpio_request_one(TL_MR3420V2_GPIO_USB_POWER,
|
||||
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||
+ "USB power");
|
||||
+
|
||||
+ ath79_register_usb();
|
||||
+}
|
||||
+
|
||||
+MIPS_MACHINE(ATH79_MACH_TL_MR3420_V2, "TL-MR3420-v2", "TP-LINK TL-MR3420 v2",
|
||||
+ tl_mr3420v2_setup);
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index c270f73..a055521 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -853,7 +853,7 @@ $(eval $(call SingleProfile,Planex,$(fs_64k),MZKW300NH,mzk-w300nh,MZK-W300NH,tty
|
||||
$(eval $(call SingleProfile,TPLINKOLD,$(fs_squash),TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
|
||||
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3220,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
|
||||
-$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
|
||||
+$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA901NV1,tl-wa901nd-v1,TL-WA901ND,ttyS0,115200,0x09010001,1,4M))
|
||||
@@ -866,7 +866,7 @@ $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR743,tl-wr743nd-v1,TL-WR741ND
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV3,tl-wr841nd-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M))
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV5,tl-wr841nd-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M))
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV7,tl-wr841nd-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M))
|
||||
-$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR842,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M))
|
||||
+$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR842V1,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M))
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV2,tl-wr941nd-v2,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV3,tl-wr941nd-v3,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
|
||||
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,ttyS0,115200,0x09410004,1,4M))
|
||||
@@ -875,11 +875,13 @@ $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR1043,tl-wr1043nd-v1,TL-WR104
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11U,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040,tl-mr3040-v1,TL-MR3040,ttyATH0,115200,0x30400001,1,4Mlzma))
|
||||
+$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV9,tl-wr841n-v9,TL-WR841N-v9,ttyS0,115200,0x08410009,1,4Mlzma))
|
||||
+$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR842V2,tl-wr842n-v2,TL-WR842N-v2,ttyS0,115200,0x8420002,1,8Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR3500V1,tl-wdr3500-v1,TL-WDR3500,ttyS0,115200,0x35000001,1,8Mlzma))
|
||||
@@ -921,11 +923,13 @@ $(eval $(call SingleProfile,ZyXEL,$(fs_64k),NBG_460N_550N_550NH,nbg460n_550n_550
|
||||
$(eval $(call MultiProfile,AP121,AP121_2M AP121_4M))
|
||||
$(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT))
|
||||
$(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
|
||||
+$(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
|
||||
$(eval $(call MultiProfile,TLWA901,TLWA901NV1 TLWA901NV2))
|
||||
$(eval $(call MultiProfile,TLWA7510,TLWA7510NV1))
|
||||
$(eval $(call MultiProfile,TLWR740,TLWR740NV1 TLWR740NV3 TLWR740NV4))
|
||||
$(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4))
|
||||
$(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8 TLWR841NV9))
|
||||
+$(eval $(call MultiProfile,TLWR842,TLWR842V1 TLWR842V2))
|
||||
$(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4))
|
||||
$(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4310V1))
|
||||
$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTUNIFI UBNTUNIFIOUTDOOR))
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
|
||||
index 0230908..6d67f5f 100644
|
||||
--- a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
-@@ -16,18 +16,102 @@
|
||||
+@@ -16,18 +16,104 @@
|
||||
|
||||
enum ath79_mach_type {
|
||||
ATH79_MACH_GENERIC = 0,
|
||||
@@ -61,6 +61,7 @@
|
||||
+ ATH79_MACH_TL_MR3040, /* TP-LINK TL-MR3040 */
|
||||
+ ATH79_MACH_TL_MR3220, /* TP-LINK TL-MR3220 */
|
||||
+ ATH79_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */
|
||||
++ ATH79_MACH_TL_MR3420_V2, /* TP-LINK TL-MR3420 v2 */
|
||||
+ ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
|
||||
+ ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
|
||||
+ ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */
|
||||
@@ -73,6 +74,7 @@
|
||||
+ ATH79_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
|
||||
+ ATH79_MACH_TL_WR841N_V7, /* TP-LINK TL-WR841N/ND v7 */
|
||||
+ ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */
|
||||
++ ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
|
||||
+ ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
|
||||
ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
|
||||
ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/612-MIPS-ath79-TL-WA7510N-v1-support.patch b/target/linux/ar71xx/patches-3.3/612-MIPS-ath79-TL-WA7510N-v1-support.patch
|
||||
index 6bd58b0..dba879e 100644
|
||||
--- a/target/linux/ar71xx/patches-3.3/612-MIPS-ath79-TL-WA7510N-v1-support.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.3/612-MIPS-ath79-TL-WA7510N-v1-support.patch
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
-@@ -74,6 +74,7 @@ enum ath79_mach_type {
|
||||
- ATH79_MACH_TL_MR3040, /* TP-LINK TL-MR3040 */
|
||||
+@@ -75,6 +75,7 @@ enum ath79_mach_type {
|
||||
ATH79_MACH_TL_MR3220, /* TP-LINK TL-MR3220 */
|
||||
ATH79_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */
|
||||
+ ATH79_MACH_TL_MR3420_V2, /* TP-LINK TL-MR3420 v2 */
|
||||
+ ATH79_MACH_TL_WA7510N_V1, /* TP-LINK TL-WA7510N v1*/
|
||||
ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
|
||||
ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch
|
||||
index 0a2c3bd..059089b 100644
|
||||
--- a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
-@@ -84,6 +84,7 @@ enum ath79_mach_type {
|
||||
+@@ -78,6 +78,7 @@ enum ath79_mach_type {
|
||||
ATH79_MACH_TL_WA7510N_V1, /* TP-LINK TL-WA7510N v1*/
|
||||
ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
|
||||
ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
|
||||
@@ -10,7 +10,7 @@
|
||||
ATH79_MACH_TL_WR1043ND, /* TP-LINK TL-WR1043ND */
|
||||
--- a/arch/mips/ath79/Kconfig
|
||||
+++ b/arch/mips/ath79/Kconfig
|
||||
-@@ -514,6 +514,17 @@ config ATH79_MACH_TL_WA901ND_V2
|
||||
+@@ -469,6 +469,17 @@ config ATH79_MACH_TL_WA901ND_V2
|
||||
select ATH79_DEV_M25P80
|
||||
select ATH79_DEV_WMAC
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
select SOC_AR934X
|
||||
--- a/arch/mips/ath79/Makefile
|
||||
+++ b/arch/mips/ath79/Makefile
|
||||
-@@ -81,6 +81,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR3020) += ma
|
||||
+@@ -78,6 +78,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR3020) += ma
|
||||
obj-$(CONFIG_ATH79_MACH_TL_MR3X20) += mach-tl-mr3x20.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch
|
||||
index 8a1c770..9766afe 100644
|
||||
--- a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch
|
||||
@@ -56,7 +56,7 @@
|
||||
+ ubnt_unifi_outdoor_setup);
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
-@@ -97,6 +97,7 @@ enum ath79_mach_type {
|
||||
+@@ -100,6 +100,7 @@ enum ath79_mach_type {
|
||||
ATH79_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */
|
||||
ATH79_MACH_UBNT_RS, /* Ubiquiti RouterStation */
|
||||
ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch b/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch
|
||||
index 37425a6..612970b 100644
|
||||
--- a/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch
|
||||
@@ -33,6 +33,6 @@
|
||||
ATH79_MACH_TL_WR841N_V7, /* TP-LINK TL-WR841N/ND v7 */
|
||||
ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */
|
||||
+ ATH79_MACH_TL_WR841N_V9, /* TP-LINK TL-WR841N/ND v9 */
|
||||
+ ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
|
||||
ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
|
||||
ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
|
||||
- ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
|
@ -1,110 +0,0 @@
|
||||
From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sun, 7 Oct 2012 23:01:52 +0000
|
||||
Subject: x86: add grub2 iso support
|
||||
|
||||
diff --git a/Config.in b/Config.in
|
||||
index 5b4522e..54df7c8 100644
|
||||
--- a/Config.in
|
||||
+++ b/Config.in
|
||||
@@ -81,7 +81,7 @@ menu "Target Images"
|
||||
config TARGET_ROOTFS_ISO
|
||||
bool "iso"
|
||||
default n
|
||||
- depends TARGET_ROOTFS_INITRAMFS && TARGET_x86
|
||||
+ depends on TARGET_x86_generic
|
||||
help
|
||||
Create some bootable ISO image
|
||||
|
||||
diff --git a/target/linux/x86/base-files/lib/preinit/20_check_iso b/target/linux/x86/base-files/lib/preinit/20_check_iso
|
||||
new file mode 100644
|
||||
index 0000000..beff6eb
|
||||
--- /dev/null
|
||||
+++ b/target/linux/x86/base-files/lib/preinit/20_check_iso
|
||||
@@ -0,0 +1,5 @@
|
||||
+check_for_iso() {
|
||||
+ grep -qE '/dev/root.*iso9660' /proc/mounts && ramoverlay
|
||||
+}
|
||||
+
|
||||
+boot_hook_add preinit_mount_root check_for_iso
|
||||
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
|
||||
index 13da511..8f0debd 100644
|
||||
--- a/target/linux/x86/image/Makefile
|
||||
+++ b/target/linux/x86/image/Makefile
|
||||
@@ -9,7 +9,8 @@ include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
export PATH=$(TARGET_PATH):/sbin
|
||||
|
||||
-GRUB2_MODULES = biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
|
||||
+GRUB2_MODULES = at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
|
||||
+GRUB2_MODULES_ISO = at_keyboard biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial vga
|
||||
GRUB_TERMINALS =
|
||||
GRUB_SERIAL_CONFIG =
|
||||
GRUB_TERMINAL_CONFIG =
|
||||
@@ -51,7 +52,7 @@ ifneq ($(CONFIG_X86_GRUB_IMAGES),)
|
||||
define Image/cmdline/ext4
|
||||
root=$(ROOTPART) rootfstype=ext4 rootwait
|
||||
endef
|
||||
-
|
||||
+
|
||||
define Image/cmdline/jffs2-64k
|
||||
block2mtd.block2mtd=$(ROOTPART),65536,rootfs root=/dev/mtdblock0 rootfstype=jffs2 rootwait
|
||||
endef
|
||||
@@ -165,7 +166,31 @@ define Image/Build/squashfs
|
||||
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
|
||||
endef
|
||||
|
||||
-define Image/Build/iso
|
||||
+ifdef CONFIG_X86_USE_GRUB2
|
||||
+ define Image/Build/iso
|
||||
+ $(INSTALL_DIR) $(KDIR)/root.grub/boot/grub $(KDIR)/grub2
|
||||
+ $(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz
|
||||
+ grub-mkimage \
|
||||
+ -o $(KDIR)/grub2/eltorito.img \
|
||||
+ -O i386-pc \
|
||||
+ -c ./grub-early.cfg \
|
||||
+ $(GRUB2_MODULES_ISO)
|
||||
+ cat \
|
||||
+ $(STAGING_DIR_HOST)/lib/grub/i386-pc/cdboot.img \
|
||||
+ $(KDIR)/grub2/eltorito.img \
|
||||
+ > $(KDIR)/root.grub/boot/grub/eltorito.img
|
||||
+ sed \
|
||||
+ -e 's#@SERIAL_CONFIG@#$(strip $(GRUB_SERIAL_CONFIG))#g' \
|
||||
+ -e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
|
||||
+ -e 's#@CMDLINE@#root=/dev/sr0 rootfstype=iso9660 rootwait $(strip $(call Image/cmdline/$(1)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \
|
||||
+ -e 's#@TIMEOUT@#$(GRUB_TIMEOUT)#g' \
|
||||
+ ./grub-iso.cfg > $(KDIR)/root.grub/boot/grub/grub.cfg
|
||||
+ $(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz
|
||||
+ mkisofs -R -b boot/grub/eltorito.img -no-emul-boot -boot-info-table \
|
||||
+ -o $(KDIR)/root.iso $(KDIR)/root.grub $(TARGET_DIR)
|
||||
+ endef
|
||||
+else
|
||||
+ define Image/Build/iso
|
||||
$(INSTALL_DIR) $(KDIR)/root.grub/boot/grub
|
||||
$(CP) \
|
||||
$(KDIR)/stage2_eltorito \
|
||||
@@ -179,7 +204,8 @@ define Image/Build/iso
|
||||
$(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz
|
||||
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
-o $(KDIR)/root.iso $(KDIR)/root.grub
|
||||
-endef
|
||||
+ endef
|
||||
+endif
|
||||
|
||||
ifneq ($(CONFIG_X86_VDI_IMAGES),)
|
||||
define Image/Build/vdi
|
||||
diff --git a/target/linux/x86/image/grub-iso.cfg b/target/linux/x86/image/grub-iso.cfg
|
||||
new file mode 100644
|
||||
index 0000000..4d5d697
|
||||
--- /dev/null
|
||||
+++ b/target/linux/x86/image/grub-iso.cfg
|
||||
@@ -0,0 +1,10 @@
|
||||
+@SERIAL_CONFIG@
|
||||
+@TERMINAL_CONFIG@
|
||||
+
|
||||
+set default="0"
|
||||
+set timeout="@TIMEOUT@"
|
||||
+set root='(cd)'
|
||||
+
|
||||
+menuentry "OpenWrt" {
|
||||
+ linux /boot/vmlinuz @CMDLINE@ noinitrd reboot=bios
|
||||
+}
|
@ -1,24 +0,0 @@
|
||||
From: jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Thu, 17 Jan 2013 15:46:26 +0000
|
||||
Subject: x86: explicitely pass staging directory to grub-mkimage instead of relying on build time defaults (#12821)
|
||||
|
||||
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
|
||||
index 8f0debd..6e2bd54 100644
|
||||
--- a/target/linux/x86/image/Makefile
|
||||
+++ b/target/linux/x86/image/Makefile
|
||||
@@ -102,6 +102,7 @@ ifneq ($(CONFIG_X86_GRUB_IMAGES),)
|
||||
$(INSTALL_DIR) $(KDIR)/root.grub/boot/grub $(KDIR)/grub2
|
||||
$(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz
|
||||
grub-mkimage \
|
||||
+ -d $(STAGING_DIR_HOST)/lib/grub/i386-pc \
|
||||
-o $(KDIR)/grub2/core.img \
|
||||
-O i386-pc \
|
||||
-c ./grub-early.cfg \
|
||||
@@ -171,6 +172,7 @@ ifdef CONFIG_X86_USE_GRUB2
|
||||
$(INSTALL_DIR) $(KDIR)/root.grub/boot/grub $(KDIR)/grub2
|
||||
$(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz
|
||||
grub-mkimage \
|
||||
+ -d $(STAGING_DIR_HOST)/lib/grub/i386-pc \
|
||||
-o $(KDIR)/grub2/eltorito.img \
|
||||
-O i386-pc \
|
||||
-c ./grub-early.cfg \
|
@ -1,57 +0,0 @@
|
||||
From: blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Tue, 7 May 2013 12:35:07 +0000
|
||||
Subject: grub2: Add sub package grub-editenv for target installation
|
||||
|
||||
grub-editenv allows to modify grub2 environment files. Add a new package
|
||||
that build grub2 for the target and packs up grub-editenv.
|
||||
|
||||
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
|
||||
diff --git a/package/grub2/Makefile b/package/grub2/Makefile
|
||||
index b606f54..dd490ff 100644
|
||||
--- a/package/grub2/Makefile
|
||||
+++ b/package/grub2/Makefile
|
||||
@@ -16,7 +16,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/grub
|
||||
PKG_MD5SUM:=e927540b6eda8b024fb0391eeaa4091c
|
||||
|
||||
-PKG_HOST_ONLY:=1
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=grub2/host
|
||||
|
||||
@@ -32,6 +31,23 @@ define Package/grub2
|
||||
DEPENDS:=@TARGET_x86
|
||||
endef
|
||||
|
||||
+define Package/grub2-editenv
|
||||
+ CATEGORY:=Utilities
|
||||
+ SECTION:=utils
|
||||
+ TITLE:=Grub2 Environment editor
|
||||
+ URL:=http://www.gnu.org/software/grub/
|
||||
+ DEPENDS:=@TARGET_x86
|
||||
+endef
|
||||
+
|
||||
+define Package/grub2-editenv/description
|
||||
+ Edit grub2 environment files.
|
||||
+endef
|
||||
+
|
||||
+CONFIGURE_ARGS += \
|
||||
+ --target=$(REAL_GNU_TARGET_NAME) \
|
||||
+ --disable-werror \
|
||||
+ --disable-nls
|
||||
+
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--sbindir="$(STAGING_DIR_HOST)/bin" \
|
||||
@@ -47,5 +63,11 @@ define Host/Configure
|
||||
$(Host/Configure/Default)
|
||||
endef
|
||||
|
||||
+define Package/grub2-editenv/install
|
||||
+ $(INSTALL_DIR) $(1)/usr/sbin
|
||||
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
|
||||
+endef
|
||||
+
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,grub2))
|
||||
+$(eval $(call BuildPackage,grub2-editenv))
|
@ -1,37 +0,0 @@
|
||||
From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sat, 10 Aug 2013 18:35:29 +0000
|
||||
Subject: x86: Fix CONFIG_X86_GRUB_SERIAL=""
|
||||
|
||||
With
|
||||
|
||||
.config:CONFIG_X86_GRUB_SERIAL=""
|
||||
|
||||
which (AFAICT) is the way to tell GRUB not to use a serial console, in
|
||||
|
||||
target/linux/x86/image/Makefile:ifneq ($(CONFIG_X86_GRUB_SERIAL),)
|
||||
|
||||
$(CONFIG_X86_GRUB_SERIAL) expands to `""' (a literal double double-quote),
|
||||
making the condition unconditionally false.
|
||||
|
||||
This patch fixes the situation by passing CONFIG_X86_GRUB_SERIAL through
|
||||
qstrip before testing.
|
||||
|
||||
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
|
||||
|
||||
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
|
||||
index 6e2bd54..2e73519 100644
|
||||
--- a/target/linux/x86/image/Makefile
|
||||
+++ b/target/linux/x86/image/Makefile
|
||||
@@ -27,8 +27,10 @@ ifneq ($(strip $(foreach subtarget,$(USE_ATKBD),$(CONFIG_TARGET_x86_$(subtarget)
|
||||
GRUB2_MODULES += at_keyboard
|
||||
endif
|
||||
|
||||
-ifneq ($(CONFIG_X86_GRUB_SERIAL),)
|
||||
- GRUB_CONSOLE_CMDLINE += console=$(call qstrip,$(CONFIG_X86_GRUB_SERIAL)),$(CONFIG_X86_GRUB_BAUDRATE)n8
|
||||
+GRUB_SERIAL:=$(call qstrip,$(CONFIG_X86_GRUB_SERIAL))
|
||||
+
|
||||
+ifneq ($(GRUB_SERIAL),)
|
||||
+ GRUB_CONSOLE_CMDLINE += console=$(GRUB_SERIAL),$(CONFIG_X86_GRUB_BAUDRATE)n8
|
||||
GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_X86_GRUB_BAUDRATE) --word=8 --parity=no --stop=1
|
||||
GRUB_TERMINALS += serial
|
||||
endif
|
@ -1,218 +0,0 @@
|
||||
From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Wed, 12 Mar 2014 11:21:16 +0000
|
||||
Subject: grub2: update to 2.02-beta2, fixes mac os x 10.9 support (and many other things)
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
|
||||
diff --git a/package/grub2/Makefile b/package/grub2/Makefile
|
||||
index dd490ff..4edd92b 100644
|
||||
--- a/package/grub2/Makefile
|
||||
+++ b/package/grub2/Makefile
|
||||
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=grub
|
||||
-PKG_VERSION:=2.00
|
||||
+PKG_VERSION:=2.02~beta2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
-PKG_SOURCE_URL:=@GNU/grub
|
||||
-PKG_MD5SUM:=e927540b6eda8b024fb0391eeaa4091c
|
||||
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
+PKG_SOURCE_URL:=http://alpha.gnu.org/gnu/grub
|
||||
+PKG_MD5SUM:=be62932eade308a364ea4bbc91295930
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=grub2/host
|
||||
diff --git a/package/grub2/patches/100-grub_setup_root.patch b/package/grub2/patches/100-grub_setup_root.patch
|
||||
index 7775b2a..9619c41 100644
|
||||
--- a/package/grub2/patches/100-grub_setup_root.patch
|
||||
+++ b/package/grub2/patches/100-grub_setup_root.patch
|
||||
@@ -1,41 +1,6 @@
|
||||
--- a/util/grub-setup.c
|
||||
+++ b/util/grub-setup.c
|
||||
-@@ -141,12 +141,11 @@ write_rootdev (char *core_img, grub_devi
|
||||
- static void
|
||||
- setup (const char *dir,
|
||||
- const char *boot_file, const char *core_file,
|
||||
-- const char *dest, int force,
|
||||
-+ const char *root, const char *dest, int force,
|
||||
- int fs_probe, int allow_floppy)
|
||||
- {
|
||||
- char *boot_path, *core_path, *core_path_dev, *core_path_dev_full;
|
||||
- char *boot_img, *core_img;
|
||||
-- char *root = 0;
|
||||
- size_t boot_size, core_size;
|
||||
- grub_uint16_t core_sectors;
|
||||
- grub_device_t root_dev = 0, dest_dev, core_dev;
|
||||
-@@ -253,7 +252,10 @@ setup (const char *dir,
|
||||
-
|
||||
- core_dev = dest_dev;
|
||||
-
|
||||
-- {
|
||||
-+ if (root)
|
||||
-+ root_dev = grub_device_open(root);
|
||||
-+
|
||||
-+ if (!root_dev) {
|
||||
- char **root_devices = grub_guess_root_devices (dir);
|
||||
- char **cur;
|
||||
- int found = 0;
|
||||
-@@ -263,6 +265,8 @@ setup (const char *dir,
|
||||
- char *drive;
|
||||
- grub_device_t try_dev;
|
||||
-
|
||||
-+ if (root_dev)
|
||||
-+ break;
|
||||
- drive = grub_util_get_grub_dev (*cur);
|
||||
- if (!drive)
|
||||
- continue;
|
||||
-@@ -956,6 +960,8 @@ static struct argp_option options[] = {
|
||||
+@@ -87,6 +87,8 @@ static struct argp_option options[] = {
|
||||
N_("install even if problems are detected"), 0},
|
||||
{"skip-fs-probe",'s',0, 0,
|
||||
N_("do not probe for filesystems in DEVICE"), 0},
|
||||
@@ -44,7 +9,7 @@
|
||||
{"verbose", 'v', 0, 0, N_("print verbose messages."), 0},
|
||||
{"allow-floppy", 'a', 0, 0,
|
||||
/* TRANSLATORS: The potential breakage isn't limited to floppies but it's
|
||||
-@@ -993,6 +999,7 @@ struct arguments
|
||||
+@@ -130,6 +132,7 @@ struct arguments
|
||||
char *core_file;
|
||||
char *dir;
|
||||
char *dev_map;
|
||||
@@ -52,7 +17,7 @@
|
||||
int force;
|
||||
int fs_probe;
|
||||
int allow_floppy;
|
||||
-@@ -1040,6 +1047,13 @@ argp_parser (int key, char *arg, struct
|
||||
+@@ -178,6 +181,13 @@ argp_parser (int key, char *arg, struct
|
||||
arguments->dev_map = xstrdup (arg);
|
||||
break;
|
||||
|
||||
@@ -66,12 +31,88 @@
|
||||
case 'f':
|
||||
arguments->force = 1;
|
||||
break;
|
||||
-@@ -1172,7 +1186,7 @@ main (int argc, char *argv[])
|
||||
- setup (arguments.dir ? : DEFAULT_DIRECTORY,
|
||||
- arguments.boot_file ? : DEFAULT_BOOT_FILE,
|
||||
- arguments.core_file ? : DEFAULT_CORE_FILE,
|
||||
-- dest_dev, arguments.force,
|
||||
-+ arguments.root_dev, dest_dev, arguments.force,
|
||||
- arguments.fs_probe, arguments.allow_floppy);
|
||||
+@@ -313,7 +323,7 @@ main (int argc, char *argv[])
|
||||
+ GRUB_SETUP_FUNC (arguments.dir ? : DEFAULT_DIRECTORY,
|
||||
+ arguments.boot_file ? : DEFAULT_BOOT_FILE,
|
||||
+ arguments.core_file ? : DEFAULT_CORE_FILE,
|
||||
+- dest_dev, arguments.force,
|
||||
++ arguments.root_dev, dest_dev, arguments.force,
|
||||
+ arguments.fs_probe, arguments.allow_floppy,
|
||||
+ arguments.add_rs_codes);
|
||||
+
|
||||
+--- a/util/setup.c
|
||||
++++ b/util/setup.c
|
||||
+@@ -247,13 +247,12 @@ identify_partmap (grub_disk_t disk __att
|
||||
+ void
|
||||
+ SETUP (const char *dir,
|
||||
+ const char *boot_file, const char *core_file,
|
||||
+- const char *dest, int force,
|
||||
++ const char *root, const char *dest, int force,
|
||||
+ int fs_probe, int allow_floppy,
|
||||
+ int add_rs_codes __attribute__ ((unused))) /* unused on sparc64 */
|
||||
+ {
|
||||
+ char *core_path;
|
||||
+ char *boot_img, *core_img, *boot_path;
|
||||
+- char *root = 0;
|
||||
+ size_t boot_size, core_size;
|
||||
+ #ifdef GRUB_SETUP_BIOS
|
||||
+ grub_uint16_t core_sectors;
|
||||
+@@ -307,7 +306,10 @@ SETUP (const char *dir,
|
||||
+
|
||||
+ core_dev = dest_dev;
|
||||
+
|
||||
+- {
|
||||
++ if (root)
|
||||
++ root_dev = grub_device_open(root);
|
||||
++
|
||||
++ if (!root_dev) {
|
||||
+ char **root_devices = grub_guess_root_devices (dir);
|
||||
+ char **cur;
|
||||
+ int found = 0;
|
||||
+@@ -317,6 +319,8 @@ SETUP (const char *dir,
|
||||
+ char *drive;
|
||||
+ grub_device_t try_dev;
|
||||
+
|
||||
++ if (root_dev)
|
||||
++ break;
|
||||
+ drive = grub_util_get_grub_dev (*cur);
|
||||
+ if (!drive)
|
||||
+ continue;
|
||||
+--- a/include/grub/util/install.h
|
||||
++++ b/include/grub/util/install.h
|
||||
+@@ -182,13 +182,13 @@ grub_install_get_image_target (const cha
|
||||
+ void
|
||||
+ grub_util_bios_setup (const char *dir,
|
||||
+ const char *boot_file, const char *core_file,
|
||||
+- const char *dest, int force,
|
||||
++ const char *root, const char *dest, int force,
|
||||
+ int fs_probe, int allow_floppy,
|
||||
+ int add_rs_codes);
|
||||
+ void
|
||||
+ grub_util_sparc_setup (const char *dir,
|
||||
+ const char *boot_file, const char *core_file,
|
||||
+- const char *dest, int force,
|
||||
++ const char *root, const char *dest, int force,
|
||||
+ int fs_probe, int allow_floppy,
|
||||
+ int add_rs_codes);
|
||||
|
||||
- /* Free resources. */
|
||||
+--- a/util/grub-install.c
|
||||
++++ b/util/grub-install.c
|
||||
+@@ -1660,7 +1660,7 @@ main (int argc, char *argv[])
|
||||
+ /* Now perform the installation. */
|
||||
+ if (install_bootsector)
|
||||
+ grub_util_bios_setup (platdir, "boot.img", "core.img",
|
||||
+- install_drive, force,
|
||||
++ NULL, install_drive, force,
|
||||
+ fs_probe, allow_floppy, add_rs_codes);
|
||||
+ break;
|
||||
+ }
|
||||
+@@ -1686,7 +1686,7 @@ main (int argc, char *argv[])
|
||||
+ /* Now perform the installation. */
|
||||
+ if (install_bootsector)
|
||||
+ grub_util_sparc_setup (platdir, "boot.img", "core.img",
|
||||
+- install_device, force,
|
||||
++ NULL, install_device, force,
|
||||
+ fs_probe, allow_floppy,
|
||||
+ 0 /* unused */ );
|
||||
+ break;
|
||||
diff --git a/package/grub2/patches/200-fix-gets-removal.patch b/package/grub2/patches/200-fix-gets-removal.patch
|
||||
index 4370fb5..737fb97 100644
|
||||
--- a/package/grub2/patches/200-fix-gets-removal.patch
|
||||
+++ b/package/grub2/patches/200-fix-gets-removal.patch
|
||||
@@ -1,15 +1,16 @@
|
||||
--- a/grub-core/gnulib/stdio.in.h
|
||||
+++ b/grub-core/gnulib/stdio.in.h
|
||||
-@@ -137,12 +137,6 @@
|
||||
- "use gnulib module fflush for portable POSIX compliance");
|
||||
+@@ -695,13 +695,6 @@ _GL_WARN_ON_USE (getline, "getline is un
|
||||
+ # endif
|
||||
#endif
|
||||
|
||||
-/* It is very rare that the developer ever has full control of stdin,
|
||||
-- so any use of gets warrants an unconditional warning. Assume it is
|
||||
-- always declared, since it is required by C89. */
|
||||
+- so any use of gets warrants an unconditional warning; besides, C11
|
||||
+- removed it. */
|
||||
-#undef gets
|
||||
--_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||
+-#if HAVE_RAW_DECL_GETS
|
||||
+-#endif
|
||||
-
|
||||
- #if @GNULIB_FOPEN@
|
||||
- # if @REPLACE_FOPEN@
|
||||
- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
+
|
||||
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
|
||||
+ struct obstack;
|
@ -1,20 +0,0 @@
|
||||
From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sun, 30 Mar 2014 19:55:39 +0000
|
||||
Subject: grub2: disable libdevmapper - fix build when it's available
|
||||
|
||||
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
|
||||
diff --git a/package/grub2/Makefile b/package/grub2/Makefile
|
||||
index 4edd92b..ed86fff 100644
|
||||
--- a/package/grub2/Makefile
|
||||
+++ b/package/grub2/Makefile
|
||||
@@ -46,7 +46,8 @@ endef
|
||||
CONFIGURE_ARGS += \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--disable-werror \
|
||||
- --disable-nls
|
||||
+ --disable-nls \
|
||||
+ --disable-device-mapper
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
@ -1,20 +0,0 @@
|
||||
From: nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
|
||||
Date: Sun, 30 Mar 2014 19:55:43 +0000
|
||||
Subject: grub2: disable mkfont - fix build on Archlinux
|
||||
|
||||
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
|
||||
diff --git a/package/grub2/Makefile b/package/grub2/Makefile
|
||||
index ed86fff..509fb60 100644
|
||||
--- a/package/grub2/Makefile
|
||||
+++ b/package/grub2/Makefile
|
||||
@@ -47,7 +47,8 @@ CONFIGURE_ARGS += \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--disable-werror \
|
||||
--disable-nls \
|
||||
- --disable-device-mapper
|
||||
+ --disable-device-mapper \
|
||||
+ --disable-grub-mkfont
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
@ -1,155 +0,0 @@
|
||||
From: Zhao, Gang <gamerh2o@gmail.com>
|
||||
Date: Wed, 21 May 2014 23:26:28 +0800
|
||||
Subject: ar71xx: add support for dlink dir-615-e1
|
||||
|
||||
Dlink dir-615-e1 can use dir-600-a1's image, but the image can't be
|
||||
uploaded through dlink's normal firmware update web page.
|
||||
|
||||
Add profile for dir-615-e1 so the generated image can be uploaded
|
||||
through the firmware update web page.
|
||||
|
||||
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
index 0d01119..c86044b 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
@@ -61,6 +61,7 @@ get_status_led() {
|
||||
status_led="db120:green:status"
|
||||
;;
|
||||
dir-600-a1 |\
|
||||
+ dir-615-e1 |\
|
||||
dir-615-e4)
|
||||
status_led="d-link:green:power"
|
||||
;;
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/leds b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
index f1ac9ec..98568fa 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
|
||||
@@ -52,6 +52,7 @@ rb750)
|
||||
;;
|
||||
|
||||
dir-600-a1|\
|
||||
+dir-615-e1|\
|
||||
dir-615-e4)
|
||||
ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "d-link:green:lan1" "switch0" "0x02"
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
index e38a9b8..a2ac224 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network
|
||||
@@ -182,6 +182,7 @@ ap96 |\
|
||||
airrouter |\
|
||||
dir-600-a1 |\
|
||||
dir-615-c1 |\
|
||||
+dir-615-e1 |\
|
||||
dir-615-e4 |\
|
||||
ja76pf |\
|
||||
rb-750 |\
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
index 11aa31b..9273012 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
@@ -201,6 +201,9 @@ ar71xx_board_detect() {
|
||||
*"DIR-600 rev. A1")
|
||||
name="dir-600-a1"
|
||||
;;
|
||||
+ *"DIR-615 rev. E1")
|
||||
+ name="dir-615-e1"
|
||||
+ ;;
|
||||
*"DIR-615 rev. E4")
|
||||
name="dir-615-e4"
|
||||
;;
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
index b25df6c..5fdd564 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
@@ -104,6 +104,7 @@ platform_check_image() {
|
||||
ap83 | \
|
||||
dir-600-a1 | \
|
||||
dir-615-c1 | \
|
||||
+ dir-615-e1 | \
|
||||
dir-615-e4 | \
|
||||
ew-dorin | \
|
||||
ew-dorin-router | \
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
|
||||
index c0fa900..321fdce 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
|
||||
@@ -141,6 +141,14 @@ static void __init dir_600_a1_setup(void)
|
||||
MIPS_MACHINE(ATH79_MACH_DIR_600_A1, "DIR-600-A1", "D-Link DIR-600 rev. A1",
|
||||
dir_600_a1_setup);
|
||||
|
||||
+static void __init dir_615_e1_setup(void)
|
||||
+{
|
||||
+ dir_600_a1_setup();
|
||||
+}
|
||||
+
|
||||
+MIPS_MACHINE(ATH79_MACH_DIR_615_E1, "DIR-615-E1", "D-Link DIR-615 rev. E1",
|
||||
+ dir_615_e1_setup);
|
||||
+
|
||||
static void __init dir_615_e4_setup(void)
|
||||
{
|
||||
dir_600_a1_setup();
|
||||
diff --git a/target/linux/ar71xx/generic/profiles/d-link.mk b/target/linux/ar71xx/generic/profiles/d-link.mk
|
||||
index 98fe00f..9a8ab1b 100644
|
||||
--- a/target/linux/ar71xx/generic/profiles/d-link.mk
|
||||
+++ b/target/linux/ar71xx/generic/profiles/d-link.mk
|
||||
@@ -38,6 +38,16 @@ endef
|
||||
|
||||
$(eval $(call Profile,DIR615C1))
|
||||
|
||||
+define Profile/DIR615E1
|
||||
+ NAME:=D-Link DIR-615 rev. E1
|
||||
+ PACKAGES:=
|
||||
+endef
|
||||
+
|
||||
+define Profile/DIR615E1/Description
|
||||
+ Package set optimized for the D-Link DIR-615 rev. E1.
|
||||
+endef
|
||||
+
|
||||
+$(eval $(call Profile,DIR615E1))
|
||||
|
||||
define Profile/DIR615E4
|
||||
NAME:=D-Link DIR-615 rev. E4
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index a055521..11ba068 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -804,6 +804,7 @@ $(eval $(call SingleProfile,AthLzma,$(fs_64k),PB92,pb92,PB92,ttyS0,115200,$$(pb9
|
||||
|
||||
$(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR600A1,dir-600-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-00"))
|
||||
$(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR601A1,dir-601-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-02"))
|
||||
+$(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR615E1,dir-615-e1,DIR-615-E1,ttyS0,115200,"AP93-AR7240-RT-081028-00"))
|
||||
$(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR615E4,dir-615-e4,DIR-615-E4,ttyS0,115200,"AP99-AR7240-RT-091105-05"))
|
||||
$(eval $(call SingleProfile,Cameo7240,$(fs_64k),FR54RTR,fr-54rtr,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-01"))
|
||||
|
||||
diff --git a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
|
||||
index 6d67f5f..c7d0220 100644
|
||||
--- a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
-@@ -16,18 +16,104 @@
|
||||
+@@ -16,18 +16,105 @@
|
||||
|
||||
enum ath79_mach_type {
|
||||
ATH79_MACH_GENERIC = 0,
|
||||
@@ -21,6 +21,7 @@
|
||||
ATH79_MACH_PB44, /* Atheros PB44 reference board */
|
||||
+ ATH79_MACH_DIR_600_A1, /* D-Link DIR-600 rev. A1 */
|
||||
+ ATH79_MACH_DIR_615_C1, /* D-Link DIR-615 rev. C1 */
|
||||
++ ATH79_MACH_DIR_615_E1, /* D-Link DIR-615 rev. E1 */
|
||||
+ ATH79_MACH_DIR_615_E4, /* D-Link DIR-615 rev. E4 */
|
||||
+ ATH79_MACH_DIR_825_B1, /* D-Link DIR-825 rev. B1 */
|
||||
+ ATH79_MACH_EW_DORIN, /* embedded wireless Dorin Platform */
|
||||
@@ -306,7 +307,7 @@
|
||||
+ select MYLOADER
|
||||
+
|
||||
+config ATH79_MACH_DIR_600_A1
|
||||
-+ bool "D-Link DIR-600 A1/DIR-615 E4 support"
|
||||
++ bool "D-Link DIR-600 A1/DIR-615 E1/DIR-615 E4 support"
|
||||
+ select SOC_AR724X
|
||||
+ select ATH79_DEV_AP9X_PCI if PCI
|
||||
+ select ATH79_DEV_ETH
|
@ -1,19 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 5 Jul 2014 22:30:34 +0200
|
||||
Subject: iptables: avoid file conflicts due to unneeded libip6t_*.so in ip6tables package
|
||||
|
||||
diff --git a/package/iptables/Makefile b/package/iptables/Makefile
|
||||
index e36a093..0c7a380 100644
|
||||
--- a/package/iptables/Makefile
|
||||
+++ b/package/iptables/Makefile
|
||||
@@ -406,10 +406,6 @@ define Package/ip6tables/install
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(1)/usr/sbin/
|
||||
$(LN) ip6tables $(1)/usr/sbin/ip6tables-save
|
||||
$(LN) ip6tables $(1)/usr/sbin/ip6tables-restore
|
||||
- $(INSTALL_DIR) $(1)/usr/lib/iptables
|
||||
- (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
|
||||
- $(CP) libip6t_*.so $(1)/usr/lib/iptables/ \
|
||||
- )
|
||||
endef
|
||||
|
||||
define Package/libiptc/install
|
@ -1,73 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 24 Jul 2014 03:00:23 +0200
|
||||
Subject: mac80211: add another ath9k patch
|
||||
|
||||
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
|
||||
index ba05bde..6197e0e 100644
|
||||
--- a/package/mac80211/patches/300-pending_work.patch
|
||||
+++ b/package/mac80211/patches/300-pending_work.patch
|
||||
@@ -1,3 +1,21 @@
|
||||
+commit ff354dbdd743e5fe186df8cd17982db19f78231a
|
||||
+Author: Felix Fietkau <nbd@openwrt.org>
|
||||
+Date: Wed Jul 23 15:33:26 2014 +0200
|
||||
+
|
||||
+ ath9k: fix aggregation session lockup
|
||||
+
|
||||
+ If an aggregation session fails, frames still end up in the driver queue
|
||||
+ with IEEE80211_TX_CTL_AMPDU set.
|
||||
+ This causes tx for the affected station/tid to stall, since
|
||||
+ ath_tx_get_tid_subframe returning packets to send.
|
||||
+
|
||||
+ Fix this by clearing IEEE80211_TX_CTL_AMPDU as long as no aggregation
|
||||
+ session is running.
|
||||
+
|
||||
+ Cc: stable@vger.kernel.org
|
||||
+ Reported-by: Antonio Quartulli <antonio@open-mesh.com>
|
||||
+ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
+
|
||||
commit 38695a6e5a940e6a524523b88a33916b016fb2a1
|
||||
Author: Felix Fietkau <nbd@openwrt.org>
|
||||
Date: Fri Jul 11 12:06:18 2014 +0200
|
||||
@@ -2990,7 +3008,23 @@ Date: Mon May 19 21:20:49 2014 +0200
|
||||
if (WARN_ON(--txq->pending_frames < 0))
|
||||
txq->pending_frames = 0;
|
||||
|
||||
-@@ -1999,6 +1997,7 @@ static void setup_frame_info(struct ieee
|
||||
+@@ -887,6 +885,15 @@ ath_tx_get_tid_subframe(struct ath_softc
|
||||
+
|
||||
+ tx_info = IEEE80211_SKB_CB(skb);
|
||||
+ tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT;
|
||||
++
|
||||
++ /*
|
||||
++ * No aggregation session is running, but there may be frames
|
||||
++ * from a previous session or a failed attempt in the queue.
|
||||
++ * Send them out as normal data frames
|
||||
++ */
|
||||
++ if (!tid->active)
|
||||
++ tx_info->flags &= ~IEEE80211_TX_CTL_AMPDU;
|
||||
++
|
||||
+ if (!(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) {
|
||||
+ bf->bf_state.bf_type = 0;
|
||||
+ return bf;
|
||||
+@@ -1999,6 +2006,7 @@ static void setup_frame_info(struct ieee
|
||||
an = (struct ath_node *) sta->drv_priv;
|
||||
|
||||
memset(fi, 0, sizeof(*fi));
|
||||
@@ -2998,7 +3032,7 @@ Date: Mon May 19 21:20:49 2014 +0200
|
||||
if (hw_key)
|
||||
fi->keyix = hw_key->hw_key_idx;
|
||||
else if (an && ieee80211_is_data(hdr->frame_control) && an->ps_key > 0)
|
||||
-@@ -2150,6 +2149,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
+@@ -2150,6 +2158,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
struct ieee80211_sta *sta = txctl->sta;
|
||||
struct ieee80211_vif *vif = info->control.vif;
|
||||
@@ -3006,7 +3040,7 @@ Date: Mon May 19 21:20:49 2014 +0200
|
||||
struct ath_softc *sc = hw->priv;
|
||||
struct ath_txq *txq = txctl->txq;
|
||||
struct ath_atx_tid *tid = NULL;
|
||||
-@@ -2170,11 +2170,13 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
+@@ -2170,11 +2179,13 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
q = skb_get_queue_mapping(skb);
|
||||
|
||||
ath_txq_lock(sc, txq);
|
@ -1,30 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 26 Jul 2014 17:03:40 +0200
|
||||
Subject: Reduce fw3 log spam in netifd scripts
|
||||
|
||||
diff --git a/package/netifd/files/lib/netifd/dhcp.script b/package/netifd/files/lib/netifd/dhcp.script
|
||||
index db3fc01..a7ce0d8 100755
|
||||
--- a/package/netifd/files/lib/netifd/dhcp.script
|
||||
+++ b/package/netifd/files/lib/netifd/dhcp.script
|
||||
@@ -50,7 +50,7 @@ setup_interface () {
|
||||
ip6rd="${ip6rd#* }"
|
||||
local ip6rdbr="${ip6rd%% *}"
|
||||
|
||||
- [ -n "$ZONE" ] || ZONE=$(fw3 network $INTERFACE)
|
||||
+ [ -n "$ZONE" ] || ZONE=$(fw3 network $INTERFACE 2>/dev/null)
|
||||
[ -z "$IFACE6RD" -o "$IFACE6RD" = 1 ] && IFACE6RD=${INTERFACE}_6rd
|
||||
|
||||
json_init
|
||||
diff --git a/package/odhcp6c/files/dhcpv6.script b/package/odhcp6c/files/dhcpv6.script
|
||||
index 8c1ba18..146a966 100755
|
||||
--- a/package/odhcp6c/files/dhcpv6.script
|
||||
+++ b/package/odhcp6c/files/dhcpv6.script
|
||||
@@ -97,7 +97,7 @@ setup_interface () {
|
||||
MAPRULE="$LW4O6"
|
||||
fi
|
||||
|
||||
- [ -n "$ZONE" ] || ZONE=$(fw3 network $INTERFACE)
|
||||
+ [ -n "$ZONE" ] || ZONE=$(fw3 network $INTERFACE 2>/dev/null)
|
||||
|
||||
if [ "$IFACE_MAP" != 0 -a -n "$MAPTYPE" -a -n "$MAPRULE" ]; then
|
||||
[ -z "$IFACE_MAP" -o "$IFACE_MAP" = 1 ] && IFACE_MAP=${INTERFACE}_map
|
@ -0,0 +1,14 @@
|
||||
From: Nils Schneider <nils@nilsschneider.net>
|
||||
Date: Sat, 9 Aug 2014 09:33:21 +0200
|
||||
Subject: fvalue.html: add label that can be styled
|
||||
|
||||
diff --git a/modules/base/luasrc/view/cbi/fvalue.htm b/modules/base/luasrc/view/cbi/fvalue.htm
|
||||
index a1e0808..a324ab2 100644
|
||||
--- a/modules/base/luasrc/view/cbi/fvalue.htm
|
||||
+++ b/modules/base/luasrc/view/cbi/fvalue.htm
|
||||
@@ -6,4 +6,5 @@
|
||||
attr("id", cbid) .. attr("name", cbid) .. attr("value", self.enabled or 1) ..
|
||||
ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked")
|
||||
%> />
|
||||
+ <label<%= attr("for", cbid)%>></label>
|
||||
<%+cbi/valuefooter%>
|
@ -1,106 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 16 May 2014 10:57:26 +0200
|
||||
Subject: libs/web: rename template_parser field "mmap" to the more generic "data"
|
||||
|
||||
diff --git a/libs/web/src/template_parser.c b/libs/web/src/template_parser.c
|
||||
index 6054451..fc8607b 100644
|
||||
--- a/libs/web/src/template_parser.c
|
||||
+++ b/libs/web/src/template_parser.c
|
||||
@@ -82,15 +82,15 @@ struct template_parser * template_open(const char *file)
|
||||
goto err;
|
||||
|
||||
parser->size = s.st_size;
|
||||
- parser->mmap = mmap(NULL, parser->size, PROT_READ, MAP_PRIVATE,
|
||||
+ parser->data = mmap(NULL, parser->size, PROT_READ, MAP_PRIVATE,
|
||||
parser->fd, 0);
|
||||
|
||||
- if (parser->mmap != MAP_FAILED)
|
||||
+ if (parser->data != MAP_FAILED)
|
||||
{
|
||||
- parser->off = parser->mmap;
|
||||
+ parser->off = parser->data;
|
||||
parser->cur_chunk.type = T_TYPE_INIT;
|
||||
- parser->cur_chunk.s = parser->mmap;
|
||||
- parser->cur_chunk.e = parser->mmap;
|
||||
+ parser->cur_chunk.s = parser->data;
|
||||
+ parser->cur_chunk.e = parser->data;
|
||||
|
||||
return parser;
|
||||
}
|
||||
@@ -108,8 +108,8 @@ void template_close(struct template_parser *parser)
|
||||
if (parser->gc != NULL)
|
||||
free(parser->gc);
|
||||
|
||||
- if ((parser->mmap != NULL) && (parser->mmap != MAP_FAILED))
|
||||
- munmap(parser->mmap, parser->size);
|
||||
+ if ((parser->data != NULL) && (parser->data != MAP_FAILED))
|
||||
+ munmap(parser->data, parser->size);
|
||||
|
||||
if (parser->fd >= 0)
|
||||
close(parser->fd);
|
||||
@@ -121,7 +121,7 @@ void template_text(struct template_parser *parser, const char *e)
|
||||
{
|
||||
const char *s = parser->off;
|
||||
|
||||
- if (s < (parser->mmap + parser->size))
|
||||
+ if (s < (parser->data + parser->size))
|
||||
{
|
||||
if (parser->strip_after)
|
||||
{
|
||||
@@ -291,7 +291,7 @@ template_format_chunk(struct template_parser *parser, size_t *sz)
|
||||
const char *template_reader(lua_State *L, void *ud, size_t *sz)
|
||||
{
|
||||
struct template_parser *parser = ud;
|
||||
- int rem = parser->size - (parser->off - parser->mmap);
|
||||
+ int rem = parser->size - (parser->off - parser->data);
|
||||
char *tag;
|
||||
|
||||
parser->prv_chunk = parser->cur_chunk;
|
||||
@@ -314,8 +314,8 @@ const char *template_reader(lua_State *L, void *ud, size_t *sz)
|
||||
}
|
||||
else
|
||||
{
|
||||
- template_text(parser, parser->mmap + parser->size);
|
||||
- parser->off = parser->mmap + parser->size;
|
||||
+ template_text(parser, parser->data + parser->size);
|
||||
+ parser->off = parser->data + parser->size;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ const char *template_reader(lua_State *L, void *ud, size_t *sz)
|
||||
else
|
||||
{
|
||||
/* unexpected EOF */
|
||||
- template_code(parser, parser->mmap + parser->size);
|
||||
+ template_code(parser, parser->data + parser->size);
|
||||
|
||||
*sz = 1;
|
||||
return "\033";
|
||||
@@ -366,12 +366,12 @@ int template_error(lua_State *L, struct template_parser *parser)
|
||||
|
||||
if (strfind((char *)err, strlen(err), "'char(27)'", 10) != NULL)
|
||||
{
|
||||
- off = parser->mmap + parser->size;
|
||||
+ off = parser->data + parser->size;
|
||||
err = "'%>' expected before end of file";
|
||||
chunkline = 0;
|
||||
}
|
||||
|
||||
- for (ptr = parser->mmap; ptr < off; ptr++)
|
||||
+ for (ptr = parser->data; ptr < off; ptr++)
|
||||
if (*ptr == '\n')
|
||||
line++;
|
||||
|
||||
diff --git a/libs/web/src/template_parser.h b/libs/web/src/template_parser.h
|
||||
index d1c6062..ad03cbc 100644
|
||||
--- a/libs/web/src/template_parser.h
|
||||
+++ b/libs/web/src/template_parser.h
|
||||
@@ -58,7 +58,7 @@ struct template_chunk {
|
||||
struct template_parser {
|
||||
int fd;
|
||||
uint32_t size;
|
||||
- char *mmap;
|
||||
+ char *data;
|
||||
char *off;
|
||||
char *gc;
|
||||
int line;
|
@ -1,17 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 16 May 2014 11:29:22 +0200
|
||||
Subject: libs/web: remove strange 'static' on variable declaration
|
||||
|
||||
diff --git a/libs/web/src/template_parser.c b/libs/web/src/template_parser.c
|
||||
index fc8607b..1aa5131 100644
|
||||
--- a/libs/web/src/template_parser.c
|
||||
+++ b/libs/web/src/template_parser.c
|
||||
@@ -66,7 +66,7 @@ static char *strfind(char *haystack, int hslen, const char *needle, int ndlen)
|
||||
struct template_parser * template_open(const char *file)
|
||||
{
|
||||
struct stat s;
|
||||
- static struct template_parser *parser;
|
||||
+ struct template_parser *parser;
|
||||
|
||||
if (!(parser = malloc(sizeof(*parser))))
|
||||
goto err;
|
@ -1,142 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 16 May 2014 11:37:21 +0200
|
||||
Subject: libs/web: add support for string templates to the template parser
|
||||
|
||||
diff --git a/libs/web/src/template_lualib.c b/libs/web/src/template_lualib.c
|
||||
index 0d43641..1035611 100644
|
||||
--- a/libs/web/src/template_lualib.c
|
||||
+++ b/libs/web/src/template_lualib.c
|
||||
@@ -18,10 +18,8 @@
|
||||
|
||||
#include "template_lualib.h"
|
||||
|
||||
-int template_L_parse(lua_State *L)
|
||||
+static int template_L_do_parse(lua_State *L, struct template_parser *parser, const char *chunkname)
|
||||
{
|
||||
- const char *file = luaL_checkstring(L, 1);
|
||||
- struct template_parser *parser = template_open(file);
|
||||
int lua_status, rv;
|
||||
|
||||
if (!parser)
|
||||
@@ -32,7 +30,7 @@ int template_L_parse(lua_State *L)
|
||||
return 3;
|
||||
}
|
||||
|
||||
- lua_status = lua_load(L, template_reader, parser, file);
|
||||
+ lua_status = lua_load(L, template_reader, parser, chunkname);
|
||||
|
||||
if (lua_status == 0)
|
||||
rv = 1;
|
||||
@@ -44,6 +42,23 @@ int template_L_parse(lua_State *L)
|
||||
return rv;
|
||||
}
|
||||
|
||||
+int template_L_parse(lua_State *L)
|
||||
+{
|
||||
+ const char *file = luaL_checkstring(L, 1);
|
||||
+ struct template_parser *parser = template_open(file);
|
||||
+
|
||||
+ return template_L_do_parse(L, parser, file);
|
||||
+}
|
||||
+
|
||||
+int template_L_parse_string(lua_State *L)
|
||||
+{
|
||||
+ size_t len;
|
||||
+ const char *str = luaL_checklstring(L, 1, &len);
|
||||
+ struct template_parser *parser = template_string(str, len);
|
||||
+
|
||||
+ return template_L_do_parse(L, parser, "[string]");
|
||||
+}
|
||||
+
|
||||
int template_L_utf8(lua_State *L)
|
||||
{
|
||||
size_t len = 0;
|
||||
@@ -146,6 +161,7 @@ static int template_L_hash(lua_State *L) {
|
||||
/* module table */
|
||||
static const luaL_reg R[] = {
|
||||
{ "parse", template_L_parse },
|
||||
+ { "parse_string", template_L_parse_string },
|
||||
{ "utf8", template_L_utf8 },
|
||||
{ "pcdata", template_L_pcdata },
|
||||
{ "striptags", template_L_striptags },
|
||||
diff --git a/libs/web/src/template_parser.c b/libs/web/src/template_parser.c
|
||||
index 1aa5131..c263fbf 100644
|
||||
--- a/libs/web/src/template_parser.c
|
||||
+++ b/libs/web/src/template_parser.c
|
||||
@@ -100,6 +100,36 @@ err:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+struct template_parser * template_string(const char *str, uint32_t len)
|
||||
+{
|
||||
+ struct template_parser *parser;
|
||||
+
|
||||
+ if (!str) {
|
||||
+ errno = EINVAL;
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
+ if (!(parser = malloc(sizeof(*parser))))
|
||||
+ goto err;
|
||||
+
|
||||
+ memset(parser, 0, sizeof(*parser));
|
||||
+ parser->fd = -1;
|
||||
+
|
||||
+ parser->size = len;
|
||||
+ parser->data = (char*)str;
|
||||
+
|
||||
+ parser->off = parser->data;
|
||||
+ parser->cur_chunk.type = T_TYPE_INIT;
|
||||
+ parser->cur_chunk.s = parser->data;
|
||||
+ parser->cur_chunk.e = parser->data;
|
||||
+
|
||||
+ return parser;
|
||||
+
|
||||
+err:
|
||||
+ template_close(parser);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
void template_close(struct template_parser *parser)
|
||||
{
|
||||
if (!parser)
|
||||
@@ -108,11 +138,14 @@ void template_close(struct template_parser *parser)
|
||||
if (parser->gc != NULL)
|
||||
free(parser->gc);
|
||||
|
||||
- if ((parser->data != NULL) && (parser->data != MAP_FAILED))
|
||||
- munmap(parser->data, parser->size);
|
||||
+ /* if file is not set, we were parsing a string */
|
||||
+ if (parser->file) {
|
||||
+ if ((parser->data != NULL) && (parser->data != MAP_FAILED))
|
||||
+ munmap(parser->data, parser->size);
|
||||
|
||||
- if (parser->fd >= 0)
|
||||
- close(parser->fd);
|
||||
+ if (parser->fd >= 0)
|
||||
+ close(parser->fd);
|
||||
+ }
|
||||
|
||||
free(parser);
|
||||
}
|
||||
@@ -376,7 +409,7 @@ int template_error(lua_State *L, struct template_parser *parser)
|
||||
line++;
|
||||
|
||||
snprintf(msg, sizeof(msg), "Syntax error in %s:%d: %s",
|
||||
- parser->file, line + chunkline, err ? err : "(unknown error)");
|
||||
+ parser->file ? parser->file : "[string]", line + chunkline, err ? err : "(unknown error)");
|
||||
|
||||
lua_pushnil(L);
|
||||
lua_pushinteger(L, line + chunkline);
|
||||
diff --git a/libs/web/src/template_parser.h b/libs/web/src/template_parser.h
|
||||
index ad03cbc..a3200a2 100644
|
||||
--- a/libs/web/src/template_parser.h
|
||||
+++ b/libs/web/src/template_parser.h
|
||||
@@ -71,6 +71,7 @@ struct template_parser {
|
||||
};
|
||||
|
||||
struct template_parser * template_open(const char *file);
|
||||
+struct template_parser * template_string(const char *str, uint32_t len);
|
||||
void template_close(struct template_parser *parser);
|
||||
|
||||
const char *template_reader(lua_State *L, void *ud, size_t *sz);
|
@ -1,67 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 16 May 2014 11:48:42 +0200
|
||||
Subject: libs/web: add support for string templates to luci.template module
|
||||
|
||||
diff --git a/libs/web/luasrc/template.lua b/libs/web/luasrc/template.lua
|
||||
index 72127d1..ea01d3c 100644
|
||||
--- a/libs/web/luasrc/template.lua
|
||||
+++ b/libs/web/luasrc/template.lua
|
||||
@@ -50,6 +50,13 @@ function render(name, scope)
|
||||
return Template(name):render(scope or getfenv(2))
|
||||
end
|
||||
|
||||
+--- Render a template from a string.
|
||||
+-- @param template Template string
|
||||
+-- @param scope Scope to assign to template (optional)
|
||||
+function render_string(template, scope)
|
||||
+ return Template(nil, template):render(scope or getfenv(2))
|
||||
+end
|
||||
+
|
||||
|
||||
-- Template class
|
||||
Template = util.class()
|
||||
@@ -59,11 +66,14 @@ Template.cache = setmetatable({}, {__mode = "v"})
|
||||
|
||||
|
||||
-- Constructor - Reads and compiles the template on-demand
|
||||
-function Template.__init__(self, name)
|
||||
+function Template.__init__(self, name, template)
|
||||
+ if name then
|
||||
+ self.template = self.cache[name]
|
||||
+ self.name = name
|
||||
+ else
|
||||
+ self.name = "[string]"
|
||||
+ end
|
||||
|
||||
- self.template = self.cache[name]
|
||||
- self.name = name
|
||||
-
|
||||
-- Create a new namespace for this template
|
||||
self.viewns = context.viewns
|
||||
|
||||
@@ -72,16 +82,22 @@ function Template.__init__(self, name)
|
||||
|
||||
-- Compile template
|
||||
local err
|
||||
- local sourcefile = viewdir .. "/" .. name .. ".htm"
|
||||
+ local sourcefile
|
||||
|
||||
- self.template, _, err = tparser.parse(sourcefile)
|
||||
+ if name then
|
||||
+ sourcefile = viewdir .. "/" .. name .. ".htm"
|
||||
+ self.template, _, err = tparser.parse(sourcefile)
|
||||
+ else
|
||||
+ sourcefile = "[string]"
|
||||
+ self.template, _, err = tparser.parse_string(template)
|
||||
+ end
|
||||
|
||||
-- If we have no valid template throw error, otherwise cache the template
|
||||
if not self.template then
|
||||
error("Failed to load template '" .. name .. "'.\n" ..
|
||||
"Error while parsing template '" .. sourcefile .. "':\n" ..
|
||||
(err or "Unknown syntax error"))
|
||||
- else
|
||||
+ elseif name then
|
||||
self.cache[name] = self.template
|
||||
end
|
||||
end
|
@ -0,0 +1,33 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 26 Jul 2014 18:06:07 +0200
|
||||
Subject: haveged: start directly after initial setup and disable tests
|
||||
|
||||
diff --git a/utils/haveged/Makefile b/utils/haveged/Makefile
|
||||
index aff998d..94c8c34 100644
|
||||
--- a/utils/haveged/Makefile
|
||||
+++ b/utils/haveged/Makefile
|
||||
@@ -42,8 +42,9 @@ define Package/libhavege
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS+= \
|
||||
- --enable-daemon=yes
|
||||
- --enable-threads=no
|
||||
+ --enable-daemon=yes \
|
||||
+ --enable-threads=no \
|
||||
+ --enable-olt=no
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
diff --git a/utils/haveged/files/haveged.init b/utils/haveged/files/haveged.init
|
||||
index ce28e61..113d64f 100644
|
||||
--- a/utils/haveged/files/haveged.init
|
||||
+++ b/utils/haveged/files/haveged.init
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2012 OpenWrt.org
|
||||
|
||||
-START=98
|
||||
+START=13
|
||||
|
||||
HAVEGED_THRESHOLD=1024
|
||||
HAVEGED_DCACHE=32
|
@ -1,187 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 12 Jan 2014 00:42:43 +0100
|
||||
Subject: radvd: update to 1.9.8 and add patch to fix race condition
|
||||
|
||||
diff --git a/ipv6/radvd/Makefile b/ipv6/radvd/Makefile
|
||||
index 571d9de..b14c02b 100644
|
||||
--- a/ipv6/radvd/Makefile
|
||||
+++ b/ipv6/radvd/Makefile
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=radvd
|
||||
-PKG_VERSION:=1.9.1
|
||||
-PKG_RELEASE:=2
|
||||
+PKG_VERSION:=1.9.8
|
||||
+PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://v6web.litech.org/radvd/dist \
|
||||
http://download.sourcemage.org/mirror
|
||||
-PKG_MD5SUM:=e807ad7e9a76d46b6133df391385cd31
|
||||
+PKG_MD5SUM:=7a96a38252c3964ee18bbc1fdeae25fa
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
||||
diff --git a/ipv6/radvd/patches/100-silent-netlink-config-reload.patch b/ipv6/radvd/patches/100-silent-netlink-config-reload.patch
|
||||
index 049d654..313b8cb 100644
|
||||
--- a/ipv6/radvd/patches/100-silent-netlink-config-reload.patch
|
||||
+++ b/ipv6/radvd/patches/100-silent-netlink-config-reload.patch
|
||||
@@ -1,26 +1,26 @@
|
||||
--- a/netlink.c
|
||||
+++ b/netlink.c
|
||||
-@@ -67,7 +67,7 @@ void process_netlink_msg(int sock)
|
||||
- else {
|
||||
- dlog(LOG_DEBUG, 3, "%s, ifindex %d, flags is *NOT* running", ifname, ifinfo->ifi_index);
|
||||
- }
|
||||
-- reload_config();
|
||||
-+ reload_config(LOG_DEBUG);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
+@@ -75,7 +75,7 @@ void process_netlink_msg(int sock)
|
||||
+ dlog(LOG_DEBUG, 3, "%s, ifindex %d, flags is *NOT* running", ifname, ifinfo->ifi_index);
|
||||
+ }
|
||||
+ if (!reloaded) {
|
||||
+- reload_config();
|
||||
++ reload_config(LOG_DEBUG);
|
||||
+ reloaded = 1;
|
||||
+ }
|
||||
+ }
|
||||
--- a/radvd.c
|
||||
+++ b/radvd.c
|
||||
@@ -443,7 +443,7 @@ void main_loop(void)
|
||||
- if (sighup_received)
|
||||
- {
|
||||
+
|
||||
+ if (sighup_received) {
|
||||
dlog(LOG_INFO, 3, "sig hup received.\n");
|
||||
- reload_config();
|
||||
+ reload_config(LOG_INFO);
|
||||
sighup_received = 0;
|
||||
}
|
||||
|
||||
-@@ -552,11 +552,11 @@ stop_adverts(void)
|
||||
+@@ -545,11 +545,11 @@ void stop_adverts(void)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
- flog(LOG_INFO, "attempting to reread config file");
|
||||
+ flog(loglevel, "attempting to reread config file");
|
||||
|
||||
- iface=IfaceList;
|
||||
- while(iface)
|
||||
-@@ -626,7 +626,7 @@ void reload_config(void)
|
||||
+ iface = IfaceList;
|
||||
+ while (iface) {
|
||||
+@@ -614,7 +614,7 @@ void reload_config(void)
|
||||
config_interface();
|
||||
kickoff_adverts();
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
+ flog(loglevel, "resuming normal operation");
|
||||
}
|
||||
|
||||
- void
|
||||
+ void sighup_handler(int sig)
|
||||
--- a/radvd.h
|
||||
+++ b/radvd.h
|
||||
-@@ -185,7 +185,7 @@ int yylex(void);
|
||||
+@@ -186,7 +186,7 @@ int yylex(void);
|
||||
|
||||
/* radvd.c */
|
||||
int check_ip6_forwarding(void);
|
||||
@@ -56,7 +56,7 @@
|
||||
/* timer.c */
|
||||
--- a/send.c
|
||||
+++ b/send.c
|
||||
-@@ -154,7 +154,7 @@ send_ra(struct Interface *iface, struct
|
||||
+@@ -143,7 +143,7 @@ int send_ra(struct Interface *iface, str
|
||||
* reload_config() will kick off new timers anyway. This avoids
|
||||
* timer list corruption.
|
||||
*/
|
||||
diff --git a/ipv6/radvd/patches/200-handle-setup_linklocal_addr-failure.patch b/ipv6/radvd/patches/200-handle-setup_linklocal_addr-failure.patch
|
||||
new file mode 100644
|
||||
index 0000000..3f22f76
|
||||
--- /dev/null
|
||||
+++ b/ipv6/radvd/patches/200-handle-setup_linklocal_addr-failure.patch
|
||||
@@ -0,0 +1,78 @@
|
||||
+diff --git a/device-linux.c b/device-linux.c
|
||||
+index bbf508d..054937e 100644
|
||||
+--- a/device-linux.c
|
||||
++++ b/device-linux.c
|
||||
+@@ -141,7 +141,13 @@ int setup_linklocal_addr(struct Interface *iface)
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+- flog(LOG_ERR, "no linklocal address configured for %s", iface->Name);
|
||||
++ if (iface->IgnoreIfMissing)
|
||||
++ dlog(LOG_DEBUG, 4, "no linklocal address configured for %s", iface->Name);
|
||||
++ else
|
||||
++ flog(LOG_ERR, "no linklocal address configured for %s", iface->Name);
|
||||
++
|
||||
++ iface->if_index = 0;
|
||||
++
|
||||
+ fclose(fp);
|
||||
+ return (-1);
|
||||
+ }
|
||||
+diff --git a/gram.y b/gram.y
|
||||
+index 9b453a1..3239848 100644
|
||||
+--- a/gram.y
|
||||
++++ b/gram.y
|
||||
+@@ -176,19 +176,33 @@ ifacedef : ifacehead '{' ifaceparams '}' ';'
|
||||
+ flog(LOG_ERR, "interface %s does not exist", iface->Name);
|
||||
+ ABORT;
|
||||
+ }
|
||||
++
|
||||
++ iface->HasFailed = 1;
|
||||
+ }
|
||||
+- if (update_device_info(iface) < 0)
|
||||
++ if (update_device_info(iface) < 0) {
|
||||
+ if (!iface->IgnoreIfMissing)
|
||||
+- ABORT;
|
||||
+- if (check_iface(iface) < 0)
|
||||
++ ABORT;
|
||||
++
|
||||
++ iface->HasFailed = 1;
|
||||
++ }
|
||||
++ if (check_iface(iface) < 0) {
|
||||
+ if (!iface->IgnoreIfMissing)
|
||||
+- ABORT;
|
||||
+- if (setup_linklocal_addr(iface) < 0)
|
||||
++ ABORT;
|
||||
++
|
||||
++ iface->HasFailed = 1;
|
||||
++ }
|
||||
++ if (setup_linklocal_addr(iface) < 0) {
|
||||
+ if (!iface->IgnoreIfMissing)
|
||||
+- ABORT;
|
||||
+- if (setup_allrouters_membership(iface) < 0)
|
||||
++ ABORT;
|
||||
++
|
||||
++ iface->HasFailed = 1;
|
||||
++ }
|
||||
++ if (setup_allrouters_membership(iface) < 0) {
|
||||
+ if (!iface->IgnoreIfMissing)
|
||||
+- ABORT;
|
||||
++ ABORT;
|
||||
++
|
||||
++ iface->HasFailed = 1;
|
||||
++ }
|
||||
+
|
||||
+ dlog(LOG_DEBUG, 4, "interface definition for %s is ok", iface->Name);
|
||||
+
|
||||
+diff --git a/send.c b/send.c
|
||||
+index 0d7ed5b..d6a3da2 100644
|
||||
+--- a/send.c
|
||||
++++ b/send.c
|
||||
+@@ -124,7 +124,7 @@ int send_ra(struct Interface *iface, struct in6_addr *dest)
|
||||
+ update_device_info(iface);
|
||||
+
|
||||
+ /* First we need to check that the interface hasn't been removed or deactivated */
|
||||
+- if (check_device(iface) < 0) {
|
||||
++ if (check_device(iface) < 0 || (iface->if_index == 0 && setup_linklocal_addr(iface) < 0)) {
|
||||
+ if (iface->IgnoreIfMissing) /* a bit more quiet warning message.. */
|
||||
+ dlog(LOG_DEBUG, 4, "interface %s does not exist, ignoring the interface", iface->Name);
|
||||
+ else {
|
100
patches/packages/openwrt/0002-fastd-update-to-v16.patch
Normal file
100
patches/packages/openwrt/0002-fastd-update-to-v16.patch
Normal file
@ -0,0 +1,100 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 15 Nov 2014 18:50:34 +0100
|
||||
Subject: fastd: update to v16
|
||||
|
||||
diff --git a/net/fastd/Config.in b/net/fastd/Config.in
|
||||
index ca4045c..8292245 100644
|
||||
--- a/net/fastd/Config.in
|
||||
+++ b/net/fastd/Config.in
|
||||
@@ -80,8 +80,14 @@ config FASTD_WITH_CMDLINE_COMMANDS
|
||||
default n
|
||||
|
||||
config FASTD_WITH_VERIFY
|
||||
- bool "Include support for on-verify handlers"
|
||||
- depends on PACKAGE_fastd
|
||||
- default n
|
||||
+ bool "Include support for on-verify handlers"
|
||||
+ depends on PACKAGE_fastd
|
||||
+ default n
|
||||
+
|
||||
+config FASTD_WITH_STATUS_SOCKET
|
||||
+ bool "Include support for status sockets"
|
||||
+ depends on PACKAGE_fastd
|
||||
+ default y
|
||||
+
|
||||
|
||||
endmenu
|
||||
diff --git a/net/fastd/Makefile b/net/fastd/Makefile
|
||||
index 0629cd7..acf973b 100644
|
||||
--- a/net/fastd/Makefile
|
||||
+++ b/net/fastd/Makefile
|
||||
@@ -8,13 +8,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fastd
|
||||
-PKG_VERSION:=14
|
||||
+PKG_VERSION:=16
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
-PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/75
|
||||
-PKG_MD5SUM:=34f6bdebd0410a1fba7c8fd06fff7a05
|
||||
+PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/78
|
||||
+PKG_MD5SUM:=135b3083d2743e335738de3bd4bb0c3c
|
||||
+
|
||||
+PKG_LICENSE:=BSD-2-Clause
|
||||
+PKG_LICENSE_FILE:=COPYRIGHT
|
||||
|
||||
PKG_CONFIG_DEPENDS:=\
|
||||
CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST \
|
||||
@@ -32,7 +35,8 @@ PKG_CONFIG_DEPENDS:=\
|
||||
CONFIG_FASTD_WITH_CMDLINE_LOGGING \
|
||||
CONFIG_FASTD_WITH_CMDLINE_OPERATION \
|
||||
CONFIG_FASTD_WITH_CMDLINE_COMMANDS \
|
||||
- CONFIG_FASTD_WITH_VERIFY
|
||||
+ CONFIG_FASTD_WITH_VERIFY \
|
||||
+ CONFIG_FASTD_WITH_STATUS_SOCKET
|
||||
|
||||
|
||||
PKG_BUILD_DEPENDS:=nacl libuecc
|
||||
@@ -43,7 +47,7 @@ include $(INCLUDE_DIR)/cmake.mk
|
||||
define Package/fastd
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
- DEPENDS:=+kmod-tun +librt +libpthread
|
||||
+ DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c
|
||||
TITLE:=Fast and Secure Tunneling Daemon
|
||||
URL:=https://projects.universe-factory.net/projects/fastd
|
||||
SUBMENU:=VPN
|
||||
@@ -74,6 +78,7 @@ CMAKE_OPTIONS += \
|
||||
-DWITH_CMDLINE_OPERATION:BOOL=FALSE \
|
||||
-DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
|
||||
-DWITH_VERIFY:BOOL=FALSE \
|
||||
+ -DWITH_STATUS_SOCKET:BOOL=FALSE \
|
||||
-DWITH_CAPABILITIES:BOOL=FALSE \
|
||||
-DENABLE_SYSTEMD:BOOL=FALSE \
|
||||
-DENABLE_LIBSODIUM:BOOL=FALSE \
|
||||
@@ -147,6 +152,10 @@ ifeq ($(CONFIG_FASTD_WITH_VERIFY),y)
|
||||
CMAKE_OPTIONS += -DWITH_VERIFY:BOOL=TRUE
|
||||
endif
|
||||
|
||||
+ifeq ($(CONFIG_FASTD_WITH_STATUS_SOCKET),y)
|
||||
+CMAKE_OPTIONS += -DWITH_STATUS_SOCKET:BOOL=TRUE
|
||||
+endif
|
||||
+
|
||||
|
||||
define Package/fastd/description
|
||||
Fast and secure tunneling daemon, which is optimized on small code size and few dependencies
|
||||
@@ -161,9 +170,9 @@ define Package/fastd/install
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fastd $(1)/usr/bin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
- $(INSTALL_BIN) files/fastd.init $(1)/etc/init.d/fastd
|
||||
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.init $(1)/etc/init.d/fastd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
- $(INSTALL_CONF) files/fastd.config $(1)/etc/config/fastd
|
||||
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.config $(1)/etc/config/fastd
|
||||
$(INSTALL_DIR) $(1)/etc/fastd
|
||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
||||
$(INSTALL_DATA) files/fastd.upgrade $(1)/lib/upgrade/keep.d/fastd
|
@ -1,17 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 12 Jan 2014 00:44:29 +0100
|
||||
Subject: haveged: start directly after the root partition has been mounted
|
||||
|
||||
diff --git a/utils/haveged/files/haveged.init b/utils/haveged/files/haveged.init
|
||||
index 129d951..2c5be1d 100644
|
||||
--- a/utils/haveged/files/haveged.init
|
||||
+++ b/utils/haveged/files/haveged.init
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2012 OpenWrt.org
|
||||
|
||||
-START=98
|
||||
+START=11
|
||||
|
||||
HAVEGED_THRESHOLD=1024
|
||||
HAVEGED_DCACHE=32
|
@ -1,21 +1,22 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 18 Jan 2014 21:52:09 +0100
|
||||
Date: Sat, 26 Jul 2014 18:58:22 +0200
|
||||
Subject: alfred: adjust intervals
|
||||
|
||||
diff --git a/alfred/patches/0003-alfred-adjust-intervals.patch b/alfred/patches/0003-alfred-adjust-intervals.patch
|
||||
diff --git a/alfred/patches/0001-alfred-adjust-intervals.patch b/alfred/patches/0001-alfred-adjust-intervals.patch
|
||||
new file mode 100644
|
||||
index 0000000..eb31f91
|
||||
index 0000000..e8ffd3a
|
||||
--- /dev/null
|
||||
+++ b/alfred/patches/0003-alfred-adjust-intervals.patch
|
||||
@@ -0,0 +1,14 @@
|
||||
+++ b/alfred/patches/0001-alfred-adjust-intervals.patch
|
||||
@@ -0,0 +1,15 @@
|
||||
+--- a/alfred.h
|
||||
++++ b/alfred.h
|
||||
+@@ -30,9 +30,9 @@
|
||||
+@@ -30,10 +30,10 @@
|
||||
+ #include "list.h"
|
||||
+ #include "packet.h"
|
||||
+
|
||||
+-#define ALFRED_INTERVAL 10
|
||||
++#define ALFRED_INTERVAL 60
|
||||
+ #define ALFRED_IF_CHECK_INTERVAL 60
|
||||
+ #define ALFRED_REQUEST_TIMEOUT 10
|
||||
+-#define ALFRED_SERVER_TIMEOUT 60
|
||||
++#define ALFRED_SERVER_TIMEOUT 180
|
@ -1,49 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 18 Jan 2014 21:15:16 +0100
|
||||
Subject: alfred: fix socket fd leak
|
||||
|
||||
diff --git a/alfred/patches/0002-batadv-vis-don-t-leak-socket-fd-in-get_if_mac.patch b/alfred/patches/0002-batadv-vis-don-t-leak-socket-fd-in-get_if_mac.patch
|
||||
new file mode 100644
|
||||
index 0000000..2374e25
|
||||
--- /dev/null
|
||||
+++ b/alfred/patches/0002-batadv-vis-don-t-leak-socket-fd-in-get_if_mac.patch
|
||||
@@ -0,0 +1,39 @@
|
||||
+From 449b94ee85a42fbabec550d920002ad07738e733 Mon Sep 17 00:00:00 2001
|
||||
+Message-Id: <449b94ee85a42fbabec550d920002ad07738e733.1390075976.git.mschiffer@universe-factory.net>
|
||||
+From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
+Date: Sat, 18 Jan 2014 21:04:05 +0100
|
||||
+Subject: [PATCH] batadv-vis: don't leak socket fd in get_if_mac()
|
||||
+
|
||||
+Leaking an fd every time get_if_mac() is called causes a batadv-vis server
|
||||
+process to hit the open file limit in a matter of hours when there are many
|
||||
+active interfaces and the limit is as low as 1024 (which it is on OpenWRT).
|
||||
+
|
||||
+Reported-by: Jan-Philipp Litza <janphilipp@litza.de>
|
||||
+Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
+---
|
||||
+ vis/vis.c | 7 ++++++-
|
||||
+ 1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
+
|
||||
+--- a/vis/vis.c
|
||||
++++ b/vis/vis.c
|
||||
+@@ -97,6 +97,7 @@ static int get_if_mac(char *ifname, uint
|
||||
+ {
|
||||
+ struct ifreq ifr;
|
||||
+ int sock;
|
||||
++ int ret;
|
||||
+
|
||||
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
|
||||
+
|
||||
+@@ -105,7 +106,11 @@ static int get_if_mac(char *ifname, uint
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+- if (ioctl(sock, SIOCGIFHWADDR, &ifr) == -1) {
|
||||
++ ret = ioctl(sock, SIOCGIFHWADDR, &ifr);
|
||||
++
|
||||
++ close(sock);
|
||||
++
|
||||
++ if (ret == -1) {
|
||||
+ fprintf(stderr, "can't get MAC address: %s\n", strerror(errno));
|
||||
+ return -1;
|
||||
+ }
|
@ -0,0 +1,36 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 30 Aug 2014 19:46:55 +0200
|
||||
Subject: Update batman-adv to v2014.3
|
||||
|
||||
diff --git a/batctl/Makefile b/batctl/Makefile
|
||||
index ae22286..43c9098 100644
|
||||
--- a/batctl/Makefile
|
||||
+++ b/batctl/Makefile
|
||||
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=batctl
|
||||
|
||||
-PKG_VERSION:=2014.2.0
|
||||
+PKG_VERSION:=2014.3.0
|
||||
PKG_RELEASE:=1
|
||||
-PKG_MD5SUM:=c196cf95b7324d9123b701a56b06b31d
|
||||
+PKG_MD5SUM:=7d2b8c129424c014d020c4b1a2add31b
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
|
||||
diff --git a/batman-adv/Makefile b/batman-adv/Makefile
|
||||
index 889dea7..6103cd2 100644
|
||||
--- a/batman-adv/Makefile
|
||||
+++ b/batman-adv/Makefile
|
||||
@@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=batman-adv
|
||||
|
||||
-PKG_VERSION:=2014.2.0
|
||||
+PKG_VERSION:=2014.3.0
|
||||
PKG_RELEASE:=1
|
||||
-PKG_MD5SUM:=1243029b3a3e2f4fa721d1a59c2faaf5
|
||||
+PKG_MD5SUM:=e9ee1d42ff4b0254699c779668054bed
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
|
@ -0,0 +1,195 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 22 Aug 2014 13:52:42 +0200
|
||||
Subject: batman-adv: introduce 'no_rebroadcast' option
|
||||
|
||||
diff --git a/batman-adv/patches/0001-batman-adv-introduce-no_rebroadcast-option.patch b/batman-adv/patches/0001-batman-adv-introduce-no_rebroadcast-option.patch
|
||||
new file mode 100644
|
||||
index 0000000..4f2da9a
|
||||
--- /dev/null
|
||||
+++ b/batman-adv/patches/0001-batman-adv-introduce-no_rebroadcast-option.patch
|
||||
@@ -0,0 +1,185 @@
|
||||
+From 382460a7114b734581970076d4dfe3011381e339 Mon Sep 17 00:00:00 2001
|
||||
+Message-Id: <382460a7114b734581970076d4dfe3011381e339.1408708010.git.mschiffer@universe-factory.net>
|
||||
+From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@web.de>
|
||||
+Date: Tue, 24 Sep 2013 04:36:27 +0200
|
||||
+Subject: [PATCH] batman-adv: introduce 'no_rebroadcast' option
|
||||
+MIME-Version: 1.0
|
||||
+Content-Type: text/plain; charset=UTF-8
|
||||
+Content-Transfer-Encoding: 8bit
|
||||
+
|
||||
+This patch introduces a new sysfs option named "no_rebroadcast" on
|
||||
+a per hard interface basis. It allows manually enabling a split-horizon
|
||||
+like behaviour for the layer 2 multicast payload frames, in that
|
||||
+incoming multicast payload frames on such a hard interface are only
|
||||
+being rebroadcasted on all interfaces except the incoming one instead
|
||||
+of being rebroadcasted on all interfaces.
|
||||
+
|
||||
+Such an option should only be enabled if you are certain that these
|
||||
+rebroadcasts are unnecessary. This is usually the case for instance
|
||||
+for point-to-point wifi longshots or wired links.
|
||||
+
|
||||
+This option can especially safe a significant amount of upload overhead
|
||||
+if the neighbourhood on a link is rather large, for instance in some
|
||||
+transitive, symmetric VPN configurations.
|
||||
+
|
||||
+Using this option wrongly will break your mesh network, use this option
|
||||
+wisely and at your own risk!
|
||||
+
|
||||
+Signed-off-by: Linus Lüssing <linus.luessing@web.de>
|
||||
+---
|
||||
+ hard-interface.c | 2 ++
|
||||
+ send.c | 4 ++++
|
||||
+ sysfs-class-net-batman-adv | 10 ++++++++
|
||||
+ sysfs.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
+ types.h | 1 +
|
||||
+ 5 files changed, 76 insertions(+)
|
||||
+
|
||||
+diff --git a/hard-interface.c b/hard-interface.c
|
||||
+index b851cc5..b222d82 100644
|
||||
+--- a/hard-interface.c
|
||||
++++ b/hard-interface.c
|
||||
+@@ -591,6 +591,8 @@ batadv_hardif_add_interface(struct net_device *net_dev)
|
||||
+ /* extra reference for return */
|
||||
+ atomic_set(&hard_iface->refcount, 2);
|
||||
+
|
||||
++ atomic_set(&hard_iface->no_rebroadcast, 0);
|
||||
++
|
||||
+ batadv_check_known_mac_addr(hard_iface->net_dev);
|
||||
+ list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list);
|
||||
+
|
||||
+diff --git a/send.c b/send.c
|
||||
+index d27161e..4383a66 100644
|
||||
+--- a/send.c
|
||||
++++ b/send.c
|
||||
+@@ -513,6 +513,10 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
|
||||
+ if (forw_packet->num_packets >= hard_iface->num_bcasts)
|
||||
+ continue;
|
||||
+
|
||||
++ if (atomic_read(&hard_iface->no_rebroadcast) &&
|
||||
++ forw_packet->skb->dev == hard_iface->net_dev)
|
||||
++ continue;
|
||||
++
|
||||
+ /* send a copy of the saved skb */
|
||||
+ skb1 = skb_clone(forw_packet->skb, GFP_ATOMIC);
|
||||
+ if (skb1)
|
||||
+diff --git a/sysfs-class-net-batman-adv b/sysfs-class-net-batman-adv
|
||||
+index 7f34a95..cf7fe00 100644
|
||||
+--- a/sysfs-class-net-batman-adv
|
||||
++++ b/sysfs-class-net-batman-adv
|
||||
+@@ -13,3 +13,13 @@ Description:
|
||||
+ displays the batman mesh interface this <iface>
|
||||
+ currently is associated with.
|
||||
+
|
||||
++What: /sys/class/net/<iface>/batman-adv/no_rebroadcast
|
||||
++Date: Sep 2013
|
||||
++Contact: Linus Lüssing <linus.luessing@web.de>
|
||||
++Description:
|
||||
++ With this option set incoming multicast payload frames on
|
||||
++ <iface> are not being rebroadcasted on <iface> again. This
|
||||
++ option should be set on links which are known to be transitive
|
||||
++ and symmetric only, for instance point-to-point wifi longshots
|
||||
++ or wired links. Using this option wrongly is going to
|
||||
++ break your mesh network, use at your own risk!
|
||||
+diff --git a/sysfs.c b/sysfs.c
|
||||
+index 1ebb0d9..780c52e 100644
|
||||
+--- a/sysfs.c
|
||||
++++ b/sysfs.c
|
||||
+@@ -108,6 +108,17 @@ struct batadv_attribute batadv_attr_vlan_##_name = { \
|
||||
+ .store = _store, \
|
||||
+ };
|
||||
+
|
||||
++/* Use this, if you have customized show and store functions
|
||||
++ * for hard interface attrs
|
||||
++ */
|
||||
++#define BATADV_ATTR_HIF(_name, _mode, _show, _store) \
|
||||
++struct batadv_attribute batadv_attr_hif_##_name = { \
|
||||
++ .attr = {.name = __stringify(_name), \
|
||||
++ .mode = _mode }, \
|
||||
++ .show = _show, \
|
||||
++ .store = _store, \
|
||||
++};
|
||||
++
|
||||
+ /* Use this, if you have customized show and store functions */
|
||||
+ #define BATADV_ATTR(_name, _mode, _show, _store) \
|
||||
+ struct batadv_attribute batadv_attr_##_name = { \
|
||||
+@@ -213,6 +224,52 @@ ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \
|
||||
+ static BATADV_ATTR_VLAN(_name, _mode, batadv_show_vlan_##_name, \
|
||||
+ batadv_store_vlan_##_name)
|
||||
+
|
||||
++#define BATADV_ATTR_HIF_STORE_BOOL(_name, _post_func) \
|
||||
++ssize_t batadv_store_hif_##_name(struct kobject *kobj, \
|
||||
++ struct attribute *attr, char *buff, \
|
||||
++ size_t count) \
|
||||
++{ \
|
||||
++ struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
|
||||
++ struct batadv_hard_iface *hard_iface; \
|
||||
++ size_t res; \
|
||||
++ \
|
||||
++ hard_iface = batadv_hardif_get_by_netdev(net_dev); \
|
||||
++ if (!hard_iface) \
|
||||
++ return 0; \
|
||||
++ \
|
||||
++ res = __batadv_store_bool_attr(buff, count, _post_func, \
|
||||
++ attr, &hard_iface->_name, \
|
||||
++ hard_iface->soft_iface); \
|
||||
++ batadv_hardif_free_ref(hard_iface); \
|
||||
++ return res; \
|
||||
++}
|
||||
++
|
||||
++#define BATADV_ATTR_HIF_SHOW_BOOL(_name) \
|
||||
++ssize_t batadv_show_hif_##_name(struct kobject *kobj, \
|
||||
++ struct attribute *attr, char *buff) \
|
||||
++{ \
|
||||
++ struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
|
||||
++ struct batadv_hard_iface *hard_iface; \
|
||||
++ size_t res; \
|
||||
++ \
|
||||
++ hard_iface = batadv_hardif_get_by_netdev(net_dev); \
|
||||
++ if (!hard_iface) \
|
||||
++ return 0; \
|
||||
++ \
|
||||
++ res = sprintf(buff, "%s\n", \
|
||||
++ atomic_read(&hard_iface->_name) == 0 ? \
|
||||
++ "disabled" : "enabled"); \
|
||||
++ batadv_hardif_free_ref(hard_iface); \
|
||||
++ return res; \
|
||||
++}
|
||||
++
|
||||
++/* Use this, if you are going to turn a [name] in the vlan struct on or off */
|
||||
++#define BATADV_ATTR_HIF_BOOL(_name, _mode, _post_func) \
|
||||
++ static BATADV_ATTR_HIF_STORE_BOOL(_name, _post_func) \
|
||||
++ static BATADV_ATTR_HIF_SHOW_BOOL(_name) \
|
||||
++ static BATADV_ATTR_HIF(_name, _mode, batadv_show_hif_##_name, \
|
||||
++ batadv_store_hif_##_name)
|
||||
++
|
||||
+ static int batadv_store_bool_attr(char *buff, size_t count,
|
||||
+ struct net_device *net_dev,
|
||||
+ const char *attr_name, atomic_t *attr)
|
||||
+@@ -834,10 +891,12 @@ static ssize_t batadv_show_iface_status(struct kobject *kobj,
|
||||
+ static BATADV_ATTR(mesh_iface, S_IRUGO | S_IWUSR, batadv_show_mesh_iface,
|
||||
+ batadv_store_mesh_iface);
|
||||
+ static BATADV_ATTR(iface_status, S_IRUGO, batadv_show_iface_status, NULL);
|
||||
++BATADV_ATTR_HIF_BOOL(no_rebroadcast, S_IRUGO | S_IWUSR, NULL);
|
||||
+
|
||||
+ static struct batadv_attribute *batadv_batman_attrs[] = {
|
||||
+ &batadv_attr_mesh_iface,
|
||||
+ &batadv_attr_iface_status,
|
||||
++ &batadv_attr_hif_no_rebroadcast,
|
||||
+ NULL,
|
||||
+ };
|
||||
+
|
||||
+diff --git a/types.h b/types.h
|
||||
+index 8854c05..39619fb 100644
|
||||
+--- a/types.h
|
||||
++++ b/types.h
|
||||
+@@ -101,6 +101,7 @@ struct batadv_hard_iface {
|
||||
+ struct batadv_hard_iface_bat_iv bat_iv;
|
||||
+ struct work_struct cleanup_work;
|
||||
+ struct dentry *debug_dir;
|
||||
++ atomic_t no_rebroadcast;
|
||||
+ };
|
||||
+
|
||||
+ /**
|
||||
+--
|
||||
+2.1.0
|
||||
+
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
d6597ebf6203328d3519ea3c3371a493
|
||||
0114c71ed85677c9c1e4911437af4743
|
||||
|
@ -2,6 +2,14 @@
|
||||
|
||||
## TP-Link
|
||||
|
||||
# TL-WR703N v1
|
||||
$(eval $(call GluonProfile,TLWR703))
|
||||
$(eval $(call GluonModel,TLWR703,tl-wr703n-v1-squashfs,tp-link-tl-wr703n-v1))
|
||||
|
||||
# TL-WR710N v1
|
||||
$(eval $(call GluonProfile,TLWR710))
|
||||
$(eval $(call GluonModel,TLWR710,tl-wr710n-v1-squashfs,tp-link-tl-wr710n-v1))
|
||||
|
||||
# TL-WR740N v1, v3, v4
|
||||
$(eval $(call GluonProfile,TLWR740))
|
||||
$(eval $(call GluonModel,TLWR740,tl-wr740n-v1-squashfs,tp-link-tl-wr740n-nd-v1))
|
||||
@ -14,6 +22,10 @@ $(eval $(call GluonModel,TLWR741,tl-wr741nd-v1-squashfs,tp-link-tl-wr741n-nd-v1)
|
||||
$(eval $(call GluonModel,TLWR741,tl-wr741nd-v2-squashfs,tp-link-tl-wr741n-nd-v2))
|
||||
$(eval $(call GluonModel,TLWR741,tl-wr741nd-v4-squashfs,tp-link-tl-wr741n-nd-v4))
|
||||
|
||||
# TL-WR801N/ND v2
|
||||
$(eval $(call GluonProfile,TLWA801))
|
||||
$(eval $(call GluonModel,TLWA801,tl-wa801nd-v2-squashfs,tp-link-tl-wa801n-nd-v2))
|
||||
|
||||
# TL-WR841N/ND v3, v5, v7, v8, v9
|
||||
$(eval $(call GluonProfile,TLWR841))
|
||||
$(eval $(call GluonModel,TLWR841,tl-wr841nd-v3-squashfs,tp-link-tl-wr841n-nd-v3))
|
||||
@ -33,9 +45,10 @@ $(eval $(call GluonModel,TLWR941,tl-wr941nd-v2-squashfs,tp-link-tl-wr941n-nd-v2)
|
||||
$(eval $(call GluonModel,TLWR941,tl-wr941nd-v3-squashfs,tp-link-tl-wr941n-nd-v3))
|
||||
$(eval $(call GluonModel,TLWR941,tl-wr941nd-v4-squashfs,tp-link-tl-wr941n-nd-v4))
|
||||
|
||||
# TL-WR1043N/ND v1
|
||||
# TL-WR1043N/ND v1, v2
|
||||
$(eval $(call GluonProfile,TLWR1043))
|
||||
$(eval $(call GluonModel,TLWR1043,tl-wr1043nd-v1-squashfs,tp-link-tl-wr1043n-nd-v1))
|
||||
$(eval $(call GluonModel,TLWR1043,tl-wr1043nd-v2-squashfs,tp-link-tl-wr1043n-nd-v2))
|
||||
|
||||
# TL-WDR3500/3600/4300 v1
|
||||
$(eval $(call GluonProfile,TLWDR4300))
|
||||
@ -43,6 +56,14 @@ $(eval $(call GluonModel,TLWDR4300,tl-wdr3500-v1-squashfs,tp-link-tl-wdr3500-v1)
|
||||
$(eval $(call GluonModel,TLWDR4300,tl-wdr3600-v1-squashfs,tp-link-tl-wdr3600-v1))
|
||||
$(eval $(call GluonModel,TLWDR4300,tl-wdr4300-v1-squashfs,tp-link-tl-wdr4300-v1))
|
||||
|
||||
# TL-WA750RE v1
|
||||
$(eval $(call GluonProfile,TLWA750))
|
||||
$(eval $(call GluonModel,TLWA750,tl-wa750re-v1-squashfs,tp-link-tl-wa750re-v1))
|
||||
|
||||
# TL-WA850RE v1
|
||||
$(eval $(call GluonProfile,TLWA850))
|
||||
$(eval $(call GluonModel,TLWA850,tl-wa850re-v1-squashfs,tp-link-tl-wa850re-v1))
|
||||
|
||||
# TL-WA901N/ND v2
|
||||
$(eval $(call GluonProfile,TLWA901))
|
||||
$(eval $(call GluonModel,TLWA901,tl-wa901nd-v2-squashfs,tp-link-tl-wa901n-nd-v2))
|
||||
@ -51,9 +72,10 @@ $(eval $(call GluonModel,TLWA901,tl-wa901nd-v2-squashfs,tp-link-tl-wa901n-nd-v2)
|
||||
$(eval $(call GluonProfile,TLMR3020))
|
||||
$(eval $(call GluonModel,TLMR3020,tl-mr3020-v1-squashfs,tp-link-tl-mr3020-v1))
|
||||
|
||||
# TL-MR3040 v1
|
||||
# TL-MR3040 v1, v2
|
||||
$(eval $(call GluonProfile,TLMR3040))
|
||||
$(eval $(call GluonModel,TLMR3040,tl-mr3040-v1-squashfs,tp-link-tl-mr3040-v1))
|
||||
$(eval $(call GluonModel,TLMR3040,tl-mr3040-v2-squashfs,tp-link-tl-mr3040-v2))
|
||||
|
||||
# TL-MR3220 v1
|
||||
$(eval $(call GluonProfile,TLMR3220))
|
||||
@ -64,6 +86,11 @@ $(eval $(call GluonProfile,TLMR3420))
|
||||
$(eval $(call GluonModel,TLMR3420,tl-mr3420-v1-squashfs,tp-link-tl-mr3420-v1))
|
||||
$(eval $(call GluonModel,TLMR3420,tl-mr3420-v2-squashfs,tp-link-tl-mr3420-v2))
|
||||
|
||||
ifeq ($(BROKEN),1)
|
||||
# Archer C7 v2
|
||||
$(eval $(call GluonProfile,ARCHERC7,kmod-ath10k))
|
||||
$(eval $(call GluonModel,ARCHERC7,archer-c7-v2-squashfs,tp-link-archer-c7-v2))
|
||||
endif
|
||||
|
||||
## Ubiquiti (everything)
|
||||
$(eval $(call GluonProfile,UBNT))
|
||||
@ -71,13 +98,16 @@ $(eval $(call GluonModel,UBNT,ubnt-bullet-m-squashfs,ubiquiti-bullet-m))
|
||||
$(eval $(call GluonModel,UBNT,ubnt-nano-m-squashfs,ubiquiti-nanostation-m))
|
||||
$(eval $(call GluonModel,UBNT,ubnt-unifi-squashfs,ubiquiti-unifi))
|
||||
$(eval $(call GluonModel,UBNT,ubnt-unifi-outdoor-squashfs,ubiquiti-unifiap-outdoor))
|
||||
ifeq ($(BROKEN),1)
|
||||
$(eval $(call GluonModel,UBNT,ubnt-uap-pro-squashfs,ubiquiti-unifi-ap-pro))
|
||||
endif
|
||||
|
||||
|
||||
## D-Link
|
||||
|
||||
# D-Link DIR-615 rev. E1
|
||||
$(eval $(call GluonProfile,DIR615E1))
|
||||
$(eval $(call GluonModel,DIR615E1,dir-615-e1-squashfs,d-link-dir-615-rev-e1))
|
||||
#$(eval $(call GluonProfile,DIR615E1))
|
||||
#$(eval $(call GluonModel,DIR615E1,dir-615-e1-squashfs,d-link-dir-615-rev-e1))
|
||||
|
||||
# D-Link DIR-825 rev. B1
|
||||
$(eval $(call GluonProfile,DIR825B1))
|
||||
@ -95,3 +125,7 @@ $(eval $(call GluonModel,WRT160NL,wrt160nl-squashfs,linksys-wrt160nl))
|
||||
# WZR-HP-G450H
|
||||
$(eval $(call GluonProfile,WZRHPG450H))
|
||||
$(eval $(call GluonModel,WZRHPG450H,wzr-hp-g450h-squashfs,buffalo-wzr-hp-g450h))
|
||||
|
||||
# WZR-HP-AG300H/WZR-600DHP
|
||||
$(eval $(call GluonProfile,WZRHPAG300H))
|
||||
$(eval $(call GluonModel,WZRHPAG300H,wzr-hp-ag300h-squashfs,buffalo-wzr-hp-ag300h-wzr-600dhp))
|
||||
|
1
targets/mpc85xx-generic/config
Normal file
1
targets/mpc85xx-generic/config
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_TARGET_mpc85xx=y
|
3947
targets/mpc85xx-generic/kernel-config
Normal file
3947
targets/mpc85xx-generic/kernel-config
Normal file
File diff suppressed because it is too large
Load Diff
1
targets/mpc85xx-generic/kernel-vermagic
Normal file
1
targets/mpc85xx-generic/kernel-vermagic
Normal file
@ -0,0 +1 @@
|
||||
c1a44dd429e530bed2958b8e6cb54a52
|
7
targets/mpc85xx-generic/profiles.mk
Normal file
7
targets/mpc85xx-generic/profiles.mk
Normal file
@ -0,0 +1,7 @@
|
||||
# List of hardware profiles
|
||||
|
||||
## TP-Link
|
||||
|
||||
# TL-WDR4900 v1
|
||||
$(eval $(call GluonProfile,TLWDR4900))
|
||||
$(eval $(call GluonModel,TLWDR4900,tl-wdr4900-v1-squashfs,tp-link-tl-wdr4900-v1))
|
@ -1,5 +1,6 @@
|
||||
$(eval $(call GluonTarget,ar71xx,generic))
|
||||
$(eval $(call GluonTarget,mpc85xx,generic))
|
||||
|
||||
ifeq ($(BROKEN),1)
|
||||
ifneq ($(BROKEN),)
|
||||
$(eval $(call GluonTarget,x86,generic))
|
||||
endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
fa7af62e0ef1d529ecb7f7efccc706c3
|
||||
3051dee8f07064b727e9d57fbfeb05ec
|
||||
|
Loading…
Reference in New Issue
Block a user