Update OpenWrt base
We got most of our patches backported by upstream :)
This commit is contained in:
parent
289b599233
commit
6f23ef9eb7
2
modules
2
modules
@ -1,7 +1,7 @@
|
||||
GLUON_FEEDS='openwrt gluon routing luci'
|
||||
|
||||
OPENWRT_REPO=git://git.openwrt.org/15.05/openwrt.git
|
||||
OPENWRT_COMMIT=a03a846c49c067048cd225d476a7adf91ef8ff03
|
||||
OPENWRT_COMMIT=8882c524d9b5e4c16ebfea10c0090f38b07c9da5
|
||||
|
||||
PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git
|
||||
PACKAGES_OPENWRT_COMMIT=9622fe984bba3a4547f48bc507ebaba7637eb2b0
|
||||
|
@ -3,10 +3,10 @@ Date: Tue, 9 Feb 2016 18:22:29 +0100
|
||||
Subject: ath10k-firmware: add Candela Technologies firmware for QCA988X
|
||||
|
||||
diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
|
||||
index 882294c..c6e6f2d 100644
|
||||
index b03d644..7d4d449 100644
|
||||
--- a/package/firmware/ath10k-firmware/Makefile
|
||||
+++ b/package/firmware/ath10k-firmware/Makefile
|
||||
@@ -46,6 +46,26 @@ define Download/ath10k-firmware-qca988x
|
||||
@@ -44,6 +44,26 @@ define Download/ath10k-firmware-qca988x
|
||||
endef
|
||||
$(eval $(call Download,ath10k-firmware-qca988x))
|
||||
|
||||
@ -33,7 +33,7 @@ index 882294c..c6e6f2d 100644
|
||||
define Package/ath10k-firmware-qca99x0
|
||||
$(Package/ath10k-firmware-default)
|
||||
TITLE:=ath10k firmware for QCA99x0 devices
|
||||
@@ -81,6 +101,16 @@ define Package/ath10k-firmware-qca988x/install
|
||||
@@ -79,6 +99,16 @@ define Package/ath10k-firmware-qca988x/install
|
||||
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
|
||||
endef
|
||||
|
||||
@ -50,7 +50,7 @@ index 882294c..c6e6f2d 100644
|
||||
define Package/ath10k-firmware-qca6174/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath10k
|
||||
$(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
|
||||
@@ -100,5 +130,6 @@ define Package/ath10k-firmware-qca99x0/install
|
||||
@@ -98,5 +128,6 @@ define Package/ath10k-firmware-qca99x0/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ath10k-firmware-qca988x))
|
@ -1,68 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Tue, 9 Feb 2016 13:49:01 +0100
|
||||
Subject: build: add support for choosing a different url filename part than the output file
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
|
||||
Backport of r47591 and r48427
|
||||
|
||||
diff --git a/include/download.mk b/include/download.mk
|
||||
index 937b5d3..e518cce 100644
|
||||
--- a/include/download.mk
|
||||
+++ b/include/download.mk
|
||||
@@ -44,11 +44,11 @@ define DownloadMethod/unknown
|
||||
endef
|
||||
|
||||
define DownloadMethod/default
|
||||
- $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MD5SUM)" $(foreach url,$(URL),"$(url)")
|
||||
+ $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MD5SUM)" "$(URL_FILE)" $(foreach url,$(URL),"$(url)")
|
||||
endef
|
||||
|
||||
define wrap_mirror
|
||||
- $(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" || ( $(1) ),$(1))
|
||||
+ $(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" "" || ( $(1) ),$(1))
|
||||
endef
|
||||
|
||||
define DownloadMethod/cvs
|
||||
@@ -157,6 +157,7 @@ Validate/darcs=VERSION SUBDIR
|
||||
define Download/Defaults
|
||||
URL:=
|
||||
FILE:=
|
||||
+ URL_FILE:=
|
||||
PROTO:=
|
||||
MD5SUM:=
|
||||
SUBDIR:=
|
||||
diff --git a/scripts/download.pl b/scripts/download.pl
|
||||
index cd68a7b..111d03c 100755
|
||||
--- a/scripts/download.pl
|
||||
+++ b/scripts/download.pl
|
||||
@@ -11,15 +11,19 @@ use warnings;
|
||||
use File::Basename;
|
||||
use File::Copy;
|
||||
|
||||
-@ARGV > 2 or die "Syntax: $0 <target dir> <filename> <md5sum> [<mirror> ...]\n";
|
||||
+@ARGV > 2 or die "Syntax: $0 <target dir> <filename> <md5sum> <url filename> [<mirror> ...]\n";
|
||||
|
||||
+my $url_filename;
|
||||
my $target = shift @ARGV;
|
||||
my $filename = shift @ARGV;
|
||||
my $md5sum = shift @ARGV;
|
||||
+$url_filename = shift @ARGV unless $ARGV[0] =~ /:\/\//;
|
||||
my $scriptdir = dirname($0);
|
||||
my @mirrors;
|
||||
my $ok;
|
||||
|
||||
+$url_filename or $url_filename = $filename;
|
||||
+
|
||||
sub localmirrors {
|
||||
my @mlist;
|
||||
open LM, "$scriptdir/localmirrors" and do {
|
||||
@@ -106,7 +110,7 @@ sub download
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
- open WGET, "wget -t5 --timeout=20 --no-check-certificate $options -O- '$mirror/$filename' |" or die "Cannot launch wget.\n";
|
||||
+ open WGET, "wget -t5 --timeout=20 --no-check-certificate $options -O- '$mirror/$url_filename' |" or die "Cannot launch wget.\n";
|
||||
open MD5SUM, "| $md5cmd > '$target/$filename.md5sum'" or die "Cannot launch md5sum.\n";
|
||||
open OUTPUT, "> $target/$filename.dl" or die "Cannot create file $target/$filename.dl: $!\n";
|
||||
my $buffer;
|
File diff suppressed because it is too large
Load Diff
@ -1,39 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 21 Jun 2015 22:50:48 +0200
|
||||
Subject: ar71xx: add support for tp-link wr740n v5.0 (EU)
|
||||
|
||||
TP-Link ships wr740n v5.0 to Romania (so probably everywhere except
|
||||
China) with 4 MB flash and 32 MB memory (confirmed by their local
|
||||
support). This patch adds support for the v5.0 clone of v4, i just
|
||||
tested it on my own v5.0 router and it works.
|
||||
|
||||
Signed-off-by: Daniel Petre <daniel.petre@posteo.net>
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index 4336697..1fe88d5 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -501,6 +501,14 @@ define Device/tl-wr740n-v4
|
||||
CONSOLE := ttyATH0,115200
|
||||
endef
|
||||
|
||||
+define Device/tl-wr740n-v5
|
||||
+ $(Device/tplink-4mlzma)
|
||||
+ BOARDNAME := TL-WR741ND-v4
|
||||
+ DEVICE_PROFILE := TLWR740
|
||||
+ TPLINK_HWID := 0x07400005
|
||||
+ CONSOLE := ttyATH0,115200
|
||||
+endef
|
||||
+
|
||||
define Device/tl-wr741nd-v1
|
||||
$(Device/tplink-4m)
|
||||
BOARDNAME := TL-WR741ND
|
||||
@@ -530,7 +538,7 @@ define Device/tl-wr743nd-v2
|
||||
TPLINK_HWID := 0x07430002
|
||||
CONSOLE := ttyATH0,115200
|
||||
endef
|
||||
-TARGET_DEVICES += tl-wr740n-v4 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
|
||||
+TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
|
||||
|
||||
define Device/tl-wr841n-v8
|
||||
$(Device/tplink-4mlzma)
|
@ -1,35 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 21 Jun 2015 22:48:04 +0200
|
||||
Subject: ar71xx: add support for TL-WR741ND v5
|
||||
|
||||
This device is identical to the TL-WR740N v5, it even uses the same HWID (which
|
||||
wasn't the case for older TL-WR741ND revisions).
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index 1fe88d5..78d35e1 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -531,6 +531,14 @@ define Device/tl-wr741nd-v4
|
||||
CONSOLE := ttyATH0,115200
|
||||
endef
|
||||
|
||||
+define Device/tl-wr741nd-v5
|
||||
+ $(Device/tplink-4mlzma)
|
||||
+ BOARDNAME := TL-WR741ND-v4
|
||||
+ DEVICE_PROFILE := TLWR741
|
||||
+ TPLINK_HWID := 0x07400005
|
||||
+ CONSOLE := ttyATH0,115200
|
||||
+endef
|
||||
+
|
||||
define Device/tl-wr743nd-v2
|
||||
$(Device/tplink-4mlzma)
|
||||
BOARDNAME := TL-WR741ND-v4
|
||||
@@ -538,7 +546,7 @@ define Device/tl-wr743nd-v2
|
||||
TPLINK_HWID := 0x07430002
|
||||
CONSOLE := ttyATH0,115200
|
||||
endef
|
||||
-TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
|
||||
+TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2
|
||||
|
||||
define Device/tl-wr841n-v8
|
||||
$(Device/tplink-4mlzma)
|
@ -1,131 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 16 Jul 2015 22:01:02 +0200
|
||||
Subject: sunxi: fix uboot install location
|
||||
|
||||
Install uboot files to KERNEL_BUILD_DIR instead of BIN_DIR to fix the
|
||||
ImageBuilder. Similar fixes are necessary for many (all?) other uboot
|
||||
targets.
|
||||
|
||||
Also remove the DTS copy command, BIN_DIR was unnecessarily cluttered with
|
||||
DTS files unrelated to the chosen profile.
|
||||
|
||||
diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
|
||||
index 14ba922..9032600 100644
|
||||
--- a/package/boot/uboot-sunxi/Makefile
|
||||
+++ b/package/boot/uboot-sunxi/Makefile
|
||||
@@ -6,6 +6,7 @@
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
+include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=u-boot
|
||||
PKG_VERSION:=2015.01
|
||||
@@ -16,7 +17,7 @@ PKG_SOURCE_URL:= \
|
||||
|
||||
PKG_MD5SUM:=7f08dc9e98a71652bd6968888ed6ec95
|
||||
|
||||
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
||||
PKG_LICENSE_FILES:=Licenses/README
|
||||
@@ -136,16 +137,16 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/uboot/install/default
|
||||
- $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
|
||||
$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
|
||||
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
|
||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin
|
||||
$(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
|
||||
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin
|
||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin
|
||||
$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
|
||||
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin
|
||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
|
||||
$(CP) uEnv.txt \
|
||||
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt
|
||||
- mkimage -C none -A arm -T script -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.scr
|
||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt
|
||||
+ mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \
|
||||
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
|
||||
endef
|
||||
|
||||
define Package/uboot/install/template
|
||||
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
|
||||
index 6fcd61f..19ab935 100644
|
||||
--- a/target/linux/sunxi/image/Makefile
|
||||
+++ b/target/linux/sunxi/image/Makefile
|
||||
@@ -11,28 +11,12 @@ include $(INCLUDE_DIR)/host.mk
|
||||
FAT32_BLOCK_SIZE=1024
|
||||
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
|
||||
|
||||
-BOARDS:= \
|
||||
- sun4i-a10-cubieboard \
|
||||
- sun4i-a10-olinuxino-lime \
|
||||
- sun4i-a10-pcduino \
|
||||
- sun5i-a13-olinuxino \
|
||||
- sun6i-a31-colombus \
|
||||
- sun6i-a31-m9 \
|
||||
- sun7i-a20-bananapi \
|
||||
- sun7i-a20-bananapro \
|
||||
- sun7i-a20-cubieboard2 \
|
||||
- sun7i-a20-cubietruck \
|
||||
- sun7i-a20-olinuxino-lime \
|
||||
- sun7i-a20-olinuxino-micro \
|
||||
- sun7i-a20-pcduino3 \
|
||||
- sun7i-a20-lamobo-r1
|
||||
-
|
||||
define Image/BuildKernel
|
||||
mkimage -A arm -O linux -T kernel -C none \
|
||||
-a 0x40008000 -e 0x40008000 \
|
||||
-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
|
||||
-d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
|
||||
-
|
||||
+
|
||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
$(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
|
||||
echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
|
||||
@@ -42,27 +26,23 @@ define Image/BuildKernel
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \
|
||||
)
|
||||
endif
|
||||
-
|
||||
- $(foreach board,$(BOARDS),
|
||||
- $(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/
|
||||
- )
|
||||
endef
|
||||
|
||||
define Image/Build/SDCard
|
||||
rm -f $(KDIR)/boot.img
|
||||
mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS)
|
||||
-
|
||||
- mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr
|
||||
- mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(2).dtb ::dtb
|
||||
+
|
||||
+ mcopy -i $(KDIR)/boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr
|
||||
+ mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb
|
||||
mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage
|
||||
-
|
||||
+
|
||||
./gen_sunxi_sdcard_img.sh \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \
|
||||
$(KDIR)/boot.img \
|
||||
$(KDIR)/root.$(1) \
|
||||
$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
|
||||
- $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-u-boot-with-spl.bin
|
||||
+ $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin
|
||||
endef
|
||||
|
||||
define Image/Build/Profile/A10-OLinuXino-Lime
|
||||
@@ -124,7 +104,7 @@ endef
|
||||
define Image/Build
|
||||
$(call Image/Build/$(1),$(1))
|
||||
$(call Image/Build/Profile/$(PROFILE),$(1))
|
||||
-
|
||||
+
|
||||
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
|
||||
endef
|
||||
|
@ -1,21 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 16 Jul 2015 22:13:59 +0200
|
||||
Subject: sunxi: respect CONFIG_TARGET_IMAGES_GZIP
|
||||
|
||||
The ext4 images are huge uncompressed.
|
||||
|
||||
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
|
||||
index 19ab935..d3f4409 100644
|
||||
--- a/target/linux/sunxi/image/Makefile
|
||||
+++ b/target/linux/sunxi/image/Makefile
|
||||
@@ -43,6 +43,10 @@ define Image/Build/SDCard
|
||||
$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
|
||||
$(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin
|
||||
+
|
||||
+ ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
|
||||
+ gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img
|
||||
+ endif
|
||||
endef
|
||||
|
||||
define Image/Build/Profile/A10-OLinuXino-Lime
|
@ -1,62 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sat, 18 Jul 2015 17:13:23 +0200
|
||||
Subject: odhcp6c: add option "sourcefilter" to disable source filter
|
||||
|
||||
Signed-off-by: Steven Barth <steven@midlink.org>
|
||||
|
||||
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
|
||||
index 5bf43bd..75de54c 100644
|
||||
--- a/package/network/ipv6/odhcp6c/Makefile
|
||||
+++ b/package/network/ipv6/odhcp6c/Makefile
|
||||
@@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=odhcp6c
|
||||
-PKG_VERSION:=2015-07-13
|
||||
+PKG_VERSION:=2015-07-18
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
||||
index b8cbddb..33f6d9b 100755
|
||||
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
||||
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
||||
@@ -76,7 +76,7 @@ setup_interface () {
|
||||
done
|
||||
|
||||
for entry in $RA_ROUTES; do
|
||||
- local duplicate=0
|
||||
+ local duplicate=$NOSOURCEFILTER
|
||||
local addr="${entry%%/*}"
|
||||
entry="${entry#*/}"
|
||||
local mask="${entry%%,*}"
|
||||
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
|
||||
index adcb100..4a453fd 100755
|
||||
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
|
||||
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
|
||||
@@ -28,14 +28,15 @@ proto_dhcpv6_init_config() {
|
||||
proto_config_add_boolean delegate
|
||||
proto_config_add_int "soltimeout"
|
||||
proto_config_add_boolean fakeroutes
|
||||
+ proto_config_add_boolean sourcefilter
|
||||
}
|
||||
|
||||
proto_dhcpv6_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
- local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
|
||||
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
|
||||
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
|
||||
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
|
||||
|
||||
|
||||
# Configure
|
||||
@@ -76,6 +77,7 @@ proto_dhcpv6_setup() {
|
||||
[ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat"
|
||||
[ -n "$zone" ] && proto_export "ZONE=$zone"
|
||||
[ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1"
|
||||
+ [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1"
|
||||
|
||||
proto_export "INTERFACE=$config"
|
||||
proto_run_command "$config" odhcp6c \
|
@ -1,57 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 6 Aug 2015 03:01:38 +0200
|
||||
Subject: ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND v9, Compex WPJ531)
|
||||
|
||||
The initialization routines for these boards were relying on some (wrong)
|
||||
defaults for the QCA953x ethernet. Make these defaults explicit to prevent
|
||||
breaking them when the QCA953x defaults are fixed.
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
|
||||
index c28afc6..3e5c2a2 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
|
||||
@@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void)
|
||||
ath79_register_mdio(0, 0x0);
|
||||
|
||||
/* LAN */
|
||||
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
|
||||
+ ath79_eth1_data.duplex = DUPLEX_FULL;
|
||||
+ ath79_switch_data.phy_poll_mask |= BIT(4);
|
||||
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
|
||||
ath79_register_eth(1);
|
||||
|
||||
/* WAN */
|
||||
ath79_switch_data.phy4_mii_en = 1;
|
||||
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
|
||||
+ ath79_eth0_data.duplex = DUPLEX_FULL;
|
||||
+ ath79_eth0_data.speed = SPEED_100;
|
||||
+ ath79_eth0_data.phy_mask = BIT(4);
|
||||
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
|
||||
ath79_register_eth(0);
|
||||
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
|
||||
index bc13d70..e665a2e 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
|
||||
@@ -105,12 +105,19 @@ static void __init common_setup(void)
|
||||
ath79_register_mdio(0, 0x0);
|
||||
|
||||
/* LAN */
|
||||
+ ath79_eth0_data.duplex = DUPLEX_FULL;
|
||||
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
|
||||
+ ath79_eth0_data.speed = SPEED_100;
|
||||
+ ath79_eth0_data.phy_mask = BIT(4);
|
||||
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
|
||||
ath79_register_eth(0);
|
||||
|
||||
/* WAN */
|
||||
ath79_switch_data.phy4_mii_en = 1;
|
||||
+ ath79_eth1_data.duplex = DUPLEX_FULL;
|
||||
ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
|
||||
+ ath79_eth1_data.speed = SPEED_100;
|
||||
+ ath79_switch_data.phy_poll_mask |= BIT(4);
|
||||
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
|
||||
ath79_register_eth(1);
|
||||
|
@ -1,807 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 6 Aug 2015 03:01:47 +0200
|
||||
Subject: ar71xx: rework patch for qca953x/956x
|
||||
|
||||
Patch cherry-picked from the following location:
|
||||
https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?h=release/coconut_ioe4531_2.0&id=5c357bf6c763e4140dddcc9a3bc5f005525a9c0e
|
||||
|
||||
Changelist,
|
||||
- add more register defines
|
||||
- add EHCI support
|
||||
- fix GPIO pin count to 18
|
||||
- fix chained irq disabled
|
||||
- fix GMAC0/GMAC1 initial
|
||||
- fix WMAC irq number to 47
|
||||
- merge the changes of dev-eth.c from the patch to file.
|
||||
|
||||
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
||||
index ae3db4c..ff94e2e 100644
|
||||
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
||||
@@ -198,6 +198,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask)
|
||||
case ATH79_SOC_AR9330:
|
||||
case ATH79_SOC_AR9331:
|
||||
case ATH79_SOC_QCA9533:
|
||||
+ case ATH79_SOC_QCA9561:
|
||||
+ case ATH79_SOC_TP9343:
|
||||
mdio_dev = &ath79_mdio1_device;
|
||||
mdio_data = &ath79_mdio1_data;
|
||||
break;
|
||||
@@ -256,6 +258,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask)
|
||||
break;
|
||||
|
||||
case ATH79_SOC_QCA9533:
|
||||
+ case ATH79_SOC_QCA9561:
|
||||
+ case ATH79_SOC_TP9343:
|
||||
mdio_data->builtin_switch = 1;
|
||||
break;
|
||||
|
||||
@@ -571,6 +575,8 @@ static void __init ath79_init_eth_pll_data(unsigned int id)
|
||||
case ATH79_SOC_QCA9533:
|
||||
case ATH79_SOC_QCA9556:
|
||||
case ATH79_SOC_QCA9558:
|
||||
+ case ATH79_SOC_QCA9561:
|
||||
+ case ATH79_SOC_TP9343:
|
||||
pll_10 = AR934X_PLL_VAL_10;
|
||||
pll_100 = AR934X_PLL_VAL_100;
|
||||
pll_1000 = AR934X_PLL_VAL_1000;
|
||||
@@ -627,6 +633,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id,
|
||||
case ATH79_SOC_AR9330:
|
||||
case ATH79_SOC_AR9331:
|
||||
case ATH79_SOC_QCA9533:
|
||||
+ case ATH79_SOC_QCA9561:
|
||||
+ case ATH79_SOC_TP9343:
|
||||
pdata->phy_if_mode = PHY_INTERFACE_MODE_MII;
|
||||
break;
|
||||
|
||||
@@ -687,7 +695,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id,
|
||||
case ATH79_SOC_AR7241:
|
||||
case ATH79_SOC_AR9330:
|
||||
case ATH79_SOC_AR9331:
|
||||
- case ATH79_SOC_QCA9533:
|
||||
+ case ATH79_SOC_QCA9561:
|
||||
+ case ATH79_SOC_TP9343:
|
||||
pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII;
|
||||
break;
|
||||
|
||||
@@ -697,6 +706,7 @@ static int __init ath79_setup_phy_if_mode(unsigned int id,
|
||||
case ATH79_SOC_AR9341:
|
||||
case ATH79_SOC_AR9342:
|
||||
case ATH79_SOC_AR9344:
|
||||
+ case ATH79_SOC_QCA9533:
|
||||
switch (pdata->phy_if_mode) {
|
||||
case PHY_INTERFACE_MODE_MII:
|
||||
case PHY_INTERFACE_MODE_GMII:
|
||||
@@ -986,6 +996,7 @@ void __init ath79_register_eth(unsigned int id)
|
||||
case ATH79_SOC_AR9341:
|
||||
case ATH79_SOC_AR9342:
|
||||
case ATH79_SOC_AR9344:
|
||||
+ case ATH79_SOC_QCA9533:
|
||||
if (id == 0) {
|
||||
pdata->reset_bit = AR934X_RESET_GE0_MAC |
|
||||
AR934X_RESET_GE0_MDIO;
|
||||
@@ -1017,7 +1028,8 @@ void __init ath79_register_eth(unsigned int id)
|
||||
pdata->fifo_cfg3 = 0x01f00140;
|
||||
break;
|
||||
|
||||
- case ATH79_SOC_QCA9533:
|
||||
+ case ATH79_SOC_QCA9561:
|
||||
+ case ATH79_SOC_TP9343:
|
||||
if (id == 0) {
|
||||
pdata->reset_bit = AR933X_RESET_GE0_MAC |
|
||||
AR933X_RESET_GE0_MDIO;
|
||||
@@ -1123,6 +1135,8 @@ void __init ath79_register_eth(unsigned int id)
|
||||
case ATH79_SOC_AR9330:
|
||||
case ATH79_SOC_AR9331:
|
||||
case ATH79_SOC_QCA9533:
|
||||
+ case ATH79_SOC_QCA9561:
|
||||
+ case ATH79_SOC_TP9343:
|
||||
pdata->mii_bus_dev = &ath79_mdio1_device.dev;
|
||||
break;
|
||||
|
||||
diff --git a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
||||
index f3b4446..cf10af3 100644
|
||||
--- a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch
|
||||
@@ -175,6 +175,48 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
soc_is_qca955x()) {
|
||||
ath79_uart_data[0].uartclk = uart_clk_rate;
|
||||
platform_device_register(&ath79_uart_device);
|
||||
+--- a/arch/mips/ath79/dev-usb.c
|
||||
++++ b/arch/mips/ath79/dev-usb.c
|
||||
+@@ -236,6 +236,30 @@ static void __init ar934x_usb_setup(void
|
||||
+ &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
|
||||
+ }
|
||||
+
|
||||
++static void __init qca953x_usb_setup(void)
|
||||
++{
|
||||
++ u32 bootstrap;
|
||||
++
|
||||
++ bootstrap = ath79_reset_rr(QCA953X_RESET_REG_BOOTSTRAP);
|
||||
++
|
||||
++ ath79_device_reset_set(QCA953X_RESET_USBSUS_OVERRIDE);
|
||||
++ udelay(1000);
|
||||
++
|
||||
++ ath79_device_reset_clear(QCA953X_RESET_USB_PHY);
|
||||
++ udelay(1000);
|
||||
++
|
||||
++ ath79_device_reset_clear(QCA953X_RESET_USB_PHY_ANALOG);
|
||||
++ udelay(1000);
|
||||
++
|
||||
++ ath79_device_reset_clear(QCA953X_RESET_USB_HOST);
|
||||
++ udelay(1000);
|
||||
++
|
||||
++ ath79_usb_register("ehci-platform", -1,
|
||||
++ QCA953X_EHCI_BASE, QCA953X_EHCI_SIZE,
|
||||
++ ATH79_CPU_IRQ(3),
|
||||
++ &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
|
||||
++}
|
||||
++
|
||||
+ static void qca955x_usb_reset_notifier(struct platform_device *pdev)
|
||||
+ {
|
||||
+ u32 base;
|
||||
+@@ -286,6 +310,8 @@ void __init ath79_register_usb(void)
|
||||
+ ar933x_usb_setup();
|
||||
+ else if (soc_is_ar934x())
|
||||
+ ar934x_usb_setup();
|
||||
++ else if (soc_is_qca953x())
|
||||
++ qca953x_usb_setup();
|
||||
+ else if (soc_is_qca955x())
|
||||
+ qca955x_usb_setup();
|
||||
+ else
|
||||
--- a/arch/mips/ath79/dev-wmac.c
|
||||
+++ b/arch/mips/ath79/dev-wmac.c
|
||||
@@ -101,7 +101,7 @@ static int ar933x_wmac_reset(void)
|
||||
@@ -207,8 +249,8 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
+
|
||||
+ ath79_wmac_resources[0].start = QCA953X_WMAC_BASE;
|
||||
+ ath79_wmac_resources[0].end = QCA953X_WMAC_BASE + QCA953X_WMAC_SIZE - 1;
|
||||
-+ ath79_wmac_resources[1].start = ATH79_CPU_IRQ(2);
|
||||
-+ ath79_wmac_resources[1].end = ATH79_CPU_IRQ(2);
|
||||
++ ath79_wmac_resources[1].start = ATH79_IP2_IRQ(1);
|
||||
++ ath79_wmac_resources[1].end = ATH79_IP2_IRQ(1);
|
||||
+
|
||||
+ t = ath79_reset_rr(QCA953X_RESET_REG_BOOTSTRAP);
|
||||
+ if (t & QCA953X_BOOTSTRAP_REF_CLK_40)
|
||||
@@ -244,6 +286,24 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
_prom_putchar = prom_putchar_ar71xx;
|
||||
--- a/arch/mips/ath79/gpio.c
|
||||
+++ b/arch/mips/ath79/gpio.c
|
||||
+@@ -148,7 +148,7 @@ static void __iomem *ath79_gpio_get_func
|
||||
+ soc_is_ar913x() ||
|
||||
+ soc_is_ar933x())
|
||||
+ reg = AR71XX_GPIO_REG_FUNC;
|
||||
+- else if (soc_is_ar934x())
|
||||
++ else if (soc_is_ar934x() || soc_is_qca953x())
|
||||
+ reg = AR934X_GPIO_REG_FUNC;
|
||||
+ else
|
||||
+ BUG();
|
||||
+@@ -187,7 +187,7 @@ void __init ath79_gpio_output_select(uns
|
||||
+ unsigned int reg;
|
||||
+ u32 t, s;
|
||||
+
|
||||
+- BUG_ON(!soc_is_ar934x());
|
||||
++ BUG_ON(!soc_is_ar934x() && !soc_is_qca953x());
|
||||
+
|
||||
+ if (gpio >= AR934X_GPIO_COUNT)
|
||||
+ return;
|
||||
@@ -224,6 +224,8 @@ void __init ath79_gpio_init(void)
|
||||
ath79_gpio_count = AR933X_GPIO_COUNT;
|
||||
else if (soc_is_ar934x())
|
||||
@@ -272,16 +332,77 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
soc_is_qca955x())
|
||||
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
||||
else
|
||||
-@@ -352,6 +353,9 @@ void __init arch_init_irq(void)
|
||||
+@@ -153,6 +154,38 @@ static void ar934x_ip2_irq_init(void)
|
||||
+ irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch);
|
||||
+ }
|
||||
+
|
||||
++static void qca953x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc)
|
||||
++{
|
||||
++ u32 status;
|
||||
++
|
||||
++ disable_irq_nosync(irq);
|
||||
++
|
||||
++ status = ath79_reset_rr(QCA953X_RESET_REG_PCIE_WMAC_INT_STATUS);
|
||||
++
|
||||
++ if (status & QCA953X_PCIE_WMAC_INT_PCIE_ALL) {
|
||||
++ ath79_ddr_wb_flush(QCA953X_DDR_REG_FLUSH_PCIE);
|
||||
++ generic_handle_irq(ATH79_IP2_IRQ(0));
|
||||
++ } else if (status & QCA953X_PCIE_WMAC_INT_WMAC_ALL) {
|
||||
++ ath79_ddr_wb_flush(QCA953X_DDR_REG_FLUSH_WMAC);
|
||||
++ generic_handle_irq(ATH79_IP2_IRQ(1));
|
||||
++ } else {
|
||||
++ spurious_interrupt();
|
||||
++ }
|
||||
++
|
||||
++ enable_irq(irq);
|
||||
++}
|
||||
++
|
||||
++static void qca953x_irq_init(void)
|
||||
++{
|
||||
++ int i;
|
||||
++
|
||||
++ for (i = ATH79_IP2_IRQ_BASE;
|
||||
++ i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
||||
++ irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
||||
++
|
||||
++ irq_set_chained_handler(ATH79_CPU_IRQ(2), qca953x_ip2_irq_dispatch);
|
||||
++}
|
||||
++
|
||||
+ static void qca955x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc)
|
||||
+ {
|
||||
+ u32 status;
|
||||
+@@ -335,6 +368,12 @@ static void ar934x_ip3_handler(void)
|
||||
+ do_IRQ(ATH79_CPU_IRQ(3));
|
||||
+ }
|
||||
+
|
||||
++static void qca953x_ip3_handler(void)
|
||||
++{
|
||||
++ ath79_ddr_wb_flush(QCA953X_DDR_REG_FLUSH_USB);
|
||||
++ do_IRQ(ATH79_CPU_IRQ(3));
|
||||
++}
|
||||
++
|
||||
+ void __init arch_init_irq(void)
|
||||
+ {
|
||||
+ if (soc_is_ar71xx()) {
|
||||
+@@ -352,6 +391,9 @@ void __init arch_init_irq(void)
|
||||
} else if (soc_is_ar934x()) {
|
||||
ath79_ip2_handler = ath79_default_ip2_handler;
|
||||
ath79_ip3_handler = ar934x_ip3_handler;
|
||||
+ } else if (soc_is_qca953x()) {
|
||||
+ ath79_ip2_handler = ath79_default_ip2_handler;
|
||||
-+ ath79_ip3_handler = ath79_default_ip3_handler;
|
||||
++ ath79_ip3_handler = qca953x_ip3_handler;
|
||||
} else if (soc_is_qca955x()) {
|
||||
ath79_ip2_handler = ath79_default_ip2_handler;
|
||||
ath79_ip3_handler = ath79_default_ip3_handler;
|
||||
+@@ -365,6 +407,8 @@ void __init arch_init_irq(void)
|
||||
+
|
||||
+ if (soc_is_ar934x())
|
||||
+ ar934x_ip2_irq_init();
|
||||
++ else if (soc_is_qca953x())
|
||||
++ qca953x_irq_init();
|
||||
+ else if (soc_is_qca955x())
|
||||
+ qca955x_irq_init();
|
||||
+ }
|
||||
--- a/arch/mips/ath79/setup.c
|
||||
+++ b/arch/mips/ath79/setup.c
|
||||
@@ -59,6 +59,7 @@ static void __init ath79_detect_sys_type
|
||||
@@ -329,23 +450,49 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
pr_info("SoC: %s\n", ath79_sys_type);
|
||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
-@@ -105,6 +105,9 @@
|
||||
+@@ -105,6 +105,21 @@
|
||||
#define AR934X_SRIF_BASE (AR71XX_APB_BASE + 0x00116000)
|
||||
#define AR934X_SRIF_SIZE 0x1000
|
||||
|
||||
++#define QCA953X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000)
|
||||
++#define QCA953X_GMAC_SIZE 0x14
|
||||
+#define QCA953X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
|
||||
+#define QCA953X_WMAC_SIZE 0x20000
|
||||
++#define QCA953X_EHCI_BASE 0x1b000000
|
||||
++#define QCA953X_EHCI_SIZE 0x200
|
||||
++#define QCA953X_SRIF_BASE (AR71XX_APB_BASE + 0x00116000)
|
||||
++#define QCA953X_SRIF_SIZE 0x1000
|
||||
++
|
||||
++#define QCA953X_PCI_CFG_BASE0 0x14000000
|
||||
++#define QCA953X_PCI_CTRL_BASE0 (AR71XX_APB_BASE + 0x000f0000)
|
||||
++#define QCA953X_PCI_CRP_BASE0 (AR71XX_APB_BASE + 0x000c0000)
|
||||
++#define QCA953X_PCI_MEM_BASE0 0x10000000
|
||||
++#define QCA953X_PCI_MEM_SIZE 0x02000000
|
||||
+
|
||||
#define QCA955X_PCI_MEM_BASE0 0x10000000
|
||||
#define QCA955X_PCI_MEM_BASE1 0x12000000
|
||||
#define QCA955X_PCI_MEM_SIZE 0x02000000
|
||||
-@@ -279,6 +282,43 @@
|
||||
+@@ -173,6 +188,12 @@
|
||||
+ #define AR934X_DDR_REG_FLUSH_PCIE 0xa8
|
||||
+ #define AR934X_DDR_REG_FLUSH_WMAC 0xac
|
||||
+
|
||||
++#define QCA953X_DDR_REG_FLUSH_GE0 0x9c
|
||||
++#define QCA953X_DDR_REG_FLUSH_GE1 0xa0
|
||||
++#define QCA953X_DDR_REG_FLUSH_USB 0xa4
|
||||
++#define QCA953X_DDR_REG_FLUSH_PCIE 0xa8
|
||||
++#define QCA953X_DDR_REG_FLUSH_WMAC 0xac
|
||||
++
|
||||
+ /*
|
||||
+ * PLL block
|
||||
+ */
|
||||
+@@ -279,6 +300,44 @@
|
||||
|
||||
#define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL BIT(6)
|
||||
|
||||
+#define QCA953X_PLL_CPU_CONFIG_REG 0x00
|
||||
+#define QCA953X_PLL_DDR_CONFIG_REG 0x04
|
||||
+#define QCA953X_PLL_CLK_CTRL_REG 0x08
|
||||
++#define QCA953X_PLL_SWITCH_CLOCK_CONTROL_REG 0x24
|
||||
+#define QCA953X_PLL_ETH_XMII_CONTROL_REG 0x2c
|
||||
+#define QCA953X_PLL_ETH_SGMII_CONTROL_REG 0x48
|
||||
+
|
||||
@@ -356,7 +503,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
+#define QCA953X_PLL_CPU_CONFIG_REFDIV_SHIFT 12
|
||||
+#define QCA953X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f
|
||||
+#define QCA953X_PLL_CPU_CONFIG_OUTDIV_SHIFT 19
|
||||
-+#define QCA953X_PLL_CPU_CONFIG_OUTDIV_MASK 0x3
|
||||
++#define QCA953X_PLL_CPU_CONFIG_OUTDIV_MASK 0x7
|
||||
+
|
||||
+#define QCA953X_PLL_DDR_CONFIG_NFRAC_SHIFT 0
|
||||
+#define QCA953X_PLL_DDR_CONFIG_NFRAC_MASK 0x3ff
|
||||
@@ -383,27 +530,85 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
#define QCA955X_PLL_CPU_CONFIG_REG 0x00
|
||||
#define QCA955X_PLL_DDR_CONFIG_REG 0x04
|
||||
#define QCA955X_PLL_CLK_CTRL_REG 0x08
|
||||
-@@ -355,6 +395,10 @@
|
||||
+@@ -355,6 +414,10 @@
|
||||
#define AR934X_RESET_REG_BOOTSTRAP 0xb0
|
||||
#define AR934X_RESET_REG_PCIE_WMAC_INT_STATUS 0xac
|
||||
|
||||
+#define QCA953X_RESET_REG_RESET_MODULE 0x1c
|
||||
+#define QCA953X_RESET_REG_BOOTSTRAP 0xb0
|
||||
-+#define QCA953X_RESET_REG_EXT_INT_STATUS 0xac
|
||||
++#define QCA953X_RESET_REG_PCIE_WMAC_INT_STATUS 0xac
|
||||
+
|
||||
#define QCA955X_RESET_REG_RESET_MODULE 0x1c
|
||||
#define QCA955X_RESET_REG_BOOTSTRAP 0xb0
|
||||
#define QCA955X_RESET_REG_EXT_INT_STATUS 0xac
|
||||
-@@ -503,6 +547,8 @@
|
||||
+@@ -450,6 +513,27 @@
|
||||
+ #define AR934X_RESET_MBOX BIT(1)
|
||||
+ #define AR934X_RESET_I2S BIT(0)
|
||||
+
|
||||
++#define QCA953X_RESET_USB_EXT_PWR BIT(29)
|
||||
++#define QCA953X_RESET_EXTERNAL BIT(28)
|
||||
++#define QCA953X_RESET_RTC BIT(27)
|
||||
++#define QCA953X_RESET_FULL_CHIP BIT(24)
|
||||
++#define QCA953X_RESET_GE1_MDIO BIT(23)
|
||||
++#define QCA953X_RESET_GE0_MDIO BIT(22)
|
||||
++#define QCA953X_RESET_CPU_NMI BIT(21)
|
||||
++#define QCA953X_RESET_CPU_COLD BIT(20)
|
||||
++#define QCA953X_RESET_DDR BIT(16)
|
||||
++#define QCA953X_RESET_USB_PHY_PLL_PWD_EXT BIT(15)
|
||||
++#define QCA953X_RESET_GE1_MAC BIT(13)
|
||||
++#define QCA953X_RESET_ETH_SWITCH_ANALOG BIT(12)
|
||||
++#define QCA953X_RESET_USB_PHY_ANALOG BIT(11)
|
||||
++#define QCA953X_RESET_GE0_MAC BIT(9)
|
||||
++#define QCA953X_RESET_ETH_SWITCH BIT(8)
|
||||
++#define QCA953X_RESET_PCIE_PHY BIT(7)
|
||||
++#define QCA953X_RESET_PCIE BIT(6)
|
||||
++#define QCA953X_RESET_USB_HOST BIT(5)
|
||||
++#define QCA953X_RESET_USB_PHY BIT(4)
|
||||
++#define QCA953X_RESET_USBSUS_OVERRIDE BIT(3)
|
||||
++
|
||||
+ #define QCA955X_RESET_HOST BIT(31)
|
||||
+ #define QCA955X_RESET_SLIC BIT(30)
|
||||
+ #define QCA955X_RESET_HDMA BIT(29)
|
||||
+@@ -503,6 +587,13 @@
|
||||
#define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1)
|
||||
#define AR934X_BOOTSTRAP_DDR1 BIT(0)
|
||||
|
||||
++#define QCA953X_BOOTSTRAP_SW_OPTION2 BIT(12)
|
||||
++#define QCA953X_BOOTSTRAP_SW_OPTION1 BIT(11)
|
||||
++#define QCA953X_BOOTSTRAP_EJTAG_MODE BIT(5)
|
||||
+#define QCA953X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
||||
++#define QCA953X_BOOTSTRAP_SDRAM_DISABLED BIT(1)
|
||||
++#define QCA953X_BOOTSTRAP_DDR1 BIT(0)
|
||||
+
|
||||
#define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
||||
|
||||
#define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0)
|
||||
-@@ -565,6 +611,8 @@
|
||||
+@@ -523,6 +614,24 @@
|
||||
+ AR934X_PCIE_WMAC_INT_PCIE_RC1 | AR934X_PCIE_WMAC_INT_PCIE_RC2 | \
|
||||
+ AR934X_PCIE_WMAC_INT_PCIE_RC3)
|
||||
+
|
||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_MISC BIT(0)
|
||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_TX BIT(1)
|
||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_RXLP BIT(2)
|
||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_RXHP BIT(3)
|
||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC BIT(4)
|
||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC0 BIT(5)
|
||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC1 BIT(6)
|
||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC2 BIT(7)
|
||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_RC3 BIT(8)
|
||||
++#define QCA953X_PCIE_WMAC_INT_WMAC_ALL \
|
||||
++ (QCA953X_PCIE_WMAC_INT_WMAC_MISC | QCA953X_PCIE_WMAC_INT_WMAC_TX | \
|
||||
++ QCA953X_PCIE_WMAC_INT_WMAC_RXLP | QCA953X_PCIE_WMAC_INT_WMAC_RXHP)
|
||||
++
|
||||
++#define QCA953X_PCIE_WMAC_INT_PCIE_ALL \
|
||||
++ (QCA953X_PCIE_WMAC_INT_PCIE_RC | QCA953X_PCIE_WMAC_INT_PCIE_RC0 | \
|
||||
++ QCA953X_PCIE_WMAC_INT_PCIE_RC1 | QCA953X_PCIE_WMAC_INT_PCIE_RC2 | \
|
||||
++ QCA953X_PCIE_WMAC_INT_PCIE_RC3)
|
||||
++
|
||||
+ #define QCA955X_EXT_INT_WMAC_MISC BIT(0)
|
||||
+ #define QCA955X_EXT_INT_WMAC_TX BIT(1)
|
||||
+ #define QCA955X_EXT_INT_WMAC_RXLP BIT(2)
|
||||
+@@ -565,6 +674,8 @@
|
||||
#define REV_ID_MAJOR_AR9341 0x0120
|
||||
#define REV_ID_MAJOR_AR9342 0x1120
|
||||
#define REV_ID_MAJOR_AR9344 0x2120
|
||||
@@ -412,7 +617,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
#define REV_ID_MAJOR_QCA9556 0x0130
|
||||
#define REV_ID_MAJOR_QCA9558 0x1130
|
||||
|
||||
-@@ -587,6 +635,8 @@
|
||||
+@@ -587,6 +698,8 @@
|
||||
|
||||
#define AR934X_REV_ID_REVISION_MASK 0xf
|
||||
|
||||
@@ -421,14 +626,81 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
|
||||
#define QCA955X_REV_ID_REVISION_MASK 0xf
|
||||
|
||||
/*
|
||||
-@@ -640,6 +690,7 @@
|
||||
+@@ -634,12 +747,32 @@
|
||||
+ #define AR934X_GPIO_REG_OUT_FUNC5 0x40
|
||||
+ #define AR934X_GPIO_REG_FUNC 0x6c
|
||||
+
|
||||
++#define QCA953X_GPIO_REG_OUT_FUNC0 0x2c
|
||||
++#define QCA953X_GPIO_REG_OUT_FUNC1 0x30
|
||||
++#define QCA953X_GPIO_REG_OUT_FUNC2 0x34
|
||||
++#define QCA953X_GPIO_REG_OUT_FUNC3 0x38
|
||||
++#define QCA953X_GPIO_REG_OUT_FUNC4 0x3c
|
||||
++#define QCA953X_GPIO_REG_IN_ENABLE0 0x44
|
||||
++#define QCA953X_GPIO_REG_FUNC 0x6c
|
||||
++
|
||||
++#define QCA953X_GPIO_OUT_MUX_SPI_CS1 10
|
||||
++#define QCA953X_GPIO_OUT_MUX_SPI_CS2 11
|
||||
++#define QCA953X_GPIO_OUT_MUX_SPI_CS0 9
|
||||
++#define QCA953X_GPIO_OUT_MUX_SPI_CLK 8
|
||||
++#define QCA953X_GPIO_OUT_MUX_SPI_MOSI 12
|
||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK1 41
|
||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK2 42
|
||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK3 43
|
||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK4 44
|
||||
++#define QCA953X_GPIO_OUT_MUX_LED_LINK5 45
|
||||
++
|
||||
+ #define AR71XX_GPIO_COUNT 16
|
||||
+ #define AR7240_GPIO_COUNT 18
|
||||
+ #define AR7241_GPIO_COUNT 20
|
||||
#define AR913X_GPIO_COUNT 22
|
||||
#define AR933X_GPIO_COUNT 30
|
||||
#define AR934X_GPIO_COUNT 23
|
||||
-+#define QCA953X_GPIO_COUNT 24
|
||||
++#define QCA953X_GPIO_COUNT 18
|
||||
#define QCA955X_GPIO_COUNT 24
|
||||
|
||||
/*
|
||||
+@@ -663,6 +796,24 @@
|
||||
+ #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
|
||||
+ #define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
|
||||
+
|
||||
++#define QCA953X_SRIF_CPU_DPLL1_REG 0x1c0
|
||||
++#define QCA953X_SRIF_CPU_DPLL2_REG 0x1c4
|
||||
++#define QCA953X_SRIF_CPU_DPLL3_REG 0x1c8
|
||||
++
|
||||
++#define QCA953X_SRIF_DDR_DPLL1_REG 0x240
|
||||
++#define QCA953X_SRIF_DDR_DPLL2_REG 0x244
|
||||
++#define QCA953X_SRIF_DDR_DPLL3_REG 0x248
|
||||
++
|
||||
++#define QCA953X_SRIF_DPLL1_REFDIV_SHIFT 27
|
||||
++#define QCA953X_SRIF_DPLL1_REFDIV_MASK 0x1f
|
||||
++#define QCA953X_SRIF_DPLL1_NINT_SHIFT 18
|
||||
++#define QCA953X_SRIF_DPLL1_NINT_MASK 0x1ff
|
||||
++#define QCA953X_SRIF_DPLL1_NFRAC_MASK 0x0003ffff
|
||||
++
|
||||
++#define QCA953X_SRIF_DPLL2_LOCAL_PLL BIT(30)
|
||||
++#define QCA953X_SRIF_DPLL2_OUTDIV_SHIFT 13
|
||||
++#define QCA953X_SRIF_DPLL2_OUTDIV_MASK 0x7
|
||||
++
|
||||
+ #define AR71XX_GPIO_FUNC_STEREO_EN BIT(17)
|
||||
+ #define AR71XX_GPIO_FUNC_SLIC_EN BIT(16)
|
||||
+ #define AR71XX_GPIO_FUNC_SPI_CS2_EN BIT(13)
|
||||
+@@ -804,6 +955,16 @@
|
||||
+ #define AR934X_ETH_CFG_RDV_DELAY_SHIFT 16
|
||||
+
|
||||
+ /*
|
||||
++ * QCA953X GMAC Interface
|
||||
++ */
|
||||
++#define QCA953X_GMAC_REG_ETH_CFG 0x00
|
||||
++
|
||||
++#define QCA953X_ETH_CFG_SW_ONLY_MODE BIT(6)
|
||||
++#define QCA953X_ETH_CFG_SW_PHY_SWAP BIT(7)
|
||||
++#define QCA953X_ETH_CFG_SW_APB_ACCESS BIT(9)
|
||||
++#define QCA953X_ETH_CFG_SW_ACC_MSB_FIRST BIT(13)
|
||||
++
|
||||
++/*
|
||||
+ * QCA955X GMAC Interface
|
||||
+ */
|
||||
+
|
||||
--- a/arch/mips/include/asm/mach-ath79/ath79.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ath79.h
|
||||
@@ -32,6 +32,7 @@ enum ath79_soc_type {
|
||||
diff --git a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
|
||||
index ab2bc38..eecccdc 100644
|
||||
--- a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
|
||||
@@ -142,74 +142,9 @@
|
||||
ath79_uart_data[0].uartclk = uart_clk_rate;
|
||||
platform_device_register(&ath79_uart_device);
|
||||
} else if (soc_is_ar933x()) {
|
||||
---- a/arch/mips/ath79/dev-eth.c
|
||||
-+++ b/arch/mips/ath79/dev-eth.c
|
||||
-@@ -198,6 +198,8 @@ void __init ath79_register_mdio(unsigned
|
||||
- case ATH79_SOC_AR9330:
|
||||
- case ATH79_SOC_AR9331:
|
||||
- case ATH79_SOC_QCA9533:
|
||||
-+ case ATH79_SOC_QCA9561:
|
||||
-+ case ATH79_SOC_TP9343:
|
||||
- mdio_dev = &ath79_mdio1_device;
|
||||
- mdio_data = &ath79_mdio1_data;
|
||||
- break;
|
||||
-@@ -256,6 +258,8 @@ void __init ath79_register_mdio(unsigned
|
||||
- break;
|
||||
-
|
||||
- case ATH79_SOC_QCA9533:
|
||||
-+ case ATH79_SOC_QCA9561:
|
||||
-+ case ATH79_SOC_TP9343:
|
||||
- mdio_data->builtin_switch = 1;
|
||||
- break;
|
||||
-
|
||||
-@@ -571,6 +575,8 @@ static void __init ath79_init_eth_pll_da
|
||||
- case ATH79_SOC_QCA9533:
|
||||
- case ATH79_SOC_QCA9556:
|
||||
- case ATH79_SOC_QCA9558:
|
||||
-+ case ATH79_SOC_QCA9561:
|
||||
-+ case ATH79_SOC_TP9343:
|
||||
- pll_10 = AR934X_PLL_VAL_10;
|
||||
- pll_100 = AR934X_PLL_VAL_100;
|
||||
- pll_1000 = AR934X_PLL_VAL_1000;
|
||||
-@@ -627,6 +633,8 @@ static int __init ath79_setup_phy_if_mod
|
||||
- case ATH79_SOC_AR9330:
|
||||
- case ATH79_SOC_AR9331:
|
||||
- case ATH79_SOC_QCA9533:
|
||||
-+ case ATH79_SOC_QCA9561:
|
||||
-+ case ATH79_SOC_TP9343:
|
||||
- pdata->phy_if_mode = PHY_INTERFACE_MODE_MII;
|
||||
- break;
|
||||
-
|
||||
-@@ -688,6 +696,8 @@ static int __init ath79_setup_phy_if_mod
|
||||
- case ATH79_SOC_AR9330:
|
||||
- case ATH79_SOC_AR9331:
|
||||
- case ATH79_SOC_QCA9533:
|
||||
-+ case ATH79_SOC_QCA9561:
|
||||
-+ case ATH79_SOC_TP9343:
|
||||
- pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII;
|
||||
- break;
|
||||
-
|
||||
-@@ -1018,6 +1028,8 @@ void __init ath79_register_eth(unsigned
|
||||
- break;
|
||||
-
|
||||
- case ATH79_SOC_QCA9533:
|
||||
-+ case ATH79_SOC_QCA9561:
|
||||
-+ case ATH79_SOC_TP9343:
|
||||
- if (id == 0) {
|
||||
- pdata->reset_bit = AR933X_RESET_GE0_MAC |
|
||||
- AR933X_RESET_GE0_MDIO;
|
||||
-@@ -1123,6 +1135,8 @@ void __init ath79_register_eth(unsigned
|
||||
- case ATH79_SOC_AR9330:
|
||||
- case ATH79_SOC_AR9331:
|
||||
- case ATH79_SOC_QCA9533:
|
||||
-+ case ATH79_SOC_QCA9561:
|
||||
-+ case ATH79_SOC_TP9343:
|
||||
- pdata->mii_bus_dev = &ath79_mdio1_device.dev;
|
||||
- break;
|
||||
-
|
||||
--- a/arch/mips/ath79/dev-usb.c
|
||||
+++ b/arch/mips/ath79/dev-usb.c
|
||||
-@@ -272,6 +272,19 @@ static void __init qca955x_usb_setup(voi
|
||||
+@@ -296,6 +296,19 @@ static void __init qca955x_usb_setup(voi
|
||||
&ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
|
||||
}
|
||||
|
||||
@@ -229,8 +164,8 @@
|
||||
void __init ath79_register_usb(void)
|
||||
{
|
||||
if (soc_is_ar71xx())
|
||||
-@@ -288,6 +301,8 @@ void __init ath79_register_usb(void)
|
||||
- ar934x_usb_setup();
|
||||
+@@ -314,6 +327,8 @@ void __init ath79_register_usb(void)
|
||||
+ qca953x_usb_setup();
|
||||
else if (soc_is_qca955x())
|
||||
qca955x_usb_setup();
|
||||
+ else if (soc_is_qca9561())
|
||||
@@ -291,9 +226,9 @@
|
||||
soc_is_ar913x() ||
|
||||
soc_is_ar933x())
|
||||
reg = AR71XX_GPIO_REG_FUNC;
|
||||
-- else if (soc_is_ar934x())
|
||||
+- else if (soc_is_ar934x() || soc_is_qca953x())
|
||||
+ else if (soc_is_ar934x() ||
|
||||
-+ soc_is_qca956x())
|
||||
++ soc_is_qca953x() || soc_is_qca956x())
|
||||
reg = AR934X_GPIO_REG_FUNC;
|
||||
else
|
||||
BUG();
|
||||
@@ -326,7 +261,7 @@
|
||||
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
||||
else
|
||||
BUG();
|
||||
-@@ -236,6 +237,99 @@ static void qca955x_irq_init(void)
|
||||
+@@ -268,6 +269,97 @@ static void qca955x_irq_init(void)
|
||||
irq_set_chained_handler(ATH79_CPU_IRQ(3), qca955x_ip3_irq_dispatch);
|
||||
}
|
||||
|
||||
@@ -406,15 +341,13 @@
|
||||
+
|
||||
+ for (i = ATH79_IP2_IRQ_BASE;
|
||||
+ i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
||||
-+ irq_set_chip_and_handler(i, &dummy_irq_chip,
|
||||
-+ handle_level_irq);
|
||||
++ irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
||||
+
|
||||
+ irq_set_chained_handler(ATH79_CPU_IRQ(2), qca956x_ip2_irq_dispatch);
|
||||
+
|
||||
+ for (i = ATH79_IP3_IRQ_BASE;
|
||||
+ i < ATH79_IP3_IRQ_BASE + ATH79_IP3_IRQ_COUNT; i++)
|
||||
-+ irq_set_chip_and_handler(i, &dummy_irq_chip,
|
||||
-+ handle_level_irq);
|
||||
++ irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
||||
+
|
||||
+ irq_set_chained_handler(ATH79_CPU_IRQ(3), qca956x_ip3_irq_dispatch);
|
||||
+
|
||||
@@ -426,7 +359,7 @@
|
||||
asmlinkage void plat_irq_dispatch(void)
|
||||
{
|
||||
unsigned long pending;
|
||||
-@@ -359,6 +453,9 @@ void __init arch_init_irq(void)
|
||||
+@@ -397,6 +489,9 @@ void __init arch_init_irq(void)
|
||||
} else if (soc_is_qca955x()) {
|
||||
ath79_ip2_handler = ath79_default_ip2_handler;
|
||||
ath79_ip3_handler = ath79_default_ip3_handler;
|
||||
@@ -436,8 +369,8 @@
|
||||
} else {
|
||||
BUG();
|
||||
}
|
||||
-@@ -371,4 +468,6 @@ void __init arch_init_irq(void)
|
||||
- ar934x_ip2_irq_init();
|
||||
+@@ -411,4 +506,6 @@ void __init arch_init_irq(void)
|
||||
+ qca953x_irq_init();
|
||||
else if (soc_is_qca955x())
|
||||
qca955x_irq_init();
|
||||
+ else if (soc_is_qca956x())
|
||||
@@ -554,7 +487,7 @@
|
||||
pr_info("SoC: %s\n", ath79_sys_type);
|
||||
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
|
||||
-@@ -131,6 +131,23 @@
|
||||
+@@ -143,6 +143,23 @@
|
||||
#define QCA955X_NFC_BASE 0x1b800200
|
||||
#define QCA955X_NFC_SIZE 0xb8
|
||||
|
||||
@@ -578,7 +511,7 @@
|
||||
#define AR9300_OTP_BASE 0x14000
|
||||
#define AR9300_OTP_STATUS 0x15f18
|
||||
#define AR9300_OTP_STATUS_TYPE 0x7
|
||||
-@@ -356,6 +373,49 @@
|
||||
+@@ -375,6 +392,49 @@
|
||||
#define QCA955X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21)
|
||||
#define QCA955X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24)
|
||||
|
||||
@@ -628,7 +561,7 @@
|
||||
/*
|
||||
* USB_CONFIG block
|
||||
*/
|
||||
-@@ -403,6 +463,11 @@
|
||||
+@@ -422,6 +482,11 @@
|
||||
#define QCA955X_RESET_REG_BOOTSTRAP 0xb0
|
||||
#define QCA955X_RESET_REG_EXT_INT_STATUS 0xac
|
||||
|
||||
@@ -640,7 +573,7 @@
|
||||
#define MISC_INT_ETHSW BIT(12)
|
||||
#define MISC_INT_TIMER4 BIT(10)
|
||||
#define MISC_INT_TIMER3 BIT(9)
|
||||
-@@ -551,6 +616,8 @@
|
||||
+@@ -596,6 +661,8 @@
|
||||
|
||||
#define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4)
|
||||
|
||||
@@ -649,7 +582,7 @@
|
||||
#define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0)
|
||||
#define AR934X_PCIE_WMAC_INT_WMAC_TX BIT(1)
|
||||
#define AR934X_PCIE_WMAC_INT_WMAC_RXLP BIT(2)
|
||||
-@@ -600,6 +667,37 @@
|
||||
+@@ -663,6 +730,37 @@
|
||||
QCA955X_EXT_INT_PCIE_RC2_INT1 | QCA955X_EXT_INT_PCIE_RC2_INT2 | \
|
||||
QCA955X_EXT_INT_PCIE_RC2_INT3)
|
||||
|
||||
@@ -687,7 +620,7 @@
|
||||
#define REV_ID_MAJOR_MASK 0xfff0
|
||||
#define REV_ID_MAJOR_AR71XX 0x00a0
|
||||
#define REV_ID_MAJOR_AR913X 0x00b0
|
||||
-@@ -615,6 +713,8 @@
|
||||
+@@ -678,6 +776,8 @@
|
||||
#define REV_ID_MAJOR_QCA9533_V2 0x0160
|
||||
#define REV_ID_MAJOR_QCA9556 0x0130
|
||||
#define REV_ID_MAJOR_QCA9558 0x1130
|
||||
@@ -696,7 +629,7 @@
|
||||
|
||||
#define AR71XX_REV_ID_MINOR_MASK 0x3
|
||||
#define AR71XX_REV_ID_MINOR_AR7130 0x0
|
||||
-@@ -639,6 +739,8 @@
|
||||
+@@ -702,6 +802,8 @@
|
||||
|
||||
#define QCA955X_REV_ID_REVISION_MASK 0xf
|
||||
|
||||
@@ -705,9 +638,9 @@
|
||||
/*
|
||||
* SPI block
|
||||
*/
|
||||
-@@ -684,6 +786,19 @@
|
||||
- #define AR934X_GPIO_REG_OUT_FUNC5 0x40
|
||||
- #define AR934X_GPIO_REG_FUNC 0x6c
|
||||
+@@ -766,6 +868,19 @@
|
||||
+ #define QCA953X_GPIO_OUT_MUX_LED_LINK4 44
|
||||
+ #define QCA953X_GPIO_OUT_MUX_LED_LINK5 45
|
||||
|
||||
+#define QCA956X_GPIO_REG_OUT_FUNC0 0x2c
|
||||
+#define QCA956X_GPIO_REG_OUT_FUNC1 0x30
|
||||
@@ -725,9 +658,9 @@
|
||||
#define AR71XX_GPIO_COUNT 16
|
||||
#define AR7240_GPIO_COUNT 18
|
||||
#define AR7241_GPIO_COUNT 20
|
||||
-@@ -692,6 +807,7 @@
|
||||
+@@ -774,6 +889,7 @@
|
||||
#define AR934X_GPIO_COUNT 23
|
||||
- #define QCA953X_GPIO_COUNT 24
|
||||
+ #define QCA953X_GPIO_COUNT 18
|
||||
#define QCA955X_GPIO_COUNT 24
|
||||
+#define QCA956X_GPIO_COUNT 23
|
||||
|
||||
diff --git a/target/linux/ar71xx/patches-3.18/736-MIPS-ath79-fix-chained-irq-disable.patch b/target/linux/ar71xx/patches-3.18/736-MIPS-ath79-fix-chained-irq-disable.patch
|
||||
index 8cb38d3..8c0cc95 100644
|
||||
--- a/target/linux/ar71xx/patches-3.18/736-MIPS-ath79-fix-chained-irq-disable.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.18/736-MIPS-ath79-fix-chained-irq-disable.patch
|
||||
@@ -19,7 +19,16 @@
|
||||
|
||||
irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch);
|
||||
}
|
||||
-@@ -224,15 +225,13 @@ static void qca955x_irq_init(void)
|
||||
+@@ -182,7 +183,7 @@ static void qca953x_irq_init(void)
|
||||
+
|
||||
+ for (i = ATH79_IP2_IRQ_BASE;
|
||||
+ i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
||||
+- irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
||||
++ irq_set_chip_and_handler(i, &ip2_chip, handle_level_irq);
|
||||
+
|
||||
+ irq_set_chained_handler(ATH79_CPU_IRQ(2), qca953x_ip2_irq_dispatch);
|
||||
+ }
|
||||
+@@ -256,15 +257,13 @@ static void qca955x_irq_init(void)
|
||||
|
||||
for (i = ATH79_IP2_IRQ_BASE;
|
||||
i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
||||
@@ -37,25 +46,23 @@
|
||||
|
||||
irq_set_chained_handler(ATH79_CPU_IRQ(3), qca955x_ip3_irq_dispatch);
|
||||
}
|
||||
-@@ -313,15 +312,13 @@ static void qca956x_irq_init(void)
|
||||
+@@ -345,13 +344,13 @@ static void qca956x_irq_init(void)
|
||||
|
||||
for (i = ATH79_IP2_IRQ_BASE;
|
||||
i < ATH79_IP2_IRQ_BASE + ATH79_IP2_IRQ_COUNT; i++)
|
||||
-- irq_set_chip_and_handler(i, &dummy_irq_chip,
|
||||
-- handle_level_irq);
|
||||
+- irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
||||
+ irq_set_chip_and_handler(i, &ip2_chip, handle_level_irq);
|
||||
|
||||
irq_set_chained_handler(ATH79_CPU_IRQ(2), qca956x_ip2_irq_dispatch);
|
||||
|
||||
for (i = ATH79_IP3_IRQ_BASE;
|
||||
i < ATH79_IP3_IRQ_BASE + ATH79_IP3_IRQ_COUNT; i++)
|
||||
-- irq_set_chip_and_handler(i, &dummy_irq_chip,
|
||||
-- handle_level_irq);
|
||||
+- irq_set_chip_and_handler(i, &dummy_irq_chip, handle_level_irq);
|
||||
+ irq_set_chip_and_handler(i, &ip3_chip, handle_level_irq);
|
||||
|
||||
irq_set_chained_handler(ATH79_CPU_IRQ(3), qca956x_ip3_irq_dispatch);
|
||||
|
||||
-@@ -430,8 +427,35 @@ static void ar934x_ip3_handler(void)
|
||||
+@@ -466,8 +465,35 @@ static void qca953x_ip3_handler(void)
|
||||
do_IRQ(ATH79_CPU_IRQ(3));
|
||||
}
|
||||
|
@ -1,44 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 7 Aug 2015 18:45:42 +0200
|
||||
Subject: base-files: default_postinst: propagate the real postinst return code
|
||||
|
||||
Using the postinst script for sanity checks and expecting opkg to fail
|
||||
if the postinst didn't return 0 was possible in Barrier Breaker, propagate
|
||||
the real postinst return code through default_postinst to restore this
|
||||
behaviour.
|
||||
|
||||
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
|
||||
index 8d045fa..2f78d67 100755
|
||||
--- a/package/base-files/files/lib/functions.sh
|
||||
+++ b/package/base-files/files/lib/functions.sh
|
||||
@@ -174,7 +174,8 @@ default_prerm() {
|
||||
}
|
||||
|
||||
default_postinst() {
|
||||
- local pkgname rusers
|
||||
+ local pkgname rusers ret
|
||||
+ ret=0
|
||||
pkgname=$(basename ${1%.*})
|
||||
rusers=$(grep "Require-User:" ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.control)
|
||||
[ -n "$rusers" ] && {
|
||||
@@ -215,7 +216,10 @@ default_postinst() {
|
||||
done
|
||||
}
|
||||
|
||||
- [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg )
|
||||
+ if [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ]; then
|
||||
+ ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg )
|
||||
+ ret=$?
|
||||
+ fi
|
||||
[ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null
|
||||
|
||||
[ "$PKG_UPGRADE" = "1" ] || for i in `cat ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.list | grep "^/etc/init.d/"`; do
|
||||
@@ -225,7 +229,7 @@ default_postinst() {
|
||||
$i start
|
||||
}
|
||||
done
|
||||
- return 0
|
||||
+ return $ret
|
||||
}
|
||||
|
||||
include() {
|
@ -1,22 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 28 Aug 2015 10:43:55 +0200
|
||||
Subject: opkg: work around unconditional libopenssl build dependency
|
||||
|
||||
As the OpenWrt build system only resolves build dependencies per directory,
|
||||
all opkg variants were causing libopenssl to be downloaded and built,
|
||||
not only opkg-smime. Fix this by applying the same workaround as in
|
||||
ustream-ssl.
|
||||
|
||||
diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile
|
||||
index 76688f5..3e39cf8 100644
|
||||
--- a/package/system/opkg/Makefile
|
||||
+++ b/package/system/opkg/Makefile
|
||||
@@ -72,7 +72,7 @@ endef
|
||||
define Package/opkg-smime
|
||||
$(call Package/opkg/Default)
|
||||
TITLE+= (with S/MIME signature support)
|
||||
- DEPENDS+=+libopenssl
|
||||
+ DEPENDS+=+PACKAGE_opkg-smime:libopenssl
|
||||
VARIANT:=smime
|
||||
endef
|
||||
|
@ -1,22 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 28 Aug 2015 10:46:11 +0200
|
||||
Subject: hostapd: work around unconditional libopenssl build dependency
|
||||
|
||||
As the OpenWrt build system only resolves build dependencies per directory,
|
||||
all hostapd variants were causing libopenssl to be downloaded and built,
|
||||
not only wpad-mesh. Fix this by applying the same workaround as in
|
||||
ustream-ssl.
|
||||
|
||||
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
|
||||
index c16cb11..c39b6b4 100644
|
||||
--- a/package/network/services/hostapd/Makefile
|
||||
+++ b/package/network/services/hostapd/Makefile
|
||||
@@ -177,7 +177,7 @@ endef
|
||||
define Package/wpad-mesh
|
||||
$(call Package/wpad/Default)
|
||||
TITLE+= (with 802.11s mesh and SAE support)
|
||||
- DEPENDS:=$(DRV_DEPENDS) +libubus +libopenssl +@CONFIG_WPA_SUPPLICANT_OPENSSL @(!TARGET_uml||BROKEN)
|
||||
+ DEPENDS:=$(DRV_DEPENDS) +libubus +PACKAGE_wpad-mesh:libopenssl +@CONFIG_WPA_SUPPLICANT_OPENSSL @(!TARGET_uml||BROKEN)
|
||||
CONFLICTS:=@WPA_SUPPLICANT_INTERNAL
|
||||
VARIANT:=wpad-mesh
|
||||
endef
|
@ -1,77 +0,0 @@
|
||||
From: Nils Schneider <nils@nilsschneider.net>
|
||||
Date: Thu, 3 Sep 2015 18:07:17 +0200
|
||||
Subject: odhcp6c: minor fixes
|
||||
|
||||
Better synchronize RA & DHCPv6 events
|
||||
Accumulate some events to avoid flooding
|
||||
Restart softwires for address and prefix changes
|
||||
|
||||
Signed-off-by: Steven Barth <steven@midlink.org>
|
||||
|
||||
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
|
||||
index 75de54c..aa81e02 100644
|
||||
--- a/package/network/ipv6/odhcp6c/Makefile
|
||||
+++ b/package/network/ipv6/odhcp6c/Makefile
|
||||
@@ -8,14 +8,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=odhcp6c
|
||||
-PKG_VERSION:=2015-07-18
|
||||
+PKG_VERSION:=2015-07-29
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://github.com/sbyx/odhcp6c.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
-PKG_SOURCE_VERSION:=024525798c5f6aba3af9b2ef7b3af2f3c14f1db8
|
||||
+PKG_SOURCE_VERSION:=dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9
|
||||
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
||||
index 33f6d9b..677d35f 100755
|
||||
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
||||
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
setup_interface () {
|
||||
local device="$1"
|
||||
+ local prefsig=""
|
||||
+ local addrsig=""
|
||||
proto_init_update "*" 1
|
||||
|
||||
# Merge RA-DNS
|
||||
@@ -34,6 +36,7 @@ setup_interface () {
|
||||
|
||||
for prefix in $PREFIXES; do
|
||||
proto_add_ipv6_prefix "$prefix"
|
||||
+ prefsig="$prefsig ${prefix%%,*}"
|
||||
local entry="${prefix#*/}"
|
||||
entry="${entry#*,}"
|
||||
entry="${entry#*,}"
|
||||
@@ -68,6 +71,7 @@ setup_interface () {
|
||||
local valid="${entry%%,*}"
|
||||
|
||||
proto_add_ipv6_address "$addr" "$mask" "$preferred" "$valid" 1
|
||||
+ addrsig="$addrsig $addr/$mask"
|
||||
|
||||
if [ -z "$RA_ADDRESSES" -a -z "$RA_ROUTES" -a \
|
||||
-z "$RA_DNS" -a "$FAKE_ROUTES" = 1 ]; then
|
||||
@@ -136,6 +140,8 @@ setup_interface () {
|
||||
json_add_string ifname "@$INTERFACE"
|
||||
json_add_string proto map
|
||||
json_add_string type "$MAPTYPE"
|
||||
+ json_add_string _prefsig "$prefsig"
|
||||
+ [ "$MAPTYPE" = lw4o6 ] && json_add_string _addrsig "$addrsig"
|
||||
json_add_string rule "$MAPRULE"
|
||||
json_add_string tunlink "$INTERFACE"
|
||||
[ -n "$ZONE_MAP" ] || ZONE_MAP=$ZONE
|
||||
@@ -163,6 +169,7 @@ setup_interface () {
|
||||
json_add_string ifname "@$INTERFACE"
|
||||
json_add_string proto "464xlat"
|
||||
json_add_string tunlink "$INTERFACE"
|
||||
+ json_add_string _addrsig "$addrsig"
|
||||
[ -n "$ZONE_464XLAT" ] || ZONE_464XLAT=$ZONE
|
||||
[ -n "$ZONE_464XLAT" ] && json_add_string zone "$ZONE_464XLAT"
|
||||
[ -n "$IFACE_464XLAT_DELEGATE" ] && json_add_boolean delegate "$IFACE_464XLAT_DELEGATE"
|
@ -1,40 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 11 Oct 2015 18:13:35 +0200
|
||||
Subject: base-files: add /etc/profile.d support
|
||||
|
||||
OpenWrt should support an optional /etc/profile.d directory like
|
||||
most other Linux distributions. This allows packages to install
|
||||
their own scripts into /etc/profile.d/ directory.
|
||||
|
||||
The file suffix should make clear, that these scripts
|
||||
are (sourced) shell-snippets. If the user needs e.g. php or lua,
|
||||
one must make sure that the interpreter is called.
|
||||
The reverse failsafe test makes sure, that the effective returncode is 0.
|
||||
|
||||
A typcal usecase is the inclusion of private helpers,
|
||||
special variables or aliases, which at the moment needs
|
||||
patching the sourcecode and is not well maintainable.
|
||||
Now the builder can simply add there files.
|
||||
|
||||
v1 initial work of Hendrik Lüth <hendrik@linux-nerds.de>
|
||||
v2 changes regarding RFC (e.g. thomas.langer@lantiq.com)
|
||||
v3 changes regarding RFC (e.g. mschiffer@universe-factory.net)
|
||||
v4 keep it simple and mimic OpenWrt style
|
||||
|
||||
Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
|
||||
|
||||
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
|
||||
index 170f487..bd008a8 100644
|
||||
--- a/package/base-files/files/etc/profile
|
||||
+++ b/package/base-files/files/etc/profile
|
||||
@@ -14,3 +14,10 @@ export PS1='\u@\h:\w\$ '
|
||||
|
||||
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
|
||||
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||
+
|
||||
+[ -n "$FAILSAFE" ] || {
|
||||
+ for FILE in /etc/profile.d/*.sh; do
|
||||
+ [ -e "$FILE" ] && . "$FILE"
|
||||
+ done
|
||||
+ unset FILE
|
||||
+}
|
@ -1,49 +0,0 @@
|
||||
From: Andre Kasper <andre.kasper@gmx.de>
|
||||
Date: Mon, 12 Oct 2015 02:31:05 +0200
|
||||
Subject: Kernel: Realtek 8150 and Realtek 8152 based USB-to-Ethernet converters
|
||||
|
||||
This patch adds the kernel modules to for the very common Realtek RTL8150 and Realtek 8152 based USB-to-Ethernet converters.
|
||||
After this patch the following packages can be added to targets (or site.mk):
|
||||
kmod-usb-net-rtl8150
|
||||
kmod-usb-net-rtl8152
|
||||
|
||||
The modules are already available in openwrt trunk, but not in Chaos Calmer. This patch is just a temporary backport.
|
||||
The modules are needed for Futros with additional USB-Ethernet-Interface and VMs with dedicated USB-NIC
|
||||
|
||||
diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
|
||||
index d1ff455..86f452e 100644
|
||||
--- a/package/kernel/linux/modules/usb.mk
|
||||
+++ b/package/kernel/linux/modules/usb.mk
|
||||
@@ -1554,3 +1554,32 @@ define KernelPackage/usb3/description
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb3))
|
||||
+
|
||||
+define KernelPackage/usb-net-rtl8150
|
||||
+ TITLE:=Kernel module for USB-to-Ethernet Realtek convertors
|
||||
+ KCONFIG:=CONFIG_USB_RTL8150
|
||||
+ FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/rtl8150.ko
|
||||
+ AUTOLOAD:=$(call AutoProbe,rtl8150)
|
||||
+ $(call AddDepends/usb-net)
|
||||
+endef
|
||||
+
|
||||
+define KernelPackage/usb-net-rtl8150/description
|
||||
+ Kernel module for USB-to-Ethernet Realtek 8150 convertors
|
||||
+endef
|
||||
+
|
||||
+$(eval $(call KernelPackage,usb-net-rtl8150))
|
||||
+
|
||||
+
|
||||
+define KernelPackage/usb-net-rtl8152
|
||||
+ TITLE:=Kernel module for USB-to-Ethernet Realtek convertors
|
||||
+ KCONFIG:=CONFIG_USB_RTL8152
|
||||
+ FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/r8152.ko
|
||||
+ AUTOLOAD:=$(call AutoProbe,r8152)
|
||||
+ $(call AddDepends/usb-net)
|
||||
+endef
|
||||
+
|
||||
+define KernelPackage/usb-net-rtl8152/description
|
||||
+ Kernel module for USB-to-Ethernet Realtek 8152 USB2.0/3.0 convertors
|
||||
+endef
|
||||
+
|
||||
+$(eval $(call KernelPackage,usb-net-rtl8152))
|
@ -1,107 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 15 Oct 2015 20:03:51 +0200
|
||||
Subject: tools/firmware-utils: tplink-safeloader: clean up code
|
||||
|
||||
There is no reason for the internal functions not to be static.
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
|
||||
index 9c5bb54..4607a1d 100644
|
||||
--- a/tools/firmware-utils/src/tplink-safeloader.c
|
||||
+++ b/tools/firmware-utils/src/tplink-safeloader.c
|
||||
@@ -152,7 +152,7 @@ static const unsigned char cpe510_support_list[] =
|
||||
|
||||
|
||||
/** Allocates a new image partition */
|
||||
-struct image_partition_entry alloc_image_partition(const char *name, size_t len) {
|
||||
+static struct image_partition_entry alloc_image_partition(const char *name, size_t len) {
|
||||
struct image_partition_entry entry = {name, len, malloc(len)};
|
||||
if (!entry.data)
|
||||
error(1, errno, "malloc");
|
||||
@@ -161,12 +161,12 @@ struct image_partition_entry alloc_image_partition(const char *name, size_t len)
|
||||
}
|
||||
|
||||
/** Frees an image partition */
|
||||
-void free_image_partition(struct image_partition_entry entry) {
|
||||
+static void free_image_partition(struct image_partition_entry entry) {
|
||||
free(entry.data);
|
||||
}
|
||||
|
||||
/** Generates the partition-table partition */
|
||||
-struct image_partition_entry make_partition_table(const struct flash_partition_entry *p) {
|
||||
+static struct image_partition_entry make_partition_table(const struct flash_partition_entry *p) {
|
||||
struct image_partition_entry entry = alloc_image_partition("partition-table", 0x800);
|
||||
|
||||
char *s = (char *)entry.data, *end = (char *)(s+entry.size);
|
||||
@@ -202,7 +202,7 @@ static inline uint8_t bcd(uint8_t v) {
|
||||
|
||||
|
||||
/** Generates the soft-version partition */
|
||||
-struct image_partition_entry make_soft_version(uint32_t rev) {
|
||||
+static struct image_partition_entry make_soft_version(uint32_t rev) {
|
||||
struct image_partition_entry entry = alloc_image_partition("soft-version", sizeof(struct soft_version));
|
||||
struct soft_version *s = (struct soft_version *)entry.data;
|
||||
|
||||
@@ -233,14 +233,14 @@ struct image_partition_entry make_soft_version(uint32_t rev) {
|
||||
}
|
||||
|
||||
/** Generates the support-list partition */
|
||||
-struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) {
|
||||
+static struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) {
|
||||
struct image_partition_entry entry = alloc_image_partition("support-list", len);
|
||||
memcpy(entry.data, support_list, len);
|
||||
return entry;
|
||||
}
|
||||
|
||||
/** Creates a new image partition with an arbitrary name from a file */
|
||||
-struct image_partition_entry read_file(const char *part_name, const char *filename, bool add_jffs2_eof) {
|
||||
+static struct image_partition_entry read_file(const char *part_name, const char *filename, bool add_jffs2_eof) {
|
||||
struct stat statbuf;
|
||||
|
||||
if (stat(filename, &statbuf) < 0)
|
||||
@@ -300,7 +300,7 @@ struct image_partition_entry read_file(const char *part_name, const char *filena
|
||||
|
||||
I think partition-table must be the first partition in the firmware image.
|
||||
*/
|
||||
-void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts) {
|
||||
+static void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts) {
|
||||
size_t i;
|
||||
char *image_pt = (char *)buffer, *end = image_pt + 0x800;
|
||||
|
||||
@@ -325,7 +325,7 @@ void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts)
|
||||
}
|
||||
|
||||
/** Generates and writes the image MD5 checksum */
|
||||
-void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) {
|
||||
+static void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) {
|
||||
MD5_CTX ctx;
|
||||
|
||||
MD5_Init(&ctx);
|
||||
@@ -349,7 +349,7 @@ void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) {
|
||||
1014-1813 Image partition table (2048 bytes, padded with 0xff)
|
||||
1814-xxxx Firmware partitions
|
||||
*/
|
||||
-void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) {
|
||||
+static void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) {
|
||||
*len = 0x1814;
|
||||
|
||||
size_t i;
|
||||
@@ -381,7 +381,7 @@ void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, co
|
||||
should be generalized when TP-LINK starts building its safeloader into hardware with
|
||||
different flash layouts.
|
||||
*/
|
||||
-void * generate_sysupgrade_image(const struct flash_partition_entry *flash_parts, const struct image_partition_entry *image_parts, size_t *len) {
|
||||
+static void * generate_sysupgrade_image(const struct flash_partition_entry *flash_parts, const struct image_partition_entry *image_parts, size_t *len) {
|
||||
const struct flash_partition_entry *flash_os_image = &flash_parts[5];
|
||||
const struct flash_partition_entry *flash_soft_version = &flash_parts[6];
|
||||
const struct flash_partition_entry *flash_support_list = &flash_parts[7];
|
||||
@@ -459,7 +459,7 @@ static void do_cpe510(const char *output, const char *kernel_image, const char *
|
||||
|
||||
|
||||
/** Usage output */
|
||||
-void usage(const char *argv0) {
|
||||
+static void usage(const char *argv0) {
|
||||
fprintf(stderr,
|
||||
"Usage: %s [OPTIONS...]\n"
|
||||
"\n"
|
@ -1,126 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 15 Oct 2015 21:01:25 +0200
|
||||
Subject: tools/firmware-utils: tplink-safeloader: fix support-list format, clean up vendor information
|
||||
|
||||
The first 4 bytes of the support list and the vendor information are
|
||||
supposed to contain the length of these fields.
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
|
||||
index 4607a1d..66658aa 100644
|
||||
--- a/tools/firmware-utils/src/tplink-safeloader.c
|
||||
+++ b/tools/firmware-utils/src/tplink-safeloader.c
|
||||
@@ -103,7 +103,7 @@ static const uint8_t md5_salt[16] = {
|
||||
|
||||
|
||||
/** Vendor information for CPE210/220/510/520 */
|
||||
-static const unsigned char cpe510_vendor[] = "\x00\x00\x00\x1f""CPE510(TP-LINK|UN|N300-5):1.0\r\n";
|
||||
+static const char cpe510_vendor[] = "CPE510(TP-LINK|UN|N300-5):1.0\r\n";
|
||||
|
||||
|
||||
/**
|
||||
@@ -133,14 +133,13 @@ static const struct flash_partition_entry cpe510_partitions[] = {
|
||||
The stock images also contain strings for two more devices: BS510 and BS210.
|
||||
At the moment, there exists no public information about these devices.
|
||||
*/
|
||||
-static const unsigned char cpe510_support_list[] =
|
||||
- "\x00\x00\x00\xc8\x00\x00\x00\x00"
|
||||
+static const char cpe510_support_list[] =
|
||||
"SupportList:\r\n"
|
||||
"CPE510(TP-LINK|UN|N300-5):1.0\r\n"
|
||||
"CPE520(TP-LINK|UN|N300-5):1.0\r\n"
|
||||
"CPE210(TP-LINK|UN|N300-2):1.0\r\n"
|
||||
"CPE220(TP-LINK|UN|N300-2):1.0\r\n"
|
||||
- "\r\n\xff";
|
||||
+ "\r\n";
|
||||
|
||||
#define error(_ret, _errno, _str, ...) \
|
||||
do { \
|
||||
@@ -151,6 +150,14 @@ static const unsigned char cpe510_support_list[] =
|
||||
} while (0)
|
||||
|
||||
|
||||
+/** Stores a uint32 as big endian */
|
||||
+static inline void put32(uint8_t *buf, uint32_t val) {
|
||||
+ buf[0] = val >> 24;
|
||||
+ buf[1] = val >> 16;
|
||||
+ buf[2] = val >> 8;
|
||||
+ buf[3] = val;
|
||||
+}
|
||||
+
|
||||
/** Allocates a new image partition */
|
||||
static struct image_partition_entry alloc_image_partition(const char *name, size_t len) {
|
||||
struct image_partition_entry entry = {name, len, malloc(len)};
|
||||
@@ -233,9 +240,15 @@ static struct image_partition_entry make_soft_version(uint32_t rev) {
|
||||
}
|
||||
|
||||
/** Generates the support-list partition */
|
||||
-static struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) {
|
||||
- struct image_partition_entry entry = alloc_image_partition("support-list", len);
|
||||
- memcpy(entry.data, support_list, len);
|
||||
+static struct image_partition_entry make_support_list(const char *support_list) {
|
||||
+ size_t len = strlen(support_list);
|
||||
+ struct image_partition_entry entry = alloc_image_partition("support-list", len + 9);
|
||||
+
|
||||
+ put32(entry.data, len);
|
||||
+ memset(entry.data+4, 0, 4);
|
||||
+ memcpy(entry.data+8, support_list, len);
|
||||
+ entry.data[len+8] = '\xff';
|
||||
+
|
||||
return entry;
|
||||
}
|
||||
|
||||
@@ -344,12 +357,13 @@ static void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) {
|
||||
----------- -----
|
||||
0000-0003 Image size (4 bytes, big endian)
|
||||
0004-0013 MD5 hash (hash of a 16 byte salt and the image data starting with byte 0x14)
|
||||
- 0014-1013 Vendor information (4096 bytes, padded with 0xff; there seem to be older
|
||||
+ 0014-0017 Vendor information length (without padding) (4 bytes, big endian)
|
||||
+ 0018-1013 Vendor information (4092 bytes, padded with 0xff; there seem to be older
|
||||
(VxWorks-based) TP-LINK devices which use a smaller vendor information block)
|
||||
1014-1813 Image partition table (2048 bytes, padded with 0xff)
|
||||
1814-xxxx Firmware partitions
|
||||
*/
|
||||
-static void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) {
|
||||
+static void * generate_factory_image(const char *vendor, const struct image_partition_entry *parts, size_t *len) {
|
||||
*len = 0x1814;
|
||||
|
||||
size_t i;
|
||||
@@ -360,13 +374,12 @@ static void * generate_factory_image(const unsigned char *vendor, size_t vendor_
|
||||
if (!image)
|
||||
error(1, errno, "malloc");
|
||||
|
||||
- image[0] = *len >> 24;
|
||||
- image[1] = *len >> 16;
|
||||
- image[2] = *len >> 8;
|
||||
- image[3] = *len;
|
||||
+ put32(image, *len);
|
||||
|
||||
- memcpy(image+0x14, vendor, vendor_len);
|
||||
- memset(image+0x14+vendor_len, 0xff, 4096-vendor_len);
|
||||
+ size_t vendor_len = strlen(vendor);
|
||||
+ put32(image+0x14, vendor_len);
|
||||
+ memcpy(image+0x18, vendor, vendor_len);
|
||||
+ memset(image+0x18+vendor_len, 0xff, 4092-vendor_len);
|
||||
|
||||
put_partitions(image + 0x1014, parts);
|
||||
put_md5(image+0x04, image+0x14, *len-0x14);
|
||||
@@ -430,7 +443,7 @@ static void do_cpe510(const char *output, const char *kernel_image, const char *
|
||||
|
||||
parts[0] = make_partition_table(cpe510_partitions);
|
||||
parts[1] = make_soft_version(rev);
|
||||
- parts[2] = make_support_list(cpe510_support_list, sizeof(cpe510_support_list)-1);
|
||||
+ parts[2] = make_support_list(cpe510_support_list);
|
||||
parts[3] = read_file("os-image", kernel_image, false);
|
||||
parts[4] = read_file("file-system", rootfs_image, add_jffs2_eof);
|
||||
|
||||
@@ -439,7 +452,7 @@ static void do_cpe510(const char *output, const char *kernel_image, const char *
|
||||
if (sysupgrade)
|
||||
image = generate_sysupgrade_image(cpe510_partitions, parts, &len);
|
||||
else
|
||||
- image = generate_factory_image(cpe510_vendor, sizeof(cpe510_vendor)-1, parts, &len);
|
||||
+ image = generate_factory_image(cpe510_vendor, parts, &len);
|
||||
|
||||
FILE *file = fopen(output, "wb");
|
||||
if (!file)
|
@ -1,38 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 15 Oct 2015 21:56:40 +0200
|
||||
Subject: tools/firmware-utils: tplink-safeloader: add version 1.1 support to CPE210/220/510/520
|
||||
|
||||
The hardware is identical to version 1.0, add the new models to the support
|
||||
list.
|
||||
|
||||
Also remove the empty line at the end of the support list, the current
|
||||
stock images don't have it either.
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
|
||||
index 66658aa..77a894b 100644
|
||||
--- a/tools/firmware-utils/src/tplink-safeloader.c
|
||||
+++ b/tools/firmware-utils/src/tplink-safeloader.c
|
||||
@@ -129,17 +129,17 @@ static const struct flash_partition_entry cpe510_partitions[] = {
|
||||
|
||||
/**
|
||||
The support list for CPE210/220/510/520
|
||||
-
|
||||
- The stock images also contain strings for two more devices: BS510 and BS210.
|
||||
- At the moment, there exists no public information about these devices.
|
||||
*/
|
||||
static const char cpe510_support_list[] =
|
||||
"SupportList:\r\n"
|
||||
"CPE510(TP-LINK|UN|N300-5):1.0\r\n"
|
||||
+ "CPE510(TP-LINK|UN|N300-5):1.1\r\n"
|
||||
"CPE520(TP-LINK|UN|N300-5):1.0\r\n"
|
||||
+ "CPE520(TP-LINK|UN|N300-5):1.1\r\n"
|
||||
"CPE210(TP-LINK|UN|N300-2):1.0\r\n"
|
||||
+ "CPE210(TP-LINK|UN|N300-2):1.1\r\n"
|
||||
"CPE220(TP-LINK|UN|N300-2):1.0\r\n"
|
||||
- "\r\n";
|
||||
+ "CPE220(TP-LINK|UN|N300-2):1.1\r\n";
|
||||
|
||||
#define error(_ret, _errno, _str, ...) \
|
||||
do { \
|
@ -1,330 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Mon, 2 Nov 2015 19:21:20 +0100
|
||||
Subject: ar71xx: add support for TP-LINK TL-WR941ND v6 (international version)
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
index 89fe53c..3e80c32 100644
|
||||
--- a/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
|
||||
@@ -279,7 +279,8 @@ get_status_led() {
|
||||
tl-wdr4300 | \
|
||||
tl-wr703n | \
|
||||
tl-wr710n | \
|
||||
- tl-wr720n-v3)
|
||||
+ tl-wr720n-v3 | \
|
||||
+ tl-wr941nd-v6)
|
||||
status_led="tp-link:blue:system"
|
||||
;;
|
||||
tl-wr841n-v9)
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
|
||||
index 5241db2..11b3fa0 100644
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
|
||||
@@ -460,6 +460,15 @@ tl-wr941nd-v5)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
;;
|
||||
|
||||
+tl-wr941nd-v6)
|
||||
+ ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth0"
|
||||
+ ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0" "0x10"
|
||||
+ ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0" "0x08"
|
||||
+ ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04"
|
||||
+ ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02"
|
||||
+ ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt"
|
||||
+ ;;
|
||||
+
|
||||
tl-wa830re-v2)
|
||||
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
|
||||
index 8143d2d..5a74461 100755
|
||||
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
|
||||
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
|
||||
@@ -226,6 +226,7 @@ tl-mr3420-v2 |\
|
||||
tl-wr841n-v8 |\
|
||||
tl-wr842n-v2 |\
|
||||
tl-wr941nd-v5 |\
|
||||
+tl-wr941nd-v6 |\
|
||||
wnr2000-v3 |\
|
||||
wnr2000-v4 |\
|
||||
wnr2200 |\
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
index 0b2857d..46af69a 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
@@ -800,6 +800,9 @@ ar71xx_board_detect() {
|
||||
*"TL-WR941N/ND v5")
|
||||
name="tl-wr941nd-v5"
|
||||
;;
|
||||
+ *"TL-WR941N/ND v6")
|
||||
+ name="tl-wr941nd-v6"
|
||||
+ ;;
|
||||
*"TL-WR703N v1")
|
||||
name="tl-wr703n"
|
||||
;;
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
|
||||
index f11ea8c..fd337e1 100644
|
||||
--- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
|
||||
+++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
|
||||
@@ -35,6 +35,7 @@ set_preinit_iface() {
|
||||
tl-wr720n-v3 |\
|
||||
tl-wr841n-v8 |\
|
||||
tl-wr842n-v2 |\
|
||||
+ tl-wr941nd-v6 |\
|
||||
wnr2000-v3 |\
|
||||
wnr2200 |\
|
||||
wnr612-v2 |\
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
index 8dea48f..2fc1d10 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||
@@ -354,6 +354,7 @@ platform_check_image() {
|
||||
tl-wr842n-v2 | \
|
||||
tl-wr941nd | \
|
||||
tl-wr941nd-v5 | \
|
||||
+ tl-wr941nd-v6 | \
|
||||
tl-wr1041n-v2 | \
|
||||
tl-wr1043nd | \
|
||||
tl-wr1043nd-v2 | \
|
||||
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
|
||||
index e9b3c7c..84b5844 100644
|
||||
--- a/target/linux/ar71xx/config-3.18
|
||||
+++ b/target/linux/ar71xx/config-3.18
|
||||
@@ -132,6 +132,7 @@ 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_WR941ND_V6=y
|
||||
CONFIG_ATH79_MACH_TUBE2H=y
|
||||
CONFIG_ATH79_MACH_UBNT=y
|
||||
CONFIG_ATH79_MACH_UBNT_XM=y
|
||||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c
|
||||
new file mode 100644
|
||||
index 0000000..8c788e2
|
||||
--- /dev/null
|
||||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c
|
||||
@@ -0,0 +1,149 @@
|
||||
+/*
|
||||
+ * TP-LINK TL-WR941N/ND v6 board support
|
||||
+ *
|
||||
+ * Copyright (C) 2015 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_WR941ND_V6_GPIO_LED_QSS 3
|
||||
+#define TL_WR941ND_V6_GPIO_LED_WAN 14
|
||||
+#define TL_WR941ND_V6_GPIO_LED_WAN_RED 15
|
||||
+#define TL_WR941ND_V6_GPIO_LED_LAN1 7
|
||||
+#define TL_WR941ND_V6_GPIO_LED_LAN2 6
|
||||
+#define TL_WR941ND_V6_GPIO_LED_LAN3 5
|
||||
+#define TL_WR941ND_V6_GPIO_LED_LAN4 4
|
||||
+#define TL_WR941ND_V6_GPIO_LED_WLAN 8
|
||||
+#define TL_WR941ND_V6_GPIO_LED_SYSTEM 18
|
||||
+
|
||||
+#define TL_WR941ND_V6_GPIO_BTN_RESET 1
|
||||
+#define TL_WR941ND_V6_GPIO_BTN_RFKILL 2
|
||||
+
|
||||
+#define TL_WR941ND_V6_KEYS_POLL_INTERVAL 20
|
||||
+#define TL_WR941ND_V6_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR941ND_V6_KEYS_POLL_INTERVAL)
|
||||
+
|
||||
+
|
||||
+static struct gpio_led tl_wr941nd_v6_leds_gpio[] __initdata = {
|
||||
+ {
|
||||
+ .name = "tp-link:blue:qss",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_QSS,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:blue:wan",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_WAN,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:red:wan",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_WAN_RED,
|
||||
+ .active_low = 0,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:blue:lan1",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_LAN1,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:blue:lan2",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_LAN2,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:blue:lan3",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_LAN3,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:blue:lan4",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_LAN4,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:blue:wlan",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_WLAN,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "tp-link:blue:system",
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_LED_SYSTEM,
|
||||
+ .active_low = 1,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct gpio_keys_button tl_wr941nd_v6_gpio_keys[] __initdata = {
|
||||
+ {
|
||||
+ .desc = "Reset button",
|
||||
+ .type = EV_KEY,
|
||||
+ .code = KEY_RESTART,
|
||||
+ .debounce_interval = TL_WR941ND_V6_KEYS_DEBOUNCE_INTERVAL,
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_BTN_RESET,
|
||||
+ .active_low = 1,
|
||||
+ }, {
|
||||
+ .desc = "RFKILL button",
|
||||
+ .type = EV_KEY,
|
||||
+ .code = KEY_RFKILL,
|
||||
+ .debounce_interval = TL_WR941ND_V6_KEYS_DEBOUNCE_INTERVAL,
|
||||
+ .gpio = TL_WR941ND_V6_GPIO_BTN_RFKILL,
|
||||
+ .active_low = 1,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static const char *tl_wr941n_v6_part_probes[] = {
|
||||
+ "tp-link",
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static struct flash_platform_data tl_wr941n_v6_flash_data = {
|
||||
+ .part_probes = tl_wr941n_v6_part_probes,
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static void __init tl_wr941nd_v6_setup(void)
|
||||
+{
|
||||
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
|
||||
+ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
|
||||
+
|
||||
+ ath79_register_m25p80(&tl_wr941n_v6_flash_data);
|
||||
+
|
||||
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr941nd_v6_leds_gpio),
|
||||
+ tl_wr941nd_v6_leds_gpio);
|
||||
+
|
||||
+ ath79_register_gpio_keys_polled(-1, TL_WR941ND_V6_KEYS_POLL_INTERVAL,
|
||||
+ ARRAY_SIZE(tl_wr941nd_v6_gpio_keys),
|
||||
+ tl_wr941nd_v6_gpio_keys);
|
||||
+
|
||||
+ ath79_register_mdio(0, 0x0);
|
||||
+
|
||||
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
|
||||
+ ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
|
||||
+
|
||||
+ ath79_switch_data.phy4_mii_en = 1;
|
||||
+
|
||||
+ ath79_register_eth(0);
|
||||
+ ath79_register_eth(1);
|
||||
+
|
||||
+ ath79_register_wmac(ee, mac);
|
||||
+
|
||||
+}
|
||||
+
|
||||
+MIPS_MACHINE(ATH79_MACH_TL_WR941ND_V6, "TL-WR941ND-v6", "TP-LINK TL-WR941N/ND v6",
|
||||
+ tl_wr941nd_v6_setup);
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index 78d35e1..11fb568 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -600,7 +600,7 @@ endef
|
||||
|
||||
define Device/tl-wr941nd-v6
|
||||
$(Device/tplink-4mlzma)
|
||||
- BOARDNAME := TL-WDR3500
|
||||
+ BOARDNAME := TL-WR941ND-v6
|
||||
DEVICE_PROFILE := TLWR941
|
||||
TPLINK_HWID := 0x09410006
|
||||
endef
|
||||
diff --git a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
|
||||
index 2fa041b..185cb9c 100644
|
||||
--- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
|
||||
+++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
-@@ -16,22 +16,197 @@
|
||||
+@@ -16,22 +16,198 @@
|
||||
|
||||
enum ath79_mach_type {
|
||||
ATH79_MACH_GENERIC = 0,
|
||||
@@ -148,6 +148,7 @@
|
||||
+ ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
|
||||
+ ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
|
||||
+ ATH79_MACH_TL_WR941ND_V5, /* TP-LINK TL-WR941ND v5 */
|
||||
++ ATH79_MACH_TL_WR941ND_V6, /* TP-LINK TL-WR941ND v6 */
|
||||
+ ATH79_MACH_TUBE2H, /* Alfa Network Tube2H */
|
||||
+ ATH79_MACH_UBNT_AIRGW, /* Ubiquiti AirGateway */
|
||||
ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
|
||||
@@ -271,7 +272,7 @@
|
||||
config ATH79_MACH_AP121
|
||||
bool "Atheros AP121 reference board"
|
||||
select SOC_AR933X
|
||||
-@@ -11,62 +75,1041 @@ config ATH79_MACH_AP121
|
||||
+@@ -11,62 +75,1050 @@ config ATH79_MACH_AP121
|
||||
select ATH79_DEV_M25P80
|
||||
select ATH79_DEV_USB
|
||||
select ATH79_DEV_WMAC
|
||||
@@ -1246,6 +1247,15 @@
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
++config ATH79_MACH_TL_WR941ND_V6
|
||||
++ bool "TP-LINK TL-WR941ND v6 support"
|
||||
++ select SOC_QCA956X
|
||||
++ 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_WR1041N_V2
|
||||
+ bool "TP-LINK TL-WR1041N v2 support"
|
||||
+ select SOC_AR934X
|
||||
@@ -1474,7 +1484,7 @@
|
||||
endif
|
||||
--- a/arch/mips/ath79/Makefile
|
||||
+++ b/arch/mips/ath79/Makefile
|
||||
-@@ -38,9 +38,126 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
|
||||
+@@ -38,9 +38,127 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
|
||||
#
|
||||
# Machines
|
||||
#
|
||||
@@ -1566,6 +1576,7 @@
|
||||
+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_WR941ND_V6) += mach-tl-wr941nd-v6.o
|
||||
+obj-$(CONFIG_ATH79_MACH_TL_WR1041N_V2) += mach-tl-wr1041n-v2.o
|
||||
+obj-$(CONFIG_ATH79_MACH_TL_WR1043ND) += mach-tl-wr1043nd.o
|
||||
+obj-$(CONFIG_ATH79_MACH_TL_WR1043ND_V2) += mach-tl-wr1043nd-v2.o
|
@ -1,25 +0,0 @@
|
||||
From: Andreas Ziegler <github@andreas-ziegler.de>
|
||||
Date: Thu, 5 Nov 2015 15:48:09 +0100
|
||||
Subject: ar71xx: add support for TP-Link TL-WR1043ND v3
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index 11fb568..dd224d4 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -2023,6 +2023,7 @@ $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,tt
|
||||
$(eval $(call SingleProfile,TPLINK,64kraw,TLWR1043V1,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M))
|
||||
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V2,tl-wr1043nd-v2,TL-WR1043ND-v2,ttyS0,115200,0x10430002,1,8M))
|
||||
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V3,tl-wr1043nd-v3,TL-WR1043ND-v2,ttyS0,115200,0x10430003,1,8M))
|
||||
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))
|
||||
|
||||
$(eval $(call SingleProfile,TPLINK-SAFELOADER,64kraw,CPE510,cpe210-220-510-520,CPE510,ttyS0,115200,$$(cpe510_mtdlayout),CPE510))
|
||||
@@ -2087,7 +2088,7 @@ $(eval $(call MultiProfile,TLWR743,TLWR743NV1))
|
||||
$(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7))
|
||||
$(eval $(call MultiProfile,TLWR842,TLWR842V1))
|
||||
$(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4))
|
||||
-$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2))
|
||||
+$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2 TLWR1043V3))
|
||||
$(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
|
||||
$(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
|
||||
$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTROCKETMXW UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW))
|
@ -1,197 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Wed, 18 Nov 2015 02:01:55 +0100
|
||||
Subject: ar71xx: backport ath10k calibration data load changes
|
||||
|
||||
The mac80211 update makes is necessary to backport this change as well for
|
||||
ath10k to load.
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
||||
index dd3f546..7111630 100644
|
||||
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
||||
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
|
||||
@@ -8,50 +8,83 @@ ath10kcal_die() {
|
||||
ath10kcal_from_file() {
|
||||
local source=$1
|
||||
local offset=$2
|
||||
- local target=$3
|
||||
+ local count=$3
|
||||
|
||||
- dd if=$source of=$target bs=1 skip=$offset count=2116 2>/dev/null || \
|
||||
+ dd if=$source of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
|
||||
ath10kcal_die "failed to extract calibration data from $source"
|
||||
}
|
||||
|
||||
+ath10kcal_extract() {
|
||||
+ local part=$1
|
||||
+ local offset=$2
|
||||
+ local count=$3
|
||||
+ local mtd
|
||||
+
|
||||
+ mtd=$(find_mtd_chardev $part)
|
||||
+ [ -n "$mtd" ] || \
|
||||
+ ath10kcal_die "no mtd device found for partition $part"
|
||||
+
|
||||
+ dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
|
||||
+ ath10kcal_die "failed to extract calibration data from $mtd"
|
||||
+}
|
||||
+
|
||||
+ath10kcal_patch_mac() {
|
||||
+ local mac=$1
|
||||
+
|
||||
+ [ -z "$mac" ] && return
|
||||
+
|
||||
+ macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=6 count=6
|
||||
+}
|
||||
+
|
||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||
|
||||
. /lib/ar71xx.sh
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
-ath10kcal_mac=""
|
||||
-ath10kcal_tmp="/tmp/ath10k-caldata.bin"
|
||||
-
|
||||
board=$(ar71xx_board_name)
|
||||
|
||||
case "$FIRMWARE" in
|
||||
-"ath10k/cal-pci-0000:01:00.0.bin")
|
||||
- case $board in
|
||||
- rb-911g-5hpacd)
|
||||
- ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 $ath10kcal_tmp
|
||||
- ;;
|
||||
- esac
|
||||
- ;;
|
||||
-
|
||||
"ath10k/cal-pci-0000:00:00.0.bin")
|
||||
case $board in
|
||||
dlan-pro-1200-ac)
|
||||
- ath10kcal_from_file $(find_mtd_part "art") 20480 $ath10kcal_tmp
|
||||
+ ath10kcal_extract "art" 20480 2116
|
||||
+ ;;
|
||||
+ mc-mac1200r)
|
||||
+ ath10kcal_extract "art" 20480 2116
|
||||
+ ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1)
|
||||
+ ;;
|
||||
+ r6100)
|
||||
+ ath10kcal_extract "caldata" 20480 2116
|
||||
+ ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) +2)
|
||||
+ ;;
|
||||
+ qihoo-c301)
|
||||
+ ath10kcal_extract "radiocfg" 20480 2116
|
||||
+ ath10kcal_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
|
||||
;;
|
||||
esr1750 | \
|
||||
epg5000)
|
||||
- ath10kcal_from_file $(find_mtd_part "caldata") 20480 $ath10kcal_tmp
|
||||
+ ath10kcal_extract "caldata" 20480 2116
|
||||
+ ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
|
||||
+ ;;
|
||||
+ esac
|
||||
+ ;;
|
||||
+"ath10k/cal-pci-0000:01:00.0.bin")
|
||||
+ case $board in
|
||||
+ archer-c5 | \
|
||||
+ archer-c7)
|
||||
+ ath10kcal_extract "art" 20480 2116
|
||||
+ ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2)
|
||||
+ ;;
|
||||
+ nbg6716)
|
||||
+ ath10kcal_extract "RFdata" 20480 2116
|
||||
+ ;;
|
||||
+ rb-911g-5hpacd)
|
||||
+ ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
-
|
||||
-[ -f $ath10kcal_tmp ] && {
|
||||
- cp $ath10kcal_tmp /lib/firmware/$FIRMWARE
|
||||
- rm -f $ath10kcal_tmp
|
||||
-}
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
|
||||
deleted file mode 100644
|
||||
index 9a32dfc..0000000
|
||||
--- a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
|
||||
+++ /dev/null
|
||||
@@ -1,75 +0,0 @@
|
||||
-#!/bin/sh
|
||||
-
|
||||
-. /lib/functions/system.sh
|
||||
-. /lib/ar71xx.sh
|
||||
-
|
||||
-do_load_ath10k_board_bin() {
|
||||
- # load board.bin
|
||||
- case $(ar71xx_board_name) in
|
||||
- nbg6716)
|
||||
- dd if=/dev/mtdblock2 \
|
||||
- bs=1 skip=20480 count=2116 \
|
||||
- of=/tmp/ath10k-board.bin
|
||||
- ;;
|
||||
- archer-c5 | \
|
||||
- archer-c7)
|
||||
- local mac
|
||||
- mac=$(macaddr_add $(cat /sys/class/net/eth1/address) -2)
|
||||
-
|
||||
- dd if=/dev/mtdblock4 \
|
||||
- bs=1 skip=20480 count=6 \
|
||||
- of=/tmp/ath10k-board.bin
|
||||
- macaddr_2bin $mac >> /tmp/ath10k-board.bin
|
||||
- dd if=/dev/mtdblock4 \
|
||||
- bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
|
||||
- ;;
|
||||
- mc-mac1200r)
|
||||
- local mac
|
||||
- mac=$(macaddr_add $(cat /sys/class/net/eth1/address) -1)
|
||||
-
|
||||
- dd if=/dev/mtdblock4 \
|
||||
- bs=1 skip=20480 count=6 \
|
||||
- of=/tmp/ath10k-board.bin
|
||||
- macaddr_2bin $mac >> /tmp/ath10k-board.bin
|
||||
- dd if=/dev/mtdblock4 \
|
||||
- bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
|
||||
- ;;
|
||||
- r6100)
|
||||
- local mac
|
||||
- mac=$(macaddr_add $(cat /sys/class/net/eth1/address) +2)
|
||||
-
|
||||
- dd if=/dev/mtdblock2 \
|
||||
- bs=1 skip=20480 count=6 \
|
||||
- of=/tmp/ath10k-board.bin
|
||||
- macaddr_2bin $mac >> /tmp/ath10k-board.bin
|
||||
- dd if=/dev/mtdblock2 \
|
||||
- bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
|
||||
- ;;
|
||||
- qihoo-c301)
|
||||
- local mac
|
||||
-
|
||||
- mac=$(mtd_get_mac_ascii devdata wlan5mac)
|
||||
-
|
||||
- if [ -z "$mac" ]; then
|
||||
- mac=$(macaddr_add $(cat /sys/class/net/eth0/address) -2)
|
||||
- fi
|
||||
-
|
||||
- dd if=/dev/mtdblock10 \
|
||||
- bs=1 skip=20480 count=6 \
|
||||
- of=/tmp/ath10k-board.bin
|
||||
- macaddr_2bin $mac >> /tmp/ath10k-board.bin
|
||||
- dd if=/dev/mtdblock10 \
|
||||
- bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
|
||||
-
|
||||
- ;;
|
||||
- esac
|
||||
- [ -f /tmp/ath10k-board.bin ] || {
|
||||
- return
|
||||
- }
|
||||
- cmp -s /tmp/ath10k-board.bin /lib/firmware/ath10k/QCA988X/hw2.0/board.bin || {
|
||||
- cp /tmp/ath10k-board.bin /lib/firmware/ath10k/QCA988X/hw2.0/board.bin
|
||||
- rm /tmp/ath10k-board.bin
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-boot_hook_add preinit_main do_load_ath10k_board_bin
|
@ -1,20 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 19 Nov 2015 23:29:17 +0100
|
||||
Subject: ar71xx: fix AR71XX_MODEL on TP-Link TL-WR703N
|
||||
|
||||
The hwid check was wrong, causing the AR71XX_MODEL value to end with a
|
||||
space (as $hwver was unset).
|
||||
|
||||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
index 46af69a..d0abf42 100755
|
||||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||
@@ -123,7 +123,7 @@ tplink_board_detect() {
|
||||
"3C0002"*)
|
||||
model="MINIBOX_V1"
|
||||
;;
|
||||
- "070300"*)
|
||||
+ "070301"*)
|
||||
model="TP-Link TL-WR703N"
|
||||
;;
|
||||
"071000"*)
|
@ -1,24 +0,0 @@
|
||||
From: Ranlvor <ranlvor@starletp9.de>
|
||||
Date: Sun, 6 Dec 2015 16:12:55 +0100
|
||||
Subject: OpenSSL: Added source/old to PKG_SOURCE_URL
|
||||
|
||||
OpenSSL moves old versions of the library from http://www.openssl.org/source/
|
||||
to http://www.openssl.org/source/old/1.0.2/ breaking the old links. That
|
||||
behavior breaks the OpenWRT-build every time OpenSSL releases a new version.
|
||||
|
||||
This patch adds http://www.openssl.org/source/old/1.0.2/ to the PKG_SOURCE_URL
|
||||
of OpenSSL to avoid breaking the build whenever OpenSSL releases a new
|
||||
version.
|
||||
|
||||
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
|
||||
index ad93678..9a16599 100644
|
||||
--- a/package/libs/openssl/Makefile
|
||||
+++ b/package/libs/openssl/Makefile
|
||||
@@ -16,6 +16,7 @@ PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.openssl.org/source/ \
|
||||
+ http://www.openssl.org/source/old/1.0.2/ \
|
||||
ftp://ftp.funet.fi/pub/crypt/mirrors/ftp.openssl.org/source \
|
||||
ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/
|
||||
PKG_MD5SUM:=b3bf73f507172be9292ea2a8c28b659d
|
@ -1,48 +0,0 @@
|
||||
From: Felix Kaechele <felix@kaechele.ca>
|
||||
Date: Tue, 17 Nov 2015 05:00:02 +0100
|
||||
Subject: x86/generic: refresh kernel config
|
||||
|
||||
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
|
||||
|
||||
diff --git a/target/linux/x86/generic/config-default b/target/linux/x86/generic/config-default
|
||||
index eb4b357..e077ebd 100644
|
||||
--- a/target/linux/x86/generic/config-default
|
||||
+++ b/target/linux/x86/generic/config-default
|
||||
@@ -17,7 +17,6 @@ CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
|
||||
CONFIG_ACPI_PROCESSOR=y
|
||||
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
|
||||
# CONFIG_ACPI_PROCFS_POWER is not set
|
||||
-# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set
|
||||
# CONFIG_ACPI_SBS is not set
|
||||
CONFIG_ACPI_THERMAL=y
|
||||
CONFIG_ACPI_VIDEO=y
|
||||
@@ -46,7 +45,6 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
# CONFIG_BLK_DEV_SR_VENDOR is not set
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
-# CONFIG_DELL_SMO8800 is not set
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMI=y
|
||||
# CONFIG_DMIID is not set
|
||||
@@ -120,7 +118,6 @@ CONFIG_INPUT_MOUSEDEV=y
|
||||
CONFIG_INPUT_MOUSEDEV_PSAUX=y
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
||||
-# CONFIG_INT340X_THERMAL is not set
|
||||
CONFIG_INTEL_GTT=y
|
||||
CONFIG_INTEL_IDLE=y
|
||||
# CONFIG_INTEL_IPS is not set
|
||||
@@ -173,13 +170,10 @@ CONFIG_PNP_DEBUG_MESSAGES=y
|
||||
CONFIG_RAS=y
|
||||
# CONFIG_SAMSUNG_Q10 is not set
|
||||
CONFIG_SATA_AHCI=y
|
||||
-# CONFIG_SCx200_ACB is not set
|
||||
-# CONFIG_SERIAL_8250_FINTEK is not set
|
||||
CONFIG_SERIAL_8250_PNP=y
|
||||
# CONFIG_THINKPAD_ACPI is not set
|
||||
# CONFIG_TOPSTAR_LAPTOP is not set
|
||||
# CONFIG_TOSHIBA_BT_RFKILL is not set
|
||||
-# CONFIG_TOSHIBA_HAPS is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
@ -1,22 +0,0 @@
|
||||
From: Felix Kaechele <felix@kaechele.ca>
|
||||
Date: Tue, 17 Nov 2015 05:00:51 +0100
|
||||
Subject: x86/generic: enable pata_atiixp driver
|
||||
|
||||
This enables booting from devices that use an ATI PATA controller for
|
||||
the boot device, such as the embedded CF cards in Fujitsu-Siemens Futro
|
||||
thin-clients.
|
||||
|
||||
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
|
||||
|
||||
diff --git a/target/linux/x86/generic/config-default b/target/linux/x86/generic/config-default
|
||||
index e077ebd..666a985 100644
|
||||
--- a/target/linux/x86/generic/config-default
|
||||
+++ b/target/linux/x86/generic/config-default
|
||||
@@ -150,6 +150,7 @@ CONFIG_NLS=y
|
||||
CONFIG_NO_HZ=y
|
||||
# CONFIG_PANASONIC_LAPTOP is not set
|
||||
CONFIG_PATA_AMD=y
|
||||
+CONFIG_PATA_ATIIXP=y
|
||||
CONFIG_PATA_LEGACY=y
|
||||
CONFIG_PATA_MPIIX=y
|
||||
CONFIG_PATA_OLDPIIX=y
|
@ -1,64 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 25 Feb 2016 21:39:03 +0100
|
||||
Subject: firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile warnings
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
|
||||
index bd69cb4..6d88845 100644
|
||||
--- a/tools/firmware-utils/Makefile
|
||||
+++ b/tools/firmware-utils/Makefile
|
||||
@@ -32,7 +32,7 @@ define Host/Compile
|
||||
$(call cc,mkzynfw)
|
||||
$(call cc,lzma2eva,-lz)
|
||||
$(call cc,mkcasfw)
|
||||
- $(call cc,mkfwimage,-lz)
|
||||
+ $(call cc,mkfwimage,-lz -Wall)
|
||||
$(call cc,mkfwimage2,-lz)
|
||||
$(call cc,imagetag imagetag_cmdline cyg_crc32)
|
||||
$(call cc,add_header)
|
||||
diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c
|
||||
index e3a03c1..00bf439 100644
|
||||
--- a/tools/firmware-utils/src/mkfwimage.c
|
||||
+++ b/tools/firmware-utils/src/mkfwimage.c
|
||||
@@ -104,8 +104,6 @@ typedef struct part_data {
|
||||
|
||||
#define OPTIONS "B:hv:m:o:r:k:"
|
||||
|
||||
-static int debug = 0;
|
||||
-
|
||||
typedef struct image_info {
|
||||
char magic[16];
|
||||
char version[256];
|
||||
@@ -236,9 +234,9 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c
|
||||
fw_layout_t* p;
|
||||
|
||||
p = &fw_layout_data[0];
|
||||
- while ((strlen(p->name) != 0) && (strncmp(p->name, board_name, sizeof(board_name)) != 0))
|
||||
+ while (*p->name && (strcmp(p->name, board_name) != 0))
|
||||
p++;
|
||||
- if (p->name == NULL) {
|
||||
+ if (!*p->name) {
|
||||
printf("BUG! Unable to find default fw layout!\n");
|
||||
exit(-1);
|
||||
}
|
||||
@@ -247,7 +245,7 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c
|
||||
strcpy(kernel->partition_name, "kernel");
|
||||
kernel->partition_index = 1;
|
||||
kernel->partition_baseaddr = p->kern_start;
|
||||
- if ( (kernel->partition_length = filelength(kernelfile)) < 0) return (-1);
|
||||
+ if ( (kernel->partition_length = filelength(kernelfile)) == (u_int32_t)-1) return (-1);
|
||||
kernel->partition_memaddr = p->kern_entry;
|
||||
kernel->partition_entryaddr = p->kern_entry;
|
||||
strncpy(kernel->filename, kernelfile, sizeof(kernel->filename));
|
||||
@@ -263,8 +261,8 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c
|
||||
rootfs->partition_entryaddr = 0x00000000;
|
||||
strncpy(rootfs->filename, rootfsfile, sizeof(rootfs->filename));
|
||||
|
||||
-printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr);
|
||||
-printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr);
|
||||
+ printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr);
|
||||
+ printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr);
|
||||
im->part_count = 2;
|
||||
|
||||
return 0;
|
@ -1,39 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 25 Feb 2016 21:40:19 +0100
|
||||
Subject: ar71xx, firmware-utils: split ubdev01 flash layout from XM
|
||||
|
||||
The ubdev01 profile defines its own MTDPARTS with smaller firmware
|
||||
partition, so give it its own UBNT_BOARD in mkfwimage.
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
|
||||
index dd224d4..4aaa115 100644
|
||||
--- a/target/linux/ar71xx/image/Makefile
|
||||
+++ b/target/linux/ar71xx/image/Makefile
|
||||
@@ -2031,7 +2031,7 @@ $(eval $(call SingleProfile,TPLINK-SAFELOADER,64kraw,CPE510,cpe210-220-510-520,C
|
||||
$(eval $(call SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x))
|
||||
$(eval $(call SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240))
|
||||
|
||||
-$(eval $(call SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240))
|
||||
+$(eval $(call SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,UBDEV01,XM,ar7240))
|
||||
|
||||
$(eval $(call SingleProfile,UBNT,64k,UBNTRS,ubnt-rs,UBNT-RS,ttyS0,115200,RS,RSx,ar7100))
|
||||
$(eval $(call SingleProfile,UBNT,64k,UBNTRSPRO,ubnt-rspro,UBNT-RSPRO,ttyS0,115200,RSPRO,RSPRO,ar7100pro))
|
||||
diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c
|
||||
index 00bf439..5dae284 100644
|
||||
--- a/tools/firmware-utils/src/mkfwimage.c
|
||||
+++ b/tools/firmware-utils/src/mkfwimage.c
|
||||
@@ -81,6 +81,12 @@ fw_layout_t fw_layout_data[] = {
|
||||
.kern_entry = 0x80002000,
|
||||
.firmware_max_length= 0x006A0000,
|
||||
},
|
||||
+ {
|
||||
+ .name = "UBDEV01",
|
||||
+ .kern_start = 0x9f050000,
|
||||
+ .kern_entry = 0x80002000,
|
||||
+ .firmware_max_length= 0x006A0000,
|
||||
+ },
|
||||
{ .name = "",
|
||||
},
|
||||
};
|
@ -1,45 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Thu, 25 Feb 2016 21:42:14 +0100
|
||||
Subject: firmware-utils: mkfwimage: fix firmware_max_length for XM layout
|
||||
|
||||
The new u-boot version bundled with the 5.6.x firmwares from Ubiquiti gets
|
||||
confused by the smaller rootfs partition size; this can lead to various
|
||||
issues:
|
||||
|
||||
1. We've gotten reports that flashing from the 5.6.x stock firmware to
|
||||
OpenWrt will brick devices; I wasn't able to reproduce this myself
|
||||
2. Flashing from 5.5.x stock firmware to OpenWrt and back to stock (via
|
||||
TFTP recovery), following by an update to 5.6.x via web interface can
|
||||
yield a bricked device with the following properties:
|
||||
- It can't be booted without entering commands over a serial console, as
|
||||
u-boot supplies the wrong MTD layout
|
||||
- The web interface won't accept any image with the original flash
|
||||
layout, so stock firmware upgrades are impossible
|
||||
- As the TFTP recovery doesn't update u-boot, returning to the old
|
||||
u-boot from firmware 5.5.x is impossible
|
||||
|
||||
To recover from 2., creating an OpenWrt image which doesn't set u-boot as
|
||||
read-only and flashing a backup of the old u-boot from there is the only
|
||||
way known to me. (Fixing the mtdparts variable in u-boot-env from OpenWrt
|
||||
might also work; settings this from u-boot over serial didn't have
|
||||
any permanent effect.)
|
||||
|
||||
Fix all of this by setting the correct flash layout also used by the stock
|
||||
firmware. Flashing has been tested from both firmware 5.5.x and 5.6.x. The
|
||||
fixed layout also matches the mtdparts defined by OpenWrt.
|
||||
|
||||
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
|
||||
diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c
|
||||
index 5dae284..d8d5239 100644
|
||||
--- a/tools/firmware-utils/src/mkfwimage.c
|
||||
+++ b/tools/firmware-utils/src/mkfwimage.c
|
||||
@@ -79,7 +79,7 @@ fw_layout_t fw_layout_data[] = {
|
||||
.name = "XM",
|
||||
.kern_start = 0x9f050000,
|
||||
.kern_entry = 0x80002000,
|
||||
- .firmware_max_length= 0x006A0000,
|
||||
+ .firmware_max_length= 0x00760000,
|
||||
},
|
||||
{
|
||||
.name = "UBDEV01",
|
@ -1,22 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Fri, 26 Feb 2016 04:24:06 +0100
|
||||
Subject: kernel: disable software protection bits for macronix flash chips at init
|
||||
|
||||
Backport of r47626
|
||||
|
||||
diff --git a/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch
|
||||
new file mode 100644
|
||||
index 0000000..d7d7eec
|
||||
--- /dev/null
|
||||
+++ b/target/linux/generic/patches-3.18/465-m25p80-mx-disable-software-protection.patch
|
||||
@@ -0,0 +1,10 @@
|
||||
+--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
++++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
+@@ -962,6 +962,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
+
|
||||
+ if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL ||
|
||||
+ JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL ||
|
||||
++ JEDEC_MFR(info->jedec_id) == CFI_MFR_MACRONIX ||
|
||||
+ JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) {
|
||||
+ write_enable(nor);
|
||||
+ write_sr(nor, 0);
|
@ -1,19 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 28 Feb 2016 02:29:56 +0100
|
||||
Subject: brcm2708-gpu-fw: move pkg build dir to kernel build dir to fix rebuild bugs after cleaning the kernel tree
|
||||
|
||||
Backport of r48732
|
||||
|
||||
diff --git a/package/kernel/brcm2708-gpu-fw/Makefile b/package/kernel/brcm2708-gpu-fw/Makefile
|
||||
index eee85e0..286984b 100644
|
||||
--- a/package/kernel/brcm2708-gpu-fw/Makefile
|
||||
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
|
||||
@@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_REV).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
|
||||
PKG_MD5SUM:=f5683c1dcb255714942f7c9fd61b3a0a
|
||||
|
||||
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
|
||||
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -1,21 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 28 Feb 2016 03:42:29 +0100
|
||||
Subject: kernel/gpio_keys: load module on pre-init
|
||||
|
||||
fix rescue mode on wdr4900
|
||||
|
||||
Backport of r48793
|
||||
|
||||
diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk
|
||||
index 86ff33c..eed9aa2 100644
|
||||
--- a/package/kernel/linux/modules/input.mk
|
||||
+++ b/package/kernel/linux/modules/input.mk
|
||||
@@ -75,7 +75,7 @@ define KernelPackage/input-gpio-keys
|
||||
CONFIG_KEYBOARD_GPIO \
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
FILES:=$(LINUX_DIR)/drivers/input/keyboard/gpio_keys.ko
|
||||
- AUTOLOAD:=$(call AutoProbe,gpio_keys)
|
||||
+ AUTOLOAD:=$(call AutoProbe,gpio_keys,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/input-gpio-keys/description
|
@ -1,36 +0,0 @@
|
||||
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
Date: Sun, 28 Feb 2016 04:49:51 +0100
|
||||
Subject: ar71xx/lzma-loader: fix O32 ABI conformance
|
||||
|
||||
According to the calling convention of the o32 ABI the caller
|
||||
function must reserve stack space for $a0-$a3 registers in case
|
||||
the callee needs to save its arguments.
|
||||
|
||||
The assembly code of the loader does not reserve stack space for
|
||||
these registers thus when the 'loader_main' function needs to save
|
||||
its arguments, those will be stored in the 'workspace' area instead
|
||||
of the stack.
|
||||
|
||||
Because the workspace area is also used by other part of the code, the
|
||||
saved register values gets overwritten and this often leads to failed
|
||||
kernel boots.
|
||||
|
||||
Fix the code to reserve stack space for the registers to avoid this
|
||||
error.
|
||||
|
||||
Backport of r48279
|
||||
|
||||
diff --git a/target/linux/ar71xx/image/lzma-loader/src/head.S b/target/linux/ar71xx/image/lzma-loader/src/head.S
|
||||
index 543996a..47a7c9b 100644
|
||||
--- a/target/linux/ar71xx/image/lzma-loader/src/head.S
|
||||
+++ b/target/linux/ar71xx/image/lzma-loader/src/head.S
|
||||
@@ -109,6 +109,9 @@ __bss_check:
|
||||
/* Setup new "C" stack */
|
||||
la sp, _stack
|
||||
|
||||
+ /* reserve stack space for a0-a3 registers */
|
||||
+ subu sp, 16
|
||||
+
|
||||
/* jump to the decompressor routine */
|
||||
la t0, loader_main
|
||||
jr t0
|
Loading…
Reference in New Issue
Block a user