From: RISCi_ATOM Date: Thu, 5 Oct 2017 14:12:49 +0000 (-0400) Subject: Fresh pull from upstream lede-17.01 branch to fix several outstanding X-Git-Tag: v1.4.1-final~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=447cf1a2b7efa3949c8562d08bddcfaba3a5d809;p=librecmc%2Flibrecmc.git Fresh pull from upstream lede-17.01 branch to fix several outstanding bugs. Some support may have regressed as a result. --- diff --git a/include/feeds.mk b/include/feeds.mk index 9ee6d261e8..054b5aa796 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -47,7 +47,7 @@ endef # 1: destination file define FeedSourcesAppend ( \ - echo "src/gz %n_core %U/%S/packages"; \ + echo "src/gz %n_core %U/targets/%S/packages"; \ $(strip $(if $(CONFIG_PER_FEED_REPO), \ $(foreach feed,base $(FEEDS_ENABLED),echo "src/gz %n_$(feed) %U/packages/%A/$(feed)";) \ $(if $(CONFIG_PER_FEED_REPO_ADD_DISABLED), \ diff --git a/include/image-commands.mk b/include/image-commands.mk index 04fa853fbb..f77c63137e 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -7,7 +7,7 @@ define Build/uImage mkimage -A $(LINUX_KARCH) \ -O linux -T kernel \ -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION))' -d $@ $@.new + -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) libreCMC Linux-$(LINUX_VERSION))' -d $@ $@.new @mv $@.new $@ endef @@ -22,7 +22,7 @@ endef define Build/netgear-dni $(STAGING_DIR_HOST)/bin/mkdniimg \ - -B $(NETGEAR_BOARD_ID) -v LEDE.$(REVISION) \ + -B $(NETGEAR_BOARD_ID) -v libreCMC.$(REVISION) \ $(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \ -r "$(1)" \ -i $@ -o $@.new diff --git a/include/image-legacy.mk b/include/image-legacy.mk index 1864d714e5..1ccaec09b0 100644 --- a/include/image-legacy.mk +++ b/include/image-legacy.mk @@ -48,6 +48,7 @@ endef ifdef TARGET_PER_DEVICE_ROOTFS define Image/Build/Profile/Filesystem cp $(KDIR)/root.$(2)+pkg=$(3) $(KDIR)/root.$(2) + $(call Image/Build/$(2),$(2)) $(call Image/Build/Profile,$(1),$(2)) endef else diff --git a/include/image.mk b/include/image.mk index 81519cd183..a01018b689 100644 --- a/include/image.mk +++ b/include/image.mk @@ -137,7 +137,7 @@ endef define Image/BuildKernel/MkuImage mkimage -A $(ARCH) -O linux -T kernel -C $(1) -a $(2) -e $(3) \ - -n '$(call toupper,$(ARCH)) LEDE Linux-$(LINUX_VERSION)' -d $(4) $(5) + -n '$(call toupper,$(ARCH)) libreCMC Linux-$(LINUX_VERSION)' -d $(4) $(5) endef define Image/BuildKernel/MkFIT @@ -277,7 +277,7 @@ endif ifdef CONFIG_TARGET_ROOTFS_CPIOGZ define Image/Build/cpiogz - ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz ) + ( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz ) endef endif @@ -420,7 +420,7 @@ define Device/Build/initramfs $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) cp $$^ $$@ - $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) + $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare @rm -f $$@ $$(call concat_cmd,$$(KERNEL_INITRAMFS)) endef @@ -444,7 +444,7 @@ define Device/Build/kernel ifdef CONFIG_IB install: $$(KDIR_KERNEL_IMAGE) endif - $$(KDIR_KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) + $$(KDIR_KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare @rm -f $$@ $$(call concat_cmd,$$(KERNEL)) $$(if $$(KERNEL_SIZE),$$(call Build/check-size,$$(KERNEL_SIZE))) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index af4e8b5e14..2768c0278f 100644 --- a/include/prereq-build.mk +++ b/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, \ - LEDE can only be built on a case-sensitive filesystem, \ + libreCMC 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)) diff --git a/include/toplevel.mk b/include/toplevel.mk index 24e4ebf823..1171c59093 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -23,6 +23,7 @@ HOSTCC ?= $(CC) export REVISION export SOURCE_DATE_EPOCH export GIT_CONFIG_PARAMETERS='core.autocrlf=false' +export GIT_ASKPASS:=/bin/true export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS)) # prevent perforce from messing with the patch utility @@ -126,7 +127,7 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \ cp $(HOME)/.openwrt/defconfig .config; \ fi - $< Config.in + [ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; $< Config.in prepare_kernel_conf: .config FORCE @@ -170,7 +171,7 @@ else DOWNLOAD_DIRS = package/download endif -download: .config FORCE +download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile) @+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);) clean dirclean: .config diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2e43277d3a..356ef969ce 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -11,14 +11,15 @@ include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk PKG_NAME:=base-files -PKG_RELEASE:=172 +PKG_RELEASE:=173.1 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ PKG_BUILD_DEPENDS:=usign/host PKG_LICENSE:=GPL-2.0 -PKG_CONFIG_DEPENDS := CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE +# Extend depends from version.mk +PKG_CONFIG_DEPENDS += CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE include $(INCLUDE_DIR)/package.mk @@ -31,7 +32,7 @@ define Package/base-files SECTION:=base CATEGORY:=Base system DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:librecmc-keyring +fstools +fwtool - TITLE:=Base filesystem for libreCMC + TITLE:=Base filesystem for Lede URL:=http://openwrt.org/ VERSION:=$(PKG_RELEASE)-$(REVISION) endef @@ -137,6 +138,7 @@ define Package/base-files/install mkdir -p $(1)/CONTROL mkdir -p $(1)/dev + mkdir -p $(1)/etc/config mkdir -p $(1)/etc/crontabs mkdir -p $(1)/etc/rc.d mkdir -p $(1)/overlay diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 2f03e02409..183bd6b7a9 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -119,17 +119,14 @@ generate_network() { ;; pppoe) - # fixup IPv6 slave interface - ifname="pppoe-$1" - uci -q batch <<-EOF set network.$1.proto='pppoe' set network.$1.username='username' set network.$1.password='password' - set network.$1.ipv6='auto' + set network.$1.ipv6='1' delete network.${1}6 set network.${1}6='interface' - set network.${1}6.ifname='$ifname' + set network.${1}6.ifname='@${1}' set network.${1}6.proto='dhcpv6' EOF ;; diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system index 8c5f677299..c947ad340e 100755 --- a/package/base-files/files/etc/init.d/system +++ b/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:lede' \ + 'hostname:string:librecmc' \ 'conloglevel:uinteger' \ 'buffersize:uinteger' \ 'timezone:string:UTC' \ diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh index 1b0c717204..08cce49df2 100644 --- a/package/base-files/files/lib/functions/network.sh +++ b/package/base-files/files/lib/functions/network.sh @@ -29,18 +29,9 @@ network_get_ipaddr() { # 1: destination variable # 2: interface network_get_ipaddr6() { - local __addr - - if __network_ifstatus "__addr" "$2" "['ipv6-address','ipv6-prefix-assignment'][0].address"; then - case "$__addr" in - *:) export "$1=${__addr}1" ;; - *) export "$1=${__addr}" ;; - esac - return 0 - fi - - unset $1 - return 1 + __network_ifstatus "$1" "$2" "['ipv6-address'][0].address" || \ + __network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][0]['local-address'].address" || \ + return 1 } # determine first IPv4 subnet of given logical interface @@ -54,7 +45,36 @@ network_get_subnet() { # 1: destination variable # 2: interface network_get_subnet6() { - __network_ifstatus "$1" "$2" "['ipv6-address'][0]['address','mask']" "/" + local __nets __addr + + if network_get_subnets6 __nets "$2"; then + # Attempt to return first non-fe80::/10, non-fc::/7 range + for __addr in $__nets; do + case "$__addr" in fe[8ab]?:*|f[cd]??:*) + continue + esac + export "$1=$__addr" + return 0 + done + + # Attempt to return first non-fe80::/10 range + for __addr in $__nets; do + case "$__addr" in fe[8ab]?:*) + continue + esac + export "$1=$__addr" + return 0 + done + + # Return first item + for __addr in $__nets; do + export "$1=$__addr" + return 0 + done + fi + + unset "$1" + return 1 } # determine first IPv6 prefix of given logical interface @@ -78,14 +98,19 @@ network_get_ipaddrs6() { local __addr local __list="" - if __network_ifstatus "__addr" "$2" "['ipv6-address','ipv6-prefix-assignment'][*].address"; then + if __network_ifstatus "__addr" "$2" "['ipv6-address'][*].address"; then for __addr in $__addr; do - case "$__addr" in - *:) __list="${__list:+$__list }${__addr}1" ;; - *) __list="${__list:+$__list }${__addr}" ;; - esac + __list="${__list:+$__list }${__addr}" + done + fi + + if __network_ifstatus "__addr" "$2" "['ipv6-prefix-assignment'][*]['local-address'].address"; then + for __addr in $__addr; do + __list="${__list:+$__list }${__addr}" done + fi + if [ -n "$__list" ]; then export "$1=$__list" return 0 fi @@ -98,18 +123,13 @@ network_get_ipaddrs6() { # 1: destination variable # 2: interface network_get_ipaddrs_all() { - local __addr - local __list="" + local __addr __addr6 - if __network_ifstatus "__addr" "$2" "['ipv4-address','ipv6-address','ipv6-prefix-assignment'][*].address"; then - for __addr in $__addr; do - case "$__addr" in - *:) __list="${__list:+$__list }${__addr}1" ;; - *) __list="${__list:+$__list }${__addr}" ;; - esac - done + network_get_ipaddrs __addr "$2" + network_get_ipaddrs6 __addr6 "$2" - export "$1=$__list" + if [ -n "$__addr" -o -n "$__addr6" ]; then + export "$1=${__addr:+$__addr }$__addr6" return 0 fi @@ -128,17 +148,24 @@ network_get_subnets() { # 1: destination variable # 2: interface network_get_subnets6() { - local __addr + local __addr __mask local __list="" - if __network_ifstatus "__addr" "$2" "['ipv6-address','ipv6-prefix-assignment'][*]['address','mask']" "/ "; then + if __network_ifstatus "__addr" "$2" "['ipv6-address'][*]['address','mask']" "/ "; then for __addr in $__addr; do - case "$__addr" in - *:/*) __list="${__list:+$__list }${__addr%/*}1/${__addr##*/}" ;; - *) __list="${__list:+$__list }${__addr}" ;; - esac + __list="${__list:+$__list }${__addr}" done + fi + + if __network_ifstatus "__addr" "$2" "['ipv6-prefix-assignment'][*]['local-address'].address" && \ + __network_ifstatus "__mask" "$2" "['ipv6-prefix-assignment'][*].mask"; then + for __addr in $__addr; do + __list="${__list:+$__list }${__addr}/${__mask%% *}" + __mask="${__mask#* }" + done + fi + if [ -n "$__list" ]; then export "$1=$__list" return 0 fi diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 3500d49baa..7cc63ffc80 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -35,7 +35,7 @@ _ucidef_set_interface() { json_select_object "$name" json_add_string ifname "$iface" - if ! json_is_a protocol string; then + if ! json_is_a protocol string || [ -n "$proto" ]; then case "$proto" in static|dhcp|none|pppoe) : ;; *) @@ -619,6 +619,26 @@ ucidef_add_gpio_switch() { json_select .. } +ucidef_set_hostname() { + local hostname="$1" + + json_select_object system + json_add_string hostname "$hostname" + json_select .. +} + +ucidef_set_ntpserver() { + local server + + json_select_object system + json_select_array ntpserver + for server in "$@"; do + json_add_string "" "$server" + done + json_select .. + json_select .. +} + board_config_update() { json_init [ -f ${CFG} ] && json_load "$(cat ${CFG})" diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index a30bf34f6e..7a97a8dd0f 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -96,6 +96,8 @@ preinit_config_board() { } preinit_ip() { + [ "$pi_preinit_no_failsafe" = "y" ] && return + # if the preinit interface isn't specified and ifname is set in # preinit.arch use that interface if [ -z "$pi_ifname" ]; then @@ -107,6 +109,8 @@ preinit_ip() { elif [ -d "/etc/board.d/" ]; then preinit_config_board fi + + preinit_net_echo "Doing Lede Preinit\n" } preinit_ip_deconfig() { @@ -146,7 +150,6 @@ preinit_echo() { } pi_indicate_preinit() { - preinit_net_echo "Doing Lede Preinit\n" set_state preinit } diff --git a/package/base-files/files/usr/lib/os-release b/package/base-files/files/usr/lib/os-release index 21abf969e1..d134bf4575 100644 --- a/package/base-files/files/usr/lib/os-release +++ b/package/base-files/files/usr/lib/os-release @@ -1,7 +1,7 @@ NAME="%D" VERSION="%V, %N" ID="%d" -ID_LIKE="lede openwrt" +ID_LIKE="librecmc openwrt" PRETTY_NAME="%D %N %V" VERSION_ID="%v" HOME_URL="%m" diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index fd231a4b38..7724f7b558 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -92,7 +92,7 @@ config TARGET_PREINIT_NETMASK config TARGET_PREINIT_BROADCAST string prompt "Broadcast address for preinit network messages" if PREINITOPT - default "192.168.1.255" + default "192.168.10.255" help Broadcast address to which to send preinit network messages, as as failsafe messages @@ -201,13 +201,13 @@ if VERSIONOPT %c .. Configured release revision code or value of %R, lowercase %N .. Release name, uppercase %n .. Release name, lowercase - %D .. Distribution name or "Lede", uppercase - %d .. Distribution name or "lede", lowercase + %D .. Distribution name or "libreCMC", uppercase + %d .. Distribution name or "librecmc", lowercase %T .. Target name %S .. Target/Subtarget name %A .. Package architecture %t .. Build taint flags, e.g. "no-all busybox" - %M .. Manufacturer name or "Lede" + %M .. Manufacturer name or "libreCMC" %P .. Product name or "Generic" %h .. Hardware revision or "v0" diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 67526024e5..a3092562c5 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -436,7 +436,7 @@ endef define KernelPackage/crypto-md5/octeon FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-md5.ko - AUTOLOAD:=$(call AutoLoad,09,octeon-md5) + AUTOLOAD+=$(call AutoLoad,09,octeon-md5) endef $(eval $(call KernelPackage,crypto-md5)) @@ -468,12 +468,12 @@ endef define KernelPackage/crypto-sha1/octeon FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha1.ko - AUTOLOAD:=$(call AutoLoad,09,octeon-sha1) + AUTOLOAD+=$(call AutoLoad,09,octeon-sha1) endef define KernelPackage/crypto-sha1/x86/64 FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko - AUTOLOAD:=$(call AutoLoad,09,sha1-ssse3) + AUTOLOAD+=$(call AutoLoad,09,sha1-ssse3) endef $(eval $(call KernelPackage,crypto-sha1)) @@ -493,12 +493,12 @@ endef define KernelPackage/crypto-sha256/octeon FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha256.ko - AUTOLOAD:=$(call AutoLoad,09,octeon-sha256) + AUTOLOAD+=$(call AutoLoad,09,octeon-sha256) endef define KernelPackage/crypto-sha256/x86/64 FILES+=$(LINUX_DIR)/arch/x86/crypto/sha256-ssse3.ko - AUTOLOAD:=$(call AutoLoad,09,sha256-ssse3) + AUTOLOAD+=$(call AutoLoad,09,sha256-ssse3) endef $(eval $(call KernelPackage,crypto-sha256)) @@ -518,12 +518,12 @@ endef define KernelPackage/crypto-sha512/octeon FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha512.ko - AUTOLOAD:=$(call AutoLoad,09,octeon-sha512) + AUTOLOAD+=$(call AutoLoad,09,octeon-sha512) endef define KernelPackage/crypto-sha512/x86/64 FILES+=$(LINUX_DIR)/arch/x86/crypto/sha512-ssse3.ko - AUTOLOAD:=$(call AutoLoad,09,sha512-ssse3) + AUTOLOAD+=$(call AutoLoad,09,sha512-ssse3) endef $(eval $(call KernelPackage,crypto-sha512)) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index bd9a1a10f2..99d85ab049 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -446,7 +446,6 @@ endef $(eval $(call KernelPackage,ne2k-pci)) - define KernelPackage/e1000 SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Intel(R) PRO/1000 PCI cards kernel support diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index a5941d2310..21547fe015 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -360,8 +360,6 @@ define KernelPackage/nf-nathelper/description Default Netfilter (IPv4) Conntrack and NAT helpers Includes: - ftp - - irc - - tftp endef $(eval $(call KernelPackage,nf-nathelper)) @@ -381,11 +379,13 @@ define KernelPackage/nf-nathelper-extra/description Includes: - amanda - h323 + - irc - mms - pptp - proto_gre - sip - snmp_basic + - tftp - broadcast endef diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index de5d8fc2c6..75aa3d3fc4 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -67,7 +67,7 @@ define KernelPackage/sound-core/uml FILES:= \ $(LINUX_DIR)/sound/soundcore.ko \ $(LINUX_DIR)/arch/um/drivers/hostaudio.ko - AUTOLOAD:=$(call AutoLoad,30,soundcore hostaudio) + AUTOLOAD+=$(call AutoLoad,30,soundcore hostaudio) endef define KernelPackage/sound-core/description diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index fb85f23223..13ff14cbb6 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -47,7 +47,7 @@ define KernelPackage/backlight-pwm AUTOLOAD:=$(call AutoProbe,video pwm_bl) endef -define KernelPackage/backlight/backlight-pwm +define KernelPackage/backlight-pwm/description Kernel module for PWM based Backlight support. endef @@ -72,7 +72,7 @@ endef define KernelPackage/fb/x86 FILES+=$(LINUX_DIR)/arch/x86/video/fbdev.ko - AUTOLOAD:=$(call AutoLoad,06,fbdev fb) + AUTOLOAD+=$(call AutoLoad,06,fbdev fb) endef $(eval $(call KernelPackage,fb)) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index baa023ecf6..82c374353e 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -268,7 +268,7 @@ mac80211_hostapd_setup_base() { vht_max_mpdu_hw=11454 [ "$vht_max_mpdu_hw" != 3895 ] && \ vht_capab="$vht_capab[MAX-MPDU-$vht_max_mpdu_hw]" - + # maximum A-MPDU length exponent vht_max_a_mpdu_len_exp_hw=0 [ "$(($vht_cap & 58720256))" -ge 8388608 -a 1 -le "$vht_max_a_mpdu_len_exp" ] && \ @@ -566,7 +566,7 @@ mac80211_setup_adhoc() { [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate" iw dev "$ifname" ibss join "$ssid" $freq $ibss_htmode fixed-freq $bssid \ - ${beacon_int:+beacon-interval $beacon_int} \ + beacon-interval $beacon_int \ ${brstr:+basic-rates $brstr} \ ${mcval:+mcast-rate $mcval} \ ${keyspec:+keys $keyspec} @@ -646,7 +646,9 @@ mac80211_setup_vif() { esac freq="$(get_freq "$phy" "$channel")" - iw dev "$ifname" mesh join "$mesh_id" freq $freq $mesh_htmode ${mcval:+mcast-rate $mcval} + iw dev "$ifname" mesh join "$mesh_id" freq $freq $mesh_htmode \ + ${mcval:+mcast-rate $mcval} \ + beacon-interval $beacon_int fi for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do @@ -698,7 +700,7 @@ drv_mac80211_setup() { country chanbw distance \ txpower antenna_gain \ rxantenna txantenna \ - frag rts beacon_int htmode + frag rts beacon_int:100 htmode json_get_values basic_rate_list basic_rate json_select .. diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index f87723c180..7d3d6f396b 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -92,7 +92,7 @@ detect_mac80211() { htmode="VHT80" } - [ -n $htmode ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode" + [ -n "$htmode" ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode" if [ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${dev} ]; then path="$(readlink -f /sys/class/ieee80211/${dev}/device)" @@ -123,8 +123,8 @@ detect_mac80211() { set wireless.default_radio${devidx}.network=lan set wireless.default_radio${devidx}.mode=ap set wireless.default_radio${devidx}.ssid=libreCMC - set wireless.default_radio${devidx}.encryption=psk - set wireless.default_radio${devidx}.key=librecmc + set wireless.default_radio${devidx}.encryption=psk + set wireless.default_radio${devidx}.key=librecmc EOF uci -q commit wireless diff --git a/package/kernel/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch b/package/kernel/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch deleted file mode 100644 index a901a44ba4..0000000000 --- a/package/kernel/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/drivers/net/wireless/marvell/mwl8k.c -+++ b/drivers/net/wireless/marvell/mwl8k.c -@@ -5681,6 +5681,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw") - MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API)); - - static const struct pci_device_id mwl8k_pci_id_table[] = { -+ { PCI_VDEVICE(MARVELL, 0x2a02), .driver_data = MWL8363, }, - { PCI_VDEVICE(MARVELL, 0x2a0a), .driver_data = MWL8363, }, - { PCI_VDEVICE(MARVELL, 0x2a0c), .driver_data = MWL8363, }, - { PCI_VDEVICE(MARVELL, 0x2a24), .driver_data = MWL8363, }, diff --git a/package/kernel/mac80211/patches/940-mwl8k_init_devices_synchronously.patch b/package/kernel/mac80211/patches/940-mwl8k_init_devices_synchronously.patch deleted file mode 100644 index 357faee4bf..0000000000 --- a/package/kernel/mac80211/patches/940-mwl8k_init_devices_synchronously.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/drivers/net/wireless/marvell/mwl8k.c -+++ b/drivers/net/wireless/marvell/mwl8k.c -@@ -6264,6 +6264,8 @@ static int mwl8k_probe(struct pci_dev *p - - priv->running_bsses = 0; - -+ wait_for_completion(&priv->firmware_loading_complete); -+ - return rc; - - err_stop_firmware: -@@ -6297,8 +6299,6 @@ static void mwl8k_remove(struct pci_dev - return; - priv = hw->priv; - -- wait_for_completion(&priv->firmware_loading_complete); -- - if (priv->fw_state == FW_STATE_ERROR) { - mwl8k_hw_reset(priv); - goto unmap; diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index 101324de07..0e3383150d 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbedtls -PKG_VERSION:=2.5.1 -PKG_RELEASE:=2 +PKG_VERSION:=2.6.0 +PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz PKG_SOURCE_URL:=https://tls.mbed.org/download/ -PKG_HASH:=312f020006f0d8e9ede3ed8e73d907a629baf6475229703941769372ab0adee2 +PKG_HASH:=a99959d7360def22f9108d2d487c9de384fe76c349697176b1f22370080d5810 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ diff --git a/package/libs/mbedtls/patches/200-config.patch b/package/libs/mbedtls/patches/200-config.patch index fb5a74fc65..ce32be76a5 100644 --- a/package/libs/mbedtls/patches/200-config.patch +++ b/package/libs/mbedtls/patches/200-config.patch @@ -1,6 +1,6 @@ --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h -@@ -191,7 +191,7 @@ +@@ -220,7 +220,7 @@ * * Uncomment to get errors on using deprecated functions. */ @@ -9,7 +9,7 @@ /* \} name SECTION: System support */ -@@ -504,17 +504,17 @@ +@@ -539,17 +539,17 @@ * * Comment macros to disable the curve and functions for it */ @@ -35,7 +35,7 @@ #define MBEDTLS_ECP_DP_CURVE25519_ENABLED /** -@@ -539,8 +539,8 @@ +@@ -574,8 +574,8 @@ * Requires: MBEDTLS_HMAC_DRBG_C * * Comment this macro to disable deterministic ECDSA. @@ -45,7 +45,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED -@@ -586,7 +586,7 @@ +@@ -621,7 +621,7 @@ * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA */ @@ -54,7 +54,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED -@@ -605,8 +605,8 @@ +@@ -640,8 +640,8 @@ * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA @@ -64,7 +64,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -@@ -631,7 +631,7 @@ +@@ -666,7 +666,7 @@ * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA */ @@ -73,7 +73,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -@@ -758,7 +758,7 @@ +@@ -793,7 +793,7 @@ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 */ @@ -82,7 +82,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -@@ -782,7 +782,7 @@ +@@ -817,7 +817,7 @@ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 */ @@ -91,7 +91,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED -@@ -886,7 +886,7 @@ +@@ -921,7 +921,7 @@ * This option is only useful if both MBEDTLS_SHA256_C and * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used. */ @@ -100,7 +100,7 @@ /** * \def MBEDTLS_ENTROPY_NV_SEED -@@ -980,14 +980,14 @@ +@@ -1015,14 +1015,14 @@ * Uncomment this macro to disable the use of CRT in RSA. * */ @@ -117,7 +117,7 @@ /** * \def MBEDTLS_SHA256_SMALLER -@@ -1003,7 +1003,7 @@ +@@ -1038,7 +1038,7 @@ * * Uncomment to enable the smaller implementation of SHA256. */ @@ -126,7 +126,7 @@ /** * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES -@@ -1122,8 +1122,8 @@ +@@ -1157,8 +1157,8 @@ * misuse/misunderstand. * * Comment this to disable support for renegotiation. @@ -136,7 +136,7 @@ /** * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO -@@ -1297,8 +1297,8 @@ +@@ -1332,8 +1332,8 @@ * callbacks are provided by MBEDTLS_SSL_TICKET_C. * * Comment this macro to disable support for SSL session tickets @@ -146,7 +146,7 @@ /** * \def MBEDTLS_SSL_EXPORT_KEYS -@@ -1328,7 +1328,7 @@ +@@ -1363,7 +1363,7 @@ * * Comment this macro to disable support for truncated HMAC in SSL */ @@ -155,7 +155,7 @@ /** * \def MBEDTLS_THREADING_ALT -@@ -1362,8 +1362,8 @@ +@@ -1397,8 +1397,8 @@ * Requires: MBEDTLS_VERSION_C * * Comment this to disable run-time checking and save ROM space @@ -165,7 +165,7 @@ /** * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -@@ -1684,7 +1684,7 @@ +@@ -1719,7 +1719,7 @@ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 */ @@ -174,7 +174,7 @@ /** * \def MBEDTLS_CCM_C -@@ -1698,7 +1698,7 @@ +@@ -1733,7 +1733,7 @@ * This module enables the AES-CCM ciphersuites, if other requisites are * enabled as well. */ @@ -183,7 +183,7 @@ /** * \def MBEDTLS_CERTS_C -@@ -1710,7 +1710,7 @@ +@@ -1745,7 +1745,7 @@ * * This module is used for testing (ssl_client/server). */ @@ -192,7 +192,7 @@ /** * \def MBEDTLS_CIPHER_C -@@ -1763,7 +1763,7 @@ +@@ -1798,7 +1798,7 @@ * * This module provides debugging functions. */ @@ -201,7 +201,7 @@ /** * \def MBEDTLS_DES_C -@@ -1788,8 +1788,8 @@ +@@ -1823,8 +1823,8 @@ * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA * * PEM_PARSE uses DES/3DES for decrypting encrypted keys. @@ -211,7 +211,7 @@ /** * \def MBEDTLS_DHM_C -@@ -1943,8 +1943,8 @@ +@@ -1978,8 +1978,8 @@ * Requires: MBEDTLS_MD_C * * Uncomment to enable the HMAC_DRBG random number geerator. @@ -221,7 +221,7 @@ /** * \def MBEDTLS_MD_C -@@ -2221,7 +2221,7 @@ +@@ -2256,7 +2256,7 @@ * Caller: library/md.c * */ @@ -230,7 +230,7 @@ /** * \def MBEDTLS_RSA_C -@@ -2299,8 +2299,8 @@ +@@ -2334,8 +2334,8 @@ * Caller: * * Requires: MBEDTLS_SSL_CACHE_C @@ -240,7 +240,7 @@ /** * \def MBEDTLS_SSL_COOKIE_C -@@ -2321,8 +2321,8 @@ +@@ -2356,8 +2356,8 @@ * Caller: * * Requires: MBEDTLS_CIPHER_C @@ -250,7 +250,7 @@ /** * \def MBEDTLS_SSL_CLI_C -@@ -2421,8 +2421,8 @@ +@@ -2456,8 +2456,8 @@ * Module: library/version.c * * This module provides run-time version information. @@ -260,7 +260,7 @@ /** * \def MBEDTLS_X509_USE_C -@@ -2532,7 +2532,7 @@ +@@ -2567,7 +2567,7 @@ * Module: library/xtea.c * Caller: */ @@ -269,7 +269,7 @@ /* \} name SECTION: mbed TLS modules */ -@@ -2646,7 +2646,7 @@ +@@ -2681,7 +2681,7 @@ * recommended because of it is possible to generte SHA-1 collisions, however * this may be safe for legacy infrastructure where additional controls apply. */ diff --git a/package/network/config/gre/Makefile b/package/network/config/gre/Makefile index 90f92d4da7..9193f5c9fb 100644 --- a/package/network/config/gre/Makefile +++ b/package/network/config/gre/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gre PKG_VERSION:=1 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/gre/files/gre.sh b/package/network/config/gre/files/gre.sh index cd327ea2da..3301cee005 100755 --- a/package/network/config/gre/files/gre.sh +++ b/package/network/config/gre/files/gre.sh @@ -25,7 +25,7 @@ gre_generic_setup() { json_add_string mode "$mode" json_add_int mtu "${mtu:-1280}" [ -n "$df" ] && json_add_boolean df "$df" - [ -n "ttl" ] && json_add_int ttl "$ttl" + [ -n "$ttl" ] && json_add_int ttl "$ttl" [ -n "$tos" ] && json_add_string tos "$tos" json_add_boolean multicast "$multicast" json_add_string local "$local" diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 9a024ceadf..94fd70232c 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -37,7 +37,6 @@ define Package/dnsmasq/Default CATEGORY:=Base system TITLE:=DNS and DHCP server URL:=http://www.thekelleys.org.uk/dnsmasq/ - DEPENDS:=+libubus USERID:=dnsmasq=453:dnsmasq=453 endef @@ -49,14 +48,14 @@ endef define Package/dnsmasq-dhcpv6 $(call Package/dnsmasq/Default) TITLE += (with DHCPv6 support) - DEPENDS+=@IPV6 + DEPENDS:=@IPV6 VARIANT:=dhcpv6 endef define Package/dnsmasq-full $(call Package/dnsmasq/Default) TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPset, Conntrack, NO_ID enabled by default) - DEPENDS+=+PACKAGE_dnsmasq_full_dnssec:libnettle \ + DEPENDS:=+PACKAGE_dnsmasq_full_dnssec:libnettle \ +PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset \ +PACKAGE_dnsmasq_full_conntrack:libnetfilter-conntrack VARIANT:=full @@ -138,7 +137,7 @@ endif MAKE_FLAGS := \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ COPTS="$(COPTS)" \ PREFIX="/usr" @@ -151,17 +150,8 @@ define Package/dnsmasq/install $(INSTALL_DATA) ./files/dnsmasq.conf $(1)/etc/dnsmasq.conf $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/dnsmasq.init $(1)/etc/init.d/dnsmasq - $(INSTALL_DIR) $(1)/etc/hotplug.d/dhcp - $(INSTALL_DIR) $(1)/etc/hotplug.d/neigh $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp - $(INSTALL_DIR) $(1)/etc/hotplug.d/tftp $(INSTALL_DATA) ./files/dnsmasqsec.hotplug $(1)/etc/hotplug.d/ntp/25-dnsmasqsec - $(INSTALL_DIR) $(1)/usr/share/dnsmasq - $(INSTALL_DATA) ./files/rfc6761.conf $(1)/usr/share/dnsmasq/ - $(INSTALL_DIR) $(1)/usr/lib/dnsmasq - $(INSTALL_BIN) ./files/dhcp-script.sh $(1)/usr/lib/dnsmasq/dhcp-script.sh - $(INSTALL_DIR) $(1)/usr/share/acl.d - $(INSTALL_DATA) ./files/dnsmasq_acl.json $(1)/usr/share/acl.d/ endef Package/dnsmasq-dhcpv6/install = $(Package/dnsmasq/install) diff --git a/package/network/services/dnsmasq/files/dhcp-script.sh b/package/network/services/dnsmasq/files/dhcp-script.sh deleted file mode 100755 index 86032694c1..0000000000 --- a/package/network/services/dnsmasq/files/dhcp-script.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -[ -f "$USER_DHCPSCRIPT" ] && . "$USER_DHCPSCRIPT" "$@" - -case "$1" in - add) - export ACTION="add" - export MACADDR="$2" - export IPADDR="$3" - export HOSTNAME="$4" - exec /sbin/hotplug-call dhcp - ;; - del) - export ACTION="remove" - export MACADDR="$2" - export IPADDR="$3" - export HOSTNAME="$4" - exec /sbin/hotplug-call dhcp - ;; - old) - export ACTION="update" - export MACADDR="$2" - export IPADDR="$3" - export HOSTNAME="$4" - exec /sbin/hotplug-call dhcp - ;; - arp-add) - export ACTION="add" - export MACADDR="$2" - export IPADDR="$3" - exec /sbin/hotplug-call neigh - ;; - arp-del) - export ACTION="remove" - export MACADDR="$2" - export IPADDR="$3" - exec /sbin/hotplug-call neigh - ;; - tftp) - export ACTION="add" - export TFTP_SIZE="$2" - export TFTP_ADDR="$3" - export TFTP_PATH="$4" - exec /sbin/hotplug-call tftp - ;; -esac diff --git a/package/network/services/dnsmasq/files/dhcp.conf b/package/network/services/dnsmasq/files/dhcp.conf index 360c7d79ee..362b90a293 100644 --- a/package/network/services/dnsmasq/files/dhcp.conf +++ b/package/network/services/dnsmasq/files/dhcp.conf @@ -15,7 +15,7 @@ config dnsmasq option leasefile '/tmp/dhcp.leases' option resolvfile '/tmp/resolv.conf.auto' #list server '/mycompany.local/1.2.3.4' - option nonwildcard 1 # bind to & keep track of interfaces + #option nonwildcard 1 #list interface br-lan #list notinterface lo #list bogusnxdomain '64.94.110.11' diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 0149643959..a762cd3309 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -8,8 +8,6 @@ PROG=/usr/sbin/dnsmasq ADD_LOCAL_DOMAIN=1 ADD_LOCAL_HOSTNAME=1 -ADD_WAN_FQDN=0 -ADD_LOCAL_FQDN="" BASECONFIGFILE="/var/etc/dnsmasq.conf" BASEHOSTFILE="/tmp/hosts/dhcp" @@ -17,10 +15,6 @@ BASETIMESTAMPFILE="/etc/dnsmasq.time" TRUSTANCHORSFILE="/usr/share/dnsmasq/trust-anchors.conf" TIMEVALIDFILE="/var/state/dnsmasqsec" BASEDHCPSTAMPFILE="/var/run/dnsmasq" -RFC6761FILE="/usr/share/dnsmasq/rfc6761.conf" -DHCPSCRIPT="/usr/lib/dnsmasq/dhcp-script.sh" - -DNSMASQ_DHCP_VER=4 xappend() { local value="$1" @@ -89,24 +83,12 @@ log_once() { logger -t dnsmasq "$@" } -has_handler() { - local file - - for file in /etc/hotplug.d/dhcp/* /etc/hotplug.d/tftp/* /etc/hotplug.d/neigh/*; do - [ -f "$file" ] && return 0 - done - - return 1 -} - append_bool() { local section="$1" local option="$2" local value="$3" - local default="$4" local _loctmp - [ -z "$default" ] && default="0" - config_get_bool _loctmp "$section" "$option" "$default" + config_get_bool _loctmp "$section" "$option" 0 [ $_loctmp -gt 0 ] && xappend "$value" } @@ -125,10 +107,6 @@ append_server() { xappend "--server=$1" } -append_rev_server() { - xappend "--rev-server=$1" -} - append_address() { xappend "--address=$1" } @@ -138,12 +116,12 @@ append_ipset() { } append_interface() { - network_get_device ifname "$1" || ifname="$1" + network_get_device ifname "$1" || return xappend "--interface=$ifname" } append_notinterface() { - network_get_device ifname "$1" || ifname="$1" + network_get_device ifname "$1" || return xappend "--except-interface=$ifname" } @@ -159,10 +137,6 @@ append_pxe_service() { xappend "--pxe-service=$1" } -append_interface_name() { - xappend "--interface-name=$1,$2" -} - filter_dnsmasq() { local cfg="$1" func="$2" match_cfg="$3" found_cfg @@ -206,7 +180,6 @@ dhcp_remoteid_add() { } dhcp_circuitid_add() { - # TODO: DHCPV6 does not have circuitid; catch "option6:" local cfg="$1" config_get networkid "$cfg" networkid @@ -239,7 +212,6 @@ dhcp_userclass_add() { } dhcp_vendorclass_add() { - # TODO: DHCPV6 vendor class has stricter definitions; catch? fixup? local cfg="$1" config_get networkid "$cfg" networkid @@ -273,7 +245,6 @@ dhcp_match_add() { dhcp_host_add() { local cfg="$1" - local hosttag nametime addrs duids config_get_bool force "$cfg" force 0 @@ -285,9 +256,7 @@ dhcp_host_add() { config_get name "$cfg" name config_get ip "$cfg" ip - config_get hostid "$cfg" hostid - - [ -n "$ip" -o -n "$name" -o -n "$hostid" ] || return 0 + [ -n "$ip" -o -n "$name" ] || return 0 config_get_bool dns "$cfg" dns 0 [ "$dns" = "1" -a -n "$ip" -a -n "$name" ] && { @@ -295,105 +264,36 @@ dhcp_host_add() { } config_get mac "$cfg" mac - config_get duid "$cfg" duid - config_get tag "$cfg" tag - if [ -n "$mac" ]; then # --dhcp-host=00:20:e0:3b:13:af,192.168.0.199,lap - # many MAC are possible to track a laptop ON/OFF dock macs="" for m in $mac; do append macs "$m" ","; done - fi - - if [ $DNSMASQ_DHCP_VER -eq 6 -a -n "$duid" ]; then - # --dhcp-host=id:00:03:00:01:12:00:00:01:02:03,[::beef],lap - # one (virtual) machine gets one DUID per RFC3315 - duids="id:${duid// */}" - fi - - if [ -z "$macs" -a -z "$duids" ]; then - # --dhcp-host=lap,192.168.0.199,[::beef] + else + # --dhcp-host=lap,192.168.0.199 [ -n "$name" ] || return 0 macs="$name" name="" fi - if [ -n "$hostid" ]; then - hex_to_hostid hostid "$hostid" - fi + config_get tag "$cfg" tag - tags="" - if [ -n "$tag" ]; then - for t in $tag; do append tags "$t" ",set:"; done + if [ "$DHCPv6CAPABLE" -eq 1 ]; then + config_get duid "$cfg" duid + config_get hostid "$cfg" hostid + if [ -n "$hostid" ]; then + hex_to_hostid hostid "$hostid" + fi fi config_get_bool broadcast "$cfg" broadcast 0 - config_get leasetime "$cfg" leasetime - - [ "$broadcast" = "0" ] && broadcast= || broadcast=",set:needs-broadcast" + [ "$broadcast" = "0" ] && broadcast= - hosttag="${networkid:+,set:${networkid}}${tags:+,set:${tags}}$broadcast" - nametime="${name:+,$name}${leasetime:+,$leasetime}" - - if [ $DNSMASQ_DHCP_VER -eq 6 ]; then - addrs="${ip:+,$ip}${hostid:+,[::$hostid]}" - xappend "--dhcp-host=$macs${duids:+,$duids}$hosttag$addrs$nametime" - else - xappend "--dhcp-host=$macs$hosttag${ip:+,$ip}$nametime" - fi -} - -dhcp_this_host_add() { - local net="$1" - local ifname="$2" - local mode="$3" - local routerstub routername ifdashname - local lanaddr lanaddr6 lanaddrs6 ulaprefix - - if [ "$mode" -gt 0 ] ; then - ifdashname="${ifname//./-}" - routerstub="$( md5sum /etc/os-release )" - routerstub="router-${routerstub// */}" - routername="$( uci_get system @system[0] hostname $routerstub )" - - if [ "$mode" -gt 1 ] ; then - if [ "$mode" -gt 2 ] ; then - if [ "$mode" -gt 3 ] ; then - append_interface_name "$ifdashname.$routername.$DOMAIN" "$ifname" - fi - - append_interface_name "$routername.$DOMAIN" "$ifname" - fi - - # All IP addresses discovered by dnsmasq will be labeled (except fe80::) - append_interface_name "$routername" "$ifname" - - else - # This uses a static host file entry for only limited addresses. - # Use dnsmasq option "--expandhosts" to enable FQDN on host files. - ulaprefix="$(uci_get network @globals[0] ula_prefix)" - network_get_ipaddr lanaddr "$net" - network_get_ipaddrs6 lanaddrs6 "$net" - - if [ -n "$lanaddr" ] ; then - dhcp_domain_add "" "$routername" "$lanaddr" - fi + config_get leasetime "$cfg" leasetime - if [ -n "$ulaprefix" -a -n "$lanaddrs6" ] ; then - for lanaddr6 in $lanaddrs6 ; do - case "$lanaddr6" in - "${ulaprefix%%:/*}"*) - dhcp_domain_add "" "$routername" "$lanaddr6" - ;; - esac - done - fi - fi - fi + xappend "--dhcp-host=$macs${duid:+,id:$duid}${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip${hostid:+,[::$hostid]}}${name:+,$name}${leasetime:+,$leasetime}" } dhcp_tag_add() { - # NOTE: dnsmasq has explicit "option6:" prefix for DHCPv6 so no collisions local cfg="$1" tag="$cfg" @@ -424,7 +324,6 @@ dhcp_mac_add() { } dhcp_boot_add() { - # TODO: BOOTURL is different between DHCPv4 and DHCPv6 local cfg="$1" config_get networkid "$cfg" networkid @@ -447,30 +346,24 @@ dhcp_boot_add() { dhcp_add() { local cfg="$1" - local dhcp6range="::" - local nettag - local tags - config_get net "$cfg" interface [ -n "$net" ] || return 0 + config_get dhcpv4 "$cfg" dhcpv4 + [ "$dhcpv4" != "disabled" ] || return 0 + config_get networkid "$cfg" networkid [ -n "$networkid" ] || networkid="$net" + network_get_subnet subnet "$net" || return 0 network_get_device ifname "$net" || return 0 + network_get_protocol proto "$net" || return 0 [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && { DNS_SERVERS="$DNS_SERVERS $dnsserver" } - append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && { - # Many ISP do not have useful names for DHCP customers (your WAN). - dhcp_this_host_add "$net" "$ifname" "$ADD_WAN_FQDN" - return 0 - } - - network_get_subnet subnet "$net" || return 0 - network_get_protocol proto "$net" || return 0 + append_bool "$cfg" ignore "--no-dhcp-interface=$ifname" && return 0 # Do not support non-static interfaces for now [ static = "$proto" ] || return 0 @@ -482,107 +375,21 @@ dhcp_add() { config_get_bool force "$cfg" force 0 [ $force -gt 0 ] || dhcp_check "$ifname" || return 0 - config_get start "$cfg" start 100 - config_get limit "$cfg" limit 150 - config_get leasetime "$cfg" leasetime 12h + config_get start "$cfg" start + config_get limit "$cfg" limit + config_get leasetime "$cfg" leasetime config_get options "$cfg" options config_get_bool dynamicdhcp "$cfg" dynamicdhcp 1 - config_get dhcpv4 "$cfg" dhcpv4 - config_get dhcpv6 "$cfg" dhcpv6 - - config_get ra "$cfg" ra - config_get ra_management "$cfg" ra_management - config_get ra_preference "$cfg" ra_preference - config_get dns "$cfg" dns - - config_list_foreach "$cfg" "interface_name" append_interface_name "$ifname" - - # Put the router host name on this DHCP served interface address(es) - dhcp_this_host_add "$net" "$ifname" "$ADD_LOCAL_FQDN" - - start="$( dhcp_calc "$start" )" - - add_tag() { - tags="${tags}tag:$1," - } - config_list_foreach "$cfg" tag add_tag - - nettag="${networkid:+set:${networkid},}" - - if [ "$limit" -gt 0 ] ; then - limit=$((limit-1)) - fi - + leasetime="${leasetime:-12h}" + start="$(dhcp_calc "${start:-100}")" + limit="${limit:-150}" + [ "$limit" -gt 0 ] && limit=$((limit-1)) eval "$(ipcalc.sh "${subnet%%/*}" $netmask $start $limit)" + if [ "$dynamicdhcp" = "0" ]; then END="static"; fi + xappend "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ $options}" - if [ "$dynamicdhcp" = "0" ] ; then - END="static" - dhcp6range="::,static" - else - dhcp6range="::1000,::ffff" - fi - - - if [ "$dhcpv4" != "disabled" ] ; then - xappend "--dhcp-range=$tags$nettag$START,$END,$NETMASK,$leasetime${options:+ $options}" - fi - - - if [ $DNSMASQ_DHCP_VER -eq 6 -a "$ra" = "server" ] ; then - # Note: dnsmasq cannot just be a DHCPv6 server (all-in-1) - # and let some other machine(s) send RA pointing to it. - - case $ra_preference in - *high*) - xappend "--ra-param=$ifname,high,0,7200" - ;; - *low*) - xappend "--ra-param=$ifname,low,0,7200" - ;; - *) - # Send UNSOLICITED RA at default interval and live for 2 hours. - # TODO: convert flexible lease time into route life time (only seconds). - xappend "--ra-param=$ifname,0,7200" - ;; - esac - - if [ "$dhcpv6" = "disabled" ] ; then - ra_management="3" - fi - - - case $ra_management in - 0) - # SLACC with DCHP for extended options - xappend "--dhcp-range=$nettag::,constructor:$ifname,ra-stateless,ra-names" - ;; - 2) - # DHCP address and RA only for management redirection - xappend "--dhcp-range=$nettag$dhcp6range,constructor:$ifname,$leasetime" - ;; - 3) - # SLAAC only but dnsmasq attempts to link HOSTNAME, DHCPv4 MAC, and SLAAC - xappend "--dhcp-range=$nettag::,constructor:$ifname,ra-only,ra-names" - ;; - *) - # SLAAC and full DHCP - xappend "--dhcp-range=$nettag$dhcp6range,constructor:$ifname,slaac,ra-names,$leasetime" - ;; - esac - - if [ -n "$dns" ]; then - dnss="" - for d in $dns; do append dnss "[$d]" ","; done - else - dnss="[::]" - fi - - dhcp_option_append "option6:dns-server,$dnss" "$networkid" - fi - - dhcp_option_add "$cfg" "$networkid" 0 - dhcp_option_add "$cfg" "$networkid" 2 + dhcp_option_add "$cfg" "$networkid" } dhcp_option_append() { @@ -594,24 +401,21 @@ dhcp_option_append() { } dhcp_option_add() { - # NOTE: dnsmasq has explicit "option6:" prefix for DHCPv6 so no collisions local cfg="$1" local networkid="$2" local force="$3" - local opt="dhcp_option" [ "$force" = "0" ] && force= - [ "$force" = "2" ] && opt="dhcp_option_force" local list_len - config_get list_len "$cfg" "${opt}_LENGTH" + config_get list_len "$cfg" dhcp_option_LENGTH if [ -n "$list_len" ]; then - config_list_foreach "$cfg" "$opt" dhcp_option_append "$networkid" "$force" + config_list_foreach "$cfg" dhcp_option dhcp_option_append "$networkid" "$force" else - config_get dhcp_option "$cfg" "$opt" + config_get dhcp_option "$cfg" dhcp_option - [ -n "$dhcp_option" ] && echo "Warning: the 'option $opt' syntax is deprecated, use 'list $opt'" >&2 + [ -n "$dhcp_option" ] && echo "Warning: the 'option dhcp_option' syntax is deprecated, use 'list dhcp_option'" >&2 local option for option in $dhcp_option; do @@ -729,7 +533,7 @@ dhcp_relay_add() { dnsmasq_start() { - local cfg="$1" disabled resolvfile user_dhcpscript + local cfg="$1" disabled config_get_bool disabled "$cfg" disabled 0 [ "$disabled" -gt 0 ] && return 0 @@ -762,41 +566,6 @@ dnsmasq_start() $PROG --version | grep -osqE "^Compile time options:.* DHCPv6( |$)" && DHCPv6CAPABLE=1 || DHCPv6CAPABLE=0 - - if [ -x /usr/sbin/odhcpd -a -x /etc/init.d/odhcpd ] ; then - local odhcpd_is_main odhcpd_is_enabled - config_get odhcpd_is_main odhcpd maindhcp 0 - /etc/init.d/odhcpd enabled && odhcpd_is_enabled=1 || odhcpd_is_enabled=0 - - - if [ "$odhcpd_is_enabled" -eq 0 -a "$DHCPv6CAPABLE" -eq 1 ] ; then - # DHCP V4 and V6 in DNSMASQ - DNSMASQ_DHCP_VER=6 - elif [ "$odhcpd_is_main" -gt 0 ] ; then - # ODHCPD is doing it all - DNSMASQ_DHCP_VER=0 - else - # You have ODHCPD but use DNSMASQ for DHCPV4 - DNSMASQ_DHCP_VER=4 - fi - - elif [ "$DHCPv6CAPABLE" -eq 1 ] ; then - # DHCP V4 and V6 in DNSMASQ - DNSMASQ_DHCP_VER=6 - else - DNSMASQ_DHCP_VER=4 - fi - - # Allow DHCP/DHCPv6 to be handled by ISC DHCPD - if [ -x /usr/sbin/dhcpd ] ; then - if [ -x /etc/init.d/dhcpd ] ; then - /etc/init.d/dhcpd enabled && DNSMASQ_DHCP_VER=0 - fi - if [ -x /etc/init.d/dhcpd6 -a "$DNSMASQ_DHCP_VER" -gt 0 ] ; then - /etc/init.d/dhcpd6 enabled && DNSMASQ_DHCP_VER=4 - fi - fi - append_bool "$cfg" authoritative "--dhcp-authoritative" append_bool "$cfg" nodaemon "--no-daemon" append_bool "$cfg" domainneeded "--domain-needed" @@ -809,11 +578,12 @@ dnsmasq_start() append_bool "$cfg" localise_queries "--localise-queries" append_bool "$cfg" readethers "--read-ethers" append_bool "$cfg" dbus "--enable-dbus" + append_bool "$cfg" boguspriv "--bogus-priv" append_bool "$cfg" expandhosts "--expand-hosts" config_get tftp_root "$cfg" "tftp_root" [ -n "$tftp_root" ] && mkdir -p "$tftp_root" && append_bool "$cfg" enable_tftp "--enable-tftp" append_bool "$cfg" tftp_no_fail "--tftp-no-fail" - append_bool "$cfg" nonwildcard "--bind-dynamic" 1 + append_bool "$cfg" nonwildcard "--bind-dynamic" append_bool "$cfg" fqdn "--dhcp-fqdn" append_bool "$cfg" proxydnssec "--proxy-dnssec" append_bool "$cfg" localservice "--local-service" @@ -824,7 +594,7 @@ dnsmasq_start() append_bool "$cfg" noping "--no-ping" append_parm "$cfg" logfacility "--log-facility" - + append_parm "$cfg" dhcpscript "--dhcp-script" append_parm "$cfg" cachesize "--cache-size" append_parm "$cfg" dnsforwardmax "--dns-forward-max" append_parm "$cfg" port "--port" @@ -836,7 +606,6 @@ dnsmasq_start() append_parm "$cfg" "domain" "--domain" append_parm "$cfg" "local" "--server" config_list_foreach "$cfg" "server" append_server - config_list_foreach "$cfg" "rev_server" append_rev_server config_list_foreach "$cfg" "address" append_address config_list_foreach "$cfg" "ipset" append_ipset config_list_foreach "$cfg" "interface" append_interface @@ -844,6 +613,7 @@ dnsmasq_start() config_list_foreach "$cfg" "addnhosts" append_addnhosts config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain append_parm "$cfg" "leasefile" "--dhcp-leasefile" "/tmp/dhcp.leases" + append_parm "$cfg" "resolvfile" "--resolv-file" "/tmp/resolv.conf.auto" append_parm "$cfg" "serversfile" "--servers-file" append_parm "$cfg" "tftp_root" "--tftp-root" append_parm "$cfg" "dhcp_boot" "--dhcp-boot" @@ -854,21 +624,12 @@ dnsmasq_start() config_get_bool ADD_LOCAL_DOMAIN "$cfg" add_local_domain 1 config_get_bool ADD_LOCAL_HOSTNAME "$cfg" add_local_hostname 1 - config_get ADD_LOCAL_FQDN "$cfg" add_local_fqdn "" - config_get ADD_WAN_FQDN "$cfg" add_wan_fqdn 0 - - if [ -z "$ADD_LOCAL_FQDN" ] ; then - # maintain support for previous UCI - ADD_LOCAL_FQDN="$ADD_LOCAL_HOSTNAME" - fi config_get_bool readethers "$cfg" readethers [ "$readethers" = "1" -a \! -e "/etc/ethers" ] && touch /etc/ethers - config_get user_dhcpscript $cfg dhcpscript - if has_handler || [ -n "$user_dhcpscript" ]; then - xappend "--dhcp-script=$DHCPSCRIPT" - fi + config_get resolvfile $cfg resolvfile + config_get dhcpscript $cfg dhcpscript config_get leasefile $cfg leasefile "/tmp/dhcp.leases" [ -n "$leasefile" -a \! -e "$leasefile" ] && touch "$leasefile" @@ -881,8 +642,6 @@ dnsmasq_start() [ -n "$resolvfile" -a \! -e "$resolvfile" ] && touch "$resolvfile" fi - [ -n "$resolvfile" ] && xappend "--resolv-file=$resolvfile" - config_get hostsfile "$cfg" dhcphostsfile [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile" @@ -929,7 +688,6 @@ dnsmasq_start() } dhcp_option_add "$cfg" "" 0 - dhcp_option_add "$cfg" "" 2 xappend "--dhcp-broadcast=tag:needs-broadcast" @@ -963,31 +721,37 @@ dnsmasq_start() config_foreach filter_dnsmasq hostrecord dhcp_hostrecord_add "$cfg" config_foreach filter_dnsmasq relay dhcp_relay_add "$cfg" + # add own hostname + [ $ADD_LOCAL_HOSTNAME -eq 1 ] && { + local lanaddr lanaddr6 + local ulaprefix="$(uci_get network @globals[0] ula_prefix)" + local hostname="$(uci_get system @system[0] hostname Lede)" + + network_get_ipaddr lanaddr "lan" && { + dhcp_domain_add "" "$hostname" "$lanaddr" + } + + [ -n "$ulaprefix" ] && network_get_ipaddrs6 lanaddr6 "lan" && { + for lanaddr6 in $lanaddr6; do + case "$lanaddr6" in + "${ulaprefix%%:/*}"*) + dhcp_domain_add "" "$hostname" "$lanaddr6" + ;; + esac + done + } + } + echo >> $CONFIGFILE_TMP config_foreach filter_dnsmasq srvhost dhcp_srv_add "$cfg" config_foreach filter_dnsmasq mxhost dhcp_mx_add "$cfg" echo >> $CONFIGFILE_TMP - config_get_bool boguspriv "$cfg" boguspriv 1 - [ "$boguspriv" -gt 0 ] && { - xappend "--bogus-priv" - [ -r "$RFC6761FILE" ] && xappend "--conf-file=$RFC6761FILE" - } - - if [ "$DNSMASQ_DHCP_VER" -gt 4 ] ; then - # Enable RA feature for when/if it is constructed, - # and RA is selected per interface pool (RA, DHCP, or both), - # but no one (should) want RA broadcast in syslog - config_foreach filter_dnsmasq dhcp dhcp_add "$cfg" - xappend "--enable-ra" - xappend "--quiet-ra" - append_bool "$cfg" quietdhcp "--quiet-dhcp6" - - elif [ "$DNSMASQ_DHCP_VER" -gt 0 ] ; then + config_get odhcpd_is_active odhcpd maindhcp + if [ "$odhcpd_is_active" != "1" ]; then config_foreach filter_dnsmasq dhcp dhcp_add "$cfg" fi - echo >> $CONFIGFILE_TMP config_foreach filter_dnsmasq cname dhcp_cname_add "$cfg" echo >> $CONFIGFILE_TMP @@ -1009,7 +773,6 @@ dnsmasq_start() procd_open_instance $cfg procd_set_param command $PROG -C $CONFIGFILE -k -x /var/run/dnsmasq/dnsmasq."${cfg}".pid procd_set_param file $CONFIGFILE - [ -n "$user_dhcpscript" ] && procd_set_param env USER_DHCPSCRIPT="$user_dhcpscript" procd_set_param respawn local dnsmasqconffile="/etc/dnsmasq.${cfg}.conf" @@ -1018,7 +781,7 @@ dnsmasq_start() fi procd_add_jail dnsmasq ubus log - procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT + procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvfile $dhcpscript /etc/hosts /etc/ethers $EXTRA_MOUNT procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile procd_close_instance diff --git a/package/network/services/dnsmasq/files/dnsmasq_acl.json b/package/network/services/dnsmasq/files/dnsmasq_acl.json deleted file mode 100644 index 00ec7d0f03..0000000000 --- a/package/network/services/dnsmasq/files/dnsmasq_acl.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "user": "dnsmasq", - "publish": [ "dnsmasq" ] -} diff --git a/package/network/services/dnsmasq/files/rfc6761.conf b/package/network/services/dnsmasq/files/rfc6761.conf deleted file mode 100644 index ebc1a12118..0000000000 --- a/package/network/services/dnsmasq/files/rfc6761.conf +++ /dev/null @@ -1,15 +0,0 @@ -# RFC6761 included configuration file for dnsmasq -# -# includes a list of domains that should not be forwarded to Internet name servers -# to reduce burden on them, asking questions that they won't know the answer to. - -server=/bind/ -server=/example/ -server=/example.com/ -server=/example.org/ -server=/example.net/ -server=/invalid/ -server=/local/ -server=/localhost/ -server=/onion/ -server=/test/ diff --git a/package/network/services/dnsmasq/patches/240-ubus.patch b/package/network/services/dnsmasq/patches/240-ubus.patch deleted file mode 100644 index 2d37b5d2fd..0000000000 --- a/package/network/services/dnsmasq/patches/240-ubus.patch +++ /dev/null @@ -1,126 +0,0 @@ ---- a/src/dnsmasq.c -+++ b/src/dnsmasq.c -@@ -19,6 +19,8 @@ - - #include "dnsmasq.h" - -+#include -+ - struct daemon *daemon; - - static volatile pid_t pid = 0; -@@ -32,6 +34,62 @@ static void fatal_event(struct event_des - static int read_event(int fd, struct event_desc *evp, char **msg); - static void poll_resolv(int force, int do_reload, time_t now); - -+static struct ubus_context *ubus; -+static struct blob_buf b; -+ -+static struct ubus_object_type ubus_object_type = { -+ .name = "dnsmasq", -+}; -+ -+static struct ubus_object ubus_object = { -+ .name = "dnsmasq", -+ .type = &ubus_object_type, -+}; -+ -+void ubus_event_bcast(const char *type, const char *mac, const char *ip, const char *name) -+{ -+ if (!ubus || !ubus_object.has_subscribers) -+ return; -+ -+ blob_buf_init(&b, 0); -+ if (mac) -+ blobmsg_add_string(&b, "mac", mac); -+ if (ip) -+ blobmsg_add_string(&b, "ip", ip); -+ if (name) -+ blobmsg_add_string(&b, "name", name); -+ ubus_notify(ubus, &ubus_object, type, b.head, -1); -+} -+ -+static void set_ubus_listeners(void) -+{ -+ if (!ubus) -+ return; -+ -+ poll_listen(ubus->sock.fd, POLLIN); -+ poll_listen(ubus->sock.fd, POLLERR); -+ poll_listen(ubus->sock.fd, POLLHUP); -+} -+ -+static void check_ubus_listeners() -+{ -+ if (!ubus) { -+ ubus = ubus_connect(NULL); -+ if (ubus) -+ ubus_add_object(ubus, &ubus_object); -+ else -+ return; -+ } -+ -+ if (poll_check(ubus->sock.fd, POLLIN)) -+ ubus_handle_event(ubus); -+ -+ if (poll_check(ubus->sock.fd, POLLHUP)) { -+ ubus_free(ubus); -+ ubus = NULL; -+ } -+} -+ - int main (int argc, char **argv) - { - int bind_fallback = 0; -@@ -911,6 +969,7 @@ int main (int argc, char **argv) - set_dbus_listeners(); - #endif - -+ set_ubus_listeners(); - #ifdef HAVE_DHCP - if (daemon->dhcp || daemon->relay4) - { -@@ -1041,6 +1100,8 @@ int main (int argc, char **argv) - check_dbus_listeners(); - #endif - -+ check_ubus_listeners(); -+ - check_dns_listeners(now); - - #ifdef HAVE_TFTP ---- a/Makefile -+++ b/Makefile -@@ -85,7 +85,7 @@ all : $(BUILDDIR) - @cd $(BUILDDIR) && $(MAKE) \ - top="$(top)" \ - build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \ -- build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \ -+ build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) -lubox -lubus" \ - -f $(top)/Makefile dnsmasq - - mostly_clean : ---- a/src/dnsmasq.h -+++ b/src/dnsmasq.h -@@ -1397,6 +1397,8 @@ void emit_dbus_signal(int action, struct - # endif - #endif - -+void ubus_event_bcast(const char *type, const char *mac, const char *ip, const char *name); -+ - /* ipset.c */ - #ifdef HAVE_IPSET - void ipset_init(void); ---- a/src/rfc2131.c -+++ b/src/rfc2131.c -@@ -1621,6 +1621,10 @@ static void log_packet(char *type, void - daemon->namebuff, - string ? string : "", - err ? err : ""); -+ if (!strcmp(type, "DHCPACK")) -+ ubus_event_bcast("dhcp.ack", addr ? inet_ntoa(a) : NULL, daemon->namebuff, string ? string : NULL); -+ else if (!strcmp(type, "DHCPRELEASE")) -+ ubus_event_bcast("dhcp.release", addr ? inet_ntoa(a) : NULL, daemon->namebuff, string ? string : NULL); - } - - static void log_options(unsigned char *start, u32 xid) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index b7cc6b9c34..8a1f083217 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 57d74d8a79..5340b568e0 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -620,7 +620,7 @@ wpa_supplicant_add_network() { scan_ssid="" } - [[ "$_w_mode" = "adhoc" -o "$_w_mode" = "mesh" ]] && append network_data "$_w_modestr" "$N$T" + [ "$_w_mode" = "adhoc" -o "$_w_mode" = "mesh" ] && append network_data "$_w_modestr" "$N$T" case "$auth_type" in none) ;; diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index 21b50d9d0b..5ba9e7c7eb 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcpd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/odhcpd.git -PKG_SOURCE_DATE:=2017-04-28 -PKG_SOURCE_VERSION:=9268ca65d6e000b6cd4ed72d4a8fa427dada6f06 -PKG_MIRROR_HASH:=3c375291de38034f0965c92e509ca17788d3b31fe13abbc8f541b2e2452bc7fe +PKG_SOURCE_DATE:=2017-10-02 +PKG_SOURCE_VERSION:=c6f3d5d4ea5154e5971fa0b1b1e9a9c07119429f +PKG_MIRROR_HASH:=5ce8f52b5c6acea27d9733918e9c3bc8a154d516a02eef9b172c5e3d459f494c PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/odhcpd/files/odhcpd.defaults b/package/network/services/odhcpd/files/odhcpd.defaults index d079ec0f80..175e56e9bf 100644 --- a/package/network/services/odhcpd/files/odhcpd.defaults +++ b/package/network/services/odhcpd/files/odhcpd.defaults @@ -2,12 +2,27 @@ uci -q get dhcp.odhcpd && exit 0 touch /etc/config/dhcp +. /usr/share/libubox/jshn.sh + +json_load "$(cat /etc/board.json)" +json_select network +json_select lan +json_get_vars protocol +json_select .. +json_select .. + +case "$protocol" in +# only enable server mode on statically addressed lan ports +"static") MODE=server ;; +*) MODE=disabled ;; +esac + uci batch < diff --git a/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch b/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch index d49e0bf9ec..b0fe00df9b 100644 --- a/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch +++ b/package/network/services/openvpn/patches/210-build_always_use_internal_lz4.patch @@ -1,68 +1,43 @@ --- a/configure.ac +++ b/configure.ac -@@ -1068,62 +1068,15 @@ dnl +@@ -1076,37 +1076,14 @@ dnl AC_ARG_VAR([LZ4_CFLAGS], [C compiler flags for lz4]) AC_ARG_VAR([LZ4_LIBS], [linker flags for lz4]) if test "$enable_lz4" = "yes" && test "$enable_comp_stub" = "no"; then -- if test -z "${LZ4_CFLAGS}" -a -z "${LZ4_LIBS}"; then -- # if the user did not explicitly specify flags, try to autodetect -- PKG_CHECK_MODULES([LZ4], -- [liblz4 >= 1.7.1], -- [have_lz4="yes"], -- [] # If this fails, we will do another test next -- ) -- fi - - saved_CFLAGS="${CFLAGS}" - saved_LIBS="${LIBS}" - CFLAGS="${CFLAGS} ${LZ4_CFLAGS}" - LIBS="${LIBS} ${LZ4_LIBS}" - -- # If pkgconfig check failed or LZ4_CFLAGS/LZ4_LIBS env vars -- # are used, check the version directly in the LZ4 include file -- if test "${have_lz4}" != "yes"; then -- AC_CHECK_HEADERS([lz4.h], -- [have_lz4h="yes"], -- []) -- -- if test "${have_lz4h}" = "yes" ; then -- AC_MSG_CHECKING([additionally if system LZ4 version >= 1.7.1]) -- AC_COMPILE_IFELSE( -- [AC_LANG_PROGRAM([[ --#include -- ]], -- [[ --/* Version encoding: MMNNPP (Major miNor Patch) - see lz4.h for details */ --#if LZ4_VERSION_NUMBER < 10701L --#error LZ4 is too old --#endif -- ]] -- )], -- [ -- AC_MSG_RESULT([ok]) -- have_lz4="yes" -- ], -- [AC_MSG_RESULT([system LZ4 library is too old])] -- ) -- fi -- fi -- +- AC_CHECKING([for LZ4 Library and Header files]) +- havelz4lib=1 + - # if LZ4_LIBS is set, we assume it will work, otherwise test - if test -z "${LZ4_LIBS}"; then -- AC_CHECK_LIB([lz4], -- [LZ4_compress], -- [LZ4_LIBS="-llz4"], -- [have_lz4="no"]) +- AC_CHECK_LIB(lz4, LZ4_compress, +- [ LZ4_LIBS="-llz4" ], +- [ +- AC_MSG_RESULT([LZ4 library not found.]) +- havelz4lib=0 +- ]) - fi ++ AC_MSG_RESULT([Using LZ4 library in src/compat/compat-lz4.*]) ++ AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/]) ++ LZ4_LIBS="" + +- saved_CFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} ${LZ4_CFLAGS}" +- AC_CHECK_HEADERS(lz4.h, +- , +- [ +- AC_MSG_RESULT([LZ4 headers not found.]) +- havelz4lib=0 +- ]) - -- if test "${have_lz4}" != "yes" ; then -- AC_MSG_RESULT([ usuable LZ4 library or header not found, using version in src/compat/compat-lz4.*]) +- if test $havelz4lib = 0 ; then +- AC_MSG_RESULT([LZ4 library or header not found, using version in src/compat/compat-lz4.*]) - AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/]) - LZ4_LIBS="" - fi -+ AC_MSG_RESULT([ usuable LZ4 library or header not found, using version in src/compat/compat-lz4.*]) -+ AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/]) -+ LZ4_LIBS="" OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}" OPTIONAL_LZ4_LIBS="${LZ4_LIBS}" - AC_DEFINE(ENABLE_LZ4, [1], [Enable LZ4 compression library]) + AC_DEFINE(ENABLE_LZ4, 1, [Enable LZ4 compression library]) +- CFLAGS="${saved_CFLAGS}" + fi + + diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 39e8894ebc..609c9df007 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(LEDE_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2016-10-25 -PKG_SOURCE_VERSION:=1628fa4b34aa143187353f81e8001b9a15286bda -PKG_MIRROR_HASH:=2ac4ba8dc0b349d72174aac9ff693a73a214295a9890fe3d2a8eedcad54d06e3 +PKG_SOURCE_DATE:=2017-08-19 +PKG_SOURCE_VERSION:=3fd58e9b6da7d9e1a4710dbeefc2d289baea09fb +PKG_MIRROR_HASH:=69bba3b04c5e1975b99dee4fc47672ebf5ab282f115249a46be0fe0b961eb34b PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index 3926016581..ce99a2a688 100644 --- a/package/network/utils/comgt/Makefile +++ b/package/network/utils/comgt/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=comgt PKG_VERSION:=0.32 -PKG_RELEASE:=28 +PKG_RELEASE:=29 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/comgt diff --git a/package/network/utils/comgt/files/3g.sh b/package/network/utils/comgt/files/3g.sh index d438cb7a6d..0d02d4c4b9 100644 --- a/package/network/utils/comgt/files/3g.sh +++ b/package/network/utils/comgt/files/3g.sh @@ -109,4 +109,4 @@ proto_3g_teardown() { proto_kill_command "$interface" } -[ -z "NOT_INCLUDED" ] || add_protocol 3g +[ -z "$NOT_INCLUDED" ] || add_protocol 3g diff --git a/package/network/utils/comgt/files/directip.sh b/package/network/utils/comgt/files/directip.sh index 381bfb0000..3452fa5db7 100644 --- a/package/network/utils/comgt/files/directip.sh +++ b/package/network/utils/comgt/files/directip.sh @@ -44,8 +44,7 @@ proto_directip_setup() { return 1 } - cardinfo=$(gcom -d "$device" -s /etc/gcom/getcardinfo.gcom) - [ -n $(echo "$cardinfo" | grep -q "Sierra Wireless") ] || { + gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | grep -q "Sierra Wireless" || { proto_notify_error "$interface" BAD_DEVICE proto_block_restart "$interface" return 1 diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile index 9b357a0aa5..758532e30a 100644 --- a/package/network/utils/curl/Makefile +++ b/package/network/utils/curl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=curl PKG_VERSION:=7.52.1 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://curl.haxx.se/download/ \ diff --git a/package/network/utils/tcpdump/Makefile b/package/network/utils/tcpdump/Makefile index 0eef00db05..bb04369b50 100644 --- a/package/network/utils/tcpdump/Makefile +++ b/package/network/utils/tcpdump/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcpdump -PKG_VERSION:=4.9.1 +PKG_VERSION:=4.9.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.tcpdump.org/release/ \ - http://www.at.tcpdump.org/ -PKG_HASH:=f9448cf4deb2049acf713655c736342662e652ef40dbe0a8f6f8d5b9ce5bd8f3 +PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \ + http://www.tcpdump.org/release/ +PKG_HASH:=798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 @@ -76,7 +76,6 @@ endif MAKE_FLAGS += \ CCOPT="$(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)" - define Package/tcpdump/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/ diff --git a/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch b/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch index 26dbe13e3a..593d428949 100644 --- a/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch +++ b/package/network/utils/tcpdump/patches/100-tcpdump_mini.patch @@ -115,7 +115,7 @@ $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c --- a/addrtoname.c +++ b/addrtoname.c -@@ -566,8 +566,10 @@ linkaddr_string(netdissect_options *ndo, +@@ -578,8 +578,10 @@ linkaddr_string(netdissect_options *ndo, if (type == LINKADDR_ETHER && len == ETHER_ADDR_LEN) return (etheraddr_string(ndo, ep)); @@ -125,8 +125,8 @@ +#endif tp = lookup_bytestring(ndo, ep, len); - if (tp->e_name) -@@ -1202,6 +1204,7 @@ init_addrtoname(netdissect_options *ndo, + if (tp->bs_name) +@@ -1214,6 +1216,7 @@ init_addrtoname(netdissect_options *ndo, init_ipxsaparray(ndo); } @@ -134,7 +134,7 @@ const char * dnaddr_string(netdissect_options *ndo, u_short dnaddr) { -@@ -1221,6 +1224,7 @@ dnaddr_string(netdissect_options *ndo, u +@@ -1233,6 +1236,7 @@ dnaddr_string(netdissect_options *ndo, u return(tp->name); } @@ -247,7 +247,7 @@ return (1); @@ -368,6 +369,7 @@ ethertype_print(netdissect_options *ndo, } - isoclns_print(ndo, p + 1, length - 1, caplen - 1); + isoclns_print(ndo, p + 1, length - 1); return(1); +#endif @@ -335,7 +335,7 @@ break; --- a/print-ip6.c +++ b/print-ip6.c -@@ -303,6 +303,7 @@ ip6_print(netdissect_options *ndo, const +@@ -305,6 +305,7 @@ ip6_print(netdissect_options *ndo, const return; nh = *cp; break; @@ -343,13 +343,16 @@ case IPPROTO_FRAGMENT: advance = frag6_print(ndo, cp, (const u_char *)ip6); if (advance < 0 || ndo->ndo_snapend <= cp + advance) -@@ -324,16 +325,19 @@ ip6_print(netdissect_options *ndo, const - advance = mobility_print(ndo, cp, (const u_char *)ip6); +@@ -328,6 +329,7 @@ ip6_print(netdissect_options *ndo, const + return; nh = *cp; return; +#endif case IPPROTO_ROUTING: + ND_TCHECK(*cp); advance = rt6_print(ndo, cp, (const u_char *)ip6); +@@ -335,12 +337,14 @@ ip6_print(netdissect_options *ndo, const + return; nh = *cp; break; +#ifndef TCPDUMP_MINI @@ -363,15 +366,15 @@ case IPPROTO_TCP: tcp_print(ndo, cp, len, (const u_char *)ip6, fragmented); return; -@@ -343,6 +347,7 @@ ip6_print(netdissect_options *ndo, const +@@ -350,6 +354,7 @@ ip6_print(netdissect_options *ndo, const case IPPROTO_ICMPV6: icmp6_print(ndo, cp, len, (const u_char *)ip6, fragmented); return; +#ifndef TCPDUMP_MINI case IPPROTO_AH: advance = ah_print(ndo, cp); - nh = *cp; -@@ -371,6 +376,7 @@ ip6_print(netdissect_options *ndo, const + if (advance < 0) +@@ -382,6 +387,7 @@ ip6_print(netdissect_options *ndo, const case IPPROTO_PIM: pim_print(ndo, cp, len, (const u_char *)ip6); return; @@ -379,7 +382,7 @@ case IPPROTO_OSPF: ospf6_print(ndo, cp, len); -@@ -384,9 +390,11 @@ ip6_print(netdissect_options *ndo, const +@@ -395,9 +401,11 @@ ip6_print(netdissect_options *ndo, const ip_print(ndo, cp, len); return; @@ -393,7 +396,7 @@ gre_print(ndo, cp, len); --- a/print-ip.c +++ b/print-ip.c -@@ -329,6 +329,7 @@ ip_print_demux(netdissect_options *ndo, +@@ -344,6 +344,7 @@ ip_print_demux(netdissect_options *ndo, again: switch (ipds->nh) { @@ -401,7 +404,7 @@ case IPPROTO_AH: if (!ND_TTEST(*ipds->cp)) { ND_PRINT((ndo, "[|AH]")); -@@ -367,7 +368,9 @@ again: +@@ -382,7 +383,9 @@ again: */ break; } @@ -411,7 +414,7 @@ case IPPROTO_SCTP: sctp_print(ndo, ipds->cp, (const u_char *)ipds->ip, ipds->len); break; -@@ -375,6 +378,7 @@ again: +@@ -390,6 +393,7 @@ again: case IPPROTO_DCCP: dccp_print(ndo, ipds->cp, (const u_char *)ipds->ip, ipds->len); break; @@ -419,7 +422,7 @@ case IPPROTO_TCP: /* pass on the MF bit plus the offset to detect fragments */ -@@ -394,6 +398,7 @@ again: +@@ -409,6 +413,7 @@ again: ipds->off & (IP_MF|IP_OFFMASK)); break; @@ -427,7 +430,7 @@ case IPPROTO_PIGP: /* * XXX - the current IANA protocol number assignments -@@ -414,14 +419,17 @@ again: +@@ -429,14 +434,17 @@ again: case IPPROTO_EIGRP: eigrp_print(ndo, ipds->cp, ipds->len); break; @@ -445,7 +448,7 @@ case IPPROTO_OSPF: ospf_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip); -@@ -454,6 +462,7 @@ again: +@@ -469,6 +477,7 @@ again: gre_print(ndo, ipds->cp, ipds->len); break; @@ -453,14 +456,14 @@ case IPPROTO_MOBILE: mobile_print(ndo, ipds->cp, ipds->len); break; -@@ -482,6 +491,7 @@ again: +@@ -497,6 +506,7 @@ again: case IPPROTO_PGM: pgm_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip); break; +#endif default: - if (ndo->ndo_nflag==0 && (proto = getprotobynumber(ipds->nh)) != NULL) + if (ndo->ndo_nflag==0 && (p_name = netdb_protoname(ipds->nh)) != NULL) --- a/print-llc.c +++ b/print-llc.c @@ -206,6 +206,7 @@ llc_print(netdissect_options *ndo, const @@ -495,21 +498,22 @@ #ifdef ENABLE_SMB if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI -@@ -322,11 +326,13 @@ llc_print(netdissect_options *ndo, const +@@ -322,12 +326,13 @@ llc_print(netdissect_options *ndo, const return (hdrlen); } #endif +#ifndef TCPDUMP_MINI if (ssap == LLCSAP_ISONS && dsap == LLCSAP_ISONS && control == LLC_UI) { - isoclns_print(ndo, p, length, caplen); + isoclns_print(ndo, p, length); return (hdrlen); } +- +#endif - if (!ndo->ndo_eflag) { if (ssap == dsap) { -@@ -480,6 +486,7 @@ snap_print(netdissect_options *ndo, cons + if (src == NULL || dst == NULL) +@@ -480,6 +485,7 @@ snap_print(netdissect_options *ndo, cons case OUI_CISCO: switch (et) { @@ -517,7 +521,7 @@ case PID_CISCO_CDP: cdp_print(ndo, p, length, caplen); return (1); -@@ -492,6 +499,7 @@ snap_print(netdissect_options *ndo, cons +@@ -492,6 +498,7 @@ snap_print(netdissect_options *ndo, cons case PID_CISCO_VTP: vtp_print(ndo, p, length); return (1); @@ -525,7 +529,7 @@ case PID_CISCO_PVST: case PID_CISCO_VLANBRIDGE: stp_print(ndo, p, length); -@@ -504,6 +512,7 @@ snap_print(netdissect_options *ndo, cons +@@ -504,6 +511,7 @@ snap_print(netdissect_options *ndo, cons case OUI_RFC2684: switch (et) { @@ -533,7 +537,7 @@ case PID_RFC2684_ETH_FCS: case PID_RFC2684_ETH_NOFCS: /* -@@ -565,6 +574,7 @@ snap_print(netdissect_options *ndo, cons +@@ -565,6 +573,7 @@ snap_print(netdissect_options *ndo, cons */ fddi_print(ndo, p, length, caplen); return (1); @@ -549,7 +553,7 @@ +#ifndef TCPDUMP_MINI case BSD_AFNUM_ISO: - isoclns_print(ndo, p, length, caplen); + isoclns_print(ndo, p, length); break; @@ -127,6 +128,7 @@ null_if_print(netdissect_options *ndo, c case BSD_AFNUM_IPX: @@ -561,7 +565,7 @@ /* unknown AF_ value */ --- a/print-ppp.c +++ b/print-ppp.c -@@ -1358,6 +1358,7 @@ trunc: +@@ -1367,6 +1367,7 @@ trunc: return 0; } @@ -569,7 +573,7 @@ static void ppp_hdlc(netdissect_options *ndo, const u_char *p, int length) -@@ -1436,6 +1437,7 @@ trunc: +@@ -1445,6 +1446,7 @@ trunc: free(b); ND_PRINT((ndo, "[|ppp]")); } @@ -577,7 +581,7 @@ /* PPP */ -@@ -1443,10 +1445,12 @@ static void +@@ -1452,10 +1454,12 @@ static void handle_ppp(netdissect_options *ndo, u_int proto, const u_char *p, int length) { @@ -590,7 +594,7 @@ switch (proto) { case PPP_LCP: /* fall through */ -@@ -1479,6 +1483,7 @@ handle_ppp(netdissect_options *ndo, +@@ -1488,6 +1492,7 @@ handle_ppp(netdissect_options *ndo, case PPP_IPV6: ip6_print(ndo, p, length); break; @@ -598,7 +602,7 @@ case ETHERTYPE_IPX: /*XXX*/ case PPP_IPX: ipx_print(ndo, p, length); -@@ -1490,6 +1495,7 @@ handle_ppp(netdissect_options *ndo, +@@ -1499,6 +1504,7 @@ handle_ppp(netdissect_options *ndo, case PPP_MPLS_MCAST: mpls_print(ndo, p, length); break; @@ -606,7 +610,7 @@ case PPP_COMP: ND_PRINT((ndo, "compressed PPP data")); break; -@@ -1630,6 +1636,7 @@ ppp_if_print(netdissect_options *ndo, +@@ -1639,6 +1645,7 @@ ppp_if_print(netdissect_options *ndo, return (0); } @@ -614,7 +618,7 @@ /* * PPP I/F printer to use if we know that RFC 1662-style PPP in HDLC-like * framing, or Cisco PPP with HDLC framing as per section 4.3.1 of RFC 1547, -@@ -1857,6 +1864,7 @@ printx: +@@ -1866,6 +1873,7 @@ printx: #endif /* __bsdi__ */ return (hdrlength); } diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c4b7437b90..7f930ea830 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -173,7 +173,7 @@ if ($tree) { } if (!defined $root) { - print "Must be run from the top-level dir. of a LEDE tree\n"; + print "Must be run from the top-level dir. of a libreCMC tree\n"; exit(2); } } diff --git a/scripts/feeds b/scripts/feeds index dfecaa9bb6..55c294ad0a 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -130,6 +130,7 @@ my %update_method = ( 'init_branch' => "git clone --depth 1 --branch '%s' '%s' '%s'", 'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -", 'update' => "git pull --ff", + 'update_force' => "git pull --ff || (git reset --hard HEAD; git pull --ff; exit 1)", 'controldir' => ".git", 'revision' => "git rev-parse --short HEAD | tr -d '\n'"}, 'src-git-full' => { @@ -137,6 +138,7 @@ my %update_method = ( 'init_branch' => "git clone --branch '%s' '%s' '%s'", 'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -", 'update' => "git pull --ff", + 'update_force' => "git pull --ff || (git reset --hard HEAD; git pull --ff; exit 1)", 'controldir' => ".git", 'revision' => "git rev-parse --short HEAD | tr -d '\n'"}, 'src-gitsvn' => { @@ -161,11 +163,12 @@ my %update_method = ( # src-git: pull broken # src-cpy: broken if `basename $src` != $name -sub update_feed_via($$$$) { +sub update_feed_via($$$$$) { my $type = shift; my $name = shift; my $src = shift; my $relocate = shift; + my $force = shift; my $m = $update_method{$type}; my $localpath = "./feeds/$name"; @@ -186,7 +189,11 @@ sub update_feed_via($$$$) { } elsif ($m->{'init_commit'} and $commit) { # in case git hash has been provided don't update the feed } else { - system("cd '$safepath'; $m->{'update'}") == 0 or return 1; + my $update_cmd = $m->{'update'}; + if ($force && exists $m->{'update_force'}) { + $update_cmd = $m->{'update_force'}; + } + system("cd '$safepath'; $update_cmd") == 0 or return 1; } return 0; @@ -664,13 +671,15 @@ sub uninstall { return 0; } -sub update_feed($$$$) +sub update_feed($$$$$) { my $type=shift; my $name=shift; my $src=shift; my $perform_update=shift; + my $force_update=shift; my $force_relocate=update_location( $name, "@$src" ); + my $rv=0; if( $force_relocate ) { warn "Source of feed $name has changed, replacing copy\n"; @@ -683,9 +692,16 @@ sub update_feed($$$$) my $failed = 1; foreach my $feedsrc (@$src) { warn "Updating feed '$name' from '$feedsrc' ...\n"; - next unless update_feed_via($type, $name, $feedsrc, $force_relocate) == 0; + if (update_feed_via($type, $name, $feedsrc, $force_relocate, $force_update) != 0) { + if ($force_update) { + $rv=1; + $failed=0; + warn "failed, ignore.\n"; + next; + } + last; + } $failed = 0; - last; } $failed and do { warn "failed.\n"; @@ -697,7 +713,7 @@ sub update_feed($$$$) warn "failed.\n"; return 1; }; - return 0; + return $rv; } sub update { @@ -709,7 +725,7 @@ sub update { $ENV{SCAN_COOKIE} = $$; $ENV{OPENWRT_VERBOSE} = 's'; - getopts('ahi', \%opts); + getopts('ahif', \%opts); if ($opts{h}) { usage(); @@ -729,7 +745,7 @@ sub update { if ( ($#ARGV == -1) or $opts{a}) { foreach my $feed (@feeds) { my ($type, $name, $src) = @$feed; - update_feed($type, $name, $src, $perform_update) == 0 or $failed=1; + update_feed($type, $name, $src, $perform_update, $opts{f}) == 0 or $failed=1; } } else { while ($feed_name = shift @ARGV) { @@ -738,7 +754,7 @@ sub update { if($feed_name ne $name) { next; } - update_feed($type, $name, $src, $perform_update) == 0 or $failed=1; + update_feed($type, $name, $src, $perform_update, $opts{f}) == 0 or $failed=1; } } } @@ -796,6 +812,7 @@ Commands: Options: -a : Update all feeds listed within feeds.conf. Otherwise the specified feeds will be updated. -i : Recreate the index only. No feed update from repository is performed. + -f : Force updating feeds even if there are changed, uncommitted files. clean: Remove downloaded/generated files. diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh index a96adf9bc8..4960149f11 100644 --- a/scripts/om-fwupgradecfg-gen.sh +++ b/scripts/om-fwupgradecfg-gen.sh @@ -1,4 +1,4 @@ -#/bin/sh +#!/bin/sh # # Copyright (C) 2011 OpenWrt.org # diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index d891aab18c..eb55ee8806 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -18,6 +18,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME) IB_KDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(KERNEL_BUILD_DIR)) IB_LDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR)) IB_DTSDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR))/arch/$(ARCH)/boot/dts/ +IB_IDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(STAGING_DIR_IMAGE)) all: compile @@ -72,8 +73,8 @@ endif $(INSTALL_DIR) $(IB_LDIR)/scripts/dtc; \ $(INSTALL_BIN) $(LINUX_DIR)/scripts/dtc/dtc $(IB_LDIR)/scripts/dtc/dtc; \ fi - if [ -d $(LINUX_DIR)/arch/$(ARCH)/boot/dts ]; then \ - $(CP) $(LINUX_DIR)/arch/$(ARCH)/boot/dts/* $(IB_DTSDIR); \ + if [ -d $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts ]; then \ + $(CP) -L $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts/* $(IB_DTSDIR); \ fi $(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(PKG_BUILD_DIR)/include/version.mk find $(PKG_BUILD_DIR) -name CVS -o -name .git -o -name .svn \ diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 99f0ec1ad7..7b0d961bce 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -49,6 +49,10 @@ antrouter-r1) ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" ucidef_set_led_default "btc" "BTC" "$board:green:btc" "0" ;; +ap121f) + ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" + ;; arduino-yun) ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt" ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1" @@ -183,6 +187,9 @@ cr5000) ucidef_set_led_wlan "wlan" "WLAN" "pcs:blue:wlan" "phy0tpt" ucidef_set_led_usbdev "usb" "USB" "pcs:white:wps" "1-1" ;; +dr344) + ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth1" + ;; dragino2) ucidef_set_led_wlan "wlan" "WLAN" "$board:red:wlan" "phy0tpt" ucidef_set_led_netdev "lan" "LAN" "$board:red:lan" "eth0" @@ -276,7 +283,6 @@ dlan-pro-1200-ac) ucidef_set_led_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0" ;; gl-ar150|\ -gl-usb150|\ gl-ar300|\ gl-ar300m|\ gl-mifi) diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 7911da228e..32c7a272e6 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -42,7 +42,6 @@ ar71xx_setup_interfaces() tl-mr3420|\ tl-wdr3320-v2|\ tl-wdr3500|\ - tl-wr741nd|\ tl-wr741nd-v4|\ tl-wr841n-v11|\ tl-wr841n-v9|\ @@ -61,6 +60,7 @@ ar71xx_setup_interfaces() antminer-s1|\ antminer-s3|\ antrouter-r1|\ + ap121f|\ aw-nr580|\ bullet-m|\ c-55|\ @@ -112,7 +112,7 @@ ar71xx_setup_interfaces() tl-wa901nd-v4|\ tl-wr703n|\ tl-wr802n-v1|\ - tpe-r1100|\ + toe-r1100|\ tube2h|\ unifiac-lite|\ wndap360|\ @@ -123,10 +123,8 @@ ar71xx_setup_interfaces() a60|\ alfa-ap96|\ alfa-nx|\ + dr344|\ gl-ar150|\ - gl-usb150) - ucidef_set_interface_lan "eth0" - ;; gl-ar300m|\ gl-domino|\ gl-inet|\ @@ -149,7 +147,6 @@ ar71xx_setup_interfaces() all0315n|\ dlan-hotspot|\ dlan-pro-500-wp|\ - dr344|\ ja76pf2|\ rocket-m-ti|\ ubnt-unifi-outdoor) @@ -404,6 +401,7 @@ ar71xx_setup_interfaces() ucidef_set_interface_raw "eth" "eth0" ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; + tl-wr741nd|\ tl-wr841n-v7) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ @@ -484,7 +482,8 @@ ar71xx_setup_macs() wan_mac=$(mtd_get_mac_binary caldata 6) ;; tl-wr1043nd-v4) - wan_mac=$(mtd_get_mac_binary config 0x1017c) + lan_mac=$(mtd_get_mac_binary product-info 8) + wan_mac=$(macaddr_add "$lan_mac" 1) ;; esr900) wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr") diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 7b8aac8f8e..bc2fc2f774 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -29,6 +29,9 @@ get_status_led() { xd3200) status_led="$board:green:system" ;; + ap121f) + status_led="$board:green:vpn" + ;; ap132|\ db120|\ dr344|\ diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata deleted file mode 100644 index b3e23c9a8f..0000000000 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh - -ath10kcal_die() { - echo "ath10cal: " "$*" - exit 1 -} - -ath10kcal_from_file() { - local source=$1 - local offset=$2 - local count=$3 - - dd if=$source of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ - ath10kcal_die "failed to extract calibration data from $source" -} - -ath10kcal_extract() { - local part=$1 - local offset=$2 - local count=$3 - local mtd - - mtd=$(find_mtd_chardev $part) - [ -n "$mtd" ] || \ - ath10kcal_die "no mtd device found for partition $part" - - dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ - ath10kcal_die "failed to extract calibration data from $mtd" -} - -ath10kcal_patch_mac() { - local mac=$1 - - [ -z "$mac" ] && return - - macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=6 count=6 -} - -[ -e /lib/firmware/$FIRMWARE ] && exit 0 - -. /lib/ar71xx.sh -. /lib/functions.sh -. /lib/functions/system.sh - -board=$(ar71xx_board_name) - -case "$FIRMWARE" in -"ath10k/cal-pci-0000:00:00.0.bin") - case $board in - cf-e380ac-v1|\ - cf-e380ac-v2|\ - dlan-pro-1200-ac|\ - sr3200|\ - xd3200) - ath10kcal_extract "art" 20480 2116 - ;; - dap-2695-a1) - ath10kcal_extract "radiocfg" 20480 2116 - ath10kcal_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a) - ;; - dir-869-a1 | \ - qihoo-c301) - ath10kcal_extract "radiocfg" 20480 2116 - ath10kcal_patch_mac $(mtd_get_mac_ascii devdata wlan5mac) - ;; - dw33d) - ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(mtd_get_mac_binary art 18) - ;; - epg5000 | \ - esr1750) - ath10kcal_extract "caldata" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) - ;; - mc-mac1200r) - ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1) - ;; - a40 | \ - a60 | \ - mr1750 | \ - mr1750v2 | \ - om5p-acv2) - ath10kcal_extract "ART" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) - ;; - r6100) - ath10kcal_extract "caldata" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) +2) - ;; - re450) - ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2) - ;; - tl-wdr6500-v2) - ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2) - ;; - tl-wpa8630) - ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) - ;; - unifiac-lite | \ - unifiac-pro) - ath10kcal_extract "EEPROM" 20480 2116 - ;; - esac - ;; -"ath10k/cal-pci-0000:01:00.0.bin") - case $board in - archer-c5 | \ - archer-c7) - ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2) - ;; - nbg6616 | \ - nbg6716) - ath10kcal_extract "RFdata" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2) - ;; - om5p-ac) - ath10kcal_extract "ART" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) - ;; - rb-911g-5hpacd) - ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116 - ;; - esac - ;; -*) - exit 1 - ;; -esac diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration b/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration index d578f59f7c..16722d1ab2 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration @@ -52,6 +52,10 @@ dir-835-a1) migrate_leds ":orange:=:amber:" ":wifi_bgn=:wlan2g" ;; +dr344) + migrate_leds ":red:=:green:" ":yellow:=:green:" + ;; + wndap360) migrate_leds "wndap360:=netgear:" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index be3c98a5e6..ae2dab9b58 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -433,6 +433,9 @@ ar71xx_board_detect() { *AP121-MINI) name="ap121-mini" ;; + *"AP121F") + name="ap121f" + ;; *"AP132 reference board") name="ap132" ;; @@ -620,9 +623,6 @@ ar71xx_board_detect() { *"GL AR150") name="gl-ar150" ;; - *"GL USB150") - name="gl-usb150" - ;; *"GL AR300") name="gl-ar300" ;; @@ -1091,9 +1091,9 @@ ar71xx_board_detect() { *"TL-MR13U v1") name="tl-mr13u" ;; - *"TPE-R1100 Think Penguin Mini Router") + *"TPE-R1100 Think Penguin Mini Router") name="tpe-r1100" - ;; + ;; *"Tube2H") name="tube2h" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k b/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k deleted file mode 100644 index b6af921449..0000000000 --- a/target/linux/ar71xx/base-files/lib/preinit/82_patch_ath10k +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -. /lib/functions/system.sh -. /lib/ar71xx.sh - - -do_patch_ath10k_firmware() { - local firmware_file="/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin" - - # bail out if firmware does not exist - [ -f "$firmware_file" ] || { - return - } - - local mac_offset=276 - local mac_length=6 - local default_mac="00:03:07:12:34:56" - local current_mac="$(hexdump -v -n $mac_length -s $mac_offset -e '5/1 "%02x:" 1/1 "%02x"' $firmware_file 2>/dev/null)" - - # check if mac address was already patched - [ "$default_mac" = "$current_mac" ] || { - return - } - - # some boards have bogus mac in otp (= directly in the PCIe card's EEPROM). - # we have to patch the default mac in the firmware because we cannot change - # the otp. - case $(ar71xx_board_name) in - dgl-5500-a1 | tew-823dru) - local mac - mac=$(mtd_get_mac_ascii nvram wlan1_mac) - - cp $firmware_file /tmp/ath10k-firmware.bin - macaddr_2bin $mac | dd of=/tmp/ath10k-firmware.bin \ - conv=notrunc bs=1 seek=$mac_offset count=$mac_length - - ;; - esac - [ -f /tmp/ath10k-firmware.bin ] || { - return - } - cp /tmp/ath10k-firmware.bin $firmware_file - rm /tmp/ath10k-firmware.bin -} - -check_patch_ath10k_firmware() { - case $(ar71xx_board_name) in - dgl-5500-a1 | tew-823dru) - do_patch_ath10k_firmware - ;; - esac -} - -boot_hook_add preinit_main check_patch_ath10k_firmware diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index b2b88aba6d..93ffb76d7b 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -111,7 +111,7 @@ tplink_pharos_check_image() { # is accepted (loading the first 1.5M of a remote image for this check seems # a bit extreme) dd if="$1" bs=1 skip=1511432 count=1024 2>/dev/null | while read line; do - [ "$line" == "$model_string" ] && break + [ "$line" = "$model_string" ] && break done || { echo "Unsupported image (model not in support-list)" return 1 @@ -203,6 +203,7 @@ platform_check_image() { airgatewaypro|\ airgateway|\ airrouter|\ + ap121f|\ ap132|\ ap90q|\ bullet-m|\ @@ -237,7 +238,6 @@ platform_check_image() { ew-dorin-router|\ ew-dorin|\ gl-ar150|\ - gl-usb150|\ gl-ar300m|\ gl-ar300|\ gl-domino|\ diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index feb65cd56a..a8622454b4 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -42,6 +42,7 @@ CONFIG_ATH79_MACH_ANTMINER_S1=y CONFIG_ATH79_MACH_ANTMINER_S3=y CONFIG_ATH79_MACH_ANTROUTER_R1=y CONFIG_ATH79_MACH_AP121=y +CONFIG_ATH79_MACH_AP121F=y CONFIG_ATH79_MACH_AP132=y CONFIG_ATH79_MACH_AP136=y CONFIG_ATH79_MACH_AP143=y @@ -102,7 +103,6 @@ CONFIG_ATH79_MACH_ESR900=y CONFIG_ATH79_MACH_EW_DORIN=y CONFIG_ATH79_MACH_F9K1115V2=y CONFIG_ATH79_MACH_GL_AR150=y -CONFIG_ATH79_MACH_GL_USB150=y CONFIG_ATH79_MACH_GL_AR300=y CONFIG_ATH79_MACH_GL_AR300M=y CONFIG_ATH79_MACH_GL_DOMINO=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index cbf897daa7..58d7e43536 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -16,6 +16,16 @@ config ATH79_MACH_ALFA_AP120C select ATH79_DEV_M25P80 select ATH79_DEV_WMAC +config ATH79_MACH_AP121F + bool "ALFA Network AP121F support" + select SOC_AR933X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + select ATH79_DEV_WMAC + config ATH79_MACH_ALFA_AP96 bool "ALFA Network AP96 board support" select SOC_AR71XX @@ -252,6 +262,7 @@ config ATH79_MACH_ESR1750 select ATH79_DEV_M25P80 select ATH79_DEV_USB select ATH79_DEV_WMAC + select ATH79_NVRAM config ATH79_MACH_SOM9331 bool "SOM9331 support" @@ -458,7 +469,6 @@ config ATH79_MACH_DIR_505_A1 select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 select ATH79_DEV_WMAC - select ATH79_NVRAM config ATH79_MACH_DIR_600_A1 bool "D-Link DIR-600 A1/DIR-615 E1/DIR-615 E4 support" @@ -489,7 +499,6 @@ config ATH79_MACH_DIR_615_I1 select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 select ATH79_DEV_WMAC - select ATH79_NVRAM config ATH79_MACH_DIR_825_B1 bool "D-Link DIR-825 rev. B1 board support" @@ -521,6 +530,7 @@ config ATH79_MACH_DIR_869_A1 select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 select ATH79_DEV_WMAC + select ATH79_NVRAM config ATH79_MACH_DLAN_HOTSPOT bool "devolo dLAN Hotspot support" @@ -617,6 +627,7 @@ config ATH79_MACH_ESR900 select ATH79_DEV_M25P80 select ATH79_DEV_USB select ATH79_DEV_WMAC + select ATH79_NVRAM config ATH79_MACH_EW_DORIN bool "embedded wireless Dorin Platform support" @@ -710,15 +721,6 @@ config ATH79_MACH_GL_INET select ATH79_DEV_USB select ATH79_DEV_WMAC -config ATH79_MACH_GL_USB150 - bool "GL.iNet GL-USB150 support" - select SOC_AR933X - select ATH79_DEV_ETH - select ATH79_DEV_GPIO_BUTTONS - select ATH79_DEV_LEDS_GPIO - select ATH79_DEV_M25P80 - select ATH79_DEV_WMAC - config ATH79_MACH_EAP120 bool "TP-LINK EAP120 support" select SOC_AR934X @@ -1612,7 +1614,6 @@ config ATH79_MACH_TEW_673GRU select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 select ATH79_DEV_USB - select ATH79_NVRAM config ATH79_MACH_TEW_712BR bool "TRENDnet TEW-712BR support" @@ -1622,7 +1623,6 @@ config ATH79_MACH_TEW_712BR select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 select ATH79_DEV_WMAC - select ATH79_NVRAM config ATH79_MACH_TEW_732BR bool "TRENDnet TEW-732BR support" @@ -1753,6 +1753,7 @@ config ATH79_MACH_NBG6716 select ATH79_DEV_NFC select ATH79_DEV_USB select ATH79_DEV_WMAC + select ATH79_NVRAM config ATH79_MACH_CARAMBOLA2 bool "8devices Carambola2 board" @@ -1855,6 +1856,7 @@ config ATH79_MACH_DAP_2695_A1 select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 select ATH79_DEV_WMAC + select ATH79_NVRAM config ATH79_MACH_TL_WPA8630 bool "TP-Link TL-WPA8630 support" diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 74d5f9e954..7aee760195 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_ATH79_MACH_ANTMINER_S1) += mach-antminer-s1.o obj-$(CONFIG_ATH79_MACH_ANTMINER_S3) += mach-antminer-s3.o obj-$(CONFIG_ATH79_MACH_ANTROUTER_R1) += mach-antrouter-r1.o obj-$(CONFIG_ATH79_MACH_AP121) += mach-ap121.o +obj-$(CONFIG_ATH79_MACH_AP121F) += mach-ap121f.o obj-$(CONFIG_ATH79_MACH_AP132) += mach-ap132.o obj-$(CONFIG_ATH79_MACH_AP136) += mach-ap136.o obj-$(CONFIG_ATH79_MACH_AP143) += mach-ap143.o @@ -105,7 +106,6 @@ obj-$(CONFIG_ATH79_MACH_ESR1750) += mach-esr1750.o obj-$(CONFIG_ATH79_MACH_ESR900) += mach-esr900.o obj-$(CONFIG_ATH79_MACH_EW_DORIN) += mach-ew-dorin.o obj-$(CONFIG_ATH79_MACH_F9K1115V2) += mach-f9k1115v2.o -obj-$(CONFIG_ATH79_MACH_GL_USB150) += mach-gl-usb150.o obj-$(CONFIG_ATH79_MACH_GL_AR150) += mach-gl-ar150.o obj-$(CONFIG_ATH79_MACH_GL_AR300) += mach-gl-ar300.o obj-$(CONFIG_ATH79_MACH_GL_AR300M) += mach-gl-ar300m.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dr344.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dr344.c index e2155e3ec3..42839271d9 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dr344.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dr344.c @@ -19,10 +19,11 @@ * */ +#include #include #include #include -#include +#include #include @@ -38,15 +39,16 @@ #include "dev-wmac.h" #include "machtypes.h" -#define DR344_GPIO_LED_SIG1 15 -#define DR344_GPIO_LED_SIG2 11 -#define DR344_GPIO_LED_SIG3 12 -#define DR344_GPIO_LED_SIG4 13 -#define DR344_GPIO_EXTERNAL_LNA0 18 -#define DR344_GPIO_EXTERNAL_LNA1 19 -#define DR344_GPIO_LED_STATUS 14 +#define DR344_GPIO_LED_SIG1 12 +#define DR344_GPIO_LED_SIG2 13 +#define DR344_GPIO_LED_SIG3 14 +#define DR344_GPIO_LED_SIG4 15 +#define DR344_GPIO_LED_STATUS 11 +#define DR344_GPIO_LED_LAN 17 +#define DR344_GPIO_EXTERNAL_LNA0 18 +#define DR344_GPIO_EXTERNAL_LNA1 19 -#define DR344_GPIO_BTN_RESET 12 +#define DR344_GPIO_BTN_RESET 16 #define DR344_KEYS_POLL_INTERVAL 20 /* msecs */ #define DR344_KEYS_DEBOUNCE_INTERVAL (3 * DR344_KEYS_POLL_INTERVAL) @@ -57,18 +59,23 @@ #define DR344_PCIE_CALDATA_OFFSET 0x5000 static struct gpio_led dr344_leds_gpio[] __initdata = { + { + .name = "dr344:green:lan", + .gpio = DR344_GPIO_LED_LAN, + .active_low = 1, + }, { .name = "dr344:green:status", .gpio = DR344_GPIO_LED_STATUS, .active_low = 1, }, { - .name = "dr344:red:sig1", + .name = "dr344:green:sig1", .gpio = DR344_GPIO_LED_SIG1, .active_low = 1, }, { - .name = "dr344:yellow:sig2", + .name = "dr344:green:sig2", .gpio = DR344_GPIO_LED_SIG2, .active_low = 1, }, @@ -95,47 +102,35 @@ static struct gpio_keys_button dr344_gpio_keys[] __initdata = { }, }; -static struct ar8327_pad_cfg dr344_ar8327_pad0_cfg = { - .mode = AR8327_PAD_MAC_RGMII, - .txclk_delay_en = true, - .rxclk_delay_en = true, - .txclk_delay_sel = AR8327_CLK_DELAY_SEL1, - .rxclk_delay_sel = AR8327_CLK_DELAY_SEL2, -}; - -static struct ar8327_led_cfg dr344_ar8327_led_cfg = { - .led_ctrl0 = 0x00000000, - .led_ctrl1 = 0xc737c737, - .led_ctrl2 = 0x00000000, - .led_ctrl3 = 0x00c30c00, - .open_drain = true, -}; - -static struct ar8327_platform_data dr344_ar8327_data = { - .pad0_cfg = &dr344_ar8327_pad0_cfg, - .port0_cfg = { - .force_link = 1, - .speed = AR8327_PORT_SPEED_1000, - .duplex = 1, - .txpause = 1, - .rxpause = 1, - }, - .led_cfg = &dr344_ar8327_led_cfg, +static struct at803x_platform_data dr344_at803x_data = { + .disable_smarteee = 1, + .enable_rgmii_rx_delay = 1, + .enable_rgmii_tx_delay = 1, }; static struct mdio_board_info dr344_mdio0_info[] = { { .bus_id = "ag71xx-mdio.0", .phy_addr = 0, - .platform_data = &dr344_ar8327_data, + .platform_data = &dr344_at803x_data, }, }; static void __init dr344_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); + u8 *mac = (u8 *) KSEG1ADDR(0x1f03f810); ath79_register_m25p80(NULL); + + ath79_gpio_direction_select(DR344_GPIO_LED_STATUS, true); + gpio_set_value(DR344_GPIO_LED_STATUS, 1); + ath79_gpio_output_select(DR344_GPIO_LED_STATUS, 0); + + ath79_gpio_direction_select(DR344_GPIO_LED_LAN, true); + gpio_set_value(DR344_GPIO_LED_LAN, 1); + ath79_gpio_output_select(DR344_GPIO_LED_LAN, 0); + ath79_register_leds_gpio(-1, ARRAY_SIZE(dr344_leds_gpio), dr344_leds_gpio); ath79_register_gpio_keys_polled(-1, DR344_KEYS_POLL_INTERVAL, @@ -158,17 +153,17 @@ static void __init dr344_setup(void) ath79_register_mdio(1, 0x0); ath79_register_mdio(0, 0x0); - ath79_init_mac(ath79_eth0_data.mac_addr, art + DR344_MAC0_OFFSET, 0); - ath79_init_mac(ath79_eth1_data.mac_addr, art + DR344_MAC1_OFFSET, 0); + ath79_init_mac(ath79_eth0_data.mac_addr, mac + DR344_MAC0_OFFSET, 0); + ath79_init_mac(ath79_eth1_data.mac_addr, mac + DR344_MAC1_OFFSET, 0); ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0 | AR934X_ETH_CFG_SW_ONLY_MODE); - /* GMAC0 is connected to an AR8327 switch */ + /* GMAC0 is connected to an AR8035 Gbps PHY */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; - ath79_eth0_pll_data.pll_1000 = 0x0e000000; + ath79_eth0_pll_data.pll_1000 = 0x02000000; ath79_eth0_pll_data.pll_100 = 0x0101; ath79_eth0_pll_data.pll_10 = 0x1313; diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-usb150.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-usb150.c deleted file mode 100644 index 6cc27e1ada..0000000000 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-usb150.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * GL.iNet GL-USB150 board support - * - * Copyright (C) 2017 Piotr Dymacz - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. - */ - -#include -#include - -#include -#include - -#include "common.h" -#include "dev-eth.h" -#include "dev-gpio-buttons.h" -#include "dev-leds-gpio.h" -#include "dev-m25p80.h" -#include "dev-wmac.h" -#include "machtypes.h" - -#define GL_USB150_GPIO_LED_POWER 13 -#define GL_USB150_GPIO_LED_WLAN 0 -#define GL_USB150_GPIO_LAN_RESET 7 -#define GL_USB150_GPIO_BTN_RESET 11 - -#define GL_USB150_KEYS_POLL_INTERVAL 20 -#define GL_USB150_KEYS_DEBOUNCE_INTERVAL \ - (3 * GL_USB150_KEYS_POLL_INTERVAL) - -#define GL_USB150_WMAC_CALDATA_OFFSET 0x1000 - -static struct gpio_led gl_usb150_leds_gpio[] __initdata = { - { - .name = "gl-usb150:green:power", - .gpio = GL_USB150_GPIO_LED_POWER, - .active_low = 0, - }, { - .name = "gl-usb150:green:wlan", - .gpio = GL_USB150_GPIO_LED_WLAN, - .active_low = 0, - }, -}; - -static struct gpio_keys_button gl_usb150_gpio_keys[] __initdata = { - { - .desc = "reset", - .type = EV_KEY, - .code = KEY_RESTART, - .debounce_interval = GL_USB150_KEYS_DEBOUNCE_INTERVAL, - .gpio = GL_USB150_GPIO_BTN_RESET, - .active_low = 0, - }, -}; - -static void __init gl_usb150_setup(void) -{ - u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); - - ath79_register_m25p80(NULL); - - ath79_setup_ar933x_phy4_switch(false, false); - - /* LAN (PHY4 connected with Realtek RTL8152B) */ - ath79_init_mac(ath79_eth0_data.mac_addr, art, 0); - ath79_register_mdio(0, 0x0); - ath79_register_eth(0); - - ath79_register_leds_gpio(-1, ARRAY_SIZE(gl_usb150_leds_gpio), - gl_usb150_leds_gpio); - - ath79_register_gpio_keys_polled(-1, GL_USB150_KEYS_POLL_INTERVAL, - ARRAY_SIZE(gl_usb150_gpio_keys), - gl_usb150_gpio_keys); - - gpio_request_one(GL_USB150_GPIO_LAN_RESET, - GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED, - "LAN reset"); - - ath79_register_wmac(art + GL_USB150_WMAC_CALDATA_OFFSET, NULL); -} - -MIPS_MACHINE(ATH79_MACH_GL_USB150, "GL-USB150", "GL.iNet GL-USB150", - gl_usb150_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c index 05e15e77e1..e940d6cc11 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c @@ -165,6 +165,8 @@ static int rb95x_nand_scan_fixup(struct mtd_info *mtd) chip->ecc.layout = &rb95x_nand_ecclayout; } + chip->options = NAND_NO_SUBPAGE_WRITE; + return 0; } diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c index cb224f4611..b1539c5d71 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c @@ -57,7 +57,7 @@ #define TL_WR1043_V4_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR1043_V4_KEYS_POLL_INTERVAL) -#define TL_WR1043_V4_MAC_LOCATION 0x1ff80174 +#define TL_WR1043_V4_MAC_LOCATION 0x1ff50008 #define TL_WR1043_V4_EEPROM_ADDR 0x1fff0000 #define TL_WR1043_V4_WMAC_CALDATA_OFFSET 0x1000 diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 9297fbd460..a12685cd11 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -30,6 +30,7 @@ enum ath79_mach_type { ATH79_MACH_ANTROUTER_R1, /* Antrouter R1 */ ATH79_MACH_AP121, /* Atheros AP121 reference board */ ATH79_MACH_AP121_MINI, /* Atheros AP121-MINI reference board */ + ATH79_MACH_AP121F, /* ALFA Network AP121F */ ATH79_MACH_AP132, /* Atheros AP132 reference board */ ATH79_MACH_AP135_020, /* Atheros AP135-020 reference board */ ATH79_MACH_AP136_010, /* Atheros AP136-010 reference board */ @@ -102,7 +103,6 @@ enum ath79_mach_type { ATH79_MACH_GL_DOMINO, /* Domino */ ATH79_MACH_GL_INET, /* GL-CONNECT GL-INET */ ATH79_MACH_GL_MIFI, /* GL-MIFI support */ - ATH79_MACH_GL_USB150, /* GL.iNet GL-USB150 */ ATH79_MACH_GS_MINIBOX_V1, /* Gainstrong MiniBox V1.0 */ ATH79_MACH_GS_OOLITE, /* GS OOLITE V1.0 */ ATH79_MACH_HIWIFI_HC6361, /* HiWiFi HC6361 */ diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 7121e260bf..d98803e3da 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1,3 +1,16 @@ +define Device/ap121f + DEVICE_TITLE := ALFA Network AP121F + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage -swconfig + BOARDNAME := AP121F + IMAGE_SIZE := 16064k + CONSOLE := ttyATH0,115200 + MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware) + SUPPORTED_DEVICES := ap121f + IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) +endef +TARGET_DEVICES += ap121f + define Device/ap90q DEVICE_TITLE := YunCore AP90Q BOARDNAME = AP90Q @@ -117,25 +130,12 @@ define Device/gl-ar150 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro endef -define Device/gl-usb150 - DEVICE_TITLE := GL.iNet GL-USB150 - DEVICE_PACKAGES := -swconfig - BOARDNAME := GL-USB150 - IMAGE_SIZE := 16000k - CONSOLE := ttyATH0,115200 - MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro - SUPPORTED_DEVICES := gl-usb150 - IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) -endef -TARGET_DEVICES += gl-usb150 - define Device/tpe-r1100 $(Device/gl-ar150) DEVICE_TITLE := TPE-R1100 Think Penguin Mini Router endef -TARGET_DEVICES += tpe-r1100 +TARGET_DEVICES += gl-ar150 tpe-r1100 define Device/gl-ar300 DEVICE_TITLE := GL AR300 @@ -505,43 +505,6 @@ define Device/oolite endef TARGET_DEVICES += oolite - -define Device/NBG6616 - DEVICE_TITLE := ZyXEL NBG6616 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-rtc-pcf8563 - BOARDNAME = NBG6616 - KERNEL_SIZE = 2048k - IMAGE_SIZE = 15323k - MTDPARTS = spi0.0:192k(u-boot)ro,64k(env)ro,64k(RFdata)ro,384k(zyxel_rfsd),384k(romd),64k(header),2048k(kernel),13184k(rootfs),15232k@0x120000(firmware) - CMDLINE += mem=128M - IMAGES := sysupgrade.bin - KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage - IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) - # We cannot currently build a factory image. It is the sysupgrade image - # prefixed with a header (which is actually written into the MTD device). - # The header is 2kiB and is filled with 0xff. The format seems to be: - # 2 bytes: 0x0000 - # 2 bytes: checksum of the data partition (big endian) - # 4 bytes: length of the contained image file (big endian) - # 32 bytes: Firmware Version string (NUL terminated, 0xff padded) - # 2 bytes: 0x0000 - # 2 bytes: checksum over the header partition (big endian) - # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded) - # rest: 0xff padding - # - # The checksums are calculated by adding up all bytes and if a 16bit - # overflow occurs, one is added and the sum is masked to 16 bit: - # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff }; - # Should the file have an odd number of bytes then the byte len-0x800 is - # used additionally. - # The checksum for the header is calcualted over the first 2048 bytes with - # the firmware checksum as the placeholder during calculation. - # - # The header is padded with 0xff to the erase block size of the device. -endef - -TARGET_DEVICES += NBG6616 - define Device/c-55 DEVICE_TITLE := AirTight Networks C-55 DEVICE_PACKAGES := kmod-ath9k @@ -631,17 +594,7 @@ $(Device/seama) SEAMA_SIGNATURE := wrgnd13_wd_av endef -define Device/qihoo-c301 -$(Device/seama) - DEVICE_TITLE := Qihoo C301 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport - BOARDNAME = QIHOO-C301 - IMAGE_SIZE = 15744k - MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata) - SEAMA_SIGNATURE := wrgac26_qihoo360_360rg -endef - -TARGET_DEVICES += dir-869-a1 mynet-n600 mynet-n750 qihoo-c301 +TARGET_DEVICES += dir-869-a1 mynet-n600 mynet-n750 define Build/mkwrggimg $(STAGING_DIR_HOST)/bin/mkwrggimg -b \ @@ -655,6 +608,8 @@ define Build/wrgg-pad-rootfs $(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@ endef +TARGET_DEVICES += dap-2695-a1 + define Build/mkbuffaloimg $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \ -R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \ diff --git a/target/linux/ar71xx/image/legacy-devices.mk b/target/linux/ar71xx/image/legacy-devices.mk index cf9008b462..61066486d8 100644 --- a/target/linux/ar71xx/image/legacy-devices.mk +++ b/target/linux/ar71xx/image/legacy-devices.mk @@ -1,10 +1,3 @@ -define LegacyDevice/A60 - DEVICE_TITLE := OpenMesh A40/A60 - DEVICE_PACKAGES := om-watchdog \ - mod-usb-core kmod-usb2 -endef -LEGACY_DEVICES += A60 - define LegacyDevice/ALFANX DEVICE_TITLE := ALFA Network N2/N5 board endef @@ -292,12 +285,6 @@ define LegacyDevice/DGL5500A1 endef LEGACY_DEVICES += DGL5500A1 -define LegacyDevice/TEW823DRU - DEVICE_TITLE := TRENDNet TEW-823DRU - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -endef -LEGACY_DEVICES += TEW823DRU - define LegacyDevice/DHP1565A1 DEVICE_TITLE := D-Link DHP-1565 rev. A1 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 @@ -367,18 +354,6 @@ define LegacyDevice/ESR900 endef LEGACY_DEVICES += ESR900 -define LegacyDevice/ESR1750 - DEVICE_TITLE := EnGenius ESR1750 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage -endef -LEGACY_DEVICES += ESR1750 - -define LegacyDevice/EPG5000 - DEVICE_TITLE := EnGenius EPG5000 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage -endef -LEGACY_DEVICES += EPG5000 - define LegacyDevice/WP543_4M DEVICE_TITLE := Compex WP543/WPJ543 (4MB flash) DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk index c94bc26e38..40c77141bc 100644 --- a/target/linux/ar71xx/image/legacy.mk +++ b/target/linux/ar71xx/image/legacy.mk @@ -498,11 +498,11 @@ define Image/Build/Belkin $(eval rootsize=$(call mtdpartsize,rootfs,$(4))) $(call Sysupgrade/RKuImage,$(1),$(2),$(kernsize),$(rootsize)) if [ -e "$(call sysupname,$(1),$(2))" ]; then \ - edimax_fw_header -m $(5) -v "$(shell echo -n LEDE$(REVISION) | cut -c -13)" \ + edimax_fw_header -m $(5) -v "$(shell echo -n libreCMC$(REVISION) | cut -c -13)" \ -n "uImage" \ -i $(KDIR_TMP)/vmlinux-$(2).uImage \ -o $(KDIR_TMP)/$(2)-uImage; \ - edimax_fw_header -m $(5) -v "$(shell echo -n LEDE$(REVISION) | cut -c -13)" \ + edimax_fw_header -m $(5) -v "$(shell echo -n libreCMC$(REVISION) | cut -c -13)" \ -n "rootfs" \ -i $(KDIR)/root.$(1) \ -o $(KDIR_TMP)/$(2)-rootfs; \ diff --git a/target/linux/ar71xx/image/mikrotik.mk b/target/linux/ar71xx/image/mikrotik.mk index 6aa7c2a1ae..bcfa64da62 100644 --- a/target/linux/ar71xx/image/mikrotik.mk +++ b/target/linux/ar71xx/image/mikrotik.mk @@ -1,6 +1,6 @@ define Device/mikrotik PROFILES := Default - DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport nand-utils + DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport BOARD_NAME := routerboard KERNEL_INITRAMFS := KERNEL_NAME := loader-generic.elf @@ -26,7 +26,7 @@ TARGET_DEVICES += nand-64m nand-large define Device/rb-nor-flash-16M DEVICE_TITLE := MikroTik RouterBoard with 16 MB NOR flash - DEVICE_PACKAGES := rbcfg + DEVICE_PACKAGES := rbcfg -nand-utils BLOCKSIZE := 64k IMAGE_SIZE := 16000k LOADER_TYPE := elf diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk index b360a1f9fe..9d3af61289 100644 --- a/target/linux/ar71xx/image/tp-link.mk +++ b/target/linux/ar71xx/image/tp-link.mk @@ -215,15 +215,6 @@ $(Device/tplink-4mlzma) endef TARGET_DEVICES += tl-wdr3320-v2 -define Device/archer-c5-v1 - $(Device/tplink-16mlzma) - DEVICE_TITLE := TP-LINK Archer C5 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport - BOARDNAME := ARCHER-C5 - DEVICE_PROFILE := ARCHERC7 - TPLINK_HWID := 0xc5000001 -endef - define Device/archer-c7-v1 $(Device/tplink-8mlzma) DEVICE_TITLE := TP-LINK Archer C7 v1 @@ -233,37 +224,7 @@ define Device/archer-c7-v1 TPLINK_HWID := 0x75000001 endef -define Device/archer-c7-v2 - $(Device/tplink-16mlzma) - DEVICE_TITLE := TP-LINK Archer C7 v2 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport - BOARDNAME := ARCHER-C7-V2 - DEVICE_PROFILE := ARCHERC7 - TPLINK_HWID := 0xc7000002 - IMAGES := sysupgrade.bin factory.bin factory-us.bin factory-eu.bin - IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US - IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU -endef - -define Device/archer-c7-v2-il - $(Device/tplink-16mlzma) - DEVICE_TITLE := TP-LINK Archer C7 v2 IL - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport - BOARDNAME := ARCHER-C7-V2 - DEVICE_PROFILE := ARCHERC7 - TPLINK_HWID := 0xc7000002 - TPLINK_HWREV := 0x494c0001 -endef - -define Device/tl-wdr7500-v3 - $(Device/tplink-8mlzma) - DEVICE_TITLE := TP-LINK Archer C7 v3 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport - BOARDNAME := ARCHER-C7 - DEVICE_PROFILE := ARCHERC7 - TPLINK_HWID := 0x75000003 -endef -TARGET_DEVICES += archer-c5-v1 archer-c7-v1 archer-c7-v2 archer-c7-v2-il tl-wdr7500-v3 +TARGET_DEVICES += archer-c7-v1 define Device/tl-mr10u-v1 $(Device/tplink-4mlzma) @@ -402,6 +363,7 @@ define Device/tl-wr710n-v1 DEVICE_PROFILE := TLWR710 TPLINK_HWID := 0x07100001 CONSOLE := ttyATH0,115200 + IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US endef define Device/tl-wr710n-v2 @@ -629,6 +591,12 @@ define Device/tl-wr841-v11 IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU endef +define Device/tl-wr841-v12 + $(Device/tl-wr841-v11) + DEVICE_TITLE := TP-LINK TL-WR841N/ND v12 + TPLINK_HWID := 0x08410012 +endef + define Device/tl-wr842n-v1 $(Device/tplink-8m) DEVICE_TITLE := TP-LINK TL-WR842N/ND v1 @@ -671,7 +639,7 @@ define Device/tl-wr847n-v8 DEVICE_PROFILE := TLWR841 TPLINK_HWID := 0x08470008 endef -TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7 tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr841-v11 tl-wr842n-v1 tl-wr842n-v2 tl-wr842n-v3 tl-wr843nd-v1 tl-wr847n-v8 +TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7 tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr841-v11 tl-wr841-v12 tl-wr842n-v1 tl-wr842n-v2 tl-wr842n-v3 tl-wr843nd-v1 tl-wr847n-v8 define Device/tl-wr941nd-v2 $(Device/tplink-4m) diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default index 44ea327fb1..f8d255fd87 100644 --- a/target/linux/ar71xx/mikrotik/config-default +++ b/target/linux/ar71xx/mikrotik/config-default @@ -8,6 +8,7 @@ # CONFIG_ATH79_MACH_ANTMINER_S3 is not set # CONFIG_ATH79_MACH_ANTROUTER_R1 is not set # CONFIG_ATH79_MACH_AP121 is not set +# CONFIG_ATH79_MACH_AP121F is not set # CONFIG_ATH79_MACH_AP132 is not set # CONFIG_ATH79_MACH_AP136 is not set # CONFIG_ATH79_MACH_AP143 is not set diff --git a/target/linux/ar71xx/mikrotik/target.mk b/target/linux/ar71xx/mikrotik/target.mk index 90ef51e41b..ff2bbbffe7 100644 --- a/target/linux/ar71xx/mikrotik/target.mk +++ b/target/linux/ar71xx/mikrotik/target.mk @@ -1,6 +1,8 @@ BOARDNAME:=Mikrotik devices with NAND/NOR flash FEATURES += squashfs ramdisk minor nand +DEFAULT_PACKAGES += nand-utils + define Target/Description Build firmware images for Atheros AR71xx/AR913x based Mikrotik boards. e.g. MikroTik RB-4xx or RB-750 diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default index 515266b0f8..c1b5e61c3e 100644 --- a/target/linux/ar71xx/nand/config-default +++ b/target/linux/ar71xx/nand/config-default @@ -4,6 +4,7 @@ # CONFIG_ATH79_MACH_ALL0258N is not set # CONFIG_ATH79_MACH_ALL0315N is not set # CONFIG_ATH79_MACH_AP121 is not set +# CONFIG_ATH79_MACH_AP121F is not set # CONFIG_ATH79_MACH_AP132 is not set # CONFIG_ATH79_MACH_AP136 is not set # CONFIG_ATH79_MACH_AP147 is not set diff --git a/target/linux/generic/patches-4.4/103-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/patches-4.4/103-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 304cb874b5..6c9b12c2e1 100644 --- a/target/linux/generic/patches-4.4/103-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/patches-4.4/103-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -75,7 +75,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -5345,7 +5345,7 @@ static void __init_refok alloc_node_mem_ +@@ -5357,7 +5357,7 @@ static void __init_refok alloc_node_mem_ mem_map = NODE_DATA(0)->node_mem_map; #if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM) if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index c6c65d9f39..c5f3e195da 100644 --- a/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/patches-4.4/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -143,7 +143,7 @@ Signed-off-by: Jonas Gorski static const struct rt6_info ip6_blk_hole_entry_template = { .dst = { .__refcnt = ATOMIC_INIT(1), -@@ -1889,6 +1906,11 @@ static struct rt6_info *ip6_route_info_c +@@ -1898,6 +1915,11 @@ static struct rt6_info *ip6_route_info_c rt->dst.output = ip6_pkt_prohibit_out; rt->dst.input = ip6_pkt_prohibit; break; @@ -155,7 +155,7 @@ Signed-off-by: Jonas Gorski case RTN_THROW: case RTN_UNREACHABLE: default: -@@ -2492,6 +2514,17 @@ static int ip6_pkt_prohibit_out(struct n +@@ -2501,6 +2523,17 @@ static int ip6_pkt_prohibit_out(struct n return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); } @@ -173,7 +173,7 @@ Signed-off-by: Jonas Gorski /* * Allocate a dst for local (unicast / anycast) address. */ -@@ -2734,7 +2767,8 @@ static int rtm_to_fib6_config(struct sk_ +@@ -2743,7 +2776,8 @@ static int rtm_to_fib6_config(struct sk_ if (rtm->rtm_type == RTN_UNREACHABLE || rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_PROHIBIT || @@ -183,7 +183,7 @@ Signed-off-by: Jonas Gorski cfg->fc_flags |= RTF_REJECT; if (rtm->rtm_type == RTN_LOCAL) -@@ -3087,6 +3121,9 @@ static int rt6_fill_node(struct net *net +@@ -3096,6 +3130,9 @@ static int rt6_fill_node(struct net *net case -EACCES: rtm->rtm_type = RTN_PROHIBIT; break; @@ -193,7 +193,7 @@ Signed-off-by: Jonas Gorski case -EAGAIN: rtm->rtm_type = RTN_THROW; break; -@@ -3366,6 +3403,8 @@ static int ip6_route_dev_notify(struct n +@@ -3375,6 +3412,8 @@ static int ip6_route_dev_notify(struct n #ifdef CONFIG_IPV6_MULTIPLE_TABLES net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); @@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); #endif -@@ -3588,6 +3627,17 @@ static int __net_init ip6_route_net_init +@@ -3597,6 +3636,17 @@ static int __net_init ip6_route_net_init net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, ip6_template_metrics, true); @@ -220,7 +220,7 @@ Signed-off-by: Jonas Gorski #endif net->ipv6.sysctl.flush_delay = 0; -@@ -3606,6 +3656,8 @@ out: +@@ -3615,6 +3665,8 @@ out: return ret; #ifdef CONFIG_IPV6_MULTIPLE_TABLES @@ -229,7 +229,7 @@ Signed-off-by: Jonas Gorski out_ip6_prohibit_entry: kfree(net->ipv6.ip6_prohibit_entry); out_ip6_null_entry: -@@ -3623,6 +3675,7 @@ static void __net_exit ip6_route_net_exi +@@ -3632,6 +3684,7 @@ static void __net_exit ip6_route_net_exi #ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_blk_hole_entry); @@ -237,7 +237,7 @@ Signed-off-by: Jonas Gorski #endif dst_entries_destroy(&net->ipv6.ip6_dst_ops); } -@@ -3696,6 +3749,9 @@ void __init ip6_route_init_special_entri +@@ -3705,6 +3758,9 @@ void __init ip6_route_init_special_entri init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); diff --git a/target/linux/generic/patches-4.4/704-phy-no-genphy-soft-reset.patch b/target/linux/generic/patches-4.4/704-phy-no-genphy-soft-reset.patch deleted file mode 100644 index 7cec6d3226..0000000000 --- a/target/linux/generic/patches-4.4/704-phy-no-genphy-soft-reset.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/net/phy/phy_device.c -+++ b/drivers/net/phy/phy_device.c -@@ -1465,7 +1465,7 @@ static struct phy_driver genphy_driver[] - .phy_id = 0xffffffff, - .phy_id_mask = 0xffffffff, - .name = "Generic 10G PHY", -- .soft_reset = gen10g_soft_reset, -+ .soft_reset = genphy_no_soft_reset, - .config_init = gen10g_config_init, - .features = 0, - .config_aneg = gen10g_config_aneg, diff --git a/target/linux/generic/patches-4.4/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/patches-4.4/811-pci_disable_usb_common_quirks.patch index c990681067..702c9fa2b5 100644 --- a/target/linux/generic/patches-4.4/811-pci_disable_usb_common_quirks.patch +++ b/target/linux/generic/patches-4.4/811-pci_disable_usb_common_quirks.patch @@ -10,7 +10,7 @@ static struct amd_chipset_info { struct pci_dev *nb_dev; struct pci_dev *smbus_dev; -@@ -457,6 +459,10 @@ void usb_amd_dev_put(void) +@@ -458,6 +460,10 @@ void usb_amd_dev_put(void) } EXPORT_SYMBOL_GPL(usb_amd_dev_put); @@ -21,7 +21,7 @@ /* * Make sure the controller is completely inactive, unable to * generate interrupts or do DMA. -@@ -536,8 +542,17 @@ reset_needed: +@@ -537,8 +543,17 @@ reset_needed: uhci_reset_hc(pdev, base); return 1; } @@ -39,7 +39,7 @@ static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask) { u16 cmd; -@@ -1102,3 +1117,4 @@ static void quirk_usb_early_handoff(stru +@@ -1103,3 +1118,4 @@ static void quirk_usb_early_handoff(stru } DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff); diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile index 51cd8f3e06..25859024c1 100644 --- a/target/linux/ramips/Makefile +++ b/target/linux/ramips/Makefile @@ -10,7 +10,7 @@ ARCH:=mipsel BOARD:=ramips BOARDNAME:=MediaTek Ralink MIPS SUBTARGETS:=rt305x mt7620 mt7621 mt7628 mt7688 rt3883 rt288x -FEATURES:=squashfs gpio mips16 +FEATURES:=squashfs gpio MAINTAINER:=John Crispin KERNEL_PATCHVER:=4.4 diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e687f4a6d2..2956defca8 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -90,7 +90,6 @@ c20i) ucidef_set_led_wlan "wlan" "wlan" "$board:blue:wlan" "phy0radio" ;; c50) - ucidef_set_led_default "power" "power" "$board:green:power" "0" ucidef_set_led_switch "lan" "lan" "$board:green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "$board:green:wan" "switch0" "0x01" set_usb_led "$board:green:usb" @@ -109,6 +108,10 @@ d105) ucidef_set_led_default "power" "POWER" "$board:red:power" "1" set_usb_led "$board:green:usb" ;; +d240) + set_wifi_led "$board:blue:wifi" + set_usb_led "$board:blue:usb" + ;; db-wrt01) ucidef_set_led_default "power" "power" "$board:orange:power" "1" ;; @@ -155,7 +158,8 @@ vr500) dir-860l-b1) ucidef_set_led_netdev "wan" "wan" "$board:green:net" "eth0.2" ;; -ex2700) +ex2700|\ +wn3000rpv3) ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0" set_wifi_led "$board:green:router" ;; @@ -171,10 +175,6 @@ fonera20n) set_usb_led "$board:orange:usb" set_wifi_led "$board:orange:wifi" ;; -gb-pc1) - ucidef_set_led_netdev "lan" "lan" "$board:green:lan" "eth0.1" - ucidef_set_led_netdev "wan" "wan" "$board:green:wan" "eth0.2" - ;; gl-mt300a|\ gl-mt300n|\ gl-mt750) @@ -315,6 +315,9 @@ vocore) ucidef_set_led_netdev "eth" "ETH" "$board:orange:eth" "eth0" set_wifi_led "$board:green:status" ;; +vocore2) + set_wifi_led "$board:fuchsia:status" + ;; w502u) set_usb_led "$board:blue:usb" set_wifi_led "rt2800pci-phy0::radio" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index bc212754df..1778dc9329 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -53,6 +53,8 @@ ramips_setup_interfaces() microwrt|\ mpr-a2|\ ncs601w|\ + omega2 | \ + omega2p | \ timecloud|\ w150m|\ widora-neo|\ @@ -70,12 +72,12 @@ ramips_setup_interfaces() 3g-6200n|\ ac1200pro|\ ai-br100|\ + d240|\ db-wrt01|\ dir-300-b7|\ dir-320-b1|\ dir-610-a1|\ dir-615-h1|\ - gb-pc1|\ firewrt|\ hlk-rm04|\ mac1200rv2|\ @@ -123,7 +125,6 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" ;; asl26555|\ - re6500|\ rp-n53) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" @@ -132,9 +133,7 @@ ramips_setup_interfaces() awm002-evb|\ awm003-evb|\ c20i|\ - c50|\ dir-645|\ - dir-860l-b1|\ f5d8235-v2|\ gl-mt300a|\ gl-mt300n|\ @@ -192,9 +191,18 @@ ramips_setup_interfaces() pbr-d1|\ wli-tx4-ag300n|\ wmr-300|\ + wn3000rpv3|\ wrh-300cr) ucidef_set_interface_lan "eth0" ;; + c50) + ucidef_add_switch "switch0" \ + "1:lan:3" "2:lan:4" "3:lan:1" "4:lan:2" "0:wan" "6@eth0" + ;; + dir-860l-b1) + ucidef_add_switch "switch0" \ + "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0" + ;; duzun-dm06) ucidef_add_switch "switch0" \ "1:lan" "0:wan" "6@eth0" @@ -211,7 +219,7 @@ ramips_setup_interfaces() ;; kn_rc|\ kn_rf) - ucidef_add_switch "switch" \ + ucidef_add_switch "switch0" \ "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0" ;; kng_rc) @@ -234,11 +242,12 @@ ramips_setup_interfaces() "0:lan" "4:lan" "6t@eth0" ;; newifi-d1) - ucidef_set_interface_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "5:wan" "6t@eth0" "7t@eth0" - ucidef_add_switch "switch1" \ - "4:lan" "6t@eth0" "7t@eth0" + "1:lan:2" "2:lan:1" "4:wan" "6@eth0" + ;; + re6500) + ucidef_add_switch "switch0" \ + "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "6@eth0" ;; rt-n56u) ucidef_add_switch "switch0" \ @@ -250,6 +259,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" ;; + vocore2) + ucidef_add_switch "switch0" \ + "0:lan" "2:lan" "6t@eth0" + ;; f5d8235-v1|\ tew-714tru|\ v11st-fe|\ @@ -340,8 +353,10 @@ ramips_setup_macs() [ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 1) ;; + kn_rc|\ + kn_rf|\ kng_rc) - wan_mac=$(mtd_get_mac_binary factory 28) + wan_mac=$(mtd_get_mac_binary factory 40) ;; linkits7688 | \ linkits7688d) @@ -352,6 +367,10 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory_info 13) wan_mac=$(macaddr_add "$lan_mac" 1) ;; + miwifi-mini) + wan_mac=$(cat /sys/class/net/eth0/address) + lan_mac=$(macaddr_setbit_la "$wan_mac") + ;; m3|\ m4|\ x5|\ @@ -363,6 +382,11 @@ ramips_setup_macs() lan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(macaddr_add "$lan_mac" 2) ;; + omega2|\ + omega2p) + wan_mac=$(mtd_get_mac_binary factory 4) + lan_mac=$(mtd_get_mac_binary factory 46) + ;; oy-0001) lan_mac=$(mtd_get_mac_binary factory 40) wan_mac=$(mtd_get_mac_binary factory 46) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index a4ad72b086..cf3d2ca9c9 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -24,6 +24,7 @@ get_status_led() { dir-860l-b1|\ e1700|\ fonera20n|\ + hg255d|\ kn_rc|\ kn_rf|\ kng_rc|\ @@ -53,7 +54,8 @@ get_status_led() { jhr-n825r|\ mpr-a1|\ mpr-a2|\ - mzk-ex750np) + mzk-ex750np|\ + wn3000rpv3) status_led="$board:red:power" ;; ac1200pro|\ @@ -69,7 +71,6 @@ get_status_led() { dir-620-a1|\ dir-620-d1|\ dwr-512-b|\ - gb-pc1|\ hpm|\ hw550-3g|\ mac1200rv2|\ @@ -108,6 +109,7 @@ get_status_led() { w502u) status_led="$board:blue:wps" ;; + d240|\ dap-1350|\ na930|\ pbr-m1|\ @@ -173,6 +175,10 @@ get_status_led() { newifi-d1) status_led="$board:blue:status" ;; + omega2| \ + omega2p) + status_led="$board:amber:system" + ;; oy-0001|\ sl-r7205|\ zbt-we826) @@ -207,6 +213,9 @@ get_status_led() { v22rw-2x2) status_led="$board:green:security" ;; + vocore2) + status_led="$board:fuchsia:status" + ;; w306r-v20|\ witi|\ zbt-wr8305rt) diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 815de60f99..17ada64893 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -112,6 +112,9 @@ ramips_board_detect() { *"D105") name="d105" ;; + *"D240") + name="d240" + ;; *"DAP-1350") name="dap-1350" ;; @@ -202,9 +205,6 @@ ramips_board_detect() { *"FreeStation5") name="freestation5" ;; - *"GB-PC1") - name="gb-pc1" - ;; *"GL-MT300A") name="gl-mt300a" ;; @@ -272,7 +272,7 @@ ramips_board_detect() { name="m2m" ;; *"Mercury MAC1200R v2") - name="mac1200r-v2" + name="mac1200rv2" ;; *"MicroWRT") name="microwrt" @@ -367,6 +367,12 @@ ramips_board_detect() { *"NW718") name="nw718" ;; + *"Onion Omega2") + name="omega2" + ;; + *"Onion Omega2+") + name="omega2p" + ;; *"OY-0001") name="oy-0001" ;; @@ -478,6 +484,9 @@ ramips_board_detect() { *"VoCore (16M)") name="vocore-16M" ;; + *"VoCore2") + name="vocore2" + ;; *"VR500") name="vr500" ;; @@ -547,6 +556,9 @@ ramips_board_detect() { *"WMR-300") name="wmr-300" ;; + *"WN3000RPv3") + name="wn3000rpv3" + ;; *"WNCE2001") name="wnce2001" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 6cb9154a38..7f5b1dd070 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -35,6 +35,7 @@ platform_check_image() { cf-wr800n|\ cs-qr10|\ d105|\ + d240|\ dap-1350|\ db-wrt01|\ dcs-930|\ @@ -57,7 +58,6 @@ platform_check_image() { firewrt|\ fonera20n|\ freestation5|\ - gb-pc1|\ gl-mt300a|\ gl-mt300n|\ gl-mt750|\ @@ -103,6 +103,8 @@ platform_check_image() { newifi-d1|\ nixcore|\ nw718|\ + omega2|\ + omega2p|\ oy-0001|\ pbr-d1|\ pbr-m1|\ @@ -134,6 +136,7 @@ platform_check_image() { ur-336un|\ v22rw-2x2|\ vocore|\ + vocore2|\ vr500|\ w150m|\ w2914nsv2|\ @@ -155,6 +158,7 @@ platform_check_image() { wli-tx4-ag300n|\ wlr-6000|\ wmr-300|\ + wn3000rpv3|\ wnce2001|\ wndr3700v5|\ wr512-3gn|\ diff --git a/target/linux/ramips/base-files/sbin/fixup-mac-address b/target/linux/ramips/base-files/sbin/fixup-mac-address index 3fd8fcb97a..900fb7d086 100755 --- a/target/linux/ramips/base-files/sbin/fixup-mac-address +++ b/target/linux/ramips/base-files/sbin/fixup-mac-address @@ -1,6 +1,7 @@ #!/bin/sh . /lib/functions.sh . /lib/functions/system.sh +. /lib/ramips.sh partname="" offset="" diff --git a/target/linux/ramips/dts/3G150B.dts b/target/linux/ramips/dts/3G150B.dts index b64f940367..e242e3360e 100644 --- a/target/linux/ramips/dts/3G150B.dts +++ b/target/linux/ramips/dts/3G150B.dts @@ -55,7 +55,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/3G300M.dts b/target/linux/ramips/dts/3G300M.dts index 4d19bca6da..8ca8d15446 100644 --- a/target/linux/ramips/dts/3G300M.dts +++ b/target/linux/ramips/dts/3G300M.dts @@ -70,7 +70,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/A5-V11.dts b/target/linux/ramips/dts/A5-V11.dts index 748e1edac7..d755695de3 100644 --- a/target/linux/ramips/dts/A5-V11.dts +++ b/target/linux/ramips/dts/A5-V11.dts @@ -61,7 +61,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "pm25lq032"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/AI-BR100.dts b/target/linux/ramips/dts/AI-BR100.dts index 2405ae700f..b21e4c25ca 100644 --- a/target/linux/ramips/dts/AI-BR100.dts +++ b/target/linux/ramips/dts/AI-BR100.dts @@ -52,7 +52,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/AIR3GII.dts b/target/linux/ramips/dts/AIR3GII.dts index 4d9a3b5432..e9c1434734 100644 --- a/target/linux/ramips/dts/AIR3GII.dts +++ b/target/linux/ramips/dts/AIR3GII.dts @@ -48,7 +48,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q32b"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ALL0256N-4M.dts b/target/linux/ramips/dts/ALL0256N-4M.dts index abe43d124a..b4d421fc29 100644 --- a/target/linux/ramips/dts/ALL0256N-4M.dts +++ b/target/linux/ramips/dts/ALL0256N-4M.dts @@ -53,7 +53,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ALL0256N-8M.dts b/target/linux/ramips/dts/ALL0256N-8M.dts index 45c5d3376d..704e60625f 100644 --- a/target/linux/ramips/dts/ALL0256N-8M.dts +++ b/target/linux/ramips/dts/ALL0256N-8M.dts @@ -53,7 +53,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ALL5002.dts b/target/linux/ramips/dts/ALL5002.dts index 66ed0179a3..ddfe811d9d 100644 --- a/target/linux/ramips/dts/ALL5002.dts +++ b/target/linux/ramips/dts/ALL5002.dts @@ -54,7 +54,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l25635e"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ALL5003.dts b/target/linux/ramips/dts/ALL5003.dts index dfb97e6d9b..f507aa91b2 100644 --- a/target/linux/ramips/dts/ALL5003.dts +++ b/target/linux/ramips/dts/ALL5003.dts @@ -54,7 +54,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l25635e"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ASL26555-16M.dts b/target/linux/ramips/dts/ASL26555-16M.dts index 460fe05efa..83798513fd 100644 --- a/target/linux/ramips/dts/ASL26555-16M.dts +++ b/target/linux/ramips/dts/ASL26555-16M.dts @@ -84,7 +84,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25sl12801"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ASL26555-8M.dts b/target/linux/ramips/dts/ASL26555-8M.dts index 288f5552a8..2c6a462026 100644 --- a/target/linux/ramips/dts/ASL26555-8M.dts +++ b/target/linux/ramips/dts/ASL26555-8M.dts @@ -84,7 +84,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25sl064p"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/AWAPN2403.dts b/target/linux/ramips/dts/AWAPN2403.dts index a1b5b217b2..06bfac0578 100644 --- a/target/linux/ramips/dts/AWAPN2403.dts +++ b/target/linux/ramips/dts/AWAPN2403.dts @@ -39,7 +39,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/AWM002-4M.dtsi b/target/linux/ramips/dts/AWM002-4M.dtsi index 69d25bb5d4..3ea20e6a95 100644 --- a/target/linux/ramips/dts/AWM002-4M.dtsi +++ b/target/linux/ramips/dts/AWM002-4M.dtsi @@ -7,5 +7,4 @@ &m25p80 { compatible = "jedec,spi-nor"; - linux,modalias = "m25p80", "mx25l3205d"; }; diff --git a/target/linux/ramips/dts/AWM002-8M.dtsi b/target/linux/ramips/dts/AWM002-8M.dtsi index 1e6970ddec..3ea20e6a95 100644 --- a/target/linux/ramips/dts/AWM002-8M.dtsi +++ b/target/linux/ramips/dts/AWM002-8M.dtsi @@ -7,5 +7,4 @@ &m25p80 { compatible = "jedec,spi-nor"; - linux,modalias = "m25p80", "mx25l6405d"; }; diff --git a/target/linux/ramips/dts/AWM003-EVB.dts b/target/linux/ramips/dts/AWM003-EVB.dts index b42d77ed2f..7c23f34c26 100644 --- a/target/linux/ramips/dts/AWM003-EVB.dts +++ b/target/linux/ramips/dts/AWM003-EVB.dts @@ -54,7 +54,6 @@ &m25p80 { compatible = "jedec,spi-nor"; - linux,modalias = "m25p80", "mx25l6405d"; }; ðernet { diff --git a/target/linux/ramips/dts/ArcherC20i.dts b/target/linux/ramips/dts/ArcherC20i.dts index 711274e625..b1001bfaab 100644 --- a/target/linux/ramips/dts/ArcherC20i.dts +++ b/target/linux/ramips/dts/ArcherC20i.dts @@ -73,7 +73,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ArcherC50.dts b/target/linux/ramips/dts/ArcherC50.dts index 3924cc41fa..465260b561 100644 --- a/target/linux/ramips/dts/ArcherC50.dts +++ b/target/linux/ramips/dts/ArcherC50.dts @@ -22,7 +22,8 @@ power { label = "c50:green:power"; - gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + default-state = "on"; }; usb { @@ -32,7 +33,7 @@ wan { label = "c50:green:wan"; - gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; + gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; wan_orange { @@ -95,7 +96,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { @@ -169,6 +169,8 @@ &wmac { ralink,mtd-eeprom = <&radio 0>; + mtd-mac-address = <&rom 0xf100>; + mtd-mac-address-increment = <(-2)>; }; &pcie { diff --git a/target/linux/ramips/dts/ArcherMR200.dts b/target/linux/ramips/dts/ArcherMR200.dts index 93fb048d49..bbbf0af388 100644 --- a/target/linux/ramips/dts/ArcherMR200.dts +++ b/target/linux/ramips/dts/ArcherMR200.dts @@ -117,7 +117,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/CF-WR800N.dts b/target/linux/ramips/dts/CF-WR800N.dts index 6ce4b27301..9fcab02462 100644 --- a/target/linux/ramips/dts/CF-WR800N.dts +++ b/target/linux/ramips/dts/CF-WR800N.dts @@ -69,7 +69,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/CS-QR10.dts b/target/linux/ramips/dts/CS-QR10.dts index bdd828fe8f..81d897a0e8 100644 --- a/target/linux/ramips/dts/CS-QR10.dts +++ b/target/linux/ramips/dts/CS-QR10.dts @@ -8,17 +8,6 @@ compatible = "ralink,mt7620a-soc"; model = "Planex CS-QR10"; - sound { - compatible = "mediatek,mt7620-audio-wm8960"; - model = "mt7620-wm8960"; - i2s-controller = <&i2s>; - audio-routing = - "Ext Spk", "SPK_LP", - "Ext Spk", "SPK_LN", - "Ext Spk", "SPK_RP", - "Ext Spk", "SPK_RN"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -82,7 +71,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DB-WRT01.dts b/target/linux/ramips/dts/DB-WRT01.dts index 400c5ef51b..c4a32ea9e9 100644 --- a/target/linux/ramips/dts/DB-WRT01.dts +++ b/target/linux/ramips/dts/DB-WRT01.dts @@ -43,7 +43,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DCH-M225.dts b/target/linux/ramips/dts/DCH-M225.dts index 21133a9b88..3465c70ad0 100644 --- a/target/linux/ramips/dts/DCH-M225.dts +++ b/target/linux/ramips/dts/DCH-M225.dts @@ -100,7 +100,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <80000000>; m25p,fast-read; diff --git a/target/linux/ramips/dts/DCS-930L-B1.dts b/target/linux/ramips/dts/DCS-930L-B1.dts index 17996d2358..8ebc1bb3d2 100644 --- a/target/linux/ramips/dts/DCS-930L-B1.dts +++ b/target/linux/ramips/dts/DCS-930L-B1.dts @@ -50,7 +50,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DIR-300-B7.dts b/target/linux/ramips/dts/DIR-300-B7.dts index fb93f5d646..9bb4345e33 100644 --- a/target/linux/ramips/dts/DIR-300-B7.dts +++ b/target/linux/ramips/dts/DIR-300-B7.dts @@ -50,7 +50,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DIR-320-B1.dts b/target/linux/ramips/dts/DIR-320-B1.dts index 2335c9a391..0716229835 100644 --- a/target/linux/ramips/dts/DIR-320-B1.dts +++ b/target/linux/ramips/dts/DIR-320-B1.dts @@ -72,7 +72,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DIR-610-A1.dts b/target/linux/ramips/dts/DIR-610-A1.dts index e69997f474..a70b4604b0 100644 --- a/target/linux/ramips/dts/DIR-610-A1.dts +++ b/target/linux/ramips/dts/DIR-610-A1.dts @@ -50,7 +50,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DIR-615-H1.dts b/target/linux/ramips/dts/DIR-615-H1.dts index 9fbd7356c4..a2873be5da 100644 --- a/target/linux/ramips/dts/DIR-615-H1.dts +++ b/target/linux/ramips/dts/DIR-615-H1.dts @@ -65,7 +65,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DIR-620-D1.dts b/target/linux/ramips/dts/DIR-620-D1.dts index 1bdcaffb4a..f3079d3703 100644 --- a/target/linux/ramips/dts/DIR-620-D1.dts +++ b/target/linux/ramips/dts/DIR-620-D1.dts @@ -44,7 +44,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DIR-645.dts b/target/linux/ramips/dts/DIR-645.dts index 30eccaf5f5..9c8082ca24 100644 --- a/target/linux/ramips/dts/DIR-645.dts +++ b/target/linux/ramips/dts/DIR-645.dts @@ -72,7 +72,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <25000000>; partition@0 { diff --git a/target/linux/ramips/dts/DIR-810L.dts b/target/linux/ramips/dts/DIR-810L.dts index 4ccea0d45b..9621183e07 100644 --- a/target/linux/ramips/dts/DIR-810L.dts +++ b/target/linux/ramips/dts/DIR-810L.dts @@ -55,7 +55,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/DUZUN-DM06.dts b/target/linux/ramips/dts/DUZUN-DM06.dts index 5715791a68..d40df4fb5c 100644 --- a/target/linux/ramips/dts/DUZUN-DM06.dts +++ b/target/linux/ramips/dts/DUZUN-DM06.dts @@ -126,7 +126,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <60000000>; m25p,chunked-io = <32>; m25p,fast-read; diff --git a/target/linux/ramips/dts/DWR-512-B.dts b/target/linux/ramips/dts/DWR-512-B.dts index 29e8eaf410..473af08141 100644 --- a/target/linux/ramips/dts/DWR-512-B.dts +++ b/target/linux/ramips/dts/DWR-512-B.dts @@ -17,7 +17,7 @@ wps { label = "wps"; - gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; linux,code = ; }; @@ -33,7 +33,7 @@ sms { label = "dwr-512-b:green:sms"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; status { label = "dwr-512-b:green:status"; diff --git a/target/linux/ramips/dts/E1700.dts b/target/linux/ramips/dts/E1700.dts index 050303a413..cb3d2ec83a 100644 --- a/target/linux/ramips/dts/E1700.dts +++ b/target/linux/ramips/dts/E1700.dts @@ -60,7 +60,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/EX2700.dts b/target/linux/ramips/dts/EX2700.dts index 348ca789d1..6c66c2009d 100644 --- a/target/linux/ramips/dts/EX2700.dts +++ b/target/linux/ramips/dts/EX2700.dts @@ -13,6 +13,7 @@ #include "mt7620a.dtsi" #include +#include / { compatible = "ralink,mt7620a-soc"; @@ -27,38 +28,38 @@ power_g { label = "ex2700:green:power"; - gpios = <&gpio0 9 1>; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; power_r { label = "ex2700:red:power"; - gpios = <&gpio0 11 1>; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; device_g { label = "ex2700:green:device"; - gpios = <&gpio0 13 1>; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; device_r { label = "ex2700:red:device"; - gpios = <&gpio0 10 1>; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; router_g { label = "ex2700:green:router"; - gpios = <&gpio0 12 1>; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; router_r { label = "ex2700:red:router"; - gpios = <&gpio0 14 1>; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wps { label = "ex2700:green:wps"; - gpios = <&gpio1 15 1>; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; @@ -70,13 +71,13 @@ reset { label = "reset"; - gpios = <&gpio0 1 1>; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; linux,code = ; }; wps { label = "wps"; - gpios = <&gpio0 2 1>; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; linux,code = ; }; }; @@ -98,7 +99,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { @@ -131,15 +131,13 @@ }; &wmac { + mtd-mac-address = <&art 0x6>; ralink,mtd-eeprom = <&art 0x1000>; }; &pinctrl { state_default: pinctrl0 { default { - // spi refclk: pins 37, 38, 39 - // uartf: pins 8, 9, 10, 11, 12, 13, 14 - // i2c: pins 1, 2 ralink,group = "i2c", "uartf", "spi refclk"; ralink,function = "gpio"; }; diff --git a/target/linux/ramips/dts/F7C027.dts b/target/linux/ramips/dts/F7C027.dts index d6a150a4a7..10d26a4e48 100644 --- a/target/linux/ramips/dts/F7C027.dts +++ b/target/linux/ramips/dts/F7C027.dts @@ -66,7 +66,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l12805d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts deleted file mode 100644 index df7caa9100..0000000000 --- a/target/linux/ramips/dts/GB-PC1.dts +++ /dev/null @@ -1,120 +0,0 @@ -/dts-v1/; - -#include "mt7621.dtsi" - -#include -#include - -/ { - compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc"; - model = "GB-PC1"; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x1c000000>, <0x20000000 0x4000000>; - }; - - chosen { - bootargs = "console=ttyS0,57600"; - }; - - palmbus: palmbus@1E000000 { - i2c@900 { - status = "okay"; - }; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; - linux,code = ; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - - system { - label = "gb-pc1:green:system"; - gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; - }; - - status { - label = "gb-pc1:green:status"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; - }; - - lan1 { - label = "gb-pc1:green:lan1"; - gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; - }; - - lan2 { - label = "gb-pc1:green:lan2"; - gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&sdhci { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x1fb0000>; - }; - }; -}; - -&pcie { - status = "okay"; -}; - -ðernet { - mtd-mac-address = <&factory 0xe000>; -}; - -&pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wdt", "rgmii2", "uart3"; - ralink,function = "gpio"; - }; - }; -}; diff --git a/target/linux/ramips/dts/GL-MT300A.dts b/target/linux/ramips/dts/GL-MT300A.dts index 6922b958db..a700558a03 100644 --- a/target/linux/ramips/dts/GL-MT300A.dts +++ b/target/linux/ramips/dts/GL-MT300A.dts @@ -84,9 +84,8 @@ m25p80@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "w25q128"; + compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { @@ -141,19 +140,6 @@ ralink,mtd-eeprom = <&factory 0>; }; -&pcie { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; -}; - &pinctrl { state_default: pinctrl0 { gpio { diff --git a/target/linux/ramips/dts/GL-MT300N.dts b/target/linux/ramips/dts/GL-MT300N.dts index c6feb96f89..be78a72b50 100644 --- a/target/linux/ramips/dts/GL-MT300N.dts +++ b/target/linux/ramips/dts/GL-MT300N.dts @@ -79,9 +79,8 @@ m25p80@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "w25q128"; + compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { @@ -130,19 +129,6 @@ ralink,mtd-eeprom = <&factory 0>; }; -&pcie { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; -}; - &pinctrl { state_default: pinctrl0 { gpio { diff --git a/target/linux/ramips/dts/GL-MT750.dts b/target/linux/ramips/dts/GL-MT750.dts index 46679842bc..8bf96c7d35 100644 --- a/target/linux/ramips/dts/GL-MT750.dts +++ b/target/linux/ramips/dts/GL-MT750.dts @@ -79,9 +79,8 @@ m25p80@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "w25q128"; + compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/HC5XXX.dtsi b/target/linux/ramips/dts/HC5XXX.dtsi index 54bf40936e..3bea77e233 100644 --- a/target/linux/ramips/dts/HC5XXX.dtsi +++ b/target/linux/ramips/dts/HC5XXX.dtsi @@ -58,7 +58,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/HLKRM04.dts b/target/linux/ramips/dts/HLKRM04.dts index cbd860967a..79a599d49e 100644 --- a/target/linux/ramips/dts/HLKRM04.dts +++ b/target/linux/ramips/dts/HLKRM04.dts @@ -66,7 +66,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/HT-TM02.dts b/target/linux/ramips/dts/HT-TM02.dts index 8dc2dbc524..0bfe48f3d4 100644 --- a/target/linux/ramips/dts/HT-TM02.dts +++ b/target/linux/ramips/dts/HT-TM02.dts @@ -55,7 +55,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/JHR-N805R.dts b/target/linux/ramips/dts/JHR-N805R.dts index 20cdb84876..4493b3c30d 100644 --- a/target/linux/ramips/dts/JHR-N805R.dts +++ b/target/linux/ramips/dts/JHR-N805R.dts @@ -48,7 +48,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/LINKIT7688.dts b/target/linux/ramips/dts/LINKIT7688.dts index 210d4d0b8d..f1809d169a 100644 --- a/target/linux/ramips/dts/LINKIT7688.dts +++ b/target/linux/ramips/dts/LINKIT7688.dts @@ -118,7 +118,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l25635e"; spi-max-frequency = <40000000>; m25p,chunked-io = <31>; diff --git a/target/linux/ramips/dts/M2M.dts b/target/linux/ramips/dts/M2M.dts index 99e7b6a44b..74d66d5ff5 100644 --- a/target/linux/ramips/dts/M2M.dts +++ b/target/linux/ramips/dts/M2M.dts @@ -54,7 +54,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/M3.dts b/target/linux/ramips/dts/M3.dts index f4169c779c..19ccf3ddfa 100644 --- a/target/linux/ramips/dts/M3.dts +++ b/target/linux/ramips/dts/M3.dts @@ -46,7 +46,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q32"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/M4-4M.dts b/target/linux/ramips/dts/M4-4M.dts index c6ed683909..3e147e53b3 100644 --- a/target/linux/ramips/dts/M4-4M.dts +++ b/target/linux/ramips/dts/M4-4M.dts @@ -39,7 +39,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "pm25lq032"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/M4-8M.dts b/target/linux/ramips/dts/M4-8M.dts index 75c7e53388..65a3972d7d 100644 --- a/target/linux/ramips/dts/M4-8M.dts +++ b/target/linux/ramips/dts/M4-8M.dts @@ -39,7 +39,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "gd25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MAC1200RV2.dts b/target/linux/ramips/dts/MAC1200RV2.dts index f52be3c51c..45c26e1e80 100644 --- a/target/linux/ramips/dts/MAC1200RV2.dts +++ b/target/linux/ramips/dts/MAC1200RV2.dts @@ -30,9 +30,8 @@ m25p80@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "w25q128"; + compatible = "jedec,spi-nor"; reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; m25p,chunked-io = <32>; diff --git a/target/linux/ramips/dts/MINIEMBPLUG.dts b/target/linux/ramips/dts/MINIEMBPLUG.dts index 5f1cfe93cb..45616ef28a 100644 --- a/target/linux/ramips/dts/MINIEMBPLUG.dts +++ b/target/linux/ramips/dts/MINIEMBPLUG.dts @@ -75,7 +75,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts b/target/linux/ramips/dts/MIWIFI-MINI.dts index 0cd511c4fa..101ae8d844 100644 --- a/target/linux/ramips/dts/MIWIFI-MINI.dts +++ b/target/linux/ramips/dts/MIWIFI-MINI.dts @@ -65,7 +65,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { @@ -119,7 +118,7 @@ ðernet { pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + mtd-mac-address = <&factory 0x28>; mediatek,portmap = "llllw"; }; diff --git a/target/linux/ramips/dts/MIWIFI-NANO.dts b/target/linux/ramips/dts/MIWIFI-NANO.dts index dfe9ef5707..21ac541107 100644 --- a/target/linux/ramips/dts/MIWIFI-NANO.dts +++ b/target/linux/ramips/dts/MIWIFI-NANO.dts @@ -75,7 +75,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; m25p,chunked-io = <32>; @@ -99,7 +98,7 @@ partition@50000 { label = "firmware"; - reg = <0x50000 0x7b0000>; + reg = <0x50000 0xfb0000>; }; }; }; diff --git a/target/linux/ramips/dts/MLW221.dts b/target/linux/ramips/dts/MLW221.dts index 05d7dfff8a..f02602fb9f 100644 --- a/target/linux/ramips/dts/MLW221.dts +++ b/target/linux/ramips/dts/MLW221.dts @@ -62,7 +62,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl129p1"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MLWG2.dts b/target/linux/ramips/dts/MLWG2.dts index 9c71c91c1c..fc281934e1 100644 --- a/target/linux/ramips/dts/MLWG2.dts +++ b/target/linux/ramips/dts/MLWG2.dts @@ -62,7 +62,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MPRA1.dts b/target/linux/ramips/dts/MPRA1.dts index e97e60ca59..9762658c72 100644 --- a/target/linux/ramips/dts/MPRA1.dts +++ b/target/linux/ramips/dts/MPRA1.dts @@ -61,7 +61,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MPRA2.dts b/target/linux/ramips/dts/MPRA2.dts index 72ee8768b6..30ab50f33d 100644 --- a/target/linux/ramips/dts/MPRA2.dts +++ b/target/linux/ramips/dts/MPRA2.dts @@ -61,7 +61,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MT7620a.dts b/target/linux/ramips/dts/MT7620a.dts index 8f1b6d9521..3ed22d5c9a 100644 --- a/target/linux/ramips/dts/MT7620a.dts +++ b/target/linux/ramips/dts/MT7620a.dts @@ -36,7 +36,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MT7620a_MT7530.dts b/target/linux/ramips/dts/MT7620a_MT7530.dts index 5885ed045d..70f92536f3 100644 --- a/target/linux/ramips/dts/MT7620a_MT7530.dts +++ b/target/linux/ramips/dts/MT7620a_MT7530.dts @@ -15,7 +15,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MT7620a_MT7610e.dts b/target/linux/ramips/dts/MT7620a_MT7610e.dts index da241a4253..1670b9c86b 100644 --- a/target/linux/ramips/dts/MT7620a_MT7610e.dts +++ b/target/linux/ramips/dts/MT7620a_MT7610e.dts @@ -40,7 +40,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <1000000>; partition@0 { diff --git a/target/linux/ramips/dts/MT7628.dts b/target/linux/ramips/dts/MT7628.dts index a4b066cfd5..dc86c70135 100644 --- a/target/linux/ramips/dts/MT7628.dts +++ b/target/linux/ramips/dts/MT7628.dts @@ -33,7 +33,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; m25p,chunked-io = <32>; diff --git a/target/linux/ramips/dts/MZK-750DHP.dts b/target/linux/ramips/dts/MZK-750DHP.dts index 589b19e52c..4107c6faac 100644 --- a/target/linux/ramips/dts/MZK-750DHP.dts +++ b/target/linux/ramips/dts/MZK-750DHP.dts @@ -63,7 +63,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MZK-DP150N.dts b/target/linux/ramips/dts/MZK-DP150N.dts index 7fa8ef4ab9..2e559d6c7e 100644 --- a/target/linux/ramips/dts/MZK-DP150N.dts +++ b/target/linux/ramips/dts/MZK-DP150N.dts @@ -43,7 +43,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts b/target/linux/ramips/dts/MZK-EX300NP.dts index 569d0a951c..854d8a141b 100644 --- a/target/linux/ramips/dts/MZK-EX300NP.dts +++ b/target/linux/ramips/dts/MZK-EX300NP.dts @@ -78,7 +78,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts b/target/linux/ramips/dts/MZK-EX750NP.dts index ec2ca5fc4b..3aa2a57dfb 100644 --- a/target/linux/ramips/dts/MZK-EX750NP.dts +++ b/target/linux/ramips/dts/MZK-EX750NP.dts @@ -83,7 +83,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts index c8558c6326..6f8179cc57 100644 --- a/target/linux/ramips/dts/MicroWRT.dts +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -48,7 +48,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/NA930.dts b/target/linux/ramips/dts/NA930.dts index 522bc75855..a5393e2a9a 100644 --- a/target/linux/ramips/dts/NA930.dts +++ b/target/linux/ramips/dts/NA930.dts @@ -5,7 +5,7 @@ #include / { - compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; + compatible = "ralink,mt7620a-soc"; model = "Sercomm NA930"; chosen { diff --git a/target/linux/ramips/dts/NBG-419N2.dts b/target/linux/ramips/dts/NBG-419N2.dts index 8bb0cc5280..18e7902397 100644 --- a/target/linux/ramips/dts/NBG-419N2.dts +++ b/target/linux/ramips/dts/NBG-419N2.dts @@ -14,9 +14,8 @@ m25p80@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "mx25l6405d"; + compatible = "jedec,spi-nor"; reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/NCS601W.dts b/target/linux/ramips/dts/NCS601W.dts index 1942b0f908..3c5097f559 100644 --- a/target/linux/ramips/dts/NCS601W.dts +++ b/target/linux/ramips/dts/NCS601W.dts @@ -15,7 +15,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/NIXCORE-16M.dts b/target/linux/ramips/dts/NIXCORE-16M.dts index b97c425364..5d4cdae7f9 100644 --- a/target/linux/ramips/dts/NIXCORE-16M.dts +++ b/target/linux/ramips/dts/NIXCORE-16M.dts @@ -14,7 +14,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/NIXCORE-8M.dts b/target/linux/ramips/dts/NIXCORE-8M.dts index 55457d9dde..af78808bd7 100644 --- a/target/linux/ramips/dts/NIXCORE-8M.dts +++ b/target/linux/ramips/dts/NIXCORE-8M.dts @@ -14,7 +14,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/NW718.dts b/target/linux/ramips/dts/NW718.dts index 372bff6e7f..60922555d6 100644 --- a/target/linux/ramips/dts/NW718.dts +++ b/target/linux/ramips/dts/NW718.dts @@ -55,7 +55,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <25000000>; partition@0 { diff --git a/target/linux/ramips/dts/OY-0001.dts b/target/linux/ramips/dts/OY-0001.dts index 932d379b70..ff6fe1e2e2 100644 --- a/target/linux/ramips/dts/OY-0001.dts +++ b/target/linux/ramips/dts/OY-0001.dts @@ -56,7 +56,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/PBR-D1.dts b/target/linux/ramips/dts/PBR-D1.dts index 3d4e987c48..739940efbc 100644 --- a/target/linux/ramips/dts/PBR-D1.dts +++ b/target/linux/ramips/dts/PBR-D1.dts @@ -99,7 +99,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <40000000>; m25p,chunked-io = <31>; diff --git a/target/linux/ramips/dts/PSG1208.dts b/target/linux/ramips/dts/PSG1208.dts index e9b66395df..6ae56f2d70 100644 --- a/target/linux/ramips/dts/PSG1208.dts +++ b/target/linux/ramips/dts/PSG1208.dts @@ -52,7 +52,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; partition@0 { @@ -83,7 +82,7 @@ &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; + ralink,group = "i2c", "spi refclk", "wled"; ralink,function = "gpio"; }; }; diff --git a/target/linux/ramips/dts/PSG1218.dts b/target/linux/ramips/dts/PSG1218.dts index b777c9b1f2..5e90d1bf1c 100644 --- a/target/linux/ramips/dts/PSG1218.dts +++ b/target/linux/ramips/dts/PSG1218.dts @@ -53,7 +53,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/PX-4885-4M.dts b/target/linux/ramips/dts/PX-4885-4M.dts index 398a4a90dc..bd3b271925 100644 --- a/target/linux/ramips/dts/PX-4885-4M.dts +++ b/target/linux/ramips/dts/PX-4885-4M.dts @@ -14,7 +14,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/PX-4885-8M.dts b/target/linux/ramips/dts/PX-4885-8M.dts index d6e694ed58..605540928e 100644 --- a/target/linux/ramips/dts/PX-4885-8M.dts +++ b/target/linux/ramips/dts/PX-4885-8M.dts @@ -14,7 +14,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/RP-N53.dts b/target/linux/ramips/dts/RP-N53.dts index 514481b382..466a072bae 100644 --- a/target/linux/ramips/dts/RP-N53.dts +++ b/target/linux/ramips/dts/RP-N53.dts @@ -106,7 +106,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { @@ -163,4 +162,13 @@ &pcie { status = "okay"; + + pcie-bridge { + wifi@1814,5592 { + compatible = "pci1814,5592"; + reg = <0x0000 0 0 0 0>; + ralink,2ghz = <0>; + ralink,mtd-eeprom = <&factory 0x8000>; + }; + }; }; diff --git a/target/linux/ramips/dts/RT-G32-B1.dts b/target/linux/ramips/dts/RT-G32-B1.dts index d392bb3545..38d6992f0c 100644 --- a/target/linux/ramips/dts/RT-G32-B1.dts +++ b/target/linux/ramips/dts/RT-G32-B1.dts @@ -36,7 +36,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/RT-N14U.dts b/target/linux/ramips/dts/RT-N14U.dts index 22dd7b818b..8bb2701040 100644 --- a/target/linux/ramips/dts/RT-N14U.dts +++ b/target/linux/ramips/dts/RT-N14U.dts @@ -73,7 +73,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/RT5350F-OLINUXINO-EVB.dts b/target/linux/ramips/dts/RT5350F-OLINUXINO-EVB.dts index bda918b44b..dbd2cf6ad4 100644 --- a/target/linux/ramips/dts/RT5350F-OLINUXINO-EVB.dts +++ b/target/linux/ramips/dts/RT5350F-OLINUXINO-EVB.dts @@ -37,7 +37,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/RT5350F-OLINUXINO.dts b/target/linux/ramips/dts/RT5350F-OLINUXINO.dts index 0d28e10d95..a4f1aa7455 100644 --- a/target/linux/ramips/dts/RT5350F-OLINUXINO.dts +++ b/target/linux/ramips/dts/RT5350F-OLINUXINO.dts @@ -15,7 +15,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/RUT5XX.dts b/target/linux/ramips/dts/RUT5XX.dts index 76cf49bab2..7a09d43125 100644 --- a/target/linux/ramips/dts/RUT5XX.dts +++ b/target/linux/ramips/dts/RUT5XX.dts @@ -39,7 +39,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "n25q128a13"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/TEW-714TRU.dts b/target/linux/ramips/dts/TEW-714TRU.dts index 79b30d1bfd..27727cb881 100644 --- a/target/linux/ramips/dts/TEW-714TRU.dts +++ b/target/linux/ramips/dts/TEW-714TRU.dts @@ -65,7 +65,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/TINY-AC.dts b/target/linux/ramips/dts/TINY-AC.dts index 356c44d511..460227db10 100644 --- a/target/linux/ramips/dts/TINY-AC.dts +++ b/target/linux/ramips/dts/TINY-AC.dts @@ -73,7 +73,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/UR-336UN.dts b/target/linux/ramips/dts/UR-336UN.dts index 67def7ce7c..09cd28f14a 100644 --- a/target/linux/ramips/dts/UR-336UN.dts +++ b/target/linux/ramips/dts/UR-336UN.dts @@ -15,6 +15,29 @@ device-width = <2>; #address-cells = <1>; #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; }; gpio-leds { @@ -75,20 +98,18 @@ }; }; -/* FIXME: no partitions defined */ -/*ðernet { +ðernet { mtd-mac-address = <&factory 0x4004>; }; -*/ + &esw { mediatek,portmap = <0x2f>; }; -/* FIXME: no partitions defined */ -/*&wmac { +&wmac { ralink,mtd-eeprom = <&factory 0>; }; -*/ + &otg { status = "okay"; }; diff --git a/target/linux/ramips/dts/VOCORE-16M.dts b/target/linux/ramips/dts/VOCORE-16M.dts index dd10784bf1..d2792c4b8c 100644 --- a/target/linux/ramips/dts/VOCORE-16M.dts +++ b/target/linux/ramips/dts/VOCORE-16M.dts @@ -14,7 +14,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/VOCORE-8M.dts b/target/linux/ramips/dts/VOCORE-8M.dts index e3647244f9..ea14a420a5 100644 --- a/target/linux/ramips/dts/VOCORE-8M.dts +++ b/target/linux/ramips/dts/VOCORE-8M.dts @@ -14,7 +14,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WHR-1166D.dts b/target/linux/ramips/dts/WHR-1166D.dts index c3b85da2b3..66fcc9b683 100644 --- a/target/linux/ramips/dts/WHR-1166D.dts +++ b/target/linux/ramips/dts/WHR-1166D.dts @@ -93,7 +93,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { @@ -145,7 +144,7 @@ phy5: ethernet-phy@5 { reg = <5>; - phy-mode = "rgmii"; + phy-mode = "rgmii-rxid"; }; }; }; diff --git a/target/linux/ramips/dts/WHR-300HP2.dts b/target/linux/ramips/dts/WHR-300HP2.dts index 3958217082..44387541b1 100644 --- a/target/linux/ramips/dts/WHR-300HP2.dts +++ b/target/linux/ramips/dts/WHR-300HP2.dts @@ -93,7 +93,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WHR-600D.dts b/target/linux/ramips/dts/WHR-600D.dts index bea67a9a90..1100261da9 100644 --- a/target/linux/ramips/dts/WHR-600D.dts +++ b/target/linux/ramips/dts/WHR-600D.dts @@ -93,7 +93,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; partition@0 { @@ -149,10 +148,10 @@ status = "okay"; pcie-bridge { - wifi@1814,3091 { - compatible = "pci1814,3091"; + wifi@1814,5592 { + compatible = "pci1814,5592"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + ralink,mtd-eeprom = <&factory 0x8000>; }; }; }; diff --git a/target/linux/ramips/dts/WHR-G300N.dts b/target/linux/ramips/dts/WHR-G300N.dts index c0779e25bd..e2b19ce03e 100644 --- a/target/linux/ramips/dts/WHR-G300N.dts +++ b/target/linux/ramips/dts/WHR-G300N.dts @@ -15,6 +15,35 @@ device-width = <2>; #address-cells = <1>; #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3a0000>; + }; + + partition@3f0000 { + label = "user"; + reg = <0x3f0000 0x10000>; + read-only; + }; }; gpio-leds { @@ -81,8 +110,6 @@ mediatek,portmap = <0x2f>; }; -/* FIXME: no partitions defined */ -/*&wmac { +&wmac { ralink,mtd-eeprom = <&factory 0>; }; -*/ diff --git a/target/linux/ramips/dts/WIDORA-NEO.dts b/target/linux/ramips/dts/WIDORA-NEO.dts index f6b8f1d52c..0be11e9a8e 100644 --- a/target/linux/ramips/dts/WIDORA-NEO.dts +++ b/target/linux/ramips/dts/WIDORA-NEO.dts @@ -105,7 +105,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <40000000>; m25p,chunked-io = <31>; diff --git a/target/linux/ramips/dts/WIZARD8800.dts b/target/linux/ramips/dts/WIZARD8800.dts index bbfa61085d..623e351104 100644 --- a/target/linux/ramips/dts/WIZARD8800.dts +++ b/target/linux/ramips/dts/WIZARD8800.dts @@ -23,7 +23,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q32"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WIZFI630A.dts b/target/linux/ramips/dts/WIZFI630A.dts index 78891c24b6..9f19564969 100644 --- a/target/linux/ramips/dts/WIZFI630A.dts +++ b/target/linux/ramips/dts/WIZFI630A.dts @@ -85,7 +85,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WL-330N.dts b/target/linux/ramips/dts/WL-330N.dts index 1cf1712dfa..3095e24510 100644 --- a/target/linux/ramips/dts/WL-330N.dts +++ b/target/linux/ramips/dts/WL-330N.dts @@ -50,7 +50,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WL-330N3G.dts b/target/linux/ramips/dts/WL-330N3G.dts index fe703ba5b3..948d37dc98 100644 --- a/target/linux/ramips/dts/WL-330N3G.dts +++ b/target/linux/ramips/dts/WL-330N3G.dts @@ -55,7 +55,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WL-WN575A3.dts b/target/linux/ramips/dts/WL-WN575A3.dts index 267482407f..63eff77a08 100644 --- a/target/linux/ramips/dts/WL-WN575A3.dts +++ b/target/linux/ramips/dts/WL-WN575A3.dts @@ -90,7 +90,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; m25p,chunked-io = <32>; diff --git a/target/linux/ramips/dts/WLI-TX4-AG300N.dts b/target/linux/ramips/dts/WLI-TX4-AG300N.dts index 9d9b222bd7..79e5c341d8 100644 --- a/target/linux/ramips/dts/WLI-TX4-AG300N.dts +++ b/target/linux/ramips/dts/WLI-TX4-AG300N.dts @@ -37,7 +37,7 @@ }; partition@50000 { - label = "linux"; + label = "firmware"; reg = <0x50000 0x3b0000>; }; }; @@ -96,7 +96,16 @@ mtd-mac-address = <&factory 0x4>; port@0 { - mediatek,fixed-link = <1000 1 1 1>; + mediatek,fixed-link = <100 1 1 1>; + }; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + phy-mode = "mii"; + reg = <0>; + }; }; }; diff --git a/target/linux/ramips/dts/WMR-300.dts b/target/linux/ramips/dts/WMR-300.dts index faa867b723..a56f71642e 100644 --- a/target/linux/ramips/dts/WMR-300.dts +++ b/target/linux/ramips/dts/WMR-300.dts @@ -59,7 +59,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WNCE2001.dts b/target/linux/ramips/dts/WNCE2001.dts index 92d03defdc..fd52966007 100644 --- a/target/linux/ramips/dts/WNCE2001.dts +++ b/target/linux/ramips/dts/WNCE2001.dts @@ -76,7 +76,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l3205d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WRH-300CR.dts b/target/linux/ramips/dts/WRH-300CR.dts index f7ef9335f1..c336ba317a 100644 --- a/target/linux/ramips/dts/WRH-300CR.dts +++ b/target/linux/ramips/dts/WRH-300CR.dts @@ -67,7 +67,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "mx25l12805d"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WRTNODE.dts b/target/linux/ramips/dts/WRTNODE.dts index 04f5836d0a..df10eefcbf 100644 --- a/target/linux/ramips/dts/WRTNODE.dts +++ b/target/linux/ramips/dts/WRTNODE.dts @@ -36,7 +36,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WSR-600.dts b/target/linux/ramips/dts/WSR-600.dts index d5439fa4c1..63206b4d61 100644 --- a/target/linux/ramips/dts/WSR-600.dts +++ b/target/linux/ramips/dts/WSR-600.dts @@ -157,6 +157,27 @@ }; }; +&pcie { + status = "okay"; + + pcie0 { + rt5592@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + ralink,mtd-eeprom = <&factory 0x8000>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; +}; + &xhci { status = "disabled"; }; diff --git a/target/linux/ramips/dts/WT1520-4M.dts b/target/linux/ramips/dts/WT1520-4M.dts index 26e01f1043..7db82428fc 100644 --- a/target/linux/ramips/dts/WT1520-4M.dts +++ b/target/linux/ramips/dts/WT1520-4M.dts @@ -14,7 +14,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WT1520-8M.dts b/target/linux/ramips/dts/WT1520-8M.dts index 86c9297970..101f3d7c91 100644 --- a/target/linux/ramips/dts/WT1520-8M.dts +++ b/target/linux/ramips/dts/WT1520-8M.dts @@ -14,7 +14,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WT3020-4M.dts b/target/linux/ramips/dts/WT3020-4M.dts index 6e40d5a869..c2d83f9fab 100644 --- a/target/linux/ramips/dts/WT3020-4M.dts +++ b/target/linux/ramips/dts/WT3020-4M.dts @@ -47,7 +47,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q32"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/WT3020-8M.dts b/target/linux/ramips/dts/WT3020-8M.dts index 4ef48cb14e..987eed4ee5 100644 --- a/target/linux/ramips/dts/WT3020-8M.dts +++ b/target/linux/ramips/dts/WT3020-8M.dts @@ -47,7 +47,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/X5.dts b/target/linux/ramips/dts/X5.dts index efb9d77d71..9cae72c8fb 100644 --- a/target/linux/ramips/dts/X5.dts +++ b/target/linux/ramips/dts/X5.dts @@ -78,7 +78,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "gd25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/X8.dts b/target/linux/ramips/dts/X8.dts index db8eec56c5..de5170e2ad 100644 --- a/target/linux/ramips/dts/X8.dts +++ b/target/linux/ramips/dts/X8.dts @@ -39,7 +39,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "gd25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/Y1.dtsi b/target/linux/ramips/dts/Y1.dtsi index 1d5f1ef074..8e6133a61c 100644 --- a/target/linux/ramips/dts/Y1.dtsi +++ b/target/linux/ramips/dts/Y1.dtsi @@ -41,7 +41,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/YOUKU-YK1.dts b/target/linux/ramips/dts/YOUKU-YK1.dts index 1746f6c674..260f86ab96 100644 --- a/target/linux/ramips/dts/YOUKU-YK1.dts +++ b/target/linux/ramips/dts/YOUKU-YK1.dts @@ -65,7 +65,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q256"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ZBT-APE522II.dts b/target/linux/ramips/dts/ZBT-APE522II.dts index f570129977..5eca65f24c 100644 --- a/target/linux/ramips/dts/ZBT-APE522II.dts +++ b/target/linux/ramips/dts/ZBT-APE522II.dts @@ -79,7 +79,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "w25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ZBT-CPE102.dts b/target/linux/ramips/dts/ZBT-CPE102.dts index abfe0c0229..089084077d 100644 --- a/target/linux/ramips/dts/ZBT-CPE102.dts +++ b/target/linux/ramips/dts/ZBT-CPE102.dts @@ -65,7 +65,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ZBT-WA05.dts b/target/linux/ramips/dts/ZBT-WA05.dts index 43f08f5139..33538892c3 100644 --- a/target/linux/ramips/dts/ZBT-WA05.dts +++ b/target/linux/ramips/dts/ZBT-WA05.dts @@ -65,7 +65,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ZBT-WE826.dts b/target/linux/ramips/dts/ZBT-WE826.dts index 1eb03189d1..de7fa42d91 100644 --- a/target/linux/ramips/dts/ZBT-WE826.dts +++ b/target/linux/ramips/dts/ZBT-WE826.dts @@ -59,9 +59,8 @@ en25q128@0 { #address-cells = <1>; #size-cells = <1>; - compatible = "w25q128"; + compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ZBT-WR8305RT.dts b/target/linux/ramips/dts/ZBT-WR8305RT.dts index edc820f790..81598bd237 100644 --- a/target/linux/ramips/dts/ZBT-WR8305RT.dts +++ b/target/linux/ramips/dts/ZBT-WR8305RT.dts @@ -57,7 +57,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/ZTE-Q7.dts b/target/linux/ramips/dts/ZTE-Q7.dts index 44bed871aa..9ec1d89a41 100644 --- a/target/linux/ramips/dts/ZTE-Q7.dts +++ b/target/linux/ramips/dts/ZTE-Q7.dts @@ -52,7 +52,6 @@ #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; - linux,modalias = "m25p80", "en25q64"; spi-max-frequency = <10000000>; partition@0 { diff --git a/target/linux/ramips/dts/kn_rc.dts b/target/linux/ramips/dts/kn_rc.dts index c63c1a3914..2709b5188a 100644 --- a/target/linux/ramips/dts/kn_rc.dts +++ b/target/linux/ramips/dts/kn_rc.dts @@ -56,6 +56,17 @@ linux,code = ; }; }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usb_power { + gpio-export,name = "usb"; + gpio-export,output = <1>; + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; + }; + }; }; &spi0 { diff --git a/target/linux/ramips/dts/kn_rf.dts b/target/linux/ramips/dts/kn_rf.dts index 22b16b05cc..1190eab714 100644 --- a/target/linux/ramips/dts/kn_rf.dts +++ b/target/linux/ramips/dts/kn_rf.dts @@ -56,6 +56,17 @@ linux,code = ; }; }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usb_power { + gpio-export,name = "usb"; + gpio-export,output = <1>; + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; + }; + }; }; &spi0 { diff --git a/target/linux/ramips/dts/kng_rc.dts b/target/linux/ramips/dts/kng_rc.dts index fefa1b7d8d..7cd4de3fb2 100644 --- a/target/linux/ramips/dts/kng_rc.dts +++ b/target/linux/ramips/dts/kng_rc.dts @@ -62,6 +62,17 @@ }; }; + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usb_power { + gpio-export,name = "usb"; + gpio-export,output = <1>; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; + }; + rtl8367rb { compatible = "realtek,rtl8367b"; cpu_port = <7>; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index b899fd3970..15ea9a13b6 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2,14 +2,74 @@ # MT7621 Profiles # -define Device/gb-pc1 - DTS := GB-PC1 - DEVICE_TITLE := GnuBee Personal Cloud One - DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 uboot-envtools +define Build/ubnt-erx-factory-image + if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \ + echo '21001:6' > $(1).compat; \ + $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \ + \ + $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \ + mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \ + $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \ + \ + echo "dummy" > $(1).rootfs; \ + $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \ + \ + mkhash md5 $(1).rootfs > $(1).md5; \ + $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \ + \ + echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \ + $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \ + \ + $(CP) $(1) $(BIN_DIR)/; \ + else \ + echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \ + fi +endef + +define Device/11acnas + DTS := 11ACNAS + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := WeVO 11AC NAS Router + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76 +endef +TARGET_DEVICES += 11acnas + +define Device/ac1200pro + DTS := AC1200pro IMAGE_SIZE := $(ralink_default_fw_size_32M) + DEVICE_TITLE := Digineo AC1200 Pro + DEVICE_PACKAGES := kmod-usb3 kmod-ata-core kmod-ata-ahci +endef +TARGET_DEVICES += ac1200pro + +define Device/dir-860l-b1 + DTS := DIR-860L-B1 + BLOCKSIZE := 64k + IMAGES += factory.bin + KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma + IMAGE_SIZE := $(ralink_default_fw_size_16M) + IMAGE/sysupgrade.bin := \ + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \ + seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ + pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/factory.bin := \ + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \ + append-rootfs | pad-rootfs -x 64 | \ + seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ + seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \ + check-size $$$$(IMAGE_SIZE) + DEVICE_TITLE := D-Link DIR-860L B1 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport endef +TARGET_DEVICES += dir-860l-b1 -TARGET_DEVICES += gb-pc1 +define Device/firewrt + DTS := FIREWRT + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Firefly FireWRT + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += firewrt define Device/mt7621 DTS := MT7621 @@ -19,19 +79,148 @@ define Device/mt7621 endef TARGET_DEVICES += mt7621 +define Device/newifi-d1 + DTS := Newifi-D1 + IMAGE_SIZE := $(ralink_default_fw_size_32M) + DEVICE_TITLE := Newifi D1 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += newifi-d1 + +define Device/pbr-m1 + DTS := PBR-M1 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := PBR-M1 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci +endef +TARGET_DEVICES += pbr-m1 + +define Device/rb750gr3 + DTS := RB750Gr3 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := MikroTik RB750Gr3 + DEVICE_PACKAGES := kmod-usb3 uboot-envtools -kmod-mt76 -kmod-rt2x00-lib -kmod-mac80211 -kmod-cfg80211 -wpad-mini -iwinfo +endef +TARGET_DEVICES += rb750gr3 + +define Device/re6500 + DTS := RE6500 + DEVICE_TITLE := Linksys RE6500 +endef +TARGET_DEVICES += re6500 + +define Device/sap-g3200u3 + DTS := SAP-G3200U3 + DEVICE_TITLE := STORYLiNK SAP-G3200U3 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += sap-g3200u3 + +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := SamKnows Whitebox 8 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport uboot-envtools +endef +TARGET_DEVICES += sk-wb8 + define Device/timecloud DTS := Timecloud DEVICE_TITLE := Thunder Timecloud + DEVICE_PACKAGES := kmod-usb3 endef TARGET_DEVICES += timecloud +define Device/ubnt-erx + DTS := UBNT-ERX + FILESYSTEMS := squashfs + KERNEL_SIZE := 3145728 + KERNEL := $(KERNEL_DTB) | uImage lzma + IMAGES := sysupgrade.tar + KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar + IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata + DEVICE_TITLE := Ubiquiti EdgeRouter X + DEVICE_PACKAGES := -kmod-mt76 -kmod-mt7603 -kmod-mt76x2 -kmod-mt76-core -kmod-mac80211 -kmod-cfg80211 -wpad-mini -iwinfo +endef +TARGET_DEVICES += ubnt-erx + define Device/vr500 DTS := VR500 IMAGE_SIZE := 66453504 DEVICE_TITLE := Planex VR500 + DEVICE_PACKAGES := kmod-usb3 endef TARGET_DEVICES += vr500 +define Device/w2914nsv2 + DTS := W2914NSV2 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := WeVO W2914NS v2 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76 +endef +TARGET_DEVICES += w2914nsv2 + +define Device/wf-2881 + DTS := WF-2881 + BLOCKSIZE := 128k + PAGESIZE := 2048 + FILESYSTEMS := squashfs + IMAGE_SIZE := 129280k + KERNEL := $(KERNEL_DTB) | pad-offset $$(BLOCKSIZE) 64 | uImage lzma + UBINIZE_OPTS := -E 5 + IMAGE/sysupgrade.bin := append-kernel | append-ubi | append-metadata | check-size $$$$(IMAGE_SIZE) + DEVICE_TITLE := NETIS WF-2881 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += wf-2881 + +define Device/witi + DTS := WITI + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := MQmaker WiTi + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci +endef +TARGET_DEVICES += witi + +define Device/wndr3700v5 + DTS := WNDR3700V5 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Netgear WNDR3700v5 + DEVICE_PACKAGES := kmod-usb3 +endef +TARGET_DEVICES += wndr3700v5 + +define Device/wsr-1166 + DTS := WSR-1166 + IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Buffalo WSR-1166 +endef +TARGET_DEVICES += wsr-1166 + +define Device/wsr-600 + DTS := WSR-600 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Buffalo WSR-600 +endef +TARGET_DEVICES += wsr-600 + +define Device/zbt-wg2626 + DTS := ZBT-WG2626 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := ZBT WG2626 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci +endef +TARGET_DEVICES += zbt-wg2626 + +define Device/zbt-wg3526 + DTS := ZBT-WG3526 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := ZBT WG3526 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci +endef +TARGET_DEVICES += zbt-wg3526 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/image/mt7628.mk b/target/linux/ramips/image/mt7628.mk index 7a7ddce3c9..12c3c80507 100644 --- a/target/linux/ramips/image/mt7628.mk +++ b/target/linux/ramips/image/mt7628.mk @@ -19,6 +19,15 @@ define Device/miwifi-nano endef TARGET_DEVICES += miwifi-nano +define Device/vocore2 + DTS := VOCORE2 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := VoCore VoCore2 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ + kmod-sdhci kmod-sdhci-mt7620 +endef +TARGET_DEVICES += vocore2 + define Device/wl-wn575a3 DTS := WL-WN575A3 IMAGE_SIZE := $(ralink_default_fw_size_8M) @@ -44,5 +53,6 @@ TARGET_DEVICES += duzun-dm06 define Device/mac1200r-v2 DTS := MAC1200RV2 DEVICE_TITLE := Mercury MAC1200R v2.0 + SUPPORTED_DEVICES := mac1200rv2 endef TARGET_DEVICES += mac1200r-v2 diff --git a/target/linux/ramips/image/mt7688.mk b/target/linux/ramips/image/mt7688.mk index f117102e71..4a50275a8d 100644 --- a/target/linux/ramips/image/mt7688.mk +++ b/target/linux/ramips/image/mt7688.mk @@ -34,3 +34,19 @@ define Device/widora-neo DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci endef TARGET_DEVICES += widora-neo + +define Device/omega2 + DTS := OMEGA2 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Onion Omega2 + DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools +endef +TARGET_DEVICES += omega2 + +define Device/omega2p + DTS := OMEGA2P + IMAGE_SIZE := $(ralink_default_fw_size_32M) + DEVICE_TITLE := Onion Omega2+ + DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools kmod-sdhci-mt7620 +endef +TARGET_DEVICES += omega2p diff --git a/target/linux/ramips/image/rt288x.mk b/target/linux/ramips/image/rt288x.mk index 3312d0ed17..7fa5f67a7f 100644 --- a/target/linux/ramips/image/rt288x.mk +++ b/target/linux/ramips/image/rt288x.mk @@ -3,7 +3,10 @@ # define Build/gemtek-header - mkheader_gemtek $@ $@.new $(1) && mv $@.new $@ + if [ -f $@ ]; then \ + mkheader_gemtek $@ $@.new $(1) && \ + mv $@.new $@; \ + fi endef define Device/ar670w @@ -11,7 +14,7 @@ define Device/ar670w BLOCKSIZE := 64k DEVICE_TITLE := Airlink AR670W IMAGE_SIZE := $(ralink_default_fw_size_4M) - KERNEL := $(KERNEL_DTB) + KERNEL := $(KERNEL_DTB) | pad-to $$(BLOCKSIZE) IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ wrg-header wrgn16a_airlink_ar670w @@ -20,9 +23,9 @@ TARGET_DEVICES += ar670w define Device/ar725w DTS := AR725W - DEVICE_TITLE := Gemtek AR725W + DEVICE_TITLE := Airlink AR725W IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size 3328k | \ gemtek-header ar725w endef TARGET_DEVICES += ar725w @@ -58,6 +61,7 @@ define Device/wli-tx4-ag300n BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Buffalo WLI-TX4-AG300N + DEVICE_PACKAGES := kmod-switch-ip17xx endef TARGET_DEVICES += wli-tx4-ag300n diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 529094d49b..511df00fa4 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -296,6 +296,7 @@ TARGET_DEVICES += dir-620-d1 define Device/dwr-512-b DTS := DWR-512-B + IMAGE_SIZE := 7700k DEVICE_TITLE := D-Link DWR-512 B DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-i2c-core kmod-i2c-ralink kmod-spi-dev \ kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan comgt @@ -342,6 +343,13 @@ define Device/freestation5 endef TARGET_DEVICES += freestation5 +define Device/hg255d + DTS := HG255D + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := HuaWei HG255D +endef +TARGET_DEVICES += hg255d + define Device/hlk-rm04 DTS := HLKRM04 IMAGES += factory.bin @@ -452,6 +460,7 @@ endef TARGET_DEVICES += miniembplug define Device/miniembwifi + DTS := MINIEMBWIFI DEVICE_TITLE := Omnima MiniEMBWiFi endef TARGET_DEVICES += miniembwifi @@ -634,6 +643,7 @@ TARGET_DEVICES += rt-n13u define Device/rut5xx DTS := RUT5XX DEVICE_TITLE := Teltonika RUT5XX + DEVICE_PACKAGES := om-watchdog endef TARGET_DEVICES += rut5xx diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk index 99c5a9d0fc..2bece6fc5c 100644 --- a/target/linux/ramips/modules.mk +++ b/target/linux/ramips/modules.mk @@ -61,18 +61,18 @@ $(eval $(call KernelPackage,i2c-ralink)) I2C_MT7621_MODULES:= \ CONFIG_I2C_MT7621:drivers/i2c/busses/i2c-mt7621 -define KernelPackage/i2c-mt7621 +define KernelPackage/i2c-mt7628 $(call i2c_defaults,$(I2C_MT7621_MODULES),59) - TITLE:=MT7621 I2C Controller + TITLE:=MT7628/88 I2C Controller DEPENDS:=kmod-i2c-core \ - @(TARGET_ramips_mt7621||TARGET_ramips_mt7628||TARGET_ramips_mt7688) + @(TARGET_ramips_mt7628||TARGET_ramips_mt7688) endef -define KernelPackage/i2c-mt7621/description +define KernelPackage/i2c-mt7628/description Kernel modules for enable mt7621 i2c controller. endef -$(eval $(call KernelPackage,i2c-mt7621)) +$(eval $(call KernelPackage,i2c-mt7628)) define KernelPackage/dma-ralink SUBMENU:=Other modules diff --git a/target/linux/ramips/mt7621/target.mk b/target/linux/ramips/mt7621/target.mk index 8648502f66..9935373ce2 100644 --- a/target/linux/ramips/mt7621/target.mk +++ b/target/linux/ramips/mt7621/target.mk @@ -4,10 +4,10 @@ SUBTARGET:=mt7621 BOARDNAME:=MT7621 based boards -FEATURES+=usb rtc nand +FEATURES+=nand ramdisk rtc usb CPU_TYPE:=24kc -DEFAULT_PACKAGES += kmod-usb3 +DEFAULT_PACKAGES += KERNEL_PATCHVER:=4.4 diff --git a/target/linux/ramips/patches-4.4/0034-NET-multi-phy-support.patch b/target/linux/ramips/patches-4.4/0034-NET-multi-phy-support.patch index bb55c120da..b6ab65a553 100644 --- a/target/linux/ramips/patches-4.4/0034-NET-multi-phy-support.patch +++ b/target/linux/ramips/patches-4.4/0034-NET-multi-phy-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -893,7 +893,8 @@ void phy_state_machine(struct work_struc +@@ -890,7 +890,8 @@ void phy_state_machine(struct work_struc /* If the link is down, give up on negotiation for now */ if (!phydev->link) { phydev->state = PHY_NOLINK; @@ -21,7 +21,7 @@ Signed-off-by: John Crispin phydev->adjust_link(phydev->attached_dev); break; } -@@ -985,7 +986,8 @@ void phy_state_machine(struct work_struc +@@ -982,7 +983,8 @@ void phy_state_machine(struct work_struc netif_carrier_on(phydev->attached_dev); } else { phydev->state = PHY_NOLINK; @@ -31,7 +31,7 @@ Signed-off-by: John Crispin } phydev->adjust_link(phydev->attached_dev); -@@ -997,7 +999,8 @@ void phy_state_machine(struct work_struc +@@ -994,7 +996,8 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-4.4/0902-mediatek-4-byte-spi-reset.patch b/target/linux/ramips/patches-4.4/0902-mediatek-4-byte-spi-reset.patch deleted file mode 100644 index 2ef5cf0a3d..0000000000 --- a/target/linux/ramips/patches-4.4/0902-mediatek-4-byte-spi-reset.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c -index fe9ceb7..2151975 100644 ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -27,6 +27,9 @@ - #include - #include - -+#define OPCODE_RESET_ENABLE 0x66 -+#define OPCODE_RESET 0x99 -+ - #define MAX_CMD_SIZE 6 - struct m25p { - struct spi_device *spi; -@@ -168,6 +171,17 @@ static int m25p80_erase(struct spi_nor *nor, loff_t offset) - return 0; - } - -+void m25p80_reboot(struct mtd_info *mtd) -+{ -+ struct spi_nor *nor = container_of(mtd, struct spi_nor, mtd); -+ struct m25p *flash = nor->priv; -+ -+ flash->command[0] = OPCODE_RESET_ENABLE; -+ spi_write(flash->spi, flash->command, 1); -+ flash->command[0] = OPCODE_RESET; -+ spi_write(flash->spi, flash->command, 1); -+} -+ - /* - * board specific setup should have ensured the SPI clock used here - * matches what the READ command supports, at least until this driver -@@ -197,6 +211,7 @@ static int m25p_probe(struct spi_device *spi) - nor->erase = m25p80_erase; - nor->write_reg = m25p80_write_reg; - nor->read_reg = m25p80_read_reg; -+ nor->mtd._reboot = m25p80_reboot; - - nor->dev = &spi->dev; - nor->flash_node = spi->dev.of_node; --- -2.9.3 - diff --git a/target/linux/ramips/rt288x/target.mk b/target/linux/ramips/rt288x/target.mk index 1e20e51ed2..65ad68fd81 100644 --- a/target/linux/ramips/rt288x/target.mk +++ b/target/linux/ramips/rt288x/target.mk @@ -4,7 +4,7 @@ SUBTARGET:=rt288x BOARDNAME:=RT288x based boards -CPU_TYPE:=mips32r2 +CPU_TYPE:=24kc DEFAULT_PACKAGES += kmod-rt2800-soc diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile index b0bc1bab39..3c2f14b841 100644 --- a/target/linux/sunxi/Makefile +++ b/target/linux/sunxi/Makefile @@ -27,7 +27,7 @@ KERNELNAME:=zImage dtbs include $(INCLUDE_DIR)/target.mk -DEFAULT_PACKAGES += uboot-envtools kmod-eeprom-sunxi kmod-wdt-sunxi +DEFAULT_PACKAGES += uboot-envtools DEFAULT_PACKAGES += mkf2fs e2fsprogs $(eval $(call BuildTarget)) diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4 index 2253afa124..a978e9d15b 100644 --- a/target/linux/sunxi/config-4.4 +++ b/target/linux/sunxi/config-4.4 @@ -356,7 +356,7 @@ CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=8 CONFIG_NVMEM=y -# CONFIG_NVMEM_SUNXI_SID is not set +CONFIG_NVMEM_SUNXI_SID=y CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_EARLY_FLATTREE=y diff --git a/target/linux/sunxi/modules.mk b/target/linux/sunxi/modules.mk index 6f4991798d..99b82a3b5f 100644 --- a/target/linux/sunxi/modules.mk +++ b/target/linux/sunxi/modules.mk @@ -25,7 +25,7 @@ $(eval $(call KernelPackage,rtc-sunxi)) define KernelPackage/sunxi-ir SUBMENU:=$(OTHER_MENU) TITLE:=Sunxi SoC built-in IR support (A20) - DEPENDS:=@TARGET_sunxi @!LINUX_4_4 +kmod-input-core + DEPENDS:=@TARGET_sunxi +kmod-input-core $(call AddDepends/rtc) KCONFIG:= \ CONFIG_MEDIA_SUPPORT=y \ @@ -42,22 +42,6 @@ endef $(eval $(call KernelPackage,sunxi-ir)) -define KernelPackage/eeprom-sunxi - SUBMENU:=$(OTHER_MENU) - TITLE:=AllWinner Security ID fuse support - DEPENDS:=@TARGET_sunxi @!LINUX_4_4 - KCONFIG:= \ - CONFIG_EEPROM_SUNXI_SID - FILES:=$(LINUX_DIR)/drivers/misc/eeprom/sunxi_sid.ko - AUTOLOAD:=$(call AutoLoad,50,sunxi_sid) -endef - -define KernelPackage/eeprom-sunxi/description - Support for the AllWinner Security ID fuse support -endef - -$(eval $(call KernelPackage,eeprom-sunxi)) - define KernelPackage/ata-sunxi TITLE:=AllWinner sunXi AHCI SATA support SUBMENU:=$(BLOCK_MENU) @@ -76,7 +60,7 @@ $(eval $(call KernelPackage,ata-sunxi)) define KernelPackage/sun4i-emac SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=AllWinner EMAC Ethernet support - DEPENDS:=@TARGET_sunxi +LINUX_4_4:kmod-of-mdio +LINUX_4_4:kmod-libphy + DEPENDS:=@TARGET_sunxi +kmod-of-mdio +kmod-libphy KCONFIG:=CONFIG_SUN4I_EMAC FILES:=$(LINUX_DIR)/drivers/net/ethernet/allwinner/sun4i-emac.ko AUTOLOAD:=$(call AutoProbe,sun4i-emac) @@ -85,35 +69,11 @@ endef $(eval $(call KernelPackage,sun4i-emac)) -define KernelPackage/wdt-sunxi - SUBMENU:=$(OTHER_MENU) - TITLE:=AllWinner sunXi Watchdog timer - DEPENDS:=@TARGET_sunxi - KCONFIG:=CONFIG_SUNXI_WATCHDOG - FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/sunxi_wdt.ko - AUTOLOAD:=$(call AutoLoad,51,sunxi_wdt) -endef - -define KernelPackage/wdt-sunxi/description - Kernel module for AllWinner sunXi watchdog timer. -endef - -$(eval $(call KernelPackage,wdt-sunxi)) - - define KernelPackage/sound-soc-sunxi TITLE:=AllWinner built-in SoC sound support - KCONFIG:= \ - CONFIG_SND_SUNXI_SOC_CODEC \ - CONFIG_SND_SUN4I_CODEC -ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,4.4.0)),1) - FILES+=$(LINUX_DIR)/sound/soc/sunxi/sunxi-codec.ko - AUTOLOAD:=$(call AutoLoad,65,sunxi-codec) -endif -ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,4.4.0)),1) + KCONFIG:=CONFIG_SND_SUN4I_CODEC FILES:=$(LINUX_DIR)/sound/soc/sunxi/sun4i-codec.ko AUTOLOAD:=$(call AutoLoad,65,sun4i-codec) -endif DEPENDS:=@TARGET_sunxi +kmod-sound-soc-core $(call AddDepends/sound) endef diff --git a/target/linux/sunxi/patches-4.4/100-clk-sunxi-add-dram-gates-support.patch b/target/linux/sunxi/patches-4.4/100-clk-sunxi-add-dram-gates-support.patch index 4d353f3789..a94e9b8778 100644 --- a/target/linux/sunxi/patches-4.4/100-clk-sunxi-add-dram-gates-support.patch +++ b/target/linux/sunxi/patches-4.4/100-clk-sunxi-add-dram-gates-support.patch @@ -21,7 +21,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/clk/sunxi/clk-simple-gates.c +++ b/drivers/clk/sunxi/clk-simple-gates.c -@@ -158,3 +158,15 @@ CLK_OF_DECLARE(sun5i_a13_ahb, "allwinner +@@ -160,3 +160,15 @@ CLK_OF_DECLARE(sun5i_a13_ahb, "allwinner sun4i_a10_ahb_init); CLK_OF_DECLARE(sun7i_a20_ahb, "allwinner,sun7i-a20-ahb-gates-clk", sun4i_a10_ahb_init); diff --git a/target/linux/sunxi/patches-4.4/107-clk-sunxi-add-h3-usbphy-clocks.patch b/target/linux/sunxi/patches-4.4/107-clk-sunxi-add-h3-usbphy-clocks.patch index ddd5e978f4..c845d512e4 100644 --- a/target/linux/sunxi/patches-4.4/107-clk-sunxi-add-h3-usbphy-clocks.patch +++ b/target/linux/sunxi/patches-4.4/107-clk-sunxi-add-h3-usbphy-clocks.patch @@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt -@@ -68,6 +68,7 @@ Required properties: +@@ -70,6 +70,7 @@ Required properties: "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13 "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31 "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23 diff --git a/target/linux/sunxi/patches-4.4/110-clk-sunxi-add-ve-for-sun457i.patch b/target/linux/sunxi/patches-4.4/110-clk-sunxi-add-ve-for-sun457i.patch index 780e034062..f929753d77 100644 --- a/target/linux/sunxi/patches-4.4/110-clk-sunxi-add-ve-for-sun457i.patch +++ b/target/linux/sunxi/patches-4.4/110-clk-sunxi-add-ve-for-sun457i.patch @@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt -@@ -71,6 +71,7 @@ Required properties: +@@ -73,6 +73,7 @@ Required properties: "allwinner,sun8i-h3-usb-clk" - for usb gates + resets on H3 "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80 "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80 @@ -30,7 +30,7 @@ Signed-off-by: Maxime Ripard Required properties for all clocks: - reg : shall be the control register address for the clock. -@@ -90,6 +91,9 @@ Required properties for all clocks: +@@ -92,6 +93,9 @@ Required properties for all clocks: And "allwinner,*-usb-clk" clocks also require: - reset-cells : shall be set to 1 diff --git a/target/linux/x86/64/target.mk b/target/linux/x86/64/target.mk index b4172de6cc..a3420b89b2 100644 --- a/target/linux/x86/64/target.mk +++ b/target/linux/x86/64/target.mk @@ -1,6 +1,6 @@ ARCH:=x86_64 BOARDNAME:=x86_64 -DEFAULT_PACKAGES += kmod-button-hotplug kmod-e1000e kmod-e1000 kmod-igb +DEFAULT_PACKAGES += kmod-button-hotplug kmod-e1000e kmod-e1000 kmod-r8169 kmod-igb define Target/Description Build images for 64 bit systems including virtualized guests. diff --git a/target/linux/x86/base-files/etc/board.d/01_leds b/target/linux/x86/base-files/etc/board.d/01_leds index 03df810972..6a5ff03b37 100755 --- a/target/linux/x86/base-files/etc/board.d/01_leds +++ b/target/linux/x86/base-files/etc/board.d/01_leds @@ -10,7 +10,7 @@ board_config_update board=$(cat /tmp/sysinfo/board_name) 2>/dev/null case "$board" in -pc-engines-apu2) +pc-engines-apu|pc-engines-apu2) ucidef_set_led_netdev "wan" "WAN" "apu2:green:led3" "eth0" ucidef_set_led_netdev "lan" "LAN" "apu2:green:led2" "br-lan" ucidef_set_led_default "diag" "DIAG" "apu2:green:power" "1" diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/base-files/etc/board.d/02_network index c2af64336b..5bfe609740 100755 --- a/target/linux/x86/base-files/etc/board.d/02_network +++ b/target/linux/x86/base-files/etc/board.d/02_network @@ -11,7 +11,7 @@ board_config_update board="$(cat /tmp/sysinfo/board_name)" 2>/dev/null case "$board" in -pc-engines-apu2) +pc-engines-apu|pc-engines-apu2) ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0" ;; traverse-technologies-geos) diff --git a/target/linux/x86/config-4.4 b/target/linux/x86/config-4.4 index 29d19daeb0..26bb124b8c 100644 --- a/target/linux/x86/config-4.4 +++ b/target/linux/x86/config-4.4 @@ -9,6 +9,7 @@ CONFIG_AMD_NB=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" CONFIG_ARCH_DISCARD_MEMBLOCK=y +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_ARCH_HAS_CPU_RELAX=y @@ -213,7 +214,9 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_UID16=y CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_HAVE_USER_RETURN_NOTIFIER=y -# CONFIG_HIGHMEM4G is not set +CONFIG_HIGHMEM=y +CONFIG_HIGHMEM4G=y +# CONFIG_HIGHPTE is not set CONFIG_HPET_EMULATE_RTC=y CONFIG_HPET_TIMER=y # CONFIG_HP_WATCHDOG is not set @@ -305,7 +308,7 @@ CONFIG_NEED_SG_DMA_LENGTH=y # CONFIG_NET5501 is not set # CONFIG_NET_NS is not set CONFIG_NLS=y -CONFIG_NOHIGHMEM=y +# CONFIG_NOHIGHMEM is not set CONFIG_NO_BOOTMEM=y CONFIG_NR_CPUS=1 # CONFIG_NSC_GPIO is not set @@ -431,7 +434,6 @@ CONFIG_X86_MINIMUM_CPU_FAMILY=4 CONFIG_X86_MPPARSE=y CONFIG_X86_MSR=y # CONFIG_X86_P4_CLOCKMOD is not set -# CONFIG_X86_PAE is not set CONFIG_X86_PAT=y CONFIG_X86_PLATFORM_DEVICES=y # CONFIG_X86_POWERNOW_K6 is not set diff --git a/target/linux/x86/generic/profiles/000-Generic.mk b/target/linux/x86/generic/profiles/000-Generic.mk index d9c2d6722e..90f989a91d 100644 --- a/target/linux/x86/generic/profiles/000-Generic.mk +++ b/target/linux/x86/generic/profiles/000-Generic.mk @@ -8,7 +8,7 @@ define Profile/Generic NAME:=Generic PACKAGES:=kmod-3c59x kmod-e100 kmod-e1000 kmod-natsemi kmod-ne2k-pci \ - kmod-pcnet32 kmod-8139too kmod-sis900 kmod-tg3 \ + kmod-pcnet32 kmod-8139too kmod-r8169 kmod-sis900 kmod-tg3 \ kmod-via-rhine kmod-via-velocity endef diff --git a/target/linux/x86/geode/config-default b/target/linux/x86/geode/config-default index fdfa9b412f..16c439d711 100644 --- a/target/linux/x86/geode/config-default +++ b/target/linux/x86/geode/config-default @@ -5,42 +5,84 @@ CONFIG_8139TOO_8129=y CONFIG_8139TOO_PIO=y # CONFIG_8139TOO_TUNE_TWISTER is not set # CONFIG_8139_OLD_RX_RESET is not set +CONFIG_ACPI=y +CONFIG_ACPI_AC=y +CONFIG_ACPI_BATTERY=y +# CONFIG_ACPI_CMPC is not set +# CONFIG_ACPI_CONTAINER is not set +CONFIG_ACPI_CPU_FREQ_PSS=y +# CONFIG_ACPI_CUSTOM_DSDT is not set +# CONFIG_ACPI_DEBUG is not set +# CONFIG_ACPI_DEBUGGER is not set +# CONFIG_ACPI_DOCK is not set +# CONFIG_ACPI_EC_DEBUGFS is not set +CONFIG_ACPI_FAN=y +CONFIG_ACPI_HOTPLUG_IOAPIC=y +CONFIG_ACPI_I2C_OPREGION=y +# CONFIG_ACPI_INITRD_TABLE_OVERRIDE is not set +CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y +# CONFIG_ACPI_PCI_SLOT is not set +CONFIG_ACPI_PROCESSOR=y +# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set +CONFIG_ACPI_PROCESSOR_IDLE=y +# CONFIG_ACPI_PROCFS_POWER is not set +CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y +# CONFIG_ACPI_SBS is not set +CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y +CONFIG_ACPI_THERMAL=y +# CONFIG_ACPI_VIDEO is not set +# CONFIG_ACPI_WMI is not set CONFIG_ALIX=y +CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y # CONFIG_ATA_PIIX is not set +# CONFIG_BACKLIGHT_APPLE is not set CONFIG_CS5535_CLOCK_EVENT_SRC=y CONFIG_CS5535_MFGPT=y CONFIG_CS5535_MFGPT_DEFAULT_IRQ=7 +# CONFIG_EFI is not set # CONFIG_EISA is not set # CONFIG_EL3 is not set CONFIG_GEODE_WDT=y CONFIG_GEOS=y CONFIG_GPIOLIB=y # CONFIG_GPIO_104_IDIO_16 is not set +CONFIG_GPIO_ACPI=y +# CONFIG_GPIO_AMDPT is not set CONFIG_GPIO_CS5535=y CONFIG_GPIO_DEVRES=y # CONFIG_GPIO_F7188X is not set # CONFIG_GPIO_INTEL_MID is not set # CONFIG_GPIO_IT87 is not set +# CONFIG_GPIO_LYNXPOINT is not set CONFIG_GPIO_SYSFS=y +CONFIG_HAVE_ACPI_APEI=y +CONFIG_HAVE_ACPI_APEI_NMI=y # CONFIG_HIGHMEM64G is not set +# CONFIG_HPET is not set +# CONFIG_HP_ACCEL is not set CONFIG_HWMON=y CONFIG_I2C=y CONFIG_I2C_ALGOBIT=y CONFIG_I2C_ALGOPCA=y CONFIG_I2C_ALGOPCF=y CONFIG_I2C_BOARDINFO=y +# CONFIG_INTEL_IPS is not set +# CONFIG_INTEL_MENLOW is not set +# CONFIG_INTEL_PMC_IPC is not set CONFIG_ISA=y +# CONFIG_ISAPNP is not set +# CONFIG_ISCSI_IBFT_FIND is not set # CONFIG_LANCE is not set CONFIG_LEDS_GPIO=y # CONFIG_M486 is not set # CONFIG_MDA_CONSOLE is not set CONFIG_MFD_CORE=y CONFIG_MFD_CS5535=y +# CONFIG_MFD_INTEL_LPSS_ACPI is not set CONFIG_MGEODEGX1=y # CONFIG_MIXCOMWD is not set CONFIG_NATSEMI=y CONFIG_NET5501=y -CONFIG_NLS=y CONFIG_NSC_GPIO=y CONFIG_PATA_CS5520=y CONFIG_PATA_CS5530=y @@ -48,13 +90,22 @@ CONFIG_PATA_CS5535=y CONFIG_PATA_CS5536=y CONFIG_PATA_SC1200=y CONFIG_PC8736x_GPIO=y -CONFIG_PCI_LABEL=y +CONFIG_PCI_MMCONFIG=y # CONFIG_PCWATCHDOG is not set -# CONFIG_PNP is not set +# CONFIG_PMIC_OPREGION is not set +CONFIG_PNP=y +CONFIG_PNPACPI=y +# CONFIG_PNPBIOS is not set +CONFIG_PNP_DEBUG_MESSAGES=y +# CONFIG_PVPANIC is not set +# CONFIG_SAMSUNG_Q10 is not set CONFIG_SC1200_WDT=y CONFIG_SCx200_ACB=y CONFIG_SCx200_WDT=y CONFIG_SENSORS_LM90=y +CONFIG_SERIAL_8250_PNP=y +# CONFIG_SURFACE_PRO3_BUTTON is not set +# CONFIG_TOSHIBA_BT_RFKILL is not set CONFIG_USB=y CONFIG_USB_COMMON=y CONFIG_USB_EHCI_HCD=y @@ -69,8 +120,17 @@ CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 CONFIG_VIA_RHINE=y CONFIG_VIA_RHINE_MMIO=y # CONFIG_WDT is not set +# CONFIG_X86_ACPI_CPUFREQ is not set +# CONFIG_X86_AMD_PLATFORM_DEVICE is not set CONFIG_X86_CPUID=y CONFIG_X86_DEBUGCTLMSR=y +# CONFIG_X86_E_POWERSAVER is not set +# CONFIG_X86_INTEL_LPSS is not set +# CONFIG_X86_LONGHAUL is not set # CONFIG_X86_MCE is not set +# CONFIG_X86_PCC_CPUFREQ is not set +CONFIG_X86_PM_TIMER=y +# CONFIG_X86_PPRO_FENCE is not set CONFIG_X86_REBOOTFIXUPS=y CONFIG_X86_TSC=y +# CONFIG_X86_X2APIC is not set diff --git a/target/linux/x86/legacy/config-default b/target/linux/x86/legacy/config-default index 60b55c7ee7..1983ab404b 100644 --- a/target/linux/x86/legacy/config-default +++ b/target/linux/x86/legacy/config-default @@ -119,6 +119,7 @@ CONFIG_HAVE_CLK_PREPARE=y CONFIG_HDMI=y CONFIG_HID=y CONFIG_HID_BATTERY_STRENGTH=y +# CONFIG_HIGHMEM4G is not set CONFIG_HPET=y CONFIG_HPET_MMAP=y # CONFIG_HP_ACCEL is not set @@ -164,6 +165,7 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y # CONFIG_MOUSE_SERIAL is not set # CONFIG_MOUSE_VSXXXAA is not set CONFIG_NLS=y +CONFIG_NOHIGHMEM=y CONFIG_NO_HZ=y # CONFIG_PANASONIC_LAPTOP is not set CONFIG_PATA_AMD=y @@ -211,5 +213,7 @@ CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_E_POWERSAVER is not set # CONFIG_X86_INTEL_LPSS is not set # CONFIG_X86_LONGHAUL is not set +# CONFIG_X86_PAE is not set # CONFIG_X86_PCC_CPUFREQ is not set CONFIG_X86_PM_TIMER=y +# CONFIG_X86_X2APIC is not set diff --git a/target/linux/x86/legacy/profiles/000-Generic.mk b/target/linux/x86/legacy/profiles/000-Generic.mk index d9c2d6722e..90f989a91d 100644 --- a/target/linux/x86/legacy/profiles/000-Generic.mk +++ b/target/linux/x86/legacy/profiles/000-Generic.mk @@ -8,7 +8,7 @@ define Profile/Generic NAME:=Generic PACKAGES:=kmod-3c59x kmod-e100 kmod-e1000 kmod-natsemi kmod-ne2k-pci \ - kmod-pcnet32 kmod-8139too kmod-sis900 kmod-tg3 \ + kmod-pcnet32 kmod-8139too kmod-r8169 kmod-sis900 kmod-tg3 \ kmod-via-rhine kmod-via-velocity endef diff --git a/target/linux/xburst/Makefile b/target/linux/xburst/Makefile index 2a64b7c46f..16d0b8b1b4 100644 --- a/target/linux/xburst/Makefile +++ b/target/linux/xburst/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk ARCH:=mipsel BOARD:=xburst BOARDNAME:=Ingenic XBurst -FEATURES:=targz nand ubifs audio +FEATURES:=targz nand ubifs audio source-only SUBTARGETS:=qi_lb60 KERNEL_PATCHVER:=3.18 diff --git a/target/linux/xburst/config-3.18 b/target/linux/xburst/config-3.18 index 81e7eddbdf..71411bf067 100644 --- a/target/linux/xburst/config-3.18 +++ b/target/linux/xburst/config-3.18 @@ -341,6 +341,7 @@ CONFIG_USB_SUPPORT=y CONFIG_USB_U_ETHER=y CONFIG_VFAT_FS=y # CONFIG_VGA_CONSOLE is not set +# CONFIG_VLAN_8021Q is not set CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_VT_CONSOLE_SLEEP=y diff --git a/target/sdk/Config.in b/target/sdk/Config.in index 2a5fddd2e5..d9e0b9193d 100644 --- a/target/sdk/Config.in +++ b/target/sdk/Config.in @@ -5,6 +5,6 @@ config SDK help This is essentially a stripped-down version of the buildroot with a precompiled toolchain. It can be used to develop and - test packages for libreCMC before including them in the buildroot + test packages for LEDE before including them in the buildroot diff --git a/target/toolchain/files/README.TOOLCHAIN b/target/toolchain/files/README.TOOLCHAIN index 86b0189d35..656e6968bc 100644 --- a/target/toolchain/files/README.TOOLCHAIN +++ b/target/toolchain/files/README.TOOLCHAIN @@ -1,2 +1,2 @@ -This is the LEDE SDK. It contains just the toolchain created +This is the libreCMC SDK. It contains just the toolchain created by buildroot. diff --git a/toolchain/Config.in b/toolchain/Config.in index b53b8e63ec..7544023f05 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -42,7 +42,7 @@ menuconfig EXTERNAL_TOOLCHAIN bool prompt "Use external toolchain" if DEVEL help - If enabled, LEDE will compile using an existing toolchain instead of + If enabled, libreCMC will compile using an existing toolchain instead of compiling one. config NATIVE_TOOLCHAIN @@ -51,7 +51,7 @@ menuconfig EXTERNAL_TOOLCHAIN depends on EXTERNAL_TOOLCHAIN select NO_STRIP help - If enabled, LEDE will compile using the native toolchain for your + If enabled, libreCMC will compile using the native toolchain for your host instead of compiling one. config TARGET_NAME diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 77e24f4609..8a18d3ec07 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb ifeq ($(CONFIG_arc),y) -PKG_VERSION:=arc-2017.03-gdb +PKG_VERSION:=arc-2016.03-gdb PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2017.03-gdb -PKG_HASH:=f47930161e9e99c46ab018dabbf56024739dda29c51f92495eaa0d4d7e3511f6 +PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2016.03-gdb +PKG_HASH:=6a91f86cc487c1548d3f5d4f29f7226d2019c0db8a63633aeabd5914a340f3f9 GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION) PATCH_DIR:=./patches-arc else diff --git a/tools/Makefile b/tools/Makefile index d14675b836..996c7b342c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -56,7 +56,6 @@ $(curdir)/missing-macros/compile := $(curdir)/autoconf/install $(curdir)/e2fsprogs/compile := $(curdir)/libtool/install $(curdir)/libelf/compile := $(curdir)/libtool/install $(curdir)/sdcc/compile := $(curdir)/bison/install -$(curdir)/b43-tools/compile := $(curdir)/bison/install $(curdir)/padjffs2/compile := $(curdir)/findutils/install $(curdir)/isl/compile := $(curdir)/gmp/install $(curdir)/bc/compile := $(curdir)/bison/install diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 69cba69a58..337d63582e 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -73,7 +73,7 @@ define Host/Compile $(call cc,mkdcs932, -Wall) $(call cc,mkheader_gemtek,-lz) $(call cc,mkrtn56uimg, -lz) - $(call cc,dgn3500sum) + $(call cc,dgn3500sum, -Wall) $(call cc,edimax_fw_header, -Wall) $(call cc,mkmerakifw sha1, -Wall) $(call cc,mkmerakifw-old, -Wall) diff --git a/tools/firmware-utils/src/dgn3500sum.c b/tools/firmware-utils/src/dgn3500sum.c index 00a0c5f837..eb80e6c01b 100644 --- a/tools/firmware-utils/src/dgn3500sum.c +++ b/tools/firmware-utils/src/dgn3500sum.c @@ -103,7 +103,7 @@ int main(int argc, char** argv) unsigned long start, i; char *endptr, *buffer, *p; int count; // size of file in bytes - unsigned short sum, sum1; + unsigned short sum = 0, sum1 = 0; char sumbuf[9]; if(argc < 3) { @@ -117,7 +117,7 @@ int main(int argc, char** argv) printf("ERROR: File not writeable!\n"); return 1; } - if(argc = 4) + if(argc == 4) { printf("%s: PID type: %s\n", argv[0], argv[3]); if(strcmp(argv[3], "DE")==0) @@ -147,7 +147,6 @@ int main(int argc, char** argv) start = strtol(argv[2], &endptr, 16); p = buffer+start; - sum1 = 0; for(i = 0; i < count - start; i++) { sum1 += p[i]; diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 89a6787b22..4e3d2058b2 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -293,6 +293,40 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system" }, + /** Firmware layout for the C5 */ + { + .id = "ARCHER-C5-V2", + .vendor = "", + .support_list = + "SupportList:\r\n" + "{product_name:ArcherC5," + "product_ver:2.0.0," + "special_id:00000000}\r\n", + .support_trail = '\x00', + + .partitions = { + {"fs-uboot", 0x00000, 0x40000}, + {"os-image", 0x40000, 0x200000}, + {"file-system", 0x240000, 0xc00000}, + {"default-mac", 0xe40000, 0x00200}, + {"pin", 0xe40200, 0x00200}, + {"product-info", 0xe40400, 0x00200}, + {"partition-table", 0xe50000, 0x10000}, + {"soft-version", 0xe60000, 0x00200}, + {"support-list", 0xe61000, 0x0f000}, + {"profile", 0xe70000, 0x10000}, + {"default-config", 0xe80000, 0x10000}, + {"user-config", 0xe90000, 0x50000}, + {"log", 0xee0000, 0x100000}, + {"radio_bk", 0xfe0000, 0x10000}, + {"radio", 0xff0000, 0x10000}, + {NULL, 0, 0} + }, + + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system" + }, + /** Firmware layout for the C9 */ { .id = "ARCHERC9",