Merged updates from upstream & resolved conflicts
This commit is contained in:
commit
2239af0b62
0
contrib/sign.sh
Executable file → Normal file
0
contrib/sign.sh
Executable file → Normal file
@ -26,7 +26,7 @@ $(GLUON_SITEDIR)/site.mk:
|
||||
GLUON_VERSION := $(shell cd $(GLUONDIR) && git describe --always 2>/dev/null || echo unknown)
|
||||
export GLUON_VERSION
|
||||
|
||||
GLUON_CONFIG_VERSION := $(shell cd $(GLUON_SITEDIR) && git describe --always --dirty=.$$(stat -c %Y $(GLUON_SITEDIR)/site.conf) 2>/dev/null || stat -c %Y site.conf)
|
||||
GLUON_CONFIG_VERSION := $(shell test -d $(GLUON_SITEDIR) && (cd $(GLUON_SITEDIR) && git describe --always --dirty=.$$(stat -c %Y $(GLUON_SITEDIR)/site.conf) 2>/dev/null || stat -c %Y site.conf))
|
||||
export GLUON_CONFIG_VERSION
|
||||
|
||||
GLUON_SITE_CODE := $(shell $(GLUONDIR)/scripts/site.sh site_code)
|
||||
|
@ -14,12 +14,13 @@ $(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-WR841N/ND v3, v5, v7, v8
|
||||
# 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))
|
||||
$(eval $(call GluonModel,TLWR841,tl-wr841nd-v5-squashfs,tp-link-tl-wr841n-nd-v5))
|
||||
$(eval $(call GluonModel,TLWR841,tl-wr841nd-v7-squashfs,tp-link-tl-wr841n-nd-v7))
|
||||
$(eval $(call GluonModel,TLWR841,tl-wr841n-v8-squashfs,tp-link-tl-wr841n-nd-v8))
|
||||
$(eval $(call GluonModel,TLWR841,tl-wr841n-v9-squashfs,tp-link-tl-wr841n-nd-v9))
|
||||
|
||||
# TL-WR842N/ND v1
|
||||
$(eval $(call GluonProfile,TLWR842))
|
||||
@ -41,6 +42,10 @@ $(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-WA901N/ND v2
|
||||
$(eval $(call GluonProfile,TLWA901))
|
||||
$(eval $(call GluonModel,TLWA901,tl-wa901nd-v2-squashfs,tp-link-tl-wa901n-nd-v2))
|
||||
|
||||
# TL-MR3020 v1
|
||||
$(eval $(call GluonProfile,TLMR3020))
|
||||
$(eval $(call GluonModel,TLMR3020,tl-mr3020-v1-squashfs,tp-link-tl-mr3020-v1))
|
||||
@ -63,3 +68,7 @@ $(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))
|
||||
|
||||
# D-Link DIR-825 rev. B1
|
||||
$(eval $(call GluonProfile,DIR825B1))
|
||||
$(eval $(call GluonModel,DIR825B1,dir-825-b1-squashfs,d-link-dir-825-rev-b1))
|
||||
|
@ -10,9 +10,9 @@
|
||||
RELEASE:=Attitude Adjustment
|
||||
PREP_MK= OPENWRT_BUILD= QUIET=0
|
||||
|
||||
-include $(TOPDIR)/include/verbose.mk
|
||||
include $(GLUONDIR)/include/verbose.mk
|
||||
|
||||
REVISION:=$(shell cd $(TOPDIR) && ./scripts/getver.sh 2>/dev/null)
|
||||
REVISION:=$(shell [ -d $(TOPDIR) ] && cd $(TOPDIR) && ./scripts/getver.sh 2>/dev/null)
|
||||
|
||||
HOSTCC ?= gcc
|
||||
OPENWRTVERSION:=$(RELEASE)$(if $(REVISION), ($(REVISION)))
|
||||
|
61
include/verbose.mk
Normal file
61
include/verbose.mk
Normal file
@ -0,0 +1,61 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
ifndef OPENWRT_VERBOSE
|
||||
OPENWRT_VERBOSE:=
|
||||
endif
|
||||
ifeq ("$(origin V)", "command line")
|
||||
OPENWRT_VERBOSE:=$(V)
|
||||
endif
|
||||
|
||||
ifeq ($(OPENWRT_VERBOSE),1)
|
||||
OPENWRT_VERBOSE:=w
|
||||
endif
|
||||
ifeq ($(OPENWRT_VERBOSE),99)
|
||||
OPENWRT_VERBOSE:=s
|
||||
endif
|
||||
|
||||
ifeq ($(NO_TRACE_MAKE),)
|
||||
NO_TRACE_MAKE := $(MAKE) V=s$(OPENWRT_VERBOSE)
|
||||
export NO_TRACE_MAKE
|
||||
endif
|
||||
|
||||
ifeq ($(IS_TTY),1)
|
||||
ifneq ($(strip $(NO_COLOR)),1)
|
||||
_Y:=\\033[33m
|
||||
_N:=\\033[m
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
|
||||
define MESSAGE
|
||||
printf "$(_Y)%s$(_N)\n" "$(1)" >&8
|
||||
endef
|
||||
|
||||
ifeq ($(QUIET),1)
|
||||
ifneq ($(CURDIR),$(TOPDIR))
|
||||
_DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
|
||||
else
|
||||
_DIR:=
|
||||
endif
|
||||
_NULL:=$(if $(MAKECMDGOALS),$(shell \
|
||||
$(call MESSAGE, make[$(MAKELEVEL)]$(if $(_DIR), -C $(_DIR)) $(MAKECMDGOALS)); \
|
||||
))
|
||||
SUBMAKE=$(MAKE)
|
||||
else
|
||||
SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
|
||||
export QUIET:=1
|
||||
SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: build failed. Please re-run make with V=s to see what's going on"; false; } } 8>&1 9>&2; cmd
|
||||
endif
|
||||
|
||||
.SILENT: $(MAKECMDGOALS)
|
||||
else
|
||||
SUBMAKE=$(MAKE) -w
|
||||
define MESSAGE
|
||||
printf "%s\n" "$(1)"
|
||||
endef
|
||||
endif
|
@ -112,6 +112,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_TL_WR1041N_V2=y
|
||||
CONFIG_ATH79_MACH_TL_WR1043ND=y
|
||||
@ -128,6 +129,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_ATH79_DEV_AP9X_PCI=y
|
||||
CONFIG_ATH79_DEV_DSA=y
|
||||
|
15
modules
15
modules
@ -1,16 +1,13 @@
|
||||
GLUON_FEEDS='openwrt mac80211 gluon routing luci'
|
||||
GLUON_FEEDS='openwrt gluon routing luci'
|
||||
|
||||
OPENWRT_REPO=git://nbd.name/attitude_adjustment.git
|
||||
OPENWRT_COMMIT=cd567dd89a246d8027646ebed49a70e47a14dad6
|
||||
OPENWRT_REPO=git://git.openwrt.org/12.09/openwrt.git
|
||||
OPENWRT_COMMIT=bccb82223911823bf4ab040997757708b002a75f
|
||||
|
||||
PACKAGES_OPENWRT_REPO=git://nbd.name/packages_12.09.git
|
||||
PACKAGES_OPENWRT_COMMIT=c67cd451ac28058a4992ba9eb2eb5551f6cd1adb
|
||||
|
||||
PACKAGES_MAC80211_REPO=git://nbd.name/aa-mac80211.git
|
||||
PACKAGES_MAC80211_COMMIT=8d86801ae606544faee1e0e25ef59a3f8f059871
|
||||
PACKAGES_OPENWRT_REPO=git://git.openwrt.org/12.09/packages.git
|
||||
PACKAGES_OPENWRT_COMMIT=381bbea65989b63e30f43ab87e51b042325bbff3
|
||||
|
||||
PACKAGES_GLUON_REPO=git://github.com/ffrl/packages.git
|
||||
PACKAGES_GLUON_COMMIT=c7911677c381b325cc49d23ce03a14b4297b463d
|
||||
PACKAGES_GLUON_COMMIT=2ced9d31f75624a7b02067e167cb34d77c4f9eb8
|
||||
|
||||
PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
|
||||
PACKAGES_ROUTING_COMMIT=0e4201a983df967e88e6ce5451f5f5f99bab2370
|
||||
|
@ -0,0 +1,311 @@
|
||||
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
|
||||
|
||||
diff --git a/package/libubox/Makefile b/package/libubox/Makefile
|
||||
index bcf4481..fc9834a 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-03-18
|
||||
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:=4f44401ae8d23465261cef80b87630ffccd5a864
|
||||
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..1d7f363 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-04-19
|
||||
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:=ede9739fe90f5da09f14481d10a4f11c000072de
|
||||
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..948c3cd 100755
|
||||
--- a/package/netifd/files/lib/netifd/dhcp.script
|
||||
+++ b/package/netifd/files/lib/netifd/dhcp.script
|
||||
@@ -44,19 +44,20 @@ 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
|
||||
+ 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" ] && json_add_string zone "$ZONE6RD"
|
||||
+ json_close_object
|
||||
|
||||
- ifdown "$IFACE6RD"
|
||||
- /etc/init.d/network reload
|
||||
- ifup "$IFACE6RD"
|
||||
+ 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..2e58c19 100755
|
||||
--- a/package/netifd/files/lib/netifd/proto/dhcp.sh
|
||||
+++ b/package/netifd/files/lib/netifd/proto/dhcp.sh
|
||||
@@ -5,31 +5,42 @@
|
||||
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_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
|
||||
+ json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd
|
||||
|
||||
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"
|
||||
+ [ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
|
||||
|
||||
proto_export "INTERFACE=$config"
|
||||
proto_run_command "$config" udhcpc \
|
||||
@@ -42,6 +53,13 @@ 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"
|
||||
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/ubus/Makefile b/package/ubus/Makefile
|
||||
index be18fb5..53fb586 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-03-18
|
||||
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:=1d5ac421a5b3dca60562e876ba70d0c2fe46b3d2
|
||||
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
|
@ -1,128 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 11 Jan 2014 11:47:31 +0100
|
||||
Subject: Update netifd from Barrier Breaker
|
||||
|
||||
diff --git a/package/netifd/Makefile b/package/netifd/Makefile
|
||||
index 5f2ee03..6f6f30e 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:=2013-12-29
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git://nbd.name/luci2/netifd.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
-PKG_SOURCE_VERSION:=2674941b06c1ec67f1aff1bff9212e1372106641
|
||||
+PKG_SOURCE_VERSION:=7d79d0a8aa5a5b4c1ed987af119356438d98fe7b
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||
# PKG_MIRROR_MD5SUM:=
|
||||
@@ -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..77b77f5 100755
|
||||
--- a/package/netifd/files/lib/netifd/dhcp.script
|
||||
+++ b/package/netifd/files/lib/netifd/dhcp.script
|
||||
@@ -44,19 +44,18 @@ 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
|
||||
+ 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"
|
||||
+ json_close_object
|
||||
|
||||
- ifdown "$IFACE6RD"
|
||||
- /etc/init.d/network reload
|
||||
- ifup "$IFACE6RD"
|
||||
+ 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..0117b27 100755
|
||||
--- a/package/netifd/files/lib/netifd/proto/dhcp.sh
|
||||
+++ b/package/netifd/files/lib/netifd/proto/dhcp.sh
|
||||
@@ -13,20 +13,25 @@ proto_dhcp_init_config() {
|
||||
proto_config_add_boolean "broadcast"
|
||||
proto_config_add_string "reqopts"
|
||||
proto_config_add_string "iface6rd"
|
||||
+ proto_config_add_string "sendopts"
|
||||
}
|
||||
|
||||
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
|
||||
+ json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts
|
||||
|
||||
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"
|
||||
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)
|
@ -1,9 +1,9 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 11 Jan 2014 11:47:58 +0100
|
||||
Subject: Update odhcp6c to latest git master
|
||||
Subject: Update odhcp6c from Barrier Breaker
|
||||
|
||||
diff --git a/package/odhcp6c/Makefile b/package/odhcp6c/Makefile
|
||||
index e37b72e..ed51b98 100644
|
||||
index e767064..f18e7fa 100644
|
||||
--- a/package/odhcp6c/Makefile
|
||||
+++ b/package/odhcp6c/Makefile
|
||||
@@ -8,26 +8,37 @@
|
||||
@ -11,15 +11,16 @@ index e37b72e..ed51b98 100644
|
||||
|
||||
PKG_NAME:=odhcp6c
|
||||
-PKG_VERSION:=2013-10-02
|
||||
+PKG_VERSION:=2014-01-11
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
-PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
|
||||
+PKG_VERSION:=2014-04-09
|
||||
+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:=8152153cb9c5b09862bf0c8a0d1005fa8dfdf262
|
||||
+PKG_SOURCE_VERSION:=6bbd2b0208fc17b6566595bfdfef2ff1d012d143
|
||||
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -49,10 +50,10 @@ index e37b72e..ed51b98 100644
|
||||
$(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..8bcf766 100755
|
||||
index 324a823..d228014 100755
|
||||
--- a/package/odhcp6c/files/dhcpv6.script
|
||||
+++ b/package/odhcp6c/files/dhcpv6.script
|
||||
@@ -64,23 +64,28 @@ setup_interface () {
|
||||
@@ -64,23 +64,34 @@ setup_interface () {
|
||||
entry="${entry#*,}"
|
||||
local metric="${entry%%,*}"
|
||||
|
||||
@ -61,13 +62,17 @@ index 324a823..8bcf766 100755
|
||||
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
|
||||
+ else
|
||||
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "::/128"
|
||||
+ for prefix in $PREFIXES; do
|
||||
+ 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"
|
||||
+ proto_close_data
|
||||
+
|
||||
proto_send_update "$INTERFACE"
|
||||
|
||||
if [ -n "$AFTR_IP " -a -n "$IFACE_DSLITE" ]; then
|
||||
@ -88,25 +93,47 @@ index 324a823..8bcf766 100755
|
||||
+ json_add_string proto "dslite"
|
||||
+ json_add_string peeraddr "$AFTR_IP"
|
||||
+ json_add_string tunlink "$INTERFACE"
|
||||
+ [ -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..0638d28 100755
|
||||
index bf6cd9a..90a8371 100755
|
||||
--- a/package/odhcp6c/files/dhcpv6.sh
|
||||
+++ b/package/odhcp6c/files/dhcpv6.sh
|
||||
@@ -10,18 +10,20 @@ proto_dhcpv6_init_config() {
|
||||
proto_config_add_string "clientid"
|
||||
proto_config_add_string "reqopts"
|
||||
proto_config_add_string "noslaaconly"
|
||||
+ proto_config_add_string "forceprefix"
|
||||
proto_config_add_string "norelease"
|
||||
proto_config_add_string "ip6prefix"
|
||||
proto_config_add_string "iface_dslite"
|
||||
proto_config_add_string "ifaceid"
|
||||
+ proto_config_add_string "sourcerouting"
|
||||
@@ -5,23 +5,31 @@
|
||||
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 'ifaceid:ip6addr'
|
||||
+ proto_config_add_string 'sourcerouting:bool'
|
||||
+ proto_config_add_string "userclass"
|
||||
+ proto_config_add_string "vendorclass"
|
||||
+ proto_config_add_boolean delegate
|
||||
}
|
||||
|
||||
proto_dhcpv6_setup() {
|
||||
@ -115,12 +142,12 @@ index bf6cd9a..0638d28 100755
|
||||
|
||||
- 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 ifaceid sourcerouting
|
||||
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting
|
||||
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting userclass vendorclass delegate zone_dslite
|
||||
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting userclass vendorclass delegate zone_dslite
|
||||
|
||||
|
||||
# Configure
|
||||
@@ -35,6 +37,8 @@ proto_dhcpv6_setup() {
|
||||
@@ -35,16 +43,25 @@ proto_dhcpv6_setup() {
|
||||
|
||||
[ "$noslaaconly" = "1" ] && append opts "-S"
|
||||
|
||||
@ -129,11 +156,65 @@ index bf6cd9a..0638d28 100755
|
||||
[ "$norelease" = "1" ] && append opts "-k"
|
||||
|
||||
[ -n "$ifaceid" ] && append opts "-i$ifaceid"
|
||||
@@ -45,6 +49,7 @@ proto_dhcpv6_setup() {
|
||||
|
||||
+ [ -n "$vendorclass" ] && append opts "-V$vendorclass"
|
||||
+
|
||||
+ [ -n "$userclass" ] && append opts "-u$userclass"
|
||||
+
|
||||
for opt in $reqopts; do
|
||||
append opts "-r$opt"
|
||||
done
|
||||
|
||||
[ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix"
|
||||
[ -n "$iface_dslite" ] && proto_export "IFACE_DSLITE=$iface_dslite"
|
||||
+ [ "$sourcerouting" = "1" ] && proto_export "SOURCE_ROUTING=1"
|
||||
+ [ "$sourcerouting" != "0" ] && proto_export "SOURCE_ROUTING=1"
|
||||
+ [ "$delegate" = "0" ] && proto_export "IFACE_DSLITE_DELEGATE=0"
|
||||
+ [ -n "$zone_dslite" ] && proto_export "ZONE_DSLITE=$zone_dslite"
|
||||
|
||||
proto_export "INTERFACE=$config"
|
||||
proto_run_command "$config" odhcp6c \
|
||||
@@ -52,6 +69,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
|
||||
-
|
File diff suppressed because it is too large
Load Diff
@ -1,136 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 13 Feb 2014 15:12:37 +0100
|
||||
Subject: netifd: update to latest git, add UCI config path patch
|
||||
|
||||
diff --git a/package/netifd/Makefile b/package/netifd/Makefile
|
||||
index 6f6f30e..d5fa7f0 100644
|
||||
--- a/package/netifd/Makefile
|
||||
+++ b/package/netifd/Makefile
|
||||
@@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netifd
|
||||
-PKG_VERSION:=2013-12-29
|
||||
+PKG_VERSION:=2014-02-13
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git://nbd.name/luci2/netifd.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
-PKG_SOURCE_VERSION:=7d79d0a8aa5a5b4c1ed987af119356438d98fe7b
|
||||
+PKG_SOURCE_VERSION:=88b3e92933925c09cfb6e95e9c8645727654ddf7
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||
# PKG_MIRROR_MD5SUM:=
|
||||
diff --git a/package/netifd/patches/001-musl_af_inet_include.patch b/package/netifd/patches/001-musl_af_inet_include.patch
|
||||
index 510ee05..0dbe645 100644
|
||||
--- a/package/netifd/patches/001-musl_af_inet_include.patch
|
||||
+++ b/package/netifd/patches/001-musl_af_inet_include.patch
|
||||
@@ -1,11 +1,10 @@
|
||||
-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
|
||||
+--- a/utils.c
|
||||
++++ b/utils.c
|
||||
@@ -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)
|
||||
+ #ifdef __APPLE__
|
||||
+ #include <libproc.h>
|
||||
diff --git a/package/netifd/patches/101-allow-setting-the-uci-config-path.patch b/package/netifd/patches/101-allow-setting-the-uci-config-path.patch
|
||||
new file mode 100644
|
||||
index 0000000..7561dd5
|
||||
--- /dev/null
|
||||
+++ b/package/netifd/patches/101-allow-setting-the-uci-config-path.patch
|
||||
@@ -0,0 +1,86 @@
|
||||
+From addf95eebc22afd78c516664ae27f955277e3ee8 Mon Sep 17 00:00:00 2001
|
||||
+Message-Id: <addf95eebc22afd78c516664ae27f955277e3ee8.1392300589.git.mschiffer@universe-factory.net>
|
||||
+From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
+Date: Thu, 13 Feb 2014 15:02:18 +0100
|
||||
+Subject: [PATCH] Allow setting the UCI config path
|
||||
+
|
||||
+---
|
||||
+ config.c | 4 +++-
|
||||
+ main.c | 7 ++++++-
|
||||
+ netifd.h | 3 +++
|
||||
+ 3 files changed, 12 insertions(+), 2 deletions(-)
|
||||
+
|
||||
+--- a/config.c
|
||||
++++ b/config.c
|
||||
+@@ -190,8 +190,10 @@ config_init_package(const char *config)
|
||||
+ ctx = uci_alloc_context();
|
||||
+ uci_ctx = ctx;
|
||||
+
|
||||
++ if (config_path)
|
||||
++ uci_set_confdir(ctx, config_path);
|
||||
++
|
||||
+ #ifdef DUMMY_MODE
|
||||
+- uci_set_confdir(ctx, "./config");
|
||||
+ uci_set_savedir(ctx, "./tmp");
|
||||
+ #endif
|
||||
+ } else {
|
||||
+--- a/main.c
|
||||
++++ b/main.c
|
||||
+@@ -27,6 +27,7 @@
|
||||
+
|
||||
+ unsigned int debug_mask = 0;
|
||||
+ const char *main_path = DEFAULT_MAIN_PATH;
|
||||
++const char *config_path = DEFAULT_CONFIG_PATH;
|
||||
+ const char *resolv_conf = DEFAULT_RESOLV_CONF;
|
||||
+ static char **global_argv;
|
||||
+
|
||||
+@@ -235,6 +236,7 @@ static int usage(const char *progname)
|
||||
+ " -d <mask>: Mask for debug messages\n"
|
||||
+ " -s <path>: Path to the ubus socket\n"
|
||||
+ " -p <path>: Path to netifd addons (default: %s)\n"
|
||||
++ " -c <path>: Path to UCI configuration\n"
|
||||
+ " -h <path>: Path to the hotplug script\n"
|
||||
+ " -r <path>: Path to resolv.conf\n"
|
||||
+ " -l <level>: Log output level (default: %d)\n"
|
||||
+@@ -284,7 +286,7 @@ int main(int argc, char **argv)
|
||||
+
|
||||
+ global_argv = argv;
|
||||
+
|
||||
+- while ((ch = getopt(argc, argv, "d:s:p:h:r:l:S")) != -1) {
|
||||
++ while ((ch = getopt(argc, argv, "d:s:p:c:h:r:l:S")) != -1) {
|
||||
+ switch(ch) {
|
||||
+ case 'd':
|
||||
+ debug_mask = strtoul(optarg, NULL, 0);
|
||||
+@@ -295,6 +297,9 @@ int main(int argc, char **argv)
|
||||
+ case 'p':
|
||||
+ main_path = optarg;
|
||||
+ break;
|
||||
++ case 'c':
|
||||
++ config_path = optarg;
|
||||
++ break;
|
||||
+ case 'h':
|
||||
+ hotplug_cmd_path = optarg;
|
||||
+ break;
|
||||
+--- a/netifd.h
|
||||
++++ b/netifd.h
|
||||
+@@ -30,10 +30,12 @@
|
||||
+
|
||||
+ #ifdef DUMMY_MODE
|
||||
+ #define DEFAULT_MAIN_PATH "./examples"
|
||||
++#define DEFAULT_CONFIG_PATH "./config"
|
||||
+ #define DEFAULT_HOTPLUG_PATH "./examples/hotplug-cmd"
|
||||
+ #define DEFAULT_RESOLV_CONF "./tmp/resolv.conf"
|
||||
+ #else
|
||||
+ #define DEFAULT_MAIN_PATH "/lib/netifd"
|
||||
++#define DEFAULT_CONFIG_PATH NULL /* use the default set in libuci */
|
||||
+ #define DEFAULT_HOTPLUG_PATH "/sbin/hotplug-call"
|
||||
+ #define DEFAULT_RESOLV_CONF "/tmp/resolv.conf.auto"
|
||||
+ #endif
|
||||
+@@ -94,6 +96,7 @@ struct device;
|
||||
+ struct interface;
|
||||
+
|
||||
+ extern const char *main_path;
|
||||
++extern const char *config_path;
|
||||
+ void netifd_restart(void);
|
||||
+ void netifd_reload(void);
|
||||
+
|
@ -0,0 +1,140 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 18 Apr 2014 18:30:05 +0200
|
||||
Subject: mac80211: ath9k: add support for QCA953x
|
||||
|
||||
This adds the following patches by Sujith Manoharan from ath9k-devel:
|
||||
|
||||
ath9k: Add QCA953x WMAC platform support
|
||||
ath9k: Disable AR_INTR_SYNC_HOST1_FATAL for QCA953x
|
||||
ath9k: Fix temperature compensation
|
||||
|
||||
diff --git a/package/mac80211/patches/567-ath9k-qca953x-support.patch b/package/mac80211/patches/567-ath9k-qca953x-support.patch
|
||||
new file mode 100644
|
||||
index 0000000..e73083a
|
||||
--- /dev/null
|
||||
+++ b/package/mac80211/patches/567-ath9k-qca953x-support.patch
|
||||
@@ -0,0 +1,124 @@
|
||||
+--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
++++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
+@@ -39,6 +39,10 @@ static const struct platform_device_id a
|
||||
+ .name = "qca955x_wmac",
|
||||
+ .driver_data = AR9300_DEVID_QCA955X,
|
||||
+ },
|
||||
++ {
|
||||
++ .name = "qca953x_wmac",
|
||||
++ .driver_data = AR9300_DEVID_AR953X,
|
||||
++ },
|
||||
+ {},
|
||||
+ };
|
||||
+
|
||||
+--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
++++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||
+@@ -4792,43 +4792,54 @@ static void ar9003_hw_power_control_over
|
||||
+
|
||||
+ tempslope:
|
||||
+ if (AR_SREV_9550(ah) || AR_SREV_9531(ah)) {
|
||||
++ u8 txmask = (eep->baseEepHeader.txrxMask & 0xf0) >> 4;
|
||||
++
|
||||
+ /*
|
||||
+ * AR955x has tempSlope register for each chain.
|
||||
+ * Check whether temp_compensation feature is enabled or not.
|
||||
+ */
|
||||
+ if (eep->baseEepHeader.featureEnable & 0x1) {
|
||||
+ if (frequency < 4000) {
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM,
|
||||
+- eep->base_ext2.tempSlopeLow);
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19_B1,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM,
|
||||
+- temp_slope);
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19_B2,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM,
|
||||
+- eep->base_ext2.tempSlopeHigh);
|
||||
++ if (txmask & BIT(0))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM,
|
||||
++ eep->base_ext2.tempSlopeLow);
|
||||
++ if (txmask & BIT(1))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19_B1,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM,
|
||||
++ temp_slope);
|
||||
++ if (txmask & BIT(2))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19_B2,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM,
|
||||
++ eep->base_ext2.tempSlopeHigh);
|
||||
+ } else {
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM,
|
||||
+- temp_slope);
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19_B1,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM,
|
||||
+- temp_slope1);
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19_B2,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM,
|
||||
+- temp_slope2);
|
||||
++ if (txmask & BIT(0))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM,
|
||||
++ temp_slope);
|
||||
++ if (txmask & BIT(1))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19_B1,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM,
|
||||
++ temp_slope1);
|
||||
++ if (txmask & BIT(2))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19_B2,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM,
|
||||
++ temp_slope2);
|
||||
+ }
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * If temp compensation is not enabled,
|
||||
+ * set all registers to 0.
|
||||
+ */
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM, 0);
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19_B1,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM, 0);
|
||||
+- REG_RMW_FIELD(ah, AR_PHY_TPC_19_B2,
|
||||
+- AR_PHY_TPC_19_ALPHA_THERM, 0);
|
||||
++ if (txmask & BIT(0))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM, 0);
|
||||
++ if (txmask & BIT(1))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19_B1,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM, 0);
|
||||
++ if (txmask & BIT(2))
|
||||
++ REG_RMW_FIELD(ah, AR_PHY_TPC_19_B2,
|
||||
++ AR_PHY_TPC_19_ALPHA_THERM, 0);
|
||||
+ }
|
||||
+ } else {
|
||||
+ REG_RMW_FIELD(ah, AR_PHY_TPC_19,
|
||||
+--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
++++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+@@ -901,7 +901,7 @@ static void ath9k_hw_init_interrupt_mask
|
||||
+ AR_IMR_RXORN |
|
||||
+ AR_IMR_BCNMISC;
|
||||
+
|
||||
+- if (AR_SREV_9340(ah) || AR_SREV_9550(ah))
|
||||
++ if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah))
|
||||
+ sync_default &= ~AR_INTR_SYNC_HOST1_FATAL;
|
||||
+
|
||||
+ if (AR_SREV_9300_20_OR_LATER(ah)) {
|
||||
+@@ -3104,6 +3104,7 @@ static struct {
|
||||
+ { AR_SREV_VERSION_9462, "9462" },
|
||||
+ { AR_SREV_VERSION_9550, "9550" },
|
||||
+ { AR_SREV_VERSION_9565, "9565" },
|
||||
++ { AR_SREV_VERSION_9531, "9531" },
|
||||
+ };
|
||||
+
|
||||
+ /* For devices with external radios */
|
||||
+--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||
++++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
+@@ -837,7 +837,7 @@ void ath9k_hw_enable_interrupts(struct a
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+- if (AR_SREV_9340(ah) || AR_SREV_9550(ah))
|
||||
++ if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah))
|
||||
+ sync_default &= ~AR_INTR_SYNC_HOST1_FATAL;
|
||||
+
|
||||
+ async_mask = AR_INTR_MAC_IRQ;
|
713
patches/openwrt/0017-ar71xx-add-support-for-QCA953x-SoC.patch
Normal file
713
patches/openwrt/0017-ar71xx-add-support-for-QCA953x-SoC.patch
Normal file
@ -0,0 +1,713 @@
|
||||
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/705-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.3/705-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
||||
new file mode 100644
|
||||
index 0000000..bd08685
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ar71xx/patches-3.3/705-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
||||
@@ -0,0 +1,584 @@
|
||||
+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
|
||||
+@@ -698,6 +698,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
|
||||
+@@ -741,7 +745,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
|
||||
+@@ -71,9 +71,12 @@ void ath79_device_reset_set(u32 mask)
|
||||
+ reg = AR913X_RESET_REG_RESET_MODULE;
|
||||
+ else if (soc_is_ar933x())
|
||||
+ reg = AR933X_RESET_REG_RESET_MODULE;
|
||||
+- else if (soc_is_ar934x() ||
|
||||
+- soc_is_qca955x())
|
||||
++ else if (soc_is_ar934x())
|
||||
+ reg = AR934X_RESET_REG_RESET_MODULE;
|
||||
++ else if (soc_is_qca953x())
|
||||
++ reg = QCA953X_RESET_REG_RESET_MODULE;
|
||||
++ else if (soc_is_qca955x())
|
||||
++ reg = QCA955X_RESET_REG_RESET_MODULE;
|
||||
+ else
|
||||
+ BUG();
|
||||
+
|
||||
+@@ -98,9 +101,12 @@ void ath79_device_reset_clear(u32 mask)
|
||||
+ reg = AR913X_RESET_REG_RESET_MODULE;
|
||||
+ else if (soc_is_ar933x())
|
||||
+ reg = AR933X_RESET_REG_RESET_MODULE;
|
||||
+- else if (soc_is_ar934x() ||
|
||||
+- soc_is_qca955x())
|
||||
++ else if (soc_is_ar934x())
|
||||
+ reg = AR934X_RESET_REG_RESET_MODULE;
|
||||
++ else if (soc_is_qca953x())
|
||||
++ reg = QCA953X_RESET_REG_RESET_MODULE;
|
||||
++ else if (soc_is_qca955x())
|
||||
++ reg = QCA955X_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
|
||||
+@@ -147,6 +147,24 @@ 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;
|
||||
++}
|
||||
++
|
||||
+ static void qca955x_wmac_setup(void)
|
||||
+ {
|
||||
+ u32 t;
|
||||
+@@ -314,6 +332,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
|
||||
+@@ -232,14 +232,18 @@ void __init ath79_gpio_init(void)
|
||||
+
|
||||
+ if (soc_is_ar71xx())
|
||||
+ ath79_gpio_count = AR71XX_GPIO_COUNT;
|
||||
+- else if (soc_is_ar724x())
|
||||
+- ath79_gpio_count = AR724X_GPIO_COUNT;
|
||||
++ else if (soc_is_ar7240())
|
||||
++ ath79_gpio_count = AR7240_GPIO_COUNT;
|
||||
++ else if (soc_is_ar7241() || soc_is_ar7242())
|
||||
++ ath79_gpio_count = AR7241_GPIO_COUNT;
|
||||
+ else if (soc_is_ar913x())
|
||||
+ ath79_gpio_count = AR913X_GPIO_COUNT;
|
||||
+ else if (soc_is_ar933x())
|
||||
+ 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 +251,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,10 +164,16 @@ 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 & QCA955X_REV_ID_REVISION_MASK;
|
||||
++ break;
|
||||
++
|
||||
+ case REV_ID_MAJOR_QCA9558:
|
||||
+ ath79_soc = ATH79_SOC_QCA9558;
|
||||
+ chip = "9558";
|
||||
+- rev = id & AR944X_REV_ID_REVISION_MASK;
|
||||
++ rev = id & QCA955X_REV_ID_REVISION_MASK;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+@@ -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
|
||||
+@@ -38,8 +38,8 @@
|
||||
+ #define AR71XX_UART_SIZE 0x100
|
||||
+ #define AR71XX_USB_CTRL_BASE (AR71XX_APB_BASE + 0x00030000)
|
||||
+ #define AR71XX_USB_CTRL_SIZE 0x100
|
||||
+-#define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000)
|
||||
+-#define AR71XX_GPIO_SIZE 0x100
|
||||
++#define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000)
|
||||
++#define AR71XX_GPIO_SIZE 0x100
|
||||
+ #define AR71XX_PLL_BASE (AR71XX_APB_BASE + 0x00050000)
|
||||
+ #define AR71XX_PLL_SIZE 0x100
|
||||
+ #define AR71XX_RESET_BASE (AR71XX_APB_BASE + 0x00060000)
|
||||
+@@ -101,10 +101,13 @@
|
||||
+ #define AR934X_WMAC_SIZE 0x20000
|
||||
+ #define AR934X_EHCI_BASE 0x1b000000
|
||||
+ #define AR934X_EHCI_SIZE 0x200
|
||||
+-#define AR934X_SRIF_BASE (AR71XX_APB_BASE + 0x00116000)
|
||||
+-#define AR934X_SRIF_SIZE 0x1000
|
||||
+ #define AR934X_NFC_BASE 0x1b000200
|
||||
+ #define AR934X_NFC_SIZE 0xb8
|
||||
++#define AR934X_SRIF_BASE (AR71XX_APB_BASE + 0x00116000)
|
||||
++#define AR934X_SRIF_SIZE 0x1000
|
||||
++
|
||||
++#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
|
||||
+@@ -119,14 +122,14 @@
|
||||
+ #define QCA955X_PCI_CTRL_BASE1 (AR71XX_APB_BASE + 0x00280000)
|
||||
+ #define QCA955X_PCI_CTRL_SIZE 0x100
|
||||
+
|
||||
++#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000)
|
||||
++#define QCA955X_GMAC_SIZE 0x40
|
||||
+ #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
|
||||
+ #define QCA955X_WMAC_SIZE 0x20000
|
||||
+ #define QCA955X_EHCI0_BASE 0x1b000000
|
||||
+ #define QCA955X_EHCI1_BASE 0x1b400000
|
||||
+-#define QCA955X_EHCI_SIZE 0x200
|
||||
+-#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000)
|
||||
+-#define QCA955X_GMAC_SIZE 0x40
|
||||
+-#define QCA955X_NFC_BASE 0x1b000200
|
||||
++#define QCA955X_EHCI_SIZE 0x1000
|
||||
++#define QCA955X_NFC_BASE 0x1b800200
|
||||
+ #define QCA955X_NFC_SIZE 0xb8
|
||||
+
|
||||
+ #define AR9300_OTP_BASE 0x14000
|
||||
+@@ -280,9 +283,48 @@
|
||||
+
|
||||
+ #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
|
||||
++#define QCA955X_PLL_ETH_XMII_CONTROL_REG 0x28
|
||||
++#define QCA955X_PLL_ETH_SGMII_CONTROL_REG 0x48
|
||||
+
|
||||
+ #define QCA955X_PLL_CPU_CONFIG_NFRAC_SHIFT 0
|
||||
+ #define QCA955X_PLL_CPU_CONFIG_NFRAC_MASK 0x3f
|
||||
+@@ -354,6 +396,11 @@
|
||||
+ #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_RESET_MODULE 0x1c
|
||||
+ #define QCA955X_RESET_REG_BOOTSTRAP 0xb0
|
||||
+ #define QCA955X_RESET_REG_EXT_INT_STATUS 0xac
|
||||
+
|
||||
+@@ -448,6 +495,39 @@
|
||||
+ #define AR934X_RESET_MBOX BIT(1)
|
||||
+ #define AR934X_RESET_I2S BIT(0)
|
||||
+
|
||||
++#define QCA955X_RESET_HOST BIT(31)
|
||||
++#define QCA955X_RESET_SLIC BIT(30)
|
||||
++#define QCA955X_RESET_HDMA BIT(29)
|
||||
++#define QCA955X_RESET_EXTERNAL BIT(28)
|
||||
++#define QCA955X_RESET_RTC BIT(27)
|
||||
++#define QCA955X_RESET_PCIE_EP_INT BIT(26)
|
||||
++#define QCA955X_RESET_CHKSUM_ACC BIT(25)
|
||||
++#define QCA955X_RESET_FULL_CHIP BIT(24)
|
||||
++#define QCA955X_RESET_GE1_MDIO BIT(23)
|
||||
++#define QCA955X_RESET_GE0_MDIO BIT(22)
|
||||
++#define QCA955X_RESET_CPU_NMI BIT(21)
|
||||
++#define QCA955X_RESET_CPU_COLD BIT(20)
|
||||
++#define QCA955X_RESET_HOST_RESET_INT BIT(19)
|
||||
++#define QCA955X_RESET_PCIE_EP BIT(18)
|
||||
++#define QCA955X_RESET_UART1 BIT(17)
|
||||
++#define QCA955X_RESET_DDR BIT(16)
|
||||
++#define QCA955X_RESET_USB_PHY_PLL_PWD_EXT BIT(15)
|
||||
++#define QCA955X_RESET_NANDF BIT(14)
|
||||
++#define QCA955X_RESET_GE1_MAC BIT(13)
|
||||
++#define QCA955X_RESET_SGMII_ANALOG BIT(12)
|
||||
++#define QCA955X_RESET_USB_PHY_ANALOG BIT(11)
|
||||
++#define QCA955X_RESET_HOST_DMA_INT BIT(10)
|
||||
++#define QCA955X_RESET_GE0_MAC BIT(9)
|
||||
++#define QCA955X_RESET_SGMII BIT(8)
|
||||
++#define QCA955X_RESET_PCIE_PHY BIT(7)
|
||||
++#define QCA955X_RESET_PCIE BIT(6)
|
||||
++#define QCA955X_RESET_USB_HOST BIT(5)
|
||||
++#define QCA955X_RESET_USB_PHY BIT(4)
|
||||
++#define QCA955X_RESET_USBSUS_OVERRIDE BIT(3)
|
||||
++#define QCA955X_RESET_LUT BIT(2)
|
||||
++#define QCA955X_RESET_MBOX BIT(1)
|
||||
++#define QCA955X_RESET_I2S BIT(0)
|
||||
++
|
||||
+ #define AR933X_BOOTSTRAP_MDIO_GPIO_EN BIT(18)
|
||||
+ #define AR933X_BOOTSTRAP_EEPBUSY BIT(4)
|
||||
+ #define AR933X_BOOTSTRAP_REF_CLK_40 BIT(0)
|
||||
+@@ -465,9 +545,11 @@
|
||||
+ #define AR934X_BOOTSTRAP_EJTAG_MODE BIT(5)
|
||||
+ #define AR934X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
||||
+ #define AR934X_BOOTSTRAP_BOOT_FROM_SPI BIT(2)
|
||||
+-#define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1)
|
||||
++#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 +612,8 @@
|
||||
+ #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_QCA9556 0x0130
|
||||
+ #define REV_ID_MAJOR_QCA9558 0x1130
|
||||
+
|
||||
+ #define AR71XX_REV_ID_MINOR_MASK 0x3
|
||||
+@@ -549,9 +633,9 @@
|
||||
+
|
||||
+ #define AR724X_REV_ID_REVISION_MASK 0x3
|
||||
+
|
||||
+-#define AR934X_REV_ID_REVISION_MASK 0xf
|
||||
++#define AR934X_REV_ID_REVISION_MASK 0xf
|
||||
+
|
||||
+-#define AR944X_REV_ID_REVISION_MASK 0xf
|
||||
++#define QCA955X_REV_ID_REVISION_MASK 0xf
|
||||
+
|
||||
+ /*
|
||||
+ * SPI block
|
||||
+@@ -599,10 +683,12 @@
|
||||
+ #define AR934X_GPIO_REG_FUNC 0x6c
|
||||
+
|
||||
+ #define AR71XX_GPIO_COUNT 16
|
||||
+-#define AR724X_GPIO_COUNT 18
|
||||
++#define AR7240_GPIO_COUNT 18
|
||||
++#define AR7241_GPIO_COUNT 20
|
||||
+ #define AR913X_GPIO_COUNT 22
|
||||
+ #define AR933X_GPIO_COUNT 30
|
||||
+ #define AR934X_GPIO_COUNT 23
|
||||
++#define QCA953X_GPIO_COUNT 24 /* (?) */
|
||||
+ #define QCA955X_GPIO_COUNT 24
|
||||
+
|
||||
+ /*
|
||||
+@@ -693,12 +779,14 @@
|
||||
+ #define AR934X_GPIO_FUNC_CLK_OBS0_EN BIT(2)
|
||||
+ #define AR934X_GPIO_FUNC_JTAG_DISABLE BIT(1)
|
||||
+
|
||||
+-#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
|
||||
++#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
|
||||
++#define AR934X_GPIO_OUT_EXT_LNA0 46
|
||||
++#define AR934X_GPIO_OUT_EXT_LNA1 47
|
||||
+
|
||||
+ /*
|
||||
+ * MII_CTRL block
|
||||
+@@ -756,6 +844,8 @@
|
||||
+ #define AR933X_ETH_CFG_MII_CNTL_SPEED BIT(11)
|
||||
+ #define AR934X_ETH_CFG_RMII_GMAC0_MASTER BIT(12)
|
||||
+ #define AR933X_ETH_CFG_SW_ACC_MSB_FIRST BIT(13)
|
||||
++#define AR934X_ETH_CFG_RXD_DELAY BIT(14)
|
||||
++#define AR934X_ETH_CFG_RDV_DELAY BIT(16)
|
||||
+
|
||||
+ /*
|
||||
+ * QCA955X GMAC Interface
|
||||
+@@ -763,7 +853,7 @@
|
||||
+
|
||||
+ #define QCA955X_GMAC_REG_ETH_CFG 0x00
|
||||
+
|
||||
+-#define QCA955X_ETH_CFG_RGMII_GMAC0 BIT(0)
|
||||
+-#define QCA955X_ETH_CFG_SGMII_GMAC0 BIT(6)
|
||||
++#define QCA955X_ETH_CFG_RGMII_EN BIT(0)
|
||||
++#define QCA955X_ETH_CFG_GE0_SGMII BIT(6)
|
||||
+
|
||||
+ #endif /* __ASM_MACH_AR71XX_REGS_H */
|
||||
+--- 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;
|
||||
+--- a/arch/mips/ath79/mach-ap136.c
|
||||
++++ b/arch/mips/ath79/mach-ap136.c
|
||||
+@@ -149,8 +149,8 @@ static void __init ap136_gmac_setup(void
|
||||
+
|
||||
+ t = __raw_readl(base + QCA955X_GMAC_REG_ETH_CFG);
|
||||
+
|
||||
+- t &= ~(QCA955X_ETH_CFG_RGMII_GMAC0 | QCA955X_ETH_CFG_SGMII_GMAC0);
|
||||
+- t |= QCA955X_ETH_CFG_RGMII_GMAC0;
|
||||
++ t &= ~(QCA955X_ETH_CFG_RGMII_EN | QCA955X_ETH_CFG_GE0_SGMII);
|
||||
++ t |= QCA955X_ETH_CFG_RGMII_EN;
|
||||
+
|
||||
+ __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
|
||||
+
|
@ -0,0 +1,297 @@
|
||||
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/706-MIPS-ath79-TL-WR841v9-support.patch b/target/linux/ar71xx/patches-3.3/706-MIPS-ath79-TL-WR841v9-support.patch
|
||||
new file mode 100644
|
||||
index 0000000..ebc82c6
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ar71xx/patches-3.3/706-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
|
||||
+@@ -91,6 +91,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 */
|
0
scripts/configure.pl
Executable file → Normal file
0
scripts/configure.pl
Executable file → Normal file
0
scripts/generate.sh
Executable file → Normal file
0
scripts/generate.sh
Executable file → Normal file
0
scripts/patch.sh
Executable file → Normal file
0
scripts/patch.sh
Executable file → Normal file
0
scripts/site.sh
Executable file → Normal file
0
scripts/site.sh
Executable file → Normal file
0
scripts/unpatch.sh
Executable file → Normal file
0
scripts/unpatch.sh
Executable file → Normal file
0
scripts/update-patches.sh
Executable file → Normal file
0
scripts/update-patches.sh
Executable file → Normal file
0
scripts/update.sh
Executable file → Normal file
0
scripts/update.sh
Executable file → Normal file
Loading…
Reference in New Issue
Block a user