Browse Source

Fresh pull from upstream lede-17.01 branch @ commit d77fe9219af17dce2d00147d904267d4489ae841

RISCi_ATOM 6 years ago
parent
commit
f6b96b2052
100 changed files with 3154 additions and 6603 deletions
  1. 5 0
      include/host-build.mk
  2. 2 4
      include/kernel-version.mk
  3. 13 10
      include/kernel.mk
  4. 1 1
      include/prereq-build.mk
  5. 2 0
      include/site/darwin
  6. 2 7
      include/target.mk
  7. 3 3
      package/base-files/Makefile
  8. 1 1
      package/base-files/files/bin/config_generate
  9. 1 1
      package/base-files/files/etc/init.d/system
  10. 1 1
      package/base-files/files/lib/functions.sh
  11. 1 1
      package/base-files/files/usr/lib/os-release
  12. 0 88
      package/boot/uboot-envtools/files/ipq
  13. 0 894
      package/boot/uboot-xburst/patches/0001-qi_lb60-add-nand-spl-support.patch
  14. 0 916
      package/boot/uboot-xburst/patches/0002-qi_lb60-add-software-usbboot-support.patch
  15. 0 1664
      package/boot/uboot-xburst/patches/0003-add-mmc-support.patch
  16. 0 200
      package/boot/uboot-xburst/patches/0004-add-more-boot-options-F1-F2-F3-F4-M-S.patch
  17. 0 847
      package/boot/uboot-xburst/patches/0005-add-nanonote-lcd-support.patch
  18. 0 60
      package/boot/uboot-xburst/patches/0006-enable-silent-console.patch
  19. 1 0
      package/kernel/linux/modules/netdevices.mk
  20. 19 12
      package/kernel/mac80211/files/regdb.txt
  21. 1 9
      package/kernel/om-watchdog/Makefile
  22. 40 31
      package/kernel/om-watchdog/files/om-watchdog.init
  23. 3 3
      package/libs/uclient/Makefile
  24. 0 5
      package/luci/.buildpath
  25. 0 221
      package/luci/.cproject
  26. 0 78
      package/luci/.project
  27. 0 62
      package/luci/CONTRIBUTING.md
  28. 0 34
      package/luci/README.md
  29. 0 26
      package/luci/THANKYOU
  30. 42 37
      package/luci/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
  31. 3 0
      package/luci/applications/luci-app-adblock/luasrc/view/adblock/config_css.htm
  32. 95 36
      package/luci/applications/luci-app-adblock/po/it/adblock.po
  33. 53 36
      package/luci/applications/luci-app-adblock/po/ja/adblock.po
  34. 56 24
      package/luci/applications/luci-app-adblock/po/pt-br/adblock.po
  35. 70 33
      package/luci/applications/luci-app-adblock/po/sv/adblock.po
  36. 32 18
      package/luci/applications/luci-app-adblock/po/templates/adblock.pot
  37. 134 62
      package/luci/applications/luci-app-adblock/po/zh-cn/adblock.po
  38. 455 0
      package/luci/applications/luci-app-adblock/po/zh-tw/adblock.po
  39. 9 8
      package/luci/applications/luci-app-advanced-reboot/po/sv/luci-app-advanced-reboot.po
  40. 142 121
      package/luci/applications/luci-app-aria2/po/zh-cn/aria2.po
  41. 221 0
      package/luci/applications/luci-app-aria2/po/zh-tw/aria2.po
  42. 1 1
      package/luci/applications/luci-app-attendedsysupgrade/Makefile
  43. 375 231
      package/luci/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm
  44. 6 0
      package/luci/applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade
  45. 31 0
      package/luci/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json
  46. 3 3
      package/luci/applications/luci-app-bcp38/po/zh-cn/bcp38.po
  47. 52 0
      package/luci/applications/luci-app-bcp38/po/zh-tw/bcp38.po
  48. 1 1
      package/luci/applications/luci-app-commands/po/zh-tw/commands.po
  49. 1 1
      package/luci/applications/luci-app-ddns/po/it/ddns.po
  50. 144 129
      package/luci/applications/luci-app-ddns/po/zh-cn/ddns.po
  51. 250 206
      package/luci/applications/luci-app-ddns/po/zh-tw/ddns.po
  52. 3 3
      package/luci/applications/luci-app-diag-core/po/zh-tw/diag_core.po
  53. 8 8
      package/luci/applications/luci-app-diag-devinfo/po/sv/diag_devinfo.po
  54. 9 3
      package/luci/applications/luci-app-dnscrypt-proxy/luasrc/controller/dnscrypt-proxy.lua
  55. 2 0
      package/luci/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/cfg_dnsmasq_tab.lua
  56. 39 0
      package/luci/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/cfg_resolvcrypt_tab.lua
  57. 130 62
      package/luci/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua
  58. 82 35
      package/luci/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po
  59. 59 22
      package/luci/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot
  60. 12 4
      package/luci/applications/luci-app-firewall/po/zh-cn/firewall.po
  61. 137 144
      package/luci/applications/luci-app-firewall/po/zh-tw/firewall.po
  62. 3 3
      package/luci/applications/luci-app-freifunk-policyrouting/po/zh-cn/freifunk-policyrouting.po
  63. 1 0
      package/luci/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd
  64. 9 9
      package/luci/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh
  65. 3 3
      package/luci/applications/luci-app-meshwizard/po/zh-cn/meshwizard.po
  66. 5 1
      package/luci/applications/luci-app-minidlna/luasrc/model/cbi/minidlna.lua
  67. 8 1
      package/luci/applications/luci-app-minidlna/po/ca/minidlna.po
  68. 8 1
      package/luci/applications/luci-app-minidlna/po/cs/minidlna.po
  69. 8 1
      package/luci/applications/luci-app-minidlna/po/de/minidlna.po
  70. 8 1
      package/luci/applications/luci-app-minidlna/po/el/minidlna.po
  71. 9 2
      package/luci/applications/luci-app-minidlna/po/en/minidlna.po
  72. 10 3
      package/luci/applications/luci-app-minidlna/po/es/minidlna.po
  73. 8 1
      package/luci/applications/luci-app-minidlna/po/fr/minidlna.po
  74. 8 1
      package/luci/applications/luci-app-minidlna/po/he/minidlna.po
  75. 9 2
      package/luci/applications/luci-app-minidlna/po/hu/minidlna.po
  76. 14 9
      package/luci/applications/luci-app-minidlna/po/it/minidlna.po
  77. 20 10
      package/luci/applications/luci-app-minidlna/po/ja/minidlna.po
  78. 8 1
      package/luci/applications/luci-app-minidlna/po/ms/minidlna.po
  79. 12 5
      package/luci/applications/luci-app-minidlna/po/no/minidlna.po
  80. 10 3
      package/luci/applications/luci-app-minidlna/po/pl/minidlna.po
  81. 10 3
      package/luci/applications/luci-app-minidlna/po/pt-br/minidlna.po
  82. 8 1
      package/luci/applications/luci-app-minidlna/po/pt/minidlna.po
  83. 8 1
      package/luci/applications/luci-app-minidlna/po/ro/minidlna.po
  84. 10 3
      package/luci/applications/luci-app-minidlna/po/ru/minidlna.po
  85. 8 1
      package/luci/applications/luci-app-minidlna/po/sk/minidlna.po
  86. 8 1
      package/luci/applications/luci-app-minidlna/po/sv/minidlna.po
  87. 8 1
      package/luci/applications/luci-app-minidlna/po/templates/minidlna.pot
  88. 8 1
      package/luci/applications/luci-app-minidlna/po/tr/minidlna.po
  89. 8 1
      package/luci/applications/luci-app-minidlna/po/uk/minidlna.po
  90. 8 1
      package/luci/applications/luci-app-minidlna/po/vi/minidlna.po
  91. 12 4
      package/luci/applications/luci-app-minidlna/po/zh-cn/minidlna.po
  92. 8 1
      package/luci/applications/luci-app-minidlna/po/zh-tw/minidlna.po
  93. 5 5
      package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua
  94. 5 5
      package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
  95. 1 1
      package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policyconfig.lua
  96. 1 1
      package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua
  97. 1 1
      package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua
  98. 18 18
      package/luci/applications/luci-app-mwan3/po/ja/mwan3.po
  99. 17 17
      package/luci/applications/luci-app-mwan3/po/templates/mwan3.pot
  100. 88 72
      package/luci/applications/luci-app-mwan3/po/zh-cn/mwan3.po

+ 5 - 0
include/host-build.mk

@@ -77,6 +77,10 @@ HOST_MAKE_FLAGS =
 
 HOST_CONFIGURE_CMD = $(BASH) ./configure
 
+ifeq ($(HOST_OS),Darwin)
+  HOST_CONFIG_SITE:=$(INCLUDE_DIR)/site/darwin
+endif
+
 define Host/Configure/Default
 	$(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \
 		if [ -x configure ]; then \
@@ -127,6 +131,7 @@ define Host/Exports/Default
   $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
   $(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
   $(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache
+  $(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE))
   $(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
 endef
 Host/Exports=$(Host/Exports/Default)

+ 2 - 4
include/kernel-version.mk

@@ -2,11 +2,9 @@
 
 LINUX_RELEASE?=1
 
-LINUX_VERSION-3.18 = .43
-LINUX_VERSION-4.4 = .87
+LINUX_VERSION-4.4 = .102
 
-LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
-LINUX_KERNEL_HASH-4.4.87 = f2e26505e3aecf622d4f4e1ede44b3b97a38739ad8b78ede14eb354f22d1387a
+LINUX_KERNEL_HASH-4.4.102 = 67104295ed20d23291773b41fe4514e4b12f47351f8ca5f2bbfd87b3071a549a
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))

+ 13 - 10
include/kernel.mk

@@ -59,7 +59,7 @@ else
   LINUX_SOURCE:=linux-libre-$(LINUX_VERSION)-gnu.tar.xz
   TESTING:=$(if $(findstring -rc,$(LINUX_VERSION)),/testing,)
   ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
-      LINUX_SITE:=@KERNEL_LIBRE/$(LINUX_VERSION)-gnu$(TESTING)
+	LINUX_SITE:=@KERNEL_LIBRE/$(LINUX_VERSION)-gnu$(TESTING)
   endif
 
   ifneq ($(TARGET_BUILD),1)
@@ -95,15 +95,16 @@ define ModuleAutoLoad
 	$(SH_FUNC) \
 	export modules=; \
 	probe_module() { \
-		mods="$$$$$$$$1"; \
-		boot="$$$$$$$$2"; \
+		local mods="$$$$$$$$1"; \
+		local boot="$$$$$$$$2"; \
+		local mod; \
 		shift 2; \
-		for mod in $(sort $$$$$$$$mods); do \
+		for mod in $$$$$$$$mods; do \
 			mkdir -p $(2)/etc/modules.d; \
 			echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
 		done; \
 		if [ -e $(2)/etc/modules.d/$(1) ]; then \
-			if [ "$$$$$$$$boot" = "1" ]; then \
+			if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$(1) ]; then \
 				mkdir -p $(2)/etc/modules-boot.d; \
 				ln -s ../modules.d/$(1) $(2)/etc/modules-boot.d/; \
 			fi; \
@@ -111,16 +112,17 @@ define ModuleAutoLoad
 		fi; \
 	}; \
 	add_module() { \
-		priority="$$$$$$$$1"; \
-		mods="$$$$$$$$2"; \
-		boot="$$$$$$$$3"; \
+		local priority="$$$$$$$$1"; \
+		local mods="$$$$$$$$2"; \
+		local boot="$$$$$$$$3"; \
+		local mod; \
 		shift 3; \
-		for mod in $(sort $$$$$$$$mods); do \
+		for mod in $$$$$$$$mods; do \
 			mkdir -p $(2)/etc/modules.d; \
 			echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
 		done; \
 		if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \
-			if [ "$$$$$$$$boot" = "1" ]; then \
+			if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$$$$$$$$priority-$(1) ]; then \
 				mkdir -p $(2)/etc/modules-boot.d; \
 				ln -s ../modules.d/$$$$$$$$priority-$(1) $(2)/etc/modules-boot.d/; \
 			fi; \
@@ -129,6 +131,7 @@ define ModuleAutoLoad
 	}; \
 	$(3) \
 	if [ -n "$$$$$$$$modules" ]; then \
+		modules="$$$$$$$$(echo "$$$$$$$$modules" | tr ' ' '\n' | sort | uniq | paste -s -d' ' -)"; \
 		mkdir -p $(2)/etc/modules.d; \
 		mkdir -p $(2)/CONTROL; \
 		echo "#!/bin/sh" > $(2)/CONTROL/postinst-pkg; \

+ 1 - 1
include/prereq-build.mk

@@ -20,7 +20,7 @@ $(eval $(call TestHostCommand,working-make, \
 	$(MAKE) -v | grep -E 'Make (3\.8[1-9]|3\.9[0-9]|[4-9]\.)'))
 
 $(eval $(call TestHostCommand,case-sensitive-fs, \
-	libreCMC can only be built on a case-sensitive filesystem, \
+	LEDE can only be built on a case-sensitive filesystem, \
 	rm -f $(TMP_DIR)/test.*; touch $(TMP_DIR)/test.fs; \
 		test ! -f $(TMP_DIR)/test.FS))
 

+ 2 - 0
include/site/darwin

@@ -0,0 +1,2 @@
+ac_cv_func_futimens=no
+ac_cv_func_utimensat=no

+ 2 - 7
include/target.mk

@@ -13,18 +13,13 @@ __target_inc=1
 DEVICE_TYPE?=router
 
 # Default packages - the really basic set
-DEFAULT_PACKAGES:=base-files ca-bundle libmbedtls libustream-mbedtls libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd
-
+DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd
 # For nas targets
 DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
-
 # For router targets
-DEFAULT_PACKAGES.router:=dnsmasq iptables ip6tables ppp ppp-mod-pppoe ppp-mod-pppoa firewall odhcpd odhcp6c
+DEFAULT_PACKAGES.router:=dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd odhcp6c
 DEFAULT_PACKAGES.bootloader:=
 
-# Small Router Targets
-DEFAULT_PACKAGES.small-router:=-ca-bundle -opkg -libmbedtls -libustream-mbedtls
-
 ifneq ($(DUMP),)
   all: dumpinfo
 endif

+ 3 - 3
package/base-files/Makefile

@@ -31,7 +31,7 @@ endif
 define Package/base-files
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:librecmc-keyring +fstools +fwtool
+  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +fstools +fwtool
   TITLE:=Base filesystem for Lede
   URL:=http://openwrt.org/
   VERSION:=$(PKG_RELEASE)-$(REVISION)
@@ -75,9 +75,9 @@ define ImageConfigOptions
 	echo 'pi_init_cmd=$(if $(CONFIG_TARGET_INIT_CMD),$(CONFIG_TARGET_INIT_CMD),"/sbin/init")' >>$(1)/lib/preinit/00_preinit.conf
 	echo 'pi_init_suppress_stderr="$(CONFIG_TARGET_INIT_SUPPRESS_STDERR)"' >>$(1)/lib/preinit/00_preinit.conf
 	echo 'pi_ifname=$(if $(CONFIG_TARGET_PREINIT_IFNAME),$(CONFIG_TARGET_PREINIT_IFNAME),"")' >>$(1)/lib/preinit/00_preinit.conf
-	echo 'pi_ip=$(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.10.1")' >>$(1)/lib/preinit/00_preinit.conf
+	echo 'pi_ip=$(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/lib/preinit/00_preinit.conf
 	echo 'pi_netmask=$(if $(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")' >>$(1)/lib/preinit/00_preinit.conf
-	echo 'pi_broadcast=$(if $(CONFIG_TARGET_PREINIT_BROADCAST),$(CONFIG_TARGET_PREINIT_BROADCAST),"192.168.10.255")' >>$(1)/lib/preinit/00_preinit.conf
+	echo 'pi_broadcast=$(if $(CONFIG_TARGET_PREINIT_BROADCAST),$(CONFIG_TARGET_PREINIT_BROADCAST),"192.168.1.255")' >>$(1)/lib/preinit/00_preinit.conf
 	echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
 	echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
 	echo 'pi_preinit_no_failsafe="$(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE)"' >>$(1)/lib/preinit/00_preinit.conf

+ 1 - 1
package/base-files/files/bin/config_generate

@@ -91,7 +91,7 @@ generate_network() {
 		static)
 			local ipad
 			case "$1" in
-				lan) ipad=${ipaddr:-"192.168.10.1"} ;;
+				lan) ipad=${ipaddr:-"192.168.1.1"} ;;
 				*) ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} ;;
 			esac
 

+ 1 - 1
package/base-files/files/etc/init.d/system

@@ -7,7 +7,7 @@ USE_PROCD=1
 validate_system_section()
 {
 	uci_validate_section system system "${1}" \
-		'hostname:string:librecmc' \
+		'hostname:string:lede' \
 		'conloglevel:uinteger' \
 		'buffersize:uinteger' \
 		'timezone:string:UTC' \

+ 1 - 1
package/base-files/files/lib/functions.sh

@@ -240,7 +240,7 @@ default_postinst() {
 		[ -d /tmp/.uci ] || mkdir -p /tmp/.uci
 		for i in $(sed -ne 's!^/etc/uci-defaults/!!p' "/usr/lib/opkg/info/${pkgname}.list"); do (
 			cd /etc/uci-defaults
-			[ -f "$i" ] && . "$i" && rm -f "$i"
+			[ -f "$i" ] && . ./"$i" && rm -f "$i"
 		) done
 		uci commit
 	fi

+ 1 - 1
package/base-files/files/usr/lib/os-release

@@ -1,7 +1,7 @@
 NAME="%D"
 VERSION="%V, %N"
 ID="%d"
-ID_LIKE="librecmc openwrt"
+ID_LIKE="lede openwrt"
 PRETTY_NAME="%D %N %V"
 VERSION_ID="%v"
 HOME_URL="%m"

+ 0 - 88
package/boot/uboot-envtools/files/ipq

@@ -1,88 +0,0 @@
-#
-# Copyright (C) 2010 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=u-boot
-PKG_VERSION:=2012.10-rc2
-PKG_RELEASE:=1
-
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:= \
-	http://mirror2.openwrt.org/sources \
-	ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=6d094cafa7ecea8b671fbdcd21130b6a4f5744fc47dd263e101ed5d3629dffd4
-PKG_TARGETS:=bin
-
-PKG_LICENSE:=GPL-2.0 GPL-2.0+
-PKG_LICENSE_FILES:=Licenses/README
-
-include $(INCLUDE_DIR)/package.mk
-
-define uboot/Default
-  TITLE:=
-  CONFIG:=
-  IMAGE:=
-endef
-
-define uboot/qi_lb60
-  TITLE:=U-boot for the qi_lb60 board
-endef
-
-UBOOTS:=qi_lb60
-
-define Package/uboot/template
-define Package/uboot-xburst-$(1)
-  SECTION:=boot
-  CATEGORY:=Boot Loaders
-  DEPENDS:=@TARGET_xburst
-  TITLE:=$(2)
-  URL:=http://www.denx.de/wiki/UBoot/WebHome
-  VARIANT:=$(1)
-endef
-endef
-
-define BuildUbootPackage
-	$(eval $(uboot/Default))
-	$(eval $(uboot/$(1)))
-	$(call Package/uboot/template,$(1),$(TITLE))
-endef
-
-
-ifdef BUILD_VARIANT
-$(eval $(call uboot/$(BUILD_VARIANT)))
-UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
-UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
-endif
-
-define Build/Configure
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		$(UBOOT_CONFIG)_config
-endef
-
-define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CROSS_COMPILE=$(TARGET_CROSS)
-endef
-
-define Package/uboot/install/template
-define Package/uboot-xburst-$(1)/install
-	$(CP) $(PKG_BUILD_DIR)/u-boot-xburst.bin $(BIN_DIR)/$(2)
-	rmdir $$(1)
-endef
-endef
-
-$(foreach u,$(UBOOTS), \
-	$(eval $(call Package/uboot/install/template,$(u),openwrt-$(BOARD)-$(u)-u-boot.bin)) \
-)
-
-$(foreach u,$(UBOOTS), \
-	$(eval $(call BuildUbootPackage,$(u))) \
-	$(eval $(call BuildPackage,uboot-xburst-$(u))) \
-)

+ 0 - 894
package/boot/uboot-xburst/patches/0001-qi_lb60-add-nand-spl-support.patch

@@ -1,894 +0,0 @@
-From 0329cf7965956a5a7044827e0ce88ae8d5150e54 Mon Sep 17 00:00:00 2001
-From: Xiangfu <xiangfu@openmobilefree.net>
-Date: Fri, 12 Oct 2012 09:46:58 +0800
-Subject: [PATCH 1/6] qi_lb60: add nand spl support
-
-  The JZ4740 CPU can load 8KB from two different addresses:
-   1. the normal area up to 8KB starting from NAND flash address 0x00000000
-   2. the backup area up to 8KB starting from NAND flash address 0x00002000
-
-Signed-off-by: Xiangfu <xiangfu@openmobilefree.net>
----
- Makefile                          |   12 +++
- arch/mips/cpu/xburst/Makefile     |    7 +-
- arch/mips/cpu/xburst/cpu.c        |    4 +
- arch/mips/cpu/xburst/jz4740.c     |   82 +++++++----------
- arch/mips/cpu/xburst/spl/Makefile |   47 ++++++++++
- arch/mips/cpu/xburst/spl/start.S  |   63 +++++++++++++
- board/qi/qi_lb60/Makefile         |    4 +
- board/qi/qi_lb60/qi_lb60-spl.c    |   30 +++++++
- board/qi/qi_lb60/qi_lb60.c        |    8 +-
- board/qi/qi_lb60/u-boot-spl.lds   |   61 +++++++++++++
- drivers/mtd/nand/jz4740_nand.c    |   39 ++++++++-
- include/configs/qi_lb60.h         |  175 ++++++++++++++++++-------------------
- 12 files changed, 386 insertions(+), 146 deletions(-)
- create mode 100644 arch/mips/cpu/xburst/spl/Makefile
- create mode 100644 arch/mips/cpu/xburst/spl/start.S
- create mode 100644 board/qi/qi_lb60/qi_lb60-spl.c
- create mode 100644 board/qi/qi_lb60/u-boot-spl.lds
-
-diff --git a/Makefile b/Makefile
-index 34d9075..a22778e 100644
---- a/Makefile
-+++ b/Makefile
-@@ -393,6 +393,10 @@ ALL-y += $(obj)u-boot-nodtb-tegra.bin
- endif
- endif
- 
-+ifeq ($(CPU),xburst)
-+ALL-y += $(obj)u-boot-xburst.bin
-+endif
-+
- all:		$(ALL-y) $(SUBDIR_EXAMPLES)
- 
- $(obj)u-boot.dtb:	$(obj)u-boot
-@@ -506,6 +510,14 @@ $(obj)u-boot-nodtb-tegra.bin:	$(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
- endif
- endif
- 
-+ifeq ($(CPU),xburst)
-+$(obj)u-boot-xburst.bin:	$(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
-+	        dd if=$(obj)spl/u-boot-spl.bin of=$(obj)spl/u-boot-pad.bin conv=sync bs=8192 count=1
-+		dd if=$(obj)spl/u-boot-spl.bin of=$(obj)spl/u-boot-pad.bin conv=sync,notrunc oflag=append bs=8192 count=1
-+	        tr '\0' '\377' < /dev/zero | dd of=$(obj)spl/u-boot-pad.bin conv=sync,notrunc oflag=append bs=16384 count=1
-+	        cat $(obj)spl/u-boot-pad.bin u-boot.bin > $@
-+endif
-+
- ifeq ($(CONFIG_SANDBOX),y)
- GEN_UBOOT = \
- 		cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
-diff --git a/arch/mips/cpu/xburst/Makefile b/arch/mips/cpu/xburst/Makefile
-index b1f2ae4..ec35e55 100644
---- a/arch/mips/cpu/xburst/Makefile
-+++ b/arch/mips/cpu/xburst/Makefile
-@@ -24,9 +24,12 @@ include $(TOPDIR)/config.mk
- 
- LIB	= $(obj)lib$(CPU).o
- 
-+COBJS-y	= cpu.o jz_serial.o
-+
-+ifneq ($(CONFIG_SPL_BUILD),y)
- START	= start.o
--SOBJS-y	=
--COBJS-y	= cpu.o timer.o jz_serial.o
-+COBJS-y += timer.o
-+endif
- 
- COBJS-$(CONFIG_JZ4740) += jz4740.o
- 
-diff --git a/arch/mips/cpu/xburst/cpu.c b/arch/mips/cpu/xburst/cpu.c
-index ddcbfaa..1432838 100644
---- a/arch/mips/cpu/xburst/cpu.c
-+++ b/arch/mips/cpu/xburst/cpu.c
-@@ -42,6 +42,8 @@
- 		:			\
- 		: "i" (op), "R" (*(unsigned char *)(addr)))
- 
-+#ifndef CONFIG_SPL_BUILD
-+
- void __attribute__((weak)) _machine_restart(void)
- {
- 	struct jz4740_wdt *wdt = (struct jz4740_wdt *)JZ4740_WDT_BASE;
-@@ -109,6 +111,8 @@ void invalidate_dcache_range(ulong start_addr, ulong stop)
- 		cache_op(Hit_Invalidate_D, addr);
- }
- 
-+#endif
-+
- void flush_icache_all(void)
- {
- 	u32 addr, t = 0;
-diff --git a/arch/mips/cpu/xburst/jz4740.c b/arch/mips/cpu/xburst/jz4740.c
-index c0b9817..8816aa3 100644
---- a/arch/mips/cpu/xburst/jz4740.c
-+++ b/arch/mips/cpu/xburst/jz4740.c
-@@ -32,31 +32,19 @@ int disable_interrupts(void)
- 	return 0;
- }
- 
--/*
-- * PLL output clock = EXTAL * NF / (NR * NO)
-- * NF = FD + 2, NR = RD + 2
-- * NO = 1 (if OD = 0), NO = 2 (if OD = 1 or 2), NO = 4 (if OD = 3)
-- */
- void pll_init(void)
- {
- 	struct jz4740_cpm *cpm = (struct jz4740_cpm *)JZ4740_CPM_BASE;
- 
--	register unsigned int cfcr, plcr1;
--	int n2FR[33] = {
--		0, 0, 1, 2, 3, 0, 4, 0, 5, 0, 0, 0, 6, 0, 0, 0,
--		7, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0,
--		9
--	};
--	int div[5] = {1, 3, 3, 3, 3}; /* divisors of I:S:P:L:M */
--	int nf, pllout2;
-+	register unsigned int cfcr, plcr;
-+	unsigned int nf, pllout2;
- 
- 	cfcr =	CPM_CPCCR_CLKOEN |
--		CPM_CPCCR_PCS |
--		(n2FR[div[0]] << CPM_CPCCR_CDIV_BIT) |
--		(n2FR[div[1]] << CPM_CPCCR_HDIV_BIT) |
--		(n2FR[div[2]] << CPM_CPCCR_PDIV_BIT) |
--		(n2FR[div[3]] << CPM_CPCCR_MDIV_BIT) |
--		(n2FR[div[4]] << CPM_CPCCR_LDIV_BIT);
-+		(0 << CPM_CPCCR_CDIV_BIT) |
-+		(2 << CPM_CPCCR_HDIV_BIT) |
-+		(2 << CPM_CPCCR_PDIV_BIT) |
-+		(2 << CPM_CPCCR_MDIV_BIT) |
-+		(2 << CPM_CPCCR_LDIV_BIT);
- 
- 	pllout2 = (cfcr & CPM_CPCCR_PCS) ?
- 		CONFIG_SYS_CPU_SPEED : (CONFIG_SYS_CPU_SPEED / 2);
-@@ -65,15 +53,18 @@ void pll_init(void)
- 	writel(pllout2 / 48000000 - 1, &cpm->uhccdr);
- 
- 	nf = CONFIG_SYS_CPU_SPEED * 2 / CONFIG_SYS_EXTAL;
--	plcr1 = ((nf - 2) << CPM_CPPCR_PLLM_BIT) | /* FD */
-+	plcr = ((nf - 2) << CPM_CPPCR_PLLM_BIT) | /* FD */
- 		(0 << CPM_CPPCR_PLLN_BIT) |	/* RD=0, NR=2 */
- 		(0 << CPM_CPPCR_PLLOD_BIT) |	/* OD=0, NO=1 */
--		(0x20 << CPM_CPPCR_PLLST_BIT) |	/* PLL stable time */
-+		(0x32 << CPM_CPPCR_PLLST_BIT) |	/* PLL stable time */
- 		CPM_CPPCR_PLLEN;		/* enable PLL */
- 
- 	/* init PLL */
- 	writel(cfcr, &cpm->cpccr);
--	writel(plcr1, &cpm->cppcr);
-+	writel(plcr, &cpm->cppcr);
-+
-+	while (!(readl(&cpm->cppcr) & CPM_CPPCR_PLLS))
-+		;
- }
- 
- void sdram_init(void)
-@@ -92,26 +83,12 @@ void sdram_init(void)
- 		2 << EMC_DMCR_TCL_BIT	/* CAS latency is 3 */
- 	};
- 
--	int div[] = {1, 2, 3, 4, 6, 8, 12, 16, 24, 32};
--
- 	cpu_clk = CONFIG_SYS_CPU_SPEED;
--	mem_clk = cpu_clk * div[__cpm_get_cdiv()] / div[__cpm_get_mdiv()];
-+	mem_clk = 84000000;
- 
- 	writel(0, &emc->bcr);	/* Disable bus release */
- 	writew(0, &emc->rtcsr);	/* Disable clock for counting */
- 
--	/* Fault DMCR value for mode register setting*/
--#define SDRAM_ROW0	11
--#define SDRAM_COL0	8
--#define SDRAM_BANK40	0
--
--	dmcr0 = ((SDRAM_ROW0 - 11) << EMC_DMCR_RA_BIT) |
--		((SDRAM_COL0 - 8) << EMC_DMCR_CA_BIT) |
--		(SDRAM_BANK40 << EMC_DMCR_BA_BIT) |
--		(SDRAM_BW16 << EMC_DMCR_BW_BIT) |
--		EMC_DMCR_EPIN |
--		cas_latency_dmcr[((SDRAM_CASL == 3) ? 1 : 0)];
--
- 	/* Basic DMCR value */
- 	dmcr = ((SDRAM_ROW - 11) << EMC_DMCR_RA_BIT) |
- 		((SDRAM_COL - 8) << EMC_DMCR_CA_BIT) |
-@@ -128,31 +105,31 @@ void sdram_init(void)
- 	if (tmp > 11)
- 		tmp = 11;
- 	dmcr |= (tmp - 4) << EMC_DMCR_TRAS_BIT;
--	tmp = SDRAM_RCD / ns;
- 
-+	tmp = SDRAM_RCD / ns;
- 	if (tmp > 3)
- 		tmp = 3;
- 	dmcr |= tmp << EMC_DMCR_RCD_BIT;
--	tmp = SDRAM_TPC / ns;
- 
-+	tmp = SDRAM_TPC / ns;
- 	if (tmp > 7)
- 		tmp = 7;
- 	dmcr |= tmp << EMC_DMCR_TPC_BIT;
--	tmp = SDRAM_TRWL / ns;
- 
-+	tmp = SDRAM_TRWL / ns;
- 	if (tmp > 3)
- 		tmp = 3;
- 	dmcr |= tmp << EMC_DMCR_TRWL_BIT;
--	tmp = (SDRAM_TRAS + SDRAM_TPC) / ns;
- 
-+	tmp = (SDRAM_TRAS + SDRAM_TPC) / ns;
- 	if (tmp > 14)
- 		tmp = 14;
- 	dmcr |= ((tmp + 1) >> 1) << EMC_DMCR_TRC_BIT;
- 
- 	/* SDRAM mode value */
--	sdmode = EMC_SDMR_BT_SEQ |
--		 EMC_SDMR_OM_NORMAL |
--		 EMC_SDMR_BL_4 |
-+	sdmode = EMC_SDMR_BT_SEQ	|
-+		 EMC_SDMR_OM_NORMAL	|
-+		 EMC_SDMR_BL_4		|
- 		 cas_latency_sdmr[((SDRAM_CASL == 3) ? 1 : 0)];
- 
- 	/* Stage 1. Precharge all banks by writing SDMR with DMCR.MRSET=0 */
-@@ -172,8 +149,8 @@ void sdram_init(void)
- 	if (tmp > 0xff)
- 		tmp = 0xff;
- 	writew(tmp, &emc->rtcor);
-+
- 	writew(0, &emc->rtcnt);
--	/* Divisor is 64, CKO/64 */
- 	writew(EMC_RTCSR_CKS_64, &emc->rtcsr);
- 
- 	/* Wait for number of auto-refresh cycles */
-@@ -182,13 +159,17 @@ void sdram_init(void)
- 		;
- 
- 	/* Stage 3. Mode Register Set */
-+	dmcr0 = (11 << EMC_DMCR_RA_BIT)	|
-+		(8 << EMC_DMCR_CA_BIT)	|
-+		(0 << EMC_DMCR_BA_BIT)	|
-+		EMC_DMCR_EPIN		|
-+		(SDRAM_BW16 << EMC_DMCR_BW_BIT) |
-+		cas_latency_dmcr[((SDRAM_CASL == 3) ? 1 : 0)];
- 	writel(dmcr0 | EMC_DMCR_RFSH | EMC_DMCR_MRSET, &emc->dmcr);
- 	writeb(0, JZ4740_EMC_SDMR0 | sdmode);
- 
- 	/* Set back to basic DMCR value */
- 	writel(dmcr | EMC_DMCR_RFSH | EMC_DMCR_MRSET, &emc->dmcr);
--
--	/* everything is ok now */
- }
- 
- DECLARE_GLOBAL_DATA_PTR;
-@@ -232,9 +213,10 @@ void rtc_init(void)
- phys_size_t initdram(int board_type)
- {
- 	struct jz4740_emc *emc = (struct jz4740_emc *)JZ4740_EMC_BASE;
--	u32 dmcr;
--	u32 rows, cols, dw, banks;
--	ulong size;
-+
-+	unsigned int dmcr;
-+	unsigned int rows, cols, dw, banks;
-+	unsigned long size;
- 
- 	dmcr = readl(&emc->dmcr);
- 	rows = 11 + ((dmcr & EMC_DMCR_RA_MASK) >> EMC_DMCR_RA_BIT);
-diff --git a/arch/mips/cpu/xburst/spl/Makefile b/arch/mips/cpu/xburst/spl/Makefile
-new file mode 100644
-index 0000000..f45e8c8
---- /dev/null
-+++ b/arch/mips/cpu/xburst/spl/Makefile
-@@ -0,0 +1,47 @@
-+#
-+# Copyright (C) 2011 Xiangfu Liu <xiangfu@openmobilefree.net>
-+#
-+# See file CREDITS for list of people who contributed to this
-+# project.
-+#
-+# This program is free software; you can redistribute it and/or
-+# modify it under the terms of the GNU General Public License as
-+# published by the Free Software Foundation; either version 2 of
-+# the License, or (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+# MA 02111-1307 USA
-+#
-+
-+include $(TOPDIR)/config.mk
-+
-+LIB	= $(obj)lib$(CPU).o
-+
-+START	= start.o
-+SOBJS-y	=
-+COBJS-y	=
-+
-+SRCS	:= $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
-+OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
-+START	:= $(addprefix $(obj),$(START))
-+
-+all:	$(obj).depend $(START) $(LIB)
-+
-+$(LIB):	$(OBJS)
-+	$(call cmd_link_o_target, $(OBJS))
-+
-+#########################################################################
-+
-+# defines $(obj).depend target
-+include $(SRCTREE)/rules.mk
-+
-+sinclude $(obj).depend
-+
-+#########################################################################
-diff --git a/arch/mips/cpu/xburst/spl/start.S b/arch/mips/cpu/xburst/spl/start.S
-new file mode 100644
-index 0000000..e31c4c8
---- /dev/null
-+++ b/arch/mips/cpu/xburst/spl/start.S
-@@ -0,0 +1,63 @@
-+/*
-+ * Copyright (c) 2010 Xiangfu Liu <xiangfu@openmobilefree.net>
-+ *
-+ * See file CREDITS for list of people who contributed to this
-+ * project.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 3 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ * MA 02111-1307 USA
-+ */
-+
-+#include <config.h>
-+#include <version.h>
-+#include <asm/regdef.h>
-+#include <asm/mipsregs.h>
-+#include <asm/addrspace.h>
-+#include <asm/cacheops.h>
-+
-+#include <asm/jz4740.h>
-+
-+	.set noreorder
-+
-+	.globl _start
-+	.text
-+_start:
-+	.word JZ4740_NANDBOOT_CFG /* fetched during NAND Boot */
-+reset:
-+	/*
-+	 * STATUS register
-+	 * CU0=UM=EXL=IE=0, BEV=ERL=1, IP2~7=1
-+	 */
-+	li	t0, 0x0040FC04
-+	mtc0	t0, CP0_STATUS
-+	/*
-+	 * CAUSE register
-+	 * IV=1, use the specical interrupt vector (0x200)
-+	 */
-+	li	t1, 0x00800000
-+	mtc0	t1, CP0_CAUSE
-+
-+	bal     1f
-+	 nop
-+	.word   _GLOBAL_OFFSET_TABLE_
-+1:
-+	move    gp, ra
-+	lw      t1, 0(ra)
-+	move	gp, t1
-+
-+	la	sp, 0x80004000
-+	la	t9, nand_spl_boot
-+	j	t9
-+	nop
-diff --git a/board/qi/qi_lb60/Makefile b/board/qi/qi_lb60/Makefile
-index 5dae11b..e399246 100644
---- a/board/qi/qi_lb60/Makefile
-+++ b/board/qi/qi_lb60/Makefile
-@@ -22,7 +22,11 @@ include $(TOPDIR)/config.mk
- 
- LIB	= $(obj)lib$(BOARD).o
- 
-+ifeq ($(CONFIG_SPL_BUILD),y)
-+COBJS	:= $(BOARD)-spl.o
-+else
- COBJS	:= $(BOARD).o
-+endif
- 
- SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
- OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
-diff --git a/board/qi/qi_lb60/qi_lb60-spl.c b/board/qi/qi_lb60/qi_lb60-spl.c
-new file mode 100644
-index 0000000..3fe3fa3
---- /dev/null
-+++ b/board/qi/qi_lb60/qi_lb60-spl.c
-@@ -0,0 +1,30 @@
-+/*
-+ * Authors: Xiangfu Liu <xiangfu@openmobilefree.cc>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version
-+ * 3 of the License, or (at your option) any later version.
-+ */
-+
-+#include <common.h>
-+#include <nand.h>
-+#include <asm/io.h>
-+#include <asm/jz4740.h>
-+
-+void nand_spl_boot(void)
-+{
-+	__gpio_as_sdram_16bit_4720();
-+	__gpio_as_uart0();
-+	__gpio_jtag_to_uart0();
-+
-+	serial_init();
-+
-+	pll_init();
-+	sdram_init();
-+
-+	nand_init();
-+
-+	puts("\nQi LB60 SPL: Starting U-Boot ...\n");
-+	nand_boot();
-+}
-diff --git a/board/qi/qi_lb60/qi_lb60.c b/board/qi/qi_lb60/qi_lb60.c
-index d975209..3bd4e2f 100644
---- a/board/qi/qi_lb60/qi_lb60.c
-+++ b/board/qi/qi_lb60/qi_lb60.c
-@@ -1,5 +1,5 @@
- /*
-- * Authors: Xiangfu Liu <xiangfu@sharism.cc>
-+ * Authors: Xiangfu Liu <xiangfu@openmobilefree.net>
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License
-@@ -97,8 +97,10 @@ int board_early_init_f(void)
- /* U-Boot common routines */
- int checkboard(void)
- {
--	printf("Board: Qi LB60 (Ingenic XBurst Jz4740 SoC, Speed %ld MHz)\n",
--	       gd->cpu_clk / 1000000);
-+	printf("Board: Qi LB60 (Ingenic XBurst Jz4740 SoC)\n");
-+	printf(" CPU: %ld\n", gd->cpu_clk);
-+	printf(" MEM: %ld\n", gd->mem_clk);
-+	printf(" DEV: %ld\n", gd->dev_clk);
- 
- 	return 0;
- }
-diff --git a/board/qi/qi_lb60/u-boot-spl.lds b/board/qi/qi_lb60/u-boot-spl.lds
-new file mode 100644
-index 0000000..930537f
---- /dev/null
-+++ b/board/qi/qi_lb60/u-boot-spl.lds
-@@ -0,0 +1,61 @@
-+/*
-+ * (C) Copyright 2012 Xiangfu Liu <xiangfu@openmobilefree.net>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ * MA 02111-1307 USA
-+ */
-+
-+OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradlittlemips", "elf32-tradlittlemips")
-+
-+OUTPUT_ARCH(mips)
-+ENTRY(_start)
-+SECTIONS
-+{
-+	. = 0x80000000;
-+	. = ALIGN(4);
-+	.text :
-+	{
-+	  *(.text)
-+	}
-+
-+	. = ALIGN(4);
-+	.rodata  : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-+
-+	. = ALIGN(4);
-+	.data  : { *(.data) }
-+
-+	. = ALIGN(4);
-+	.sdata  : { *(.sdata) }
-+
-+	_gp = ALIGN(16);
-+
-+	__got_start = .;
-+	.got  : { *(.got) }
-+	__got_end = .;
-+
-+	. = .;
-+	__u_boot_cmd_start = .;
-+	.u_boot_cmd : { *(.u_boot_cmd) }
-+	__u_boot_cmd_end = .;
-+
-+	uboot_end_data = .;
-+	num_got_entries = (__got_end - __got_start) >> 2;
-+
-+	. = ALIGN(4);
-+	.sbss  : { *(.sbss) }
-+	.bss  : { *(.bss) }
-+	uboot_end = .;
-+}
-+ASSERT(uboot_end <= 0x80002000, "NAND bootstrap too big");
-diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
-index 3ec34f3..24a4921 100644
---- a/drivers/mtd/nand/jz4740_nand.c
-+++ b/drivers/mtd/nand/jz4740_nand.c
-@@ -15,6 +15,9 @@
- #include <asm/io.h>
- #include <asm/jz4740.h>
- 
-+#ifdef CONFIG_SPL_BUILD
-+#define printf(s) puts(s)
-+#endif
- #define JZ_NAND_DATA_ADDR ((void __iomem *)0xB8000000)
- #define JZ_NAND_CMD_ADDR (JZ_NAND_DATA_ADDR + 0x8000)
- #define JZ_NAND_ADDR_ADDR (JZ_NAND_DATA_ADDR + 0x10000)
-@@ -176,7 +179,7 @@ static int jz_nand_rs_correct_data(struct mtd_info *mtd, u_char *dat,
- 		for (k = 0; k < 9; k++)
- 			writeb(read_ecc[k], &emc->nfpar[k]);
- 	}
--	/* Set PRDY */
-+
- 	writel(readl(&emc->nfecr) | EMC_NFECR_PRDY, &emc->nfecr);
- 
- 	/* Wait for completion */
-@@ -184,7 +187,7 @@ static int jz_nand_rs_correct_data(struct mtd_info *mtd, u_char *dat,
- 		status = readl(&emc->nfints);
- 	} while (!(status & EMC_NFINTS_DECF));
- 
--	/* disable ecc */
-+	/* Disable ECC */
- 	writel(readl(&emc->nfecr) & ~EMC_NFECR_ECCE, &emc->nfecr);
- 
- 	/* Check decoding */
-@@ -192,7 +195,7 @@ static int jz_nand_rs_correct_data(struct mtd_info *mtd, u_char *dat,
- 		return 0;
- 
- 	if (status & EMC_NFINTS_UNCOR) {
--		printf("uncorrectable ecc\n");
-+		printf("JZ4740 uncorrectable ECC\n");
- 		return -1;
- 	}
- 
-@@ -230,6 +233,32 @@ static int jz_nand_rs_correct_data(struct mtd_info *mtd, u_char *dat,
- 	return errcnt;
- }
- 
-+#ifdef CONFIG_SPL_BUILD
-+static void jz_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
-+{
-+	int i;
-+	struct nand_chip *this = mtd->priv;
-+
-+#if (JZ4740_NANDBOOT_CFG == JZ4740_NANDBOOT_B16R3) || \
-+	(JZ4740_NANDBOOT_CFG == JZ4740_NANDBOOT_B16R2)
-+	for (i = 0; i < len; i += 2)
-+		buf[i] = readw(this->IO_ADDR_R);
-+#elif (JZ4740_NANDBOOT_CFG == JZ4740_NANDBOOT_B8R3) || \
-+	(JZ4740_NANDBOOT_CFG == JZ4740_NANDBOOT_B8R2)
-+	for (i = 0; i < len; i++)
-+		buf[i] = readb(this->IO_ADDR_R);
-+#else
-+	#error JZ4740_NANDBOOT_CFG not defined or wrong
-+#endif
-+}
-+
-+static uint8_t jz_nand_read_byte(struct mtd_info *mtd)
-+{
-+	struct nand_chip *this = mtd->priv;
-+	return readb(this->IO_ADDR_R);
-+}
-+#endif
-+
- /*
-  * Main initialization routine
-  */
-@@ -254,6 +283,10 @@ int board_nand_init(struct nand_chip *nand)
- 	nand->ecc.size		= CONFIG_SYS_NAND_ECCSIZE;
- 	nand->ecc.bytes		= CONFIG_SYS_NAND_ECCBYTES;
- 	nand->ecc.layout	= &qi_lb60_ecclayout_2gb;
-+#ifdef CONFIG_SPL_BUILD
-+	nand->read_byte		= jz_nand_read_byte;
-+	nand->read_buf		= jz_nand_read_buf;
-+#endif
- 	nand->chip_delay	= 50;
- 	nand->options		= NAND_USE_FLASH_BBT;
- 
-diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h
-index 4bb5bbc..7bff444 100644
---- a/include/configs/qi_lb60.h
-+++ b/include/configs/qi_lb60.h
-@@ -1,5 +1,5 @@
- /*
-- * Authors: Xiangfu Liu <xiangfu.z@gmail.com>
-+ * Authors: Xiangfu Liu <xiangfu@openmobilefree.net>
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License
-@@ -14,7 +14,6 @@
- #define CONFIG_SYS_LITTLE_ENDIAN
- #define CONFIG_JZSOC		/* Jz SoC */
- #define CONFIG_JZ4740		/* Jz4740 SoC */
--#define CONFIG_NAND_JZ4740
- 
- #define CONFIG_SYS_CPU_SPEED	336000000	/* CPU clock: 336 MHz */
- #define CONFIG_SYS_EXTAL	12000000	/* EXTAL freq: 12 MHz */
-@@ -24,24 +23,43 @@
- #define CONFIG_SYS_UART_BASE	JZ4740_UART0_BASE /* Base of the UART channel */
- #define CONFIG_BAUDRATE		57600
- 
-+#define CONFIG_BOOTP_MASK	(CONFIG_BOOTP_DEFAUL)
-+#define CONFIG_BOOTDELAY	0
-+#define CONFIG_BOOTARGS "mem=32M console=tty0 console=ttyS0,57600n8 ubi.mtd=2 rootfstype=ubifs root=ubi0:rootfs rw rootwait"
-+#define CONFIG_BOOTCOMMAND	"nand read 0x80600000 0x400000 0x280000;bootm"
-+
-+/*
-+ * Miscellaneous configurable options
-+ */
-+#define CONFIG_SYS_SDRAM_BASE		0x80000000	/* Cached addr */
-+#define CONFIG_SYS_INIT_SP_OFFSET	0x400000
-+#define CONFIG_SYS_LOAD_ADDR		0x80600000
-+#define CONFIG_SYS_MEMTEST_START	0x80100000
-+#define CONFIG_SYS_MEMTEST_END		0x80A00000
-+#define CONFIG_SYS_TEXT_BASE		0x80100000
-+#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
-+
-+#define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
-+#define CONFIG_SYS_BOOTPARAMS_LEN	(128 * 1024)
-+
-+#define CONFIG_SYS_CBSIZE	256 /* Console I/O Buffer Size */
-+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
-+
-+#define CONFIG_SYS_LONGHELP
-+#define CONFIG_SYS_MAXARGS	16
-+#define CONFIG_SYS_PROMPT	"NanoNote# "
-+
- #define CONFIG_SKIP_LOWLEVEL_INIT
- #define CONFIG_BOARD_EARLY_INIT_F
- #define CONFIG_SYS_NO_FLASH
- #define CONFIG_SYS_FLASH_BASE	0 /* init flash_base as 0 */
--#define CONFIG_ENV_OVERWRITE
--
--#define CONFIG_BOOTP_MASK	(CONFIG_BOOTP_DEFAUL)
--#define CONFIG_BOOTDELAY	0
--#define CONFIG_BOOTARGS		"mem=32M console=tty0 console=ttyS0,57600n8 ubi.mtd=2 rootfstype=ubifs root=ubi0:rootfs rw rootwait"
--#define CONFIG_BOOTCOMMAND	"nand read 0x80600000 0x400000 0x200000;bootm"
- 
- /*
-- * Command line configuration.
-+ * Command line configuration
-  */
- #define CONFIG_CMD_BOOTD	/* bootd			*/
- #define CONFIG_CMD_CONSOLE	/* coninfo			*/
- #define CONFIG_CMD_ECHO		/* echo arguments		*/
--
- #define CONFIG_CMD_LOADB	/* loadb			*/
- #define CONFIG_CMD_LOADS	/* loads			*/
- #define CONFIG_CMD_MEMORY	/* md mm nm mw cp cmp crc base loop mtest */
-@@ -58,45 +76,16 @@
- #define CONFIG_LOADS_ECHO	1	/* echo on for serial download */
- 
- /*
-- * Miscellaneous configurable options
-- */
--#define CONFIG_SYS_MAXARGS 16
--#define CONFIG_SYS_LONGHELP
--#define CONFIG_SYS_PROMPT "NanoNote# "
--#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
--#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
--
--#define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
--#define CONFIG_SYS_BOOTPARAMS_LEN	(128 * 1024)
--
--#define CONFIG_SYS_SDRAM_BASE		0x80000000	/* Cached addr */
--#define CONFIG_SYS_INIT_SP_OFFSET	0x400000
--#define CONFIG_SYS_LOAD_ADDR		0x80600000
--#define CONFIG_SYS_MEMTEST_START	0x80100000
--#define CONFIG_SYS_MEMTEST_END		0x80800000
--
--/*
-- * Environment
-+ * NAND driver configuration
-  */
--#define CONFIG_ENV_IS_IN_NAND		/* use NAND for environment vars */
--
--#define CONFIG_SYS_NAND_5_ADDR_CYCLE
--/*
-- * if board nand flash is 1GB, set to 1
-- * if board nand flash is 2GB, set to 2
-- * for change the PAGE_SIZE and BLOCK_SIZE
-- * will delete when there is no 1GB flash
-- */
--#define NANONOTE_NAND_SIZE	2
--
--#define CONFIG_SYS_NAND_PAGE_SIZE	(2048 * NANONOTE_NAND_SIZE)
--#define CONFIG_SYS_NAND_BLOCK_SIZE	(256 * NANONOTE_NAND_SIZE << 10)
--/* nand bad block was marked at this page in a block, start from 0 */
-+#define CONFIG_NAND_JZ4740
-+#define CONFIG_SYS_NAND_PAGE_SIZE	4096
-+#define CONFIG_SYS_NAND_BLOCK_SIZE	(512 << 10)
-+/* NAND bad block was marked at this page in a block, start from 0 */
- #define CONFIG_SYS_NAND_BADBLOCK_PAGE	127
- #define CONFIG_SYS_NAND_PAGE_COUNT	128
- #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0
--/* ECC offset position in oob area, default value is 6 if it isn't defined */
--#define CONFIG_SYS_NAND_ECC_POS		(6 * NANONOTE_NAND_SIZE)
-+#define CONFIG_SYS_NAND_ECC_POS		12
- #define CONFIG_SYS_NAND_ECCSIZE		512
- #define CONFIG_SYS_NAND_ECCBYTES	9
- #define CONFIG_SYS_NAND_ECCPOS		\
-@@ -115,10 +104,9 @@
- #define CONFIG_SYS_ONENAND_BASE		CONFIG_SYS_NAND_BASE
- #define CONFIG_SYS_MAX_NAND_DEVICE	1
- #define CONFIG_SYS_NAND_SELECT_DEVICE	1 /* nand driver supports mutipl.*/
--#define CONFIG_NAND_SPL_TEXT_BASE	0x80000000
- 
- /*
-- * IPL (Initial Program Loader, integrated inside CPU)
-+ * IPL (Initial Program Loader, integrated inside Ingenic Xburst JZ4740 CPU)
-  * Will load first 8k from NAND (SPL) into cache and execute it from there.
-  *
-  * SPL (Secondary Program Loader)
-@@ -130,77 +118,88 @@
-  * NUB (NAND U-Boot)
-  * This NAND U-Boot (NUB) is a special U-Boot version which can be started
-  * from RAM. Therefore it mustn't (re-)configure the SDRAM controller.
-- *
-  */
-+
-+/*
-+ * NAND SPL configuration
-+ */
-+#define CONFIG_SPL
-+#define CONFIG_SPL_LIBGENERIC_SUPPORT
-+#define CONFIG_SPL_LIBCOMMON_SUPPORT
-+#define CONFIG_SPL_NAND_LOAD
-+#define CONFIG_SPL_NAND_SIMPLE
-+#define CONFIG_SPL_NAND_SUPPORT
-+#define CONFIG_SPL_TEXT_BASE	0x80000000
-+#define CONFIG_SPL_START_S_PATH	"arch/mips/cpu/xburst/spl"
-+
-+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
-+#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
-+#define JZ4740_NANDBOOT_CFG		JZ4740_NANDBOOT_B8R3
-+
- #define CONFIG_SYS_NAND_U_BOOT_DST	0x80100000 /* Load NUB to this addr */
- #define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_NAND_U_BOOT_DST
--/* Start NUB from this addr*/
-+					/* Start NUB from this addr */
-+#define CONFIG_SYS_NAND_U_BOOT_OFFS (32  << 10) /* Offset of NUB */
-+#define CONFIG_SYS_NAND_U_BOOT_SIZE (256 << 10) /* Size of NUB */
- 
- /*
-- * Define the partitioning of the NAND chip (only RAM U-Boot is needed here)
-+ * Environment configuration
-  */
--#define CONFIG_SYS_NAND_U_BOOT_OFFS (256 << 10) /* Offset to RAM U-Boot image */
--#define CONFIG_SYS_NAND_U_BOOT_SIZE (512 << 10) /* Size of RAM U-Boot image */
--
-+#define CONFIG_ENV_OVERWRITE
-+#define CONFIG_ENV_IS_IN_NAND
- #define CONFIG_ENV_SIZE		(4 << 10)
- #define CONFIG_ENV_OFFSET	\
- 	(CONFIG_SYS_NAND_BLOCK_SIZE + CONFIG_SYS_NAND_U_BOOT_SIZE)
- #define CONFIG_ENV_OFFSET_REDUND \
- 	(CONFIG_ENV_OFFSET  + CONFIG_SYS_NAND_BLOCK_SIZE)
- 
--#define CONFIG_SYS_TEXT_BASE	0x80100000
--#define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE
--
- /*
-- * SDRAM Info.
-+ * CPU cache configuration
-  */
--#define CONFIG_NR_DRAM_BANKS	1
-+#define CONFIG_SYS_DCACHE_SIZE		16384
-+#define CONFIG_SYS_ICACHE_SIZE		16384
-+#define CONFIG_SYS_CACHELINE_SIZE	32
- 
- /*
-- * Cache Configuration
-+ * SDRAM configuration
-  */
--#define CONFIG_SYS_DCACHE_SIZE	16384
--#define CONFIG_SYS_ICACHE_SIZE	16384
--#define CONFIG_SYS_CACHELINE_SIZE	32
-+#define CONFIG_NR_DRAM_BANKS	1
-+
-+#define SDRAM_BW16		1	/* Data bus width: 0-32bit, 1-16bit */
-+#define SDRAM_BANK4		1	/* Banks each chip: 0-2bank, 1-4bank */
-+#define SDRAM_ROW		13	/* Row address: 11 to 13 */
-+#define SDRAM_COL		9	/* Column address: 8 to 12 */
-+#define SDRAM_CASL		2	/* CAS latency: 2 or 3 */
-+#define SDRAM_TRAS		45	/* RAS# Active Time */
-+#define SDRAM_RCD		20	/* RAS# to CAS# Delay */
-+#define SDRAM_TPC		20	/* RAS# Precharge Time */
-+#define SDRAM_TRWL		7	/* Write Latency Time */
-+#define SDRAM_TREF		15625	/* Refresh period: 8192 cycles/64ms */
- 
- /*
-- * GPIO definition
-+ * GPIO configuration
-  */
--#define GPIO_LCD_CS	(2 * 32 + 21)
--#define GPIO_AMP_EN	(3 * 32 + 4)
-+#define GPIO_LCD_CS		(2 * 32 + 21)
-+#define GPIO_AMP_EN		(3 * 32 + 4)
- 
--#define GPIO_SDPW_EN	(3 * 32 + 2)
--#define GPIO_SD_DETECT	(3 * 32 + 0)
-+#define GPIO_SDPW_EN		(3 * 32 + 2)
-+#define GPIO_SD_DETECT		(3 * 32 + 0)
- 
--#define GPIO_BUZZ_PWM	(3 * 32 + 27)
--#define GPIO_USB_DETECT	(3 * 32 + 28)
-+#define GPIO_BUZZ_PWM		(3 * 32 + 27)
-+#define GPIO_USB_DETECT		(3 * 32 + 28)
- 
--#define GPIO_AUDIO_POP	(1 * 32 + 29)
--#define GPIO_COB_TEST	(1 * 32 + 30)
-+#define GPIO_AUDIO_POP		(1 * 32 + 29)
-+#define GPIO_COB_TEST		(1 * 32 + 30)
- 
- #define GPIO_KEYOUT_BASE	(2 * 32 + 10)
--#define GPIO_KEYIN_BASE	(3 * 32 + 18)
--#define GPIO_KEYIN_8	(3 * 32 + 26)
-+#define GPIO_KEYIN_BASE		(3 * 32 + 18)
-+#define GPIO_KEYIN_8		(3 * 32 + 26)
- 
--#define GPIO_SD_CD_N	GPIO_SD_DETECT		/* SD Card insert detect */
-+#define GPIO_SD_CD_N		GPIO_SD_DETECT	/* SD Card insert detect */
- #define GPIO_SD_VCC_EN_N	GPIO_SDPW_EN	/* SD Card Power Enable */
- 
- #define SPEN	GPIO_LCD_CS	/* LCDCS :Serial command enable      */
- #define SPDA	(2 * 32 + 22)	/* LCDSCL:Serial command clock input */
- #define SPCK	(2 * 32 + 23)	/* LCDSDA:Serial command data input  */
- 
--/* SDRAM paramters */
--#define SDRAM_BW16		1	/* Data bus width: 0-32bit, 1-16bit */
--#define SDRAM_BANK4		1	/* Banks each chip: 0-2bank, 1-4bank */
--#define SDRAM_ROW		13	/* Row address: 11 to 13 */
--#define SDRAM_COL		9	/* Column address: 8 to 12 */
--#define SDRAM_CASL		2	/* CAS latency: 2 or 3 */
--
--/* SDRAM Timings, unit: ns */
--#define SDRAM_TRAS		45	/* RAS# Active Time */
--#define SDRAM_RCD		20	/* RAS# to CAS# Delay */
--#define SDRAM_TPC		20	/* RAS# Precharge Time */
--#define SDRAM_TRWL		7	/* Write Latency Time */
--#define SDRAM_TREF		15625	/* Refresh period: 8192 cycles/64ms */
--
- #endif
--- 
-1.7.9.5
-

+ 0 - 916
package/boot/uboot-xburst/patches/0002-qi_lb60-add-software-usbboot-support.patch

@@ -1,916 +0,0 @@
-From fa51192b912d296b8eec10f7d44c6c17eb1dd368 Mon Sep 17 00:00:00 2001
-From: Xiangfu <xiangfu@openmobilefree.net>
-Date: Fri, 12 Oct 2012 09:47:39 +0800
-Subject: [PATCH 2/6] qi_lb60: add software usbboot support
-
-  JZ4740 CPU have a internal ROM have such kind of code, that make
-  JZ4740 can boot from USB
-
-  usbboot.S can downloads user program from the USB port to internal
-  SRAM and branches to the internal SRAM to execute the program
-
-Signed-off-by: Xiangfu <xiangfu@openmobilefree.net>
----
- board/qi/qi_lb60/Makefile      |    1 +
- board/qi/qi_lb60/qi_lb60-spl.c |   20 +
- board/qi/qi_lb60/usbboot.S     |  838 ++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 859 insertions(+)
- create mode 100644 board/qi/qi_lb60/usbboot.S
-
-diff --git a/board/qi/qi_lb60/Makefile b/board/qi/qi_lb60/Makefile
-index e399246..6dd8c6f 100644
---- a/board/qi/qi_lb60/Makefile
-+++ b/board/qi/qi_lb60/Makefile
-@@ -23,6 +23,7 @@ include $(TOPDIR)/config.mk
- LIB	= $(obj)lib$(BOARD).o
- 
- ifeq ($(CONFIG_SPL_BUILD),y)
-+SOBJS	:= usbboot.o
- COBJS	:= $(BOARD)-spl.o
- else
- COBJS	:= $(BOARD).o
-diff --git a/board/qi/qi_lb60/qi_lb60-spl.c b/board/qi/qi_lb60/qi_lb60-spl.c
-index 3fe3fa3..aea459c 100644
---- a/board/qi/qi_lb60/qi_lb60-spl.c
-+++ b/board/qi/qi_lb60/qi_lb60-spl.c
-@@ -12,6 +12,24 @@
- #include <asm/io.h>
- #include <asm/jz4740.h>
- 
-+#define KEY_U_OUT       (32 * 2 + 16)
-+#define KEY_U_IN        (32 * 3 + 19)
-+
-+extern void usb_boot(void);
-+
-+static void check_usb_boot(void)
-+{
-+	__gpio_as_input(KEY_U_IN);
-+	__gpio_enable_pull(KEY_U_IN);
-+	__gpio_as_output(KEY_U_OUT);
-+	__gpio_clear_pin(KEY_U_OUT);
-+
-+	if (!__gpio_get_pin(KEY_U_IN)) {
-+		puts("[U] pressed, goto USBBOOT mode\n");
-+		usb_boot();
-+	}
-+}
-+
- void nand_spl_boot(void)
- {
- 	__gpio_as_sdram_16bit_4720();
-@@ -23,6 +41,8 @@ void nand_spl_boot(void)
- 	pll_init();
- 	sdram_init();
- 
-+	check_usb_boot();
-+
- 	nand_init();
- 
- 	puts("\nQi LB60 SPL: Starting U-Boot ...\n");
-diff --git a/board/qi/qi_lb60/usbboot.S b/board/qi/qi_lb60/usbboot.S
-new file mode 100644
-index 0000000..c872266
---- /dev/null
-+++ b/board/qi/qi_lb60/usbboot.S
-@@ -0,0 +1,838 @@
-+/*
-+ *  for jz4740 usb boot
-+ *
-+ *  Copyright (c) 2009 Author: <jlwei@ingenic.cn>
-+ *
-+ * See file CREDITS for list of people who contributed to this
-+ * project.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ * MA 02111-1307 USA
-+ */
-+    .set noreorder
-+    .globl usb_boot
-+    .text
-+
-+/*
-+ * Both NAND and USB boot load data to D-Cache first, then transfer
-+ * data from D-Cache to I-Cache, and jump to execute the code in I-Cache.
-+ * So init caches first and then dispatch to a proper boot routine.
-+ */
-+
-+.macro load_addr reg addr
-+	li \reg, 0x80000000
-+	addiu \reg, \reg, \addr
-+	la $2, usbboot_begin
-+	subu \reg, \reg, $2
-+.endm
-+
-+usb_boot:
-+	/* Initialize PLL: set ICLK to 84MHz and HCLK to 42MHz. */
-+	la	$9, 0xB0000000		/* CPCCR: Clock Control Register */
-+	la	$8, 0x42041110		/* I:S:M:P=1:2:2:2 */
-+	sw	$8, 0($9)
-+
-+	la	$9, 0xB0000010		/* CPPCR: PLL Control Register */
-+	la	$8, 0x06000120		/* M=12 N=0 D=0 CLK=12*(M+2)/(N+2) */
-+	sw	$8, 0($9)
-+
-+	mtc0	$0, $26		/* CP0_ERRCTL, restore WST reset state */
-+	nop
-+
-+	mtc0	$0, $16			/* CP0_CONFIG */
-+	nop
-+
-+	/* Relocate code to beginning of the ram */
-+
-+	la $2, usbboot_begin
-+	la $3, usbboot_end
-+	li $4, 0x80000000
-+
-+1:
-+	lw $5, 0($2)
-+	sw $5, 0($4)
-+	addiu $2, $2, 4
-+	bne $2, $3, 1b
-+	addiu $4, $4, 4
-+
-+	li $2, 0x80000000
-+	ori $3, $2, 0
-+	addiu $3, $3, usbboot_end
-+	la $4, usbboot_begin
-+	subu $3, $3, $4
-+
-+
-+2:
-+	cache	0x0, 0($2)		/* Index_Invalidate_I */
-+	cache	0x1, 0($2)		/* Index_Writeback_Inv_D */
-+	addiu	$2, $2, 32
-+	subu $4, $3, $2
-+	bgtz	$4, 2b
-+	nop
-+
-+	load_addr $3, usb_boot_return
-+
-+	jr $3
-+
-+usbboot_begin:
-+
-+init_caches:
-+	li	$2, 3			/* cacheable for kseg0 access */
-+	mtc0	$2, $16			/* CP0_CONFIG */
-+	nop
-+
-+	li	$2, 0x20000000		/* enable idx-store-data cache insn */
-+	mtc0	$2, $26			/* CP0_ERRCTL */
-+
-+	ori	$2, $28, 0		/* start address */
-+	ori	$3, $2, 0x3fe0		/* end address, total 16KB */
-+	mtc0	$0, $28, 0		/* CP0_TAGLO */
-+	mtc0	$0, $28, 1		/* CP0_DATALO */
-+cache_clear_a_line:
-+	cache	0x8, 0($2)		/* Index_Store_Tag_I */
-+	cache	0x9, 0($2)		/* Index_Store_Tag_D */
-+	bne	$2, $3, cache_clear_a_line
-+	addiu	$2, $2, 32		/* increment CACHE_LINE_SIZE */
-+
-+	ori	$2, $28, 0		/* start address */
-+	ori	$3, $2, 0x3fe0		/* end address, total 16KB */
-+	la	$4, 0x1ffff000		/* physical address and 4KB page mask */
-+cache_alloc_a_line:
-+	and	$5, $2, $4
-+	ori	$5, $5, 1		/* V bit of the physical tag */
-+	mtc0	$5, $28, 0		/* CP0_TAGLO */
-+	cache	0x8, 0($2)		/* Index_Store_Tag_I */
-+	cache	0x9, 0($2)		/* Index_Store_Tag_D */
-+	bne	$2, $3, cache_alloc_a_line
-+	addiu	$2, $2, 32		/* increment CACHE_LINE_SIZE */
-+
-+	nop
-+	nop
-+	nop
-+	/*
-+	 * Transfer data from dcache to icache, then jump to icache.
-+	 * Input parameters:
-+	 * $19: data length in bytes
-+	 * $20: jump target address
-+	 */
-+xfer_d2i:
-+
-+	ori	$8, $20, 0
-+	addu	$9, $8, $19		/* total 16KB */
-+
-+1:
-+	cache	0x0, 0($8)		/* Index_Invalidate_I */
-+	cache	0x1, 0($8)		/* Index_Writeback_Inv_D */
-+	bne	$8, $9, 1b
-+	addiu	$8, $8, 32
-+
-+	/* flush write-buffer */
-+	sync
-+
-+	/* Invalidate BTB */
-+	mfc0	$8, $16, 7		/* CP0_CONFIG */
-+	nop
-+	ori	$8, 2
-+	mtc0	$8, $16, 7
-+	nop
-+
-+	/* Overwrite config to disable ram initalisation */
-+	li $2, 0xff
-+	sb $2, 20($20)
-+
-+	jalr	$20
-+	nop
-+
-+icache_return:
-+	/* User code can return to here after executing itself in
-+	  icache, by jumping to $31. */
-+	b	usb_boot_return
-+	nop
-+
-+
-+usb_boot_return:
-+	/* Enable the USB PHY */
-+	la	$9, 0xB0000024		/* CPM_SCR */
-+	lw	$8, 0($9)
-+	ori	$8, 0x40		/* USBPHY_ENABLE */
-+	sw	$8, 0($9)
-+
-+	/* Initialize USB registers */
-+	la	$27, 0xb3040000	/* USB registers base address */
-+
-+	sb	$0, 0x0b($27)	/* INTRUSBE: disable common USB interrupts */
-+	sh	$0, 0x06($27)	/* INTRINE: disable EPIN interrutps */
-+	sh	$0, 0x08($27)	/* INTROUTE: disable EPOUT interrutps */
-+
-+	li	$9, 0x61
-+	sb	$9, 0x01($27)	/* POWER: HSENAB | SUSPENDM | SOFTCONN */
-+
-+	/* Initialize USB states */
-+	li	$22, 0			/* set EP0 to IDLE state */
-+	li	$23, 1			/* no data stage */
-+
-+	/* Main loop of polling the usb commands */
-+usb_command_loop:
-+	lbu	$9, 0x0a($27)		/* read INTRUSB */
-+	andi	$9, 0x04		/* check USB_INTR_RESET */
-+	beqz	$9, check_intr_ep0in
-+	nop
-+
-+ 	/* 1. Handle USB reset interrupt */
-+handle_reset_intr:
-+	lbu	$9, 0x01($27)		/* read POWER */
-+	andi	$9, 0x10		/* test HS_MODE */
-+	bnez	$9, _usb_set_maxpktsize
-+	li	$9, 512			/* max packet size of HS mode */
-+	li	$9, 64			/* max packet size of FS mode */
-+
-+_usb_set_maxpktsize:
-+	li	$8, 1
-+	sb	$8, 0x0e($27)		/* set INDEX 1 */
-+
-+	sh	$9, 0x10($27)		/* INMAXP */
-+	sb	$0, 0x13($27)		/* INCSRH */
-+	sh	$9, 0x14($27)		/* OUTMAXP */
-+	sb	$0, 0x17($27)		/* OUTCSRH */
-+
-+_usb_flush_fifo:
-+	li	$8, 0x48		/* INCSR_CDT && INCSR_FF */
-+	sb	$8, 0x12($27)		/* INCSR */
-+	li	$8, 0x90		/* OUTCSR_CDT && OUTCSR_FF */
-+	sb	$8, 0x16($27)		/* OUTCSR */
-+
-+	li	$22, 0			/* set EP0 to IDLE state */
-+	li	$23, 1			/* no data stage */
-+
-+	/* 2. Check and handle EP0 interrupt */
-+check_intr_ep0in:
-+	lhu	$10, 0x02($27)		/* read INTRIN */
-+	andi	$9, $10, 0x1		/* check EP0 interrupt */
-+	beqz	$9, check_intr_ep1in
-+	nop
-+
-+handle_ep0_intr:
-+	sb	$0, 0x0e($27)		/* set INDEX 0 */
-+	lbu	$11, 0x12($27)		/* read CSR0 */
-+
-+	andi	$9, $11, 0x04		/* check SENTSTALL */
-+	beqz	$9, _ep0_setupend
-+	nop
-+
-+_ep0_sentstall:
-+	andi	$9, $11, 0xdb
-+	sb	$9, 0x12($27)		/* clear SENDSTALL and SENTSTALL */
-+	li	$22, 0			/* set EP0 to IDLE state */
-+
-+_ep0_setupend:
-+	andi	$9, $11, 0x10		/* check SETUPEND */
-+	beqz	$9, ep0_idle_state
-+	nop
-+
-+	ori	$9, $11, 0x80
-+	sb	$9, 0x12($27)		/* set SVDSETUPEND */
-+	li	$22, 0			/* set EP0 to IDLE state */
-+
-+ep0_idle_state:
-+	bnez	$22, ep0_tx_state
-+	nop
-+
-+	/* 2.1 Handle EP0 IDLE state interrupt */
-+	andi	$9, $11, 0x01		/* check OUTPKTRDY */
-+	beqz	$9, check_intr_ep1in
-+	nop
-+
-+	/* Read 8-bytes setup packet from the FIFO */
-+	lw	$25, 0x20($27)		/* first word of setup packet */
-+	lw	$26, 0x20($27)		/* second word of setup packet */
-+
-+	andi	$9, $25, 0x60		/* bRequestType & USB_TYPE_MASK */
-+	beqz	$9, _ep0_std_req
-+	nop
-+
-+	/* 2.1.1 Vendor-specific setup request */
-+_ep0_vend_req:
-+	li	$22, 0			/* set EP0 to IDLE state */
-+	li	$23, 1			/* NoData = 1 */
-+
-+	andi	$9, $25, 0xff00		/* check bRequest */
-+	srl	$9, $9, 8
-+	beqz	$9, __ep0_get_cpu_info
-+	sub	$8, $9, 0x1
-+	beqz	$8, __ep0_set_data_address
-+	sub	$8, $9, 0x2
-+	beqz	$8, __ep0_set_data_length
-+	sub	$8, $9, 0x3
-+	beqz	$8, __ep0_flush_caches
-+	sub	$8, $9, 0x4
-+	beqz	$8, __ep0_prog_start1
-+	sub	$8, $9, 0x5
-+	beqz	$8, __ep0_prog_start2
-+	nop
-+	b	_ep0_idle_state_fini	/* invalid request */
-+	nop
-+
-+__ep0_get_cpu_info:
-+	load_addr $20, cpu_info_data	/* data pointer to transfer */
-+	li	$21, 8			/* bytes left to transfer */
-+	li	$22, 1			/* set EP0 to TX state */
-+	li	$23, 0			/* NoData = 0 */
-+
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+__ep0_set_data_address:
-+	li	$9, 0xffff0000
-+	and	$9, $25, $9
-+	andi	$8, $26, 0xffff
-+	or	$20, $9, $8		/* data address of next transfer */
-+
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+__ep0_set_data_length:
-+	li	$9, 0xffff0000
-+	and	$9, $25, $9
-+	andi	$8, $26, 0xffff
-+	or	$21, $9, $8		/* data length of next transfer */
-+
-+	li	$9, 0x48		/* SVDOUTPKTRDY and DATAEND */
-+	sb	$9, 0x12($27)		/* CSR0 */
-+
-+	/* We must write packet to FIFO before EP1-IN interrupt here. */
-+	b	handle_epin1_intr
-+	nop
-+
-+__ep0_flush_caches:
-+	/* Flush dcache and invalidate icache. */
-+	li	$8, 0x80000000
-+	addi	$9, $8, 0x3fe0		/* total 16KB */
-+
-+1:
-+	cache	0x0, 0($8)		/* Index_Invalidate_I */
-+	cache	0x1, 0($8)		/* Index_Writeback_Inv_D */
-+	bne	$8, $9, 1b
-+	addiu	$8, $8, 32
-+
-+	/* flush write-buffer */
-+	sync
-+
-+	/* Invalidate BTB */
-+	mfc0	$8, $16, 7		/* CP0_CONFIG */
-+	nop
-+	ori	$8, 2
-+	mtc0	$8, $16, 7
-+	nop
-+
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+__ep0_prog_start1:
-+	li	$9, 0x48		/* SVDOUTPKTRDY and DATAEND */
-+	sb	$9, 0x12($27)		/* CSR0 */
-+
-+	li	$9, 0xffff0000
-+	and	$9, $25, $9
-+	andi	$8, $26, 0xffff
-+	or	$20, $9, $8		/* target address */
-+
-+	b	xfer_d2i
-+	li	$19, 0x2000		/* 16KB data length */
-+
-+__ep0_prog_start2:
-+	li	$9, 0x48		/* SVDOUTPKTRDY and DATAEND */
-+	sb	$9, 0x12($27)		/* CSR0 */
-+
-+	li	$9, 0xffff0000
-+	and	$9, $25, $9
-+	andi	$8, $26, 0xffff
-+	or	$20, $9, $8		/* target address */
-+
-+	jalr	$20		/* jump, and place the return address in $31 */
-+	nop
-+
-+__ep0_prog_start2_return:
-+/* User code can return to here after executing itself, by jumping to $31 */
-+	b	usb_boot_return
-+	nop
-+
-+	/* 2.1.2 Standard setup request */
-+_ep0_std_req:
-+	andi	$12, $25, 0xff00	/* check bRequest */
-+	srl	$12, $12, 8
-+	sub	$9, $12, 0x05		/* check USB_REQ_SET_ADDRESS */
-+	bnez	$9, __ep0_req_set_config
-+	nop
-+
-+	/* Handle USB_REQ_SET_ADDRESS */
-+__ep0_req_set_addr:
-+	srl	$9, $25, 16		/* get wValue */
-+	sb	$9, 0x0($27)		/* set FADDR */
-+	li	$23, 1			/* NoData = 1 */
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+__ep0_req_set_config:
-+	sub	$9, $12, 0x09		/* check USB_REQ_SET_CONFIGURATION */
-+	bnez	$9, __ep0_req_get_desc
-+	nop
-+
-+	/* Handle USB_REQ_SET_CONFIGURATION */
-+	li	$23, 1			/* NoData = 1 */
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+__ep0_req_get_desc:
-+	sub	$9, $12, 0x06		/* check USB_REQ_GET_DESCRIPTOR */
-+	bnez	$9, _ep0_idle_state_fini
-+	li	$23, 1			/* NoData = 1 */
-+
-+	/* Handle USB_REQ_GET_DESCRIPTOR */
-+	li	$23, 0			/* NoData = 0 */
-+
-+	srl	$9, $25, 24		/* wValue >> 8 */
-+	sub	$8, $9, 0x01		/* check USB_DT_DEVICE */
-+	beqz	$8, ___ep0_get_dev_desc
-+	srl	$21, $26, 16		/* get wLength */
-+	sub	$8, $9, 0x02		/* check USB_DT_CONFIG */
-+	beqz	$8, ___ep0_get_conf_desc
-+	sub	$8, $9, 0x03		/* check USB_DT_STRING */
-+	beqz	$8, ___ep0_get_string_desc
-+	sub	$8, $9, 0x06		/* check USB_DT_DEVICE_QUALIFIER */
-+	beqz	$8, ___ep0_get_dev_qualifier
-+	nop
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+___ep0_get_dev_desc:
-+	load_addr	$20, device_desc	/* data pointer */
-+	li	$22, 1			/* set EP0 to TX state */
-+	sub	$8, $21, 18
-+	blez	$8, _ep0_idle_state_fini /* wLength <= 18 */
-+	nop
-+	li	$21, 18			/* max length of device_desc */
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+___ep0_get_dev_qualifier:
-+	load_addr	$20, dev_qualifier	/* data pointer */
-+	li	$22, 1			/* set EP0 to TX state */
-+	sub	$8, $21, 10
-+	blez	$8, _ep0_idle_state_fini /* wLength <= 10 */
-+	nop
-+	li	$21, 10			/* max length of dev_qualifier */
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+___ep0_get_conf_desc:
-+	load_addr	$20, config_desc_fs	/* data pointer of FS mode */
-+	lbu	$8, 0x01($27)		/* read POWER */
-+	andi	$8, 0x10		/* test HS_MODE */
-+	beqz	$8, ___ep0_get_conf_desc2
-+	nop
-+	load_addr $20, config_desc_hs	/* data pointer of HS mode */
-+
-+___ep0_get_conf_desc2:
-+	li	$22, 1			/* set EP0 to TX state */
-+	sub	$8, $21, 32
-+	blez	$8, _ep0_idle_state_fini /* wLength <= 32 */
-+	nop
-+	li	$21, 32			/* max length of config_desc */
-+	b	_ep0_idle_state_fini
-+	nop
-+
-+___ep0_get_string_desc:
-+	li	$22, 1			/* set EP0 to TX state */
-+
-+	srl	$9, $25, 16		/* wValue & 0xff */
-+	andi	$9, 0xff
-+
-+	sub	$8, $9, 1
-+	beqz	$8, ___ep0_get_string_manufacture
-+	sub	$8, $9, 2
-+	beqz	$8, ___ep0_get_string_product
-+	nop
-+
-+___ep0_get_string_lang_ids:
-+	load_addr	$20, string_lang_ids	/* data pointer */
-+	b	_ep0_idle_state_fini
-+	li	$21, 4			/* data length */
-+
-+___ep0_get_string_manufacture:
-+	load_addr	$20, string_manufacture	/* data pointer */
-+	b	_ep0_idle_state_fini
-+	li	$21, 16			/* data length */
-+
-+___ep0_get_string_product:
-+	load_addr	$20, string_product	/* data pointer */
-+	b	_ep0_idle_state_fini
-+	li	$21, 46			/* data length */
-+
-+_ep0_idle_state_fini:
-+	li	$9, 0x40		/* SVDOUTPKTRDY */
-+	beqz	$23, _ep0_idle_state_fini2
-+	nop
-+	ori	$9, $9, 0x08		/* DATAEND */
-+_ep0_idle_state_fini2:
-+	sb	$9, 0x12($27)		/* CSR0 */
-+	beqz	$22, check_intr_ep1in
-+	nop
-+
-+	/* 2.2 Handle EP0 TX state interrupt */
-+ep0_tx_state:
-+	sub	$9, $22, 1
-+	bnez	$9, check_intr_ep1in
-+	nop
-+
-+	sub	$9, $21, 64		/* max packetsize */
-+	blez	$9, _ep0_tx_state2	/* data count <= 64 */
-+	ori	$19, $21, 0
-+	li	$19, 64
-+
-+_ep0_tx_state2:
-+	beqz	$19, _ep0_tx_state3	/* send ZLP */
-+	ori	$18, $19, 0		/* record bytes to be transferred */
-+	sub	$21, $21, $19		/* decrement data count */
-+
-+_ep0_fifo_write_loop:
-+	lbu	$9, 0($20)		/* read data */
-+	sb	$9, 0x20($27)		/* load FIFO */
-+	sub	$19, $19, 1		/* decrement counter */
-+	bnez	$19, _ep0_fifo_write_loop
-+	addi	$20, $20, 1		/* increment data pointer */
-+
-+	sub	$9, $18, 64		/* max packetsize */
-+	beqz	$9, _ep0_tx_state4
-+	nop
-+
-+_ep0_tx_state3:
-+	/* transferred bytes < max packetsize */
-+	li	$9, 0x0a		/* set INPKTRDY and DATAEND */
-+	sb	$9, 0x12($27)		/* CSR0 */
-+	li	$22, 0			/* set EP0 to IDLE state */
-+	b	check_intr_ep1in
-+	nop
-+
-+_ep0_tx_state4:
-+	/* transferred bytes == max packetsize */
-+	li	$9, 0x02		/* set INPKTRDY */
-+	sb	$9, 0x12($27)		/* CSR0 */
-+	b	check_intr_ep1in
-+	nop
-+
-+	/* 3. Check and handle EP1 BULK-IN interrupt */
-+check_intr_ep1in:
-+	andi	$9, $10, 0x2		/* check EP1 IN interrupt */
-+	beqz	$9, check_intr_ep1out
-+	nop
-+
-+handle_epin1_intr:
-+	li	$9, 1
-+	sb	$9, 0x0e($27)		/* set INDEX 1 */
-+	lbu	$9, 0x12($27)		/* read INCSR */
-+
-+	andi	$8, $9, 0x2		/* check INCSR_FFNOTEMPT */
-+	bnez	$8, _epin1_tx_state4
-+	nop
-+
-+_epin1_write_fifo:
-+	lhu	$9, 0x10($27)		/* get INMAXP */
-+	sub	$8, $21, $9
-+	blez	$8, _epin1_tx_state1	/* bytes left <= INMAXP */
-+	ori	$19, $21, 0
-+	ori	$19, $9, 0
-+
-+_epin1_tx_state1:
-+	beqz	$19, _epin1_tx_state4	/* No data */
-+	nop
-+
-+	sub	$21, $21, $19		/* decrement data count */
-+
-+	srl	$5, $19, 2		/* # of word */
-+	andi	$6, $19, 0x3		/* # of byte */
-+	beqz	$5, _epin1_tx_state2
-+	nop
-+
-+_epin1_fifo_write_word:
-+	lw	$9, 0($20)		/* read data from source address */
-+	sw	$9, 0x24($27)		/* write FIFO */
-+	sub	$5, $5, 1		/* decrement counter */
-+	bnez	$5, _epin1_fifo_write_word
-+	addiu	$20, $20, 4		/* increment dest address */
-+
-+_epin1_tx_state2:
-+	beqz	$6, _epin1_tx_state3
-+	nop
-+
-+_epin1_fifo_write_byte:
-+	lbu	$9, 0($20)		/* read data from source address */
-+	sb	$9, 0x24($27)		/* write FIFO */
-+	sub	$6, $6, 1		/* decrement counter */
-+	bnez	$6, _epin1_fifo_write_byte
-+	addiu	$20, $20, 1		/* increment dest address */
-+
-+_epin1_tx_state3:
-+	li	$9, 0x1
-+	sb	$9, 0x12($27)		/* INCSR, set INPKTRDY */
-+
-+_epin1_tx_state4:
-+	/* 4. Check and handle EP1 BULK-OUT interrupt */
-+check_intr_ep1out:
-+	lhu	$9, 0x04($27)		/* read INTROUT */
-+	andi	$9, 0x2
-+	beqz	$9, check_status_next
-+	nop
-+
-+handle_epout1_intr:
-+	li	$9, 1
-+	sb	$9, 0x0e($27)		/* set INDEX 1 */
-+
-+	lbu	$9, 0x16($27)		/* read OUTCSR */
-+	andi	$9, 0x1			/* check OUTPKTRDY */
-+	beqz	$9, check_status_next
-+	nop
-+
-+_epout1_read_fifo:
-+	lhu	$19, 0x18($27)		/* read OUTCOUNT */
-+	srl	$5, $19, 2		/* # of word */
-+	andi	$6, $19, 0x3		/* # of byte */
-+	beqz	$5, _epout1_rx_state1
-+	nop
-+
-+_epout1_fifo_read_word:
-+	lw	$9, 0x24($27)		/* read FIFO */
-+	sw	$9, 0($20)		/* store to dest address */
-+	sub	$5, $5, 1		/* decrement counter */
-+	bnez	$5, _epout1_fifo_read_word
-+	addiu	$20, $20, 4		/* increment dest address */
-+
-+_epout1_rx_state1:
-+	beqz	$6, _epout1_rx_state2
-+	nop
-+
-+_epout1_fifo_read_byte:
-+	lbu	$9, 0x24($27)		/* read FIFO */
-+	sb	$9, 0($20)		/* store to dest address */
-+	sub	$6, $6, 1		/* decrement counter */
-+	bnez	$6, _epout1_fifo_read_byte
-+	addiu	$20, $20, 1		/* increment dest address */
-+
-+_epout1_rx_state2:
-+	sb	$0, 0x16($27)		/* clear OUTPKTRDY */
-+
-+check_status_next:
-+	b	usb_command_loop
-+	nop
-+
-+/* Device/Configuration/Interface/Endpoint/String Descriptors */
-+
-+	.align	2
-+device_desc:
-+	.byte	0x12		/* bLength */
-+	.byte	0x01		/* bDescriptorType */
-+	.byte	0x00		/* bcdUSB */
-+	.byte	0x02		/* bcdUSB */
-+	.byte	0x00		/* bDeviceClass */
-+	.byte	0x00		/* bDeviceSubClass */
-+	.byte	0x00		/* bDeviceProtocol */
-+	.byte	0x40		/* bMaxPacketSize0 */
-+	.byte	0x1a		/* idVendor */
-+	.byte	0x60		/* idVendor */
-+	.byte	0x40		/* idProduct */
-+	.byte	0x47		/* idProduct */
-+	.byte	0x00		/* bcdDevice */
-+	.byte	0x01		/* bcdDevice */
-+	.byte	0x01		/* iManufacturer */
-+	.byte	0x02		/* iProduct */
-+	.byte	0x00		/* iSerialNumber */
-+	.byte	0x01		/* bNumConfigurations */
-+
-+	.align	2
-+dev_qualifier:
-+	.byte	0x0a		/* bLength */
-+	.byte	0x06		/* bDescriptorType */
-+	.byte	0x00		/* bcdUSB */
-+	.byte	0x02		/* bcdUSB */
-+	.byte	0x00		/* bDeviceClass */
-+	.byte	0x00		/* bDeviceSubClass */
-+	.byte	0x00		/* bDeviceProtocol */
-+	.byte	0x40		/* bMaxPacketSize0 */
-+	.byte	0x01		/* bNumConfigurations */
-+	.byte	0x00		/* bRESERVED */
-+
-+	.align	2
-+config_desc_hs:
-+	.byte	0x09		/* bLength */
-+	.byte	0x02		/* bDescriptorType */
-+	.byte	0x20		/* wTotalLength */
-+	.byte	0x00		/* wTotalLength */
-+	.byte	0x01		/* bNumInterfaces */
-+	.byte	0x01		/* bConfigurationValue */
-+	.byte	0x00		/* iConfiguration */
-+	.byte	0xc0		/* bmAttributes */
-+	.byte	0x01		/* MaxPower */
-+intf_desc_hs:
-+	.byte	0x09		/* bLength */
-+	.byte	0x04		/* bDescriptorType */
-+	.byte	0x00		/* bInterfaceNumber */
-+	.byte	0x00		/* bAlternateSetting */
-+	.byte	0x02		/* bNumEndpoints */
-+	.byte	0xff		/* bInterfaceClass */
-+	.byte	0x00		/* bInterfaceSubClass */
-+	.byte	0x50		/* bInterfaceProtocol */
-+	.byte	0x00		/* iInterface */
-+ep1_desc_hs:
-+	.byte	0x07		/* bLength */
-+	.byte	0x05		/* bDescriptorType */
-+	.byte	0x01		/* bEndpointAddress */
-+	.byte	0x02		/* bmAttributes */
-+	.byte	0x00		/* wMaxPacketSize */
-+	.byte	0x02		/* wMaxPacketSize */
-+	.byte	0x00		/* bInterval */
-+ep2_desc_hs:
-+	.byte	0x07		/* bLength */
-+	.byte	0x05		/* bDescriptorType */
-+	.byte	0x81		/* bEndpointAddress */
-+	.byte	0x02		/* bmAttributes */
-+	.byte	0x00		/* wMaxPacketSize */
-+	.byte	0x02		/* wMaxPacketSize */
-+	.byte	0x00		/* bInterval */
-+
-+	.align	2
-+config_desc_fs:
-+	.byte	0x09		/* bLength */
-+	.byte	0x02		/* bDescriptorType */
-+	.byte	0x20		/* wTotalLength */
-+	.byte	0x00		/* wTotalLength */
-+	.byte	0x01		/* bNumInterfaces */
-+	.byte	0x01		/* bConfigurationValue */
-+	.byte	0x00		/* iConfiguration */
-+	.byte	0xc0		/* bmAttributes */
-+	.byte	0x01		/* MaxPower */
-+intf_desc_fs:
-+	.byte	0x09		/* bLength */
-+	.byte	0x04		/* bDescriptorType */
-+	.byte	0x00		/* bInterfaceNumber */
-+	.byte	0x00		/* bAlternateSetting */
-+	.byte	0x02		/* bNumEndpoints */
-+	.byte	0xff		/* bInterfaceClass */
-+	.byte	0x00		/* bInterfaceSubClass */
-+	.byte	0x50		/* bInterfaceProtocol */
-+	.byte	0x00		/* iInterface */
-+ep1_desc_fs:
-+	.byte	0x07		/* bLength */
-+	.byte	0x05		/* bDescriptorType */
-+	.byte	0x01		/* bEndpointAddress */
-+	.byte	0x02		/* bmAttributes */
-+	.byte	0x40		/* wMaxPacketSize */
-+	.byte	0x00		/* wMaxPacketSize */
-+	.byte	0x00		/* bInterval */
-+ep2_desc_fs:
-+	.byte	0x07		/* bLength */
-+	.byte	0x05		/* bDescriptorType */
-+	.byte	0x81		/* bEndpointAddress */
-+	.byte	0x02		/* bmAttributes */
-+	.byte	0x40		/* wMaxPacketSize */
-+	.byte	0x00		/* wMaxPacketSize */
-+	.byte	0x00		/* bInterval */
-+
-+	.align	2
-+string_lang_ids:
-+	.byte	0x04
-+	.byte	0x03
-+	.byte	0x09
-+	.byte	0x04
-+
-+	.align	2
-+string_manufacture:
-+	.byte	0x10
-+	.byte	0x03
-+	.byte	0x49
-+	.byte	0x00
-+	.byte	0x6e
-+	.byte	0x00
-+	.byte	0x67
-+	.byte	0x00
-+	.byte	0x65
-+	.byte	0x00
-+	.byte	0x6e
-+	.byte	0x00
-+	.byte	0x69
-+	.byte	0x00
-+	.byte	0x63
-+	.byte	0x00
-+
-+	.align	2
-+string_product:
-+	.byte	0x2e
-+	.byte	0x03
-+	.byte	0x4a
-+	.byte	0x00
-+	.byte	0x5a
-+	.byte	0x00
-+	.byte	0x34
-+	.byte	0x00
-+	.byte	0x37
-+	.byte	0x00
-+	.byte	0x34
-+	.byte	0x00
-+	.byte	0x30
-+	.byte	0x00
-+	.byte	0x20
-+	.byte	0x00
-+	.byte	0x55
-+	.byte	0x00
-+	.byte	0x53
-+	.byte	0x00
-+	.byte	0x42
-+	.byte	0x00
-+	.byte	0x20
-+	.byte	0x00
-+	.byte	0x42
-+	.byte	0x00
-+	.byte	0x6f
-+	.byte	0x00
-+	.byte	0x6f
-+	.byte	0x00
-+	.byte	0x74
-+	.byte	0x00
-+	.byte	0x20
-+	.byte	0x00
-+	.byte	0x44
-+	.byte	0x00
-+	.byte	0x65
-+	.byte	0x00
-+	.byte	0x76
-+	.byte	0x00
-+	.byte	0x69
-+	.byte	0x00
-+	.byte	0x63
-+	.byte	0x00
-+	.byte	0x65
-+	.byte	0x00
-+
-+	.align	2
-+cpu_info_data:
-+	.byte	0x4a
-+	.byte	0x5a
-+	.byte	0x34
-+	.byte	0x37
-+	.byte	0x34
-+	.byte	0x30
-+	.byte	0x56
-+	.byte	0x31
-+usbboot_end:
-+
-+    .set reorder
--- 
-1.7.9.5
-

+ 0 - 1664
package/boot/uboot-xburst/patches/0003-add-mmc-support.patch

@@ -1,1664 +0,0 @@
-From bd36739e77669e8df45c38f6acfe2cea511534d9 Mon Sep 17 00:00:00 2001
-From: Xiangfu <xiangfu@openmobilefree.net>
-Date: Wed, 10 Oct 2012 18:19:41 +0800
-Subject: [PATCH 3/6] add mmc support
-
----
- arch/mips/include/asm/jz4740.h |  166 ++++++
- board/qi/qi_lb60/qi_lb60.c     |    9 +-
- drivers/mmc/Makefile           |    1 +
- drivers/mmc/jz_mmc.c           | 1179 ++++++++++++++++++++++++++++++++++++++++
- drivers/mmc/jz_mmc.h           |  176 ++++++
- include/configs/qi_lb60.h      |    9 +
- include/mmc.h                  |   40 ++
- 7 files changed, 1578 insertions(+), 2 deletions(-)
- create mode 100644 drivers/mmc/jz_mmc.c
- create mode 100644 drivers/mmc/jz_mmc.h
-
-diff --git a/arch/mips/include/asm/jz4740.h b/arch/mips/include/asm/jz4740.h
-index 7a7cfff..68287fb 100644
---- a/arch/mips/include/asm/jz4740.h
-+++ b/arch/mips/include/asm/jz4740.h
-@@ -1146,5 +1146,171 @@ extern void sdram_init(void);
- extern void calc_clocks(void);
- extern void rtc_init(void);
- 
-+/*************************************************************************
-+ * MSC
-+ *************************************************************************/
-+#define REG8(addr)	*((volatile u8 *)(addr))
-+#define REG16(addr)	*((volatile u16 *)(addr))
-+#define REG32(addr)	*((volatile u32 *)(addr))
-+
-+#define	CPM_BASE	0xB0000000
-+#define CPM_CPCCR	(CPM_BASE+0x00)
-+#define CPM_MSCCDR	(CPM_BASE+0x68)
-+#define REG_CPM_MSCCDR	REG32(CPM_MSCCDR)
-+#define REG_CPM_CPCCR	REG32(CPM_CPCCR)
-+
-+#define	MSC_BASE	0xB0021000
-+
-+#define	MSC_STRPCL		(MSC_BASE + 0x000)
-+#define	MSC_STAT		(MSC_BASE + 0x004)
-+#define	MSC_CLKRT		(MSC_BASE + 0x008)
-+#define	MSC_CMDAT		(MSC_BASE + 0x00C)
-+#define	MSC_RESTO		(MSC_BASE + 0x010)
-+#define	MSC_RDTO		(MSC_BASE + 0x014)
-+#define	MSC_BLKLEN		(MSC_BASE + 0x018)
-+#define	MSC_NOB			(MSC_BASE + 0x01C)
-+#define	MSC_SNOB		(MSC_BASE + 0x020)
-+#define	MSC_IMASK		(MSC_BASE + 0x024)
-+#define	MSC_IREG		(MSC_BASE + 0x028)
-+#define	MSC_CMD			(MSC_BASE + 0x02C)
-+#define	MSC_ARG			(MSC_BASE + 0x030)
-+#define	MSC_RES			(MSC_BASE + 0x034)
-+#define	MSC_RXFIFO		(MSC_BASE + 0x038)
-+#define	MSC_TXFIFO		(MSC_BASE + 0x03C)
-+
-+#define	REG_MSC_STRPCL		REG16(MSC_STRPCL)
-+#define	REG_MSC_STAT		REG32(MSC_STAT)
-+#define	REG_MSC_CLKRT		REG16(MSC_CLKRT)
-+#define	REG_MSC_CMDAT		REG32(MSC_CMDAT)
-+#define	REG_MSC_RESTO		REG16(MSC_RESTO)
-+#define	REG_MSC_RDTO		REG16(MSC_RDTO)
-+#define	REG_MSC_BLKLEN		REG16(MSC_BLKLEN)
-+#define	REG_MSC_NOB		REG16(MSC_NOB)
-+#define	REG_MSC_SNOB		REG16(MSC_SNOB)
-+#define	REG_MSC_IMASK		REG16(MSC_IMASK)
-+#define	REG_MSC_IREG		REG16(MSC_IREG)
-+#define	REG_MSC_CMD		REG8(MSC_CMD)
-+#define	REG_MSC_ARG		REG32(MSC_ARG)
-+#define	REG_MSC_RES		REG16(MSC_RES)
-+#define	REG_MSC_RXFIFO		REG32(MSC_RXFIFO)
-+#define	REG_MSC_TXFIFO		REG32(MSC_TXFIFO)
-+
-+/* MSC Clock and Control Register (MSC_STRPCL) */
-+
-+#define MSC_STRPCL_EXIT_MULTIPLE	(1 << 7)
-+#define MSC_STRPCL_EXIT_TRANSFER	(1 << 6)
-+#define MSC_STRPCL_START_READWAIT	(1 << 5)
-+#define MSC_STRPCL_STOP_READWAIT	(1 << 4)
-+#define MSC_STRPCL_RESET		(1 << 3)
-+#define MSC_STRPCL_START_OP		(1 << 2)
-+#define MSC_STRPCL_CLOCK_CONTROL_BIT	0
-+#define MSC_STRPCL_CLOCK_CONTROL_MASK	(0x3 << MSC_STRPCL_CLOCK_CONTROL_BIT)
-+  #define MSC_STRPCL_CLOCK_CONTROL_STOP	  (0x1 << MSC_STRPCL_CLOCK_CONTROL_BIT) /* Stop MMC/SD clock */
-+  #define MSC_STRPCL_CLOCK_CONTROL_START  (0x2 << MSC_STRPCL_CLOCK_CONTROL_BIT) /* Start MMC/SD clock */
-+
-+/* MSC Status Register (MSC_STAT) */
-+
-+#define MSC_STAT_IS_RESETTING		(1 << 15)
-+#define MSC_STAT_SDIO_INT_ACTIVE	(1 << 14)
-+#define MSC_STAT_PRG_DONE		(1 << 13)
-+#define MSC_STAT_DATA_TRAN_DONE		(1 << 12)
-+#define MSC_STAT_END_CMD_RES		(1 << 11)
-+#define MSC_STAT_DATA_FIFO_AFULL	(1 << 10)
-+#define MSC_STAT_IS_READWAIT		(1 << 9)
-+#define MSC_STAT_CLK_EN			(1 << 8)
-+#define MSC_STAT_DATA_FIFO_FULL		(1 << 7)
-+#define MSC_STAT_DATA_FIFO_EMPTY	(1 << 6)
-+#define MSC_STAT_CRC_RES_ERR		(1 << 5)
-+#define MSC_STAT_CRC_READ_ERROR		(1 << 4)
-+#define MSC_STAT_CRC_WRITE_ERROR_BIT	2
-+#define MSC_STAT_CRC_WRITE_ERROR_MASK	(0x3 << MSC_STAT_CRC_WRITE_ERROR_BIT)
-+  #define MSC_STAT_CRC_WRITE_ERROR_NO		(0 << MSC_STAT_CRC_WRITE_ERROR_BIT) /* No error on transmission of data */
-+  #define MSC_STAT_CRC_WRITE_ERROR		(1 << MSC_STAT_CRC_WRITE_ERROR_BIT) /* Card observed erroneous transmission of data */
-+  #define MSC_STAT_CRC_WRITE_ERROR_NOSTS	(2 << MSC_STAT_CRC_WRITE_ERROR_BIT) /* No CRC status is sent back */
-+#define MSC_STAT_TIME_OUT_RES		(1 << 1)
-+#define MSC_STAT_TIME_OUT_READ		(1 << 0)
-+
-+/* MSC Bus Clock Control Register (MSC_CLKRT) */
-+
-+#define	MSC_CLKRT_CLK_RATE_BIT		0
-+#define	MSC_CLKRT_CLK_RATE_MASK		(0x7 << MSC_CLKRT_CLK_RATE_BIT)
-+  #define MSC_CLKRT_CLK_RATE_DIV_1	  (0x0 << MSC_CLKRT_CLK_RATE_BIT) /* CLK_SRC */
-+  #define MSC_CLKRT_CLK_RATE_DIV_2	  (0x1 << MSC_CLKRT_CLK_RATE_BIT) /* 1/2 of CLK_SRC */
-+  #define MSC_CLKRT_CLK_RATE_DIV_4	  (0x2 << MSC_CLKRT_CLK_RATE_BIT) /* 1/4 of CLK_SRC */
-+  #define MSC_CLKRT_CLK_RATE_DIV_8	  (0x3 << MSC_CLKRT_CLK_RATE_BIT) /* 1/8 of CLK_SRC */
-+  #define MSC_CLKRT_CLK_RATE_DIV_16	  (0x4 << MSC_CLKRT_CLK_RATE_BIT) /* 1/16 of CLK_SRC */
-+  #define MSC_CLKRT_CLK_RATE_DIV_32	  (0x5 << MSC_CLKRT_CLK_RATE_BIT) /* 1/32 of CLK_SRC */
-+  #define MSC_CLKRT_CLK_RATE_DIV_64	  (0x6 << MSC_CLKRT_CLK_RATE_BIT) /* 1/64 of CLK_SRC */
-+  #define MSC_CLKRT_CLK_RATE_DIV_128	  (0x7 << MSC_CLKRT_CLK_RATE_BIT) /* 1/128 of CLK_SRC */
-+
-+/* MSC Command Sequence Control Register (MSC_CMDAT) */
-+
-+#define	MSC_CMDAT_IO_ABORT	(1 << 11)
-+#define	MSC_CMDAT_BUS_WIDTH_BIT	9
-+#define	MSC_CMDAT_BUS_WIDTH_MASK (0x3 << MSC_CMDAT_BUS_WIDTH_BIT)
-+#define MSC_CMDAT_BUS_WIDTH_1BIT (0x0 << MSC_CMDAT_BUS_WIDTH_BIT)
-+#define MSC_CMDAT_BUS_WIDTH_4BIT (0x2 << MSC_CMDAT_BUS_WIDTH_BIT)
-+#define	MSC_CMDAT_DMA_EN	(1 << 8)
-+#define	MSC_CMDAT_INIT		(1 << 7)
-+#define	MSC_CMDAT_BUSY		(1 << 6)
-+#define	MSC_CMDAT_STREAM_BLOCK	(1 << 5)
-+#define	MSC_CMDAT_WRITE		(1 << 4)
-+#define	MSC_CMDAT_READ		(0 << 4)
-+#define	MSC_CMDAT_DATA_EN	(1 << 3)
-+#define	MSC_CMDAT_RESPONSE_BIT	0
-+#define	MSC_CMDAT_RESPONSE_MASK	(0x7 << MSC_CMDAT_RESPONSE_BIT)
-+#define MSC_CMDAT_RESPONSE_NONE	(0x0 << MSC_CMDAT_RESPONSE_BIT)
-+#define MSC_CMDAT_RESPONSE_R1	(0x1 << MSC_CMDAT_RESPONSE_BIT)
-+#define MSC_CMDAT_RESPONSE_R2	(0x2 << MSC_CMDAT_RESPONSE_BIT)
-+#define MSC_CMDAT_RESPONSE_R3	(0x3 << MSC_CMDAT_RESPONSE_BIT)
-+#define MSC_CMDAT_RESPONSE_R4	(0x4 << MSC_CMDAT_RESPONSE_BIT)
-+#define MSC_CMDAT_RESPONSE_R5	(0x5 << MSC_CMDAT_RESPONSE_BIT)
-+#define MSC_CMDAT_RESPONSE_R6	(0x6 << MSC_CMDAT_RESPONSE_BIT)
-+
-+/* MSC Interrupts Mask Register (MSC_IMASK) */
-+#define	MSC_IMASK_SDIO			(1 << 7)
-+#define	MSC_IMASK_TXFIFO_WR_REQ		(1 << 6)
-+#define	MSC_IMASK_RXFIFO_RD_REQ		(1 << 5)
-+#define	MSC_IMASK_END_CMD_RES		(1 << 2)
-+#define	MSC_IMASK_PRG_DONE		(1 << 1)
-+#define	MSC_IMASK_DATA_TRAN_DONE	(1 << 0)
-+
-+
-+/* MSC Interrupts Status Register (MSC_IREG) */
-+#define	MSC_IREG_SDIO			(1 << 7)
-+#define	MSC_IREG_TXFIFO_WR_REQ		(1 << 6)
-+#define	MSC_IREG_RXFIFO_RD_REQ		(1 << 5)
-+#define	MSC_IREG_END_CMD_RES		(1 << 2)
-+#define	MSC_IREG_PRG_DONE		(1 << 1)
-+#define	MSC_IREG_DATA_TRAN_DONE		(1 << 0)
-+
-+static __inline__ unsigned int __cpm_get_pllout2(void)
-+{
-+	if (REG_CPM_CPCCR & CPM_CPCCR_PCS)
-+		return __cpm_get_pllout();
-+	else
-+		return __cpm_get_pllout()/2;
-+}
-+
-+static inline void __cpm_select_msc_clk(int sd)
-+{
-+	unsigned int pllout2 = __cpm_get_pllout2();
-+	unsigned int div = 0;
-+
-+	if (sd) {
-+		div = pllout2 / 24000000;
-+	}
-+	else {
-+		div = pllout2 / 16000000;
-+	}
-+
-+	REG_CPM_MSCCDR = div - 1;
-+}
-+#define __msc_reset() 						\
-+do { 								\
-+	REG_MSC_STRPCL = MSC_STRPCL_RESET;			\
-+ 	while (REG_MSC_STAT & MSC_STAT_IS_RESETTING);		\
-+} while (0)
-+
- #endif	/* !__ASSEMBLY__ */
- #endif	/* __JZ4740_H__ */
-diff --git a/board/qi/qi_lb60/qi_lb60.c b/board/qi/qi_lb60/qi_lb60.c
-index 3bd4e2f..a2ba648 100644
---- a/board/qi/qi_lb60/qi_lb60.c
-+++ b/board/qi/qi_lb60/qi_lb60.c
-@@ -40,8 +40,13 @@ static void gpio_init(void)
- 		__gpio_clear_pin(GPIO_KEYOUT_BASE + i);
- 	}
- 
--	__gpio_as_input(GPIO_KEYIN_8);
--	__gpio_enable_pull(GPIO_KEYIN_8);
-+	if (__gpio_get_pin(GPIO_KEYIN_BASE + 2) == 0){
-+		printf("[S] pressed, enable UART0\n");
-+		__gpio_as_uart0();
-+	} else {
-+		__gpio_as_input(GPIO_KEYIN_8);
-+		__gpio_enable_pull(GPIO_KEYIN_8);
-+	}
- 
- 	/* enable the TP4, TP5 as UART0 */
- 	__gpio_jtag_to_uart0();
-diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
-index 565ba6a..3c717b1 100644
---- a/drivers/mmc/Makefile
-+++ b/drivers/mmc/Makefile
-@@ -47,6 +47,7 @@ COBJS-$(CONFIG_SDHCI) += sdhci.o
- COBJS-$(CONFIG_S5P_SDHCI) += s5p_sdhci.o
- COBJS-$(CONFIG_SH_MMCIF) += sh_mmcif.o
- COBJS-$(CONFIG_TEGRA_MMC) += tegra_mmc.o
-+COBJS-$(CONFIG_JZ4740_MMC) += jz_mmc.o
- 
- COBJS	:= $(COBJS-y)
- SRCS	:= $(COBJS:.o=.c)
-diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
-new file mode 100644
-index 0000000..642cecc
---- /dev/null
-+++ b/drivers/mmc/jz_mmc.c
-@@ -0,0 +1,1179 @@
-+/*
-+ * (C) Copyright 2003
-+ * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
-+ *
-+ * See file CREDITS for list of people who contributed to this
-+ * project.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ * MA 02111-1307 USA
-+ */
-+
-+#include <config.h>
-+#include <common.h>
-+#include <part.h>
-+#include <mmc.h>
-+
-+#include <asm/io.h>
-+#include <asm/jz4740.h>
-+#include "jz_mmc.h"
-+
-+static int sd2_0 = 0;
-+static int mmc_ready = 0;
-+static int use_4bit;		/* Use 4-bit data bus */
-+/*
-+ *  MMC Events
-+ */
-+#define MMC_EVENT_NONE	        0x00	/* No events */
-+#define MMC_EVENT_RX_DATA_DONE	0x01	/* Rx data done */
-+#define MMC_EVENT_TX_DATA_DONE	0x02	/* Tx data done */
-+#define MMC_EVENT_PROG_DONE	0x04	/* Programming is done */
-+
-+
-+#define MMC_IRQ_MASK()				\
-+do {						\
-+      	REG_MSC_IMASK = 0xffff;			\
-+      	REG_MSC_IREG = 0xffff;			\
-+} while (0)
-+
-+/*
-+ * GPIO definition
-+ */
-+#if defined(CONFIG_SAKC)
-+
-+#define __msc_init_io()				\
-+do {						\
-+	__gpio_as_input(GPIO_SD_CD_N);		\
-+} while (0)
-+
-+#else
-+#define __msc_init_io()				\
-+do {						\
-+	__gpio_as_output(GPIO_SD_VCC_EN_N);	\
-+	__gpio_as_input(GPIO_SD_CD_N);		\
-+} while (0)
-+
-+#define __msc_enable_power()			\
-+do {						\
-+	__gpio_clear_pin(GPIO_SD_VCC_EN_N);	\
-+} while (0)
-+
-+#define __msc_disable_power()			\
-+do {						\
-+	__gpio_set_pin(GPIO_SD_VCC_EN_N);	\
-+} while (0)
-+	
-+#endif /* CONFIG_SAKE */
-+
-+#define __msc_card_detected()			\
-+({						\
-+	int detected = 1;			\
-+	__gpio_as_input(GPIO_SD_CD_N);		\
-+	__gpio_disable_pull(GPIO_SD_CD_N);	\
-+	if (!__gpio_get_pin(GPIO_SD_CD_N))	\
-+		detected = 0;			\
-+	detected;				\
-+})
-+
-+/*
-+ * Local functions
-+ */
-+
-+extern int
-+fat_register_device(block_dev_desc_t *dev_desc, int part_no);
-+
-+static block_dev_desc_t mmc_dev;
-+
-+block_dev_desc_t * mmc_get_dev(int dev)
-+{
-+	return ((block_dev_desc_t *)&mmc_dev);
-+}
-+
-+/* Stop the MMC clock and wait while it happens */
-+static inline int jz_mmc_stop_clock(void)
-+{
-+	int timeout = 1000;
-+
-+	REG_MSC_STRPCL = MSC_STRPCL_CLOCK_CONTROL_STOP;
-+
-+	while (timeout && (REG_MSC_STAT & MSC_STAT_CLK_EN)) {
-+		timeout--;
-+		if (timeout == 0)
-+			return MMC_ERROR_TIMEOUT;
-+		udelay(1);
-+	}
-+        return MMC_NO_ERROR;
-+}
-+
-+/* Start the MMC clock and operation */
-+static inline int jz_mmc_start_clock(void)
-+{
-+	REG_MSC_STRPCL = MSC_STRPCL_CLOCK_CONTROL_START | MSC_STRPCL_START_OP;
-+	return MMC_NO_ERROR;
-+}
-+
-+static inline u32 jz_mmc_calc_clkrt(int is_sd, u32 rate)
-+{
-+	u32 clkrt = 0;
-+	u32 clk_src = is_sd ? 24000000 : 16000000;
-+
-+  	while (rate < clk_src) {
-+      		clkrt ++;
-+      		clk_src >>= 1;
-+    	}
-+
-+	return clkrt;
-+}
-+
-+/* Set the MMC clock frequency */
-+void jz_mmc_set_clock(int sd, u32 rate)
-+{
-+	jz_mmc_stop_clock();
-+
-+	/* Select clock source of MSC */
-+	__cpm_select_msc_clk(sd);
-+
-+	/* Set clock dividor of MSC */
-+	REG_MSC_CLKRT = jz_mmc_calc_clkrt(sd, rate);
-+}
-+
-+static int jz_mmc_check_status(struct mmc_request *request)
-+{
-+	u32 status = REG_MSC_STAT;
-+
-+	/* Checking for response or data timeout */
-+	if (status & (MSC_STAT_TIME_OUT_RES | MSC_STAT_TIME_OUT_READ)) {
-+		printf("MMC/SD timeout, MMC_STAT 0x%x CMD %d\n", status, request->cmd);
-+		return MMC_ERROR_TIMEOUT;
-+	}
-+
-+	/* Checking for CRC error */
-+	if (status & (MSC_STAT_CRC_READ_ERROR | MSC_STAT_CRC_WRITE_ERROR | MSC_STAT_CRC_RES_ERR)) {
-+		printf("MMC/CD CRC error, MMC_STAT 0x%x\n", status);
-+		return MMC_ERROR_CRC;
-+	}
-+
-+	return MMC_NO_ERROR;
-+}
-+
-+/* Obtain response to the command and store it to response buffer */
-+static void jz_mmc_get_response(struct mmc_request *request)
-+{
-+	int i;
-+	u8 *buf;
-+	u32 data;
-+
-+	debug("fetch response for request %d, cmd %d\n", 
-+	      request->rtype, request->cmd);
-+
-+	buf = request->response;
-+	request->result = MMC_NO_ERROR;
-+
-+	switch (request->rtype) {
-+	case RESPONSE_R1: case RESPONSE_R1B: case RESPONSE_R6:
-+	case RESPONSE_R3: case RESPONSE_R4: case RESPONSE_R5:
-+	{
-+		data = REG_MSC_RES;
-+		buf[0] = (data >> 8) & 0xff;
-+		buf[1] = data & 0xff;
-+		data = REG_MSC_RES;
-+		buf[2] = (data >> 8) & 0xff;
-+		buf[3] = data & 0xff;
-+		data = REG_MSC_RES;
-+		buf[4] = data & 0xff;
-+
-+		debug("request %d, response [%02x %02x %02x %02x %02x]\n",
-+		      request->rtype, buf[0], buf[1], buf[2], buf[3], buf[4]);
-+		break;
-+	}
-+	case RESPONSE_R2_CID: case RESPONSE_R2_CSD:
-+	{
-+		for (i = 0; i < 16; i += 2) {
-+			data = REG_MSC_RES;
-+			buf[i] = (data >> 8) & 0xff;
-+			buf[i+1] = data & 0xff;
-+		}
-+		debug("request %d, response [", request->rtype);
-+#if CONFIG_MMC_DEBUG_VERBOSE > 2
-+		if (g_mmc_debug >= 3) {
-+			int n;
-+			for (n = 0; n < 17; n++)
-+				printk("%02x ", buf[n]);
-+			printk("]\n");
-+		}
-+#endif
-+		break;
-+	}
-+	case RESPONSE_NONE:
-+		debug("No response\n");
-+		break;
-+
-+	default:
-+		debug("unhandled response type for request %d\n", request->rtype);
-+		break;
-+	}
-+}
-+
-+static int jz_mmc_receive_data(struct mmc_request *req)
-+{
-+	u32  stat, timeout, data, cnt;
-+	u8 *buf = req->buffer;
-+	u32 wblocklen = (u32)(req->block_len + 3) >> 2; /* length in word */
-+
-+	timeout = 0x3ffffff;
-+
-+	while (timeout) {
-+		timeout--;
-+		stat = REG_MSC_STAT;
-+
-+		if (stat & MSC_STAT_TIME_OUT_READ)
-+			return MMC_ERROR_TIMEOUT;
-+		else if (stat & MSC_STAT_CRC_READ_ERROR)
-+			return MMC_ERROR_CRC;
-+		else if (!(stat & MSC_STAT_DATA_FIFO_EMPTY)
-+			 || (stat & MSC_STAT_DATA_FIFO_AFULL)) {
-+			/* Ready to read data */
-+			break;
-+		}
-+		udelay(1);
-+	}
-+	if (!timeout)
-+		return MMC_ERROR_TIMEOUT;
-+
-+	/* Read data from RXFIFO. It could be FULL or PARTIAL FULL */
-+	cnt = wblocklen;
-+	while (cnt) {
-+		data = REG_MSC_RXFIFO;
-+		{
-+			*buf++ = (u8)(data >> 0);
-+			*buf++ = (u8)(data >> 8);
-+			*buf++ = (u8)(data >> 16);
-+			*buf++ = (u8)(data >> 24);
-+		}
-+		cnt --;
-+		while (cnt && (REG_MSC_STAT & MSC_STAT_DATA_FIFO_EMPTY))
-+			;
-+	}
-+	return MMC_NO_ERROR;
-+}
-+
-+static int jz_mmc_transmit_data(struct mmc_request *req)
-+{
-+#if 0
-+	u32 nob = req->nob;
-+	u32 wblocklen = (u32)(req->block_len + 3) >> 2; /* length in word */
-+	u8 *buf = req->buffer;
-+	u32 *wbuf = (u32 *)buf;
-+	u32 waligned = (((u32)buf & 0x3) == 0); /* word aligned ? */
-+	u32 stat, timeout, data, cnt;
-+
-+	for (nob; nob >= 1; nob--) {
-+		timeout = 0x3FFFFFF;
-+
-+		while (timeout) {
-+			timeout--;
-+			stat = REG_MSC_STAT;
-+
-+			if (stat & (MSC_STAT_CRC_WRITE_ERROR | MSC_STAT_CRC_WRITE_ERROR_NOSTS))
-+				return MMC_ERROR_CRC;
-+			else if (!(stat & MSC_STAT_DATA_FIFO_FULL)) {
-+				/* Ready to write data */
-+				break;
-+			}
-+
-+			udelay(1);
-+		}
-+
-+		if (!timeout)
-+			return MMC_ERROR_TIMEOUT;
-+
-+		/* Write data to TXFIFO */
-+		cnt = wblocklen;
-+		while (cnt) {
-+			while (REG_MSC_STAT & MSC_STAT_DATA_FIFO_FULL)
-+				;
-+
-+			if (waligned) {
-+				REG_MSC_TXFIFO = *wbuf++;
-+			}
-+			else {
-+				data = *buf++ | (*buf++ << 8) | (*buf++ << 16) | (*buf++ << 24);
-+				REG_MSC_TXFIFO = data;
-+			}
-+
-+			cnt--;
-+		}
-+	}
-+#endif
-+	return MMC_NO_ERROR;
-+}
-+
-+
-+/*
-+ * Name:	  int jz_mmc_exec_cmd()
-+ * Function:      send command to the card, and get a response
-+ * Input:	  struct mmc_request *req	: MMC/SD request
-+ * Output:	  0:  right		>0:  error code
-+ */
-+int jz_mmc_exec_cmd(struct mmc_request *request)
-+{
-+	u32 cmdat = 0, events = 0;
-+	int retval, timeout = 0x3fffff;
-+
-+	/* Indicate we have no result yet */
-+	request->result = MMC_NO_RESPONSE;
-+	if (request->cmd == MMC_CIM_RESET) {
-+		/* On reset, 1-bit bus width */
-+		use_4bit = 0;
-+
-+		/* Reset MMC/SD controller */
-+		__msc_reset();
-+
-+		/* On reset, drop MMC clock down */
-+		jz_mmc_set_clock(0, MMC_CLOCK_SLOW);
-+
-+		/* On reset, stop MMC clock */
-+		jz_mmc_stop_clock();
-+	}
-+	if (request->cmd == MMC_CMD_SEND_OP_COND) {
-+		debug("Have an MMC card\n");
-+		/* always use 1bit for MMC */
-+		use_4bit = 0;
-+	}
-+	if (request->cmd == SET_BUS_WIDTH) {
-+		if (request->arg == 0x2) {
-+			printf("Use 4-bit bus width\n");
-+			use_4bit = 1;
-+		} else {
-+			printf("Use 1-bit bus width\n");
-+			use_4bit = 0;
-+		}
-+	}
-+
-+	/* stop clock */
-+	jz_mmc_stop_clock();
-+
-+	/* mask all interrupts */
-+	REG_MSC_IMASK = 0xffff;
-+
-+	/* clear status */
-+	REG_MSC_IREG = 0xffff;
-+
-+	/* use 4-bit bus width when possible */
-+	if (use_4bit)
-+		cmdat |= MSC_CMDAT_BUS_WIDTH_4BIT;
-+
-+        /* Set command type and events */
-+	switch (request->cmd) {
-+	/* MMC core extra command */
-+	case MMC_CIM_RESET:
-+		cmdat |= MSC_CMDAT_INIT; /* Initialization sequence sent prior to command */
-+		break;
-+
-+	/* bc - broadcast - no response */
-+	case MMC_CMD_GO_IDLE_STATE:
-+	case MMC_CMD_SET_DSR:
-+		break;
-+
-+	/* bcr - broadcast with response */
-+	case MMC_CMD_SEND_OP_COND:
-+	case MMC_CMD_ALL_SEND_CID:
-+	case MMC_GO_IRQ_STATE:
-+		break;
-+
-+	/* adtc - addressed with data transfer */
-+	case MMC_READ_DAT_UNTIL_STOP:
-+	case MMC_CMD_READ_SINGLE_BLOCK:
-+	case MMC_CMD_READ_MULTIPLE_BLOCK:
-+	case SD_CMD_APP_SEND_SCR:
-+		cmdat |= MSC_CMDAT_DATA_EN | MSC_CMDAT_READ;
-+		events = MMC_EVENT_RX_DATA_DONE;
-+		break;
-+
-+	case MMC_WRITE_DAT_UNTIL_STOP:
-+	case MMC_CMD_WRITE_SINGLE_BLOCK:
-+	case MMC_CMD_WRITE_MULTIPLE_BLOCK:
-+	case MMC_PROGRAM_CID:
-+	case MMC_PROGRAM_CSD:
-+	case MMC_SEND_WRITE_PROT:
-+	case MMC_GEN_CMD:
-+	case MMC_LOCK_UNLOCK:
-+		cmdat |= MSC_CMDAT_DATA_EN | MSC_CMDAT_WRITE;
-+		events = MMC_EVENT_TX_DATA_DONE | MMC_EVENT_PROG_DONE;
-+
-+		break;
-+
-+	case MMC_CMD_STOP_TRANSMISSION:
-+		events = MMC_EVENT_PROG_DONE;
-+		break;
-+
-+	/* ac - no data transfer */
-+	default:
-+		break;
-+	}
-+
-+	/* Set response type */
-+	switch (request->rtype) {
-+	case RESPONSE_NONE:
-+		break;
-+
-+	case RESPONSE_R1B:
-+		cmdat |= MSC_CMDAT_BUSY;
-+		/*FALLTHRU*/
-+	case RESPONSE_R1:
-+		cmdat |= MSC_CMDAT_RESPONSE_R1;
-+		break;
-+	case RESPONSE_R2_CID:
-+	case RESPONSE_R2_CSD:
-+		cmdat |= MSC_CMDAT_RESPONSE_R2;
-+		break;
-+	case RESPONSE_R3:
-+		cmdat |= MSC_CMDAT_RESPONSE_R3;
-+		break;
-+	case RESPONSE_R4:
-+		cmdat |= MSC_CMDAT_RESPONSE_R4;
-+		break;
-+	case RESPONSE_R5:
-+		cmdat |= MSC_CMDAT_RESPONSE_R5;
-+		break;
-+	case RESPONSE_R6:
-+		cmdat |= MSC_CMDAT_RESPONSE_R6;
-+		break;
-+	default:
-+		break;
-+	}
-+
-+	/* Set command index */
-+	if (request->cmd == MMC_CIM_RESET) {
-+		REG_MSC_CMD = MMC_CMD_GO_IDLE_STATE;
-+	} else {
-+		REG_MSC_CMD = request->cmd;
-+	}
-+
-+        /* Set argument */
-+	REG_MSC_ARG = request->arg;
-+
-+	/* Set block length and nob */
-+	if (request->cmd == SD_CMD_APP_SEND_SCR) { /* get SCR from DataFIFO */
-+		REG_MSC_BLKLEN = 8;
-+		REG_MSC_NOB = 1;
-+	} else {
-+		REG_MSC_BLKLEN = request->block_len;
-+		REG_MSC_NOB = request->nob;
-+	}
-+
-+	/* Set command */
-+	REG_MSC_CMDAT = cmdat;
-+
-+	debug("Send cmd %d cmdat: %x arg: %x resp %d\n", request->cmd,
-+	      cmdat, request->arg, request->rtype);
-+
-+        /* Start MMC/SD clock and send command to card */
-+	jz_mmc_start_clock();
-+
-+	/* Wait for command completion */
-+	while (timeout-- && !(REG_MSC_STAT & MSC_STAT_END_CMD_RES))
-+		;
-+
-+	if (timeout == 0)
-+		return MMC_ERROR_TIMEOUT;
-+
-+	REG_MSC_IREG = MSC_IREG_END_CMD_RES; /* clear flag */
-+
-+	/* Check for status */
-+	retval = jz_mmc_check_status(request);
-+	if (retval) {
-+		return retval;
-+	}
-+
-+	/* Complete command with no response */
-+	if (request->rtype == RESPONSE_NONE) {
-+		return MMC_NO_ERROR;
-+	}
-+
-+	/* Get response */
-+	jz_mmc_get_response(request);
-+
-+	/* Start data operation */
-+	if (events & (MMC_EVENT_RX_DATA_DONE | MMC_EVENT_TX_DATA_DONE)) {
-+		if (events & MMC_EVENT_RX_DATA_DONE) {
-+			if (request->cmd == SD_CMD_APP_SEND_SCR) {
-+				/* SD card returns SCR register as data.
-+				   MMC core expect it in the response buffer,
-+				   after normal response. */
-+				request->buffer = (u8 *)((u32)request->response + 5);
-+			}
-+			jz_mmc_receive_data(request);
-+		}
-+
-+		if (events & MMC_EVENT_TX_DATA_DONE) {
-+			jz_mmc_transmit_data(request);
-+		}
-+
-+		/* Wait for Data Done */
-+		while (!(REG_MSC_IREG & MSC_IREG_DATA_TRAN_DONE))
-+			;
-+		REG_MSC_IREG = MSC_IREG_DATA_TRAN_DONE; /* clear status */
-+	}
-+
-+	/* Wait for Prog Done event */
-+	if (events & MMC_EVENT_PROG_DONE) {
-+		while (!(REG_MSC_IREG & MSC_IREG_PRG_DONE))
-+			;
-+		REG_MSC_IREG = MSC_IREG_PRG_DONE; /* clear status */
-+	}
-+
-+	/* Command completed */
-+
-+	return MMC_NO_ERROR;			 /* return successfully */
-+}
-+
-+int mmc_block_read(u8 *dst, ulong src, ulong len)
-+{
-+
-+	struct mmc_request request;
-+	struct mmc_response_r1 r1;
-+	int retval = 0;
-+
-+	if (len == 0)
-+		goto exit;
-+
-+	mmc_simple_cmd(&request, MMC_CMD_SEND_STATUS, mmcinfo.rca, RESPONSE_R1);
-+	retval = mmc_unpack_r1(&request, &r1, 0);
-+	if (retval && (retval != MMC_ERROR_STATE_MISMATCH))
-+		goto exit;
-+
-+	mmc_simple_cmd(&request, MMC_CMD_SET_BLOCKLEN, len, RESPONSE_R1);
-+	if (retval = mmc_unpack_r1(&request, &r1, 0))
-+		goto exit;
-+
-+	if (!sd2_0)
-+		src *= mmcinfo.block_len;
-+
-+	mmc_send_cmd(&request, MMC_CMD_READ_SINGLE_BLOCK, src, 1, len, RESPONSE_R1, dst);
-+	if (retval = mmc_unpack_r1(&request, &r1, 0))
-+		goto exit;
-+
-+exit:
-+	return retval;
-+}
-+
-+ulong mmc_bread(int dev_num, ulong blkstart, ulong blkcnt, ulong *dst)
-+{
-+	if (!mmc_ready) {
-+		printf("Please initial the MMC first\n");
-+		return -1;
-+	}
-+
-+	int i = 0;
-+	ulong dst_tmp = dst;
-+ 
-+	for (i = 0; i < blkcnt; i++) {
-+		if ((mmc_block_read((uchar *)(dst_tmp), blkstart, mmcinfo.block_len)) < 0)
-+			return -1;
-+
-+		dst_tmp += mmcinfo.block_len;
-+		blkstart++;
-+	}
-+ 
-+	return i;
-+}
-+
-+int mmc_select_card(void)
-+{
-+	struct mmc_request request;
-+	struct mmc_response_r1 r1;
-+	int retval;
-+
-+	mmc_simple_cmd(&request, MMC_CMD_SELECT_CARD, mmcinfo.rca, RESPONSE_R1B);
-+	retval = mmc_unpack_r1(&request, &r1, 0);
-+	if (retval) {
-+		return retval;
-+	}
-+
-+	if (mmcinfo.sd) {
-+		mmc_simple_cmd(&request, MMC_CMD_APP_CMD,  mmcinfo.rca, RESPONSE_R1);
-+		retval = mmc_unpack_r1(&request,&r1,0);
-+		if (retval) {
-+			return retval;
-+		}
-+#if defined(MMC_BUS_WIDTH_1BIT)		
-+		mmc_simple_cmd(&request, SET_BUS_WIDTH, 1, RESPONSE_R1);
-+#else
-+		mmc_simple_cmd(&request, SET_BUS_WIDTH, 2, RESPONSE_R1);
-+#endif
-+                retval = mmc_unpack_r1(&request,&r1,0);
-+                if (retval) {
-+			return retval;
-+		}
-+	}
-+	return 0;
-+}
-+
-+/*
-+ * Configure card
-+ */
-+static void mmc_configure_card(void)
-+{
-+	u32 rate;
-+
-+	/* Get card info */
-+	if (sd2_0)
-+		mmcinfo.block_num = (mmcinfo.csd.c_size + 1) << 10;
-+	else
-+		mmcinfo.block_num = (mmcinfo.csd.c_size + 1) * (1 << (mmcinfo.csd.c_size_mult + 2));
-+
-+	mmcinfo.block_len = 1 << mmcinfo.csd.read_bl_len;
-+
-+	mmc_dev.if_type = IF_TYPE_SD;
-+	mmc_dev.part_type = PART_TYPE_DOS;
-+	mmc_dev.dev = 0;
-+	mmc_dev.lun = 0;
-+	mmc_dev.type = 0;
-+	mmc_dev.blksz = mmcinfo.block_len;
-+	mmc_dev.lba = mmcinfo.block_num;
-+	mmc_dev.removable = 0;
-+
-+	printf("%s Detected: %lu blocks of %lu bytes\n",
-+	       sd2_0 == 1 ? "SDHC" : "SD",
-+	       mmc_dev.lba,
-+	       mmc_dev.blksz);
-+
-+	/* Fix the clock rate */
-+	rate = mmc_tran_speed(mmcinfo.csd.tran_speed);
-+	if (rate < MMC_CLOCK_SLOW)
-+		rate = MMC_CLOCK_SLOW;
-+	if ((mmcinfo.sd == 0) && (rate > MMC_CLOCK_FAST))
-+		rate = MMC_CLOCK_FAST;
-+        if ((mmcinfo.sd) && (rate > SD_CLOCK_FAST))
-+		rate = SD_CLOCK_FAST;
-+
-+	debug("%s: block_len=%d block_num=%d rate=%d\n", 
-+	      __func__, mmcinfo.block_len, mmcinfo.block_num, rate);
-+
-+	jz_mmc_set_clock(mmcinfo.sd, rate);
-+}
-+
-+/*
-+ * State machine routines to initialize card(s)
-+ */
-+
-+/*
-+  CIM_SINGLE_CARD_ACQ  (frequency at 400 kHz)
-+  --- Must enter from GO_IDLE_STATE ---
-+  1. SD_SEND_OP_COND (SD Card) [CMD55] + [CMD41]
-+  2. SEND_OP_COND (Full Range) [CMD1]   {optional}
-+  3. SEND_OP_COND (Set Range ) [CMD1]
-+     If busy, delay and repeat step 2
-+  4. ALL_SEND_CID              [CMD2]
-+     If timeout, set an error (no cards found)
-+  5. SET_RELATIVE_ADDR         [CMD3]
-+  6. SEND_CSD                  [CMD9]
-+  7. SET_DSR                   [CMD4]    Only call this if (csd.dsr_imp).
-+  8. Set clock frequency (check available in csd.tran_speed)
-+ */
-+
-+#define MMC_INIT_DOING   0
-+#define MMC_INIT_PASSED  1
-+#define MMC_INIT_FAILED  2
-+
-+static int mmc_init_card_state(struct mmc_request *request)
-+{
-+	struct mmc_response_r1 r1;
-+	struct mmc_response_r3 r3;
-+	int retval;
-+	int ocr = 0x40300000;
-+	int limit_41 = 0;
-+
-+	switch (request->cmd) {
-+	case MMC_CMD_GO_IDLE_STATE: /* No response to parse */
-+		if (mmcinfo.sd)
-+			mmc_simple_cmd(request, 8, 0x1aa, RESPONSE_R1);
-+		else
-+			mmc_simple_cmd(request, MMC_CMD_SEND_OP_COND, MMC_OCR_ARG, RESPONSE_R3);
-+		break;
-+
-+	case 8:
-+        	retval = mmc_unpack_r1(request,&r1,mmcinfo.state);
-+		mmc_simple_cmd(request, MMC_CMD_APP_CMD,  0, RESPONSE_R1);
-+		break;
-+
-+        case MMC_CMD_APP_CMD:
-+        	retval = mmc_unpack_r1(request,&r1,mmcinfo.state);
-+		if (retval & (limit_41 < 100)) {
-+			debug("%s: unable to MMC_APP_CMD error=%d (%s)\n", 
-+			      __func__, retval, mmc_result_to_string(retval));
-+			limit_41++;
-+			mmc_simple_cmd(request, SD_CMD_APP_SEND_OP_COND, ocr, RESPONSE_R3);
-+		} else if (limit_41 < 100) {
-+			limit_41++;
-+			mmc_simple_cmd(request, SD_CMD_APP_SEND_OP_COND, ocr, RESPONSE_R3);
-+		} else{
-+			/* reset the card to idle*/
-+			mmc_simple_cmd(request, MMC_CMD_GO_IDLE_STATE, 0, RESPONSE_NONE);
-+			mmcinfo.sd = 0;
-+		}
-+		break;
-+
-+        case SD_CMD_APP_SEND_OP_COND:
-+                retval = mmc_unpack_r3(request, &r3);
-+                if (retval) {
-+			debug("%s: try MMC card\n", __func__);
-+			mmc_simple_cmd(request, SD_CMD_APP_SEND_OP_COND, MMC_OCR_ARG, RESPONSE_R3);
-+			break;
-+		}
-+
-+                debug("%s: read ocr value = 0x%08x\n", __func__, r3.ocr);
-+
-+		if(!(r3.ocr & MMC_CARD_BUSY || ocr == 0)){
-+			udelay(50000);
-+			mmc_simple_cmd(request, MMC_CMD_APP_CMD, 0, RESPONSE_R1);
-+		} else {
-+			mmcinfo.sd = 1; /* SD Card ready */
-+			mmcinfo.state = CARD_STATE_READY;
-+			mmc_simple_cmd(request, MMC_CMD_ALL_SEND_CID, 0, RESPONSE_R2_CID);
-+		}
-+		break;
-+
-+	case MMC_CMD_SEND_OP_COND:
-+		retval = mmc_unpack_r3(request, &r3);
-+		if (retval) {
-+			debug("%s: failed SEND_OP_COND error=%d (%s)\n", 
-+			      __func__, retval, mmc_result_to_string(retval));
-+			return MMC_INIT_FAILED;
-+		}
-+
-+		debug("%s: read ocr value = 0x%08x\n", __func__, r3.ocr);
-+		if (!(r3.ocr & MMC_CARD_BUSY)) {
-+	                mmc_simple_cmd(request, MMC_CMD_SEND_OP_COND, MMC_OCR_ARG, RESPONSE_R3);
-+		} else {
-+		        mmcinfo.sd = 0; /* MMC Card ready */
-+			mmcinfo.state = CARD_STATE_READY;
-+			mmc_simple_cmd(request, MMC_CMD_ALL_SEND_CID, 0, RESPONSE_R2_CID);
-+		}
-+		break;
-+
-+	case MMC_CMD_ALL_SEND_CID: 
-+		retval = mmc_unpack_cid( request, &mmcinfo.cid );
-+		/*FIXME:ignore CRC error for CMD2/CMD9/CMD10 */
-+		if ( retval && (retval != MMC_ERROR_CRC)) {
-+			debug("mmc_init_card_state: unable to ALL_SEND_CID error=%d (%s)\n", 
-+			      retval, mmc_result_to_string(retval));
-+			return MMC_INIT_FAILED;
-+		}
-+		mmcinfo.state = CARD_STATE_IDENT;
-+		if(mmcinfo.sd)
-+			mmc_simple_cmd(request, MMC_CMD_SET_RELATIVE_ADDR, 0, RESPONSE_R6);
-+                else
-+			mmc_simple_cmd(request, MMC_CMD_SET_RELATIVE_ADDR, ID_TO_RCA(mmcinfo.id) << 16, RESPONSE_R1);
-+		break;
-+
-+        case MMC_CMD_SET_RELATIVE_ADDR:
-+	        if (mmcinfo.sd)	{
-+			retval = mmc_unpack_r6(request, &r1, mmcinfo.state, &mmcinfo.rca);
-+			mmcinfo.rca = mmcinfo.rca << 16; 
-+			debug("%s: Get RCA from SD: 0x%04x Status: %x\n",
-+			      __func__, mmcinfo.rca, r1.status);
-+                } else {
-+			retval = mmc_unpack_r1(request,&r1,mmcinfo.state);
-+			mmcinfo.rca = ID_TO_RCA(mmcinfo.id) << 16;
-+	        }
-+		if (retval) {
-+			debug("%s: unable to SET_RELATIVE_ADDR error=%d (%s)\n", 
-+			      __func__, retval, mmc_result_to_string(retval));
-+			return MMC_INIT_FAILED;
-+		}
-+
-+		mmcinfo.state = CARD_STATE_STBY;
-+                mmc_simple_cmd(request, MMC_CMD_SEND_CSD, mmcinfo.rca, RESPONSE_R2_CSD);
-+
-+		break;
-+
-+	case MMC_CMD_SEND_CSD:
-+		retval = mmc_unpack_csd(request, &mmcinfo.csd);
-+		mmc_ready = 1;
-+		/*FIXME:ignore CRC error for CMD2/CMD9/CMD10 */
-+	        if (retval && (retval != MMC_ERROR_CRC)) {
-+			debug("%s: unable to SEND_CSD error=%d (%s)\n", 
-+			      __func__, retval, mmc_result_to_string(retval));
-+			return MMC_INIT_FAILED;
-+		}
-+		if (mmcinfo.csd.dsr_imp) {
-+			debug("%s: driver doesn't support setting DSR\n", __func__);
-+		}
-+		mmc_configure_card();
-+		return MMC_INIT_PASSED;
-+
-+	default:
-+		debug("%s: error!  Illegal last cmd %d\n", __func__, request->cmd);
-+		return MMC_INIT_FAILED;
-+	}
-+
-+	return MMC_INIT_DOING;
-+}
-+
-+int mmc_init_card(void)
-+{
-+	struct mmc_request request;
-+	int retval;
-+
-+	mmc_simple_cmd(&request, MMC_CIM_RESET, 0, RESPONSE_NONE); /* reset card */
-+	mmc_simple_cmd(&request, MMC_CMD_GO_IDLE_STATE, 0, RESPONSE_NONE);
-+	mmcinfo.sd = 1;  /* assuming a SD card */
-+
-+	while ((retval = mmc_init_card_state(&request)) == MMC_INIT_DOING)
-+		;
-+
-+	if (retval == MMC_INIT_PASSED)
-+		return MMC_NO_ERROR;
-+	else
-+		return MMC_NO_RESPONSE;
-+}
-+
-+int mmc_legacy_init(int verbose)
-+{
-+	if (!__msc_card_detected())
-+		return 1;
-+
-+	/* Step-1: init GPIO */
-+	__gpio_as_msc();
-+	__msc_init_io();
-+
-+	/* Step-2: turn on power of card */
-+#if !defined(CONFIG_SAKC)
-+	__msc_enable_power();
-+#endif
-+
-+	/* Step-3: Reset MSC Controller. */
-+	__msc_reset();
-+
-+	/* Step-3: mask all IRQs. */
-+	MMC_IRQ_MASK();
-+
-+	/* Step-4: stop MMC/SD clock */
-+	jz_mmc_stop_clock();
-+	mmc_init_card();
-+	mmc_select_card();
-+
-+	mmc_dev.block_read = mmc_bread;
-+	fat_register_device(&mmc_dev,1); /* partitions start counting with 1 */
-+
-+	return 0;
-+}
-+
-+/*
-+ * Debugging functions
-+ */
-+static char * mmc_result_strings[] = {
-+	"NO_RESPONSE",
-+	"NO_ERROR",
-+	"ERROR_OUT_OF_RANGE",
-+	"ERROR_ADDRESS",
-+	"ERROR_BLOCK_LEN",
-+	"ERROR_ERASE_SEQ",
-+	"ERROR_ERASE_PARAM",
-+	"ERROR_WP_VIOLATION",
-+	"ERROR_CARD_IS_LOCKED",
-+	"ERROR_LOCK_UNLOCK_FAILED",
-+	"ERROR_COM_CRC",
-+	"ERROR_ILLEGAL_COMMAND",
-+	"ERROR_CARD_ECC_FAILED",
-+	"ERROR_CC",
-+	"ERROR_GENERAL",
-+	"ERROR_UNDERRUN",
-+	"ERROR_OVERRUN",
-+	"ERROR_CID_CSD_OVERWRITE",
-+	"ERROR_STATE_MISMATCH",
-+	"ERROR_HEADER_MISMATCH",
-+	"ERROR_TIMEOUT",
-+	"ERROR_CRC",
-+	"ERROR_DRIVER_FAILURE",
-+};
-+
-+char * mmc_result_to_string(int i)
-+{
-+	return mmc_result_strings[i+1];
-+}
-+
-+static char * card_state_strings[] = {
-+	"empty",
-+	"idle",
-+	"ready",
-+	"ident",
-+	"stby",
-+	"tran",
-+	"data",
-+	"rcv",
-+	"prg",
-+	"dis",
-+};
-+
-+static inline char * card_state_to_string(int i)
-+{
-+	return card_state_strings[i+1];
-+}
-+
-+/*
-+ * Utility functions
-+ */
-+
-+#define PARSE_U32(_buf,_index) \
-+	(((u32)_buf[_index]) << 24) | (((u32)_buf[_index+1]) << 16) | \
-+        (((u32)_buf[_index+2]) << 8) | ((u32)_buf[_index+3]);
-+
-+#define PARSE_U16(_buf,_index) \
-+	(((u16)_buf[_index]) << 8) | ((u16)_buf[_index+1]);
-+
-+int mmc_unpack_csd(struct mmc_request *request, struct mmc_csd *csd)
-+{
-+	u8 *buf = request->response;
-+	int num = 0;
-+
-+	if (request->result)
-+		return request->result;
-+
-+	if (buf[0] != 0x3f)
-+		return MMC_ERROR_HEADER_MISMATCH;
-+
-+	csd->csd_structure = (buf[1] & 0xc0) >> 6;
-+	if (csd->csd_structure)
-+		sd2_0 = 1;
-+	else
-+		sd2_0 = 0;
-+
-+	switch (csd->csd_structure) {
-+	case 0 :/* Version 1.01-1.10
-+		 * Version 2.00/Standard Capacity */
-+		csd->taac               = buf[2];
-+		csd->nsac               = buf[3];
-+		csd->tran_speed         = buf[4];
-+		csd->ccc                = (((u16)buf[5]) << 4) | ((buf[6] & 0xf0) >> 4);
-+		csd->read_bl_len        = buf[6] & 0x0f;
-+		/* for support 2GB card*/
-+		if (csd->read_bl_len >= 10)
-+		{
-+			num = csd->read_bl_len - 9;
-+			csd->read_bl_len = 9;
-+		}
-+
-+		csd->read_bl_partial    = (buf[7] & 0x80) ? 1 : 0;
-+		csd->write_blk_misalign = (buf[7] & 0x40) ? 1 : 0;
-+		csd->read_blk_misalign  = (buf[7] & 0x20) ? 1 : 0;
-+		csd->dsr_imp            = (buf[7] & 0x10) ? 1 : 0;
-+		csd->c_size             = ((((u16)buf[7]) & 0x03) << 10) | (((u16)buf[8]) << 2) | (((u16)buf[9]) & 0xc0) >> 6;
-+
-+		if (num)
-+			csd->c_size = csd->c_size << num;
-+
-+
-+		csd->vdd_r_curr_min     = (buf[9] & 0x38) >> 3;
-+		csd->vdd_r_curr_max     = buf[9] & 0x07;
-+		csd->vdd_w_curr_min     = (buf[10] & 0xe0) >> 5;
-+		csd->vdd_w_curr_max     = (buf[10] & 0x1c) >> 2;
-+		csd->c_size_mult        = ((buf[10] & 0x03) << 1) | ((buf[11] & 0x80) >> 7);
-+		csd->sector_size    = (buf[11] & 0x7c) >> 2;
-+		csd->erase_grp_size = ((buf[11] & 0x03) << 3) | ((buf[12] & 0xe0) >> 5);
-+		csd->wp_grp_size        = buf[12] & 0x1f;
-+		csd->wp_grp_enable      = (buf[13] & 0x80) ? 1 : 0;
-+		csd->default_ecc        = (buf[13] & 0x60) >> 5;
-+		csd->r2w_factor         = (buf[13] & 0x1c) >> 2;
-+		csd->write_bl_len       = ((buf[13] & 0x03) << 2) | ((buf[14] & 0xc0) >> 6);
-+		if (csd->write_bl_len >= 10)
-+			csd->write_bl_len = 9;
-+
-+		csd->write_bl_partial   = (buf[14] & 0x20) ? 1 : 0;
-+		csd->file_format_grp    = (buf[15] & 0x80) ? 1 : 0;
-+		csd->copy               = (buf[15] & 0x40) ? 1 : 0;
-+		csd->perm_write_protect = (buf[15] & 0x20) ? 1 : 0;
-+		csd->tmp_write_protect  = (buf[15] & 0x10) ? 1 : 0;
-+		csd->file_format        = (buf[15] & 0x0c) >> 2;
-+		csd->ecc                = buf[15] & 0x03;
-+		break;
-+	case 1 :	/* Version 2.00/High Capacity */
-+		csd->taac               = 0;
-+		csd->nsac               = 0;
-+		csd->tran_speed         = buf[4];
-+		csd->ccc                = (((u16)buf[5]) << 4) | ((buf[6] & 0xf0) >> 4);
-+
-+		csd->read_bl_len        = 9;
-+		csd->read_bl_partial    = 0;
-+		csd->write_blk_misalign = 0;
-+		csd->read_blk_misalign  = 0;
-+		csd->dsr_imp            = (buf[7] & 0x10) ? 1 : 0;
-+		csd->c_size             = ((((u16)buf[8]) & 0x3f) << 16) | (((u16)buf[9]) << 8) | ((u16)buf[10]) ;
-+		csd->sector_size	= 0x7f;
-+		csd->erase_grp_size	= 0;
-+		csd->wp_grp_size        = 0;
-+		csd->wp_grp_enable      = 0;
-+		csd->default_ecc        = (buf[13] & 0x60) >> 5;
-+		csd->r2w_factor         = 4;/* Unused */
-+		csd->write_bl_len       = 9;
-+
-+		csd->write_bl_partial   = 0;
-+		csd->file_format_grp    = 0;
-+		csd->copy               = (buf[15] & 0x40) ? 1 : 0;
-+		csd->perm_write_protect = (buf[15] & 0x20) ? 1 : 0;
-+		csd->tmp_write_protect  = (buf[15] & 0x10) ? 1 : 0;
-+		csd->file_format        = 0;
-+		csd->ecc                = buf[15] & 0x03;
-+	}
-+
-+	return 0;
-+}
-+
-+int mmc_unpack_r1(struct mmc_request *request, struct mmc_response_r1 *r1, enum card_state state)
-+{
-+	u8 *buf = request->response;
-+
-+	if (request->result)
-+		return request->result;
-+
-+	r1->cmd    = buf[0];
-+	r1->status = PARSE_U32(buf,1);
-+
-+	debug("mmc_unpack_r1: cmd=%d status=%08x\n", r1->cmd, r1->status);
-+
-+	if (R1_STATUS(r1->status)) {
-+		if (r1->status & R1_OUT_OF_RANGE)       return MMC_ERROR_OUT_OF_RANGE;
-+		if (r1->status & R1_ADDRESS_ERROR)      return MMC_ERROR_ADDRESS;
-+		if (r1->status & R1_BLOCK_LEN_ERROR)    return MMC_ERROR_BLOCK_LEN;
-+		if (r1->status & R1_ERASE_SEQ_ERROR)    return MMC_ERROR_ERASE_SEQ;
-+		if (r1->status & R1_ERASE_PARAM)        return MMC_ERROR_ERASE_PARAM;
-+		if (r1->status & R1_WP_VIOLATION)       return MMC_ERROR_WP_VIOLATION;
-+		/*if (r1->status & R1_CARD_IS_LOCKED)     return MMC_ERROR_CARD_IS_LOCKED; */
-+		if (r1->status & R1_LOCK_UNLOCK_FAILED) return MMC_ERROR_LOCK_UNLOCK_FAILED;
-+		if (r1->status & R1_COM_CRC_ERROR)      return MMC_ERROR_COM_CRC;
-+		if (r1->status & R1_ILLEGAL_COMMAND)    return MMC_ERROR_ILLEGAL_COMMAND;
-+		if (r1->status & R1_CARD_ECC_FAILED)    return MMC_ERROR_CARD_ECC_FAILED;
-+		if (r1->status & R1_CC_ERROR)           return MMC_ERROR_CC;
-+		if (r1->status & R1_ERROR)              return MMC_ERROR_GENERAL;
-+		if (r1->status & R1_UNDERRUN)           return MMC_ERROR_UNDERRUN;
-+		if (r1->status & R1_OVERRUN)            return MMC_ERROR_OVERRUN;
-+		if (r1->status & R1_CID_CSD_OVERWRITE)  return MMC_ERROR_CID_CSD_OVERWRITE;
-+	}
-+
-+	if (buf[0] != request->cmd) 
-+		return MMC_ERROR_HEADER_MISMATCH;
-+
-+	/* This should be last - it's the least dangerous error */
-+
-+	return 0;
-+}
-+
-+int mmc_unpack_scr(struct mmc_request *request, struct mmc_response_r1 *r1, enum card_state state, u32 *scr)
-+{
-+        u8 *buf = request->response;
-+	if (request->result)
-+		return request->result;
-+
-+        *scr = PARSE_U32(buf, 5); /* Save SCR returned by the SD Card */
-+        return mmc_unpack_r1(request, r1, state);
-+
-+}
-+
-+int mmc_unpack_r6(struct mmc_request *request, struct mmc_response_r1 *r1, enum card_state state, int *rca)
-+{
-+	u8 *buf = request->response;
-+
-+	if (request->result)
-+		return request->result;
-+
-+        *rca = PARSE_U16(buf,1);  /* Save RCA returned by the SD Card */
-+
-+        *(buf+1) = 0;
-+        *(buf+2) = 0;
-+
-+        return mmc_unpack_r1(request, r1, state);
-+}
-+
-+int mmc_unpack_cid(struct mmc_request *request, struct mmc_cid *cid)
-+{
-+	int i;
-+	u8 *buf = request->response;
-+
-+	if (request->result) 
-+		return request->result;
-+
-+	cid->mid = buf[1];
-+	cid->oid = PARSE_U16(buf,2);
-+	for (i = 0 ; i < 5 ; i++)
-+		cid->pnm[i] = buf[4+i];
-+	cid->pnm[6] = 0;
-+	cid->prv = buf[10];
-+	cid->psn = PARSE_U32(buf,10);
-+	cid->mdt = buf[15];
-+
-+	printf("Man %02x OEM 0x%04x \"%s\" %d.%d 0x%08x "
-+	       "Date %02u/%04u\n",
-+	       cid->mid,
-+	       cid->oid,
-+	       cid->pnm, 
-+	       cid->prv >> 4,
-+	       cid->prv & 0xf, 
-+	       cid->psn,
-+	       cid->mdt & 0xf,
-+	       (cid->mdt >> 4) + 2000);
-+
-+	if (buf[0] != 0x3f)
-+		return MMC_ERROR_HEADER_MISMATCH;
-+      	return 0;
-+}
-+
-+int mmc_unpack_r3(struct mmc_request *request, struct mmc_response_r3 *r3)
-+{
-+	u8 *buf = request->response;
-+
-+	if (request->result)
-+		return request->result;
-+
-+	r3->ocr = PARSE_U32(buf,1);
-+	debug("mmc_unpack_r3: ocr=%08x\n", r3->ocr);
-+
-+	if (buf[0] != 0x3f)  return MMC_ERROR_HEADER_MISMATCH;
-+	return 0;
-+}
-+
-+#define KBPS 1
-+#define MBPS 1000
-+
-+static u32 ts_exp[] = { 100*KBPS, 1*MBPS, 10*MBPS, 100*MBPS, 0, 0, 0, 0 };
-+static u32 ts_mul[] = { 0,    1000, 1200, 1300, 1500, 2000, 2500, 3000, 
-+			3500, 4000, 4500, 5000, 5500, 6000, 7000, 8000 };
-+
-+u32 mmc_tran_speed(u8 ts)
-+{
-+	u32 rate = ts_exp[(ts & 0x7)] * ts_mul[(ts & 0x78) >> 3];
-+
-+	if (rate <= 0) {
-+		debug("%s: error - unrecognized speed 0x%02x\n", __func__, ts);
-+		return 1;
-+	}
-+
-+	return rate;
-+}
-+
-+void mmc_send_cmd(struct mmc_request *request, int cmd, u32 arg, 
-+		  u16 nob, u16 block_len, enum mmc_rsp_t rtype, u8 *buffer)
-+{
-+	request->cmd       = cmd;
-+	request->arg       = arg;
-+	request->rtype     = rtype;
-+	request->nob       = nob;
-+	request->block_len = block_len;
-+	request->buffer    = buffer;
-+	request->cnt       = nob * block_len;
-+
-+	jz_mmc_exec_cmd(request);
-+}
-diff --git a/drivers/mmc/jz_mmc.h b/drivers/mmc/jz_mmc.h
-new file mode 100644
-index 0000000..936c514
---- /dev/null
-+++ b/drivers/mmc/jz_mmc.h
-@@ -0,0 +1,176 @@
-+/*
-+ *  linux/drivers/mmc/jz_mmc.h
-+ *
-+ *  Author: Vladimir Shebordaev, Igor Oblakov
-+ *  Copyright:  MontaVista Software Inc.
-+ *
-+ *  $Id: jz_mmc.h,v 1.3 2007-06-15 08:04:20 jlwei Exp $
-+ *
-+ *  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.
-+ */
-+#ifndef __MMC_JZMMC_H__
-+#define __MMC_JZMMC_H__
-+
-+#define ID_TO_RCA(x) ((x)+1)
-+#define MMC_OCR_ARG		0x00ff8000	/* Argument of OCR */
-+
-+/* Standard MMC/SD clock speeds */
-+#define MMC_CLOCK_SLOW    400000      /* 400 kHz for initial setup */
-+#define MMC_CLOCK_FAST  20000000      /* 20 MHz for maximum for normal operation */
-+#define SD_CLOCK_FAST   24000000      /* 24 MHz for SD Cards */
-+
-+/* Use negative numbers to disambiguate */
-+#define MMC_CIM_RESET            -1
-+#define SET_BUS_WIDTH            6    /* ac   [1:0] bus width    R1  */    
-+
-+#define R1_OUT_OF_RANGE		(1 << 31)	/* er, c */
-+#define R1_ADDRESS_ERROR	(1 << 30)	/* erx, c */
-+#define R1_BLOCK_LEN_ERROR	(1 << 29)	/* er, c */
-+#define R1_ERASE_SEQ_ERROR      (1 << 28)	/* er, c */
-+#define R1_ERASE_PARAM		(1 << 27)	/* ex, c */
-+#define R1_WP_VIOLATION		(1 << 26)	/* erx, c */
-+#define R1_CARD_IS_LOCKED	(1 << 25)	/* sx, a */
-+#define R1_LOCK_UNLOCK_FAILED	(1 << 24)	/* erx, c */
-+#define R1_COM_CRC_ERROR	(1 << 23)	/* er, b */
-+#define R1_ILLEGAL_COMMAND	(1 << 22)	/* er, b */
-+#define R1_CARD_ECC_FAILED	(1 << 21)	/* ex, c */
-+#define R1_CC_ERROR		(1 << 20)	/* erx, c */
-+#define R1_ERROR		(1 << 19)	/* erx, c */
-+#define R1_UNDERRUN		(1 << 18)	/* ex, c */
-+#define R1_OVERRUN		(1 << 17)	/* ex, c */
-+#define R1_CID_CSD_OVERWRITE	(1 << 16)	/* erx, c, CID/CSD overwrite */
-+#define R1_WP_ERASE_SKIP	(1 << 15)	/* sx, c */
-+#define R1_CARD_ECC_DISABLED	(1 << 14)	/* sx, a */
-+#define R1_ERASE_RESET		(1 << 13)	/* sr, c */
-+#define R1_STATUS(x)            (x & 0xFFFFE000)
-+
-+#define MMC_CARD_BUSY	0x80000000	/* Card Power up status bit */
-+
-+#define MMC_PROGRAM_CID          26   /* adtc                    R1  */
-+#define MMC_PROGRAM_CSD          27   /* adtc                    R1  */
-+
-+#define MMC_GO_IRQ_STATE         40   /* bcr                     R5  */
-+#define MMC_GEN_CMD              56   /* adtc [0] RD/WR          R1b */
-+#define MMC_LOCK_UNLOCK          42   /* adtc                    R1b */
-+#define MMC_WRITE_DAT_UNTIL_STOP 20   /* adtc [31:0] data addr   R1  */
-+#define MMC_READ_DAT_UNTIL_STOP  11   /* adtc [31:0] dadr        R1  */
-+#define MMC_SEND_WRITE_PROT      30   /* adtc [31:0] wpdata addr R1  */
-+
-+
-+enum mmc_result_t {
-+	MMC_NO_RESPONSE        = -1,
-+	MMC_NO_ERROR           = 0,
-+	MMC_ERROR_OUT_OF_RANGE,
-+	MMC_ERROR_ADDRESS,
-+	MMC_ERROR_BLOCK_LEN,
-+	MMC_ERROR_ERASE_SEQ,
-+	MMC_ERROR_ERASE_PARAM,
-+	MMC_ERROR_WP_VIOLATION,
-+	MMC_ERROR_CARD_IS_LOCKED,
-+	MMC_ERROR_LOCK_UNLOCK_FAILED,
-+	MMC_ERROR_COM_CRC,
-+	MMC_ERROR_ILLEGAL_COMMAND,
-+	MMC_ERROR_CARD_ECC_FAILED,
-+	MMC_ERROR_CC,
-+	MMC_ERROR_GENERAL,
-+	MMC_ERROR_UNDERRUN,
-+	MMC_ERROR_OVERRUN,
-+	MMC_ERROR_CID_CSD_OVERWRITE,
-+	MMC_ERROR_STATE_MISMATCH,
-+	MMC_ERROR_HEADER_MISMATCH,
-+	MMC_ERROR_TIMEOUT,
-+	MMC_ERROR_CRC,
-+	MMC_ERROR_DRIVER_FAILURE,
-+};
-+
-+enum card_state {
-+	CARD_STATE_EMPTY = -1,
-+	CARD_STATE_IDLE	 = 0,
-+	CARD_STATE_READY = 1,
-+	CARD_STATE_IDENT = 2,
-+	CARD_STATE_STBY	 = 3,
-+	CARD_STATE_TRAN	 = 4,
-+	CARD_STATE_DATA	 = 5,
-+	CARD_STATE_RCV	 = 6,
-+	CARD_STATE_PRG	 = 7,
-+	CARD_STATE_DIS	 = 8,
-+};
-+
-+enum mmc_rsp_t {
-+	RESPONSE_NONE   = 0,
-+	RESPONSE_R1     = 1,
-+	RESPONSE_R1B    = 2,
-+	RESPONSE_R2_CID = 3,
-+	RESPONSE_R2_CSD  = 4,
-+	RESPONSE_R3      = 5,
-+	RESPONSE_R4      = 6,
-+	RESPONSE_R5      = 7,
-+        RESPONSE_R6      = 8,
-+};
-+
-+struct mmc_response_r1 {
-+	u8  cmd;
-+	u32 status;
-+};
-+
-+struct mmc_response_r3 {  
-+	u32 ocr;
-+}; 
-+
-+/* the information structure of MMC/SD Card */
-+struct  mmc_info {
-+	int             id;     /* Card index */
-+        int             sd;     /* MMC or SD card */
-+        int             rca;    /* RCA */
-+        u32             scr;    /* SCR 63:32*/
-+	int             flags;  /* Ejected, inserted */
-+	enum card_state state;  /* empty, ident, ready, whatever */
-+
-+	/* Card specific information */
-+	struct mmc_cid  cid;
-+	struct mmc_csd  csd;
-+	u32             block_num;
-+	u32             block_len;
-+	u32             erase_unit;
-+};
-+
-+struct mmc_info mmcinfo;
-+
-+struct mmc_request {
-+	int               index;      /* Slot index - used for CS lines */
-+	int               cmd;        /* Command to send */
-+	u32               arg;        /* Argument to send */
-+	enum mmc_rsp_t    rtype;      /* Response type expected */
-+
-+	/* Data transfer (these may be modified at the low level) */
-+	u16               nob;        /* Number of blocks to transfer*/
-+	u16               block_len;  /* Block length */
-+	u8               *buffer;     /* Data buffer */
-+	u32               cnt;        /* Data length, for PIO */
-+
-+	/* Results */
-+	u8                response[18]; /* Buffer to store response - CRC is optional */
-+	enum mmc_result_t result;
-+};
-+
-+char * mmc_result_to_string(int);
-+int    mmc_unpack_csd(struct mmc_request *request, struct mmc_csd *csd);
-+int    mmc_unpack_r1(struct mmc_request *request, struct mmc_response_r1 *r1, enum card_state state);
-+int    mmc_unpack_r6(struct mmc_request *request, struct mmc_response_r1 *r1, enum card_state state, int *rca);
-+int    mmc_unpack_scr(struct mmc_request *request, struct mmc_response_r1 *r1, enum card_state state, u32 *scr);
-+int    mmc_unpack_cid(struct mmc_request *request, struct mmc_cid *cid);
-+int    mmc_unpack_r3(struct mmc_request *request, struct mmc_response_r3 *r3);
-+
-+void   mmc_send_cmd(struct mmc_request *request, int cmd, u32 arg, 
-+		     u16 nob, u16 block_len, enum mmc_rsp_t rtype, u8 *buffer);
-+u32    mmc_tran_speed(u8 ts);
-+void   jz_mmc_set_clock(int sd, u32 rate);
-+
-+static inline void mmc_simple_cmd(struct mmc_request *request, int cmd, u32 arg, enum mmc_rsp_t rtype)
-+{
-+	mmc_send_cmd( request, cmd, arg, 0, 0, rtype, 0);
-+}
-+
-+#endif /* __MMC_JZMMC_H__ */
-diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h
-index 7bff444..7b33be0 100644
---- a/include/configs/qi_lb60.h
-+++ b/include/configs/qi_lb60.h
-@@ -31,6 +31,15 @@
- /*
-  * Miscellaneous configurable options
-  */
-+#define CONFIG_JZ4740_MMC
-+#define CONFIG_MMC      	1
-+#define CONFIG_FAT      	1
-+#define CONFIG_DOS_PARTITION	1
-+#define CONFIG_CMD_MMC
-+#define CONFIG_CMD_FAT
-+#define CONFIG_CMD_EXT2
-+
-+
- #define CONFIG_SYS_SDRAM_BASE		0x80000000	/* Cached addr */
- #define CONFIG_SYS_INIT_SP_OFFSET	0x400000
- #define CONFIG_SYS_LOAD_ADDR		0x80600000
-diff --git a/include/mmc.h b/include/mmc.h
-index a13e2bd..3c4761c 100644
---- a/include/mmc.h
-+++ b/include/mmc.h
-@@ -283,4 +283,44 @@ struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode);
- int mmc_legacy_init(int verbose);
- #endif
- 
-+struct mmc_csd
-+{
-+	u8	csd_structure:2,
-+		spec_vers:4,
-+		rsvd1:2;
-+	u8	taac;
-+	u8	nsac;
-+	u8	tran_speed;
-+	u16	ccc:12,
-+		read_bl_len:4;
-+	u32	c_size:22;
-+	u64	read_bl_partial:1,
-+		write_blk_misalign:1,
-+		read_blk_misalign:1,
-+		dsr_imp:1,
-+		rsvd2:2,
-+		vdd_r_curr_min:3,
-+		vdd_r_curr_max:3,
-+		vdd_w_curr_min:3,
-+		vdd_w_curr_max:3,
-+		c_size_mult:3,
-+		sector_size:5,
-+		erase_grp_size:5,
-+		wp_grp_size:5,
-+		wp_grp_enable:1,
-+		default_ecc:2,
-+		r2w_factor:3,
-+		write_bl_len:4,
-+		write_bl_partial:1,
-+		rsvd3:5;
-+	u8	file_format_grp:1,
-+		copy:1,
-+		perm_write_protect:1,
-+		tmp_write_protect:1,
-+		file_format:2,
-+		ecc:2;
-+	u8	crc:7;
-+	u8	one:1;
-+};
-+
- #endif /* _MMC_H_ */
--- 
-1.7.9.5
-

+ 0 - 200
package/boot/uboot-xburst/patches/0004-add-more-boot-options-F1-F2-F3-F4-M-S.patch

@@ -1,200 +0,0 @@
-From c52b6168979d03fc31205444c3278c537787472a Mon Sep 17 00:00:00 2001
-From: Xiangfu <xiangfu@openmobilefree.net>
-Date: Wed, 10 Oct 2012 18:39:55 +0800
-Subject: [PATCH 4/6] add more boot options(F1/F2/F3/F4/M/S)
-
----
- arch/mips/include/asm/global_data.h |    3 +++
- arch/mips/lib/bootm.c               |   17 ++++++++++++++++-
- board/qi/qi_lb60/qi_lb60.c          |   26 +++++++++++++++++++++++---
- common/main.c                       |   21 +++++++++++++++++++--
- include/configs/qi_lb60.h           |   32 ++++++++++++++++++++++++++++++++
- 5 files changed, 93 insertions(+), 6 deletions(-)
-
-diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h
-index 6e2cdc7..cd03d7e 100644
---- a/arch/mips/include/asm/global_data.h
-+++ b/arch/mips/include/asm/global_data.h
-@@ -59,6 +59,9 @@ typedef	struct	global_data {
- 	unsigned long	env_valid;	/* Checksum of Environment valid? */
- 	void		**jt;		/* jump table */
- 	char		env_buf[32];	/* buffer for getenv() before reloc. */
-+#if defined(CONFIG_NANONOTE)
-+        unsigned long   boot_option;
-+#endif
- } gd_t;
- 
- #include <asm-generic/global_data_flags.h>
-diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
-index 608c1a7..e00416b 100644
---- a/arch/mips/lib/bootm.c
-+++ b/arch/mips/lib/bootm.c
-@@ -47,10 +47,25 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
- 			bootm_headers_t *images)
- {
- 	void (*theKernel) (int, char **, char **, int *);
--	char *commandline = getenv("bootargs");
-+	char *commandline;
- 	char env_buf[12];
- 	char *cp;
- 
-+#if defined(CONFIG_NANONOTE)
-+        if (gd->boot_option & BOOT_FROM_MEMCARD)
-+                commandline = getenv ("bootargsfromsd");
-+        else if (gd->boot_option & BOOT_WITH_F1)
-+                commandline = getenv ("bootargsf1");
-+        else if (gd->boot_option & BOOT_WITH_F2)
-+                commandline = getenv ("bootargsf2");
-+        else if (gd->boot_option & BOOT_WITH_F3)
-+                commandline = getenv ("bootargsf3");
-+        else if (gd->boot_option & BOOT_WITH_F4)
-+                commandline = getenv ("bootargsf4");
-+        else
-+#endif
-+                commandline = getenv ("bootargs");
-+
- 	if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
- 		return 1;
- 
-diff --git a/board/qi/qi_lb60/qi_lb60.c b/board/qi/qi_lb60/qi_lb60.c
-index a2ba648..d622219 100644
---- a/board/qi/qi_lb60/qi_lb60.c
-+++ b/board/qi/qi_lb60/qi_lb60.c
-@@ -15,7 +15,7 @@ DECLARE_GLOBAL_DATA_PTR;
- 
- static void gpio_init(void)
- {
--	unsigned int i;
-+	unsigned int i, j;
- 
- 	/* Initialize NAND Flash Pins */
- 	__gpio_as_nand();
-@@ -42,14 +42,34 @@ static void gpio_init(void)
- 
- 	if (__gpio_get_pin(GPIO_KEYIN_BASE + 2) == 0){
- 		printf("[S] pressed, enable UART0\n");
-+		gd->boot_option |= BOOT_WITH_ENABLE_UART;
- 		__gpio_as_uart0();
- 	} else {
- 		__gpio_as_input(GPIO_KEYIN_8);
- 		__gpio_enable_pull(GPIO_KEYIN_8);
- 	}
- 
--	/* enable the TP4, TP5 as UART0 */
--	__gpio_jtag_to_uart0();
-+	if (__gpio_get_pin(GPIO_KEYIN_BASE + 3) == 0) {
-+		printf("[M] pressed, boot from memory card\n");
-+		gd->boot_option |= BOOT_FROM_MEMCARD;
-+		__gpio_jtag_to_uart0();
-+	}
-+
-+	for (j = 0; j < 4; j++) {
-+		for (i = 0; i < 4; i++)
-+			__gpio_set_pin(GPIO_KEYOUT_BASE + i);
-+
-+		__gpio_clear_pin(GPIO_KEYOUT_BASE + j);
-+
-+		if (__gpio_get_pin(GPIO_KEYIN_BASE) == 0) {
-+			printf("[F%d] pressed", (j + 1));
-+			gd->boot_option |= (1 << (j + 2));
-+			/* BOOT_WITH_F1	(1 << 2) */
-+			/* BOOT_WITH_F2	(1 << 3) */
-+			/* BOOT_WITH_F3	(1 << 4) */
-+			/* BOOT_WITH_F4	(1 << 5) */
-+		}
-+	}
- 
- 	__gpio_as_output(GPIO_AUDIO_POP);
- 	__gpio_set_pin(GPIO_AUDIO_POP);
-diff --git a/common/main.c b/common/main.c
-index 9507cec..dbfb7ca 100644
---- a/common/main.c
-+++ b/common/main.c
-@@ -355,7 +355,11 @@ void main_loop (void)
- #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
- 	s = getenv ("bootdelay");
- 	bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;
--
-+#if defined(CONFIG_NANONOTE)
-+	DECLARE_GLOBAL_DATA_PTR;
-+	if (gd->boot_option & BOOT_WITH_ENABLE_UART)
-+		bootdelay = 3;
-+# endif
- 	debug ("### main_loop entered: bootdelay=%d\n\n", bootdelay);
- 
- #if defined(CONFIG_MENU_SHOW)
-@@ -379,7 +383,20 @@ void main_loop (void)
- 	}
- 	else
- #endif /* CONFIG_BOOTCOUNT_LIMIT */
--		s = getenv ("bootcmd");
-+#if defined(CONFIG_NANONOTE)
-+		if (gd->boot_option & BOOT_FROM_MEMCARD)
-+			s = getenv ("bootcmdfromsd");
-+		else if (gd->boot_option & BOOT_WITH_F1)
-+			s = getenv ("bootcmdf1");
-+		else if (gd->boot_option & BOOT_WITH_F2)
-+			s = getenv ("bootcmdf2");
-+		else if (gd->boot_option & BOOT_WITH_F3)
-+			s = getenv ("bootcmdf3");
-+		else if (gd->boot_option & BOOT_WITH_F4)
-+			s = getenv ("bootcmdf4");
-+		else
-+#endif
-+			s = getenv ("bootcmd");
- 
- 	debug ("### main_loop: bootcmd=\"%s\"\n", s ? s : "<UNDEFINED>");
- 
-diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h
-index 7b33be0..52b370c 100644
---- a/include/configs/qi_lb60.h
-+++ b/include/configs/qi_lb60.h
-@@ -31,6 +31,7 @@
- /*
-  * Miscellaneous configurable options
-  */
-+#define CONFIG_NANONOTE
- #define CONFIG_JZ4740_MMC
- #define CONFIG_MMC      	1
- #define CONFIG_FAT      	1
-@@ -39,6 +40,37 @@
- #define CONFIG_CMD_FAT
- #define CONFIG_CMD_EXT2
- 
-+#define CONFIG_CMD_UBIFS
-+#define CONFIG_CMD_UBI
-+#define CONFIG_MTD_PARTITIONS
-+#define CONFIG_MTD_DEVICE
-+#define CONFIG_CMD_MTDPARTS
-+#define CONFIG_CMD_UBI
-+#define CONFIG_CMD_UBIFS
-+#define CONFIG_LZO
-+#define CONFIG_RBTREE
-+
-+#define MTDIDS_DEFAULT		"nand0=jz4740-nand"
-+#define MTDPARTS_DEFAULT	"mtdparts=jz4740-nand:4M@0(uboot)ro,4M@4M(kernel)ro,512M@8M(rootfs)ro,-(data)ro"
-+
-+#define BOOT_FROM_MEMCARD	1
-+#define BOOT_WITH_ENABLE_UART	(1 << 1)	/* Vaule for global_data.h gd->boot_option */
-+#define BOOT_WITH_F1		(1 << 2)
-+#define BOOT_WITH_F2		(1 << 3)
-+#define BOOT_WITH_F3		(1 << 4)
-+#define BOOT_WITH_F4		(1 << 5)
-+
-+#define CONFIG_EXTRA_ENV_SETTINGS \
-+	"bootcmdfromsd=mmc init; ext2load mmc 0 0x80600000 /boot/uImage; bootm;\0" \
-+	"bootargsfromsd=mem=32M console=tty0 console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mmcblk0p1 rw rootwait\0" \
-+	"bootcmdf1=mmc init; ext2load mmc 0:1 0x80600000 /boot/uImage; bootm;\0" \
-+	"bootargsf1=mem=32M console=tty0 console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mmcblk0p1 rw rootwait\0" \
-+	"bootcmdf2=mmc init; ext2load mmc 0:2 0x80600000 /boot/uImage; bootm;\0" \
-+	"bootargsf2=mem=32M console=tty0 console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mmcblk0p2 rw rootwait\0" \
-+	"bootcmdf3=mmc init; ext2load mmc 0:3 0x80600000 /boot/uImage; bootm;\0" \
-+	"bootargsf3=mem=32M console=tty0 console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mmcblk0p3 rw rootwait\0" \
-+	"bootcmdf4=mtdparts default;ubi part rootfs;ubifsmount rootfs;ubifsload 0x80600000 /boot/uImage; bootm;\0" \
-+	"bootargsf4=mem=32M console=tty0 console=ttyS0,57600n8 ubi.mtd=2 rootfstype=ubifs root=ubi0:rootfs rw rootwait"
- 
- #define CONFIG_SYS_SDRAM_BASE		0x80000000	/* Cached addr */
- #define CONFIG_SYS_INIT_SP_OFFSET	0x400000
--- 
-1.7.9.5
-

+ 0 - 847
package/boot/uboot-xburst/patches/0005-add-nanonote-lcd-support.patch

@@ -1,847 +0,0 @@
-From ca8c5216cfd3ad3fda9867ed2d157ae5a209834b Mon Sep 17 00:00:00 2001
-From: Xiangfu <xiangfu@openmobilefree.net>
-Date: Wed, 10 Oct 2012 22:05:27 +0800
-Subject: [PATCH 5/6] add nanonote lcd support
-
----
- arch/mips/include/asm/global_data.h |    1 +
- arch/mips/include/asm/jz4740.h      |   90 ++++++++
- arch/mips/lib/board.c               |    6 +
- common/lcd.c                        |    9 +-
- drivers/video/Makefile              |    1 +
- drivers/video/nanonote_gpm940b0.c   |  400 +++++++++++++++++++++++++++++++++++
- drivers/video/nanonote_gpm940b0.h   |  135 ++++++++++++
- include/configs/qi_lb60.h           |    7 +
- include/lcd.h                       |   52 ++++-
- 9 files changed, 697 insertions(+), 4 deletions(-)
- create mode 100644 drivers/video/nanonote_gpm940b0.c
- create mode 100644 drivers/video/nanonote_gpm940b0.h
-
-diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h
-index cd03d7e..7cec2de 100644
---- a/arch/mips/include/asm/global_data.h
-+++ b/arch/mips/include/asm/global_data.h
-@@ -44,6 +44,7 @@ typedef	struct	global_data {
- 	unsigned long	per_clk;	/* Peripheral bus clock */
- 	unsigned long	mem_clk;	/* Memory bus clock */
- 	unsigned long	dev_clk;	/* Device clock */
-+        unsigned long   fb_base;        /* base address of framebuffer */
- 	/* "static data" needed by most of timer.c */
- 	unsigned long	tbl;
- 	unsigned long	lastinc;
-diff --git a/arch/mips/include/asm/jz4740.h b/arch/mips/include/asm/jz4740.h
-index 68287fb..13724a2 100644
---- a/arch/mips/include/asm/jz4740.h
-+++ b/arch/mips/include/asm/jz4740.h
-@@ -1312,5 +1312,95 @@ do { 								\
-  	while (REG_MSC_STAT & MSC_STAT_IS_RESETTING);		\
- } while (0)
- 
-+/*************************************************************************
-+ * LCD (LCD Controller)
-+ *************************************************************************/
-+#define REG32(addr)	*((volatile u32 *)(addr))
-+
-+#define	CPM_BASE	0xB0000000
-+#define CPM_CPCCR	(CPM_BASE+0x00)
-+#define REG_CPM_CPCCR	REG32(CPM_CPCCR)
-+
-+#define	LCD_BASE	0xB3050000
-+#define LCD_CFG		(LCD_BASE + 0x00) /* LCD Configure Register */
-+#define LCD_VSYNC	(LCD_BASE + 0x04) /* Vertical Synchronize Register */
-+#define LCD_HSYNC	(LCD_BASE + 0x08) /* Horizontal Synchronize Register */
-+#define LCD_VAT		(LCD_BASE + 0x0c) /* Virtual Area Setting Register */
-+#define LCD_DAH		(LCD_BASE + 0x10) /* Display Area Horizontal Start/End Point */
-+#define LCD_DAV		(LCD_BASE + 0x14) /* Display Area Vertical Start/End Point */
-+#define LCD_PS		(LCD_BASE + 0x18) /* PS Signal Setting */
-+#define LCD_CLS		(LCD_BASE + 0x1c) /* CLS Signal Setting */
-+#define LCD_SPL		(LCD_BASE + 0x20) /* SPL Signal Setting */
-+#define LCD_REV		(LCD_BASE + 0x24) /* REV Signal Setting */
-+#define LCD_CTRL	(LCD_BASE + 0x30) /* LCD Control Register */
-+#define LCD_STATE	(LCD_BASE + 0x34) /* LCD Status Register */
-+#define LCD_IID		(LCD_BASE + 0x38) /* Interrupt ID Register */
-+#define LCD_DA0		(LCD_BASE + 0x40) /* Descriptor Address Register 0 */
-+#define LCD_SA0		(LCD_BASE + 0x44) /* Source Address Register 0 */
-+#define LCD_FID0	(LCD_BASE + 0x48) /* Frame ID Register 0 */
-+#define LCD_CMD0	(LCD_BASE + 0x4c) /* DMA Command Register 0 */
-+#define LCD_DA1		(LCD_BASE + 0x50) /* Descriptor Address Register 1 */
-+#define LCD_SA1		(LCD_BASE + 0x54) /* Source Address Register 1 */
-+#define LCD_FID1	(LCD_BASE + 0x58) /* Frame ID Register 1 */
-+#define LCD_CMD1	(LCD_BASE + 0x5c) /* DMA Command Register 1 */
-+
-+#define REG_LCD_CFG	REG32(LCD_CFG)
-+#define REG_LCD_VSYNC	REG32(LCD_VSYNC)
-+#define REG_LCD_HSYNC	REG32(LCD_HSYNC)
-+#define REG_LCD_VAT	REG32(LCD_VAT)
-+#define REG_LCD_DAH	REG32(LCD_DAH)
-+#define REG_LCD_DAV	REG32(LCD_DAV)
-+#define REG_LCD_PS	REG32(LCD_PS)
-+#define REG_LCD_CLS	REG32(LCD_CLS)
-+#define REG_LCD_SPL	REG32(LCD_SPL)
-+#define REG_LCD_REV	REG32(LCD_REV)
-+#define REG_LCD_CTRL	REG32(LCD_CTRL)
-+#define REG_LCD_STATE	REG32(LCD_STATE)
-+#define REG_LCD_IID	REG32(LCD_IID)
-+#define REG_LCD_DA0	REG32(LCD_DA0)
-+#define REG_LCD_SA0	REG32(LCD_SA0)
-+#define REG_LCD_FID0	REG32(LCD_FID0)
-+#define REG_LCD_CMD0	REG32(LCD_CMD0)
-+#define REG_LCD_DA1	REG32(LCD_DA1)
-+#define REG_LCD_SA1	REG32(LCD_SA1)
-+#define REG_LCD_FID1	REG32(LCD_FID1)
-+#define REG_LCD_CMD1	REG32(LCD_CMD1)
-+
-+#define LCD_CTRL_BPP_BIT	0  /* Bits Per Pixel */
-+#define LCD_CTRL_BPP_MASK	(0x07 << LCD_CTRL_BPP_BIT)
-+  #define LCD_CTRL_BPP_1	(0 << LCD_CTRL_BPP_BIT) /* 1 bpp */
-+  #define LCD_CTRL_BPP_2	(1 << LCD_CTRL_BPP_BIT) /* 2 bpp */
-+  #define LCD_CTRL_BPP_4	(2 << LCD_CTRL_BPP_BIT) /* 4 bpp */
-+  #define LCD_CTRL_BPP_8	(3 << LCD_CTRL_BPP_BIT) /* 8 bpp */
-+  #define LCD_CTRL_BPP_16	(4 << LCD_CTRL_BPP_BIT) /* 15/16 bpp */
-+  #define LCD_CTRL_BPP_18_24	(5 << LCD_CTRL_BPP_BIT) /* 18/24/32 bpp */
-+
-+#define LCD_CTRL_BST_BIT	28  /* Burst Length Selection */
-+#define LCD_CTRL_BST_MASK	(0x03 << LCD_CTRL_BST_BIT)
-+  #define LCD_CTRL_BST_4	(0 << LCD_CTRL_BST_BIT) /* 4-word */
-+  #define LCD_CTRL_BST_8	(1 << LCD_CTRL_BST_BIT) /* 8-word */
-+  #define LCD_CTRL_BST_16	(2 << LCD_CTRL_BST_BIT) /* 16-word */
-+#define LCD_CTRL_RGB565		(0 << 27) /* RGB565 mode */
-+#define LCD_CTRL_RGB555		(1 << 27) /* RGB555 mode */
-+#define LCD_CTRL_OFUP		(1 << 26) /* Output FIFO underrun protection enable */
-+#define LCD_CTRL_FRC_BIT	24  /* STN FRC Algorithm Selection */
-+#define LCD_CTRL_FRC_MASK	(0x03 << LCD_CTRL_FRC_BIT)
-+  #define LCD_CTRL_FRC_16	(0 << LCD_CTRL_FRC_BIT) /* 16 grayscale */
-+  #define LCD_CTRL_FRC_4	(1 << LCD_CTRL_FRC_BIT) /* 4 grayscale */
-+  #define LCD_CTRL_FRC_2	(2 << LCD_CTRL_FRC_BIT) /* 2 grayscale */
-+
-+#define CPM_LPCDR	(CPM_BASE+0x64)
-+#define CPM_CLKGR	(CPM_BASE+0x20)
-+#define REG_CPM_LPCDR	REG32(CPM_LPCDR)
-+#define REG_CPM_CLKGR	REG32(CPM_CLKGR)
-+
-+#define __cpm_start_tcu()	(REG_CPM_CLKGR &= ~CPM_CLKGR_TCU)
-+#define __cpm_stop_lcd()	(REG_CPM_CLKGR |= CPM_CLKGR_LCD)
-+#define __cpm_set_pixdiv(v) \
-+	(REG_CPM_LPCDR = (REG_CPM_LPCDR & ~CPM_LPCDR_PIXDIV_MASK) | ((v) << (CPM_LPCDR_PIXDIV_BIT)))
-+#define __cpm_set_ldiv(v) \
-+	(REG_CPM_CPCCR = (REG_CPM_CPCCR & ~CPM_CPCCR_LDIV_MASK) | ((v) << (CPM_CPCCR_LDIV_BIT)))
-+#define __cpm_start_lcd()	(REG_CPM_CLKGR &= ~CPM_CLKGR_LCD)
-+
- #endif	/* !__ASSEMBLY__ */
- #endif	/* __JZ4740_H__ */
-diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
-index b14b33e..c2e64d9 100644
---- a/arch/mips/lib/board.c
-+++ b/arch/mips/lib/board.c
-@@ -172,6 +172,12 @@ void board_init_f(ulong bootflag)
- 	addr &= ~(4096 - 1);
- 	debug("Top of RAM usable for U-Boot at: %08lx\n", addr);
- 
-+#ifdef CONFIG_LCD
-+        /* reserve memory for LCD display (always full pages) */
-+        addr = lcd_setmem (addr);
-+        gd->fb_base = addr;
-+#endif /* CONFIG_LCD */
-+
- 	/* Reserve memory for U-Boot code, data & bss
- 	 * round down to next 16 kB limit
- 	 */
-diff --git a/common/lcd.c b/common/lcd.c
-index b6be800..af1281a 100644
---- a/common/lcd.c
-+++ b/common/lcd.c
-@@ -263,6 +263,13 @@ static void lcd_drawchars(ushort x, ushort y, uchar *str, int count)
- 						lcd_color_fg : lcd_color_bg;
- 				bits <<= 1;
- 			}
-+#elif LCD_BPP == LCD_COLOR32
-+                       uint *m = (uint *)d;
-+                       for (c=0; c<32; ++c) {
-+                               *m++ = (bits & 0x80) ?
-+				       lcd_color_fg : lcd_color_bg;
-+                               bits <<= 1;
-+                       }
- #endif
- 		}
- #if LCD_BPP == LCD_MONOCHROME
-@@ -509,7 +516,7 @@ static inline ushort *configuration_get_cmap(void)
- 	return (ushort *)&(cp->lcd_cmap[255 * sizeof(ushort)]);
- #elif defined(CONFIG_ATMEL_LCD)
- 	return (ushort *)(panel_info.mmio + ATMEL_LCDC_LUT(0));
--#elif !defined(CONFIG_ATMEL_HLCD) && !defined(CONFIG_EXYNOS_FB)
-+#elif !defined(CONFIG_ATMEL_HLCD) && !defined(CONFIG_EXYNOS_FB) && !defined(CONFIG_VIDEO_GPM940B0)
- 	return panel_info.cmap;
- #else
- #if defined(CONFIG_LCD_LOGO)
-diff --git a/drivers/video/Makefile b/drivers/video/Makefile
-index ebb6da8..03625bc 100644
---- a/drivers/video/Makefile
-+++ b/drivers/video/Makefile
-@@ -50,6 +50,7 @@ COBJS-$(CONFIG_VIDEO_SED13806) += sed13806.o
- COBJS-$(CONFIG_VIDEO_SM501) += sm501.o
- COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o videomodes.o
- COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o
-+COBJS-$(CONFIG_VIDEO_GPM940B0) += nanonote_gpm940b0.o
- 
- COBJS	:= $(sort $(COBJS-y))
- SRCS	:= $(COBJS:.o=.c)
-diff --git a/drivers/video/nanonote_gpm940b0.c b/drivers/video/nanonote_gpm940b0.c
-new file mode 100644
-index 0000000..11efb72
---- /dev/null
-+++ b/drivers/video/nanonote_gpm940b0.c
-@@ -0,0 +1,400 @@
-+/*
-+ * JzRISC lcd controller
-+ *
-+ * Xiangfu Liu <xiangfu@sharism.cc>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ * MA 02111-1307 USA
-+ */
-+
-+#include <config.h>
-+#include <common.h>
-+#include <lcd.h>
-+
-+#include <asm/io.h>               /* virt_to_phys() */
-+#include <asm/jz4740.h>
-+
-+#include "nanonote_gpm940b0.h"
-+
-+#define align2(n) (n)=((((n)+1)>>1)<<1)
-+#define align4(n) (n)=((((n)+3)>>2)<<2)
-+#define align8(n) (n)=((((n)+7)>>3)<<3)
-+
-+struct jzfb_info {
-+	unsigned int cfg;	/* panel mode and pin usage etc. */
-+	unsigned int w;
-+	unsigned int h;
-+	unsigned int bpp;	/* bit per pixel */
-+	unsigned int fclk;	/* frame clk */
-+	unsigned int hsw;	/* hsync width, in pclk */
-+	unsigned int vsw;	/* vsync width, in line count */
-+	unsigned int elw;	/* end of line, in pclk */
-+	unsigned int blw;	/* begin of line, in pclk */
-+	unsigned int efw;	/* end of frame, in line count */
-+	unsigned int bfw;	/* begin of frame, in line count */
-+};
-+
-+static struct jzfb_info jzfb = {
-+	MODE_8BIT_SERIAL_TFT | PCLK_N | HSYNC_N | VSYNC_N,
-+	320, 240, 32, 70, 1, 1, 273, 140, 1, 20
-+};
-+
-+vidinfo_t panel_info = {
-+	320, 240, LCD_BPP,
-+};
-+
-+void *lcd_base;
-+void *lcd_console_address;
-+int lcd_line_length;
-+int lcd_color_fg;
-+int lcd_color_bg;
-+short console_col;
-+short console_row;
-+
-+static int jz_lcd_init_mem(void *lcdbase, vidinfo_t *vid)
-+{
-+	u_long palette_mem_size;
-+	struct jz_fb_info *fbi = &vid->jz_fb;
-+	int fb_size = vid->vl_row * (vid->vl_col * NBITS (vid->vl_bpix)) / 8;
-+
-+	fbi->screen = (u_long)lcdbase;
-+	fbi->palette_size = 256;
-+	palette_mem_size = fbi->palette_size * sizeof(u16);
-+
-+	debug("jz_lcd.c palette_mem_size = 0x%08lx\n", (u_long) palette_mem_size);
-+	/* locate palette and descs at end of page following fb */
-+	fbi->palette = (u_long)lcdbase + fb_size + PAGE_SIZE - palette_mem_size;
-+
-+	return 0;
-+}
-+
-+static void jz_lcd_desc_init(vidinfo_t *vid)
-+{
-+	struct jz_fb_info * fbi;
-+	fbi = &vid->jz_fb;
-+	fbi->dmadesc_fblow = (struct jz_fb_dma_descriptor *)((unsigned int)fbi->palette - 3*16);
-+	fbi->dmadesc_fbhigh = (struct jz_fb_dma_descriptor *)((unsigned int)fbi->palette - 2*16);
-+	fbi->dmadesc_palette = (struct jz_fb_dma_descriptor *)((unsigned int)fbi->palette - 1*16);
-+
-+	#define BYTES_PER_PANEL	 (vid->vl_col * vid->vl_row * NBITS(vid->vl_bpix) / 8)
-+
-+	/* populate descriptors */
-+	fbi->dmadesc_fblow->fdadr = virt_to_phys(fbi->dmadesc_fblow);
-+	fbi->dmadesc_fblow->fsadr = virt_to_phys((void *)(fbi->screen + BYTES_PER_PANEL));
-+	fbi->dmadesc_fblow->fidr  = 0;
-+	fbi->dmadesc_fblow->ldcmd = BYTES_PER_PANEL / 4 ;
-+
-+	fbi->fdadr1 = virt_to_phys(fbi->dmadesc_fblow); /* only used in dual-panel mode */
-+
-+	fbi->dmadesc_fbhigh->fsadr = virt_to_phys((void *)fbi->screen);
-+	fbi->dmadesc_fbhigh->fidr = 0;
-+	fbi->dmadesc_fbhigh->ldcmd =  BYTES_PER_PANEL / 4; /* length in word */
-+
-+	fbi->dmadesc_palette->fsadr = virt_to_phys((void *)fbi->palette);
-+	fbi->dmadesc_palette->fidr  = 0;
-+	fbi->dmadesc_palette->ldcmd = (fbi->palette_size * 2)/4 | (1<<28);
-+
-+	if(NBITS(vid->vl_bpix) < 12) {
-+		/* assume any mode with <12 bpp is palette driven */
-+		fbi->dmadesc_palette->fdadr = virt_to_phys(fbi->dmadesc_fbhigh);
-+		fbi->dmadesc_fbhigh->fdadr = virt_to_phys(fbi->dmadesc_palette);
-+		/* flips back and forth between pal and fbhigh */
-+		fbi->fdadr0 = virt_to_phys(fbi->dmadesc_palette);
-+	} else {
-+		/* palette shouldn't be loaded in true-color mode */
-+		fbi->dmadesc_fbhigh->fdadr = virt_to_phys((void *)fbi->dmadesc_fbhigh);
-+		fbi->fdadr0 = virt_to_phys(fbi->dmadesc_fbhigh); /* no pal just fbhigh */
-+	}
-+}
-+
-+static int  jz_lcd_hw_init(vidinfo_t *vid)
-+{
-+	struct jz_fb_info *fbi = &vid->jz_fb;
-+	unsigned int val = 0;
-+	unsigned int pclk;
-+	unsigned int stnH;
-+	int pll_div;
-+
-+	/* Setting Control register */
-+	switch (jzfb.bpp) {
-+	case 1:
-+		val |= LCD_CTRL_BPP_1;
-+		break;
-+	case 2:
-+		val |= LCD_CTRL_BPP_2;
-+		break;
-+	case 4:
-+		val |= LCD_CTRL_BPP_4;
-+		break;
-+	case 8:
-+		val |= LCD_CTRL_BPP_8;
-+		break;
-+	case 15:
-+		val |= LCD_CTRL_RGB555;
-+	case 16:
-+		val |= LCD_CTRL_BPP_16;
-+		break;
-+	case 17 ... 32:
-+		val |= LCD_CTRL_BPP_18_24;	/* target is 4bytes/pixel */
-+		break;
-+
-+	default:
-+		printf("jz_lcd.c The BPP %d is not supported\n", jzfb.bpp);
-+		val |= LCD_CTRL_BPP_16;
-+		break;
-+	}
-+
-+	switch (jzfb.cfg & MODE_MASK) {
-+	case MODE_STN_MONO_DUAL:
-+	case MODE_STN_COLOR_DUAL:
-+	case MODE_STN_MONO_SINGLE:
-+	case MODE_STN_COLOR_SINGLE:
-+		switch (jzfb.bpp) {
-+		case 1:
-+			/* val |= LCD_CTRL_PEDN; */
-+		case 2:
-+			val |= LCD_CTRL_FRC_2;
-+			break;
-+		case 4:
-+			val |= LCD_CTRL_FRC_4;
-+			break;
-+		case 8:
-+		default:
-+			val |= LCD_CTRL_FRC_16;
-+			break;
-+		}
-+		break;
-+	}
-+
-+	val |= LCD_CTRL_BST_16;		/* Burst Length is 16WORD=64Byte */
-+	val |= LCD_CTRL_OFUP;		/* OutFIFO underrun protect */
-+
-+	switch (jzfb.cfg & MODE_MASK) {
-+	case MODE_STN_MONO_DUAL:
-+	case MODE_STN_COLOR_DUAL:
-+	case MODE_STN_MONO_SINGLE:
-+	case MODE_STN_COLOR_SINGLE:
-+		switch (jzfb.cfg & STN_DAT_PINMASK) {
-+		case STN_DAT_PIN1:
-+			/* Do not adjust the hori-param value. */
-+			break;
-+		case STN_DAT_PIN2:
-+			align2(jzfb.hsw);
-+			align2(jzfb.elw);
-+			align2(jzfb.blw);
-+			break;
-+		case STN_DAT_PIN4:
-+			align4(jzfb.hsw);
-+			align4(jzfb.elw);
-+			align4(jzfb.blw);
-+			break;
-+		case STN_DAT_PIN8:
-+			align8(jzfb.hsw);
-+			align8(jzfb.elw);
-+			align8(jzfb.blw);
-+			break;
-+		}
-+		break;
-+	}
-+
-+	REG_LCD_CTRL = val;
-+
-+	switch (jzfb.cfg & MODE_MASK) {
-+	case MODE_STN_MONO_DUAL:
-+	case MODE_STN_COLOR_DUAL:
-+	case MODE_STN_MONO_SINGLE:
-+	case MODE_STN_COLOR_SINGLE:
-+		if (((jzfb.cfg & MODE_MASK) == MODE_STN_MONO_DUAL) ||
-+		    ((jzfb.cfg & MODE_MASK) == MODE_STN_COLOR_DUAL))
-+			stnH = jzfb.h >> 1;
-+		else
-+			stnH = jzfb.h;
-+
-+		REG_LCD_VSYNC = (0 << 16) | jzfb.vsw;
-+		REG_LCD_HSYNC = ((jzfb.blw+jzfb.w) << 16) | (jzfb.blw+jzfb.w+jzfb.hsw);
-+
-+		/* Screen setting */
-+		REG_LCD_VAT = ((jzfb.blw + jzfb.w + jzfb.hsw + jzfb.elw) << 16) | (stnH + jzfb.vsw + jzfb.bfw + jzfb.efw);
-+		REG_LCD_DAH = (jzfb.blw << 16) | (jzfb.blw + jzfb.w);
-+		REG_LCD_DAV = (0 << 16) | (stnH);
-+
-+		/* AC BIAs signal */
-+		REG_LCD_PS = (0 << 16) | (stnH+jzfb.vsw+jzfb.efw+jzfb.bfw);
-+
-+		break;
-+
-+	case MODE_TFT_GEN:
-+	case MODE_TFT_SHARP:
-+	case MODE_TFT_CASIO:
-+	case MODE_TFT_SAMSUNG:
-+	case MODE_8BIT_SERIAL_TFT:
-+	case MODE_TFT_18BIT:
-+		REG_LCD_VSYNC = (0 << 16) | jzfb.vsw;
-+		REG_LCD_HSYNC = (0 << 16) | jzfb.hsw;
-+		REG_LCD_DAV =((jzfb.vsw+jzfb.bfw) << 16) | (jzfb.vsw +jzfb.bfw+jzfb.h);
-+		REG_LCD_DAH = ((jzfb.hsw + jzfb.blw) << 16) | (jzfb.hsw + jzfb.blw + jzfb.w );
-+		REG_LCD_VAT = (((jzfb.blw + jzfb.w + jzfb.elw + jzfb.hsw)) << 16) \
-+			| (jzfb.vsw + jzfb.bfw + jzfb.h + jzfb.efw);
-+		break;
-+	}
-+
-+	switch (jzfb.cfg & MODE_MASK) {
-+	case MODE_TFT_SAMSUNG:
-+	{
-+		unsigned int total, tp_s, tp_e, ckv_s, ckv_e;
-+		unsigned int rev_s, rev_e, inv_s, inv_e;
-+
-+		pclk = val * (jzfb.w + jzfb.hsw + jzfb.elw + jzfb.blw) *
-+			(jzfb.h + jzfb.vsw + jzfb.efw + jzfb.bfw); /* Pixclk */
-+
-+		total = jzfb.blw + jzfb.w + jzfb.elw + jzfb.hsw;
-+		tp_s = jzfb.blw + jzfb.w + 1;
-+		tp_e = tp_s + 1;
-+		ckv_s = tp_s - pclk/(1000000000/4100);
-+		ckv_e = tp_s + total;
-+		rev_s = tp_s - 11;	/* -11.5 clk */
-+		rev_e = rev_s + total;
-+		inv_s = tp_s;
-+		inv_e = inv_s + total;
-+		REG_LCD_CLS = (tp_s << 16) | tp_e;
-+		REG_LCD_PS = (ckv_s << 16) | ckv_e;
-+		REG_LCD_SPL = (rev_s << 16) | rev_e;
-+		REG_LCD_REV = (inv_s << 16) | inv_e;
-+		jzfb.cfg |= STFT_REVHI | STFT_SPLHI;
-+		break;
-+	}
-+	case MODE_TFT_SHARP:
-+	{
-+		unsigned int total, cls_s, cls_e, ps_s, ps_e;
-+		unsigned int spl_s, spl_e, rev_s, rev_e;
-+		total = jzfb.blw + jzfb.w + jzfb.elw + jzfb.hsw;
-+		spl_s = 1;
-+		spl_e = spl_s + 1;
-+		cls_s = 0;
-+		cls_e = total - 60;	/* > 4us (pclk = 80ns) */
-+		ps_s = cls_s;
-+		ps_e = cls_e;
-+		rev_s = total - 40;	/* > 3us (pclk = 80ns) */
-+		rev_e = rev_s + total;
-+		jzfb.cfg |= STFT_PSHI; 
-+		REG_LCD_SPL = (spl_s << 16) | spl_e;
-+		REG_LCD_CLS = (cls_s << 16) | cls_e;
-+		REG_LCD_PS = (ps_s << 16) | ps_e;
-+		REG_LCD_REV = (rev_s << 16) | rev_e;
-+		break;
-+	}
-+	case MODE_TFT_CASIO:
-+		break;
-+	}
-+
-+	/* Configure the LCD panel */
-+	REG_LCD_CFG = jzfb.cfg;
-+
-+	/* Timing setting */
-+	__cpm_stop_lcd();
-+
-+	val = jzfb.fclk; /* frame clk */
-+	if ( (jzfb.cfg & MODE_MASK) != MODE_8BIT_SERIAL_TFT) {
-+		pclk = val * (jzfb.w + jzfb.hsw + jzfb.elw + jzfb.blw) *
-+			(jzfb.h + jzfb.vsw + jzfb.efw + jzfb.bfw); /* Pixclk */
-+	} else {
-+		/* serial mode: Hsync period = 3*Width_Pixel */
-+		pclk = val * (jzfb.w*3 + jzfb.hsw + jzfb.elw + jzfb.blw) *
-+			(jzfb.h + jzfb.vsw + jzfb.efw + jzfb.bfw); /* Pixclk */
-+	}
-+
-+	if (((jzfb.cfg & MODE_MASK) == MODE_STN_COLOR_SINGLE) ||
-+	    ((jzfb.cfg & MODE_MASK) == MODE_STN_COLOR_DUAL))
-+		pclk = (pclk * 3);
-+
-+	if (((jzfb.cfg & MODE_MASK) == MODE_STN_COLOR_SINGLE) ||
-+	    ((jzfb.cfg & MODE_MASK) == MODE_STN_COLOR_DUAL) ||
-+	    ((jzfb.cfg & MODE_MASK) == MODE_STN_MONO_SINGLE) ||
-+	    ((jzfb.cfg & MODE_MASK) == MODE_STN_MONO_DUAL))
-+		pclk = pclk >> ((jzfb.cfg & STN_DAT_PINMASK) >> 4);
-+
-+	if (((jzfb.cfg & MODE_MASK) == MODE_STN_COLOR_DUAL) ||
-+	    ((jzfb.cfg & MODE_MASK) == MODE_STN_MONO_DUAL))
-+		pclk >>= 1;
-+
-+	pll_div = (REG_CPM_CPCCR & CPM_CPCCR_PCS); /* clock source,0:pllout/2 1: pllout */
-+	pll_div = pll_div ? 1 : 2;
-+	val = (__cpm_get_pllout() / pll_div) / pclk;
-+	val--;
-+	if (val > 0x1ff) {
-+		printf("CPM_LPCDR too large, set it to 0x1ff\n");
-+		val = 0x1ff;
-+	}
-+	__cpm_set_pixdiv(val);
-+
-+	val = pclk * 3 ;	/* LCDClock > 2.5*Pixclock */
-+	if (val > 150000000) {
-+		printf("Warning: LCDClock=%d\n, LCDClock must less or equal to 150MHz.\n", val);
-+		printf("Change LCDClock to 150MHz\n");
-+		val = 150000000;
-+	}
-+	val = (__cpm_get_pllout() / pll_div) / val;
-+	val--;
-+	if (val > 0x1f) {
-+		printf("CPM_CPCCR.LDIV too large, set it to 0x1f\n");
-+		val = 0x1f;
-+	}
-+	__cpm_set_ldiv( val );
-+	REG_CPM_CPCCR |= CPM_CPCCR_CE ; /* update divide */
-+
-+	__cpm_start_lcd();
-+	udelay(1000);
-+
-+	REG_LCD_DA0 = fbi->fdadr0; /* frame descripter*/
-+
-+	if (((jzfb.cfg & MODE_MASK) == MODE_STN_COLOR_DUAL) ||
-+	    ((jzfb.cfg & MODE_MASK) == MODE_STN_MONO_DUAL))
-+		REG_LCD_DA1 = fbi->fdadr1; /* frame descripter*/
-+
-+	return 0;
-+}
-+
-+void lcd_ctrl_init (void *lcdbase)
-+{
-+	__lcd_display_pin_init();
-+	__lcd_display_on() ;
-+
-+	jz_lcd_init_mem(lcdbase, &panel_info);
-+	jz_lcd_desc_init(&panel_info);
-+	jz_lcd_hw_init(&panel_info);
-+
-+}
-+
-+/*
-+ * Before enabled lcd controller, lcd registers should be configured correctly.
-+ */
-+void lcd_enable (void)
-+{
-+	REG_LCD_CTRL &= ~(1<<4); /* LCDCTRL.DIS */
-+	REG_LCD_CTRL |= 1<<3;    /* LCDCTRL.ENA*/
-+}
-+
-+void lcd_disable (void)
-+{
-+	REG_LCD_CTRL |= (1<<4);
-+}
-+
-+void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
-+{
-+}
-+
-+void lcd_initcolregs (void)
-+{
-+}
-diff --git a/drivers/video/nanonote_gpm940b0.h b/drivers/video/nanonote_gpm940b0.h
-new file mode 100644
-index 0000000..efe491e
---- /dev/null
-+++ b/drivers/video/nanonote_gpm940b0.h
-@@ -0,0 +1,135 @@
-+/*
-+ * JzRISC lcd controller
-+ *
-+ * Xiangfu Liu <xiangfu@sharism.cc>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ * MA 02111-1307 USA
-+ */
-+
-+#ifndef __QI_LB60_GPM940B0_H__
-+#define __QI_LB60_GPM940B0_H__
-+
-+struct lcd_desc{
-+	unsigned int next_desc; /* LCDDAx */
-+	unsigned int databuf;   /* LCDSAx */
-+	unsigned int frame_id;  /* LCDFIDx */ 
-+	unsigned int cmd;       /* LCDCMDx */
-+};
-+
-+#define MODE_MASK		0x0f
-+#define MODE_TFT_GEN		0x00
-+#define MODE_TFT_SHARP		0x01
-+#define MODE_TFT_CASIO		0x02
-+#define MODE_TFT_SAMSUNG	0x03
-+#define MODE_CCIR656_NONINT	0x04
-+#define MODE_CCIR656_INT	0x05
-+#define MODE_STN_COLOR_SINGLE	0x08
-+#define MODE_STN_MONO_SINGLE	0x09
-+#define MODE_STN_COLOR_DUAL	0x0a
-+#define MODE_STN_MONO_DUAL	0x0b
-+#define MODE_8BIT_SERIAL_TFT    0x0c
-+
-+#define MODE_TFT_18BIT          (1<<7)
-+
-+#define STN_DAT_PIN1	(0x00 << 4)
-+#define STN_DAT_PIN2	(0x01 << 4)
-+#define STN_DAT_PIN4	(0x02 << 4)
-+#define STN_DAT_PIN8	(0x03 << 4)
-+#define STN_DAT_PINMASK	STN_DAT_PIN8
-+
-+#define STFT_PSHI	(1 << 15)
-+#define STFT_CLSHI	(1 << 14)
-+#define STFT_SPLHI	(1 << 13)
-+#define STFT_REVHI	(1 << 12)
-+
-+#define SYNC_MASTER	(0 << 16)
-+#define SYNC_SLAVE	(1 << 16)
-+
-+#define DE_P		(0 << 9)
-+#define DE_N		(1 << 9)
-+
-+#define PCLK_P		(0 << 10)
-+#define PCLK_N		(1 << 10)
-+
-+#define HSYNC_P		(0 << 11)
-+#define HSYNC_N		(1 << 11)
-+
-+#define VSYNC_P		(0 << 8)
-+#define VSYNC_N		(1 << 8)
-+
-+#define DATA_NORMAL	(0 << 17)
-+#define DATA_INVERSE	(1 << 17)
-+
-+
-+/* Jz LCDFB supported I/O controls. */
-+#define FBIOSETBACKLIGHT	0x4688
-+#define FBIODISPON		0x4689
-+#define FBIODISPOFF		0x468a
-+#define FBIORESET		0x468b
-+#define FBIOPRINT_REG		0x468c
-+
-+/*
-+ * LCD panel specific definition
-+ */
-+#define MODE	(0xc9)		/* 8bit serial RGB */
-+
-+#define __spi_write_reg1(reg, val)		\
-+do {						\
-+	unsigned char no;			\
-+	unsigned short value;			\
-+	unsigned char a=reg;			\
-+	unsigned char b=val;			\
-+	__gpio_set_pin(SPEN);			\
-+	__gpio_set_pin(SPCK);			\
-+	__gpio_clear_pin(SPDA);			\
-+	__gpio_clear_pin(SPEN);			\
-+	value=((a<<8)|(b&0xFF));		\
-+	for(no=0;no<16;no++)			\
-+	{					\
-+		__gpio_clear_pin(SPCK);		\
-+		if((value&0x8000)==0x8000)	\
-+			__gpio_set_pin(SPDA);	\
-+		else				\
-+			__gpio_clear_pin(SPDA);	\
-+		__gpio_set_pin(SPCK);		\
-+		value=(value<<1);		\
-+	}					\
-+	__gpio_set_pin(SPEN);			\
-+} while (0)
-+
-+#define __lcd_display_pin_init()		\
-+do {						\
-+	__cpm_start_tcu();			\
-+	__gpio_as_output(SPEN); /* use SPDA */	\
-+	__gpio_as_output(SPCK); /* use SPCK */	\
-+	__gpio_as_output(SPDA); /* use SPDA */	\
-+} while (0)
-+
-+#define __lcd_display_on()			\
-+do {						\
-+	__spi_write_reg1(0x05, 0x1e);		\
-+	__spi_write_reg1(0x05, 0x5e);		\
-+	__spi_write_reg1(0x07, 0x8d);		\
-+	__spi_write_reg1(0x13, 0x01);		\
-+	__spi_write_reg1(0x05, 0x5f);		\
-+} while (0)
-+
-+#define __lcd_display_off()			\
-+do {						\
-+	__spi_write_reg1(0x05, 0x5e);		\
-+} while (0)
-+
-+#endif /* __QI_LB60_GPM940B0_H__ */
-diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h
-index 52b370c..d3e78ad 100644
---- a/include/configs/qi_lb60.h
-+++ b/include/configs/qi_lb60.h
-@@ -32,6 +32,13 @@
-  * Miscellaneous configurable options
-  */
- #define CONFIG_NANONOTE
-+
-+#define CONFIG_LCD
-+#define CONFIG_SYS_WHITE_ON_BLACK
-+#define LCD_BPP			LCD_COLOR32
-+#define CONFIG_VIDEO_GPM940B0
-+
-+
- #define CONFIG_JZ4740_MMC
- #define CONFIG_MMC      	1
- #define CONFIG_FAT      	1
-diff --git a/include/lcd.h b/include/lcd.h
-index 42070d7..6de5482 100644
---- a/include/lcd.h
-+++ b/include/lcd.h
-@@ -263,8 +263,44 @@ typedef struct vidinfo {
- 
- void init_panel_info(vidinfo_t *vid);
- 
--#else
-+#elif defined(CONFIG_JZSOC)
-+/*
-+ * LCD controller stucture for JZSOC: JZ4740
-+ */
-+struct jz_fb_dma_descriptor {
-+       u_long  fdadr;          /* Frame descriptor address register */
-+       u_long  fsadr;          /* Frame source address register */
-+       u_long  fidr;           /* Frame ID register */
-+       u_long  ldcmd;          /* Command register */
-+};
-+
-+/*
-+ * Jz LCD info
-+ */
-+struct jz_fb_info {
-+
-+       u_long  fdadr0; /* physical address of frame/palette descriptor */
-+       u_long  fdadr1; /* physical address of frame descriptor */
-+
-+       /* DMA descriptors */
-+       struct  jz_fb_dma_descriptor *  dmadesc_fblow;
-+       struct  jz_fb_dma_descriptor *  dmadesc_fbhigh;
-+       struct  jz_fb_dma_descriptor *  dmadesc_palette;
-+       u_long  screen;         /* address of frame buffer */
-+       u_long  palette;        /* address of palette memory */
-+       u_int   palette_size;
-+};
-+typedef struct vidinfo {
-+       ushort  vl_col;         /* Number of columns (i.e. 640) */
-+       ushort  vl_row;         /* Number of rows (i.e. 480) */
-+       u_char  vl_bpix;        /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8 */
-+
-+       struct jz_fb_info jz_fb;
-+} vidinfo_t;
-+
-+extern vidinfo_t panel_info;
- 
-+#else
- typedef struct vidinfo {
- 	ushort	vl_col;		/* Number of columns (i.e. 160) */
- 	ushort	vl_row;		/* Number of rows (i.e. 100) */
-@@ -318,6 +354,7 @@ void lcd_show_board_info(void);
- #define LCD_COLOR4	2
- #define LCD_COLOR8	3
- #define LCD_COLOR16	4
-+#define LCD_COLOR32	5
- 
- /*----------------------------------------------------------------------*/
- #if defined(CONFIG_LCD_INFO_BELOW_LOGO)
-@@ -369,7 +406,7 @@ void lcd_show_board_info(void);
- # define CONSOLE_COLOR_GREY	14
- # define CONSOLE_COLOR_WHITE	15	/* Must remain last / highest	*/
- 
--#else
-+#elif LCD_BPP == LCD_COLOR16
- 
- /*
-  * 16bpp color definitions
-@@ -377,6 +414,15 @@ void lcd_show_board_info(void);
- # define CONSOLE_COLOR_BLACK	0x0000
- # define CONSOLE_COLOR_WHITE	0xffff	/* Must remain last / highest	*/
- 
-+#elif LCD_BPP == LCD_COLOR32
-+/*
-+ * 18,24,32 bpp color definitions
-+ */
-+# define CONSOLE_COLOR_BLACK   0x00000000
-+# define CONSOLE_COLOR_WHITE   0xffffffff /* Must remain last / highest */
-+
-+#else
-+
- #endif /* color definitions */
- 
- /************************************************************************/
-@@ -406,7 +452,7 @@ void lcd_show_board_info(void);
- #if LCD_BPP == LCD_MONOCHROME
- # define COLOR_MASK(c)		((c)	  | (c) << 1 | (c) << 2 | (c) << 3 | \
- 				 (c) << 4 | (c) << 5 | (c) << 6 | (c) << 7)
--#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16)
-+#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16) || (LCD_BPP == LCD_COLOR32)
- # define COLOR_MASK(c)		(c)
- #else
- # error Unsupported LCD BPP.
--- 
-1.7.9.5
-

+ 0 - 60
package/boot/uboot-xburst/patches/0006-enable-silent-console.patch

@@ -1,60 +0,0 @@
-From 5eb4d4c598f2806bd1b3d1140e917bfead7851ad Mon Sep 17 00:00:00 2001
-From: Xiangfu <xiangfu@openmobilefree.net>
-Date: Wed, 10 Oct 2012 23:51:26 +0800
-Subject: [PATCH 6/6] enable silent console
-
----
- common/console.c          |   16 ++++++++++++++++
- include/configs/qi_lb60.h |    2 ++
- 2 files changed, 18 insertions(+)
-
-diff --git a/common/console.c b/common/console.c
-index 1177f7d..e8a2078 100644
---- a/common/console.c
-+++ b/common/console.c
-@@ -685,6 +685,14 @@ done:
- 
- 	gd->flags |= GD_FLG_DEVINIT;	/* device initialization completed */
- 
-+#ifdef CONFIG_SILENT_CONSOLE
-+	/* Check one more time the contents of the silent environment
-+	 * variable, because if the environment is loaded from NAND it was
-+	 * not available when console_init_f() was called */
-+	if (getenv("silent") != NULL)
-+		gd->flags |= GD_FLG_SILENT;
-+#endif
-+
- 	stdio_print_current_devices();
- 
- #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE
-@@ -760,6 +768,14 @@ int console_init_r(void)
- 
- 	gd->flags |= GD_FLG_DEVINIT;	/* device initialization completed */
- 
-+#ifdef CONFIG_SILENT_CONSOLE
-+	/* Check one more time the contents of the silent environment
-+	 * variable, because if the environment is loaded from NAND it was
-+	 * not available when console_init_f() was called */
-+	if (getenv("silent") != NULL)
-+		gd->flags |= GD_FLG_SILENT;
-+#endif
-+
- 	stdio_print_current_devices();
- 
- 	/* Setting environment variables */
-diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h
-index d3e78ad..a3534ff 100644
---- a/include/configs/qi_lb60.h
-+++ b/include/configs/qi_lb60.h
-@@ -102,6 +102,8 @@
- #define CONFIG_SYS_NO_FLASH
- #define CONFIG_SYS_FLASH_BASE	0 /* init flash_base as 0 */
- 
-+#define CONFIG_SILENT_CONSOLE		1	/* Enable silent console */
-+
- /*
-  * Command line configuration
-  */
--- 
-1.7.9.5
-

+ 1 - 0
package/kernel/linux/modules/netdevices.mk

@@ -446,6 +446,7 @@ endef
 
 $(eval $(call KernelPackage,ne2k-pci))
 
+
 define KernelPackage/e1000
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=Intel(R) PRO/1000 PCI cards kernel support

+ 19 - 12
package/kernel/mac80211/files/regdb.txt

@@ -85,12 +85,20 @@ country AT: DFS-ETSI
 	# 60 GHz band channels 1-4, ref: Etsi En 302 567
 	(57000 - 66000 @ 2160), (40)
 
+# Source:
+# https://www.legislation.gov.au/Details/F2016C00432
+# Both DFS-ETSI and DFS-FCC are acceptable per AS/NZS 4268 Appendix B.
+# The EIRP for DFS bands can be increased by 3dB if TPC is implemented.
+# In order to allow 80MHz operation between 5650-5730MHz the upper boundary
+# of this more restrictive band has been shifted up by 5MHz from 5725MHz.
 country AU: DFS-ETSI
-	(2402 - 2482 @ 40), (20)
-	(5170 - 5250 @ 80), (17), AUTO-BW
-	(5250 - 5330 @ 80), (24), DFS, AUTO-BW
-	(5490 - 5710 @ 160), (24), DFS
-	(5735 - 5835 @ 80), (30)
+	(2400 - 2483.5 @ 40), (36)
+	(5150 - 5250 @ 80), (23), NO-OUTDOOR, AUTO-BW
+	(5250 - 5350 @ 80), (20), NO-OUTDOOR, AUTO-BW, DFS
+	(5470 - 5600 @ 80), (27), DFS
+	(5650 - 5730 @ 80), (27), DFS
+	(5730 - 5850 @ 80), (36)
+	(57000 - 66000 @ 2160), (43), NO-OUTDOOR
 
 country AW: DFS-ETSI
 	(2402 - 2482 @ 40), (20)
@@ -230,9 +238,9 @@ country BZ: DFS-JP
 
 country CA: DFS-FCC
 	(2402 - 2472 @ 40), (30)
-	(5170 - 5250 @ 80), (17), AUTO-BW
-	(5250 - 5330 @ 80), (24), DFS, AUTO-BW
-	(5490 - 5600 @ 80), (24), DFS
+	(5150 - 5250 @ 80), (23), AUTO-BW
+	(5250 - 5350 @ 80), (24), DFS, AUTO-BW
+	(5470 - 5600 @ 80), (24), DFS
 	(5650 - 5730 @ 80), (24), DFS
 	(5735 - 5835 @ 80), (30)
 
@@ -580,11 +588,10 @@ country IL: DFS-ETSI
 	(5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW
 	(5250 - 5350 @ 80), (200 mW), NO-OUTDOOR, DFS, AUTO-BW
 
-country IN: DFS-JP
+country IN:
 	(2402 - 2482 @ 40), (20)
-	(5170 - 5250 @ 80), (20), AUTO-BW
-	(5250 - 5330 @ 80), (20), DFS, AUTO-BW
-	(5735 - 5835 @ 80), (20)
+	(5150 - 5350 @ 160), (23)
+	(5725 - 5875 @ 80), (23)
 
 country IR: DFS-JP
 	(2402 - 2482 @ 40), (20)

+ 1 - 9
package/kernel/om-watchdog/Makefile

@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=om-watchdog
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_VERSION:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -24,12 +24,6 @@ define Package/om-watchdog/description
  This package contains the hw watchdog script for the OM1P and OM2P device.
 endef
 
-define Build/Prepare
-endef
-
-define Build/Compile
-endef
-
 define Build/Compile
 endef
 
@@ -40,6 +34,4 @@ define Package/om-watchdog/install
 	$(INSTALL_BIN) ./files/om-watchdog $(1)/sbin/om-watchdog
 endef
 
-
 $(eval $(call BuildPackage,om-watchdog))
-

+ 40 - 31
package/kernel/om-watchdog/files/om-watchdog.init

@@ -16,37 +16,46 @@ get_gpio() {
 		local board=$(ar71xx_board_name)
 
 		case "$board" in
-			"om2p" | \
-			"om2pv4" | \
-			"om2p-hs" | \
-			"om2p-hsv2" | \
-			"om2p-hsv3" | \
-			"om2p-hsv4" | \
-			"om5p-acv2")
-				return 12
-				;;
-			"om2pv2" | \
-			"om2p-lc")
-				return 26
-				;;
-			"om5p" | \
-			"om5p-an")
-				return 11
-				;;
-			"om5p-ac")
-				return 17
-				;;
-			"mr600v2")
-				return 15
-				;;
-			"mr900" | \
-			"mr900v2" | \
-			"mr1750" | \
-			"mr1750v2" | \
-			"a40" | \
-			"a60")
-				return 16
-				;;
+		"a40"|\
+		"a60"|\
+		"mr1750"|\
+		"mr1750v2"|\
+		"mr900"|\
+		"mr900v2")
+			return 16
+			;;
+		"mr600v2")
+			return 15
+			;;
+		"om2p"|\
+		"om2p-hs"|\
+		"om2p-hsv2"|\
+		"om2p-hsv3"|\
+		"om2p-hsv4"|\
+		"om2pv4"|\
+		"om5p-acv2")
+			return 12
+			;;
+		"om2p-lc"|\
+		"om2pv2")
+			return 26
+			;;
+		"om5p"|\
+		"om5p-an")
+			return 11
+			;;
+		"om5p-ac")
+			return 17
+			;;
+		esac
+	elif [ -r /lib/ramips.sh ]; then
+		. /lib/ramips.sh
+		local board=$(ramips_board_name)
+
+		case "$board" in
+		"rut5xx")
+			return 11
+			;;
 		esac
 	else
 		#we assume it is om1p in this case

+ 3 - 3
package/libs/uclient/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(LEDE_GIT)/project/uclient.git
-PKG_SOURCE_DATE:=2017-09-06
-PKG_SOURCE_VERSION:=24d6eded73dec427fc4a3a20cc73c94227f59c31
-PKG_MIRROR_HASH:=e884ae0c859baa20a5c7f3d924022f8e1f57d28474dbe5fed1efb8fb97790dd0
+PKG_SOURCE_DATE:=2017-11-02
+PKG_SOURCE_VERSION:=4b87d83160fec70d50b7fcd736a8c538c28a016c
+PKG_MIRROR_HASH:=4bbb4d5f295ebdcd67fec87a6794168bea2176a42cb2907c47d8566fb33dafb3
 CMAKE_INSTALL:=1
 
 PKG_BUILD_DEPENDS:=ustream-ssl

+ 0 - 5
package/luci/.buildpath

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
-	<buildpathentry kind="src" path="src"/>
-	<buildpathentry kind="con" path="org.eclipse.dltk.launching.INTERPRETER_CONTAINER"/>
-</buildpath>

+ 0 - 221
package/luci/.cproject

@@ -1,221 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject>
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341">
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="luci" buildProperties="" description="" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341" name="Preference Configuration" parent="org.eclipse.cdt.build.core.prefbase.cfg">
-<folderInfo id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341." name="/" resourcePath="">
-<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.407447051" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
-<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.407447051.1470931541" name=""/>
-<builder id="org.eclipse.cdt.build.core.settings.default.builder.823611263" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
-<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1685234798" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
-<tool id="org.eclipse.cdt.build.core.settings.holder.570824141" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
-<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.491129717" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
-<listOptionValue builtIn="false" value="/usr/include/lua5.1"/>
-<listOptionValue builtIn="false" value="/usr/include"/>
-</option>
-<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.858094059" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
-</tool>
-<tool id="org.eclipse.cdt.build.core.settings.holder.344617955" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
-<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.564526987" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
-<listOptionValue builtIn="false" value="/usr/include/lua5.1"/>
-<listOptionValue builtIn="false" value="/usr/include"/>
-</option>
-<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1426860237" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
-</tool>
-<tool id="org.eclipse.cdt.build.core.settings.holder.869454750" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
-<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.838425449" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
-<listOptionValue builtIn="false" value="/usr/include/lua5.1"/>
-<listOptionValue builtIn="false" value="/usr/include"/>
-</option>
-<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1755775295" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
-</tool>
-</toolChain>
-</folderInfo>
-</configuration>
-</storageModule>
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341" moduleId="org.eclipse.cdt.core.settings" name="Preference Configuration">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-</cconfiguration>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<project id="luci.null.949486034" name="luci"/>
-</storageModule>
-</cproject>

+ 0 - 78
package/luci/.project

@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>luci</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
-			<triggers>clean,full,incremental,</triggers>
-			<arguments>
-				<dictionary>
-					<key>?name?</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.append_environment</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildArguments</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.contents</key>
-					<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
-		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.dltk.lua.core.nature</nature>
-	</natures>
-</projectDescription>

+ 0 - 62
package/luci/CONTRIBUTING.md

@@ -1,62 +0,0 @@
-# Contributing Guidelines
-
-## Patches and Pull requests:
-
-If you want to contribute a change to LuCI, please either send a patch using git send-email
-or open a "pull request" against the openwrt/luci repository.
-
-Regardless of whether you send a patch or open a pull request, please try to follow these rules:
-
-* Have a useful subject prefixed with the component name
-    (E.g.: "luci-mod-admin-full: fix wifi channel selection on multiple STA networks")
-* Shortly explain the changes made and - if applicable - the reasoning behind them
-* Commit message of each commit should include a Signed-off-by line
-    (See <https://dev.openwrt.org/wiki/SubmittingPatches#a10.Signyourwork>)
-	
-In case you like to send patches by mail, please use the [LuCI mailinglist](https://lists.subsignal.org/mailman/listinfo/luci)
-or the [OpenWrt Development List](https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel).
-
-If you send via the OpenWrt list, include a "[luci]" tag in your subject line.
-For general information on patch submission, follow the [OpenWrt patch submission guideline](https://dev.openwrt.org/wiki/SubmittingPatches).
-
-## Advice on pull requests:
-
-Pull requests are the easiest way to contribute changes to git repos at Github. They are the preferred contribution method, as they offer a nice way for commenting and amending the proposed changes.
-
-* You need a local "fork" of the Github repo.
-* Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request. Workflow using "feature_x" as the example:
-  - Update your local git fork to the tip (of the master, usually)
-  - Create the feature branch with `git checkout -b feature_x`
-  - Edit changes and commit them locally
-  - Push them to your Github fork by `git push -u origin feature_x`. That creates the "feature_x" branch at your Github fork and sets it as the remote of this branch
-  - When you now visit Github, you should see a proposal to create a pull request
-
-* If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then use `git push` to automatically update the pull request.
-
-* If you need to change something in the existing pull request (e.g. to add a missing signed-off-by line to the commit message), you can use `git push -f` to overwrite the original commits. That is easy and safe when using a feature branch. Example workflow:
-  - Checkout the feature branch by `git checkout feature_x`
-  - Edit changes and commit them locally. If you are just updating the commit message in the last commit, you can use `git commit --amend` to do that
-  - If you added several new commits or made other changes that require cleaning up, you can use `git rebase -i HEAD~X` (X = number of commits to edit) to possibly squash some commits
-  - Push the changed commits to Github with `git push -f` to overwrite the original commits in the "feature_x" branch with the new ones. The pull request gets automatically updated
-
-## If you have commit access:
-
-* Do NOT use git push --force.
-* Use Pull Requests if you are unsure and to suggest changes to other developers.
-
-## Gaining commit access:
-
-* Commit access will be granted to responsible contributors who have made
-  useful pull requests and / or feedback or patches to this repository or
-  OpenWrt in general. Please include your request for commit access in your
-  next pull request or ticket.
-
-## Release Branches:
-
-* Branches named "for-XX.YY" or "luci-X.Y" (e.g. "for-15.05") are release branches.
-* These branches are built with the respective OpenWrt release and are created
-  during the release stabilisation phase.
-* Please ONLY cherry-pick or commit security and bug-fixes to these branches.
-* Do NOT add new packages and do NOT do major upgrades of packages here.
-* If you are unsure if your change is suitable, please use a pull request.
-

+ 0 - 34
package/luci/README.md

@@ -1,34 +0,0 @@
-# OpenWrt luci feed
-
-## Description
-
-This is the OpenWrt "luci"-feed containing LuCI - OpenWrt Configuration Interface.
-
-## Usage
-
-This feed is enabled by default. Your feeds.conf.default (or feeds.conf) should contain a line like:
-```
-src-git luci https://github.com/openwrt/luci.git
-```
-
-To install all its package definitions, run:
-```
-./scripts/feeds update luci
-./scripts/feeds install -a -p luci
-```
-
-## API Reference
-
-You can browse the generated API documentation [directly on Github](http://htmlpreview.github.io/?http://raw.githubusercontent.com/openwrt/luci/master/documentation/api/index.html).
-
-## Development
-
-Documentation for developing and extending LuCI can be found [in the Wiki](https://github.com/openwrt/luci/wiki)
-
-## License
-
-See [LICENSE](LICENSE) file.
- 
-## Package Guidelines
-
-See [CONTRIBUTING.md](CONTRIBUTING.md) file.

+ 0 - 26
package/luci/THANKYOU

@@ -1,26 +0,0 @@
-I'd like to thank the following people for contributing to this software:
-
-* Anton Popov
-	- for rewriting the openwrt.org theme
-
-* Florian Fainelli (OpenWrt)
-	- for the french translation
-
-* Alina Friedrichsen
-	- for the reworked translation system, help on standards compliance and accessibility
-	
-* Yanira
-	- several applications and bugreports
-
-
-Also a big thank you goes to:
-	
-* Mono (Freifunk Halle)
-	- for donating a Linksys WRT54GL for development purposes
-	
-* tetzlav (Freifunk Leipzig)
-	- for donating several boards for testing and his feedback
-	
-* Mickey (Freifunk Hannover)
-	- for his feedback and fixes for the OpenWrt builds
-	

+ 42 - 37
package/luci/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua

@@ -9,9 +9,9 @@ local dump     = util.ubus("network.interface", "dump", {})
 local json     = require("luci.jsonc")
 local adbinput = uci.get("adblock", "global", "adb_rtfile") or "/tmp/adb_runtime.json"
 
-if not uci:get_first("adblock", "adblock", "adb_trigger") then
-	m = SimpleForm("error", nil, translate("Please update your adblock config file to use this package. ")
-	.. translatef("In OPKG use the '--force-maintainer' option to overwrite the pre-existing config file or download a fresh default config from "
+if not uci:get("adblock", "extra") then
+	m = SimpleForm("", nil, translate("Please update your adblock config file to use this package.<br />")
+	.. translatef("During opkg package installation use the '--force-maintainer' option to overwrite the pre-existing config file or download a fresh default config from "
 	.. "<a href=\"%s\" target=\"_blank\">"
 	.. "here</a>", "https://raw.githubusercontent.com/openwrt/packages/master/net/adblock/files/adblock.conf"))
 	m.submit = false
@@ -23,16 +23,10 @@ m = Map("adblock", translate("Adblock"),
 	translate("Configuration of the adblock package to block ad/abuse domains by using DNS. ")
 	.. translatef("For further information "
 	.. "<a href=\"%s\" target=\"_blank\">"
-	.. "see online documentation</a>", "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"))
+	.. "check the online documentation</a>", "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"))
 
 function m.on_after_commit(self)
-	function e4.validate(self, value)
-		if value == "0" then
-			luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1")
-		else
-			luci.sys.call("/etc/init.d/adblock start >/dev/null 2>&1")
-		end
-	end
+	luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1")
 	luci.http.redirect(luci.dispatcher.build_url("admin", "services", "adblock"))
 end
 
@@ -44,7 +38,7 @@ local parse = json.parse(fs.readfile(adbinput) or "")
 if parse then
 	status  = parse.data.adblock_status
 	version = parse.data.adblock_version
-	domains = parse.data.blocked_domains
+	domains = parse.data.overall_domains
 	fetch   = parse.data.fetch_utility
 	backend = parse.data.dns_backend
 	rundate = parse.data.last_rundate
@@ -82,14 +76,13 @@ o2 = s:option(ListValue, "adb_dns", translate("DNS Backend (DNS Directory)"),
 	.. translate("To overwrite the default path use the 'DNS Directory' option in the extra section below."))
 o2:value("dnsmasq", "dnsmasq (/tmp/dnsmasq.d)")
 o2:value("unbound", "unbound (/var/lib/unbound)")
-o2:value("named", "bind (/var/lib/bind)")
+o2:value("named", "named (/var/lib/bind)")
 o2:value("kresd", "kresd (/etc/kresd)")
 o2:value("dnscrypt-proxy","dnscrypt-proxy (/tmp)")
-o2.default = "dnsmasq"
 o2.rmempty = false
 
 o3 = s:option(ListValue, "adb_trigger", translate("Startup Trigger"),
-	translate("List of available network interfaces. By default the startup will be triggered by the 'wan' interface.<br />")
+	translate("List of available network interfaces. Usually the startup will be triggered by the 'wan' interface.<br />")
 	.. translate("Choose 'none' to disable automatic startups, 'timed' to use a classic timeout (default 30 sec.) or select another trigger interface."))
 o3:value("none")
 o3:value("timed")
@@ -149,7 +142,7 @@ else
 	dv4.value = backend
 end
 
-dv5 = s:option(DummyValue, "", translate("Overall Blocked Domains"))
+dv5 = s:option(DummyValue, "", translate("Overall Domains"))
 dv5.template = "adblock/runtime"
 if parse == nil then
 	dv5.value = translate("n/a")
@@ -170,7 +163,7 @@ end
 bl = m:section(TypedSection, "source", translate("Blocklist Sources"),
 	translate("Available blocklist sources. ")
 	.. translate("List URLs and Shallalist category selections are configurable in the 'Advanced' section.<br />")
-	.. translate("Caution: Please don't select big lists or many lists at once on low memory devices to prevent OOM exceptions!"))
+	.. translate("Caution: To prevent OOM exceptions on low memory devices with less than 64 MB free RAM, please do not select too many lists - 5-6 should be sufficient!"))
 bl.template = "cbi/tblsection"
 
 name = bl:option(Flag, "enabled", translate("Enabled"))
@@ -185,12 +178,11 @@ function ssl.cfgvalue(self, section)
 		return translate("No")
 	end
 end
-
 des = bl:option(DummyValue, "adb_src_desc", translate("Description"))
 
 -- Extra options
 
-e = m:section(NamedSection, "global", "adblock", translate("Extra Options"),
+e = m:section(NamedSection, "extra", "adblock", translate("Extra Options"),
 	translate("Options for further tweaking in case the defaults are not suitable for you."))
 
 e1 = e:option(Flag, "adb_debug", translate("Verbose Debug Logging"),
@@ -204,34 +196,47 @@ e2.default = e2.disabled
 e2.rmempty = false
 
 e3 = e:option(Flag, "adb_forcesrt", translate("Force Overall Sort"),
-	translate("Enable memory intense overall sort / duplicate removal on low memory devices (&lt; 64 MB RAM)"))
+	translate("Enable memory intense overall sort / duplicate removal on low memory devices (&lt; 64 MB free RAM)"))
 e3.default = e3.disabled
 e3.rmempty = false
 
-e4 = e:option(Flag, "adb_manmode", translate("Manual / Backup mode"),
-	translate("Do not automatically update blocklists during startup, use blocklist backups instead."))
+e4 = e:option(Flag, "adb_backup", translate("Enable Blocklist Backup"),
+	translate("Create compressed blocklist backups, they will be used in case of download errors or during startup in backup mode."))
 e4.default = e4.disabled
 e4.rmempty = false
 
-e5 = e:option(Flag, "adb_backup", translate("Enable Blocklist Backup"),
-	translate("Create compressed blocklist backups, they will be used in case of download errors or during startup in manual mode."))
-e5.default = e5.disabled
-e5.rmempty = false
+e5 = e:option(Value, "adb_backupdir", translate("Backup Directory"),
+	translate("Target directory for adblock backups. Please use only non-volatile disks, e.g. an external usb stick."))
+e5:depends("adb_backup", 1)
+e5.datatype = "directory"
+e5.default = "/mnt"
+e5.rmempty = true
 
-e6 = e:option(Value, "adb_backupdir", translate("Backup Directory"),
-	translate("Target directory for adblock backups. Please use only non-volatile disks, no ram/tmpfs drives."))
-e6.datatype = "directory"
-e6.default = "/mnt"
-e6.rmempty = false
+e6 = e:option(Flag, "adb_backup_mode", translate("Backup Mode"),
+	translate("Do not automatically update blocklists during startup, use blocklist backups instead."))
+e6:depends("adb_backup", 1)
+e6.default = e6.disabled
+e6.rmempty = true
 
-e7 = e:option(Value, "adb_dnsdir", translate("DNS Directory"),
+e7 = e:option(Flag, "adb_whitelist_mode", translate("Whitelist Mode"),
+	translate("Block access to all domains except those explicitly listed in the whitelist file."))
+e7.default = e7.disabled
+e7.rmempty = true
+
+e8 = e:option(Value, "adb_dnsdir", translate("DNS Directory"),
 	translate("Target directory for the generated blocklist 'adb_list.overall'."))
-e7.datatype = "directory"
-e7.optional = true
+e8.datatype = "directory"
+e8.optional = true
 
-e8 = e:option(Value, "adb_triggerdelay", translate("Trigger Delay"),
+e9 = e:option(Value, "adb_whitelist", translate("Whitelist File"),
+	translate("Full path to the whitelist file."))
+e9.datatype = "file"
+e9.default = "/etc/adblock/adblock.whitelist"
+e9.optional = true
+
+e10 = e:option(Value, "adb_triggerdelay", translate("Trigger Delay"),
 	translate("Additional trigger delay in seconds before adblock processing begins."))
-e8.datatype = "range(1,60)"
-e8.optional = true
+e10.datatype = "range(1,60)"
+e10.optional = true
 
 return m

+ 3 - 0
package/luci/applications/luci-app-adblock/luasrc/view/adblock/config_css.htm

@@ -6,5 +6,8 @@
 		font-size: 12px;
 		font-family: monospace;
 		resize: none;
+		white-space: pre;
+		overflow-wrap: normal;
+		overflow-x: scroll;
 	}
 </style>

+ 95 - 36
package/luci/applications/luci-app-adblock/po/it/adblock.po

@@ -38,15 +38,21 @@ msgstr "Fonti lista di blocco disponibili."
 msgid "Backup Directory"
 msgstr "Directory del Backup"
 
+msgid "Backup Mode"
+msgstr ""
+
+msgid ""
+"Block access to all domains except those explicitly listed in the whitelist "
+"file."
+msgstr ""
+
 msgid "Blocklist Sources"
 msgstr "Fonti lista di Blocco"
 
 msgid ""
-"Caution: Please don't select big lists or many lists at once on low memory "
-"devices to prevent OOM exceptions!"
+"Caution: To prevent OOM exceptions on low memory devices with less than 64 "
+"MB free RAM, please do not select too many lists - 5-6 should be sufficient!"
 msgstr ""
-"Attenzione: Per favore non selezionare grandi liste o molte liste alla volta "
-"su dispositivi con poca memoria per prevenire errori OOM!"
 
 msgid ""
 "Choose 'none' to disable automatic startups, 'timed' to use a classic "
@@ -66,10 +72,8 @@ msgstr ""
 
 msgid ""
 "Create compressed blocklist backups, they will be used in case of download "
-"errors or during startup in manual mode."
+"errors or during startup in backup mode."
 msgstr ""
-"Crea i backup compressi delle liste di blocco, saranno usati in caso di "
-"errori di download o durante l'avvio in modalità manuale."
 
 msgid "DNS Backend (DNS Directory)"
 msgstr ""
@@ -90,6 +94,12 @@ msgstr ""
 msgid "Download Utility (SSL Library)"
 msgstr ""
 
+msgid ""
+"During opkg package installation use the '--force-maintainer' option to "
+"overwrite the pre-existing config file or download a fresh default config "
+"from <a href=\"%s\" target=\"_blank\">here</a>"
+msgstr ""
+
 msgid "Edit Blacklist"
 msgstr "Modifica Lista Nera"
 
@@ -107,10 +117,8 @@ msgstr "Attiva Backup Lista di Blocco"
 
 msgid ""
 "Enable memory intense overall sort / duplicate removal on low memory devices "
-"(&lt; 64 MB RAM)"
+"(&lt; 64 MB free RAM)"
 msgstr ""
-"Attiva l'ordinamento globale / rimozione duplicati stressante per la memoria "
-"su dispositivi con poca memoria (&lt; 64 MB RAM)"
 
 msgid "Enable verbose debug logging in case of any processing error."
 msgstr ""
@@ -130,11 +138,9 @@ msgstr ""
 "adatta, p.e. 'libustream-ssl' o wget 'built-in'."
 
 msgid ""
-"For further information <a href=\"%s\" target=\"_blank\">see online "
+"For further information <a href=\"%s\" target=\"_blank\">check the online "
 "documentation</a>"
 msgstr ""
-"Per ulteriori informazioni <a href=\"%s\" target=\"_blank\">vedi "
-"documentazione online</a>"
 
 msgid "Force Local DNS"
 msgstr "Forza DNS Locale"
@@ -142,14 +148,8 @@ msgstr "Forza DNS Locale"
 msgid "Force Overall Sort"
 msgstr "Forza Ordinamento Globale"
 
-msgid ""
-"In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
-"config file or download a fresh default config from <a href=\"%s\" target="
-"\"_blank\">here</a>"
+msgid "Full path to the whitelist file."
 msgstr ""
-"In OPKG usa l'opzione '--force-maintainer' per sovrascrivere il pre-"
-"esistente file di configurazione o scarica una nuova configurazione di "
-"default da <a href=\"%s\" target=\"_blank\">qui</a>"
 
 msgid "Input file not found, please check your configuration."
 msgstr "File di input non trovato, per favore controlla la tua configurazione."
@@ -168,11 +168,9 @@ msgstr ""
 "nella sezione 'Avanzato'.<br />"
 
 msgid ""
-"List of available network interfaces. By default the startup will be "
-"triggered by the 'wan' interface.<br />"
+"List of available network interfaces. Usually the startup will be triggered "
+"by the 'wan' interface.<br />"
 msgstr ""
-"Lista delle interfacce di rete disponibili. Per default l'avvio sarà "
-"innescato dall'interfaccia 'wan'.<br />"
 
 msgid ""
 "List of supported DNS backends with their default list export directory.<br /"
@@ -184,9 +182,6 @@ msgstr ""
 msgid "Loading"
 msgstr "Caricando"
 
-msgid "Manual / Backup mode"
-msgstr "Modalità Manuale / Backup"
-
 msgid "No"
 msgstr "No"
 
@@ -196,8 +191,8 @@ msgstr ""
 "Opzioni per ulteriori modifiche in caso che quelle di default non ti sono "
 "adatte."
 
-msgid "Overall Blocked Domains"
-msgstr "Totale Domini Bloccati"
+msgid "Overall Domains"
+msgstr ""
 
 msgid "Overview"
 msgstr "Riassunto"
@@ -213,10 +208,8 @@ msgid "Please edit this file directly in a terminal session."
 msgstr ""
 "Per favore modifica questo file direttamente in una sessione al terminale."
 
-msgid "Please update your adblock config file to use this package."
+msgid "Please update your adblock config file to use this package.<br />"
 msgstr ""
-"Per favore aggiorna il tuo file configurazione di adblock per usare questo "
-"pacchetto."
 
 msgid "Query"
 msgstr "Interrogazione"
@@ -250,11 +243,9 @@ msgid "Suspend / Resume Adblock"
 msgstr "Sospendi / Riprendi Adblock"
 
 msgid ""
-"Target directory for adblock backups. Please use only non-volatile disks, no "
-"ram/tmpfs drives."
+"Target directory for adblock backups. Please use only non-volatile disks, e."
+"g. an external usb stick."
 msgstr ""
-"Directory per i backup di adblock. Per favore usa solo dischi non volatili, "
-"non dischi ram/tmpfs."
 
 msgid "Target directory for the generated blocklist 'adb_list.overall'."
 msgstr "Directory per la lista di blocco generata 'adb_list.overall'."
@@ -318,6 +309,12 @@ msgstr "Vedi Registro"
 msgid "Waiting for command to complete..."
 msgstr "Aspettando che il comando venga completato..."
 
+msgid "Whitelist File"
+msgstr ""
+
+msgid "Whitelist Mode"
+msgstr ""
+
 msgid "Yes"
 msgstr "Sì"
 
@@ -335,3 +332,65 @@ msgstr "n/d"
 
 msgid "paused"
 msgstr "in pausa"
+
+#~ msgid ""
+#~ "Caution: Please don't select big lists or many lists at once on low "
+#~ "memory devices to prevent OOM exceptions!"
+#~ msgstr ""
+#~ "Attenzione: Per favore non selezionare grandi liste o molte liste alla "
+#~ "volta su dispositivi con poca memoria per prevenire errori OOM!"
+
+#~ msgid ""
+#~ "Create compressed blocklist backups, they will be used in case of "
+#~ "download errors or during startup in manual mode."
+#~ msgstr ""
+#~ "Crea i backup compressi delle liste di blocco, saranno usati in caso di "
+#~ "errori di download o durante l'avvio in modalità manuale."
+
+#~ msgid ""
+#~ "Enable memory intense overall sort / duplicate removal on low memory "
+#~ "devices (&lt; 64 MB RAM)"
+#~ msgstr ""
+#~ "Attiva l'ordinamento globale / rimozione duplicati stressante per la "
+#~ "memoria su dispositivi con poca memoria (&lt; 64 MB RAM)"
+
+#~ msgid ""
+#~ "For further information <a href=\"%s\" target=\"_blank\">see online "
+#~ "documentation</a>"
+#~ msgstr ""
+#~ "Per ulteriori informazioni <a href=\"%s\" target=\"_blank\">vedi "
+#~ "documentazione online</a>"
+
+#~ msgid ""
+#~ "In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
+#~ "config file or download a fresh default config from <a href=\"%s\" target="
+#~ "\"_blank\">here</a>"
+#~ msgstr ""
+#~ "In OPKG usa l'opzione '--force-maintainer' per sovrascrivere il pre-"
+#~ "esistente file di configurazione o scarica una nuova configurazione di "
+#~ "default da <a href=\"%s\" target=\"_blank\">qui</a>"
+
+#~ msgid ""
+#~ "List of available network interfaces. By default the startup will be "
+#~ "triggered by the 'wan' interface.<br />"
+#~ msgstr ""
+#~ "Lista delle interfacce di rete disponibili. Per default l'avvio sarà "
+#~ "innescato dall'interfaccia 'wan'.<br />"
+
+#~ msgid "Manual / Backup mode"
+#~ msgstr "Modalità Manuale / Backup"
+
+#~ msgid "Overall Blocked Domains"
+#~ msgstr "Totale Domini Bloccati"
+
+#~ msgid "Please update your adblock config file to use this package."
+#~ msgstr ""
+#~ "Per favore aggiorna il tuo file configurazione di adblock per usare "
+#~ "questo pacchetto."
+
+#~ msgid ""
+#~ "Target directory for adblock backups. Please use only non-volatile disks, "
+#~ "no ram/tmpfs drives."
+#~ msgstr ""
+#~ "Directory per i backup di adblock. Per favore usa solo dischi non "
+#~ "volatili, non dischi ram/tmpfs."

+ 53 - 36
package/luci/applications/luci-app-adblock/po/ja/adblock.po

@@ -8,7 +8,7 @@ msgstr ""
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.0.3\n"
+"X-Generator: Poedit 2.0.4\n"
 "Language: ja\n"
 
 msgid "-------"
@@ -38,15 +38,25 @@ msgstr "利用可能なブロックリスト提供元です。"
 msgid "Backup Directory"
 msgstr "バックアップ先 ディレクトリ"
 
+msgid "Backup Mode"
+msgstr "バックアップ モード"
+
+msgid ""
+"Block access to all domains except those explicitly listed in the whitelist "
+"file."
+msgstr ""
+"ホワイトリストに列記されていない全ドメインへのアクセスをブロックします。"
+
 msgid "Blocklist Sources"
 msgstr "ブロックリスト提供元"
 
 msgid ""
-"Caution: Please don't select big lists or many lists at once on low memory "
-"devices to prevent OOM exceptions!"
+"Caution: To prevent OOM exceptions on low memory devices with less than 64 "
+"MB free RAM, please do not select too many lists - 5-6 should be sufficient!"
 msgstr ""
-"警告: メモリー容量の小さいデバイスでは OutOfMemory (OOM) 例外を防ぐため、大き"
-"いリストや一度にたくさんのリストを選択しないでください。"
+"警告: RAM の空き容量が 64MB に満たないメモリー容量の小さいデバイスでは、 "
+"OutOfMemory (OOM) 例外を防ぐために、多くのリストを選択しないようにしてくださ"
+"い。5 - 6個のリストで十分です。"
 
 msgid ""
 "Choose 'none' to disable automatic startups, 'timed' to use a classic "
@@ -67,11 +77,11 @@ msgstr ""
 
 msgid ""
 "Create compressed blocklist backups, they will be used in case of download "
-"errors or during startup in manual mode."
+"errors or during startup in backup mode."
 msgstr ""
 "圧縮されたブロックリストのバックアップを作成します。これは、リストのダウン"
-"ロードがエラーの場合、またはマニュアル モードでサービスを起動時に使用されま"
-"す。"
+"ロードがエラーの場合、またはバックアップ モードでサービスを起動した場合に使用"
+"されます。"
 
 msgid "DNS Backend (DNS Directory)"
 msgstr "DNS バックエンド(DNS ディレクトリ)"
@@ -92,6 +102,15 @@ msgstr ""
 msgid "Download Utility (SSL Library)"
 msgstr "ダウンロード ユーティリティ(SSL ライブラリ)"
 
+msgid ""
+"During opkg package installation use the '--force-maintainer' option to "
+"overwrite the pre-existing config file or download a fresh default config "
+"from <a href=\"%s\" target=\"_blank\">here</a>"
+msgstr ""
+"opkg でパッケージをインストールする際に '--force-maintainer' オプションを使用"
+"して既存の設定ファイルを上書きするか、 <a href=\"%s\" target=\"_blank\">ここ"
+"</a> からデフォルトの設定ファイルをダウンロードしてください。"
+
 msgid "Edit Blacklist"
 msgstr "ブラックリストの編集"
 
@@ -109,10 +128,10 @@ msgstr "ブロックリスト バックアップの有効化"
 
 msgid ""
 "Enable memory intense overall sort / duplicate removal on low memory devices "
-"(&lt; 64 MB RAM)"
+"(&lt; 64 MB free RAM)"
 msgstr ""
-"メモリー容量の少ないデバイス(RAM 64MB 未満)において、一時ファイル内の全体的"
-"なソート及び重複の除去を有効にします。"
+"メモリー容量の少ないデバイス(RAM 空き領域 64MB 未満)において、一時ファイル"
+"内の全体的なソート及び重複の除去を有効にします。"
 
 msgid "Enable verbose debug logging in case of any processing error."
 msgstr ""
@@ -132,11 +151,11 @@ msgstr ""
 "例: 'libustream-ssl' または wget 'built-in'"
 
 msgid ""
-"For further information <a href=\"%s\" target=\"_blank\">see online "
+"For further information <a href=\"%s\" target=\"_blank\">check the online "
 "documentation</a>"
 msgstr ""
-"詳細な情報は<a href=\"%s\" target=\"_blank\">オンライン ドキュメント</a>を"
-"認してください。"
+"詳細な情報は <a href=\"%s\" target=\"_blank\">オンライン ドキュメント</a> を"
+"認してください。"
 
 msgid "Force Local DNS"
 msgstr "ローカル DNS の強制"
@@ -144,14 +163,8 @@ msgstr "ローカル DNS の強制"
 msgid "Force Overall Sort"
 msgstr "全体ソートの強制"
 
-msgid ""
-"In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
-"config file or download a fresh default config from <a href=\"%s\" target="
-"\"_blank\">here</a>"
-msgstr ""
-"OPKGで '--force-maintainer' オプションを使用して既存の設定ファイルを上書きす"
-"るか、 <a href=\"%s\" target=\"_blank\">ここ</a> からデフォルトの設定ファイル"
-"をダウンロードしてください。"
+msgid "Full path to the whitelist file."
+msgstr "ホワイトリスト ファイルへのフルパスです。"
 
 msgid "Input file not found, please check your configuration."
 msgstr "入力ファイルが見つかりません。設定を確認してください。"
@@ -170,11 +183,11 @@ msgstr ""
 "で設定することができます。<br />"
 
 msgid ""
-"List of available network interfaces. By default the startup will be "
-"triggered by the 'wan' interface.<br />"
+"List of available network interfaces. Usually the startup will be triggered "
+"by the 'wan' interface.<br />"
 msgstr ""
-"利用可能なネットワーク インターフェースの一覧です。デフォルトでは 'wan' イン"
-"ターフェースによりスタートアップがトリガされます。"
+"利用可能なネットワーク インターフェースの一覧です。通常、 'wan' インター"
+"フェースによりスタートアップがトリガされます。<br />"
 
 msgid ""
 "List of supported DNS backends with their default list export directory.<br /"
@@ -186,9 +199,6 @@ msgstr ""
 msgid "Loading"
 msgstr "読込中"
 
-msgid "Manual / Backup mode"
-msgstr "手動 / バックアップ モード"
-
 msgid "No"
 msgstr "いいえ"
 
@@ -196,8 +206,8 @@ msgid ""
 "Options for further tweaking in case the defaults are not suitable for you."
 msgstr "デフォルト設定が適切でない場合、追加で設定するためのオプションです。"
 
-msgid "Overall Blocked Domains"
-msgstr "全体のブロック済みドメイン"
+msgid "Overall Domains"
+msgstr "全体のドメイン"
 
 msgid "Overview"
 msgstr "概要"
@@ -213,9 +223,10 @@ msgstr ""
 msgid "Please edit this file directly in a terminal session."
 msgstr "ターミナル セッションで直接このファイルを編集してください。"
 
-msgid "Please update your adblock config file to use this package."
+msgid "Please update your adblock config file to use this package.<br />"
 msgstr ""
 "このパッケージを使用するには、既存の Adblock 設定ファイルを更新してください。"
+"<br />"
 
 msgid "Query"
 msgstr "検索"
@@ -249,11 +260,11 @@ msgid "Suspend / Resume Adblock"
 msgstr "Adblock の一時停止 / 再開"
 
 msgid ""
-"Target directory for adblock backups. Please use only non-volatile disks, no "
-"ram/tmpfs drives."
+"Target directory for adblock backups. Please use only non-volatile disks, e."
+"g. an external usb stick."
 msgstr ""
-"Adblock バックアップの保存先ディレクトリです。 RAM/tmpfs ドライブではなく、不"
-"揮発性ドライブのみを使用してください。"
+"Adblock バックアップの保存先ディレクトリです。 外部 USB フラッシュメモリなど"
+"の不揮発性ドライブのみを使用してください。"
 
 msgid "Target directory for the generated blocklist 'adb_list.overall'."
 msgstr "生成されたブロックリスト 'adb_list.overall' の保存先ディレクトリです。"
@@ -317,6 +328,12 @@ msgstr "ログファイルを見る"
 msgid "Waiting for command to complete..."
 msgstr "コマンド実行中です..."
 
+msgid "Whitelist File"
+msgstr "ホワイトリスト ファイル"
+
+msgid "Whitelist Mode"
+msgstr "ホワイトリスト モード"
+
 msgid "Yes"
 msgstr "はい"
 

+ 56 - 24
package/luci/applications/luci-app-adblock/po/pt-br/adblock.po

@@ -41,12 +41,20 @@ msgstr "Fontes de listas de bloqueio disponíveis."
 msgid "Backup Directory"
 msgstr "Diretório da cópia de segurança"
 
+msgid "Backup Mode"
+msgstr ""
+
+msgid ""
+"Block access to all domains except those explicitly listed in the whitelist "
+"file."
+msgstr ""
+
 msgid "Blocklist Sources"
 msgstr "Fontes de listas de bloqueio"
 
 msgid ""
-"Caution: Please don't select big lists or many lists at once on low memory "
-"devices to prevent OOM exceptions!"
+"Caution: To prevent OOM exceptions on low memory devices with less than 64 "
+"MB free RAM, please do not select too many lists - 5-6 should be sufficient!"
 msgstr ""
 
 msgid ""
@@ -65,10 +73,8 @@ msgstr ""
 
 msgid ""
 "Create compressed blocklist backups, they will be used in case of download "
-"errors or during startup in manual mode."
+"errors or during startup in backup mode."
 msgstr ""
-"Crie backups comprimidos das listas de bloqueio, eles serão usados em caso "
-"de erro dedownload ou durante o início em modo manual."
 
 msgid "DNS Backend (DNS Directory)"
 msgstr ""
@@ -89,6 +95,12 @@ msgstr ""
 msgid "Download Utility (SSL Library)"
 msgstr "Utilitário de Download (Biblioteca SSL)"
 
+msgid ""
+"During opkg package installation use the '--force-maintainer' option to "
+"overwrite the pre-existing config file or download a fresh default config "
+"from <a href=\"%s\" target=\"_blank\">here</a>"
+msgstr ""
+
 msgid "Edit Blacklist"
 msgstr "Editar Lista de Bloqueio"
 
@@ -106,10 +118,8 @@ msgstr "Habilitar cópia de segurança da lista de bloqueio"
 
 msgid ""
 "Enable memory intense overall sort / duplicate removal on low memory devices "
-"(&lt; 64 MB RAM)"
+"(&lt; 64 MB free RAM)"
 msgstr ""
-"Ativar tipo geral intenso de memória / duplicar remoção em dispositivos com "
-"pouca memória (&lt; 64 MB RAM)"
 
 msgid "Enable verbose debug logging in case of any processing error."
 msgstr ""
@@ -128,11 +138,9 @@ msgstr ""
 "SSL adequada, e.x. 'libustream-ssl' ou o wget 'built-in'."
 
 msgid ""
-"For further information <a href=\"%s\" target=\"_blank\">see online "
+"For further information <a href=\"%s\" target=\"_blank\">check the online "
 "documentation</a>"
 msgstr ""
-"Para outras informações <a href=\"%s\" target=\"_blank\">veja a documentação "
-"online</a>"
 
 msgid "Force Local DNS"
 msgstr "Force o DNS local"
@@ -140,10 +148,7 @@ msgstr "Force o DNS local"
 msgid "Force Overall Sort"
 msgstr "Force Tipo Geral"
 
-msgid ""
-"In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
-"config file or download a fresh default config from <a href=\"%s\" target="
-"\"_blank\">here</a>"
+msgid "Full path to the whitelist file."
 msgstr ""
 
 msgid "Input file not found, please check your configuration."
@@ -161,8 +166,8 @@ msgid ""
 msgstr ""
 
 msgid ""
-"List of available network interfaces. By default the startup will be "
-"triggered by the 'wan' interface.<br />"
+"List of available network interfaces. Usually the startup will be triggered "
+"by the 'wan' interface.<br />"
 msgstr ""
 
 msgid ""
@@ -173,9 +178,6 @@ msgstr ""
 msgid "Loading"
 msgstr "Carregando"
 
-msgid "Manual / Backup mode"
-msgstr "Manual / Modo backup"
-
 msgid "No"
 msgstr "Não"
 
@@ -185,7 +187,7 @@ msgstr ""
 "Opções para aprimoramentos adicionais caso as opções padrão não sejam "
 "suficientes para você."
 
-msgid "Overall Blocked Domains"
+msgid "Overall Domains"
 msgstr ""
 
 msgid "Overview"
@@ -199,7 +201,7 @@ msgstr ""
 msgid "Please edit this file directly in a terminal session."
 msgstr "Por favor edite esse arquivo direto em uma sessão de terminal."
 
-msgid "Please update your adblock config file to use this package."
+msgid "Please update your adblock config file to use this package.<br />"
 msgstr ""
 
 msgid "Query"
@@ -233,8 +235,8 @@ msgid "Suspend / Resume Adblock"
 msgstr "Suspender / Resumir adblock"
 
 msgid ""
-"Target directory for adblock backups. Please use only non-volatile disks, no "
-"ram/tmpfs drives."
+"Target directory for adblock backups. Please use only non-volatile disks, e."
+"g. an external usb stick."
 msgstr ""
 
 msgid "Target directory for the generated blocklist 'adb_list.overall'."
@@ -296,6 +298,12 @@ msgstr "Ver arquivo de log"
 msgid "Waiting for command to complete..."
 msgstr "Aguardando por comando para completar..."
 
+msgid "Whitelist File"
+msgstr ""
+
+msgid "Whitelist Mode"
+msgstr ""
+
 msgid "Yes"
 msgstr "Sim"
 
@@ -314,6 +322,30 @@ msgstr "n/d"
 msgid "paused"
 msgstr ""
 
+#~ msgid ""
+#~ "Create compressed blocklist backups, they will be used in case of "
+#~ "download errors or during startup in manual mode."
+#~ msgstr ""
+#~ "Crie backups comprimidos das listas de bloqueio, eles serão usados em "
+#~ "caso de erro dedownload ou durante o início em modo manual."
+
+#~ msgid ""
+#~ "Enable memory intense overall sort / duplicate removal on low memory "
+#~ "devices (&lt; 64 MB RAM)"
+#~ msgstr ""
+#~ "Ativar tipo geral intenso de memória / duplicar remoção em dispositivos "
+#~ "com pouca memória (&lt; 64 MB RAM)"
+
+#~ msgid ""
+#~ "For further information <a href=\"%s\" target=\"_blank\">see online "
+#~ "documentation</a>"
+#~ msgstr ""
+#~ "Para outras informações <a href=\"%s\" target=\"_blank\">veja a "
+#~ "documentação online</a>"
+
+#~ msgid "Manual / Backup mode"
+#~ msgstr "Manual / Modo backup"
+
 #~ msgid "Blocked domains (overall)"
 #~ msgstr "Domínios bloqueados (total)"
 

+ 70 - 33
package/luci/applications/luci-app-adblock/po/sv/adblock.po

@@ -2,7 +2,7 @@ msgid ""
 msgstr "Content-Type: text/plain; charset=UTF-8\n"
 
 msgid "-------"
-msgstr ""
+msgstr "-------"
 
 msgid "Adblock"
 msgstr "Adblock"
@@ -11,10 +11,10 @@ msgid "Adblock Logfile"
 msgstr "Adblock's loggfil"
 
 msgid "Adblock Status"
-msgstr ""
+msgstr "Status för Adblock"
 
 msgid "Adblock Version"
-msgstr "Version för Adblock"
+msgstr "Version av Adblock"
 
 msgid "Additional trigger delay in seconds before adblock processing begins."
 msgstr ""
@@ -28,18 +28,29 @@ msgstr "Tillgängliga källor för blockeringslistor"
 msgid "Backup Directory"
 msgstr "Säkerhetskopiera mapp"
 
+msgid "Backup Mode"
+msgstr ""
+
+msgid ""
+"Block access to all domains except those explicitly listed in the whitelist "
+"file."
+msgstr ""
+
 msgid "Blocklist Sources"
 msgstr "Källor för blockeringslistor"
 
 msgid ""
-"Caution: Please don't select big lists or many lists at once on low memory "
-"devices to prevent OOM exceptions!"
+"Caution: To prevent OOM exceptions on low memory devices with less than 64 "
+"MB free RAM, please do not select too many lists - 5-6 should be sufficient!"
 msgstr ""
 
 msgid ""
 "Choose 'none' to disable automatic startups, 'timed' to use a classic "
 "timeout (default 30 sec.) or select another trigger interface."
 msgstr ""
+"Välj 'inga' för att stänga av automatiska uppstarter, 'tidsinställd för att "
+"använda ett klassiskt avbrott (30 sek. är standard) eller välj ett annat "
+"utlösande gränssnitt."
 
 msgid "Collecting data..."
 msgstr "Samlar in data..."
@@ -52,14 +63,14 @@ msgstr ""
 
 msgid ""
 "Create compressed blocklist backups, they will be used in case of download "
-"errors or during startup in manual mode."
+"errors or during startup in backup mode."
 msgstr ""
 
 msgid "DNS Backend (DNS Directory)"
-msgstr ""
+msgstr "DNS-bakände (DNS-mapp)"
 
 msgid "DNS Directory"
-msgstr ""
+msgstr "DNS-mapp"
 
 msgid "Description"
 msgstr "Beskrivning"
@@ -74,6 +85,12 @@ msgstr ""
 msgid "Download Utility (SSL Library)"
 msgstr "Nerladdningsprogram (SSL-bibliotek)"
 
+msgid ""
+"During opkg package installation use the '--force-maintainer' option to "
+"overwrite the pre-existing config file or download a fresh default config "
+"from <a href=\"%s\" target=\"_blank\">here</a>"
+msgstr ""
+
 msgid "Edit Blacklist"
 msgstr "Redigera svartlista"
 
@@ -91,7 +108,7 @@ msgstr "Aktivera säkerhetskopiering av blockeringslistan"
 
 msgid ""
 "Enable memory intense overall sort / duplicate removal on low memory devices "
-"(&lt; 64 MB RAM)"
+"(&lt; 64 MB free RAM)"
 msgstr ""
 
 msgid "Enable verbose debug logging in case of any processing error."
@@ -109,11 +126,9 @@ msgid ""
 msgstr ""
 
 msgid ""
-"For further information <a href=\"%s\" target=\"_blank\">see online "
+"For further information <a href=\"%s\" target=\"_blank\">check the online "
 "documentation</a>"
 msgstr ""
-"För mer information <a href=\"%s\" target=\"_blank\">se dokumentationen på "
-"internet</a>"
 
 msgid "Force Local DNS"
 msgstr "Tvinga lokal DNS"
@@ -121,10 +136,7 @@ msgstr "Tvinga lokal DNS"
 msgid "Force Overall Sort"
 msgstr ""
 
-msgid ""
-"In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
-"config file or download a fresh default config from <a href=\"%s\" target="
-"\"_blank\">here</a>"
+msgid "Full path to the whitelist file."
 msgstr ""
 
 msgid "Input file not found, please check your configuration."
@@ -135,7 +147,7 @@ msgid "Invalid domain specified!"
 msgstr "Ogiltig domän angiven!"
 
 msgid "Last Run"
-msgstr ""
+msgstr "Kördes senast"
 
 msgid ""
 "List URLs and Shallalist category selections are configurable in the "
@@ -143,8 +155,8 @@ msgid ""
 msgstr ""
 
 msgid ""
-"List of available network interfaces. By default the startup will be "
-"triggered by the 'wan' interface.<br />"
+"List of available network interfaces. Usually the startup will be triggered "
+"by the 'wan' interface.<br />"
 msgstr ""
 
 msgid ""
@@ -155,9 +167,6 @@ msgstr ""
 msgid "Loading"
 msgstr "Laddar"
 
-msgid "Manual / Backup mode"
-msgstr "Manuell / Säkerhetskopieringsläge"
-
 msgid "No"
 msgstr "Nej"
 
@@ -165,7 +174,7 @@ msgid ""
 "Options for further tweaking in case the defaults are not suitable for you."
 msgstr ""
 
-msgid "Overall Blocked Domains"
+msgid "Overall Domains"
 msgstr ""
 
 msgid "Overview"
@@ -179,7 +188,7 @@ msgstr ""
 msgid "Please edit this file directly in a terminal session."
 msgstr "Vänligen redigera den här filen direkt i en terminal-session."
 
-msgid "Please update your adblock config file to use this package."
+msgid "Please update your adblock config file to use this package.<br />"
 msgstr ""
 
 msgid "Query"
@@ -192,7 +201,7 @@ msgid "Redirect all DNS queries from 'lan' zone to the local resolver."
 msgstr ""
 
 msgid "Resume"
-msgstr ""
+msgstr "Återuppta"
 
 msgid "Runtime Information"
 msgstr "Information om körtid"
@@ -204,17 +213,17 @@ msgid "Save"
 msgstr "Spara"
 
 msgid "Startup Trigger"
-msgstr ""
+msgstr "Uppstartslösare"
 
 msgid "Suspend"
-msgstr ""
+msgstr "Stäng av"
 
 msgid "Suspend / Resume Adblock"
 msgstr "Upphäv / Återuppta adblock"
 
 msgid ""
-"Target directory for adblock backups. Please use only non-volatile disks, no "
-"ram/tmpfs drives."
+"Target directory for adblock backups. Please use only non-volatile disks, e."
+"g. an external usb stick."
 msgstr ""
 
 msgid "Target directory for the generated blocklist 'adb_list.overall'."
@@ -271,23 +280,51 @@ msgstr "Visa loggfil"
 msgid "Waiting for command to complete..."
 msgstr "Väntar på att kommandot ska slutföras..."
 
+msgid "Whitelist File"
+msgstr ""
+
+msgid "Whitelist Mode"
+msgstr ""
+
 msgid "Yes"
 msgstr "Ja"
 
 msgid "disabled"
-msgstr ""
+msgstr "inaktiverad"
 
 msgid "enabled"
-msgstr ""
+msgstr "aktiverad"
 
 msgid "error"
-msgstr ""
+msgstr "fel"
 
 msgid "n/a"
 msgstr "n/a"
 
 msgid "paused"
-msgstr ""
+msgstr "pausad"
+
+#~ msgid ""
+#~ "Caution: Please don't select big lists or many lists at once on low "
+#~ "memory devices to prevent OOM exceptions!"
+#~ msgstr ""
+#~ "Försiktig: Vänligen välj inte stora listor eller många listor på samma "
+#~ "gång för enheter med lite minne för att undvika OOM-undantag!"
+
+#~ msgid ""
+#~ "For further information <a href=\"%s\" target=\"_blank\">see online "
+#~ "documentation</a>"
+#~ msgstr ""
+#~ "För mer information <a href=\"%s\" target=\"_blank\">se dokumentationen "
+#~ "på internet</a>"
+
+#~ msgid "Manual / Backup mode"
+#~ msgstr "Manuell / Säkerhetskopieringsläge"
+
+#~ msgid "Please update your adblock config file to use this package."
+#~ msgstr ""
+#~ "Vänligen uppdatera din adblock's konfigurationsfil till att använda det "
+#~ "här paketet."
 
 #~ msgid "Blocked domains (overall)"
 #~ msgstr "Blockerade domäner (övergripande)"

+ 32 - 18
package/luci/applications/luci-app-adblock/po/templates/adblock.pot

@@ -28,12 +28,20 @@ msgstr ""
 msgid "Backup Directory"
 msgstr ""
 
+msgid "Backup Mode"
+msgstr ""
+
+msgid ""
+"Block access to all domains except those explicitly listed in the whitelist "
+"file."
+msgstr ""
+
 msgid "Blocklist Sources"
 msgstr ""
 
 msgid ""
-"Caution: Please don't select big lists or many lists at once on low memory "
-"devices to prevent OOM exceptions!"
+"Caution: To prevent OOM exceptions on low memory devices with less than 64 "
+"MB free RAM, please do not select too many lists - 5-6 should be sufficient!"
 msgstr ""
 
 msgid ""
@@ -50,7 +58,7 @@ msgstr ""
 
 msgid ""
 "Create compressed blocklist backups, they will be used in case of download "
-"errors or during startup in manual mode."
+"errors or during startup in backup mode."
 msgstr ""
 
 msgid "DNS Backend (DNS Directory)"
@@ -70,6 +78,12 @@ msgstr ""
 msgid "Download Utility (SSL Library)"
 msgstr ""
 
+msgid ""
+"During opkg package installation use the '--force-maintainer' option to "
+"overwrite the pre-existing config file or download a fresh default config "
+"from <a href=\"%s\" target=\"_blank\">here</a>"
+msgstr ""
+
 msgid "Edit Blacklist"
 msgstr ""
 
@@ -87,7 +101,7 @@ msgstr ""
 
 msgid ""
 "Enable memory intense overall sort / duplicate removal on low memory devices "
-"(&lt; 64 MB RAM)"
+"(&lt; 64 MB free RAM)"
 msgstr ""
 
 msgid "Enable verbose debug logging in case of any processing error."
@@ -105,7 +119,7 @@ msgid ""
 msgstr ""
 
 msgid ""
-"For further information <a href=\"%s\" target=\"_blank\">see online "
+"For further information <a href=\"%s\" target=\"_blank\">check the online "
 "documentation</a>"
 msgstr ""
 
@@ -115,10 +129,7 @@ msgstr ""
 msgid "Force Overall Sort"
 msgstr ""
 
-msgid ""
-"In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
-"config file or download a fresh default config from <a href=\"%s\" target="
-"\"_blank\">here</a>"
+msgid "Full path to the whitelist file."
 msgstr ""
 
 msgid "Input file not found, please check your configuration."
@@ -136,8 +147,8 @@ msgid ""
 msgstr ""
 
 msgid ""
-"List of available network interfaces. By default the startup will be "
-"triggered by the 'wan' interface.<br />"
+"List of available network interfaces. Usually the startup will be triggered "
+"by the 'wan' interface.<br />"
 msgstr ""
 
 msgid ""
@@ -148,9 +159,6 @@ msgstr ""
 msgid "Loading"
 msgstr ""
 
-msgid "Manual / Backup mode"
-msgstr ""
-
 msgid "No"
 msgstr ""
 
@@ -158,7 +166,7 @@ msgid ""
 "Options for further tweaking in case the defaults are not suitable for you."
 msgstr ""
 
-msgid "Overall Blocked Domains"
+msgid "Overall Domains"
 msgstr ""
 
 msgid "Overview"
@@ -172,7 +180,7 @@ msgstr ""
 msgid "Please edit this file directly in a terminal session."
 msgstr ""
 
-msgid "Please update your adblock config file to use this package."
+msgid "Please update your adblock config file to use this package.<br />"
 msgstr ""
 
 msgid "Query"
@@ -206,8 +214,8 @@ msgid "Suspend / Resume Adblock"
 msgstr ""
 
 msgid ""
-"Target directory for adblock backups. Please use only non-volatile disks, no "
-"ram/tmpfs drives."
+"Target directory for adblock backups. Please use only non-volatile disks, e."
+"g. an external usb stick."
 msgstr ""
 
 msgid "Target directory for the generated blocklist 'adb_list.overall'."
@@ -258,6 +266,12 @@ msgstr ""
 msgid "Waiting for command to complete..."
 msgstr ""
 
+msgid "Whitelist File"
+msgstr ""
+
+msgid "Whitelist Mode"
+msgstr ""
+
 msgid "Yes"
 msgstr ""
 

+ 134 - 62
package/luci/applications/luci-app-adblock/po/zh-cn/adblock.po

@@ -1,20 +1,22 @@
 # liushuyu <liushuyu_011@163.com>, 2017.
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-04-15 21:35-0600\n"
-"Last-Translator: liushuyu <liushuyu011@gmail.com>\n"
-"Language-Team: Chinese <kde-i18n-doc@kde.org>\n"
+"PO-Revision-Date: 2017-10-28 16:06+0800\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
 "Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.0.1\n"
+"X-Generator: Gtranslator 2.91.7\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
 msgid "-------"
-msgstr ""
+msgstr "-------"
 
 msgid "Adblock"
 msgstr "Adblock"
@@ -23,35 +25,45 @@ msgid "Adblock Logfile"
 msgstr "Adblock 日志文件"
 
 msgid "Adblock Status"
-msgstr ""
+msgstr "Adblock 状态"
 
 msgid "Adblock Version"
 msgstr "Adblock 版本"
 
 msgid "Additional trigger delay in seconds before adblock processing begins."
-msgstr ""
+msgstr "触发 Adblock 开始处理前的额外延迟(以秒为单位)。"
 
 msgid "Advanced"
 msgstr "高级"
 
 msgid "Available blocklist sources."
-msgstr "可用的 blocklist 来源"
+msgstr "可用的 blocklist 来源"
 
 msgid "Backup Directory"
 msgstr "备份目录"
 
+msgid "Backup Mode"
+msgstr ""
+
+msgid ""
+"Block access to all domains except those explicitly listed in the whitelist "
+"file."
+msgstr ""
+
 msgid "Blocklist Sources"
 msgstr "拦截列表来源"
 
 msgid ""
-"Caution: Please don't select big lists or many lists at once on low memory "
-"devices to prevent OOM exceptions!"
+"Caution: To prevent OOM exceptions on low memory devices with less than 64 "
+"MB free RAM, please do not select too many lists - 5-6 should be sufficient!"
 msgstr ""
 
 msgid ""
 "Choose 'none' to disable automatic startups, 'timed' to use a classic "
 "timeout (default 30 sec.) or select another trigger interface."
 msgstr ""
+"选择“none”以禁用自动启动,“timed”以使用默认的超时设定(默认 30 秒),或选择另"
+"一个触发接口。"
 
 msgid "Collecting data..."
 msgstr "正在收集数据..."
@@ -62,14 +74,14 @@ msgstr "Adblock 配置工具,通过 DNS 来拦截广告和阻止域名。"
 
 msgid ""
 "Create compressed blocklist backups, they will be used in case of download "
-"errors or during startup in manual mode."
+"errors or during startup in backup mode."
 msgstr ""
 
 msgid "DNS Backend (DNS Directory)"
-msgstr ""
+msgstr "DNS 后端(DNS 目录)"
 
 msgid "DNS Directory"
-msgstr ""
+msgstr "DNS 目录"
 
 msgid "Description"
 msgstr "描述"
@@ -77,9 +89,15 @@ msgstr "描述"
 msgid ""
 "Do not automatically update blocklists during startup, use blocklist backups "
 "instead."
-msgstr ""
+msgstr "启动期间不要自动更新 blocklists,改用 blocklists 的备份。"
 
 msgid "Download Utility (SSL Library)"
+msgstr "下载实用程序(SSL 库)"
+
+msgid ""
+"During opkg package installation use the '--force-maintainer' option to "
+"overwrite the pre-existing config file or download a fresh default config "
+"from <a href=\"%s\" target=\"_blank\">here</a>"
 msgstr ""
 
 msgid "Edit Blacklist"
@@ -92,21 +110,21 @@ msgid "Edit Whitelist"
 msgstr "编辑白名单"
 
 msgid "Enable Adblock"
-msgstr "启用Adblock"
+msgstr "启用 Adblock"
 
 msgid "Enable Blocklist Backup"
-msgstr "启用拦截规则备份"
+msgstr "启用 Blocklist 备份"
 
 msgid ""
 "Enable memory intense overall sort / duplicate removal on low memory devices "
-"(&lt; 64 MB RAM)"
+"(&lt; 64 MB free RAM)"
 msgstr ""
 
 msgid "Enable verbose debug logging in case of any processing error."
-msgstr ""
+msgstr "在出现任何处理错误的情况下启用详细调试日志记录。"
 
 msgid "Enabled"
-msgstr "启用"
+msgstr "启用"
 
 msgid "Extra Options"
 msgstr "额外选项"
@@ -115,62 +133,58 @@ msgid ""
 "For SSL protected blocklist sources you need a suitable SSL library, e.g. "
 "'libustream-ssl' or the wget 'built-in'."
 msgstr ""
+"对于 SSL 保护的 blocklist 源,您需要一个合适的 SSL 库,例如'libustream-"
+"ssl'或 wget'built-in'。"
 
 msgid ""
-"For further information <a href=\"%s\" target=\"_blank\">see online "
+"For further information <a href=\"%s\" target=\"_blank\">check the online "
 "documentation</a>"
 msgstr ""
 
 msgid "Force Local DNS"
-msgstr ""
+msgstr "强制本地 DNS"
 
 msgid "Force Overall Sort"
-msgstr ""
+msgstr "强制整体排序"
 
-msgid ""
-"In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
-"config file or download a fresh default config from <a href=\"%s\" target="
-"\"_blank\">here</a>"
+msgid "Full path to the whitelist file."
 msgstr ""
 
 msgid "Input file not found, please check your configuration."
-msgstr ""
+msgstr "输入文件未找到,请检查您的配置。"
 
 msgid "Invalid domain specified!"
 msgstr "无效域名!"
 
 msgid "Last Run"
-msgstr ""
+msgstr "最后运行"
 
 msgid ""
 "List URLs and Shallalist category selections are configurable in the "
 "'Advanced' section.<br />"
-msgstr ""
+msgstr "列表 URL 和 Shallalist 类别选择可在“高级”选项卡中配置。<br />"
 
 msgid ""
-"List of available network interfaces. By default the startup will be "
-"triggered by the 'wan' interface.<br />"
+"List of available network interfaces. Usually the startup will be triggered "
+"by the 'wan' interface.<br />"
 msgstr ""
 
 msgid ""
 "List of supported DNS backends with their default list export directory.<br /"
 ">"
-msgstr ""
+msgstr "支持的 DNS 后端列表及其默认列表导出目录。<br />"
 
 msgid "Loading"
 msgstr "加载中"
 
-msgid "Manual / Backup mode"
-msgstr ""
-
 msgid "No"
 msgstr "否"
 
 msgid ""
 "Options for further tweaking in case the defaults are not suitable for you."
-msgstr "在默认设置并不适合时的额外选项。"
+msgstr "在默认设置并不适合时的额外选项。"
 
-msgid "Overall Blocked Domains"
+msgid "Overall Domains"
 msgstr ""
 
 msgid "Overview"
@@ -180,89 +194,91 @@ msgid ""
 "Please add only one domain per line. Comments introduced with '#' are "
 "allowed - ip addresses, wildcards and regex are not."
 msgstr ""
+"请每行只添加一个域。允许使用'#'开头的注释 - ip 地址、通配符和正则表达式都不"
+"允许。"
 
 msgid "Please edit this file directly in a terminal session."
-msgstr ""
+msgstr "请在终端会话中直接编辑此文件。"
 
-msgid "Please update your adblock config file to use this package."
+msgid "Please update your adblock config file to use this package.<br />"
 msgstr ""
 
 msgid "Query"
 msgstr "查询"
 
 msgid "Query domains"
-msgstr ""
+msgstr "查询域"
 
 msgid "Redirect all DNS queries from 'lan' zone to the local resolver."
-msgstr ""
+msgstr "将所有 DNS 查询从“lan”区域重定向到本地解析器。"
 
 msgid "Resume"
-msgstr ""
+msgstr "恢复"
 
 msgid "Runtime Information"
 msgstr "运行信息"
 
 msgid "SSL req."
-msgstr ""
+msgstr "SSL 要求"
 
 msgid "Save"
-msgstr ""
+msgstr "保存"
 
 msgid "Startup Trigger"
-msgstr ""
+msgstr "启动触发器"
 
 msgid "Suspend"
-msgstr ""
+msgstr "暂停"
 
 msgid "Suspend / Resume Adblock"
 msgstr "暂停/恢复 Adblock"
 
 msgid ""
-"Target directory for adblock backups. Please use only non-volatile disks, no "
-"ram/tmpfs drives."
+"Target directory for adblock backups. Please use only non-volatile disks, e."
+"g. an external usb stick."
 msgstr ""
 
 msgid "Target directory for the generated blocklist 'adb_list.overall'."
-msgstr ""
+msgstr "生成的 blocklist 'adb_list.overall'的目标目录。"
 
 msgid "The file size is too large for online editing in LuCI (&gt; 512 KB)."
-msgstr ""
+msgstr "文件大小太大,无法在 LuCI(&gt; 512 KB)中进行在线编辑。"
 
 msgid ""
 "This form allows you to modify the content of the adblock blacklist (%s)."
 "<br />"
-msgstr ""
+msgstr "此表单允许您修改 adblock 黑名单(%s)的内容。<br />"
 
 msgid ""
 "This form allows you to modify the content of the adblock whitelist (%s)."
 "<br />"
-msgstr ""
+msgstr "此表单允许您修改 adblock 白名单(%s)的内容。<br />"
 
 msgid ""
 "This form allows you to modify the content of the main adblock configuration "
 "file (/etc/config/adblock)."
-msgstr ""
+msgstr "此表单允许您修改主要 adblock 配置文件(/etc/config/adblock)的内容。"
 
 msgid ""
 "This form allows you to query active block lists for certain domains, e.g. "
 "for whitelisting."
-msgstr ""
+msgstr "此表单允许您查询某些域的活动块列表,例如用于列出白名单。"
 
 msgid ""
 "This form shows the syslog output, pre-filtered for adblock related messages "
 "only."
-msgstr ""
+msgstr "此表单显示系统日志输出,仅针对 adblock 相关的消息进行了预筛选。"
 
 msgid ""
 "To overwrite the default path use the 'DNS Directory' option in the extra "
 "section below."
-msgstr ""
+msgstr "要覆盖默认路径,请使用下面额外部分中的“DNS 目录”选项。"
 
 msgid "Trigger Delay"
 msgstr "触发延迟"
 
 msgid "Verbose Debug Logging"
-msgstr ""
+msgstr "详细的调试记录"
 
 msgid "View Logfile"
 msgstr "查看日志文件"
@@ -270,23 +286,79 @@ msgstr "查看日志文件"
 msgid "Waiting for command to complete..."
 msgstr "正在执行命令..."
 
+msgid "Whitelist File"
+msgstr ""
+
+msgid "Whitelist Mode"
+msgstr ""
+
 msgid "Yes"
 msgstr "是"
 
 msgid "disabled"
-msgstr ""
+msgstr "已禁用"
 
 msgid "enabled"
-msgstr ""
+msgstr "已启用"
 
 msgid "error"
-msgstr ""
+msgstr "错误"
 
 msgid "n/a"
-msgstr ""
+msgstr "不可用"
 
 msgid "paused"
-msgstr ""
+msgstr "已暂停"
+
+#~ msgid ""
+#~ "Caution: Please don't select big lists or many lists at once on low "
+#~ "memory devices to prevent OOM exceptions!"
+#~ msgstr ""
+#~ "注意:请勿在内存较小的设备上选择过长的列表或同时选择多个列表,以防止 OOM "
+#~ "异常!"
+
+#~ msgid ""
+#~ "Create compressed blocklist backups, they will be used in case of "
+#~ "download errors or during startup in manual mode."
+#~ msgstr "创建压缩的 blocklist 备份,它们将在下载错误或手动模式下启动时使用。"
+
+#~ msgid ""
+#~ "Enable memory intense overall sort / duplicate removal on low memory "
+#~ "devices (&lt; 64 MB RAM)"
+#~ msgstr "在低内存设备上启用耗用内存的整体排序/重复规则删除(&lt;64 MB RAM)"
+
+#~ msgid ""
+#~ "For further information <a href=\"%s\" target=\"_blank\">see online "
+#~ "documentation</a>"
+#~ msgstr "有关更多信息,请<a href=\"%s\" target=\"_blank\">参阅在线文档</a>"
+
+#~ msgid ""
+#~ "In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
+#~ "config file or download a fresh default config from <a href=\"%s\" target="
+#~ "\"_blank\">here</a>"
+#~ msgstr ""
+#~ "在 OPKG 中,使用“--force-maintainer”选项覆盖预先存在的配置文件,或从<a "
+#~ "href=\"%s\" target=\"_blank\">此处</a>下载新的默认配置"
+
+#~ msgid ""
+#~ "List of available network interfaces. By default the startup will be "
+#~ "triggered by the 'wan' interface.<br />"
+#~ msgstr "可用网络接口列表。默认情况下,将由“wan”界面触发启动。<br />"
+
+#~ msgid "Manual / Backup mode"
+#~ msgstr "手动/备份模式"
+
+#~ msgid "Overall Blocked Domains"
+#~ msgstr "整体封锁域名"
+
+#~ msgid "Please update your adblock config file to use this package."
+#~ msgstr "请更新您的 adblock 配置文件以使用此软件包。"
+
+#~ msgid ""
+#~ "Target directory for adblock backups. Please use only non-volatile disks, "
+#~ "no ram/tmpfs drives."
+#~ msgstr ""
+#~ "adblock 备份的目标目录。请仅使用非易失性磁盘,不使用 ram/tmpfs 驱动器。"
 
 #~ msgid "DNS backend"
 #~ msgstr "DNS 后端"

+ 455 - 0
package/luci/applications/luci-app-adblock/po/zh-tw/adblock.po

@@ -0,0 +1,455 @@
+# liushuyu <liushuyu_011@163.com>, 2017.
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: 2017-10-28 16:06+0800\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
+"Language: zh_TW\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Gtranslator 2.91.7\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+msgid "-------"
+msgstr "-------"
+
+msgid "Adblock"
+msgstr "Adblock"
+
+msgid "Adblock Logfile"
+msgstr "Adblock 日誌檔案"
+
+msgid "Adblock Status"
+msgstr "Adblock 狀態"
+
+msgid "Adblock Version"
+msgstr "Adblock 版本"
+
+msgid "Additional trigger delay in seconds before adblock processing begins."
+msgstr "觸發 Adblock 開始處理前的額外延遲(以秒為單位)。"
+
+msgid "Advanced"
+msgstr "高階"
+
+msgid "Available blocklist sources."
+msgstr "可用的 blocklist 來源。"
+
+msgid "Backup Directory"
+msgstr "備份目錄"
+
+msgid "Backup Mode"
+msgstr ""
+
+msgid ""
+"Block access to all domains except those explicitly listed in the whitelist "
+"file."
+msgstr ""
+
+msgid "Blocklist Sources"
+msgstr "攔截列表來源"
+
+msgid ""
+"Caution: To prevent OOM exceptions on low memory devices with less than 64 "
+"MB free RAM, please do not select too many lists - 5-6 should be sufficient!"
+msgstr ""
+
+msgid ""
+"Choose 'none' to disable automatic startups, 'timed' to use a classic "
+"timeout (default 30 sec.) or select another trigger interface."
+msgstr ""
+"選擇“none”以禁用自動啟動,“timed”以使用預設的超時設定(預設 30 秒),或選擇另"
+"一個觸發介面。"
+
+msgid "Collecting data..."
+msgstr "正在收集資料..."
+
+msgid ""
+"Configuration of the adblock package to block ad/abuse domains by using DNS."
+msgstr "Adblock 配置工具,通過 DNS 來攔截廣告和阻止域名。"
+
+msgid ""
+"Create compressed blocklist backups, they will be used in case of download "
+"errors or during startup in backup mode."
+msgstr ""
+
+msgid "DNS Backend (DNS Directory)"
+msgstr "DNS 後端(DNS 目錄)"
+
+msgid "DNS Directory"
+msgstr "DNS 目錄"
+
+msgid "Description"
+msgstr "描述"
+
+msgid ""
+"Do not automatically update blocklists during startup, use blocklist backups "
+"instead."
+msgstr "啟動期間不要自動更新 blocklists,改用 blocklists 的備份。"
+
+msgid "Download Utility (SSL Library)"
+msgstr "下載實用程式(SSL 庫)"
+
+msgid ""
+"During opkg package installation use the '--force-maintainer' option to "
+"overwrite the pre-existing config file or download a fresh default config "
+"from <a href=\"%s\" target=\"_blank\">here</a>"
+msgstr ""
+
+msgid "Edit Blacklist"
+msgstr "編輯黑名單"
+
+msgid "Edit Configuration"
+msgstr "編輯設定"
+
+msgid "Edit Whitelist"
+msgstr "編輯白名單"
+
+msgid "Enable Adblock"
+msgstr "啟用 Adblock"
+
+msgid "Enable Blocklist Backup"
+msgstr "啟用 Blocklist 備份"
+
+msgid ""
+"Enable memory intense overall sort / duplicate removal on low memory devices "
+"(&lt; 64 MB free RAM)"
+msgstr ""
+
+msgid "Enable verbose debug logging in case of any processing error."
+msgstr "在出現任何處理錯誤的情況下啟用詳細除錯日誌記錄。"
+
+msgid "Enabled"
+msgstr "已啟用"
+
+msgid "Extra Options"
+msgstr "額外選項"
+
+msgid ""
+"For SSL protected blocklist sources you need a suitable SSL library, e.g. "
+"'libustream-ssl' or the wget 'built-in'."
+msgstr ""
+"對於 SSL 保護的 blocklist 源,您需要一個合適的 SSL 庫,例如'libustream-"
+"ssl'或 wget'built-in'。"
+
+msgid ""
+"For further information <a href=\"%s\" target=\"_blank\">check the online "
+"documentation</a>"
+msgstr ""
+
+msgid "Force Local DNS"
+msgstr "強制本地 DNS"
+
+msgid "Force Overall Sort"
+msgstr "強制整體排序"
+
+msgid "Full path to the whitelist file."
+msgstr ""
+
+msgid "Input file not found, please check your configuration."
+msgstr "輸入檔案未找到,請檢查您的配置。"
+
+msgid "Invalid domain specified!"
+msgstr "無效域名!"
+
+msgid "Last Run"
+msgstr "最後執行"
+
+msgid ""
+"List URLs and Shallalist category selections are configurable in the "
+"'Advanced' section.<br />"
+msgstr "列表 URL 和 Shallalist 類別選擇可在“高階”選項卡中配置。<br />"
+
+msgid ""
+"List of available network interfaces. Usually the startup will be triggered "
+"by the 'wan' interface.<br />"
+msgstr ""
+
+msgid ""
+"List of supported DNS backends with their default list export directory.<br /"
+">"
+msgstr "支援的 DNS 後端列表及其預設列表匯出目錄。<br />"
+
+msgid "Loading"
+msgstr "載入中"
+
+msgid "No"
+msgstr "否"
+
+msgid ""
+"Options for further tweaking in case the defaults are not suitable for you."
+msgstr "在預設設定並不適合您時的額外選項。"
+
+msgid "Overall Domains"
+msgstr ""
+
+msgid "Overview"
+msgstr "總覽"
+
+msgid ""
+"Please add only one domain per line. Comments introduced with '#' are "
+"allowed - ip addresses, wildcards and regex are not."
+msgstr ""
+"請每行只新增一個域。允許使用'#'開頭的註釋 - ip 位址、萬用字元和正則表示式都"
+"不允許。"
+
+msgid "Please edit this file directly in a terminal session."
+msgstr "請在終端會話中直接編輯此檔案。"
+
+msgid "Please update your adblock config file to use this package.<br />"
+msgstr ""
+
+msgid "Query"
+msgstr "查詢"
+
+msgid "Query domains"
+msgstr "查詢域"
+
+msgid "Redirect all DNS queries from 'lan' zone to the local resolver."
+msgstr "將所有 DNS 查詢從“lan”區域重定向到本地解析器。"
+
+msgid "Resume"
+msgstr "恢復"
+
+msgid "Runtime Information"
+msgstr "執行資訊"
+
+msgid "SSL req."
+msgstr "SSL 要求"
+
+msgid "Save"
+msgstr "儲存"
+
+msgid "Startup Trigger"
+msgstr "啟動觸發器"
+
+msgid "Suspend"
+msgstr "暫停"
+
+msgid "Suspend / Resume Adblock"
+msgstr "暫停/恢復 Adblock"
+
+msgid ""
+"Target directory for adblock backups. Please use only non-volatile disks, e."
+"g. an external usb stick."
+msgstr ""
+
+msgid "Target directory for the generated blocklist 'adb_list.overall'."
+msgstr "生成的 blocklist 'adb_list.overall'的目標目錄。"
+
+msgid "The file size is too large for online editing in LuCI (&gt; 512 KB)."
+msgstr "檔案大小太大,無法在 LuCI(&gt; 512 KB)中進行線上編輯。"
+
+msgid ""
+"This form allows you to modify the content of the adblock blacklist (%s)."
+"<br />"
+msgstr "此表單允許您修改 adblock 黑名單(%s)的內容。<br />"
+
+msgid ""
+"This form allows you to modify the content of the adblock whitelist (%s)."
+"<br />"
+msgstr "此表單允許您修改 adblock 白名單(%s)的內容。<br />"
+
+msgid ""
+"This form allows you to modify the content of the main adblock configuration "
+"file (/etc/config/adblock)."
+msgstr "此表單允許您修改主要 adblock 配置檔案(/etc/config/adblock)的內容。"
+
+msgid ""
+"This form allows you to query active block lists for certain domains, e.g. "
+"for whitelisting."
+msgstr "此表單允許您查詢某些域的活動塊列表,例如用於列出白名單。"
+
+msgid ""
+"This form shows the syslog output, pre-filtered for adblock related messages "
+"only."
+msgstr "此表單顯示系統日誌輸出,僅針對 adblock 相關的訊息進行了預篩選。"
+
+msgid ""
+"To overwrite the default path use the 'DNS Directory' option in the extra "
+"section below."
+msgstr "要覆蓋預設路徑,請使用下面額外部分中的“DNS 目錄”選項。"
+
+msgid "Trigger Delay"
+msgstr "觸發延遲"
+
+msgid "Verbose Debug Logging"
+msgstr "詳細的除錯記錄"
+
+msgid "View Logfile"
+msgstr "檢視日誌檔案"
+
+msgid "Waiting for command to complete..."
+msgstr "正在執行命令..."
+
+msgid "Whitelist File"
+msgstr ""
+
+msgid "Whitelist Mode"
+msgstr ""
+
+msgid "Yes"
+msgstr "是"
+
+msgid "disabled"
+msgstr "已禁用"
+
+msgid "enabled"
+msgstr "已啟用"
+
+msgid "error"
+msgstr "錯誤"
+
+msgid "n/a"
+msgstr "不可用"
+
+msgid "paused"
+msgstr "已暫停"
+
+#~ msgid ""
+#~ "Caution: Please don't select big lists or many lists at once on low "
+#~ "memory devices to prevent OOM exceptions!"
+#~ msgstr ""
+#~ "注意:請勿在記憶體較小的裝置上選擇過長的列表或同時選擇多個列表,以防止 "
+#~ "OOM 異常!"
+
+#~ msgid ""
+#~ "Create compressed blocklist backups, they will be used in case of "
+#~ "download errors or during startup in manual mode."
+#~ msgstr "建立壓縮的 blocklist 備份,它們將在下載錯誤或手動模式下啟動時使用。"
+
+#~ msgid ""
+#~ "Enable memory intense overall sort / duplicate removal on low memory "
+#~ "devices (&lt; 64 MB RAM)"
+#~ msgstr ""
+#~ "在低記憶體裝置上啟用耗用記憶體的整體排序/重複規則刪除(&lt;64 MB RAM)"
+
+#~ msgid ""
+#~ "For further information <a href=\"%s\" target=\"_blank\">see online "
+#~ "documentation</a>"
+#~ msgstr "有關更多資訊,請<a href=\"%s\" target=\"_blank\">參閱線上文件</a>"
+
+#~ msgid ""
+#~ "In OPKG use the '--force-maintainer' option to overwrite the pre-existing "
+#~ "config file or download a fresh default config from <a href=\"%s\" target="
+#~ "\"_blank\">here</a>"
+#~ msgstr ""
+#~ "在 OPKG 中,使用“--force-maintainer”選項覆蓋預先存在的配置檔案,或從<a "
+#~ "href=\"%s\" target=\"_blank\">此處</a>下載新的預設配置"
+
+#~ msgid ""
+#~ "List of available network interfaces. By default the startup will be "
+#~ "triggered by the 'wan' interface.<br />"
+#~ msgstr "可用網路介面列表。預設情況下,將由“wan”介面觸發啟動。<br />"
+
+#~ msgid "Manual / Backup mode"
+#~ msgstr "手動/備份模式"
+
+#~ msgid "Overall Blocked Domains"
+#~ msgstr "整體封鎖域名"
+
+#~ msgid "Please update your adblock config file to use this package."
+#~ msgstr "請更新您的 adblock 配置檔案以使用此軟體包。"
+
+#~ msgid ""
+#~ "Target directory for adblock backups. Please use only non-volatile disks, "
+#~ "no ram/tmpfs drives."
+#~ msgstr ""
+#~ "adblock 備份的目標目錄。請僅使用非易失性磁碟,不使用 ram/tmpfs 驅動器。"
+
+#~ msgid "DNS backend"
+#~ msgstr "DNS 後端"
+
+#~ msgid "Enable verbose debug logging"
+#~ msgstr "啟用詳細除錯輸出"
+
+#~ msgid "Resume adblock"
+#~ msgstr "恢復 Adblock"
+
+#~ msgid "Status"
+#~ msgstr "狀態"
+
+#~ msgid "Suspend adblock"
+#~ msgstr "暫停 Adblock"
+
+#~ msgid "active"
+#~ msgstr "已啟用"
+
+#~ msgid "no domains blocked"
+#~ msgstr "沒有被攔截的域名"
+
+#~ msgid "suspended"
+#~ msgstr "已暫停"
+
+#~ msgid "."
+#~ msgstr "."
+
+#~ msgid "For further information"
+#~ msgstr "更多資訊"
+
+#~ msgid "see online documentation"
+#~ msgstr "檢視線上文件"
+
+#~ msgid "Backup options"
+#~ msgstr "備份選項"
+
+#~ msgid ""
+#~ "). Note that list URLs and Shallalist category selections are not "
+#~ "configurable via Luci."
+#~ msgstr ")。需要注意的是列表URL和列表類別選項無法通過Luci設定。"
+
+#~ msgid "Available blocklist sources ("
+#~ msgstr "可用攔截列表來源("
+
+#~ msgid ""
+#~ "File with whitelisted hosts/domains that are allowed despite being on a "
+#~ "blocklist."
+#~ msgstr "允許的主機/域名列表"
+
+#~ msgid "Global options"
+#~ msgstr "全域性選項"
+
+#~ msgid "Whitelist file"
+#~ msgstr "白名單檔案"
+
+#~ msgid "see list details"
+#~ msgstr "檢視列表詳情"
+
+#~ msgid "Count"
+#~ msgstr "數量"
+
+#~ msgid "IPv4 blackhole ip address"
+#~ msgstr "IPv4禁止列表"
+
+#~ msgid "IPv6 blackhole ip address"
+#~ msgstr "IPv6禁止列表"
+
+#~ msgid "List date/state"
+#~ msgstr "列表日期/狀態"
+
+#~ msgid "Name of the logical lan interface"
+#~ msgstr "LAN介面名稱"
+
+#~ msgid "Port of the adblock uhttpd instance"
+#~ msgstr "Adblock uhttpd埠"
+
+#~ msgid "Redirect all DNS queries to the local resolver"
+#~ msgstr "將所有DNS查詢都重定向到本地解析器"
+
+#~ msgid "Timeout for blocklist fetch (seconds)"
+#~ msgstr "列表查詢超時時間(秒)"
+
+#~ msgid "Total count of blocked domains"
+#~ msgstr "阻止域名總數"
+
+#~ msgid ""
+#~ "When adblock is active, all DNS queries are redirected to the local "
+#~ "resolver in this server by default. You can disable that to allow queries "
+#~ "to external DNS servers."
+#~ msgstr ""
+#~ "當Adblock處於活動狀態時,預設情況下會將所有的DNS查詢重定向到此伺服器的本地"
+#~ "解析器。您可以禁用以允許查詢外部DNS伺服器。"

+ 9 - 8
package/luci/applications/luci-app-advanced-reboot/po/sv/luci-app-advanced-reboot.po

@@ -1,5 +1,5 @@
 msgid ""
-msgstr "Content-Type: text/plain; charset=UTF-8"
+msgstr "Content-Type: text/plain; charset=UTF-8\n"
 
 msgid "Action"
 msgstr "Åtgärd"
@@ -74,9 +74,9 @@ msgid ""
 "might be necessary to renew the address of your computer to reach the device "
 "again, depending on your settings."
 msgstr ""
-"Systemet stänger ner nu.<br /> STÄNG INTE AV ENHETEN!<br /> Beroende 
-"på dina inställningar så kan det vara nödvändigt att förnya din dators adress "
-"för att nå enheten igen."
+"Systemet stänger ner nu.<br /> STÄNG INTE AV ENHETEN!<br /> Beroende på dina "
+"inställningar så kan det vara nödvändigt att förnya din dators adress för "
+"att nå enheten igen."
 
 msgid ""
 "WARNING: An alternative partition might have its own settings and completely "
@@ -94,12 +94,13 @@ msgid ""
 "support power off.<br /><br /> Click \"Proceed\" below to power off your "
 "device."
 msgstr ""
-"VARNING: Att stänga av kan resultera i en omstart i en enhet som inte "
-"har stöd för avstängning.<br /><br /> Klicka på \"Fortsätt\" nedanför för att stänga av din "
-"enhet."
+"VARNING: Att stänga av kan resultera i en omstart i en enhet som inte har "
+"stöd för avstängning.<br /><br /> Klicka på \"Fortsätt\" nedanför för att "
+"stänga av din enhet."
 
 msgid "Warning: There are unsaved changes that will get lost on reboot!"
-msgstr "Varning: Det finns osparade ändringar som kommer att förloras vid omstart!"
+msgstr ""
+"Varning: Det finns osparade ändringar som kommer att förloras vid omstart!"
 
 msgid "Warning: This system does not have two partitions!"
 msgstr "Varning: Det här systemet har inte två partitioner!"

+ 142 - 121
package/luci/applications/luci-app-aria2/po/zh-cn/aria2.po

@@ -1,200 +1,221 @@
-msgid "Aria2"
+#
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
+msgid ""
 msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"PO-Revision-Date: 2017-10-28 16:10+0800\n"
+"X-Generator: Gtranslator 2.91.7\n"
 
-msgid "Aria2 is a multi-protocol &amp; multi-source download utility, here you can configure the settings."
-msgstr "Aria2 是一个支持多协议多线程的下载器, 你可以在这里对其进行配置"
-
-msgid "Aria2 Status"
-msgstr "Aria2 状态"
+msgid "\"Falloc\" is not available in all cases."
+msgstr "\"Falloc\" 并不是在所有情况下都可用"
 
-msgid "Open YAAW"
-msgstr "打开YAAW"
+msgid "<abbr title=\"Distributed Hash Table\">DHT</abbr> enabled"
+msgstr "启用<abbr title=\"分布式哈希表\">DHT</abbr>"
 
-msgid "Open WebUI-Aria2"
-msgstr "打开WebUI-Aria2"
+msgid "<abbr title=\"Local Peer Discovery\">LPD</abbr> enabled"
+msgstr "启用<abbr title=\"本地节点发现\">LPD</abbr>"
 
-msgid "The Aria2 service is running."
-msgstr "Aria2 正在运行"
+msgid "Additional Bt tracker enabled"
+msgstr "添加额外的Tracker"
 
-msgid "The Aria2 service is not running."
-msgstr "Aria2 未运行"
+msgid "Aria2"
+msgstr "Aria2"
 
 msgid "Aria2 Settings"
 msgstr "Aria2 配置"
 
-msgid "General settings"
-msgstr "一般设置"
-
-msgid "Files and Locations"
-msgstr "文件和目录"
+msgid "Aria2 Status"
+msgstr "Aria2 状态"
 
-msgid "Enabled"
-msgstr "启用"
+msgid ""
+"Aria2 is a multi-protocol &amp; multi-source download utility, here you can "
+"configure the settings."
+msgstr "Aria2 是一个支持多协议多线程的下载器, 您可以在这里对其进行配置。"
 
-msgid "Task Settings"
-msgstr "任务设置"
+msgid "Autosave session interval"
+msgstr "定时保存会话间隔"
 
 msgid "BitTorrent Settings"
-msgstr "BT设置"
+msgstr "BitTorrent 设置"
 
-msgid "Run daemon as user"
-msgstr "以此用户权限运行"
+msgid "BitTorrent listen port"
+msgstr "BitTorrent 监听端口"
 
-msgid "RPC port"
-msgstr "RPC端口"
+msgid "Collecting data..."
+msgstr "正在收集数据..."
 
-msgid "RPC authentication method"
-msgstr "RPC认证方式"
+msgid "Config file directory"
+msgstr "配置文件目录"
 
-msgid "No Authentication"
-msgstr "无认证"
+msgid "Debug"
+msgstr "调试"
 
-msgid "Username & Password"
-msgstr "用户名与密码"
+msgid "Default download directory"
+msgstr "默认下载目录"
 
-msgid "Token"
-msgstr "令牌"
+msgid "Disk cache"
+msgstr "磁盘缓存"
 
-msgid "RPC username"
-msgstr "RPC用户名"
+msgid "Enable log"
+msgstr "启用日志"
 
-msgid "RPC password"
-msgstr "RPC密码"
+msgid "Enabled"
+msgstr "启用"
 
-msgid "RPC Token"
-msgstr "RPC令牌"
+msgid "Error"
+msgstr "错误"
 
-msgid "Generate Randomly"
-msgstr "随机生成"
+msgid "Extra Settings"
+msgstr "附加选项"
 
-msgid "Enable log"
-msgstr "启用日志"
+msgid "Falloc"
+msgstr "快速 alloc(Falloc)"
 
-msgid "Log file is in the config file dir."
-msgstr "日志文件在配置文件目录下"
+msgid "Files and Locations"
+msgstr "文件和目录"
 
-msgid "Log level"
-msgstr "日志记录等级"
+msgid "Follow torrent"
+msgstr "自动添加下载的种子"
 
-msgid "Debug"
-msgstr "调试"
+msgid "General Settings"
+msgstr ""
+
+msgid "Generate Randomly"
+msgstr "随机生成"
 
 msgid "Info"
 msgstr "信息"
 
-msgid "Notice"
-msgstr "注意"
+msgid "List of additional Bt tracker"
+msgstr "附加 Bt tracker 列表"
 
-msgid "Warn"
-msgstr "警告"
+msgid "List of extra settings"
+msgstr "附加选项列表"
 
-msgid "Error"
-msgstr "错误"
+msgid "Log file is in the config file dir."
+msgstr "日志文件在配置文件目录下"
 
-msgid "Config file directory"
-msgstr "配置文件目录"
+msgid "Log level"
+msgstr "日志记录等级"
 
-msgid "Default download directory"
-msgstr "默认下载目录"
+msgid "Max concurrent downloads"
+msgstr "最大同时下载任务数"
 
-msgid "Disk cache"
-msgstr "磁盘缓存"
+msgid "Max connection per server"
+msgstr "单服务器最大连接数"
 
-msgid "in bytes, You can append K or M."
-msgstr "单位 B, 你可以在数字后跟上 K 或 M"
+msgid "Max number of peers per torrent"
+msgstr "单个种子最大连接数"
 
-msgid "Preallocation"
-msgstr "磁盘预分配"
+msgid "Max number of split"
+msgstr "单文件最大线程数"
 
-msgid "Off"
-msgstr "关闭"
+msgid "Min split size"
+msgstr "最小文件分片大小"
 
-msgid "Prealloc"
-msgstr ""
+msgid "No Authentication"
+msgstr "无认证"
 
-msgid "Trunc"
-msgstr ""
+msgid "Notice"
+msgstr "注意"
 
-msgid "Falloc"
-msgstr ""
+msgid "Off"
+msgstr "关闭"
 
-msgid "\"Falloc\" is not available in all cases."
-msgstr "\"Falloc\" 并不是在所有情况下都可用"
+msgid "Open WebUI-Aria2"
+msgstr "打开 WebUI-Aria2"
 
-msgid "Overall speed limit enabled"
-msgstr "启用全局限速"
+msgid "Open YAAW"
+msgstr "打开 YAAW"
 
 msgid "Overall download limit"
 msgstr "全局下载限速"
 
-msgid "in bytes/sec, You can append K or M."
-msgstr "单位 B/s, 你可以在数字后跟上 K 或 M"
+msgid "Overall speed limit enabled"
+msgstr "启用全局限速"
 
 msgid "Overall upload limit"
 msgstr "全局上传限速"
 
-msgid "Per task speed limit enabled"
-msgstr "启用单任务限速"
-
 msgid "Per task download limit"
 msgstr "单任务下载限速"
 
+msgid "Per task speed limit enabled"
+msgstr "启用单任务限速"
+
 msgid "Per task upload limit"
 msgstr "单任务上传限速"
 
-msgid "Max concurrent downloads"
-msgstr "最大同时下载任务数"
+msgid "Prealloc"
+msgstr "预分配"
 
-msgid "Max connection per server"
-msgstr "单服务器最大连接数"
+msgid "Preallocation"
+msgstr "磁盘预分配"
 
-msgid "Min split size"
-msgstr "最小文件分片大小"
+msgid "Prefix of peer ID"
+msgstr "Peer ID 前缀"
 
-msgid "Max number of split"
-msgstr "单文件最大线程数"
+msgid "RPC Token"
+msgstr "RPC 令牌"
 
-msgid "Autosave session interval"
-msgstr "定时保存会话间隔"
+msgid "RPC authentication method"
+msgstr "RPC 认证方式"
 
-msgid "Sec"
-msgstr ""
+msgid "RPC password"
+msgstr "RPC 密码"
 
-msgid "User agent value"
-msgstr "用户代理(UA)"
+msgid "RPC port"
+msgstr "RPC 端口"
 
-msgid "<abbr title=\"Distributed Hash Table\">DHT</abbr> enabled"
-msgstr "启用<abbr title=\"分布式哈希表\">DHT</abbr>"
+msgid "RPC username"
+msgstr "RPC 用户名"
 
-msgid "<abbr title=\"Local Peer Discovery\">LPD</abbr> enabled"
-msgstr "启用<abbr title=\"本地节点发现\">LPD</abbr>"
+msgid "Run daemon as user"
+msgstr "以此用户权限运行"
 
-msgid "Follow torrent"
-msgstr "自动添加下载的种子"
+msgid "Sec"
+msgstr ""
 
-msgid "BitTorrent listen port"
-msgstr "BT监听端口"
+msgid "Task Settings"
+msgstr "任务设置"
 
-msgid "Max number of peers per torrent"
-msgstr "单个种子最大连接数"
+msgid "The Aria2 service is not running."
+msgstr "Aria2 未运行"
 
-msgid "Additional Bt tracker enabled"
-msgstr "添加额外的Tracker"
+msgid "The Aria2 service is running."
+msgstr "Aria2 正在运行"
 
-msgid "List of additional Bt tracker"
-msgstr "附加Tracker列表"
+msgid "Token"
+msgstr "令牌"
 
-msgid "Prefix of peer ID"
-msgstr "Peer ID前缀"
+msgid "Trunc"
+msgstr ""
 
-msgid "Extra Settings"
-msgstr "附加选项"
+msgid "Use WebSocket"
+msgstr "使用 WebSocket"
 
-msgid "List of extra settings"
-msgstr "附加选项列表"
+msgid "User agent value"
+msgstr "用户代理(UA)"
+
+msgid "Username & Password"
+msgstr "用户名与密码"
 
 msgid "View Json-RPC URL"
 msgstr "查看 Json-RPC URL"
 
-msgid "Use WebSocket"
-msgstr "使用WebSocket"
+msgid "Warn"
+msgstr "警告"
+
+msgid "in bytes, You can append K or M."
+msgstr "单位 B, 您可以在数字后跟上 K 或 M。"
+
+msgid "in bytes/sec, You can append K or M."
+msgstr "单位 B/s, 您可以在数字后跟上 K 或 M。"
+
+#~ msgid "General settings"
+#~ msgstr "基本设置"

+ 221 - 0
package/luci/applications/luci-app-aria2/po/zh-tw/aria2.po

@@ -0,0 +1,221 @@
+#
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"PO-Revision-Date: 2017-10-28 16:10+0800\n"
+"X-Generator: Gtranslator 2.91.7\n"
+
+msgid "\"Falloc\" is not available in all cases."
+msgstr "\"Falloc\" 並不是在所有情況下都可用"
+
+msgid "<abbr title=\"Distributed Hash Table\">DHT</abbr> enabled"
+msgstr "啟用<abbr title=\"分散式雜湊表\">DHT</abbr>"
+
+msgid "<abbr title=\"Local Peer Discovery\">LPD</abbr> enabled"
+msgstr "啟用<abbr title=\"本地節點發現\">LPD</abbr>"
+
+msgid "Additional Bt tracker enabled"
+msgstr "新增額外的Tracker"
+
+msgid "Aria2"
+msgstr "Aria2"
+
+msgid "Aria2 Settings"
+msgstr "Aria2 配置"
+
+msgid "Aria2 Status"
+msgstr "Aria2 狀態"
+
+msgid ""
+"Aria2 is a multi-protocol &amp; multi-source download utility, here you can "
+"configure the settings."
+msgstr "Aria2 是一個支援多協議多執行緒的下載器, 您可以在這裡對其進行配置。"
+
+msgid "Autosave session interval"
+msgstr "定時儲存會話間隔"
+
+msgid "BitTorrent Settings"
+msgstr "BitTorrent 設定"
+
+msgid "BitTorrent listen port"
+msgstr "BitTorrent 監聽埠"
+
+msgid "Collecting data..."
+msgstr "正在收集資料..."
+
+msgid "Config file directory"
+msgstr "配置檔案目錄"
+
+msgid "Debug"
+msgstr "除錯"
+
+msgid "Default download directory"
+msgstr "預設下載目錄"
+
+msgid "Disk cache"
+msgstr "磁碟快取"
+
+msgid "Enable log"
+msgstr "啟用日誌"
+
+msgid "Enabled"
+msgstr "啟用"
+
+msgid "Error"
+msgstr "錯誤"
+
+msgid "Extra Settings"
+msgstr "附加選項"
+
+msgid "Falloc"
+msgstr "快速 alloc(Falloc)"
+
+msgid "Files and Locations"
+msgstr "檔案和目錄"
+
+msgid "Follow torrent"
+msgstr "自動新增下載的種子"
+
+msgid "General Settings"
+msgstr ""
+
+msgid "Generate Randomly"
+msgstr "隨機生成"
+
+msgid "Info"
+msgstr "資訊"
+
+msgid "List of additional Bt tracker"
+msgstr "附加 Bt tracker 列表"
+
+msgid "List of extra settings"
+msgstr "附加選項列表"
+
+msgid "Log file is in the config file dir."
+msgstr "日誌檔案在配置檔案目錄下"
+
+msgid "Log level"
+msgstr "日誌記錄等級"
+
+msgid "Max concurrent downloads"
+msgstr "最大同時下載任務數"
+
+msgid "Max connection per server"
+msgstr "單伺服器最大連線數"
+
+msgid "Max number of peers per torrent"
+msgstr "單個種子最大連線數"
+
+msgid "Max number of split"
+msgstr "單檔案最大執行緒數"
+
+msgid "Min split size"
+msgstr "最小檔案分片大小"
+
+msgid "No Authentication"
+msgstr "無認證"
+
+msgid "Notice"
+msgstr "注意"
+
+msgid "Off"
+msgstr "關閉"
+
+msgid "Open WebUI-Aria2"
+msgstr "開啟 WebUI-Aria2"
+
+msgid "Open YAAW"
+msgstr "開啟 YAAW"
+
+msgid "Overall download limit"
+msgstr "全域性下載限速"
+
+msgid "Overall speed limit enabled"
+msgstr "啟用全侷限速"
+
+msgid "Overall upload limit"
+msgstr "全域性上傳限速"
+
+msgid "Per task download limit"
+msgstr "單任務下載限速"
+
+msgid "Per task speed limit enabled"
+msgstr "啟用單任務限速"
+
+msgid "Per task upload limit"
+msgstr "單任務上傳限速"
+
+msgid "Prealloc"
+msgstr "預分配"
+
+msgid "Preallocation"
+msgstr "磁碟預分配"
+
+msgid "Prefix of peer ID"
+msgstr "Peer ID 字首"
+
+msgid "RPC Token"
+msgstr "RPC 令牌"
+
+msgid "RPC authentication method"
+msgstr "RPC 認證方式"
+
+msgid "RPC password"
+msgstr "RPC 密碼"
+
+msgid "RPC port"
+msgstr "RPC 埠"
+
+msgid "RPC username"
+msgstr "RPC 使用者名稱"
+
+msgid "Run daemon as user"
+msgstr "以此使用者許可權執行"
+
+msgid "Sec"
+msgstr "秒"
+
+msgid "Task Settings"
+msgstr "任務設定"
+
+msgid "The Aria2 service is not running."
+msgstr "Aria2 未執行"
+
+msgid "The Aria2 service is running."
+msgstr "Aria2 正在執行"
+
+msgid "Token"
+msgstr "令牌"
+
+msgid "Trunc"
+msgstr ""
+
+msgid "Use WebSocket"
+msgstr "使用 WebSocket"
+
+msgid "User agent value"
+msgstr "使用者代理(UA)"
+
+msgid "Username & Password"
+msgstr "使用者名稱與密碼"
+
+msgid "View Json-RPC URL"
+msgstr "檢視 Json-RPC URL"
+
+msgid "Warn"
+msgstr "警告"
+
+msgid "in bytes, You can append K or M."
+msgstr "單位 B, 您可以在數字後跟上 K 或 M。"
+
+msgid "in bytes/sec, You can append K or M."
+msgstr "單位 B/s, 您可以在數字後跟上 K 或 M。"
+
+#~ msgid "General settings"
+#~ msgstr "基本設定"

+ 1 - 1
package/luci/applications/luci-app-attendedsysupgrade/Makefile

@@ -4,7 +4,7 @@
 include $(TOPDIR)/rules.mk
 
 LUCI_TITLE:=LuCI support for attended sysupgrades
-LUCI_DEPENDS:=+luci-base +uhttpd-mod-ubus +rpcd-mod-attendedsysupgrade
+LUCI_DEPENDS:=+luci-base +uhttpd-mod-ubus +attendedsysupgrade-common +cgi-io
 
 include ../../luci.mk
 

+ 375 - 231
package/luci/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm

@@ -71,305 +71,449 @@
     end
 
     apply_acls("/usr/share/rpcd/acl.d/attendedsysupgrade.json", luci.dispatcher.context.authsession)
-    apply_acls("/usr/share/rpcd/acl.d/packagelist.json", luci.dispatcher.context.authsession)
 %>
 <%+header%>
 <h2 name="content"><%:Attended Sysupgrade%></h2>
-<div class="container">
-	<div style="display: none" id="update_info" class="alert-message info"></div>
-	<div style="display: none" id="update_error" class="alert-message danger"></div>
+<div class="cbi-map-descr">
+	Easily search and install new releases and package upgrades. Sysupgrade firmware are created on demand based on locally installed packages.
 </div>
-<input class="cbi-button" value="search for updates" onclick="update_request()" type="button" id="update_button">
+<div style="display: none" id="info_box" class="alert-message info"></div>
+<div style="display: none" id="error_box" class="alert-message danger"></div>
 <div style="display: none" id="packages" class="alert-message success"></div>
-<div class="cbi-value" id="update_packages_container" style="display: block">
-	<label class="cbi-value-title" for="keep">search for package updates:</label>
-	<div class="cbi-value-field">
-		<input type="checkbox" name="update_packages" id="update_packages" />
-	</div>
-</div>
-<div class="cbi-value" id="keep_container" style="display: none">
-	<label class="cbi-value-title" for="keep">keep settings:</label>
-	<div class="cbi-value-field">
-		<input type="checkbox" name="keep" id="keep" checked="checked" />
-	</div>
-</div>
-
+<p>
+<textarea style="display: none; width: 100%;" id="edit_packages" rows="15"></textarea>
+</p>
+<fieldset class="cbi-section">
+	<form method="post" action="">
+		<div class="cbi-selection-node">
+			<div class="cbi-value" id="keep_container" style="display: none">
+				<div class="cbi-section-descr">
+					Check "Keep settings" to retain the current configuration (requires a compatible firmware).
+				</div>
+				<label class="cbi-value-title" for="keep">Keep settings:</label>
+				<div class="cbi-value-field">
+					<input name="keep" id="keep" checked="checked" type="checkbox">
+				</div>
+			</div>
+			<div class="cbi-value" id="edit_button" style="display: none">
+				<div class="cbi-value-field">
+					<input class="cbi-button" value="Edit installed packages" onclick="edit_packages()" type="button">
+				</div>
+			</div>
+			<div class="cbi-value cbi-value" id="server_div" style="display:none">
+				<label class="cbi-value-title" for="server">Server:</label>
+				<div class="cbi-value-field">
+					<input onclick="edit_server()" class="cbi-button cbi-button-edit" value="" type="button" id="server" name="server">
+				</div>
+			</div>
+			<div class="cbi-value cbi-value-last">
+				<div class="cbi-value-field">
+					<input class="cbi-button cbi-button-apply" value="Search for upgrades" style="display: none" onclick="upgrade_check()" type="button" id="upgrade_button">
+				</div>
+			</div>
+		</div>
+	</form>
+</fieldset>
 <script type="text/javascript">
-
-latest_version = "";
 data = {};
-ubus_counter = 1
 origin = document.location.href.replace(location.pathname, "")
 ubus_url = origin + "/ubus/"
 
-// requests to the update server
+function set_server() {
+	document.getElementById("error_box").style.display = "none";
+	data.url = document.getElementById("server").value;
+	ubus_call("uci", "set", { "config": "attendedsysupgrade", "section": "server", values: { "url": data.url } })
+	ubus_call("uci", "commit", { "config": "attendedsysupgrade" })
+	var server_button = document.getElementById("server")
+	server_button.type = 'button';
+	server_button.className = 'cbi-button cbi-button-edit';
+	server_button.parentElement.removeChild(document.getElementById("button_set"));
+	server_button.onclick = edit_server;
+}
+
+function edit_server() {
+	document.getElementById("server").type = 'text';
+	document.getElementById("server").onkeydown = function(event) {
+		if(event.key === 'Enter') {
+			set_server();
+			return false;
+		}
+	}
+	document.getElementById("server").className = '';
+	document.getElementById("server").onclick = null;
+
+	button_set = document.createElement("input");
+	button_set.type = "button";
+	button_set.value = "Save";
+	button_set.name = "button_set";
+	button_set.id = "button_set";
+	button_set.className = 'cbi-button cbi-button-edit';
+	button_set.style = 'background-image: url("/luci-static/resources/cbi/save.gif");'
+	button_set.onclick = set_server
+	document.getElementById("server").parentElement.appendChild(button_set);
+}
+
+function edit_packages() {
+	data.edit_packages = true
+	document.getElementById("edit_button").style.display = "none";
+	document.getElementById("edit_packages").value = data.packages.join("\n");
+	document.getElementById("edit_packages").style.display = "block";
+}
+
+// requests to the upgrade server
 function server_request(request_dict, path, callback) {
-	url = data.update_server + "/" + path
 	request_dict.distro = data.release.distribution;
 	request_dict.target = data.release.target.split("\/")[0];
 	request_dict.subtarget = data.release.target.split("\/")[1];
-	var xmlhttp = new XMLHttpRequest();
-	xmlhttp.open("POST", url, true);
-	xmlhttp.setRequestHeader("Content-type", "application/json");
-	xmlhttp.send(JSON.stringify(request_dict));
-	xmlhttp.onerror = function(e) {
-		update_error("update server down")
+	var request = new XMLHttpRequest();
+	request.open("POST", data.url + "/" + path, true);
+	request.setRequestHeader("Content-type", "application/json");
+	request.send(JSON.stringify(request_dict));
+	request.onerror = function(e) {
+		error_box("upgrade server down")
+		document.getElementById("server_div").style.display = "block";
 	}
-	xmlhttp.addEventListener('load', function(event) {
-		callback(xmlhttp)
+	request.addEventListener('load', function(event) {
+		callback(request)
 	});
 }
 
-// requests ubus via rpcd
-function ubus_request(command, argument, params, callback) {
-	request_data = {};
-	request_data.jsonrpc = "2.0";
-	request_data.id = ubus_counter;
-	request_data.method = "call";
-	request_data.params = [ data.ubus_rpc_session, command, argument, params ]
-	ubus_counter++
-	var xmlhttp = new XMLHttpRequest();
-	xmlhttp.open("POST", ubus_url, true);
-	xmlhttp.setRequestHeader("Content-type", "application/json");
-	xmlhttp.onerror = function(e) {
-		setTimeout(back_online, 5000)
-	}
-	xmlhttp.addEventListener('load', function(event) {
-		if(command === "uci") {
-			ubus_request_callback_uci(xmlhttp, callback)
-		} else {
-			ubus_request_callback(xmlhttp, callback)
-		}
-	});
-	xmlhttp.send(JSON.stringify(request_data));
+// initial setup, get system information
+function setup() {
+	data["ubus_rpc_session"] = "<%=luci.dispatcher.context.authsession%>"
+	ubus_call("rpc-sys", "packagelist", {}, "packages");
+	ubus_call("system", "board", {}, "release");
+	ubus_call("system", "board", {}, "board_name");
+	ubus_call("system", "board", {}, "model");
+	ubus_call("system", "info", {}, "memory");
+	uci_get({ "config": "attendedsysupgrade", "section": "server", "option": "url" })
+	uci_get({ "config": "attendedsysupgrade", "section": "client", "option": "upgrade_packages" })
+	uci_get({ "config": "attendedsysupgrade", "section": "client", "option": "advanced_mode" })
+	uci_get({ "config": "attendedsysupgrade", "section": "client", "option": "auto_search" })
+	setup_ready();
 }
 
-// handle ubus_requests, set variables or perform functions
-function ubus_request_callback(response_object, callback) {
-	if(response_object.status === 200) {
-		console.log(callback)
-		if(typeof callback === "string") {
-			response_json = JSON.parse(response_object.responseText).result[1]
-			if (callback == "release") {
-				latest_version = response_json.release.version
-			}
-			data[callback] = response_json[callback]
+function setup_ready() {
+	// checks if a async ubus calls have finished
+	if(ubus_counter != ubus_closed) {
+		setTimeout(setup_ready, 300)
+	} else {
+		if(data.auto_search == 1) {
+			upgrade_check();
 		} else {
-			callback(response_object)
+			document.getElementById("upgrade_button").style.display = "block";
+			document.getElementById("server_div").style.display = "block";
+			document.getElementById("server").value = data.url;
 		}
-	} else {
-		console.log(respons_object.responseText)
 	}
 }
 
-function ubus_request_callback_uci(response_object, callback) {
-	if(response_object.status === 200) {
-		console.log(callback)
-		response_json = JSON.parse(response_object.responseText).result[1].value
-		data[callback] = response_json
+function uci_get(option) {
+	// simple wrapper to get a uci value store in data.<option>
+	ubus_call("uci", "get", option, option["option"])
+}
 
-		document.getElementById("update_packages").checked = data.update_packages;
-	} else {
-		console.log(respons_object.responseText)
+ubus_counter = 0;
+ubus_closed = 0;
+function ubus_call(command, argument, params, variable) {
+	var request_data = {};
+	request_data.jsonrpc = "2.0";
+	request_data.id = ubus_counter;
+	request_data.method = "call";
+	request_data.params = [ data.ubus_rpc_session, command, argument, params ]
+	request_json = JSON.stringify(request_data)
+	ubus_counter++;
+	var request = new XMLHttpRequest();
+	request.open("POST", ubus_url, true);
+	request.setRequestHeader("Content-type", "application/json");
+	request.onload = function(event) {
+		if(request.status === 200) {
+			var response = JSON.parse(request.responseText)
+			if(!("error" in response) && "result" in response) {
+				if(response.result.length === 2) {
+					if(command === "uci") {
+						data[variable] = response.result[1].value
+					} else {
+						data[variable] = response.result[1][variable]
+					}
+				}
+			} else {
+				error_box("<b>Ubus call faild:</b></br>Request: " + request_json + "</br>Response: " + JSON.stringify(response))
+			}
+			ubus_closed++;
+		}
 	}
+	request.send(request_json);
 }
 
-// initial setup, get system information
-function setup() {
-	data["ubus_rpc_session"] = "<%=luci.dispatcher.context.authsession%>"
-	ubus_request("packagelist", "list", {}, "packagelist");
-	ubus_request("system", "board", {}, "release");
-	ubus_request("system", "board", {}, "board_name");
-	ubus_request("system", "board", {}, "model");
-	ubus_request("uci", "get", { "config": "attendedsysupgrade", "section": "updateserver", "option": "url" }, "update_server")
-	ubus_request("uci", "get", { "config": "attendedsysupgrade", "section": "updateclient", "option": "update_packages" }, "update_packages")
+function info_box(info_output, loading) {
+	// Shows notification if upgrade is available
+	// If loading is true then an "processing" animation is added
+	document.getElementById("info_box").style.display = "block";
+	var loading_image = '';
+	if(loading) {
+		loading_image = '<img src="/luci-static/resources/icons/loading.gif" alt="Loading" style="vertical-align:middle">';
+	}
+	document.getElementById("info_box").innerHTML = loading_image + info_output;
 }
 
-// shows notification if update is available
-function update_info(info_output) {
-	document.getElementById("update_info").style.display = "block";
-	document.getElementById("update_info").innerHTML = info_output;
+function error_box(error_output) {
+	// Shows erros in red box
+	document.getElementById("error_box").style.display = "block";
+	document.getElementById("error_box").innerHTML = error_output;
+	document.getElementById("info_box").style.display = "none";
 }
 
-function update_error(error_output) {
-	document.getElementById("update_error").style.display = "block";
-	document.getElementById("update_error").innerHTML = error_output;
-	document.getElementById("update_info").style.display = "none";
+function upgrade_check() {
+	// Asks server for new firmware
+	// If data.upgrade_packages is set to true search for new package versions as well
+	document.getElementById("error_box").style.display = "none";
+	document.getElementById("server_div").style.display = "none";
+	info_box("Searching for upgrades", true);
+	var request_dict = {}
+	request_dict.version = data.release.version;
+	request_dict.packages = data.packages;
+	request_dict.upgrade_packages = data.upgrade_packages
+	server_request(request_dict, "api/upgrade-check", upgrade_check_callback)
 }
 
-// asks server for news updates, actually only based on relesae not packages
-function update_request() {
-	console.log("update_request")
-	request_dict = {}
-	request_dict.version = data.release.version;
-	request_dict.packages = data.packagelist;
-	if (document.getElementById("update_packages").checked == 1) {
-		request_dict.update_packages = 1
+function upgrade_check_callback(request_text) {
+	var request_json = JSON.parse(request_text)
+
+	// create simple output to tell user whats going to be upgrade (release/packages)
+	var info_output = ""
+	if(request_json.version != undefined) {
+		info_output += "<h3>New firmware release available</h3>"
+		info_output += data.release.version + " to " + request_json.version
+		data.latest_version = request_json.version;
 	}
-	server_request(request_dict, "update-request", update_request_callback)
-}
+	if(request_json.upgrades != undefined) {
+		info_output += "<h3>Package upgrades available</h3>"
+		for (upgrade in request_json.upgrades) {
+			info_output += "<b>" + upgrade + "</b>: " + request_json.upgrades[upgrade][1] + " to " + request_json.upgrades[upgrade][0] + "</br>"
+		}
+	}
+	data.packages = request_json.packages
+	info_box(info_output)
 
-function update_request_callback(response_object) {
-	if (response_object.status === 500) {
-		// python crashed
-		update_error("internal server error, please try again later")
-		console.log("update server issue")
-	} else if (response_object.status === 502) {
-		// python part offline
-		update_error("internal server error, please try again later")
-		console.log("update server issue")
-	} else if (response_object.status === 503) {
-		// handle overload
-		update_error("server overloaded, retry in 5 minutes")
-		console.log("server overloaded")
-		setTimeout(update_request, 300000)
-	} else if (response_object.status === 201) {
-		update_info("imagebuilder not ready, please wait")
-		console.log("setting up imagebuilder")
-		setTimeout(update_request, 5000)
-	} else if (response_object.status === 204) {
-		// no updates
-		update_info("no updates available")
-	} else if (response_object.status === 400) {
-		// bad request
-		console.log(response_object.responseText)
-		response_object_content = JSON.parse(response_object.responseText)
-		update_error(response_object_content.error)
-	} else if (response_object.status === 200) {
-		// new release/updates
-		response_object_content = JSON.parse(response_object.responseText)
-		update_request_200(response_object_content)
+	if(data.advanced_mode == 1) {
+		document.getElementById("edit_button").style.display = "block";
 	}
-}
+	var upgrade_button = document.getElementById("upgrade_button")
+	upgrade_button.value = "Request firmware";
+	upgrade_button.style.display = "block";
+	upgrade_button.disabled = false;
+	upgrade_button.onclick = upgrade_request;
 
-function back_online() {
-	ubus_request("session", "login", {}, back_online_callback)
 }
 
-function back_online_callback(response_object) {
-	if (response_object.status != 200) {
-		setTimeout(back_online, 5000)
+function upgrade_request() {
+	// Request the image
+	// Needed values
+	// version/release
+	// board_name or model (server tries to find the corrent profile)
+	// packages
+	// The rest is added by server_request()
+	document.getElementById("upgrade_button").disabled = true;
+	document.getElementById("edit_packages").style.display = "none";
+	document.getElementById("edit_button").style.display = "none";
+	document.getElementById("keep_container").style.display = "none";
+
+	var request_dict = {}
+	request_dict.version = data.latest_version;
+	request_dict.board = data.board_name
+	request_dict.model = data.model
+
+	if(data.edit_packages == true) {
+		request_dict.packages = document.getElementById("edit_packages").value.split("\n")
 	} else {
-		update_info("upgrade successfull!")
-		document.getElementById("update_button").value = "reload page";
-		document.getElementById("update_button").onclick = function() { location.reload(); }
+		request_dict.packages = data.packages;
 	}
 
+	server_request(request_dict, "api/upgrade-request", upgrade_request_callback)
 }
 
-function update_request_200(response_content) {
-	info_output = ""
-	if(response_content.version != undefined) {
-		info_output += "<h3>new update available</h3>"
-		info_output += data.release.version + " to " + response_content.version
-		latest_version = response_content.version;
-	}
-	if(response_content.updates != undefined) {
-		info_output += "<h3>package updates available</h3>"
-		for (update in response_content.updates) {
-			info_output += "<b>" + update + "</b>: " + response_content.updates[update][1] + " to " + response_content.updates[update][0] + "</br>"
-		}
+function upgrade_request_callback(request) {
+	// ready to download
+	var request_json = JSON.parse(request);
+	data.sysupgrade_url = request_json.sysupgrade;
+	data.checksum = request_json.checksum;
+	data.filesize = request_json.filesize;
+
+	info_output = "Firmware created"
+	if(data.advanced_mode == 1) {
+		info_output += '</br><a target="_blank" href="' + data.sysupgrade_url + '.log">Build log</a>'
 	}
-	data.packages = response_content.packages
-	update_info(info_output)
-	document.getElementById("update_button").value = "request image";
-	document.getElementById("update_packages_container").style.display = "none";
-	document.getElementById("update_button").onclick = image_request;
+	info_box(info_output);
+
+	document.getElementById("keep_container").style.display = "block";
+	var upgrade_button = document.getElementById("upgrade_button")
+	upgrade_button.disabled = false;
+	upgrade_button.style.display = "block";
+	upgrade_button.value = "Flash firmware";
+	upgrade_button.onclick = download_image;
 }
 
-// request the image, need merge with update_request
-function image_request() {
-	console.log("image_request")
-	document.getElementById("update_packages_container").style.display = "none";
-	request_dict = {}
-	request_dict.version = latest_version;
-	request_dict.board = data.board_name
-	request_dict.packages = data.packages;
-	request_dict.model = data.model
-	server_request(request_dict, "image-request", image_request_handler)
+function flash_image() {
+	// Flash image via rpc-sys upgrade_start
+	info_box("Flashing firmware. Don't unpower device", true)
+	ubus_call("rpc-sys", "upgrade_start", { "keep": document.getElementById("keep").checked }, 'message');
+	ping_max = 3600; // in seconds
+	setTimeout(ping_ubus, 10000)
 }
 
-function image_request_handler(response) {
-	if (response.status === 400) {
-		response_content = JSON.parse(response.responseText)
-		update_error(response_content.error)
-	} else if (response.status === 500) {
-		image_request_500()
-	} else if (response.status === 503) {
-		update_error("please wait. server overloaded")
-		// handle overload
-		setTimeout(image_request, 30000)
-	} else if (response.status === 201) {
-		response_content = JSON.parse(response.responseText)
-		if(response_content.queue != undefined) {
-			// in queue
-			update_info("please wait. you are in queue position " + response_content.queue)
-			console.log("queued")
-		} else {
-			update_info("imagebuilder not ready, please wait")
-			console.log("setting up imagebuilder")
-		}
-		setTimeout(image_request, 5000)
-	} else if (response.status === 206) {
-		// building
-		console.log("building")
-		update_info("building image")
-		setTimeout(image_request, 5000)
-	} else if (response.status === 200) {
-		// ready to download
-		response_content = JSON.parse(response.responseText)
-		update_info("image created")
-		document.getElementById("update_button").value = "sysupgrade"
-		document.getElementById("update_button").onclick = function() {download_image(response_content.url); }
-		document.getElementById("keep_container").style.display = "block";
+function ping_ubus() {
+	// Tries to connect to ubus. If the connection fails the device is likely still rebooting.
+	// If more time than ping_max passes update may failed
+	if(ping_max > 0) {
+		ping_max--;
+		var request = new XMLHttpRequest();
+		request.open("GET", ubus_url, true);
+		request.addEventListener('error', function(event) {
+			info_box("Rebooting device", true);
+			setTimeout(ping_ubus, 1000)
+		});
+		request.addEventListener('load', function(event) {
+			info_box("Success! Please reload web interface");
+			document.getElementById("upgrade_button").value = "reload page";
+			document.getElementById("upgrade_button").style.display = "block";
+			document.getElementById("upgrade_button").disabled = false;
+			document.getElementById("upgrade_button").onclick = function() { location.reload(); }
+		});
+		request.send();
+	} else {
+		error_box("Web interface could not reconnect to your device. Please reload web interface or check device manually")
 	}
 }
 
-
-// uploads received blob data to the server using cgi-io
 function upload_image(blob) {
-	var upload_request = new XMLHttpRequest();
+	// Uploads received blob data to the server using cgi-io
+	var request = new XMLHttpRequest();
 	var form_data  = new FormData();
 
 	form_data.append("sessionid", data.ubus_rpc_session)
-	form_data.append("filename", "/tmp/sysupgrade.bin")
+	form_data.append("filename", "/tmp/firmware.bin")
 	form_data.append("filemode", 755) // insecure?
 	form_data.append("filedata", blob)
 
-	upload_request.addEventListener('load', function(event) {
-		// this checksum should be parsed
-		document.getElementById("update_info").innerHTML = "flashing... please wait" // show fancy indicator http://www.ajaxload.info/
+	request.addEventListener('load', function(event) {
+		request_json = JSON.parse(request.responseText)
+		if(data.checksum != request_json.checksum) {
+			error_box("Checksum missmatch! Please retry")
+		} else {
+			flash_image();
+		}
+	});
+
+	request.addEventListener('error', function(event) {
+		info_box("Upload of firmware failed, please retry by reloading web interface")
+	});
 
-		ubus_request("attendedsysupgrade", "sysupgrade", { "keep_settings": document.getElementById("keep").checked }, 'done');
-  	});
+	request.open('POST', origin + '/cgi-bin/cgi-upload');
+	request.send(form_data);
+}
 
-  	upload_request.addEventListener('error', function(event) {
-		document.getElementById("update_info").innerHTML = "uploading failed, please retry"
-  	});
 
-  	upload_request.open('POST', origin + '/cgi-bin/cgi-upload');
-  	upload_request.send(form_data);
+function download_image() {
+	// Download image from server once the url was received by upgrade_request
+	if(data.filesize > data.memory.free) {
+		error_box("Not enough free memory to download firmware. Please stop unneeded services on router and retry")
+	} else {
+		document.getElementById("keep_container").style.display = "none";
+		document.getElementById("upgrade_button").style.display = "none";
+		var download_request = new XMLHttpRequest();
+		download_request.open("GET", data.sysupgrade_url);
+		download_request.responseType = "arraybuffer";
+
+		download_request.onload = function () {
+			if (this.status === 200) {
+				var blob = new Blob([download_request.response], {type: "application/octet-stream"});
+				upload_image(blob)
+			}
+		};
+		info_box("Downloading firmware", true);
+		download_request.send();
+	}
 }
 
-// download image from server once the url was received by image_request
-function download_image(url) {
-	console.log("download_image")
-	document.getElementById("update_button").value = "flashing..."
-	document.getElementById("update_button").disabled = true;
-	var download_request = new XMLHttpRequest();
-	download_request.open("GET", url);
-	download_request.responseType = "arraybuffer";
-
-	download_request.onload = function () {
-		if (this.status === 200) {
-			var blob = new Blob([download_request.response], {type: "application/octet-stream"});
-			upload_image(blob)
+function server_request(request_dict, path, callback) {
+	request_dict.distro = data.release.distribution;
+	request_dict.target = data.release.target.split("\/")[0];
+	request_dict.subtarget = data.release.target.split("\/")[1];
+	var request = new XMLHttpRequest();
+	request.open("POST", data.url + "/" + path, true);
+	request.setRequestHeader("Content-type", "application/json");
+	request.send(JSON.stringify(request_dict));
+	request.onerror = function(e) {
+		error_box("Upgrade server down or could not connect")
+		document.getElementById("server_div").style.display = "block";
+	}
+	request.addEventListener('load', function(event) {
+		request_text = request.responseText;
+		if (request.status === 200) {
+			callback(request_text)
+
+		} else if (request.status === 202) {
+			var imagebuilder = request.getResponseHeader("X-Imagebuilder-Status");
+			if(imagebuilder === "queue") {
+				// in queue
+				var queue = request.getResponseHeader("X-Build-Queue-Position");
+				info_box("In build queue position " + queue, true)
+				console.log("queued");
+			} else if(imagebuilder === "initialize") {
+				info_box("Setting up ImageBuilder", true)
+				console.log("Setting up imagebuilder");
+			} else if(imagebuilder === "building") {
+				info_box("Building image");
+				console.log("building");
+			} else {
+				info_box("Processing request");
+				console.log(imagebuilder)
+			}
+			setTimeout(function() { server_request(request_dict, path, callback) }, 5000)
+
+		} else if (request.status === 204) {
+			// no upgrades available
+			info_box("No upgrades available")
+
+		} else if (request.status === 400) {
+			// bad request
+			request_json = JSON.parse(request_text)
+			error_box(request_json.error)
+
+		} else if (request.status === 412) {
+			// this is a bit generic
+			error_box("Unsupported device, release, target, subtraget or board")
+
+		} else if (request.status === 413) {
+			error_box("No firmware created due to image size. Try again with less packages selected.")
+
+		} else if (request.status === 422) {
+			error_box("Unknown package in request")
+
+		} else if (request.status === 500) {
+			request_json = JSON.parse(request_text)
+
+			error_box_content = "<b>Internal server error</b></br>"
+			error_box_content += request_json.error
+			if(request_json.log != undefined) {
+				data.log_url = request_json.log
+			}
+			error_box(error_box_content)
+
+		} else if (request.status === 501) {
+			error_box("No sysupgrade file produced, may not supported by modell.")
+
+		} else if (request.status === 502) {
+			// python part offline
+			error_box("Server down for maintenance")
+			setTimeout(function() { server_request(request_dict, path, callback) }, 30000)
+		} else if (request.status === 503) {
+			error_box("Server overloaded")
+			setTimeout(function() { server_request(request_dict, path, callback) }, 30000)
 		}
-	};
-	document.getElementById("update_info").innerHTML = "downloading image"
-	download_request.send();
+	});
 }
-
 document.onload = setup()
 </script>
 

+ 6 - 0
package/luci/applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade

@@ -0,0 +1,6 @@
+#!/bin/sh
+
+rm -rf /tmp/luci-indexcache /tmp/luci-modulecache/
+/etc/init.d/uhttpd restart
+
+return 0

+ 31 - 0
package/luci/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json

@@ -0,0 +1,31 @@
+{
+	"attendedsysupgrade": {
+		"description": "attended sysupgrade via rpcd and luci",
+		"read": {
+			"ubus": {
+				"rpc-sys": [
+					"upgrade_start",
+					"packagelist"
+				],
+				"system": [
+					"board",
+					"info"
+				],
+				"uci": [
+					"get", "set", "commit"
+				]
+			},
+			"uci": [
+				"attendedsysupgrade"
+			]
+		},
+		"write": {
+			"cgi-io": [
+				"upload"
+			],
+			"uci": [
+				"attendedsysupgrade"
+			]
+		}
+	}
+}

+ 3 - 3
package/luci/applications/luci-app-bcp38/po/zh-cn/bcp38.po

@@ -10,7 +10,7 @@ msgid ""
 "correctly, you can add exceptions manually below."
 msgstr ""
 "自动检测上游 IP 是否会被当前配置所阻止,当检测到会被阻止时将会添加例外。如果"
-"自动检测无法正常工作,可以在下面手动添加例外。"
+"自动检测无法正常工作,可以在下面手动添加例外。"
 
 msgid "Auto-detect upstream IP"
 msgstr "自动检测上游 IP"
@@ -38,8 +38,8 @@ msgid ""
 "Takes precedence over blocked ranges. Use to whitelist your upstream network "
 "if you're behind a double NAT and the auto-detection doesn't work."
 msgstr ""
-"这里的规则优先于阻止规则被使用。如果在双重 NAT 之后并且自动检测功能不起作"
-"用,请在这里添加上游网络的白名单。"
+"这里的规则优先于阻止规则被使用。如果在双重 NAT 之后并且自动检测功能不起作"
+"用,请在这里添加上游网络的白名单。"
 
 msgid ""
 "This function blocks packets with private address destinations from going "

+ 52 - 0
package/luci/applications/luci-app-bcp38/po/zh-tw/bcp38.po

@@ -0,0 +1,52 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8\n"
+
+msgid "Allowed IP ranges"
+msgstr "允許的 IP 範圍"
+
+msgid ""
+"Attempt to automatically detect if the upstream IP will be blocked by the "
+"configuration, and add an exception if it will. If this does not work "
+"correctly, you can add exceptions manually below."
+msgstr ""
+"自動檢測上游 IP 是否會被當前配置所阻止,當檢測到會被阻止時將會新增例外。如果"
+"自動檢測無法正常工作,您可以在下面手動新增例外。"
+
+msgid "Auto-detect upstream IP"
+msgstr "自動檢測上游 IP"
+
+msgid "BCP38"
+msgstr "BCP38"
+
+msgid "BCP38 config"
+msgstr "BCP38 配置"
+
+msgid "Blocked IP ranges"
+msgstr "阻止的 IP 範圍"
+
+msgid "Enable"
+msgstr "啟用"
+
+msgid "Interface name"
+msgstr "介面名稱"
+
+msgid ""
+"Interface to apply the blocking to (should be the upstream WAN interface)."
+msgstr "應用“阻止規則”的介面(應當為上游 WAN 介面)。"
+
+msgid ""
+"Takes precedence over blocked ranges. Use to whitelist your upstream network "
+"if you're behind a double NAT and the auto-detection doesn't work."
+msgstr ""
+"這裡的規則優先於阻止規則被使用。如果您在雙重 NAT 之後並且自動檢測功能不起作"
+"用,請在這裡新增您上游網路的白名單。"
+
+msgid ""
+"This function blocks packets with private address destinations from going "
+"out onto the internet as per <a href=\"http://tools.ietf.org/html/"
+"bcp38\">BCP 38</a>. For IPv6, only source specific default routes are "
+"installed, so no BCP38 firewall routes are needed."
+msgstr ""
+"此功能可以阻止具有私有目標位址的資料包通過 <a href=\"http://tools.ietf.org/"
+"html/bcp38\">BCP 38</a> 傳送到網際網路上。對於 IPv6,僅安裝源特定的預設路由,因"
+"此不需要 BCP38 防火牆路由。"

+ 1 - 1
package/luci/applications/luci-app-commands/po/zh-tw/commands.po

@@ -103,7 +103,7 @@ msgstr ""
 msgid ""
 "This page allows you to configure custom shell commands which can be easily "
 "invoked from the web interface."
-msgstr "只要可以從web介輕易調用, 這頁面允許自定shell指令."
+msgstr "只要可以從web介輕易調用, 這頁面允許自定shell指令."
 
 msgid "Waiting for command to complete..."
 msgstr "等待完整命令中..."

+ 1 - 1
package/luci/applications/luci-app-ddns/po/it/ddns.po

@@ -725,7 +725,7 @@ msgid "missing / required"
 msgstr "mancante / richiesto"
 
 msgid "must be greater or equal 'Check Interval'"
-msgstr "deve essere più grande o uguale "Controlla Intervallo'"
+msgstr "deve essere più grande o uguale 'Controlla Intervallo'"
 
 msgid "must start with 'http://'"
 msgstr "deve iniziare con 'http://'"

+ 144 - 129
package/luci/applications/luci-app-ddns/po/zh-cn/ddns.po

@@ -1,18 +1,22 @@
+#
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: luci-app-ddns 2.4.0-1\n"
 "POT-Creation-Date: 2016-01-30 11:07+0100\n"
-"PO-Revision-Date: 2015-04-23 13:00+0800\n"
-"Last-Translator: Syrone Wong <wong.syrone@gmail.com>\n"
+"PO-Revision-Date: 2017-10-29 14:14+0800\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
 "Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 1.8.4\n"
+"X-Generator: Gtranslator 2.91.7\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
 
 msgid "&"
-msgstr ""
+msgstr "&"
 
 msgid "-- custom --"
 msgstr "-- 自定义 --"
@@ -24,7 +28,7 @@ msgid "Advanced Settings"
 msgstr "高级设置"
 
 msgid "Allow non-public IP's"
-msgstr "允许非公网IP"
+msgstr "允许非公网 IP"
 
 msgid "Applying changes"
 msgstr "正在应用更改"
@@ -35,11 +39,11 @@ msgstr "基础设置"
 msgid ""
 "Below a list of configuration tips for your system to run Dynamic DNS "
 "updates without limitations"
-msgstr "以下是一个能够让你的系统不受限制地进行动态DNS更新的设置贴士."
+msgstr "以下是一个能够让您的系统不受限制地进行动态 DNS 更新设置的提示列表"
 
 msgid ""
 "Below is a list of configured DDNS configurations and their current state."
-msgstr "一下是当前已经配置好的DDNS设置项列表以及它们的当前状态."
+msgstr "以下是当前已经配置好的 DDNS 设置项列表以及它们的当前状态。"
 
 msgid "Bind Network"
 msgstr "使用的接口"
@@ -50,23 +54,27 @@ msgstr "不支持绑定到一个指定的网络"
 msgid ""
 "BusyBox's nslookup and Wget do not support to specify the IP version to use "
 "for communication with DDNS Provider!"
-msgstr "与DDNS供应商通讯时BusyBox的nslookup和Wget不支持设置特定的IP协议版本."
+msgstr ""
+"与 DDNS 供应商通讯时,BusyBox 的 nslookup 和 Wget 不支持设置特定的 IP 协议版"
+"本。"
 
 msgid ""
 "BusyBox's nslookup and hostip do not support to specify to use TCP instead "
 "of default UDP when requesting DNS server!"
 msgstr ""
+"向 DNS 服务器查询时,BusyBox 的 nslookup 和 hostip 不支持使用 TCP 而不是默认"
+"的 UDP!"
 
 msgid ""
 "BusyBox's nslookup in the current compiled version does not handle given DNS "
 "Servers correctly!"
-msgstr ""
+msgstr "当前编译版本中 BusyBox 的 nslookup 在处理给定的 DNS 服务器不正确!"
 
 msgid "Casual users should not change this setting"
 msgstr "普通用户不应该改变这个设置"
 
 msgid "Change provider"
-msgstr ""
+msgstr "更改提供者"
 
 msgid "Check Interval"
 msgstr "检查时间周期"
@@ -83,10 +91,10 @@ msgstr "设置"
 msgid ""
 "Configure here the details for all Dynamic DNS services including this LuCI "
 "application."
-msgstr "在这里修改动态DNS服务的详细配置"
+msgstr "在这里修改动态 DNS 服务的详细配置"
 
 msgid "Configure here the details for selected Dynamic DNS service."
-msgstr "在这里修改选择的DDNS服务的详细配置"
+msgstr "在这里修改选择的 DDNS 服务的详细配置"
 
 msgid "Current setting"
 msgstr "当前设置"
@@ -96,76 +104,76 @@ msgid ""
 ">This is the default if you run DDNS scripts by yourself (i.e. via cron with "
 "force_interval set to '0')"
 msgstr ""
-"现在,DDNS更新在开机或者接口动作时不会被触发<br />如果你手工运行DDNS脚本的话"
-"(例如使用cron时把force_interval设置为0),这是默认设置."
+"现在,DDNS 更新在开机或者接口动作时不会被触发。<br />如果您手工运行 DDNS 脚本"
+"的话(例如使用 cron 时把 force_interval 设置为 0),这是默认设置。"
 
 msgid ""
 "Currently DDNS updates are not started at boot or on interface events.<br /"
 ">You can start/stop each configuration here. It will run until next reboot."
 msgstr ""
-"现在,DDNS更新在开机或者接口动作时不会被触发<br />你可以在这里开始/停止每一个"
-"设置的条目.它在下次重启之前一直有效."
+"现在,DDNS 更新在开机或者接口动作时不会被触发。<br />您可以在这里开始/停止每"
+"一个设置的条目。它在下次重启之前一直有效。"
 
 msgid "Custom update script to be used for updating your DDNS Provider."
-msgstr "用来更新动态DNS的自定义脚本"
+msgstr "用来更新动态 DNS 的自定义脚本"
 
 msgid "Custom update-URL"
-msgstr "自定义更新URL"
+msgstr "自定义更新 URL"
 
 msgid "Custom update-script"
 msgstr "自定义更新脚本"
 
 msgid "DDNS Autostart disabled"
-msgstr "DDNS自动启动已禁用."
+msgstr "DDNS 自动启动已禁用。"
 
 msgid "DDNS Client Configuration"
-msgstr ""
+msgstr "DDNS 客户端配置"
 
 msgid "DDNS Client Documentation"
-msgstr ""
+msgstr "DDNS 客户端文档"
 
 msgid "DDNS Service provider"
-msgstr "DDNS服务提供商"
+msgstr "DDNS 服务提供商"
 
 msgid "DNS requests via TCP not supported"
-msgstr "不支持使用TCP进行DNS解析"
+msgstr "不支持使用 TCP 进行 DNS 解析"
 
 msgid "DNS-Server"
-msgstr "DNS服务器"
+msgstr "DNS-服务器"
 
 msgid "Date format"
 msgstr "日期格式"
 
 msgid "Defines the Web page to read systems IPv4-Address from"
-msgstr "设定用来读取系统IPv4地址的网页"
+msgstr "设定用来读取系统 IPv4 地址的网页"
 
 msgid "Defines the Web page to read systems IPv6-Address from"
-msgstr "设定用来读取系统IPv6地址的网页"
+msgstr "设定用来读取系统 IPv6 地址的网页"
 
 msgid "Defines the interface to read systems IP-Address from"
-msgstr "设定用来读取系统IP地址的接口"
+msgstr "设定用来读取系统 IP 地址的接口"
 
 msgid "Defines the network to read systems IPv4-Address from"
-msgstr "设定用来读取系统IPv4地址的网络"
+msgstr "设定用来读取系统 IPv4 地址的网络"
 
 msgid "Defines the network to read systems IPv6-Address from"
-msgstr "设定用来读取系统IPv6地址的网络"
+msgstr "设定用来读取系统 IPv6 地址的网络"
 
 msgid ""
 "Defines the source to read systems IPv4-Address from, that will be send to "
 "the DDNS provider"
-msgstr "设定IPv4地址的来源.这将会被发送给DDNS提供商"
+msgstr "设定 IPv4 地址的来源。这将会被发送给 DDNS 提供商"
 
 msgid ""
 "Defines the source to read systems IPv6-Address from, that will be send to "
 "the DDNS provider"
-msgstr "设定IPv6地址的来源.这将会被发送给DDNS提供商"
+msgstr "设定 IPv6 地址的来源。这将会被发送给 DDNS 提供商"
 
 msgid "Defines which IP address 'IPv4/IPv6' is send to the DDNS provider"
-msgstr "设定哪一个IP地址(IPv4或IPv6)会被发送给DDNS提供商"
+msgstr "设定哪一个 IP 地址(IPv4 或 IPv6)会被发送给 DDNS 提供商"
 
 msgid "Details for"
-msgstr "详情:"
+msgstr "详情"
 
 msgid "Directory contains Log files for each running section"
 msgstr "保存每一个运行中的设置的运行日志的目录"
@@ -178,18 +186,18 @@ msgid "Disabled"
 msgstr "已禁用"
 
 msgid "Domain"
-msgstr ""
+msgstr "域名"
 
 msgid "Dynamic DNS"
-msgstr "动态DNS"
+msgstr "动态 DNS"
 
 msgid ""
 "Dynamic DNS allows that your router can be reached with a fixed hostname "
 "while having a dynamically changing IP address."
-msgstr "动态DNS允许为拥有动态IP的主机配置一个固定的可访问域名."
+msgstr "动态 DNS 允许为拥有动态 IP 的主机配置一个固定的可访问域名。"
 
 msgid "Enable secure communication with DDNS provider"
-msgstr "启用安全连接与DDNS供商联系"
+msgstr "启用安全连接与 DDNS供商联系"
 
 msgid "Enabled"
 msgstr "已启用"
@@ -219,8 +227,8 @@ msgid ""
 "Follow this link<br />You will find more hints to optimize your system to "
 "run DDNS scripts with all options"
 msgstr ""
-"打开这个链接<br />你将会得到更多关于如何通过所有设置项优化你的系统以运行DDNS"
-"脚本的提示."
+"打开这个链接<br />您将会得到更多关于如何通过所有设置项优化您的系统以运行 "
+"DDNS 脚本的提示"
 
 msgid "For detailed information about parameter settings look here."
 msgstr "请看这里获得关于参数设置的详细信息"
@@ -229,91 +237,92 @@ msgid "For supported codes look here"
 msgstr "查看这里获取支持的编码"
 
 msgid "Force IP Version"
-msgstr "强制设定IP版本"
+msgstr "强制设定 IP 版本"
 
 msgid "Force IP Version not supported"
-msgstr "不支持强制设定IP版本"
+msgstr "不支持强制设定 IP 版本"
 
 msgid "Force Interval"
 msgstr "设定周期"
 
 msgid "Force TCP on DNS"
-msgstr "强制使用TCP进行DNS查询"
+msgstr "强制使用 TCP 进行 DNS 查询"
 
 msgid "Forced IP Version don't matched"
-msgstr "强制设定的IP版本不匹配"
+msgstr "强制设定的 IP 版本不匹配"
 
 msgid "Format"
 msgstr "格式"
 
 msgid "Format: IP or FQDN"
-msgstr "格式:IP或者FQDN"
+msgstr "格式:IP 或者 FQDN"
 
 msgid ""
 "GNU Wget will use the IP of given network, cURL will use the physical "
 "interface."
-msgstr "GNU Wget将会使用给定的网络的IP地址,而cURL将会使用物理接口"
+msgstr "GNU Wget 将会使用给定的网络的 IP 地址,而 cURL 将会使用物理接口。"
 
 msgid "Global Settings"
 msgstr "全局设置"
 
 msgid "HTTPS not supported"
-msgstr "不支持HTTPS"
+msgstr "不支持 HTTPS"
 
 msgid "Hints"
 msgstr "提示"
 
 msgid "Hostname/FQDN to validate, if IP update happen or necessary"
-msgstr ""
+msgstr "主机名/FQDN 验证,如果 IP 更新发生或必要"
 
 msgid "IP address source"
-msgstr "IP地址来源"
+msgstr "IP 地址来源"
 
 msgid "IP address version"
-msgstr "IP地址版本"
+msgstr "IP 地址版本"
 
 msgid "IPv4-Address"
-msgstr "IPv4地址"
+msgstr "IPv4 地址"
 
 msgid "IPv6 address must be given in square brackets"
-msgstr "IPv6地址必须填写在中括号(\"[  ]\")内"
+msgstr "IPv6 地址必须填写在中括号(\"[  ]\")内"
 
 msgid ""
 "IPv6 is currently not (fully) supported by this system<br />Please follow "
 "the instructions on OpenWrt's homepage to enable IPv6 support<br />or update "
 "your system to the latest OpenWrt Release"
 msgstr ""
-"当前系统暂时不能(完整地)支持IPv6<br />请查看OpenWrt首页的介绍以启用IPv6支持"
-"<br />或者更新你的系统到最新OpenWrt版本"
+"当前系统暂时不能(完整地)支持 IPv6<br />请查看 OpenWrt 首页的介绍以启用 "
+"IPv6 支持<br />或者更新您的系统到最新 OpenWrt 版本"
 
 msgid "IPv6 not supported"
-msgstr "IPv6不被支持"
+msgstr "IPv6 不被支持"
 
 msgid "IPv6-Address"
-msgstr "IPv6地址"
+msgstr "IPv6 地址"
 
 msgid "If both cURL and GNU Wget are installed, Wget is used by default."
-msgstr "如果cURL和GNU Wget同时被安装,那么Wget将会被优先使用."
+msgstr "如果 cURL 和 GNU Wget 同时被安装,那么 Wget 将会被优先使用。"
 
 msgid ""
 "If this service section is disabled it could not be started.<br />Neither "
 "from LuCI interface nor from console"
 msgstr ""
-"如果服务配置被禁用那么它将不能被启动.<br />无论是通过LuCI页面或者是通过终端."
+"如果服务配置被禁用,那么它将不能被启动。<br />无论是通过 LuCI 页面或者是通过"
+"终端。"
 
 msgid "If using secure communication you should verify server certificates!"
-msgstr ""
+msgstr "如果使用安全通信,您应该验证服务器证书!"
 
 msgid ""
 "If you want to send updates for IPv4 and IPv6 you need to define two "
 "separate Configurations i.e. 'myddns_ipv4' and 'myddns_ipv6'"
 msgstr ""
-"如果你需要同时更新IPv4和IPv6地址,你需要单独添加两个配置项(例"
-"如'myddns_ipv4'和'myddns_ipv6')"
+"如果您需要同时更新 IPv4 和 IPv6 地址,您需要单独添加两个配置项(例"
+"如'myddns_ipv4'和'myddns_ipv6'"
 
 msgid ""
 "In some versions cURL/libcurl in OpenWrt is compiled without proxy support."
-msgstr "OpenWrt中,cURL/libcurl的某些版本编译时没有启用代理服务器支持"
+msgstr "OpenWrt 中,cURL/libcurl 的某些版本编译时没有启用代理服务器支持"
 
 msgid "Info"
 msgstr "信息"
@@ -322,6 +331,7 @@ msgid ""
 "Install 'ca-certificates' package or needed certificates by hand into /etc/"
 "ssl/certs default directory"
 msgstr ""
+"手动将“ca-certificates”包或需要的证书安装到 /etc/ssl/certs 的默认目录中"
 
 msgid "Interface"
 msgstr "接口"
@@ -329,18 +339,18 @@ msgstr "接口"
 msgid ""
 "Interval to check for changed IP<br />Values below 5 minutes == 300 seconds "
 "are not supported"
-msgstr "检查IP是否改变的时间隔<br />不支持低于5分钟(300秒)的数值."
+msgstr "检查 IP 是否改变的时间隔<br />不支持小于 5 分钟(300 秒)的数值。"
 
 msgid ""
 "Interval to force updates send to DDNS Provider<br />Setting this parameter "
 "to 0 will force the script to only run once<br />Values lower 'Check "
 "Interval' except '0' are not supported"
 msgstr ""
-"强制向提供商更新DDNS的时间周期<br />把这个参数设置为0将会让脚本仅执行一次"
-"<br />不支持低于\"检查时间周期\"的数值(除了0)."
+"强制向提供商更新 DDNS 的时间周期<br />将这个参数设置为 0 则会让脚本仅执行一次"
+"<br />不支持小于\"检查时间周期\"的数值(除了 0)。"
 
 msgid "It is NOT recommended for casual users to change settings on this page."
-msgstr "强烈不建议初次使用的用户修改本页设定."
+msgstr "强烈不建议初次使用的用户修改本页设定"
 
 msgid "Last Update"
 msgstr "上次更新"
@@ -364,26 +374,28 @@ msgid "Log to syslog"
 msgstr "把日志记录到系统日志"
 
 msgid "Lookup Hostname"
-msgstr ""
+msgstr "查询主机名"
 
 msgid "NOT installed"
-msgstr ""
+msgstr "未安装"
 
 msgid ""
 "Neither GNU Wget with SSL nor cURL installed to select a network to use for "
 "communication."
-msgstr "包含SSL支持的GNU Wget或者cURL均未被安装.无法选择一个网络用于通信."
+msgstr "包含 SSL 支持的 GNU Wget 或者 cURL 均未安装,无法选择网络用于通信。"
 
 msgid ""
 "Neither GNU Wget with SSL nor cURL installed to support secure updates via "
 "HTTPS protocol."
 msgstr ""
+"包含 SSL 支持的 GNU Wget 或者 cURL 均未安装,无法通过 HTTPS 协议进行安全的更"
+"新。"
 
 msgid "Network"
 msgstr "网络"
 
 msgid "Network on which the ddns-updater scripts will be started"
-msgstr "DDNS更新脚本将会运行于该网络"
+msgstr "DDNS 更新脚本将会运行于该网络"
 
 msgid "Never"
 msgstr "从不"
@@ -392,7 +404,7 @@ msgid "Next Update"
 msgstr "下次更新"
 
 msgid "No certificates found"
-msgstr ""
+msgstr "找不到证书"
 
 msgid "No data"
 msgstr "无数据"
@@ -401,7 +413,7 @@ msgid "No logging"
 msgstr "无日志"
 
 msgid "Non-public and by default blocked IP's"
-msgstr "非公网IP以及默认被锁定的IP"
+msgstr "非公网 IP 以及默认被锁定的 IP"
 
 msgid "Notice"
 msgstr "提示"
@@ -410,40 +422,40 @@ msgid "Number of last lines stored in log files"
 msgstr "日志文件中的最后几行"
 
 msgid "OPTIONAL: Force the usage of pure IPv4/IPv6 only communication."
-msgstr "可选:强制使用仅IPv4/IPv6通信."
+msgstr "可选:强制仅使用 IPv4/IPv6 通信。"
 
 msgid "OPTIONAL: Force the use of TCP instead of default UDP on DNS requests."
-msgstr "可选:强制使用TCP而非UDP请求DNS."
+msgstr "可选:强制使用 TCP 而非 UDP 请求 DNS。"
 
 msgid "OPTIONAL: Network to use for communication"
-msgstr "可选:用于通信的网络"
+msgstr "可选用于通信的网络"
 
 msgid "OPTIONAL: Proxy-Server for detection and updates."
-msgstr "可选:用于检测以及更新的代理服务器"
+msgstr "可选:用于检测以及更新的代理服务器。"
 
 msgid "OPTIONAL: Use non-default DNS-Server to detect 'Registered IP'."
-msgstr "可选:使用非默认DNS服务器检测\"已注册的IP地址\""
+msgstr "可选:使用非默认 DNS 服务器检测\"已注册的 IP 地址\"。"
 
 msgid "On Error the script will retry the failed action after given time"
-msgstr "当出错时,脚本将会重试失败的动作的次数"
+msgstr "当出错时脚本将会重试失败的动作的次数"
 
 msgid "On Error the script will stop execution after given number of retrys"
-msgstr "当出错时,脚本将会重试该次数之后退出"
+msgstr "当出错时脚本将会重试该次数之后退出"
 
 msgid "OpenWrt Wiki"
-msgstr ""
+msgstr "OpenWrt Wiki"
 
 msgid "Optional Encoded Parameter"
-msgstr ""
+msgstr "可选编码参数"
 
 msgid "Optional Parameter"
-msgstr ""
+msgstr "可选参数"
 
 msgid "Optional: Replaces [PARAMENC] in Update-URL (URL-encoded)"
-msgstr ""
+msgstr "可选:替换更新 URL(已编码 URL)中的 [PARAMENC]"
 
 msgid "Optional: Replaces [PARAMOPT] in Update-URL (NOT URL-encoded)"
-msgstr ""
+msgstr "可选:替换更新 URL(未编码 URL)中的 [PARAMENC]"
 
 msgid "Overview"
 msgstr "总览"
@@ -458,7 +470,7 @@ msgid "Password"
 msgstr "密码"
 
 msgid "Path to CA-Certificate"
-msgstr "CA证书路径"
+msgstr "CA 证书路径"
 
 msgid "Please [Save & Apply] your changes first"
 msgstr "请先保存并应用您的设置"
@@ -470,25 +482,25 @@ msgid "Please update to the current version!"
 msgstr "请更新到最新版本!"
 
 msgid "Process ID"
-msgstr "处理ID"
+msgstr "进程 ID"
 
 msgid "Read / Reread log file"
 msgstr "读取/重新读取日志文件"
 
 msgid "Really change DDNS provider?"
-msgstr ""
+msgstr "确定更改 DDNS 提供商吗?"
 
 msgid "Registered IP"
-msgstr "已注册的IP地址"
+msgstr "已注册的 IP 地址"
 
 msgid "Replaces [DOMAIN] in Update-URL"
-msgstr "在更新URL中使用[DOMAIN]替换域名"
+msgstr "替换更新 URL 中的 [DOMAIN]"
 
 msgid "Replaces [PASSWORD] in Update-URL (URL-encoded)"
-msgstr "在更新URL中使用[PASSWORD]替换密码"
+msgstr "替换更新 URL(已编码 URL)中的 [PASSWORD]"
 
 msgid "Replaces [USERNAME] in Update-URL (URL-encoded)"
-msgstr "在更新URL中使用[USERNAME]替换用户名"
+msgstr "替换更新 URL(已编码 URL)中的 [USERNAME]"
 
 msgid "Run once"
 msgstr "运行一次"
@@ -503,13 +515,13 @@ msgid "Software update required"
 msgstr "需要进行软件更新"
 
 msgid "Specifying a DNS-Server is not supported"
-msgstr ""
+msgstr "不支持指定 DNS 服务器"
 
 msgid "Start"
-msgstr "启"
+msgstr "启"
 
 msgid "Start / Stop"
-msgstr "启用/禁用"
+msgstr "启动 / 停止"
 
 msgid "Status directory"
 msgstr "状态目录"
@@ -523,7 +535,7 @@ msgid ""
 msgstr "当前已安装的'ddns-scripts'软件包暂不支持所有可用设置项"
 
 msgid "The default setting of '0' will retry infinite."
-msgstr ""
+msgstr "默认设置“0”将无限重试。"
 
 msgid "There is no service configured."
 msgstr "没有已经配置好的服务项"
@@ -532,16 +544,16 @@ msgid "Timer Settings"
 msgstr "计时器设定"
 
 msgid "To change global settings click here"
-msgstr "点击这里更改全局设置"
+msgstr "点击这里更改全局设置"
 
 msgid "To use cURL activate this option."
-msgstr "选中这个项以使用cURL"
+msgstr "选中此项以使用 cURL"
 
 msgid "URL"
 msgstr "URL"
 
 msgid "URL to detect"
-msgstr "用于检测的URL"
+msgstr "用于检测的 URL"
 
 msgid "Unknown error"
 msgstr "未知错误"
@@ -550,25 +562,26 @@ msgid ""
 "Update URL to be used for updating your DDNS Provider.<br />Follow "
 "instructions you will find on their WEB page."
 msgstr ""
-"DDNS提供商用于更新DDNS的URL<br />跟随教程你将会在它们的网站上提供这个URL."
+"DDNS 提供商用于更新 DDNS 的 URL。<br />跟随教程,您可以在它们的网站上找到这"
+"个 URL。"
 
 msgid "Update error"
 msgstr "更新错误"
 
 msgid "Use HTTP Secure"
-msgstr "使用HTTPS"
+msgstr "使用 HTTPS"
 
 msgid "Use cURL"
-msgstr "使用cURL"
+msgstr "使用 cURL"
 
 msgid "User defined script to read systems IP-Address"
-msgstr "使用设定的脚本来读取系统IP地址"
+msgstr "使用设定的脚本来读取系统 IP 地址"
 
 msgid "Username"
 msgstr "用户名"
 
 msgid "Using specific DNS Server not supported"
-msgstr ""
+msgstr "不支持使用特定的 DNS 服务器"
 
 msgid "Verify"
 msgstr "验证"
@@ -587,49 +600,51 @@ msgstr "等待"
 
 msgid ""
 "Writes detailed messages to log file. File will be truncated automatically."
-msgstr "向日志中写入详细信息.文件将会被自动减小."
+msgstr "向日志中写入详细信息。文件将自动缩小。"
 
 msgid ""
 "Writes log messages to syslog. Critical Errors will always be written to "
 "syslog."
-msgstr "把日志写入系统日志.无论是否启用这项,错误信息总是会被写入系统日志"
+msgstr "把日志写入系统日志。无论是否启用这项,错误信息总是会被写入系统日志。"
 
 msgid ""
 "You should install 'bind-host' or 'knot-host' or 'drill' or 'hostip' "
 "package, if you need to specify a DNS server to detect your registered IP."
 msgstr ""
+"如果您需要指定 DNS 服务器来检测您注册的 IP,您应该安装“bind-host”或“knot-"
+"host”或“drill”或“hostip”软件包。"
 
 msgid ""
 "You should install 'bind-host' or 'knot-host' or 'drill' package for DNS "
 "requests."
-msgstr ""
+msgstr "您应该为 DNS 请求安装“bind-host”或“knot-host”或“drill”软件包。"
 
 msgid "You should install 'wget' or 'curl' or 'uclient-fetch' package."
-msgstr ""
+msgstr "您应该安装“wget”或“curl”或“uclient-fetch”软件包。"
 
 msgid ""
 "You should install 'wget' or 'curl' or 'uclient-fetch' with 'libustream-"
 "*ssl' package."
-msgstr ""
+msgstr "您应该安装“wget”或“curl”或“uclient-fetch”,及“libustream-*ssl”软件包。"
 
 msgid "You should install 'wget' or 'curl' package."
-msgstr ""
+msgstr "您应该安装“wget”或“curl”软件包。"
 
 msgid ""
 "You should install 'wget' or 'uclient-fetch' package or replace libcurl."
-msgstr ""
+msgstr "您应该安装“wget”或“uclient-fetch”软件包,或替换 libcurl。"
 
 msgid "cURL is installed, but libcurl was compiled without proxy support."
-msgstr "cURL已经安装,但是libcurl编译时没有启用代理支持."
+msgstr "cURL 已经安装,但是 libcurl 编译时没有启用代理支持。"
 
 msgid "cURL without Proxy Support"
-msgstr "cURL包含代理支持"
+msgstr "cURL 没有包含代理支持"
 
 msgid "can not detect local IP. Please select a different Source combination"
-msgstr "不能确定本地IP.请更换IP来源."
+msgstr "无法确定本地 IP。请更换 IP 来源。"
 
 msgid "can not resolve host:"
-msgstr "不能解析主机:"
+msgstr "无法解析主机:"
 
 msgid "config error"
 msgstr "配置错误"
@@ -641,7 +656,7 @@ msgid "directory or path/file"
 msgstr "目录或者到文件的路径"
 
 msgid "either url or script could be set"
-msgstr "接受URL或者脚本"
+msgstr "接受 URL 或者脚本"
 
 msgid "enable here"
 msgstr "在这里启用"
@@ -659,16 +674,16 @@ msgid "installed"
 msgstr "已安装"
 
 msgid "invalid FQDN / required - Sample"
-msgstr ""
+msgstr "FQDN 无效 / 必需 - 示例"
 
 msgid "minimum value '0'"
-msgstr "最小值0"
+msgstr "最小值 0"
 
 msgid "minimum value '1'"
-msgstr "最小值1"
+msgstr "最小值 1"
 
 msgid "minimum value 5 minutes == 300 seconds"
-msgstr "最小值为5分钟(300秒)"
+msgstr "最小值为 5 分钟(300 秒)"
 
 msgid "minutes"
 msgstr "分钟"
@@ -683,7 +698,7 @@ msgid "must start with 'http://'"
 msgstr "必须以'http://'开头"
 
 msgid "nc (netcat) can not connect"
-msgstr "nc(netcat)不可连接"
+msgstr "nc(netcat)不可连接"
 
 msgid "never"
 msgstr "从不"
@@ -692,10 +707,10 @@ msgid "no data"
 msgstr "无数据"
 
 msgid "not found or not executable - Sample: '/path/to/script.sh'"
-msgstr "未找到或者不可执行 - 示例: '/path/to/script.sh'"
+msgstr "未找到或者不可执行 - 示例:“/path/to/script.sh”"
 
 msgid "nslookup can not resolve host"
-msgstr "nslookup不能解析主机"
+msgstr "nslookup 不能解析主机"
 
 msgid "or"
 msgstr "或者"
@@ -710,10 +725,10 @@ msgid "please remove entry"
 msgstr "请移除该字段"
 
 msgid "please select 'IPv4' address version"
-msgstr "请设定IPv4地址"
+msgstr "请设定 IPv4 地址"
 
 msgid "please select 'IPv4' address version in"
-msgstr "请设定IPv4地址于"
+msgstr "请设定 IPv4 地址于"
 
 msgid "please set to 'default'"
 msgstr "请设置为\"默认\""
@@ -728,7 +743,7 @@ msgid "seconds"
 msgstr "秒"
 
 msgid "to run HTTPS without verification of server certificates (insecure)"
-msgstr "使用HTTPS但不检查服务器证书(不安全)"
+msgstr "使用 HTTPS 但不检查服务器证书(不安全)"
 
 msgid "unknown error"
 msgstr "未知错误"
@@ -737,7 +752,7 @@ msgid "unspecific error"
 msgstr "未指定的错误"
 
 msgid "use hostname, FQDN, IPv4- or IPv6-Address"
-msgstr "使用主机名或IPv4/IPv6地址"
+msgstr "使用主机名或 IPv4/IPv6 地址"
 
 #~ msgid ""
 #~ "Neither GNU Wget with SSL nor cURL installed to support updates via HTTPS "
@@ -745,13 +760,13 @@ msgstr "使用主机名或IPv4/IPv6地址"
 #~ msgstr "包含SSL支持的GNU Wget或者cURL均未被安装.无法使用HTTPS更新DDNS"
 
 #~ msgid "You should install BIND host package for DNS requests."
-#~ msgstr "需要安装BIND以请求DNS记录."
+#~ msgstr "需要安装BIND以请求DNS记录."
 
 #~ msgid "You should install GNU Wget with SSL (preferred) or cURL package."
-#~ msgstr "需要安装包含SSL支持的GNU Wget(推荐)或是cURL软件包."
+#~ msgstr "需要安装包含SSL支持的GNU Wget(推荐)或是cURL软件包."
 
 #~ msgid "You should install GNU Wget with SSL or cURL package."
-#~ msgstr "需要安装包含SSL支持的GNU Wget或是cURL软件包."
+#~ msgstr "需要安装包含SSL支持的GNU Wget或是cURL软件包."
 
 #~ msgid "You should install GNU Wget with SSL or replace libcurl."
-#~ msgstr "需要安装包含SSL支持的GNU Wget或替换libcurl."
+#~ msgstr "需要安装包含SSL支持的GNU Wget或替换libcurl."

+ 250 - 206
package/luci/applications/luci-app-ddns/po/zh-tw/ddns.po

@@ -1,728 +1,772 @@
+#
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: luci-app-ddns 2.4.0-1\n"
 "POT-Creation-Date: 2016-01-30 11:07+0100\n"
-"PO-Revision-Date: 2013-08-07 15:53+0200\n"
-"Last-Translator: Ethan <ethan42411@gmail.com>\n"
-"Language-Team: \n"
+"PO-Revision-Date: 2017-10-29 14:14+0800\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
 "Language: zh_TW\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Poedit 1.8.4\n"
+"X-Generator: Gtranslator 2.91.7\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
 
 msgid "&"
-msgstr ""
+msgstr "&"
 
 msgid "-- custom --"
-msgstr ""
+msgstr "-- 自定義 --"
 
 msgid "-- default --"
-msgstr ""
+msgstr "-- 預設 --"
 
 msgid "Advanced Settings"
-msgstr ""
+msgstr "高階設定"
 
 msgid "Allow non-public IP's"
-msgstr ""
+msgstr "允許非公網 IP"
 
 msgid "Applying changes"
-msgstr ""
+msgstr "正在應用更改"
 
 msgid "Basic Settings"
-msgstr ""
+msgstr "基礎設定"
 
 msgid ""
 "Below a list of configuration tips for your system to run Dynamic DNS "
 "updates without limitations"
-msgstr ""
+msgstr "以下是一個能夠讓您的系統不受限制地進行動態 DNS 更新設定的提示列表"
 
 msgid ""
 "Below is a list of configured DDNS configurations and their current state."
-msgstr ""
+msgstr "以下是當前已經配置好的 DDNS 設定項列表以及它們的當前狀態。"
 
 msgid "Bind Network"
-msgstr ""
+msgstr "使用的介面"
 
 msgid "Binding to a specific network not supported"
-msgstr ""
+msgstr "不支援繫結到一個指定的網路"
 
 msgid ""
 "BusyBox's nslookup and Wget do not support to specify the IP version to use "
 "for communication with DDNS Provider!"
 msgstr ""
+"與 DDNS 供應商通訊時,BusyBox 的 nslookup 和 Wget 不支援設定特定的 IP 協議版"
+"本。"
 
 msgid ""
 "BusyBox's nslookup and hostip do not support to specify to use TCP instead "
 "of default UDP when requesting DNS server!"
 msgstr ""
+"向 DNS 伺服器查詢時,BusyBox 的 nslookup 和 hostip 不支援使用 TCP 而不是預設"
+"的 UDP!"
 
 msgid ""
 "BusyBox's nslookup in the current compiled version does not handle given DNS "
 "Servers correctly!"
-msgstr ""
+msgstr "當前編譯版本中 BusyBox 的 nslookup 在處理給定的 DNS 伺服器不正確!"
 
 msgid "Casual users should not change this setting"
-msgstr ""
+msgstr "普通使用者不應該改變這個設定"
 
 msgid "Change provider"
-msgstr ""
+msgstr "更改提供者"
 
 msgid "Check Interval"
-msgstr ""
+msgstr "檢查時間週期"
 
 msgid "Collecting data..."
-msgstr ""
+msgstr "正在收集資料..."
 
 msgid "Config error"
-msgstr ""
+msgstr "配置錯誤"
 
 msgid "Configuration"
-msgstr ""
+msgstr "設定"
 
 msgid ""
 "Configure here the details for all Dynamic DNS services including this LuCI "
 "application."
-msgstr ""
+msgstr "在這裡修改動態 DNS 服務的詳細配置。"
 
 msgid "Configure here the details for selected Dynamic DNS service."
-msgstr ""
+msgstr "在這裡修改選擇的 DDNS 服務的詳細配置。"
 
 msgid "Current setting"
-msgstr ""
+msgstr "當前設定"
 
 msgid ""
 "Currently DDNS updates are not started at boot or on interface events.<br /"
 ">This is the default if you run DDNS scripts by yourself (i.e. via cron with "
 "force_interval set to '0')"
 msgstr ""
+"現在,DDNS 更新在開機或者介面動作時不會被觸發。<br />如果您手工執行 DDNS 指令"
+"碼的話(例如使用 cron 時把 force_interval 設定為 0),這是預設設定。"
 
 msgid ""
 "Currently DDNS updates are not started at boot or on interface events.<br /"
 ">You can start/stop each configuration here. It will run until next reboot."
 msgstr ""
+"現在,DDNS 更新在開機或者介面動作時不會被觸發。<br />您可以在這裡開始/停止每"
+"一個設定的條目。它在下次重啟之前一直有效。"
 
 msgid "Custom update script to be used for updating your DDNS Provider."
-msgstr ""
+msgstr "用來更新動態 DNS 的自定義指令碼。"
 
 msgid "Custom update-URL"
-msgstr "自訂更新的URL"
+msgstr "自定義更新 URL"
 
 msgid "Custom update-script"
-msgstr ""
+msgstr "自定義更新指令碼"
 
 msgid "DDNS Autostart disabled"
-msgstr ""
+msgstr "DDNS 自動啟動已禁用。"
 
 msgid "DDNS Client Configuration"
-msgstr ""
+msgstr "DDNS 客戶端配置"
 
 msgid "DDNS Client Documentation"
-msgstr ""
+msgstr "DDNS 客戶端文件"
 
 msgid "DDNS Service provider"
-msgstr ""
+msgstr "DDNS 服務提供商"
 
 msgid "DNS requests via TCP not supported"
-msgstr ""
+msgstr "不支援使用 TCP 進行 DNS 解析"
 
 msgid "DNS-Server"
-msgstr ""
+msgstr "DNS-伺服器"
 
 msgid "Date format"
-msgstr ""
+msgstr "日期格式"
 
 msgid "Defines the Web page to read systems IPv4-Address from"
-msgstr ""
+msgstr "設定用來讀取系統 IPv4 位址的網頁"
 
 msgid "Defines the Web page to read systems IPv6-Address from"
-msgstr ""
+msgstr "設定用來讀取系統 IPv6 位址的網頁"
 
 msgid "Defines the interface to read systems IP-Address from"
-msgstr ""
+msgstr "設定用來讀取系統 IP 位址的介面"
 
 msgid "Defines the network to read systems IPv4-Address from"
-msgstr ""
+msgstr "設定用來讀取系統 IPv4 位址的網路"
 
 msgid "Defines the network to read systems IPv6-Address from"
-msgstr ""
+msgstr "設定用來讀取系統 IPv6 位址的網路"
 
 msgid ""
 "Defines the source to read systems IPv4-Address from, that will be send to "
 "the DDNS provider"
-msgstr ""
+msgstr "設定 IPv4 位址的來源。這將會被髮送給 DDNS 提供商"
 
 msgid ""
 "Defines the source to read systems IPv6-Address from, that will be send to "
 "the DDNS provider"
-msgstr ""
+msgstr "設定 IPv6 位址的來源。這將會被髮送給 DDNS 提供商"
 
 msgid "Defines which IP address 'IPv4/IPv6' is send to the DDNS provider"
-msgstr ""
+msgstr "設定哪一個 IP 位址(IPv4 或 IPv6)會被髮送給 DDNS 提供商"
 
 msgid "Details for"
-msgstr ""
+msgstr "詳情"
 
 msgid "Directory contains Log files for each running section"
-msgstr ""
+msgstr "儲存每一個執行中的設定的執行日誌的目錄"
 
 msgid ""
 "Directory contains PID and other status information for each running section"
-msgstr ""
+msgstr "儲存每個執行中的設定的PID以及其它狀態資訊的目錄"
 
 msgid "Disabled"
-msgstr ""
+msgstr "已禁用"
 
 msgid "Domain"
-msgstr ""
+msgstr "域名"
 
 msgid "Dynamic DNS"
-msgstr "動態DNS"
+msgstr "動態 DNS"
 
 msgid ""
 "Dynamic DNS allows that your router can be reached with a fixed hostname "
 "while having a dynamically changing IP address."
-msgstr ""
-"動態DNS允許為主機配置一個固定的網域名稱,但該網路名稱卻是對應到動態的IP位置"
+msgstr "動態 DNS 允許為擁有動態 IP 的主機配置一個固定的可訪問域名。"
 
 msgid "Enable secure communication with DDNS provider"
-msgstr ""
+msgstr "啟用安全連線與 DDNS 提供商聯絡"
 
 msgid "Enabled"
-msgstr ""
+msgstr "已啟用"
 
 msgid "Error"
-msgstr ""
+msgstr "錯誤"
 
 msgid "Error Retry Counter"
-msgstr ""
+msgstr "錯誤重試計數"
 
 msgid "Error Retry Interval"
-msgstr ""
+msgstr "錯誤重試間隔"
 
 msgid "Event Network"
-msgstr ""
+msgstr "事件網路"
 
 msgid "File"
-msgstr ""
+msgstr "檔案"
 
 msgid "File not found"
-msgstr ""
+msgstr "檔案未找到"
 
 msgid "File not found or empty"
-msgstr ""
+msgstr "檔案未找到或為空"
 
 msgid ""
 "Follow this link<br />You will find more hints to optimize your system to "
 "run DDNS scripts with all options"
 msgstr ""
+"開啟這個連結<br />您將會得到更多關於如何通過所有設定項優化您的系統以執行 "
+"DDNS 指令碼的提示"
 
 msgid "For detailed information about parameter settings look here."
-msgstr ""
+msgstr "請看這裡獲得關於引數設定的詳細資訊"
 
 msgid "For supported codes look here"
-msgstr ""
+msgstr "檢視這裡獲取支援的編碼"
 
 msgid "Force IP Version"
-msgstr ""
+msgstr "強制設定 IP 版本"
 
 msgid "Force IP Version not supported"
-msgstr ""
+msgstr "不支援強制設定 IP 版本"
 
 msgid "Force Interval"
-msgstr ""
+msgstr "設定週期"
 
 msgid "Force TCP on DNS"
-msgstr ""
+msgstr "強制使用 TCP 進行 DNS 查詢"
 
 msgid "Forced IP Version don't matched"
-msgstr ""
+msgstr "強制設定的 IP 版本不匹配"
 
 msgid "Format"
-msgstr ""
+msgstr "格式"
 
 msgid "Format: IP or FQDN"
-msgstr ""
+msgstr "格式:IP 或者 FQDN"
 
 msgid ""
 "GNU Wget will use the IP of given network, cURL will use the physical "
 "interface."
-msgstr ""
+msgstr "GNU Wget 將會使用給定的網路的 IP 位址,而 cURL 將會使用物理介面。"
 
 msgid "Global Settings"
-msgstr ""
+msgstr "全域性設定"
 
 msgid "HTTPS not supported"
-msgstr ""
+msgstr "不支援 HTTPS"
 
 msgid "Hints"
-msgstr ""
+msgstr "提示"
 
 msgid "Hostname/FQDN to validate, if IP update happen or necessary"
-msgstr ""
+msgstr "主機名/FQDN 驗證,如果 IP 更新發生或必要"
 
 msgid "IP address source"
-msgstr ""
+msgstr "IP 位址來源"
 
 msgid "IP address version"
-msgstr ""
+msgstr "IP 位址版本"
 
 msgid "IPv4-Address"
-msgstr ""
+msgstr "IPv4 位址"
 
 msgid "IPv6 address must be given in square brackets"
-msgstr ""
+msgstr "IPv6 位址必須填寫在中括號(\"[  ]\")內"
 
 msgid ""
 "IPv6 is currently not (fully) supported by this system<br />Please follow "
 "the instructions on OpenWrt's homepage to enable IPv6 support<br />or update "
 "your system to the latest OpenWrt Release"
 msgstr ""
+"當前系統暫時不能(完整地)支援 IPv6<br />請檢視 OpenWrt 首頁的介紹以啟用 "
+"IPv6 支援<br />或者更新您的系統到最新 OpenWrt 版本"
 
 msgid "IPv6 not supported"
-msgstr ""
+msgstr "IPv6 不被支援"
 
 msgid "IPv6-Address"
-msgstr ""
+msgstr "IPv6 位址"
 
 msgid "If both cURL and GNU Wget are installed, Wget is used by default."
-msgstr ""
+msgstr "如果 cURL 和 GNU Wget 同時被安裝,那麼 Wget 將會被優先使用。"
 
 msgid ""
 "If this service section is disabled it could not be started.<br />Neither "
 "from LuCI interface nor from console"
 msgstr ""
+"如果服務配置被禁用,那麼它將不能被啟動。<br />無論是通過 LuCI 頁面或者是通過"
+"終端。"
 
 msgid "If using secure communication you should verify server certificates!"
-msgstr ""
+msgstr "如果使用安全通訊,您應該驗證伺服器證書!"
 
 msgid ""
 "If you want to send updates for IPv4 and IPv6 you need to define two "
 "separate Configurations i.e. 'myddns_ipv4' and 'myddns_ipv6'"
 msgstr ""
+"如果您需要同時更新 IPv4 和 IPv6 位址,您需要單獨新增兩個配置項(例"
+"如'myddns_ipv4'和'myddns_ipv6')"
 
 msgid ""
 "In some versions cURL/libcurl in OpenWrt is compiled without proxy support."
-msgstr ""
+msgstr "OpenWrt 中,cURL/libcurl 的某些版本編譯時沒有啟用代理伺服器支援"
 
 msgid "Info"
-msgstr ""
+msgstr "資訊"
 
 msgid ""
 "Install 'ca-certificates' package or needed certificates by hand into /etc/"
 "ssl/certs default directory"
 msgstr ""
+"手動將“ca-certificates”包或需要的證書安裝到 /etc/ssl/certs 的預設目錄中"
 
 msgid "Interface"
-msgstr "面"
+msgstr "面"
 
 msgid ""
 "Interval to check for changed IP<br />Values below 5 minutes == 300 seconds "
 "are not supported"
-msgstr ""
+msgstr "檢查 IP 是否改變的時間隔<br />不支援小於 5 分鐘(300 秒)的數值。"
 
 msgid ""
 "Interval to force updates send to DDNS Provider<br />Setting this parameter "
 "to 0 will force the script to only run once<br />Values lower 'Check "
 "Interval' except '0' are not supported"
 msgstr ""
+"強制向提供商更新 DDNS 的時間週期<br />將這個引數設定為 0 則會讓指令碼僅執行一"
+"次<br />不支援小於\"檢查時間週期\"的數值(除了 0)。"
 
 msgid "It is NOT recommended for casual users to change settings on this page."
-msgstr ""
+msgstr "強烈不建議初次使用的使用者修改本頁設定。"
 
 msgid "Last Update"
-msgstr ""
+msgstr "上次更新"
 
 msgid "Loading"
-msgstr ""
+msgstr "載入中"
 
 msgid "Log File Viewer"
-msgstr ""
+msgstr "日誌檢視器"
 
 msgid "Log directory"
-msgstr ""
+msgstr "日誌目錄"
 
 msgid "Log length"
-msgstr ""
+msgstr "日誌長度"
 
 msgid "Log to file"
-msgstr ""
+msgstr "把日誌記錄到檔案"
 
 msgid "Log to syslog"
-msgstr ""
+msgstr "把日誌記錄到系統日誌"
 
 msgid "Lookup Hostname"
-msgstr ""
+msgstr "查詢主機名"
 
 msgid "NOT installed"
-msgstr ""
+msgstr "未安裝"
 
 msgid ""
 "Neither GNU Wget with SSL nor cURL installed to select a network to use for "
 "communication."
-msgstr ""
+msgstr "包含 SSL 支援的 GNU Wget 或者 cURL 均未安裝,無法選擇網路用於通訊。"
 
 msgid ""
 "Neither GNU Wget with SSL nor cURL installed to support secure updates via "
 "HTTPS protocol."
 msgstr ""
+"包含 SSL 支援的 GNU Wget 或者 cURL 均未安裝,無法通過 HTTPS 協議進行安全的更"
+"新。"
 
 msgid "Network"
 msgstr "網路"
 
 msgid "Network on which the ddns-updater scripts will be started"
-msgstr ""
+msgstr "DDNS 更新指令碼將會運行於該網路"
 
 msgid "Never"
-msgstr ""
+msgstr "從不"
 
 msgid "Next Update"
-msgstr ""
+msgstr "下次更新"
 
 msgid "No certificates found"
-msgstr ""
+msgstr "找不到證書"
 
 msgid "No data"
-msgstr ""
+msgstr "無資料"
 
 msgid "No logging"
-msgstr ""
+msgstr "無日誌"
 
 msgid "Non-public and by default blocked IP's"
-msgstr ""
+msgstr "非公網 IP 以及預設被鎖定的 IP"
 
 msgid "Notice"
-msgstr ""
+msgstr "提示"
 
 msgid "Number of last lines stored in log files"
-msgstr ""
+msgstr "日誌檔案中的最後幾行"
 
 msgid "OPTIONAL: Force the usage of pure IPv4/IPv6 only communication."
-msgstr ""
+msgstr "可選:強制僅使用 IPv4/IPv6 通訊。"
 
 msgid "OPTIONAL: Force the use of TCP instead of default UDP on DNS requests."
-msgstr ""
+msgstr "可選:強制使用 TCP 而非 UDP 請求 DNS。"
 
 msgid "OPTIONAL: Network to use for communication"
-msgstr ""
+msgstr "可選:用於通訊的網路"
 
 msgid "OPTIONAL: Proxy-Server for detection and updates."
-msgstr ""
+msgstr "可選:用於檢測以及更新的代理伺服器。"
 
 msgid "OPTIONAL: Use non-default DNS-Server to detect 'Registered IP'."
-msgstr ""
+msgstr "可選:使用非預設 DNS 伺服器檢測\"已註冊的 IP 位址\"。"
 
 msgid "On Error the script will retry the failed action after given time"
-msgstr ""
+msgstr "當出錯時,指令碼將會重試失敗的動作的次數"
 
 msgid "On Error the script will stop execution after given number of retrys"
-msgstr ""
+msgstr "當出錯時,指令碼將會重試該次數之後退出"
 
 msgid "OpenWrt Wiki"
-msgstr ""
+msgstr "OpenWrt Wiki"
 
 msgid "Optional Encoded Parameter"
-msgstr ""
+msgstr "可選編碼引數"
 
 msgid "Optional Parameter"
-msgstr ""
+msgstr "可選引數"
 
 msgid "Optional: Replaces [PARAMENC] in Update-URL (URL-encoded)"
-msgstr ""
+msgstr "可選:替換更新 URL(已編碼 URL)中的 [PARAMENC]"
 
 msgid "Optional: Replaces [PARAMOPT] in Update-URL (NOT URL-encoded)"
-msgstr ""
+msgstr "可選:替換更新 URL(未編碼 URL)中的 [PARAMENC]"
 
 msgid "Overview"
-msgstr ""
+msgstr "總覽"
 
 msgid "PROXY-Server"
-msgstr ""
+msgstr "代理伺服器"
 
 msgid "PROXY-Server not supported"
-msgstr ""
+msgstr "不支援代理伺服器"
 
 msgid "Password"
 msgstr "密碼"
 
 msgid "Path to CA-Certificate"
-msgstr ""
+msgstr "CA 證書路徑"
 
 msgid "Please [Save & Apply] your changes first"
-msgstr ""
+msgstr "請先儲存並應用您的設定"
 
 msgid "Please press [Read] button"
-msgstr ""
+msgstr "請按下\"讀取\"按鈕"
 
 msgid "Please update to the current version!"
-msgstr ""
+msgstr "請更新到最新版本!"
 
 msgid "Process ID"
-msgstr ""
+msgstr "程序 ID"
 
 msgid "Read / Reread log file"
-msgstr ""
+msgstr "讀取/重新讀取日誌檔案"
 
 msgid "Really change DDNS provider?"
-msgstr ""
+msgstr "確定更改 DDNS 提供商嗎?"
 
 msgid "Registered IP"
-msgstr ""
+msgstr "已註冊的 IP 位址"
 
 msgid "Replaces [DOMAIN] in Update-URL"
-msgstr ""
+msgstr "替換更新 URL 中的 [DOMAIN]"
 
 msgid "Replaces [PASSWORD] in Update-URL (URL-encoded)"
-msgstr ""
+msgstr "替換更新 URL(已編碼 URL)中的 [PASSWORD]"
 
 msgid "Replaces [USERNAME] in Update-URL (URL-encoded)"
-msgstr ""
+msgstr "替換更新 URL(已編碼 URL)中的 [USERNAME]"
 
 msgid "Run once"
-msgstr ""
+msgstr "執行一次"
 
 msgid "Script"
-msgstr ""
+msgstr "指令碼"
 
 msgid "Show more"
-msgstr ""
+msgstr "檢視更多"
 
 msgid "Software update required"
-msgstr ""
+msgstr "需要進行軟體更新"
 
 msgid "Specifying a DNS-Server is not supported"
-msgstr ""
+msgstr "不支援指定 DNS 伺服器"
 
 msgid "Start"
-msgstr ""
+msgstr "啟動"
 
 msgid "Start / Stop"
-msgstr ""
+msgstr "啟動 / 停止"
 
 msgid "Status directory"
-msgstr ""
+msgstr "狀態目錄"
 
 msgid "Stopped"
-msgstr ""
+msgstr "已停止"
 
 msgid ""
 "The currently installed 'ddns-scripts' package did not support all available "
 "settings."
-msgstr ""
+msgstr "當前已安裝的'ddns-scripts'軟體包暫不支援所有可用設定項"
 
 msgid "The default setting of '0' will retry infinite."
-msgstr ""
+msgstr "預設設定“0”將無限重試。"
 
 msgid "There is no service configured."
-msgstr ""
+msgstr "沒有已經配置好的服務項"
 
 msgid "Timer Settings"
-msgstr ""
+msgstr "計時器設定"
 
 msgid "To change global settings click here"
-msgstr ""
+msgstr "點選這裡更改全域性設定"
 
 msgid "To use cURL activate this option."
-msgstr ""
+msgstr "選中此項以使用 cURL"
 
 msgid "URL"
 msgstr "URL"
 
 msgid "URL to detect"
-msgstr ""
+msgstr "用於檢測的 URL"
 
 msgid "Unknown error"
-msgstr ""
+msgstr "未知錯誤"
 
 msgid ""
 "Update URL to be used for updating your DDNS Provider.<br />Follow "
 "instructions you will find on their WEB page."
 msgstr ""
+"DDNS 提供商用於更新 DDNS 的 URL。<br />跟隨教程,您可以在它們的網站上找到這"
+"個 URL。"
 
 msgid "Update error"
-msgstr ""
+msgstr "更新錯誤"
 
 msgid "Use HTTP Secure"
-msgstr ""
+msgstr "使用 HTTPS"
 
 msgid "Use cURL"
-msgstr ""
+msgstr "使用 cURL"
 
 msgid "User defined script to read systems IP-Address"
-msgstr ""
+msgstr "使用設定的指令碼來讀取系統 IP 位址"
 
 msgid "Username"
 msgstr "使用者名稱"
 
 msgid "Using specific DNS Server not supported"
-msgstr ""
+msgstr "不支援使用特定的 DNS 伺服器"
 
 msgid "Verify"
-msgstr ""
+msgstr "驗證"
 
 msgid "Version"
-msgstr ""
+msgstr "版本"
 
 msgid "Version Information"
-msgstr ""
+msgstr "版本資訊"
 
 msgid "Waiting for changes to be applied..."
-msgstr ""
+msgstr "正在應用更改..."
 
 msgid "Warning"
-msgstr ""
+msgstr "等待"
 
 msgid ""
 "Writes detailed messages to log file. File will be truncated automatically."
-msgstr ""
+msgstr "向日志中寫入詳細資訊。檔案將自動縮小。"
 
 msgid ""
 "Writes log messages to syslog. Critical Errors will always be written to "
 "syslog."
-msgstr ""
+msgstr "把日誌寫入系統日誌。無論是否啟用這項,錯誤資訊總是會被寫入系統日誌。"
 
 msgid ""
 "You should install 'bind-host' or 'knot-host' or 'drill' or 'hostip' "
 "package, if you need to specify a DNS server to detect your registered IP."
 msgstr ""
+"如果您需要指定 DNS 伺服器來檢測您註冊的 IP,您應該安裝“bind-host”或“knot-"
+"host”或“drill”或“hostip”軟體包。"
 
 msgid ""
 "You should install 'bind-host' or 'knot-host' or 'drill' package for DNS "
 "requests."
-msgstr ""
+msgstr "您應該為 DNS 請求安裝“bind-host”或“knot-host”或“drill”軟體包。"
 
 msgid "You should install 'wget' or 'curl' or 'uclient-fetch' package."
-msgstr ""
+msgstr "您應該安裝“wget”或“curl”或“uclient-fetch”軟體包。"
 
 msgid ""
 "You should install 'wget' or 'curl' or 'uclient-fetch' with 'libustream-"
 "*ssl' package."
-msgstr ""
+msgstr "您應該安裝“wget”或“curl”或“uclient-fetch”,及“libustream-*ssl”軟體包。"
 
 msgid "You should install 'wget' or 'curl' package."
-msgstr ""
+msgstr "您應該安裝“wget”或“curl”軟體包。"
 
 msgid ""
 "You should install 'wget' or 'uclient-fetch' package or replace libcurl."
-msgstr ""
+msgstr "您應該安裝“wget”或“uclient-fetch”軟體包,或替換 libcurl。"
 
 msgid "cURL is installed, but libcurl was compiled without proxy support."
-msgstr ""
+msgstr "cURL 已經安裝,但是 libcurl 編譯時沒有啟用代理支援。"
 
 msgid "cURL without Proxy Support"
-msgstr ""
+msgstr "cURL 沒有包含代理支援"
 
 msgid "can not detect local IP. Please select a different Source combination"
-msgstr ""
+msgstr "無法確定本地 IP。請更換 IP 來源。"
 
 msgid "can not resolve host:"
-msgstr ""
+msgstr "無法解析主機:"
 
 msgid "config error"
-msgstr ""
+msgstr "配置錯誤"
 
 msgid "days"
-msgstr ""
+msgstr ""
 
 msgid "directory or path/file"
-msgstr ""
+msgstr "目錄或者到檔案的路徑"
 
 msgid "either url or script could be set"
-msgstr ""
+msgstr "接受 URL 或者指令碼"
 
 msgid "enable here"
-msgstr ""
+msgstr "在這裡啟用"
 
 msgid "file or directory not found or not 'IGNORE'"
-msgstr ""
+msgstr "檔案或目錄未找到或未\"被忽視\""
 
 msgid "help"
-msgstr ""
+msgstr "幫助"
 
 msgid "hours"
-msgstr ""
+msgstr "小時"
 
 msgid "installed"
-msgstr ""
+msgstr "已安裝"
 
 msgid "invalid FQDN / required - Sample"
-msgstr ""
+msgstr "FQDN 無效 / 必需 - 示例"
 
 msgid "minimum value '0'"
-msgstr ""
+msgstr "最小值 0"
 
 msgid "minimum value '1'"
-msgstr ""
+msgstr "最小值 1"
 
 msgid "minimum value 5 minutes == 300 seconds"
-msgstr ""
+msgstr "最小值為 5 分鐘(300 秒)"
 
 msgid "minutes"
-msgstr ""
+msgstr "分鐘"
 
 msgid "missing / required"
-msgstr ""
+msgstr "必須填寫"
 
 msgid "must be greater or equal 'Check Interval'"
-msgstr ""
+msgstr "必須大於或等於\"檢查時間週期\""
 
 msgid "must start with 'http://'"
-msgstr ""
+msgstr "必須以'http://'開頭"
 
 msgid "nc (netcat) can not connect"
-msgstr ""
+msgstr "nc(netcat)不可連線"
 
 msgid "never"
-msgstr ""
+msgstr "從不"
 
 msgid "no data"
-msgstr ""
+msgstr "無資料"
 
 msgid "not found or not executable - Sample: '/path/to/script.sh'"
-msgstr ""
+msgstr "未找到或者不可執行 - 示例:“/path/to/script.sh”"
 
 msgid "nslookup can not resolve host"
-msgstr ""
+msgstr "nslookup 不能解析主機"
 
 msgid "or"
-msgstr ""
+msgstr "或者"
 
 msgid "or higher"
-msgstr ""
+msgstr "或者更大"
 
 msgid "please disable"
-msgstr ""
+msgstr "請禁用"
 
 msgid "please remove entry"
-msgstr ""
+msgstr "請移除該欄位"
 
 msgid "please select 'IPv4' address version"
-msgstr ""
+msgstr "請設定 IPv4 位址"
 
 msgid "please select 'IPv4' address version in"
-msgstr ""
+msgstr "請設定 IPv4 位址於"
 
 msgid "please set to 'default'"
-msgstr ""
+msgstr "請設定為\"預設\""
 
 msgid "proxy port missing"
-msgstr ""
+msgstr "代理埠未填"
 
 msgid "required"
-msgstr ""
+msgstr "必須填寫"
 
 msgid "seconds"
-msgstr ""
+msgstr ""
 
 msgid "to run HTTPS without verification of server certificates (insecure)"
-msgstr ""
+msgstr "使用 HTTPS 但不檢查伺服器證書(不安全)"
 
 msgid "unknown error"
-msgstr ""
+msgstr "未知錯誤"
 
 msgid "unspecific error"
-msgstr ""
+msgstr "未指定的錯誤"
 
 msgid "use hostname, FQDN, IPv4- or IPv6-Address"
-msgstr ""
+msgstr "使用主機名或 IPv4/IPv6 位址"
+
+#~ msgid ""
+#~ "Neither GNU Wget with SSL nor cURL installed to support updates via HTTPS "
+#~ "protocol."
+#~ msgstr "包含SSL支援的GNU Wget或者cURL均未被安裝.無法使用HTTPS更新DDNS"
+
+#~ msgid "You should install BIND host package for DNS requests."
+#~ msgstr "您需要安裝BIND以請求DNS記錄."
+
+#~ msgid "You should install GNU Wget with SSL (preferred) or cURL package."
+#~ msgstr "您需要安裝包含SSL支援的GNU Wget(推薦)或是cURL軟體包."
+
+#~ msgid "You should install GNU Wget with SSL or cURL package."
+#~ msgstr "您需要安裝包含SSL支援的GNU Wget或是cURL軟體包."
+
+#~ msgid "You should install GNU Wget with SSL or replace libcurl."
+#~ msgstr "您需要安裝包含SSL支援的GNU Wget或替換libcurl."

+ 3 - 3
package/luci/applications/luci-app-diag-core/po/zh-tw/diag_core.po

@@ -20,14 +20,14 @@ msgstr "診斷"
 msgid ""
 "The diagnostics available under this menu depend on what modules you have "
 "installed on your device."
-msgstr "這選單下的診斷機制可運用性, 端看設備上已安裝的模組而定"
+msgstr "這選單下的診斷機制可運用性, 端看設備上已安裝的模組而定"
 
 msgid ""
 "The entries in the menu allow you to perform diagnostic tests on your system "
 "to aid in troubleshooting."
-msgstr "選單內的項目允許在系統內執行診斷測試以便解決疑難雜症"
+msgstr "選單內的項目允許在系統內執行診斷測試以便解決疑難雜症"
 
 msgid ""
 "With this menu you can configure network diagnostics, such as network device "
 "scans and ping tests."
-msgstr "採用這選項可以讓設定網路診斷, 例如網路設備掃描跟ping的測試."
+msgstr "採用這選項可以讓設定網路診斷, 例如網路設備掃描跟ping的測試."

+ 8 - 8
package/luci/applications/luci-app-diag-devinfo/po/sv/diag_devinfo.po

@@ -91,7 +91,7 @@ msgid "MAC range and information used to override system and IEEE databases"
 msgstr ""
 
 msgid "Milliseconds to sleep between requests (default 100)"
-msgstr ""
+msgstr "Millisekunder att sova mellan förfrågningar (100 är standard)"
 
 msgid "Model"
 msgstr "Modell"
@@ -109,7 +109,7 @@ msgid "Networks to scan for devices"
 msgstr "Nätverk att skanna efter enheter i"
 
 msgid "Networks to scan for supported devices"
-msgstr ""
+msgstr "Nätverk att skanna efter enheter som stöds"
 
 msgid "No SIP devices"
 msgstr "Inga SIP-enheter"
@@ -118,10 +118,10 @@ msgid "No devices detected"
 msgstr "Upptäckte inga enheter"
 
 msgid "Number of times to send requests (default 1)"
-msgstr ""
+msgstr "Antalet gånger att skicka förfrågningar (1 är standard)"
 
 msgid "OUI Owner"
-msgstr ""
+msgstr "OUI-ägare"
 
 msgid ""
 "Override the information returned by the MAC to Device Info Script (mac-to-"
@@ -129,13 +129,13 @@ msgid ""
 msgstr ""
 
 msgid "Perform Scans (this can take a few minutes)"
-msgstr ""
+msgstr "Utför skanningar (det här kan ta ett par minuter)"
 
 msgid "Phone Information"
 msgstr "Information om telefon"
 
 msgid "Phone Scan"
-msgstr "Skanning av telefon"
+msgstr "Skanna telefon"
 
 msgid "Phone Scanning Configuration"
 msgstr "Konfiguration av skanning i telefon"
@@ -156,7 +156,7 @@ msgid "Repeat Scans (this can take a few minutes)"
 msgstr "Repetera skanningar (det här kan ta några minuter)"
 
 msgid "SIP Device Information"
-msgstr ""
+msgstr "Information om SIP-enhet"
 
 msgid "SIP Device Scan"
 msgstr ""
@@ -195,7 +195,7 @@ msgid "Time to wait for responses in seconds (default 10)"
 msgstr "Tid att vänta på svar i sekunder (standard 10)"
 
 msgid "Timeout"
-msgstr ""
+msgstr "Avbrott"
 
 msgid "Use Configuration"
 msgstr "Använd konfiguration"

+ 9 - 3
package/luci/applications/luci-app-dnscrypt-proxy/luasrc/controller/dnscrypt-proxy.lua

@@ -17,8 +17,8 @@ function index()
 	entry({"admin", "services", "dnscrypt-proxy", "advanced"}, firstchild(), _("Advanced"), 100)
 	entry({"admin", "services", "dnscrypt-proxy", "advanced", "configuration"}, cbi("dnscrypt-proxy/configuration_tab"), _("Edit DNSCrypt-Proxy Configuration"), 110).leaf = true
 	entry({"admin", "services", "dnscrypt-proxy", "advanced", "cfg_dnsmasq"}, cbi("dnscrypt-proxy/cfg_dnsmasq_tab"), _("Edit Dnsmasq Configuration"), 120).leaf = true
-	entry({"admin", "services", "dnscrypt-proxy", "advanced", "view_reslist"}, call("view_reslist"), _("View Resolver List"), 130).leaf = true
-
+	entry({"admin", "services", "dnscrypt-proxy", "advanced", "cfg_resolvcrypt"}, cbi("dnscrypt-proxy/cfg_resolvcrypt_tab"), _("Edit Resolvcrypt Configuration"), 130).leaf = true
+	entry({"admin", "services", "dnscrypt-proxy", "advanced", "view_reslist"}, call("view_reslist"), _("View Resolver List"), 140).leaf = true
 end
 
 function view_reslist()
@@ -27,6 +27,12 @@ function view_reslist()
 end
 
 function logread()
-	local logfile = util.trim(util.exec("logread -e 'dnscrypt-proxy'"))
+	local logfile
+
+	if nixio.fs.access("/var/log/messages") then
+		logfile = util.trim(util.exec("cat /var/log/messages | grep 'dnscrypt-proxy'"))
+	else
+		logfile = util.trim(util.exec("logread -e 'dnscrypt-proxy'"))
+	end
 	templ.render("dnscrypt-proxy/logread", {title = i18n.translate("DNSCrypt-Proxy Logfile"), content = logfile})
 end

+ 2 - 0
package/luci/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/cfg_dnsmasq_tab.lua

@@ -7,6 +7,8 @@ local uci_input = "/etc/config/dhcp"
 
 if not nxfs.access(uci_input) then
 	m = SimpleForm("error", nil, translate("Input file not found, please check your configuration."))
+	m.reset = false
+	m.submit = false
 	return m
 end
 

+ 39 - 0
package/luci/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/cfg_resolvcrypt_tab.lua

@@ -0,0 +1,39 @@
+-- Copyright 2017 Dirk Brenken (dev@brenken.org)
+-- This is free software, licensed under the Apache License, Version 2.0
+
+local nxfs      = require("nixio.fs")
+local util      = require("luci.util")
+local res_input = "/etc/resolv-crypt.conf"
+
+if not nxfs.access(res_input) then
+	m = SimpleForm("error", nil, translate("Input file not found, please check your configuration."))
+	m.reset = false
+	m.submit = false
+	return m
+end
+
+m = SimpleForm("input", nil)
+m:append(Template("dnscrypt-proxy/config_css"))
+m.submit = translate("Save")
+m.reset = false
+
+s = m:section(SimpleSection, nil,
+	translate("This form allows you to modify the content of the resolv-crypt configuration file (/etc/resolv-crypt.conf)."))
+
+f = s:option(TextValue, "data")
+f.rows = 20
+f.rmempty = true
+
+function f.cfgvalue()
+	return nxfs.readfile(res_input) or ""
+end
+
+function f.write(self, section, data)
+	return nxfs.writefile(res_input, "\n" .. util.trim(data:gsub("\r\n", "\n")) .. "\n")
+end
+
+function s.handle(self, state, data)
+	return true
+end
+
+return m

+ 130 - 62
package/luci/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua

@@ -11,15 +11,16 @@ local plug_cnt  = tonumber(luci.sys.exec("env -i /usr/sbin/dnscrypt-proxy --vers
 local res_list  = {}
 local url       = "https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv"
 
-if not fs.access("/lib/libustream-ssl.so") then
-	m = SimpleForm("error", nil, translate("SSL support not available, please install an libustream-ssl variant to use this package."))
-	m.submit = false
-	m.reset = false
-	return m
-end
-
 if not fs.access(res_input) then
-	luci.sys.call("env -i /bin/uclient-fetch --no-check-certificate -O " .. res_input .. " " .. url .. " >/dev/null 2>&1")
+	if not fs.access("/lib/libustream-ssl.so") then
+		m = SimpleForm("error", nil, translate("No default resolver list and no SSL support available.<br />")
+			.. translate("Please install a resolver list to '/usr/share/dnscrypt-proxy/dnscrypt-resolvers.csv' to use this package."))
+		m.submit = false
+		m.reset = false
+		return m
+	else
+		luci.sys.call("env -i /bin/uclient-fetch --no-check-certificate -O " .. res_input .. " " .. url .. " >/dev/null 2>&1")
+	end
 end
 
 if not uci:get_first("dnscrypt-proxy", "global") then
@@ -29,23 +30,64 @@ if not uci:get_first("dnscrypt-proxy", "global") then
 end
 
 for line in io.lines(res_input) do
-	local name = line:match("^[%w_.-]*")
-	res_list[#res_list + 1] = { name = name }
+	local name,
+	location,
+	dnssec,
+	nolog = line:match("^([^,]+),.-,\".-\",\"*(.-)\"*,.-,[0-9],\"*([yesno]+)\"*,\"*([yesno]+)\"*,.*")
+	if name ~= "" and name ~= "Name" then
+		if location == "" then
+			location = "-"
+		end
+		if dnssec == "" then
+			dnssec = "-"
+		end
+		if nolog == "" then
+			nolog = "-"
+		end
+		res_list[#res_list + 1] = { name = name, location = location, dnssec = dnssec, nolog = nolog }
+	end
 end
 
 m = Map("dnscrypt-proxy", translate("DNSCrypt-Proxy"),
 	translate("Configuration of the DNSCrypt-Proxy package. ")
-	.. translate("Keep in mind to configure Dnsmasq as well. ")
 	.. translatef("For further information "
 	.. "<a href=\"%s\" target=\"_blank\">"
 	.. "see the wiki online</a>", "https://wiki.openwrt.org/inbox/dnscrypt"))
+m:chain("dhcp")
 
 function m.on_after_commit(self)
-	luci.sys.call("env -i /etc/init.d/dnsmasq restart >/dev/null 2>&1")
+	function d1.validate(self, value, s1)
+		if value == "1" then
+			uci:commit("dnscrypt-proxy")
+			uci:set("dhcp", s1, "noresolv", 1)
+			if not fs.access("/etc/resolv-crypt.conf") or nixio.fs.stat("/etc/resolv-crypt.conf").size == 0 then
+				uci:set("dhcp", s1, "resolvfile", "/tmp/resolv.conf.auto")
+			else
+				uci:set("dhcp", s1, "resolvfile", "/etc/resolv-crypt.conf")
+			end
+			local server_list = {}
+			local cnt = 1
+			uci:foreach("dnscrypt-proxy", "dnscrypt-proxy", function(s)
+				server_list[cnt] = s['address'] .. "#" .. s['port']
+				cnt = cnt + 1
+			end)
+			server_list[cnt] = "/pool.ntp.org/8.8.8.8"
+			uci:set_list("dhcp", s1, "server", server_list)
+			if cnt > 2 then
+				uci:set("dhcp", s1, "allservers", 1)
+			else
+				uci:set("dhcp", s1, "allservers", 0)
+			end
+			uci:save("dhcp")
+			uci:commit("dhcp")
+		end
+		return value
+	end
 	luci.sys.call("env -i /etc/init.d/dnscrypt-proxy restart >/dev/null 2>&1")
+	luci.sys.call("env -i /etc/init.d/dnsmasq restart >/dev/null 2>&1")
 end
 
-s = m:section(TypedSection, "global", translate("General options"))
+s = m:section(TypedSection, "global", translate("General Options"))
 s.anonymous = true
 
 -- Main dnscrypt-proxy resource list
@@ -62,21 +104,53 @@ o3 = s:option(DummyValue, "", translate("File Checksum"))
 o3.template = "dnscrypt-proxy/res_options"
 o3.value = luci.sys.exec("sha256sum " .. res_input .. " | awk '{print $1}'")
 
-btn = s:option(Button, "", translate("Refresh Resolver List"))
-btn.inputtitle = translate("Refresh List")
-btn.inputstyle = "apply"
-btn.disabled = false
-function btn.write(self, section, value)
-	luci.sys.call("env -i /bin/uclient-fetch --no-check-certificate -O " .. res_input .. " " .. url .. " >/dev/null 2>&1")
-	luci.http.redirect(luci.dispatcher.build_url("admin", "services", "dnscrypt-proxy"))
+if fs.access("/lib/libustream-ssl.so") then
+	btn1 = s:option(Button, "", translate("Refresh Resolver List"),
+		translate("Download the current resolver list from 'download.dnscrypt.org'."))
+	btn1.inputtitle = translate("Refresh List")
+	btn1.inputstyle = "apply"
+	btn1.disabled = false
+	function btn1.write()
+		luci.sys.call("env -i /bin/uclient-fetch --no-check-certificate -O " .. res_input .. " " .. url .. " >/dev/null 2>&1")
+		luci.http.redirect(luci.dispatcher.build_url("admin", "services", "dnscrypt-proxy"))
+	end
+else
+	btn1 = s:option(Button, "", translate("Refresh Resolver List"),
+		translate("No SSL support available.<br />")
+		.. translate("Please install a 'libustream-ssl' library to download the current resolver list from 'download.dnscrypt.org'."))
+	btn1.inputtitle = translate("-------")
+	btn1.inputstyle = "button"
+	btn1.disabled = true
+end
+
+if not fs.access("/etc/resolv-crypt.conf") or nixio.fs.stat("/etc/resolv-crypt.conf").size == 0 then
+	btn2 = s:option(Button, "", translate("Create Custom Config File"),
+		translate("Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS upstream timeouts with multiple DNSCrypt instances.<br />")
+		.. translatef("For further information "
+		.. "<a href=\"%s\" target=\"_blank\">"
+		.. "see the wiki online</a>", "https://wiki.openwrt.org/inbox/dnscrypt"))
+	btn2.inputtitle = translate("Create Config File")
+	btn2.inputstyle = "apply"
+	btn2.disabled = false
+	function btn2.write()
+		luci.sys.call("env -i echo 'options timeout:1' > '/etc/resolv-crypt.conf'")
+		luci.http.redirect(luci.dispatcher.build_url("admin", "services", "dnscrypt-proxy"))
+	end
+else
+	btn2 = s:option(Button, "", translate("Create Custom Config File"),
+		translate("The config file '/etc/resolv-crypt.conf' already exist.<br />")
+		.. translate("Please edit the file manually in the 'Advanced' section."))
+	btn2.inputtitle = translate("-------")
+	btn2.inputstyle = "button"
+	btn2.disabled = true
 end
 
 -- Trigger settings
 
-t = s:option(DynamicList, "procd_trigger", translate("Startup Trigger"),
-	translate("By default the DNSCrypt-Proxy startup will be triggered by ifup events of multiple network interfaces. ")
-	.. translate("To restrict the trigger, add only the relevant network interface(s). ")
-	.. translate("Usually the 'wan' interface should work for most users."))
+t = s:option(ListValue, "procd_trigger", translate("Startup Trigger"),
+	translate("By default the DNSCrypt-Proxy startup will be triggered by ifup events of 'All' available network interfaces.<br />")
+	.. translate("To restrict the trigger, select only the relevant network interface. Usually the 'wan' interface should work for most users."))
+t:value("", "All")
 if dump then
 	local i, v
 	for i, v in ipairs(dump.interface) do
@@ -85,57 +159,38 @@ if dump then
 		end
 	end
 end
+t.default = procd_trigger or "All"
 t.rmempty = true
 
--- Extra options
-
-ds = s:option(DummyValue, "_dummy", translate("Extra options"),
-	translate("Options for further tweaking in case the defaults are not suitable for you."))
-ds.template = "cbi/nullsection"
-
-btn = s:option(Button, "", translate("Create custom config file"),
-	translate("Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS upstream timeouts with multiple DNSCrypt instances. ")
-	.. translatef("For further information "
-	.. "<a href=\"%s\" target=\"_blank\">"
-	.. "see the wiki online</a>", "https://wiki.openwrt.org/inbox/dnscrypt"))
-btn.inputtitle = translate("Create Config File")
-btn.inputstyle = "apply"
-btn.disabled = false
-function btn.write(self, section, value)
-	if not fs.access("/etc/resolv-crypt.conf") then
-		luci.sys.call("env -i echo 'options timeout:1' > '/etc/resolv-crypt.conf'")
-	end
-end
-
 -- Mandatory options per instance
 
-s = m:section(TypedSection, "dnscrypt-proxy", translate("Instance options"))
+s = m:section(TypedSection, "dnscrypt-proxy", translate("Instance Options"))
 s.anonymous = true
 s.addremove = true
 
-o1 = s:option(Value, "address", translate("IP Address"),
+i1 = s:option(Value, "address", translate("IP Address"),
 	translate("The local IPv4 or IPv6 address. The latter one should be specified within brackets, e.g. '[::1]'."))
-o1.default = address or "127.0.0.1"
-o1.rmempty = false
+i1.default = address or "127.0.0.1"
+i1.rmempty = false
 
-o2 = s:option(Value, "port", translate("Port"),
+i2 = s:option(Value, "port", translate("Port"),
 	translate("The listening port for DNS queries."))
-o2.datatype = "port"
-o2.default = port
-o2.rmempty = false
-
-o3 = s:option(ListValue, "resolver", translate("Resolver"),
-	translate("Name of the remote DNS service for resolving queries."))
-o3.datatype = "hostname"
-o3.widget = "select"
+i2.datatype = "port"
+i2.default = port
+i2.rmempty = false
+
+i3 = s:option(ListValue, "resolver", translate("Resolver (LOC/SEC/NOLOG)"),
+	translate("Name of the remote DNS service for resolving queries incl. Location, DNSSEC- and NOLOG-Flag."))
+i3.datatype = "hostname"
+i3.widget = "select"
 local i, v
 for i, v in ipairs(res_list) do
-	if v.name ~= "Name" then
-		o3:value(v.name)
+	if v.name then
+		i3:value(v.name, v.name .. " (" .. v.location .. "/" .. v.dnssec .. "/" .. v.nolog .. ")")
 	end
 end
-o3.default = resolver
-o3.rmempty = false
+i3.default = resolver
+i3.rmempty = false
 
 -- Extra options per instance
 
@@ -174,4 +229,17 @@ if plug_cnt > 0 then
 	e6.optional = true
 end
 
-return m
+-- Dnsmasq options
+
+m1 = Map("dhcp")
+
+s1 = m1:section(TypedSection, "dnsmasq", translate("Dnsmasq Options"))
+s1.anonymous = true
+
+d1 = s1:option(Flag, "", translate("Transfer Options To Dnsmasq"),
+	translate("Apply DNSCrypt-Proxy specific settings to the Dnsmasq configuration.<br />")
+	.. translate("Please note: This may change the values for 'noresolv', 'resolvfile', 'allservers' and the list 'server' settings."))
+d1.default = d1.enabled
+d1.rmempty = false
+
+return m, m1

+ 82 - 35
package/luci/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po

@@ -7,17 +7,24 @@ msgstr ""
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.0.3\n"
+"X-Generator: Poedit 2.0.4\n"
 "Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 "Language: ja\n"
 
+msgid "-------"
+msgstr "(利用不可)"
+
 msgid "Advanced"
 msgstr "詳細"
 
 msgid "Alternate Resolver List"
 msgstr "代替 リゾルバ リスト"
 
+msgid ""
+"Apply DNSCrypt-Proxy specific settings to the Dnsmasq configuration.<br />"
+msgstr "Dnsmasq の構成に、DNSCrypt-Proxy を指定する設定を適用します。<br />"
+
 msgid "Blacklist"
 msgstr "ブラックリスト"
 
@@ -26,26 +33,26 @@ msgstr "IPv6 のブロック"
 
 msgid ""
 "By default the DNSCrypt-Proxy startup will be triggered by ifup events of "
-"multiple network interfaces."
+"'All' available network interfaces.<br />"
 msgstr ""
-"デフォルトでは、 DNSCrypt-Proxy は全ネットワーク インターフェースの ifup イベ"
-"ントによりトリガされ起動します。"
+"デフォルトでは、 DNSCrypt-Proxy は利用可能な全ネットワーク インターフェース"
+"の ifup イベントによりトリガされ起動します。<br />"
 
 msgid "Configuration of the DNSCrypt-Proxy package."
 msgstr "DNSCrypt-Proxy パッケージの設定です。"
 
 msgid ""
 "Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS "
-"upstream timeouts with multiple DNSCrypt instances."
+"upstream timeouts with multiple DNSCrypt instances.<br />"
 msgstr ""
 "複数の DNSCrypt インスタンスで DNS アップストリーム タイムアウトの設定値を共"
 "用するため、 'options timeout:1' を含めた '/etc/resolv-crypt.conf' を作成しま"
-"す。"
+"す。<br />"
 
 msgid "Create Config File"
 msgstr "設定ファイルの作成"
 
-msgid "Create custom config file"
+msgid "Create Custom Config File"
 msgstr "カスタム設定ファイルの作成"
 
 msgid "DNS Query Logfile"
@@ -66,21 +73,28 @@ msgstr "デフォルト リゾルバ リスト"
 msgid "Disable IPv6 to speed up DNSCrypt-Proxy."
 msgstr "DNSCrypt-Proxy の高速化のため、IPv6 を無効化します。"
 
+msgid "Dnsmasq Options"
+msgstr "Dnsmasq オプション"
+
+msgid "Download the current resolver list from 'download.dnscrypt.org'."
+msgstr ""
+"現在のリゾルバ リストを 'download.dnscrypt.org' からダウンロードします。"
+
 msgid "Edit DNSCrypt-Proxy Configuration"
 msgstr "DNSCrypt-Proxy 設定の編集"
 
 msgid "Edit Dnsmasq Configuration"
 msgstr "Dnsmasq 設定の編集"
 
+msgid "Edit Resolvcrypt Configuration"
+msgstr "Resolvcrypt 設定の編集"
+
 msgid "Enable Caching to speed up DNSCcrypt-Proxy."
 msgstr "DNSCrypt-Proxy の高速化のため、キャッシュ機能を有効化します。"
 
 msgid "Ephemeral Keys"
 msgstr "一時的なキー"
 
-msgid "Extra options"
-msgstr "拡張オプション"
-
 msgid "File Checksum"
 msgstr "ファイル チェックサム"
 
@@ -94,8 +108,8 @@ msgstr ""
 "詳細な情報は <a href=\"%s\" target=\"_blank\">オンライン Wiki</a> を確認して"
 "ください。"
 
-msgid "General options"
-msgstr "全般設定"
+msgid "General Options"
+msgstr "全般オプション"
 
 msgid "IP Address"
 msgstr "IP アドレス"
@@ -107,12 +121,9 @@ msgstr ""
 msgid "Input file not found, please check your configuration."
 msgstr "入力ファイルが見つかりません。設定を確認してください。"
 
-msgid "Instance options"
+msgid "Instance Options"
 msgstr "インスタンス オプション"
 
-msgid "Keep in mind to configure Dnsmasq as well."
-msgstr "Dnsmasq を適切に設定する必要があることに留意してください。"
-
 msgid "Local Cache"
 msgstr "ローカル キャッシュ"
 
@@ -129,16 +140,47 @@ msgstr ""
 "受信した DNS クエリをファイルに記録します。これにより、ネットワークで何が起き"
 "ているかをリアルタイムに把握することが可能です。"
 
-msgid "Name of the remote DNS service for resolving queries."
-msgstr "クエリの名前解決を行う、リモートの DNS サービス名です。"
-
 msgid ""
-"Options for further tweaking in case the defaults are not suitable for you."
-msgstr "デフォルト設定が適切でない場合、追加で設定するためのオプションです。"
+"Name of the remote DNS service for resolving queries incl. Location, DNSSEC- "
+"and NOLOG-Flag."
+msgstr ""
+"クエリの名前解決を行う、ロケーション, DNSSECの有無, NOLOG フラグを含めたリ"
+"モート DNS サービスの名前です。"
+
+msgid "No SSL support available.<br />"
+msgstr "利用可能な SSL サポートがありません。<br />"
+
+msgid "No default resolver list and no SSL support available.<br />"
+msgstr ""
+"デフォルトのリゾルバ リストと、利用可能な SSL サポートがありません。<br />"
 
 msgid "Overview"
 msgstr "概要"
 
+msgid "Please edit the file manually in the 'Advanced' section."
+msgstr "'詳細' タブで手動でファイルを編集してください。"
+
+msgid ""
+"Please install a 'libustream-ssl' library to download the current resolver "
+"list from 'download.dnscrypt.org'."
+msgstr ""
+"現在のリゾルバ リストを 'download.dnscrypt.org' からダウンロードするために、 "
+"'libustream-ssl' ライブラリをインストールしてください。"
+
+msgid ""
+"Please install a resolver list to '/usr/share/dnscrypt-proxy/dnscrypt-"
+"resolvers.csv' to use this package."
+msgstr ""
+"このパッケージを利用するには、リゾルバ リストを '/usr/share/dnscrypt-proxy/"
+"dnscrypt-resolvers.csv' にインストールしてください。"
+
+msgid ""
+"Please note: This may change the values for 'noresolv', 'resolvfile', "
+"'allservers' and the list 'server' settings."
+msgstr ""
+"注: これは、 'noresolv' および 'resolvfile', 'allservers', 'list server' の設"
+"定値を変更する場合があります。"
+
 msgid "Port"
 msgstr "ポート"
 
@@ -148,15 +190,8 @@ msgstr "リストのリフレッシュ"
 msgid "Refresh Resolver List"
 msgstr "リゾルバ リストのリフレッシュ"
 
-msgid "Resolver"
-msgstr "リゾルバ"
-
-msgid ""
-"SSL support not available, please install an libustream-ssl variant to use "
-"this package."
-msgstr ""
-"SSL サポートが利用できません。このパッケージを使用するには libustream-ssl 等"
-"をインストールし、 SSL サポートを有効にしてください。"
+msgid "Resolver (LOC/SEC/NOLOG)"
+msgstr "リゾルバ(LOC/SEC/NOLOG)"
 
 msgid "Save"
 msgstr "保存"
@@ -167,6 +202,9 @@ msgstr "デフォルトとは異なるリゾルバ リストを設定します
 msgid "Startup Trigger"
 msgstr "スタートアップ トリガ"
 
+msgid "The config file '/etc/resolv-crypt.conf' already exist.<br />"
+msgstr "設定ファイル '/etc/resolv-crypt.conf' は既に存在しています。<br />"
+
 msgid "The listening port for DNS queries."
 msgstr "DNS クエリを待ち受けるポートです。"
 
@@ -199,6 +237,13 @@ msgstr ""
 "このフォームでは、メインの Dnsmasq 設定ファイル (/etc/config/dhcp) の内容を変"
 "更することができます。"
 
+msgid ""
+"This form allows you to modify the content of the resolv-crypt configuration "
+"file (/etc/resolv-crypt.conf)."
+msgstr ""
+"このフォームでは、 resolv-crypt 設定ファイル(/etc/resolv-crypt.conf)の内容"
+"を変更することができます。"
+
 msgid "This form shows the content of the current DNSCrypt Resolver List."
 msgstr ""
 "このフォームには、現在の DNSCrypt リゾルバ リストの内容が表示されます。"
@@ -217,13 +262,15 @@ msgstr ""
 "このオプションは、通常よりも CPU リソースを多く使用するほか、ほとんどの "
 "DNSCrypt サーバーでは不要なものです。"
 
-msgid "To restrict the trigger, add only the relevant network interface(s)."
+msgid ""
+"To restrict the trigger, select only the relevant network interface. Usually "
+"the 'wan' interface should work for most users."
 msgstr ""
-"トリガを限定するには、適切なネットワーク インターフェースのみを追加してくださ"
-"い。"
+"トリガを限定するには、適切なインターフェースを選択してください。通常、 'wan' "
+"インターフェースがほとんどのユーザーに適してます。"
 
-msgid "Usually the 'wan' interface should work for most users."
-msgstr "通常、 'wan' インターフェースがほとんどのユーザーに適しています。"
+msgid "Transfer Options To Dnsmasq"
+msgstr "Dnsmasq の転送オプション"
 
 msgid "View Logfile"
 msgstr "ログファイルの確認"

+ 59 - 22
package/luci/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot

@@ -1,12 +1,19 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=UTF-8"
 
+msgid "-------"
+msgstr ""
+
 msgid "Advanced"
 msgstr ""
 
 msgid "Alternate Resolver List"
 msgstr ""
 
+msgid ""
+"Apply DNSCrypt-Proxy specific settings to the Dnsmasq configuration.<br />"
+msgstr ""
+
 msgid "Blacklist"
 msgstr ""
 
@@ -15,7 +22,7 @@ msgstr ""
 
 msgid ""
 "By default the DNSCrypt-Proxy startup will be triggered by ifup events of "
-"multiple network interfaces."
+"'All' available network interfaces.<br />"
 msgstr ""
 
 msgid "Configuration of the DNSCrypt-Proxy package."
@@ -23,13 +30,13 @@ msgstr ""
 
 msgid ""
 "Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS "
-"upstream timeouts with multiple DNSCrypt instances."
+"upstream timeouts with multiple DNSCrypt instances.<br />"
 msgstr ""
 
 msgid "Create Config File"
 msgstr ""
 
-msgid "Create custom config file"
+msgid "Create Custom Config File"
 msgstr ""
 
 msgid "DNS Query Logfile"
@@ -50,19 +57,25 @@ msgstr ""
 msgid "Disable IPv6 to speed up DNSCrypt-Proxy."
 msgstr ""
 
+msgid "Dnsmasq Options"
+msgstr ""
+
+msgid "Download the current resolver list from 'download.dnscrypt.org'."
+msgstr ""
+
 msgid "Edit DNSCrypt-Proxy Configuration"
 msgstr ""
 
 msgid "Edit Dnsmasq Configuration"
 msgstr ""
 
-msgid "Enable Caching to speed up DNSCcrypt-Proxy."
+msgid "Edit Resolvcrypt Configuration"
 msgstr ""
 
-msgid "Ephemeral Keys"
+msgid "Enable Caching to speed up DNSCcrypt-Proxy."
 msgstr ""
 
-msgid "Extra options"
+msgid "Ephemeral Keys"
 msgstr ""
 
 msgid "File Checksum"
@@ -76,7 +89,7 @@ msgid ""
 "online</a>"
 msgstr ""
 
-msgid "General options"
+msgid "General Options"
 msgstr ""
 
 msgid "IP Address"
@@ -88,10 +101,7 @@ msgstr ""
 msgid "Input file not found, please check your configuration."
 msgstr ""
 
-msgid "Instance options"
-msgstr ""
-
-msgid "Keep in mind to configure Dnsmasq as well."
+msgid "Instance Options"
 msgstr ""
 
 msgid "Local Cache"
@@ -106,16 +116,38 @@ msgid ""
 "is happening on the network."
 msgstr ""
 
-msgid "Name of the remote DNS service for resolving queries."
+msgid ""
+"Name of the remote DNS service for resolving queries incl. Location, DNSSEC- "
+"and NOLOG-Flag."
 msgstr ""
 
-msgid ""
-"Options for further tweaking in case the defaults are not suitable for you."
+msgid "No SSL support available.<br />"
+msgstr ""
+
+msgid "No default resolver list and no SSL support available.<br />"
 msgstr ""
 
 msgid "Overview"
 msgstr ""
 
+msgid "Please edit the file manually in the 'Advanced' section."
+msgstr ""
+
+msgid ""
+"Please install a 'libustream-ssl' library to download the current resolver "
+"list from 'download.dnscrypt.org'."
+msgstr ""
+
+msgid ""
+"Please install a resolver list to '/usr/share/dnscrypt-proxy/dnscrypt-"
+"resolvers.csv' to use this package."
+msgstr ""
+
+msgid ""
+"Please note: This may change the values for 'noresolv', 'resolvfile', "
+"'allservers' and the list 'server' settings."
+msgstr ""
+
 msgid "Port"
 msgstr ""
 
@@ -125,12 +157,7 @@ msgstr ""
 msgid "Refresh Resolver List"
 msgstr ""
 
-msgid "Resolver"
-msgstr ""
-
-msgid ""
-"SSL support not available, please install an libustream-ssl variant to use "
-"this package."
+msgid "Resolver (LOC/SEC/NOLOG)"
 msgstr ""
 
 msgid "Save"
@@ -142,6 +169,9 @@ msgstr ""
 msgid "Startup Trigger"
 msgstr ""
 
+msgid "The config file '/etc/resolv-crypt.conf' already exist.<br />"
+msgstr ""
+
 msgid "The listening port for DNS queries."
 msgstr ""
 
@@ -165,6 +195,11 @@ msgid ""
 "file (/etc/config/dhcp)."
 msgstr ""
 
+msgid ""
+"This form allows you to modify the content of the resolv-crypt configuration "
+"file (/etc/resolv-crypt.conf)."
+msgstr ""
+
 msgid "This form shows the content of the current DNSCrypt Resolver List."
 msgstr ""
 
@@ -178,10 +213,12 @@ msgid ""
 "server."
 msgstr ""
 
-msgid "To restrict the trigger, add only the relevant network interface(s)."
+msgid ""
+"To restrict the trigger, select only the relevant network interface. Usually "
+"the 'wan' interface should work for most users."
 msgstr ""
 
-msgid "Usually the 'wan' interface should work for most users."
+msgid "Transfer Options To Dnsmasq"
 msgstr ""
 
 msgid "View Logfile"

+ 12 - 4
package/luci/applications/luci-app-firewall/po/zh-cn/firewall.po

@@ -1,7 +1,15 @@
+#
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
 msgid ""
 msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
-"Last-Translator: Hing-wang Liao <kuoruan@gmail.com>\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"PO-Revision-Date: 2017-10-28 18:56+0800\n"
+"X-Generator: Gtranslator 2.91.7\n"
 
 msgid "%s in %s"
 msgstr "%s 位于 %s"
@@ -62,7 +70,7 @@ msgid ""
 "otherwise covered by the firewall framework. The commands are executed after "
 "each firewall restart, right after the default ruleset has been loaded."
 msgstr ""
-"自定义规则允许执行不属于防火墙框架的任意 iptables 命令。每次重启防火墙时,"
+"自定义规则允许执行不属于防火墙框架的任意 iptables 命令。每次重启防火墙时,"
 "在默认的规则运行后这些命令将立即执行。"
 
 msgid "Destination IP address"
@@ -384,7 +392,7 @@ msgid ""
 "forwarded traffic between different networks within the zone. <em>Covered "
 "networks</em> specifies which available networks are members of this zone."
 msgstr ""
-"本节定义 %q 的通用属性, <em>入站数据</em>和<em>出站数据</em>选项用于设置此区"
+"本节定义 %q 的通用属性,<em>入站数据</em>和<em>出站数据</em>选项用于设置此区"
 "域入站和出站流量的默认策略,<em>转发</em>选项描述该区域内不同网络之间的流量转"
 "发策略。<em>覆盖网络</em>指定从属于这个区域的网络。"
 
@@ -441,7 +449,7 @@ msgstr "星期"
 msgid ""
 "You may specify multiple by selecting \"-- custom --\" and then entering "
 "protocols separated by space."
-msgstr "也可以选择“--自定义--”来定义多个协议,在多个协议间需加空格。"
+msgstr "也可以选择“--自定义--”来定义多个协议,在多个协议间需加空格。"
 
 msgid "Zone %q"
 msgstr "区域 %q"

+ 137 - 144
package/luci/applications/luci-app-firewall/po/zh-tw/firewall.po

@@ -1,42 +1,42 @@
+#
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2014-05-21 12:45+0200\n"
-"Last-Translator: omnistack <omnistack@gmail.com>\n"
-"Language-Team: none\n"
-"Language: zh_TW\n"
-"MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Pootle 2.0.6\n"
+"PO-Revision-Date: 2017-10-28 18:56+0800\n"
+"X-Generator: Gtranslator 2.91.7\n"
 
 msgid "%s in %s"
-msgstr "%s 在 %s 之中"
+msgstr "%s 位於 %s"
 
 msgid "%s%s with %s"
-msgstr "%s%s  %s"
+msgstr "%s%s  %s"
 
 msgid "%s, %s in %s"
-msgstr " %s, %s 在 %s 之中"
+msgstr "%s, %s 位於 %s"
 
 msgid "(Unnamed Entry)"
-msgstr "(未命名的項目)"
+msgstr "(未命名條目)"
 
 msgid "(Unnamed Rule)"
-msgstr "(未命名的規則)"
+msgstr "(未命名規則)"
 
 msgid "(Unnamed SNAT)"
-msgstr "(未命名的來源NAT)"
+msgstr "(未命名 SNAT)"
 
 msgid "<var>%d</var> pkts. per <var>%s</var>"
-msgstr "<var>%d</var> 封包數. 每<var>%s</var>"
+msgstr "<var>%d</var> 資料包。每 <var>%s</var>"
 
 msgid "<var>%d</var> pkts. per <var>%s</var>, burst <var>%d</var> pkts."
-msgstr "<var>%d</var> 封包數. 每<var>%s</var>, 爆量 <var>%d</var> 封包數."
+msgstr "<var>%d</var> 資料包。每 <var>%s</var>,突發 <var>%d</var> 資料包。"
 
 msgid "<var>%s</var> and limit to %s"
-msgstr "<var>%s</var> 限制到 %s"
+msgstr "<var>%s</var> 限制到 %s"
 
 msgid "Action"
 msgstr "動作"
@@ -48,63 +48,63 @@ msgid "Add and edit..."
 msgstr "新增並編輯..."
 
 msgid "Advanced Settings"
-msgstr "階設定"
+msgstr "階設定"
 
 msgid "Allow forward from <em>source zones</em>:"
-msgstr "允許從<em>source zones</em>轉發:"
+msgstr "允許從<em>源區域</em>轉發:"
 
 msgid "Allow forward to <em>destination zones</em>:"
-msgstr "允許從 <em>destination zones</em>轉發:"
+msgstr "允許轉發到<em>目標區域</em>:"
 
 msgid "Any"
-msgstr "任"
+msgstr "任"
 
 msgid "Covered networks"
-msgstr "覆蓋網路"
+msgstr "覆蓋網路"
 
 msgid "Custom Rules"
-msgstr "自訂的規則群"
+msgstr "自定義規則"
 
 msgid ""
 "Custom rules allow you to execute arbitrary iptables commands which are not "
 "otherwise covered by the firewall framework. The commands are executed after "
 "each firewall restart, right after the default ruleset has been loaded."
 msgstr ""
-"自定義規則允許你執行這是不以其他方式涉及的防火牆框架arbitrary的iptables命令。"
-"該命令是每個防火牆重啟後執行,默認規則集已經加載之後。"
+"自定義規則允許您執行不屬於防火牆框架的任意 iptables 命令。每次重啟防火牆時,"
+"在預設的規則執行後這些命令將立即執行。"
 
 msgid "Destination IP address"
-msgstr "目標IP位址"
+msgstr "目標 IP 位址"
 
 msgid "Destination address"
 msgstr "目標位址"
 
 msgid "Destination port"
-msgstr "目埠"
+msgstr "目埠"
 
 msgid "Destination zone"
-msgstr "目標區"
+msgstr "目標區"
 
 msgid "Do not rewrite"
-msgstr "不要改寫"
+msgstr "不寫"
 
 msgid "Drop invalid packets"
-msgstr "丟棄不正確的封包群"
+msgstr "丟棄無效資料包"
 
 msgid "Enable"
 msgstr "啟用"
 
 msgid "Enable NAT Loopback"
-msgstr "啓用NAT回傳"
+msgstr "啟用 NAT 環回"
 
 msgid "Enable SYN-flood protection"
-msgstr "啟用SYN-flood攻擊的保護"
+msgstr "啟用 SYN-flood 防禦"
 
 msgid "Enable logging on this zone"
-msgstr "啟用日誌記錄這區"
+msgstr "啟用此區域的日誌記錄"
 
 msgid "External IP address"
-msgstr "外部IP位址"
+msgstr "外部 IP 位址"
 
 msgid "External port"
 msgstr "外部埠"
@@ -113,22 +113,22 @@ msgid "External zone"
 msgstr "外部區域"
 
 msgid "Extra arguments"
-msgstr "額外參數"
+msgstr "附加引數"
 
 msgid "Firewall"
 msgstr "防火牆"
 
 msgid "Firewall - Custom Rules"
-msgstr "防火牆-自訂規則"
+msgstr "防火牆 - 自定義規則"
 
 msgid "Firewall - Port Forwards"
-msgstr "防火牆-埠轉發"
+msgstr "防火牆 - 埠轉發"
 
 msgid "Firewall - Traffic Rules"
-msgstr "防火牆-流量規則"
+msgstr "防火牆 - 通訊規則"
 
 msgid "Firewall - Zone Settings"
-msgstr "防火牆-區域設定"
+msgstr "防火牆 - 區域設定"
 
 msgid "Force connection tracking"
 msgstr "強制連線追蹤"
@@ -140,19 +140,19 @@ msgid "Forward to"
 msgstr "轉發到"
 
 msgid "Friday"
-msgstr ""
+msgstr "星期五"
 
 msgid "From %s in %s"
-msgstr "從%s在%s"
+msgstr "來自 %s 位於 %s"
 
 msgid "From %s in %s with source %s"
-msgstr "從%s在%s與來源%"
+msgstr "來自 %s 位於 %s 源於 %s"
 
 msgid "From %s in %s with source %s and %s"
-msgstr "從%s在%s與來源%s和%s"
+msgstr "來自 %s 位於 %s 源埠 %s 源 MAC %s"
 
 msgid "General Settings"
-msgstr "一般設定"
+msgstr "基本設定"
 
 msgid "IPv4"
 msgstr "IPv4"
@@ -161,205 +161,205 @@ msgid "IPv4 and IPv6"
 msgstr "IPv4 和 IPv6"
 
 msgid "IPv4 only"
-msgstr "僅IPv4"
+msgstr "僅 IPv4"
 
 msgid "IPv6"
 msgstr "IPv6"
 
 msgid "IPv6 only"
-msgstr "僅IPv6"
+msgstr "僅 IPv6"
 
 msgid "Input"
-msgstr "入"
+msgstr "入站資料"
 
 msgid "Inter-Zone Forwarding"
-msgstr "內部-區轉發"
+msgstr "埠觸發"
 
 msgid "Internal IP address"
-msgstr "內部的IP位址"
+msgstr "內部 IP 位址"
 
 msgid "Internal port"
-msgstr "內部"
+msgstr "內部埠"
 
 msgid "Internal zone"
-msgstr "內部區"
+msgstr "內部區"
 
 msgid "Limit log messages"
-msgstr "限制日誌訊息數"
+msgstr "限制日誌訊"
 
 msgid "MSS clamping"
-msgstr "MSS調節"
+msgstr "MSS 鉗制"
 
 msgid "Masquerading"
-msgstr "偽裝"
+msgstr "IP 動態偽裝"
 
 msgid "Match"
-msgstr "匹配"
+msgstr "匹配規則"
 
 msgid "Match ICMP type"
-msgstr "匹配的ICMP型態"
+msgstr "匹配 ICMP 型別"
 
 msgid "Match forwarded traffic to the given destination port or port range."
-msgstr "匹配已轉發的流量到給定的目標埠或者範圍埠"
+msgstr "匹配指定目標埠或目標埠範圍的轉發流量。"
 
 msgid ""
 "Match incoming traffic directed at the given destination port or port range "
 "on this host"
-msgstr "匹配輸入的流量到主機上給定的目標埠或者範圍埠"
+msgstr "匹配指向此主機上指定目標埠或目標埠範圍的入站流量。"
 
 msgid ""
 "Match incoming traffic originating from the given source port or port range "
 "on the client host."
-msgstr "從給定的來源埠或範圍埠在客戶端主機上的匹配傳入流量始發。"
+msgstr "匹配來自客戶端主機上指定源埠或源埠範圍的入站流量。"
 
 msgid "Monday"
-msgstr ""
+msgstr "星期一"
 
 msgid "Month Days"
-msgstr ""
+msgstr "日期"
 
 msgid "Name"
-msgstr "名"
+msgstr "名"
 
 msgid "New SNAT rule"
-msgstr "新的來源NAT規則"
+msgstr "新建 SNAT 規則"
 
 msgid "New forward rule"
-msgstr "新轉發規則"
+msgstr "新轉發規則"
 
 msgid "New input rule"
-msgstr "新入規則"
+msgstr "新建進入規則"
 
 msgid "New port forward"
-msgstr "新轉發"
+msgstr "新建埠轉發"
 
 msgid "New source NAT"
-msgstr "新來源埠"
+msgstr "新建 Source NAT"
 
 msgid "Only match incoming traffic directed at the given IP address."
-msgstr "僅匹配傳入流量予給定的IP地址."
+msgstr "僅匹配指定目的 IP 位址的入站流量。"
 
 msgid "Only match incoming traffic from these MACs."
-msgstr "僅匹配從這些MAC群的傳入流量."
+msgstr "僅匹配來自這些 MAC 的入站流量。"
 
 msgid "Only match incoming traffic from this IP or range."
-msgstr "僅匹配從這個IP或範圍IP給傳入流量."
+msgstr "僅匹配來自此 IP 或 IP 範圍的入站流量。"
 
 msgid ""
 "Only match incoming traffic originating from the given source port or port "
 "range on the client host"
-msgstr "僅匹配從給定的來源埠或範圍埠的客戶端主機上給傳入流量."
+msgstr "僅匹配源自客戶端主機上給定源埠或源埠範圍的入站流量。"
 
 msgid "Open ports on router"
-msgstr "開啟路由器上的號群"
+msgstr "開啟路由器埠"
 
 msgid "Other..."
 msgstr "其它..."
 
 msgid "Output"
-msgstr "出"
+msgstr "出站資料"
 
 msgid "Passes additional arguments to iptables. Use with care!"
-msgstr "通行額外的參數到 iptables上. 使用要小心!"
+msgstr "傳遞到 iptables 的額外引數。小心使用!"
 
 msgid "Port Forwards"
-msgstr "埠轉"
+msgstr "埠轉"
 
 msgid ""
 "Port forwarding allows remote computers on the Internet to connect to a "
 "specific computer or service within the private LAN."
-msgstr "埠轉發允許遠端網際網路上的電腦來連接到在私人區網內指定的電腦或服務."
+msgstr "埠轉發允許 Internet 上的遠端計算機連線到內部網路中的特定計算機或服務。"
 
 msgid "Protocol"
-msgstr "協"
+msgstr "協"
 
 msgid ""
 "Redirect matched incoming traffic to the given port on the internal host"
-msgstr "重導向已匹配傳入流量到內部主機上的指定埠"
+msgstr "重定向匹配的入站流量到內部主機的埠"
 
 msgid "Redirect matched incoming traffic to the specified internal host"
-msgstr "重導向已匹配傳入流量到內部主機上"
+msgstr "重定向匹配的入站流量到指定的內部主機"
 
 msgid "Restart Firewall"
-msgstr ""
+msgstr "重啟防火牆"
 
 msgid "Restrict Masquerading to given destination subnets"
-msgstr "限制偽裝到已給予的目標子網"
+msgstr "限制 IP 動態偽裝的目標子網"
 
 msgid "Restrict Masquerading to given source subnets"
-msgstr "限制偽裝到已給予源子網"
+msgstr "限制 IP 動態偽裝的源子網"
 
 msgid "Restrict to address family"
-msgstr "限制位址"
+msgstr "限制位址"
 
 msgid "Rewrite matched traffic to the given address."
-msgstr "改寫已匹配的流量到給定的位址."
+msgstr "將匹配流量的源位址改寫成指定位址。"
 
 msgid ""
 "Rewrite matched traffic to the given source port. May be left empty to only "
 "rewrite the IP address."
-msgstr "改寫已匹配的流量到給定的來源埠. 或許可以保留空白到唯一改寫的IP位址."
+msgstr "將匹配流量的源埠改寫成指定埠。留空只改寫 IP 位址。"
 
 msgid "Rewrite to source %s"
-msgstr "改寫到來源 %s"
+msgstr "源位址改寫成 %s"
 
 msgid "Rewrite to source %s, %s"
-msgstr "改寫到來源 %s, %s"
+msgstr "源位址改寫成 %s, %s"
 
 msgid "SNAT IP address"
-msgstr "來源NAT IP 位址"
+msgstr "SNAT IP 位址"
 
 msgid "SNAT port"
-msgstr "來源NAT IP 埠"
+msgstr "SNAT 埠"
 
 msgid "Saturday"
-msgstr ""
+msgstr "星期六"
 
 msgid "Source IP address"
-msgstr "源 IP 位址"
+msgstr "源 IP 位址"
 
 msgid "Source MAC address"
-msgstr "來源 MAC硬體位址"
+msgstr "源 MAC 位址"
 
 msgid "Source NAT"
-msgstr "來源NAT"
+msgstr "Source NAT"
 
 msgid ""
 "Source NAT is a specific form of masquerading which allows fine grained "
 "control over the source IP used for outgoing traffic, for example to map "
 "multiple WAN addresses to internal subnets."
 msgstr ""
-"來源NAT是偽裝的一種特殊形式,它允許對輸出流量的來源IP進行精細控制, 例如要對映"
-"到多個WAN位址到內部子網路群上."
+"Source NAT 是一種特殊形式的封包偽裝,它允許精細的控制傳出流量的源 IP,例如:"
+"將多個 WAN 位址對映到內部子網。"
 
 msgid "Source address"
-msgstr "源位址"
+msgstr "源位址"
 
 msgid "Source port"
-msgstr "源埠"
+msgstr "源埠"
 
 msgid "Source zone"
-msgstr "源區"
+msgstr "源區"
 
 msgid "Start Date (yyyy-mm-dd)"
-msgstr ""
+msgstr "開始日期(yyyy-mm-dd)"
 
 msgid "Start Time (hh:mm:ss)"
-msgstr ""
+msgstr "開始時間(hh:mm:ss)"
 
 msgid "Stop Date (yyyy-mm-dd)"
-msgstr ""
+msgstr "停止日期(yyyy-mm-dd)"
 
 msgid "Stop Time (hh:mm:ss)"
-msgstr ""
+msgstr "停止時間(hh:mm:ss)"
 
 msgid "Sunday"
-msgstr ""
+msgstr "星期日"
 
 msgid ""
 "The firewall creates zones over your network interfaces to control network "
 "traffic flow."
-msgstr "防火牆對你的網路建立區域以便控制網路流向."
+msgstr "防火牆通過在網路介面上建立區域來控制網路流量。"
 
 msgid ""
 "The options below control the forwarding policies between this zone (%s) and "
@@ -369,22 +369,21 @@ msgid ""
 "rule is <em>unidirectional</em>, e.g. a forward from lan to wan does "
 "<em>not</em> imply a permission to forward from wan to lan as well."
 msgstr ""
-"下列的選項控制這區域(%s)和其它區轉發策略.<em>目地區</em> 覆蓋<strong>從 %q 起"
-"源的 </strong>已轉發的流量.<em>來源區</em>匹配從其它區域<strong>針對 %q</"
-"strong>的轉發流量.轉發規則是<em>單向的</em>."
+"以下選項可以控制區域(%s)和其它區域間的轉發規則。<em>目標區域</em>接收"
+"<strong>源自 %q</strong> 的轉發流量。<em>源區域</em>匹配從<strong>目標為 %q</"
+"strong> 的區域的需轉發流量。轉發規則的作用是<em>單向</em>的,例如:一條允許"
+"從 lan 到 wan 的轉發規則並不隱含有允許相反方向從 wan 到 lan 的流量轉發。"
 
 msgid ""
 "This page allows you to change advanced properties of the port forwarding "
 "entry. In most cases there is no need to modify those settings."
-msgstr ""
-"這頁面允許你修改這個轉發埠項目的進階選項. 在大多數情況下,不需要修改這些設定."
+msgstr "本頁面可以更改埠轉發的高階設定。大多數情況下,不需要更改這些設定。"
 
 msgid ""
 "This page allows you to change advanced properties of the traffic rule "
 "entry, such as matched source and destination hosts."
-msgstr "這頁面允許改變進階流量規則項目的進階設置, 例如匹配的來源和目標主機."
+msgstr "本頁面可以更改通訊規則的高階設定,比如:需匹配的源主機和目標主機。"
 
-#, fuzzy
 msgid ""
 "This section defines common properties of %q. The <em>input</em> and "
 "<em>output</em> options set the default policies for traffic entering and "
@@ -392,91 +391,91 @@ msgid ""
 "forwarded traffic between different networks within the zone. <em>Covered "
 "networks</em> specifies which available networks are members of this zone."
 msgstr ""
-"本節定義 %q 的通用屬性.在<em>輸入</em>和<em>輸出</em>選項設置交通進出的默認策"
-"略,而在<em>轉發</em>的選項描述在這區域內不同網路的轉發流量.<em>已覆蓋的網路群"
-"</em>指定特定區域成員可以是被運用的網路."
+"本節定義 %q 的通用屬性,<em>入站資料</em>和<em>出站資料</em>選項用於設定此區"
+"域入站和出站流量的預設策略,<em>轉發</em>選項描述該區域內不同網路之間的流量轉"
+"發策略。<em>覆蓋網路</em>指定從屬於這個區域的網路。"
 
 msgid "Thursday"
-msgstr ""
+msgstr "星期四"
 
 msgid "Time in UTC"
-msgstr ""
+msgstr "UTC 時間"
 
 msgid "To %s at %s on <var>this device</var>"
-msgstr "到%s在上的<var>此設備</var>的%s的"
+msgstr "到 %s 在 %s 位於<var>本裝置</var>"
 
 msgid "To %s in %s"
-msgstr "到%s在%s"
+msgstr "到 %s 位於 %s"
 
 msgid "To %s on <var>this device</var>"
-msgstr "到%s上的<var>此設備</var>的"
+msgstr "到 %s 位於<var>本裝置</var>"
 
 msgid "To %s, %s in %s"
-msgstr "到%s,%s的%s中"
+msgstr "到 %s, %s 位於 %s"
 
 msgid "To source IP"
-msgstr "來源IP"
+msgstr "到源 IP"
 
 msgid "To source port"
-msgstr "源埠"
+msgstr "源埠"
 
 msgid "Traffic Rules"
-msgstr "流量規則"
+msgstr "通訊規則"
 
 msgid ""
 "Traffic rules define policies for packets traveling between different zones, "
 "for example to reject traffic between certain hosts or to open WAN ports on "
 "the router."
 msgstr ""
-"流量規則定義在不同區域之間竄行封包的策略,例如要拒絕特定主機群的流量或者要打開"
-"路由器上WAN埠。"
+"通訊規則定義了不同區域間的資料包傳輸策略,例如:拒絕一些主機之間的通訊,開放"
+"路由器 WAN 上的埠。"
 
 msgid "Tuesday"
-msgstr ""
+msgstr "星期二"
 
 msgid "Via %s"
-msgstr "通過%s的"
+msgstr "通過 %s"
 
 msgid "Via %s at %s"
-msgstr "通過%s在%s的"
+msgstr "通過 %s 在 %s"
 
 msgid "Wednesday"
-msgstr ""
+msgstr "星期三"
 
 msgid "Week Days"
-msgstr ""
+msgstr "星期"
 
 msgid ""
 "You may specify multiple by selecting \"-- custom --\" and then entering "
 "protocols separated by space."
-msgstr "你可以以選擇\"-- 自訂 --\"並且打入由空格分開的協定來做多重指定."
+msgstr "您也可以選擇“--自定義--”來定義多個協議,在多個協議間需加空格。"
 
 msgid "Zone %q"
 msgstr "區域 %q"
 
 msgid "Zone ⇒ Forwardings"
-msgstr "區域 ⇒ 轉發進行"
+msgstr "區域 ⇒ 轉發"
 
 msgid "Zones"
-msgstr "域"
+msgstr "域"
 
 msgid "accept"
 msgstr "接受"
 
 msgid "any"
-msgstr "任意"
+msgstr "所有"
 
 msgid "any host"
-msgstr "任意埠"
+msgstr "所有主機"
 
 msgid "any router IP"
-msgstr "任意路由器IP"
+msgstr "所有路由 IP"
 
 msgid "any zone"
-msgstr "任意區"
+msgstr "所有區域"
 
 msgid "don't track"
-msgstr "不要追蹤"
+msgstr "不蹤"
 
 msgid "drop"
 msgstr "丟棄"
@@ -485,10 +484,4 @@ msgid "reject"
 msgstr "拒絕"
 
 msgid "traffic"
-msgstr ""
-
-#~ msgid "-- Please choose --"
-#~ msgstr "-- 請選擇 --"
-
-#~ msgid "-- custom --"
-#~ msgstr "-- 自訂 --"
+msgstr "通訊"

+ 3 - 3
package/luci/applications/luci-app-freifunk-policyrouting/po/zh-cn/freifunk-policyrouting.po

@@ -33,7 +33,7 @@ msgid ""
 "connection as a fallback. If you do not want this and instead block that "
 "traffic then you should select this option."
 msgstr ""
-"如果没有缺省的mesh网络路由,则使用属于防火墙区域内的Internet连接作为备用路由。如果你不想要这个,而是阻止该流量,那么你应该选择此选项。"
+"如果没有缺省的mesh网络路由,则使用属于防火墙区域内的Internet连接作为备用路由。如果您不想要这个,而是阻止该流量,那么您应该选择此选项。"
 
 msgid ""
 "If your own gateway is not available then fallback to the mesh default "
@@ -53,5 +53,5 @@ msgid ""
 "'Ego Mode'). Your own traffic is then sent via your internet connection "
 "while traffic originating from the mesh will use another gateway in the mesh."
 msgstr ""
-"这些页面用于某些防火墙区域设置策略路由。这是非常有用的,如果你需要自己使用自己的互联网连接,但你不想把它分享给其他人(这就是为什么它也被称为“自我模式'"
-")。你自己的流量,通过你的互联网连接发送,而mesh中的数据包将使用mesh中另外的网关。"
+"这些页面用于某些防火墙区域设置策略路由。这是非常有用的,如果您需要自己使用自己的互联网连接,但您不想把它分享给其他人(这就是为什么它也被称为“自我模式'"
+")。您自己的流量,通过您的互联网连接发送,而mesh中的数据包将使用mesh中另外的网关。"

+ 1 - 0
package/luci/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd

@@ -3,6 +3,7 @@
 #-- Licensed to the public under the GNU General Public License v2.
 . /lib/functions/network.sh
 
+[ "$(uci -q get fwknopd.@access[0].KEY)" != "CHANGEME" ] && exit 0
 uci batch <<EOF
 	add ucitrack fwknopd
 	set ucitrack.@fwknopd[-1].init=fwknopd

+ 9 - 9
package/luci/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh

@@ -4,23 +4,23 @@ if [ "$1" != "" ]; then
 entry_num=$1
 fi
 
-key_base64=$(uci get fwknopd.@access[$entry_num].KEY_BASE64)
-key=$(uci get fwknopd.@access[$entry_num].KEY)
-hmac_key_base64=$(uci get fwknopd.@access[$entry_num].HMAC_KEY_BASE64)
-hmac_key=$(uci get fwknopd.@access[$entry_num].HMAC_KEY)
+key_base64=$(uci -q get fwknopd.@access[$entry_num].KEY_BASE64)
+key=$(uci -q get fwknopd.@access[$entry_num].KEY)
+hmac_key_base64=$(uci -q get fwknopd.@access[$entry_num].HMAC_KEY_BASE64)
+hmac_key=$(uci -q get fwknopd.@access[$entry_num].HMAC_KEY)
 
-if [ $key_base64 != "" ]; then
+if [ "$key_base64" != "" ]; then
 qr="KEY_BASE64:$key_base64"
 fi
-if [ $key != "" ]; then
+if [ "$key" != "" ]; then
 qr="$qr KEY:$key"
 
 fi
-if [ $hmac_key_base64 != "" ]; then
+if [ "$hmac_key_base64" != "" ]; then
 qr="$qr HMAC_KEY_BASE64:$hmac_key_base64"
 fi
-if [ $hmac_key != "" ]; then
+if [ "$hmac_key" != "" ]; then
 qr="$qr HMAC_KEY:$hmac_key"
 fi
 
-qrencode -o - "$qr"
+qrencode -t svg -I -o - "$qr"

+ 3 - 3
package/luci/applications/luci-app-meshwizard/po/zh-cn/meshwizard.po

@@ -20,7 +20,7 @@ msgid "Channel"
 msgstr "频道"
 
 msgid "Check this to protect your LAN from other nodes or clients"
-msgstr "选择此项,隔离其他节点或客户端的攻击来保护的局域网"
+msgstr "选择此项,隔离其他节点或客户端的攻击来保护的局域网"
 
 msgid "Cleanup config"
 msgstr "清空配置"
@@ -76,14 +76,14 @@ msgstr "保护LAN口"
 
 msgid ""
 "Select this to allow others to use your connection to access the internet."
-msgstr "选择这项来允许其它程序用这个连接来接入因特网"
+msgstr "选择这项来允许其它程序用这个连接来接入因特网"
 
 #, fuzzy
 msgid "Send router advertisements on this device."
 msgstr "在这个设备上发送路由广播"
 
 msgid "Share your internet connection"
-msgstr "分享的Internet连接"
+msgstr "分享的Internet连接"
 
 msgid ""
 "The IP range from which clients are assigned ip addresses (e.g. "

+ 5 - 1
package/luci/applications/luci-app-minidlna/luasrc/model/cbi/minidlna.lua

@@ -91,6 +91,10 @@ s:taboption("advanced", Flag, "enable_tivo", translate("Enable TIVO:"),
 	translate("Set this to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO."))
 o.rmempty = true
 
+s:taboption("advanced", Flag, "wide_links", translate("Allow wide links:"),
+	translate("Set this to allow serving content outside the media root (via symlinks)."))
+o.rmempty = true
+
 o = s:taboption("advanced", Flag, "strict_dlna", translate("Strict to DLNA standard:"),
 	translate("Set this to strictly adhere to DLNA standards. This will allow server-side downscaling of very large JPEG images, which may hurt JPEG serving performance on (at least) Sony DLNA products."))
 o.rmempty = true
@@ -126,7 +130,7 @@ o:value("P", translate("Pictures"))
 
 
 s:taboption("general", DynamicList, "media_dir", translate("Media directories:"),
-	translate("Set this to the directory you want scanned. If you want to restrict the directory to a specific content type, you can prepend the type ('A' for audio, 'V' for video, 'P' for images), followed by a comma, to the directory (eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."))
+	translate("Set this to the directory you want scanned. If you want to restrict the directory to a specific content type, you can prepend the type ('A' for audio, 'V' for video, 'P' for images), followed by a comma, to the directory (eg. A,/mnt/media/Music). Multiple directories can be specified."))
 
 
 o = s:taboption("general", DynamicList, "album_art_names", translate("Album art names:"),

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/ca/minidlna.po

@@ -17,6 +17,9 @@ msgstr "Ajusts avançats"
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -112,6 +115,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -131,7 +138,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/cs/minidlna.po

@@ -17,6 +17,9 @@ msgstr "Pokročilé nastavení"
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -114,6 +117,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -133,7 +140,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/de/minidlna.po

@@ -17,6 +17,9 @@ msgstr "Erweiterte Einstellungen"
 msgid "Album art names:"
 msgstr "Dateinamen für Cover-Bilder:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Angekündigte Modellnummer:"
 
@@ -122,6 +125,10 @@ msgstr ""
 "Diesen Wert setzen um das Verzeichnis zu bestimmen in dem miniDLNA seine "
 "Protokolldateien ablegt."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -149,7 +156,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Spezifiziert die zu durchsuchenden Medienverzeichnisse. Durch Voranstellung "
 "eines Buchstaben gefolgt von einem Komma kann ein Verzeichnis auf einen "

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/el/minidlna.po

@@ -14,6 +14,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -109,6 +112,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -128,7 +135,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 9 - 2
package/luci/applications/luci-app-minidlna/po/en/minidlna.po

@@ -14,6 +14,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr "Album art names:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Announced model number:"
 
@@ -120,6 +123,10 @@ msgstr ""
 "Set this if you would like to specify the directory where you want MiniDLNA "
 "to store its log file."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -145,12 +152,12 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "Specify the path to the MiniSSDPd socket."

+ 10 - 3
package/luci/applications/luci-app-minidlna/po/es/minidlna.po

@@ -17,6 +17,9 @@ msgstr "Configuración avanzada"
 msgid "Album art names:"
 msgstr "Imágenes de álbumes:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Número de modelo declarado:"
 
@@ -120,6 +123,10 @@ msgid ""
 "to store its log file."
 msgstr "Indicar el directorio donde MiniDLNA guardará su archivo de registro."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr "Inotify descubrirá automáticamente nuevos archivos."
@@ -142,12 +149,12 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Directorio a explorar. Si quiere restringir el directorio a un contenido "
 "específico puede añadir el tipo ('A' par audio, 'V' para vídeo o 'P' para "
-"imágenes), seguido por una coma al nombre del directorio (ej. media_dir=A,/"
-"mnt/media/Music). Se puede establecer varios directorios."
+"imágenes), seguido por una coma al nombre del directorio (ej. A,/mnt/media/"
+"Music). Se puede establecer varios directorios."
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "Camino al socket de MiniSSDPd."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/fr/minidlna.po

@@ -14,6 +14,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -109,6 +112,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -128,7 +135,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/he/minidlna.po

@@ -14,6 +14,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -109,6 +112,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -128,7 +135,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 9 - 2
package/luci/applications/luci-app-minidlna/po/hu/minidlna.po

@@ -17,6 +17,9 @@ msgstr "Haladó beállítások"
 msgid "Album art names:"
 msgstr "Borító album nevek:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Közölt modellszám:"
 
@@ -122,6 +125,10 @@ msgstr ""
 "Áttítsa be, ha meg szeretné adni azt a könyvtárat, ahová a MiniDLNA a napló "
 "állományait mentse."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -147,12 +154,12 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Állítsa be a vizsgálandó könyvtárra. Ha a könyvtárat egy adott típusú "
 "tartalom szerint szeretné korlátozni, akkor a neve előtt vesszővel "
 "elválasztva megadhatja a típust ('A' az audió, 'V' a videó, 'P' a képek "
-"számára. pl.: media_dir=A,/mnt/media/Music). Több könyvtár is megadható."
+"számára. pl.: A,/mnt/media/Music). Több könyvtár is megadható."
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "A MiniSSDPd socket elérési útját határozza meg."

+ 14 - 9
package/luci/applications/luci-app-minidlna/po/it/minidlna.po

@@ -17,6 +17,9 @@ msgstr "Opzioni avanzate"
 msgid "Album art names:"
 msgstr "Nome Copertina Album:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Numero modello annunciato:"
 
@@ -101,8 +104,7 @@ msgid ""
 "Serial number the miniDLNA daemon will report to clients in its XML "
 "description."
 msgstr ""
-"Serial number che il server miniDLNA invierà ai client nella descrizione "
-"XML."
+"Serial number che il server miniDLNA invierà ai client nella descrizione XML."
 
 msgid ""
 "Set this if you want to customize the name that shows up on your clients."
@@ -122,6 +124,10 @@ msgstr ""
 "Impostare questa opzione se si desidera specificare la cartella in cui si "
 "desidera che MiniDLNA archivi i propri file di registro."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -132,8 +138,8 @@ msgid ""
 "Set this to enable support for streaming .jpg and .mp3 files to a TiVo "
 "supporting HMO."
 msgstr ""
-"Impostare questo per abilitare il supporto per lo streaming di file .jpg e "
-".mp3 ad un supporto TiVo che supporta HMO."
+"Impostare questo per abilitare il supporto per lo streaming di file .jpg e ."
+"mp3 ad un supporto TiVo che supporta HMO."
 
 msgid ""
 "Set this to strictly adhere to DLNA standards. This will allow server-side "
@@ -149,13 +155,13 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Impostare la cartella che si desidera sottoporre a scansione. Se si desidera "
 "limitare la directory per un tipo di contenuto specifico, è possibile "
 "anteporre il tipo ('A' per l'audio, 'V' per video, 'P' per le immagini), "
-"seguito da una virgola, nella cartella (es. media_dir = A,/mnt/media/Music). "
-"Cartelle multiple possono essere specificate."
+"seguito da una virgola, nella cartella (es. A,/mnt/media/Music). Cartelle "
+"multiple possono essere specificate."
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "Specificare il percorso del socket MiniSSDPd."
@@ -170,8 +176,7 @@ msgid ""
 "The miniDLNA service is active, serving %d audio, %d video and %d image "
 "files."
 msgstr ""
-"Il servizio miniDLNA è attivo, servo %d audio, %d video, %d file di "
-"immagine."
+"Il servizio miniDLNA è attivo, servo %d audio, %d video, %d file di immagine."
 
 msgid "The miniDLNA service is not running."
 msgstr "Il servizio miniDLNA non è in esecuzione."

+ 20 - 10
package/luci/applications/luci-app-minidlna/po/ja/minidlna.po

@@ -1,21 +1,25 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2012-04-10 09:10+0200\n"
-"Last-Translator: Kentaro <kentaro.matsuyama@gmail.com>\n"
+"Project-Id-Version: \n"
+"PO-Revision-Date: 2017-10-25 22:33+0900\n"
+"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n"
 "Language-Team: none\n"
 "Language: ja\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Pootle 2.0.4\n"
+"X-Generator: Poedit 2.0.4\n"
+"POT-Creation-Date: \n"
 
 msgid "Advanced Settings"
 msgstr "詳細設定"
 
 msgid "Album art names:"
-msgstr "アルバムアートワーク・ファイル名:"
+msgstr "アルバムアートワーク ファイル名:"
+
+msgid "Allow wide links:"
+msgstr "ワイド リンクの許可:"
 
 msgid "Announced model number:"
 msgstr "通知するモデル番号:"
@@ -116,6 +120,12 @@ msgid ""
 "to store its log file."
 msgstr "miniDLNAが書きだすログファイルのディレクトリパスを設定してください。"
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+"シンボリックリンクを通してメディア ルート外のコンテンツの提供を許可するには、"
+"このオプションを有効にしてください。"
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -143,13 +153,13 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "miniDLNA がスキャンするディレクトリを設定します。ディレクトリを特定のコンテン"
 "ツに制限したい場合、タイプをパスのはじめに付け、コンマ記号で区切ることで設定"
 "できます ('A'=オーディオ \"audio\", 'V'=ビデオ \"video\", 'P'=写真 \"images"
-"\", 例: media_dir=A,/mnt/media/Music)。また、このオプションは複数のディレクト"
-"リを登録可能です。"
+"\", 例: A,/mnt/media/Music)。また、このオプションは複数のディレクトリを登録可"
+"能です。"
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "MiniSSDPd ソケットのパスを設定してください。"
@@ -164,8 +174,8 @@ msgid ""
 "The miniDLNA service is active, serving %d audio, %d video and %d image "
 "files."
 msgstr ""
-"miniDLNA サービスは稼働中です。%d 個の音楽ファイル , %d 個のビデオファイル, %"
-"d 個の写真ファイルを認識しています。"
+"miniDLNA サービスは稼働中です。%d 個の音楽ファイル , %d 個のビデオファイル, "
+"%d 個の写真ファイルを認識しています。"
 
 msgid "The miniDLNA service is not running."
 msgstr "miniDLNA サービスは稼働していません。"

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/ms/minidlna.po

@@ -13,6 +13,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -108,6 +111,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -127,7 +134,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 12 - 5
package/luci/applications/luci-app-minidlna/po/no/minidlna.po

@@ -17,6 +17,9 @@ msgstr "Avanserte Innstillinger"
 msgid "Album art names:"
 msgstr "Albumbilder navn:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Annonsert modellnummer:"
 
@@ -60,8 +63,8 @@ msgid ""
 "MiniDLNA is server software with the aim of being fully compliant with DLNA/"
 "UPnP-AV clients."
 msgstr ""
-"MiniDLNA er serverprogramvare som sikter på å være fullt kompatibel med DLNA"
-"/UPnP-AV klienter."
+"MiniDLNA er serverprogramvare som sikter på å være fullt kompatibel med DLNA/"
+"UPnP-AV klienter."
 
 msgid ""
 "Model number the miniDLNA daemon will report to clients in its XML "
@@ -121,6 +124,10 @@ msgstr ""
 "Her kan en definere hvilken katalog som MiniDLNA skal bruke til å lagre log "
 "filen i."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -147,12 +154,12 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Her kan en velge den katalogen som blir skannet. Om du ønsker å begrense "
 "katalogen til en spesifikk innholdstype kan sette en bokstav foran ('A' for "
-"lyd, 'V' for video, 'P' for bilder), etterfulgt av et komma og katalogen. "
-"(f.eks media_dir=A,/mnt/media/Musikk). Flere kataloger kan brukes."
+"lyd, 'V' for video, 'P' for bilder), etterfulgt av et komma og katalogen. (f."
+"eks A,/mnt/media/Musikk). Flere kataloger kan brukes."
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "Angi banen til MiniSSDPd socketen."

+ 10 - 3
package/luci/applications/luci-app-minidlna/po/pl/minidlna.po

@@ -18,6 +18,9 @@ msgstr "Ustawienia zaawansowane"
 msgid "Album art names:"
 msgstr "Nazwy okładek albumów:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Rozgłaszany model:"
 
@@ -120,6 +123,10 @@ msgstr ""
 "Ustaw to, jeśli chcesz podać folder, w którym miniDLNA powinien przechowywać "
 "dzienniki (logi)."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -146,12 +153,12 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Ustaw tu folder, który chcesz skanować. Jeśli chcesz ograniczyć folder do "
 "konkretnego typu zawartości, możesz poprzedzić ścieżkę typem (\"A\" dla "
-"audio, \"V\" dla wideo, \"P\" dla obrazów) i przecinkiem (np media_dir=A,/"
-"mnt/media/Muzyka). Możesz podać kilka folderów."
+"audio, \"V\" dla wideo, \"P\" dla obrazów) i przecinkiem (np A,/mnt/media/"
+"Muzyka). Możesz podać kilka folderów."
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "Podaj ścieżkę do gniazda (socketu) miniSSDPd."

+ 10 - 3
package/luci/applications/luci-app-minidlna/po/pt-br/minidlna.po

@@ -14,6 +14,9 @@ msgstr "Configuração Avançada"
 msgid "Album art names:"
 msgstr "Nomes do Álbum artistico: "
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "numero de modelo anunciado:"
 
@@ -121,6 +124,10 @@ msgstr ""
 "Defina esta opção se você gostaria de especificar o diretório onde você "
 "deseja MiniDLNA para armazenar seu arquivo de log."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -148,13 +155,13 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Defina esta opção para o diretório que você deseja verificar. Se você quiser "
 "restringir o diretório para um tipo específico de conteúdo, você pode "
 "prefixar o tipo ('A' para áudio, 'V' para o vídeo, 'P' para imagens), "
-"seguido por uma vírgula, para o diretório (por exemplo media_dir = A, / "
-"mnt / media / Música). Vários diretórios podem ser especificados."
+"seguido por uma vírgula, para o diretório (por exemplo A, / mnt / media / "
+"Música). Vários diretórios podem ser especificados."
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "Especifique o caminho para o soquete MiniSSDPd."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/pt/minidlna.po

@@ -17,6 +17,9 @@ msgstr "Definições Avançadas"
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Número modelo anunciado:"
 
@@ -116,6 +119,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -135,7 +142,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/ro/minidlna.po

@@ -18,6 +18,9 @@ msgstr "Setări avansate"
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -113,6 +116,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -132,7 +139,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 10 - 3
package/luci/applications/luci-app-minidlna/po/ru/minidlna.po

@@ -20,6 +20,9 @@ msgstr "Расширенные настройки"
 msgid "Album art names:"
 msgstr "Имена обложек альбома:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "Номер модели:"
 
@@ -122,6 +125,10 @@ msgid ""
 "to store its log file."
 msgstr "Папка, в которой miniDLNA будет хранить свой файл журнала."
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -148,13 +155,13 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 "Директории, которые необходимо сканировать. Если вы хотите установить "
 "ограничение на определённый тип содержимого в директории, вы можете написать "
 "тип ('A' для аудио, 'V' для видео, 'P' для изображений) перед путём к "
-"директории, за которым следует запятая (напр. media_dir=A,/mnt/media/Music). "
-"Может быть указано несколько директорий."
+"директории, за которым следует запятая (напр. A,/mnt/media/Music). Может "
+"быть указано несколько директорий."
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "Укажите путь к сокету MiniSSDPd."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/sk/minidlna.po

@@ -14,6 +14,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -109,6 +112,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -128,7 +135,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/sv/minidlna.po

@@ -15,6 +15,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -110,6 +113,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -129,7 +136,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/templates/minidlna.pot

@@ -7,6 +7,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -102,6 +105,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -121,7 +128,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/tr/minidlna.po

@@ -14,6 +14,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -109,6 +112,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -128,7 +135,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/uk/minidlna.po

@@ -15,6 +15,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -110,6 +113,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -129,7 +136,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/vi/minidlna.po

@@ -14,6 +14,9 @@ msgstr ""
 msgid "Album art names:"
 msgstr ""
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr ""
 
@@ -109,6 +112,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -128,7 +135,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 12 - 4
package/luci/applications/luci-app-minidlna/po/zh-cn/minidlna.po

@@ -17,6 +17,9 @@ msgstr "高级设置"
 msgid "Album art names:"
 msgstr "专辑封面名称:"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "通告型号:"
 
@@ -112,6 +115,10 @@ msgid ""
 "to store its log file."
 msgstr "设置miniDLNA日志目录"
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr "设定启用inotify监控,自动发现新的文件。"
@@ -129,15 +136,16 @@ msgstr ""
 "设定严格遵守DLNA标准。这将允许服务器端降小大尺寸JPEG图像,在(至少)索尼DLNA"
 "的产品这可能会降低JPEG服务性能。"
 
-# 如果写成media_dir=A,/mnt/media/Music,uci会报错。实际上应该是A,/mnt/media/Music,这样生成的minidlna.conf刚好是media_dir=A,/mnt/media/Music
+# 如果写成A,/mnt/media/Music,uci会报错。实际上应该是A,/mnt/media/Music,这样生成的minidlna.conf刚好是A,/mnt/media/Music
 msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
-"设置要扫描的目录。如果你想限制特定内容类型的目录,你可以在前面加上类型(用于音频'A','V'视频,'P'图片),其次是用逗号分隔的目录(如A,/mnt"
-"/媒体/音乐)。可以指定多个目录。"
+"设置要扫描的目录。如果您想限制特定内容类型的目录,您可以在前面加上类型(用于"
+"音频'A','V'视频,'P'图片),其次是用逗号分隔的目录(如A,/mnt/媒体/音乐)。可"
+"以指定多个目录。"
 
 msgid "Specify the path to the MiniSSDPd socket."
 msgstr "指定MiniSSDPd socket的路径。"

+ 8 - 1
package/luci/applications/luci-app-minidlna/po/zh-tw/minidlna.po

@@ -17,6 +17,9 @@ msgstr "進階設定值"
 msgid "Album art names:"
 msgstr "專輯名稱"
 
+msgid "Allow wide links:"
+msgstr ""
+
 msgid "Announced model number:"
 msgstr "已宣告型號數量"
 
@@ -112,6 +115,10 @@ msgid ""
 "to store its log file."
 msgstr ""
 
+msgid ""
+"Set this to allow serving content outside the media root (via symlinks)."
+msgstr ""
+
 msgid ""
 "Set this to enable inotify monitoring to automatically discover new files."
 msgstr ""
@@ -131,7 +138,7 @@ msgid ""
 "Set this to the directory you want scanned. If you want to restrict the "
 "directory to a specific content type, you can prepend the type ('A' for "
 "audio, 'V' for video, 'P' for images), followed by a comma, to the directory "
-"(eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."
+"(eg. A,/mnt/media/Music). Multiple directories can be specified."
 msgstr ""
 
 msgid "Specify the path to the MiniSSDPd socket."

+ 5 - 5
package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua

@@ -64,19 +64,19 @@ function interfaceWarnings() -- display status and warning messages at the top o
 		warnings = "<font color=\"ff0000\"><strong>" .. translatef("WARNING: %d interfaces are configured exceeding the maximum of 250!", interfaceNumber) .. "</strong></font>"
 	end
 	if errorReliabilityList ~= " " then
-		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have a higher reliability requirement than there are tracking IP addresses!") .. "</strong></font>"
+		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces have a higher reliability requirement than there are tracking IP addresses!") .. "</strong></font>"
 	end
 	if errorRouteList ~= " " then
-		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have no default route in the main routing table!") .. "</strong></font>"
+		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces have no default route in the main routing table!") .. "</strong></font>"
 	end
 	if errorNetConfigList ~= " " then
-		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces are configured incorrectly or not at all in /etc/config/network!") .. "</strong></font>"
+		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces are configured incorrectly or not at all in /etc/config/network!") .. "</strong></font>"
 	end
 	if errorNoMetricList ~= " " then
-		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have no metric configured in /etc/config/network!") .. "</strong></font>"
+		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces have no metric configured in /etc/config/network!") .. "</strong></font>"
 	end
 	if errorDuplicateMetricList ~= " " then
-		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: some interfaces have duplicate metrics configured in /etc/config/network!") .. "</strong></font>"
+		warnings = warnings .. "<br /><br /><font color=\"ff0000\"><strong>" .. translate("WARNING: Some interfaces have duplicate metrics configured in /etc/config/network!") .. "</strong></font>"
 	end
 	return warnings
 end

+ 5 - 5
package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua

@@ -50,21 +50,21 @@ end
 function interfaceWarnings() -- display warning messages at the top of the page
 	local warns, lineBreak = "", ""
 	if errorReliability == 1 then
-		warns = "<font color=\"ff0000\"><strong>" .. translate("WARNING: this interface has a higher reliability requirement than there are tracking IP addresses!") .. "</strong></font>"
+		warns = "<font color=\"ff0000\"><strong>" .. translate("WARNING: This interface has a higher reliability requirement than there are tracking IP addresses!") .. "</strong></font>"
 		lineBreak = "<br /><br />"
 	end
 	if errorRoute == 1 then
-		warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: this interface has no default route in the main routing table!") .. "</strong></font>"
+		warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: This interface has no default route in the main routing table!") .. "</strong></font>"
 		lineBreak = "<br /><br />"
 	end
 	if errorNetConfig == 1 then
-		warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: this interface is configured incorrectly or not at all in /etc/config/network!") .. "</strong></font>"
+		warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: This interface is configured incorrectly or not at all in /etc/config/network!") .. "</strong></font>"
 		lineBreak = "<br /><br />"
 	end
 	if errorNoMetric == 1 then
-		warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: this interface has no metric configured in /etc/config/network!") .. "</strong></font>"
+		warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: This interface has no metric configured in /etc/config/network!") .. "</strong></font>"
 	elseif errorDuplicateMetric == 1 then
-		warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: this and other interfaces have duplicate metrics configured in /etc/config/network!") .. "</strong></font>"
+		warns = warns .. lineBreak .. "<font color=\"ff0000\"><strong>" .. translate("WARNING: This and other interfaces have duplicate metrics configured in /etc/config/network!") .. "</strong></font>"
 	end
 	return warns
 end

+ 1 - 1
package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/policyconfig.lua

@@ -9,7 +9,7 @@ end
 
 function policyWarn() -- display status and warning messages at the top of the page
 	if nameTooLong == 1 then
-		return "<font color=\"ff0000\"><strong>" .. translatef("WARNING: this policy's name is %d characters exceeding the maximum of 15!", policyNameLength) .. "</strong></font>"
+		return "<font color=\"ff0000\"><strong>" .. translatef("WARNING: This policy's name is %d characters exceeding the maximum of 15!", policyNameLength) .. "</strong></font>"
 	else
 		return ""
 	end

+ 1 - 1
package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua

@@ -17,7 +17,7 @@ end
 
 function ruleWarn() -- display warning messages at the top of the page
 	if error_protocol_list ~= " " then
-		return "<font color=\"ff0000\"><strong>" .. translate("WARNING: some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!") .. "</strong></font>"
+		return "<font color=\"ff0000\"><strong>" .. translate("WARNING: Some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!") .. "</strong></font>"
 	else
 		return ""
 	end

+ 1 - 1
package/luci/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua

@@ -13,7 +13,7 @@ end
 
 function ruleWarn() -- display warning message at the top of the page
 	if error_protocol == 1 then
-		return "<font color=\"ff0000\"><strong>" .. translate("WARNING: this rule is incorrectly configured with no or improper protocol specified! Please configure a specific protocol!") .. "</strong></font>"
+		return "<font color=\"ff0000\"><strong>" .. translate("WARNING: This rule is incorrectly configured with no or improper protocol specified! Please configure a specific protocol!") .. "</strong></font>"
 	else
 		return ""
 	end

+ 18 - 18
package/luci/applications/luci-app-mwan3/po/ja/mwan3.po

@@ -524,90 +524,90 @@ msgstr ""
 "警告: %d 個のインターフェースが、最大個数の 250個 を超えて設定されています!"
 
 msgid ""
-"WARNING: Some policies have names exceeding the maximum of 15 characters!"
-msgstr ""
-"警告: 最大文字数の 15 文字を超える名前が設定されているポリシーがあります!"
-
-msgid ""
-"WARNING: some interfaces are configured incorrectly or not at all in /etc/"
+"WARNING: Some interfaces are configured incorrectly or not at all in /etc/"
 "config/network!"
 msgstr ""
 "警告: 設定を誤っているか、もしくは完全に設定されていないインターフェースがあ"
 "ります!"
 
 msgid ""
-"WARNING: some interfaces have a higher reliability requirement than there "
+"WARNING: Some interfaces have a higher reliability requirement than there "
 "are tracking IP addresses!"
 msgstr ""
 "警告: 追跡 IP アドレスの個数より大きい追跡信頼性の値が設定されたインター"
 "フェースがあります!"
 
 msgid ""
-"WARNING: some interfaces have duplicate metrics configured in /etc/config/"
+"WARNING: Some interfaces have duplicate metrics configured in /etc/config/"
 "network!"
 msgstr ""
 "警告: /etc/config/network で、重複するメトリックを設定されているインター"
 "フェースがあります!"
 
 msgid ""
-"WARNING: some interfaces have no default route in the main routing table!"
+"WARNING: Some interfaces have no default route in the main routing table!"
 msgstr ""
 "警告: メインのルーティング テーブルで、デフォルト ルートを設定されていないイ"
 "ンターフェースがあります!"
 
 msgid ""
-"WARNING: some interfaces have no metric configured in /etc/config/network!"
+"WARNING: Some interfaces have no metric configured in /etc/config/network!"
 msgstr ""
 "警告: /etc/config/network で、メトリックを設定されていないインターフェースが"
 "あります!"
 
 msgid ""
-"WARNING: some rules have a port configured with no or improper protocol "
+"WARNING: Some policies have names exceeding the maximum of 15 characters!"
+msgstr ""
+"警告: 最大文字数の 15 文字を超える名前が設定されているポリシーがあります!"
+
+msgid ""
+"WARNING: Some rules have a port configured with no or improper protocol "
 "specified! Please configure a specific protocol!"
 msgstr ""
 "警告: 不適切なプロトコルが指定されている、または何も指定されていないポートを"
 "設定されたルールがあります!プロトコルを指定し直してください!"
 
 msgid ""
-"WARNING: this and other interfaces have duplicate metrics configured in /etc/"
+"WARNING: This and other interfaces have duplicate metrics configured in /etc/"
 "config/network!"
 msgstr ""
 "警告: これと他のインターフェースで重複するメトリックが /etc/config/network に"
 "設定されています!"
 
 msgid ""
-"WARNING: this interface has a higher reliability requirement than there are "
+"WARNING: This interface has a higher reliability requirement than there are "
 "tracking IP addresses!"
 msgstr ""
 "警告: このインターフェースは、追跡 IP アドレスの個数より大きい追跡信頼性の値"
 "を設定されています!"
 
-msgid "WARNING: this interface has no default route in the main routing table!"
+msgid "WARNING: This interface has no default route in the main routing table!"
 msgstr ""
 "警告: このインターフェースは、メインのルーティング テーブルにデフォルト ルー"
 "トが設定されていません!"
 
 msgid ""
-"WARNING: this interface has no metric configured in /etc/config/network!"
+"WARNING: This interface has no metric configured in /etc/config/network!"
 msgstr ""
 "警告: このインターフェースは、 /etc/config/network でメトリックが設定されてい"
 "ません!"
 
 msgid ""
-"WARNING: this interface is configured incorrectly or not at all in /etc/"
+"WARNING: This interface is configured incorrectly or not at all in /etc/"
 "config/network!"
 msgstr ""
 "警告: このインターフェースは /etc/config/network で設定が誤っているか、もしく"
 "は完全に設定されていません!"
 
 msgid ""
-"WARNING: this policy's name is %d characters exceeding the maximum of 15!"
+"WARNING: This policy's name is %d characters exceeding the maximum of 15!"
 msgstr ""
 "警告: このポリシーの名前は、最大文字数 15 文字を超える %d 文字が設定されてい"
 "ます!"
 
 msgid ""
-"WARNING: this rule is incorrectly configured with no or improper protocol "
+"WARNING: This rule is incorrectly configured with no or improper protocol "
 "specified! Please configure a specific protocol!"
 msgstr ""
 "警告: このルールは不適切なプロトコルが指定されているか、または何も指定されて"

+ 17 - 17
package/luci/applications/luci-app-mwan3/po/templates/mwan3.pot

@@ -450,65 +450,65 @@ msgid "WARNING: %d interfaces are configured exceeding the maximum of 250!"
 msgstr ""
 
 msgid ""
-"WARNING: Some policies have names exceeding the maximum of 15 characters!"
-msgstr ""
-
-msgid ""
-"WARNING: some interfaces are configured incorrectly or not at all in /etc/"
+"WARNING: Some interfaces are configured incorrectly or not at all in /etc/"
 "config/network!"
 msgstr ""
 
 msgid ""
-"WARNING: some interfaces have a higher reliability requirement than there "
+"WARNING: Some interfaces have a higher reliability requirement than there "
 "are tracking IP addresses!"
 msgstr ""
 
 msgid ""
-"WARNING: some interfaces have duplicate metrics configured in /etc/config/"
+"WARNING: Some interfaces have duplicate metrics configured in /etc/config/"
 "network!"
 msgstr ""
 
 msgid ""
-"WARNING: some interfaces have no default route in the main routing table!"
+"WARNING: Some interfaces have no default route in the main routing table!"
 msgstr ""
 
 msgid ""
-"WARNING: some interfaces have no metric configured in /etc/config/network!"
+"WARNING: Some interfaces have no metric configured in /etc/config/network!"
+msgstr ""
+
+msgid ""
+"WARNING: Some policies have names exceeding the maximum of 15 characters!"
 msgstr ""
 
 msgid ""
-"WARNING: some rules have a port configured with no or improper protocol "
+"WARNING: Some rules have a port configured with no or improper protocol "
 "specified! Please configure a specific protocol!"
 msgstr ""
 
 msgid ""
-"WARNING: this and other interfaces have duplicate metrics configured in /etc/"
+"WARNING: This and other interfaces have duplicate metrics configured in /etc/"
 "config/network!"
 msgstr ""
 
 msgid ""
-"WARNING: this interface has a higher reliability requirement than there are "
+"WARNING: This interface has a higher reliability requirement than there are "
 "tracking IP addresses!"
 msgstr ""
 
-msgid "WARNING: this interface has no default route in the main routing table!"
+msgid "WARNING: This interface has no default route in the main routing table!"
 msgstr ""
 
 msgid ""
-"WARNING: this interface has no metric configured in /etc/config/network!"
+"WARNING: This interface has no metric configured in /etc/config/network!"
 msgstr ""
 
 msgid ""
-"WARNING: this interface is configured incorrectly or not at all in /etc/"
+"WARNING: This interface is configured incorrectly or not at all in /etc/"
 "config/network!"
 msgstr ""
 
 msgid ""
-"WARNING: this policy's name is %d characters exceeding the maximum of 15!"
+"WARNING: This policy's name is %d characters exceeding the maximum of 15!"
 msgstr ""
 
 msgid ""
-"WARNING: this rule is incorrectly configured with no or improper protocol "
+"WARNING: This rule is incorrectly configured with no or improper protocol "
 "specified! Please configure a specific protocol!"
 msgstr ""
 

+ 88 - 72
package/luci/applications/luci-app-mwan3/po/zh-cn/mwan3.po

@@ -1,7 +1,15 @@
+#
+# Yangfl <mmyangfl@gmail.com>, 2017.
+#
 msgid ""
 msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
-"Last-Translator: Hsing-Wang Liao <kuoruan@gmail.com>\n"
+"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
+"Language-Team:  <debian-l10n-chinese@lists.debian.org>\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"PO-Revision-Date: 2017-10-28 16:58+0800\n"
+"X-Generator: Gtranslator 2.91.7\n"
 
 msgid "%d hour"
 msgstr "%d 小时"
@@ -22,10 +30,10 @@ msgid ""
 "Acceptable values: 1-100. This many Tracking IP addresses must respond for "
 "the link to be deemed up"
 msgstr ""
-"取值范围: 1-100。这个设置项指定了当多少个 IP 地址能够连通时接口会被认为在线"
+"取值范围1-100。这个设置项指定了当多少个 IP 地址能够连通时接口会被认为在线"
 
 msgid "Acceptable values: 1-1000. Defaults to 1 if not set"
-msgstr "取值范围: 1-100。如果不填写,默认值为 1"
+msgstr "取值范围1-100。如果不填写,默认值为 1"
 
 msgid "Advanced"
 msgstr "高级"
@@ -67,17 +75,17 @@ msgid "Diagnostics"
 msgstr "诊断"
 
 msgid "Disabled"
-msgstr "禁用"
+msgstr "禁用"
 
 msgid ""
 "Downed interface will be deemed up after this many successful ping tests"
 msgstr "当 Ping 成功次数达到这个数值后,已经被认为离线的接口将会重新上线"
 
 msgid "Enabled"
-msgstr "启用"
+msgstr "启用"
 
 msgid "Enter value in hex, starting with <code>0x</code>"
-msgstr ""
+msgstr "输入十六进制值,以 <code>0x</code> 开头"
 
 msgid "Error collecting troubleshooting information"
 msgstr "收集故障排除信息时出错"
@@ -86,13 +94,13 @@ msgid "Errors"
 msgstr "错误"
 
 msgid "Expect interface state on up event"
-msgstr ""
+msgstr "在 up 事件发生时的预期接口状态"
 
 msgid "Failure interval"
 msgstr "故障检测间隔"
 
 msgid "Firewall mask"
-msgstr ""
+msgstr "防火墙掩码"
 
 msgid "Flush conntrack table"
 msgstr "刷新连接跟踪表"
@@ -101,10 +109,10 @@ msgid "Flush global firewall conntrack table on interface events"
 msgstr "在接口事件触发时刷新全局防火墙连接跟踪表"
 
 msgid "Globals"
-msgstr ""
+msgstr "全局"
 
 msgid "Globals mwan3 options"
-msgstr ""
+msgstr "全局 mwan3 选项"
 
 msgid "Hotplug Script"
 msgstr "Hotplug 脚本"
@@ -125,7 +133,7 @@ msgid "IPv6"
 msgstr "IPv6"
 
 msgid "Initial state"
-msgstr ""
+msgstr "初始状态"
 
 msgid "Interface"
 msgstr "接口"
@@ -137,10 +145,10 @@ msgid "Interface down"
 msgstr "接口离线"
 
 msgid "Interface up"
-msgstr "接口线"
+msgstr "接口线"
 
 msgid "Interface will be deemed down after this many failed ping tests"
-msgstr "当 Ping 失败次数达到这个数值后接口会被认为离线"
+msgstr "当 Ping 失败次数达到这个数值后接口会被认为离线"
 
 msgid "Interfaces"
 msgstr "接口"
@@ -149,13 +157,13 @@ msgid "Internet Protocol"
 msgstr "互联网协议"
 
 msgid "Keep failure interval"
-msgstr ""
+msgstr "保持故障检测间隔"
 
 msgid "Keep ping failure interval during failure state"
-msgstr ""
+msgstr "在故障状态期间保持的 Ping 故障检测间隔"
 
 msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
-msgstr "最近 50 条 MWAN 系统日志,最新条目排在顶部:"
+msgstr "最近 50 条 MWAN 系统日志,最新条目排在顶部"
 
 msgid "Last resort"
 msgstr "备用成员"
@@ -167,7 +175,7 @@ msgid "Loading"
 msgstr "载入中"
 
 msgid "Local source interface"
-msgstr ""
+msgstr "本地源接口"
 
 msgid "MWAN Config"
 msgstr "MWAN 配置文件"
@@ -221,16 +229,16 @@ msgid ""
 msgstr ""
 "MWAN 支持最多 250 个物理或逻辑接口。<br />MWAN 要求所有接口必须在 /etc/"
 "config/network 中设定唯一的网关跃点。<br />名称必须与 /etc/config/network 中"
-"的接口名称匹配。(可查看“高级”选项卡)<br />名称允许包括A-Z、a-z、0-9、_ 但"
-"不能有空格。<br />接口不应该与成员、策略、规则中的任意一个设置项使用相同的"
-"称"
+"的接口名称匹配。(可查看“高级”选项卡)<br />名称允许包括 A-Z、a-z、0-9、_ 但"
+"不能有空格。<br />接口不应该与成员、策略、规则中的任意一个设置项使用相同的"
+"称"
 
 msgid ""
 "May be entered as a single or multiple port(s) (eg \"22\" or \"80,443\") or "
 "as a portrange (eg \"1024:2048\") without quotes"
 msgstr ""
-"可以输入一个或多个端口(例如 \"22\" 或者 \"80,443\")或者是一个端口范围(例"
-"如 \"1024:2048\")不含引号"
+"可以输入一个或多个端口(例如“22”或者“80,443”)或者是一个端口范围(例"
+"如“1024:2048”)不含引号"
 
 msgid "Member"
 msgstr "成员"
@@ -260,8 +268,8 @@ msgid ""
 "Name of IPset rule. Requires IPset rule in /etc/dnsmasq.conf (eg \"ipset=/"
 "youtube.com/youtube\")"
 msgstr ""
-"匹配 IPset 规则列表名称。需要先配置 /etc/dnsmasq.conf 中的 IPset 规则 (例如: "
-"\"ipset=/youtube.com/youtube\")"
+"匹配 IPset 规则列表名称。需要先配置 /etc/dnsmasq.conf 中的 IPset 规则(例"
+"如:“ipset=/youtube.com/youtube”)"
 
 msgid "Network Config"
 msgstr "网络配置文件"
@@ -288,13 +296,13 @@ msgid "Offline"
 msgstr "离线"
 
 msgid "Online"
-msgstr ""
+msgstr "在线"
 
 msgid "Online (tracking active)"
-msgstr "在线(踪启用中)"
+msgstr "在线(踪启用中)"
 
 msgid "Online (tracking off)"
-msgstr "在线(踪已关闭)"
+msgstr "在线(踪已关闭)"
 
 msgid "Overview"
 msgstr "概况"
@@ -381,7 +389,7 @@ msgstr ""
 "的任意一个设置项使用相同的名称"
 
 msgid "Seconds. Acceptable values: 1-1000000. Defaults to 600 if not set"
-msgstr "单位为秒。接受的值: 1-1000000。留空则使用默认值 600 秒"
+msgstr "单位为秒。接受的值1-1000000。留空则使用默认值 600 秒"
 
 msgid "Source address"
 msgstr "源地址"
@@ -402,7 +410,7 @@ msgid "Stop MWAN"
 msgstr "停止 MWAN"
 
 msgid "Supports CIDR notation (eg \"192.168.100.0/24\") without quotes"
-msgstr "支持 CIDR 记法(例如: \"192.168.100.0/24\")不含引号"
+msgstr "支持 CIDR 记法(例如\"192.168.100.0/24\")不含引号"
 
 msgid "There are currently %d of 250 supported interfaces configured"
 msgstr "当前已配置 %d 个接口,最大支持 250 个"
@@ -429,27 +437,35 @@ msgid ""
 "went up or down (e.g. \"wan\" or \"wwan\")<br />$DEVICE Physical device name "
 "which interface went up or down (e.g. \"eth0\" or \"wwan0\")<br /><br />"
 msgstr ""
+"这里允许您修改“/etc/mwan3.user”的内容。<br />该文件在 sysupgrade 期间也会保"
+"留。<br /><br />注意:<br />该文件会作为 shell 脚本解释。<br />脚本的第一行必"
+"须是&#34;#!/bin/sh&#34;,不带引号。<br />以#开头的行是注释,不会执行。<br />"
+"将您的自定义 mwan3 动作放在这里,他们将<br />在启用 mwan3 的接口上<br />在 "
+"netifd hotplug 接口事件时执行。<br /><br />有三个主要的环境变量传递给这个脚"
+"本。<br /><br />$ACTION “ifup”或“ifdown”<br />$INTERFACE 启动或停止的接口名"
+"(例如“wan”或“wwan”)<br />$DEVICE 启动或停止接口的物理设备名(例"
+"如“eth0”或“wwan0”)<br /><br />"
 
 msgid "This section allows you to modify the contents of /etc/config/mwan3"
-msgstr "这里允许你修改 /etc/config/mwan3 的内容"
+msgstr "这里允许修改 /etc/config/mwan3 的内容"
 
 msgid "This section allows you to modify the contents of /etc/config/network"
-msgstr "这里允许你修改 /etc/config/network 的内容"
+msgstr "这里允许修改 /etc/config/network 的内容"
 
 msgid "This section allows you to modify the contents of /etc/config/wireless"
-msgstr "这里允许修改 /etc/config/wireless 的内容"
+msgstr "这里允许修改 /etc/config/wireless 的内容"
 
 msgid "Tracking IP"
-msgstr "踪的 IP"
+msgstr "踪的 IP"
 
 msgid "Tracking hostname or IP address"
-msgstr "踪的主机或 IP 地址"
+msgstr "踪的主机或 IP 地址"
 
 msgid "Tracking method"
-msgstr ""
+msgstr "跟踪方式"
 
 msgid "Tracking reliability"
-msgstr "踪可靠性"
+msgstr "踪可靠性"
 
 msgid "Traffic Rules"
 msgstr "流量规则"
@@ -470,77 +486,77 @@ msgstr "故障排除数据"
 msgid ""
 "Use the IP address of this interface as source IP address for traffic "
 "initiated by the router itself"
-msgstr ""
+msgstr "使用该接口的 IP 地址作为路由器本身发起的流量的源 IP 地址"
 
 msgid "View the contents of /etc/protocols for protocol descriptions"
 msgstr "请查看 /etc/protocols 获取可选协议详情"
 
 msgid "WARNING: %d interfaces are configured exceeding the maximum of 250!"
-msgstr "警告: 已配置 %d 个接口,超过最大值 250!"
+msgstr "警告已配置 %d 个接口,超过最大值 250!"
 
 msgid ""
-"WARNING: Some policies have names exceeding the maximum of 15 characters!"
-msgstr "警告: 某些策略的名称超过了 15 个字符!"
-
-msgid ""
-"WARNING: some interfaces are configured incorrectly or not at all in /etc/"
+"WARNING: Some interfaces are configured incorrectly or not at all in /etc/"
 "config/network!"
-msgstr "警告: 某些接口配置不正确或未配置到 /etc/config/network!"
+msgstr "警告:某些接口配置不正确或未配置到 /etc/config/network!"
 
 msgid ""
-"WARNING: some interfaces have a higher reliability requirement than there "
+"WARNING: Some interfaces have a higher reliability requirement than there "
 "are tracking IP addresses!"
-msgstr "警告: 某些接口的追踪可靠性要求大于了追踪 IP 地址总数!"
+msgstr "警告:某些接口的跟踪可靠性要求大于了跟踪 IP 地址总数!"
 
 msgid ""
-"WARNING: some interfaces have duplicate metrics configured in /etc/config/"
+"WARNING: Some interfaces have duplicate metrics configured in /etc/config/"
 "network!"
-msgstr "警告: 某些接口在 /etc/config/network 中配置了相同的跃点数!"
+msgstr "警告:某些接口在 /etc/config/network 中配置了相同的跃点数!"
+
+msgid ""
+"WARNING: Some interfaces have no default route in the main routing table!"
+msgstr "警告:某些接口在主路由表中没有默认路由!"
 
 msgid ""
-"WARNING: some interfaces have no default route in the main routing table!"
-msgstr "警告: 某些接口在主路由表中没有默认路由!"
+"WARNING: Some interfaces have no metric configured in /etc/config/network!"
+msgstr "警告:某些接口没有在 /etc/config/network 中配置跃点数!"
 
 msgid ""
-"WARNING: some interfaces have no metric configured in /etc/config/network!"
-msgstr "警告: 某些接口没有在 /etc/config/network 中配置跃点数!"
+"WARNING: Some policies have names exceeding the maximum of 15 characters!"
+msgstr "警告:某些策略的名称超过了 15 个字符!"
 
 msgid ""
-"WARNING: some rules have a port configured with no or improper protocol "
+"WARNING: Some rules have a port configured with no or improper protocol "
 "specified! Please configure a specific protocol!"
 msgstr ""
-"警告: 某些规则指定了端口却没有配置或配置了不正确的协议,请重新指定协议!"
+"警告某些规则指定了端口却没有配置或配置了不正确的协议,请重新指定协议!"
 
 msgid ""
-"WARNING: this and other interfaces have duplicate metrics configured in /etc/"
+"WARNING: This and other interfaces have duplicate metrics configured in /etc/"
 "config/network!"
-msgstr "警告: 此接口和其他接口在 /etc/config/network 中配置了相同的跃点数!"
+msgstr "警告此接口和其他接口在 /etc/config/network 中配置了相同的跃点数!"
 
 msgid ""
-"WARNING: this interface has a higher reliability requirement than there are "
+"WARNING: This interface has a higher reliability requirement than there are "
 "tracking IP addresses!"
-msgstr "警告: 此接口的追踪可靠性要求大于了追踪 IP 地址总数!"
+msgstr "警告:此接口的跟踪可靠性要求大于了跟踪 IP 地址总数!"
 
-msgid "WARNING: this interface has no default route in the main routing table!"
-msgstr "警告: 此接口在主路由表中没有默认路由!"
+msgid "WARNING: This interface has no default route in the main routing table!"
+msgstr "警告此接口在主路由表中没有默认路由!"
 
 msgid ""
-"WARNING: this interface has no metric configured in /etc/config/network!"
-msgstr "警告: 此接口没有在 /etc/config/network 中配置跃点数!"
+"WARNING: This interface has no metric configured in /etc/config/network!"
+msgstr "警告此接口没有在 /etc/config/network 中配置跃点数!"
 
 msgid ""
-"WARNING: this interface is configured incorrectly or not at all in /etc/"
+"WARNING: This interface is configured incorrectly or not at all in /etc/"
 "config/network!"
-msgstr "警告: 此接口配置不正确或未配置到 /etc/config/network!"
+msgstr "警告此接口配置不正确或未配置到 /etc/config/network!"
 
 msgid ""
-"WARNING: this policy's name is %d characters exceeding the maximum of 15!"
-msgstr "警告: 此策略的名称具有 %d 个字符,超过了 15 个字符!"
+"WARNING: This policy's name is %d characters exceeding the maximum of 15!"
+msgstr "警告此策略的名称具有 %d 个字符,超过了 15 个字符!"
 
 msgid ""
-"WARNING: this rule is incorrectly configured with no or improper protocol "
+"WARNING: This rule is incorrectly configured with no or improper protocol "
 "specified! Please configure a specific protocol!"
-msgstr "警告: 此规则没有配置或配置了不正确的协议,请重新指定协议!"
+msgstr "警告此规则没有配置或配置了不正确的协议,请重新指定协议!"
 
 msgid "Waiting for MWAN to %s..."
 msgstr "等待 MWAN %s..."
@@ -580,13 +596,13 @@ msgid "never"
 msgstr "从不"
 
 msgid "restart"
-msgstr ""
+msgstr "重启"
 
 msgid "start"
-msgstr ""
+msgstr "启动"
 
 msgid "stop"
-msgstr ""
+msgstr "停止"
 
 msgid "unreachable (reject)"
 msgstr "不可达(拒绝)"
@@ -607,7 +623,7 @@ msgstr "不可达(拒绝)"
 #~ "ifdown)<br />$INTERFACE is the interface name (wan1, wan2, etc.)<br />"
 #~ "$DEVICE is the device name attached to the interface (eth0.1, eth1, etc.)"
 #~ msgstr ""
-#~ "这里允许修改 /etc/hotplug.d/iface/16-mwancustom 的内容<br />这可以在接"
+#~ "这里允许修改 /etc/hotplug.d/iface/16-mwancustom 的内容<br />这可以在接"
 #~ "口 ifup 或 ifdown Hotplug 事件时运行系统命令或脚本<br /><br />注意:<br />"
 #~ "脚本的第一行必须是 &#34;#!/bin/sh&#34; 不含引号<br />以#开头的行是注释,"
 #~ "不会执行<br /><br />可用变量:<br />$ACTION 是 Hotplug 事件(ifup, ifdown)"

Some files were not shown because too many files changed in this diff