diff --git a/include/depends.mk b/include/depends.mk index 0080b97876..465e4e952a 100644 --- a/include/depends.mk +++ b/include/depends.mk @@ -11,7 +11,7 @@ DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*" -find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | mkhash md5 +find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | $(MKHASH) md5 define rdep .PRECIOUS: $(2) diff --git a/include/download.mk b/include/download.mk index 4bf055e611..609956b004 100644 --- a/include/download.mk +++ b/include/download.mk @@ -74,7 +74,7 @@ else check_warn = $(if $(filter-out undefined,$(origin F_$(1))),$(filter ,$(shell $(call F_$(1),$(2),$(3),$(4)) >&2)),$(check_warn_nofix)) endif -gen_sha256sum = $(shell mkhash sha256 $(DL_DIR)/$(1)) +gen_sha256sum = $(shell $(MKHASH) sha256 $(DL_DIR)/$(1)) ifdef FIXUP F_hash_deprecated = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile fix-hash $(3) $(call gen_sha256sum,$(1)) $(2) diff --git a/include/image-commands.mk b/include/image-commands.mk index 5c62523bec..f21f9e3f03 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -55,7 +55,7 @@ define Build/elx-header dd bs=20 count=1 conv=sync; \ echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ dd bs=8 count=1 conv=sync; \ - echo -ne "$$($(STAGING_DIR_HOST)/bin/mkhash md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ + echo -ne "$$($(MKHASH) md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ dd bs=58 count=1 conv=sync; \ ) > $(KDIR)/tmp/$(DEVICE_NAME).header $(call Build/xor-image,-p $(xor_pattern) -x) @@ -243,6 +243,14 @@ define Build/jffs2 @mv $@.new $@ endef +define Build/kernel2minor + $(eval temp_file := $(shell mktemp)) + cp $@ $(temp_file) + kernel2minor -k $(temp_file) -r $(temp_file).new $(1) + mv $(temp_file).new $@ + rm -f $(temp_file) +endef + define Build/kernel-bin rm -f $@ cp $< $@ @@ -458,8 +466,3 @@ define Build/append-metadata fwtool -S "$@.ucert" "$@" ;\ } endef - -define Build/kernel2minor - kernel2minor -k $@ -r $@.new $(1) - mv $@.new $@ -endef diff --git a/include/image.mk b/include/image.mk index 238851571c..e2988b3559 100644 --- a/include/image.mk +++ b/include/image.mk @@ -26,7 +26,7 @@ param_get_default = $(firstword $(call param_get,$(1),$(2)) $(3)) param_mangle = $(subst $(space),_,$(strip $(1))) param_unmangle = $(subst _,$(space),$(1)) -mkfs_packages_id = $(shell echo $(sort $(1)) | mkhash md5 | cut -b1-8) +mkfs_packages_id = $(shell echo $(sort $(1)) | $(MKHASH) md5 | cut -b1-8) mkfs_target_dir = $(if $(call param_get,pkg,$(1)),$(KDIR)/target-dir-$(call param_get,pkg,$(1)),$(TARGET_DIR)) KDIR=$(KERNEL_BUILD_DIR) @@ -40,7 +40,7 @@ IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERS IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET)) IMG_ROOTFS:=$(IMG_PREFIX)-rootfs IMG_COMBINED:=$(IMG_PREFIX)-combined -IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | mkhash md5 | cut -b1-8) +IMG_PART_SIGNATURE:=$(shell echo $(SOURCE_DATE_EPOCH)$(LINUX_VERMAGIC) | $(MKHASH) md5 | cut -b1-8) MKFS_DEVTABLE_OPT := -D $(INCLUDE_DIR)/device_table.txt diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index a8a7447312..addbb338f6 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -116,7 +116,7 @@ define Kernel/Configure/Default cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \ } $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install - grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | mkhash md5 > $(LINUX_DIR)/.vermagic + grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic endef define Kernel/Configure/Initramfs @@ -186,5 +186,3 @@ define Kernel/Clean/Default rm -f $(LINUX_KERNEL) $(_SINGLE)$(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean endef - - diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index c2017cd220..b066e116f7 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -221,7 +221,7 @@ $(_endef) ifneq ($$(CONFIG_IPK_FILES_CHECKSUMS),) (cd $$(IDIR_$(1)); \ ( \ - find . -type f \! -path ./CONTROL/\* -exec mkhash sha256 -n \{\} \; 2> /dev/null | \ + find . -type f \! -path ./CONTROL/\* -exec $(MKHASH) sha256 -n \{\} \; 2> /dev/null | \ sed 's|\([[:blank:]]\)\./| \1/|' > $$(IDIR_$(1))/CONTROL/files-sha256sum \ ) || true \ ) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index cff31526d5..8adf0d03dd 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -156,21 +156,19 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \ $(eval $(call CleanupPython2)) -$(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \ +$(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \ python3.9 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \ - python3.5 -V 2>&1 | grep 'Python 3', \ - python3 -V 2>&1 | grep -E 'Python 3\.[5-9]\.?')) + python3 -V 2>&1 | grep -E 'Python 3\.[6-9]\.?')) -$(eval $(call SetupHostCommand,python3,Please install Python >= 3.5, \ +$(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \ python3.9 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \ - python3.5 -V 2>&1 | grep 'Python 3', \ - python3 -V 2>&1 | grep -E 'Python 3\.[5-9]\.?')) + python3 -V 2>&1 | grep -E 'Python 3\.[6-9]\.?')) $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \ git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule)) diff --git a/include/quilt.mk b/include/quilt.mk index 00597ca0f2..6d25469daf 100644 --- a/include/quilt.mk +++ b/include/quilt.mk @@ -159,7 +159,7 @@ define Quilt/Template false; \ } @[ -n "$$$$(ls $(1)/patches/series)" -o \ - "$$$$(cat $(1)/patches/series | mkhash md5)" = "$$(sort $(1)/patches/series | mkhash md5)" ] || { \ + "$$$$(cat $(1)/patches/series | $(MKHASH) md5)" = "$$(sort $(1)/patches/series | $(MKHASH) md5)" ] || { \ echo "The patches are not sorted in the right order. Please fix."; \ false; \ } diff --git a/include/scan.mk b/include/scan.mk index 7df5dc6486..aee24cb3e5 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -1,4 +1,5 @@ include $(TOPDIR)/include/verbose.mk +include $(TOPDIR)/rules.mk TMP_DIR:=$(TOPDIR)/tmp all: $(TMP_DIR)/.$(SCAN_TARGET) @@ -100,7 +101,7 @@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) $(TARGET_STAMP):: +( \ $(NO_TRACE_MAKE) $(FILELIST); \ - MD5SUM=$$(cat $(FILELIST) $(OVERRIDELIST) | mkhash md5 | awk '{print $$1}'); \ + MD5SUM=$$(cat $(FILELIST) $(OVERRIDELIST) | $(MKHASH) md5 | awk '{print $$1}'); \ [ -f "$@.$$MD5SUM" ] || { \ rm -f $@.*; \ touch $@.$$MD5SUM; \ diff --git a/package/Makefile b/package/Makefile index ec503dc527..209be34674 100644 --- a/package/Makefile +++ b/package/Makefile @@ -66,8 +66,10 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE - find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755 rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG) mkdir -p $(TARGET_DIR)/tmp - $(call opkg,$(TARGET_DIR)) install \ - $(call opkg_package_files,$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg)))) + $(file >$(TMP_DIR)/opkg_install_list,\ + $(call opkg_package_files,\ + $(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))) + $(call opkg,$(TARGET_DIR)) install $$(cat $(TMP_DIR)/opkg_install_list) @for file in $(PACKAGE_INSTALL_FILES); do \ [ -s $$file.flags ] || continue; \ for flag in `cat $$file.flags`; do \ diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 81c66a00a2..950931a605 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -30,7 +30,7 @@ PKG_CONFIG_DEPENDS += \ include $(INCLUDE_DIR)/package.mk ifneq ($(DUMP),1) - STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | mkhash md5) + STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | $(MKHASH) md5) TARGET:=-$(BOARD) endif diff --git a/package/base-files/files/etc/shinit b/package/base-files/files/etc/shinit index 0a1ebcc832..6b682d8769 100755 --- a/package/base-files/files/etc/shinit +++ b/package/base-files/files/etc/shinit @@ -22,7 +22,7 @@ service() { printf "%-30s\t%10s\t%10s\n" "$F" \ $( $($F enabled) && echo "enabled" || echo "disabled" ) \ $( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \ - | jsonfilter -q -e "@.$(basename $F).instances[*].running" | uniq)" = "true" ] \ + | jsonfilter -q -e "@['$(basename $F)'].instances[*].running" | uniq)" = "true" ] \ && echo "running" || echo "stopped" ) done; return 1 diff --git a/package/kernel/linux/Makefile b/package/kernel/linux/Makefile index 39b9e82c27..9fa68d78f7 100644 --- a/package/kernel/linux/Makefile +++ b/package/kernel/linux/Makefile @@ -24,7 +24,7 @@ export SHELL:=/bin/sh include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) - STAMP_BUILT:=$(STAMP_BUILT)_$(shell $(SCRIPT_DIR)/kconfig.pl $(LINUX_DIR)/.config | mkhash md5) + STAMP_BUILT:=$(STAMP_BUILT)_$(shell $(SCRIPT_DIR)/kconfig.pl $(LINUX_DIR)/.config | $(MKHASH) md5) -include $(LINUX_DIR)/.config endif diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk index 4dde833664..9ee0812d3d 100644 --- a/package/kernel/linux/modules/leds.mk +++ b/package/kernel/linux/modules/leds.mk @@ -145,3 +145,18 @@ define KernelPackage/leds-pwm/description endef $(eval $(call KernelPackage,leds-pwm)) + +define KernelPackage/leds-uleds + SUBMENU:=$(LEDS_MENU) + TITLE:=Userspace LEDs + DEPENDS:=@!LINUX_4_9 + KCONFIG:=CONFIG_LEDS_USER + FILES:=$(LINUX_DIR)/drivers/leds/uleds.ko + AUTOLOAD:=$(call AutoLoad,60,leds-uleds,1) +endef + +define KernelPackage/leds-uleds/description + This option enables support for userspace LEDs. +endef + +$(eval $(call KernelPackage,leds-uleds)) diff --git a/package/lean/luci-app-cpufreq/root/etc/uci-defaults/cpufreq b/package/lean/luci-app-cpufreq/root/etc/uci-defaults/cpufreq index 520af00799..4733a908a8 100755 --- a/package/lean/luci-app-cpufreq/root/etc/uci-defaults/cpufreq +++ b/package/lean/luci-app-cpufreq/root/etc/uci-defaults/cpufreq @@ -16,11 +16,17 @@ case "$DISTRIB_TARGET" in uci_write_config 0 ondemand 600000 1200000 10 50 ;; "ipq40xx") - uci_write_config 0 ondemand 300000 716000 10 50 + uci_write_config 0 ondemand 200000 896000 10 50 ;; "ipq806x") - uci_write_config 0 ondemand 600000 716000 10 50 - echo "$CPU_POLICYS" | grep -q "1" && uci_write_config 1 ondemand 600000 716000 10 50 + CPU_FREQS="$(cat '/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies')" + if echo "$CPU_FREQS" | grep -q "1725000"; then + CPU_MAX_FREQ="1725000" + else + CPU_MAX_FREQ="1400000" + fi + uci_write_config 0 ondemand 600000 $CPU_MAX_FREQ 10 50 + echo "$CPU_POLICYS" | grep -q "1" && uci_write_config 1 ondemand 600000 $CPU_MAX_FREQ 10 50 ;; "rockchip/armv8") if echo "$CPU_POLICYS" | grep -q "4"; then @@ -30,6 +36,9 @@ case "$DISTRIB_TARGET" in uci_write_config 0 schedutil 816000 1512000 fi ;; + "sunxi/cortexa53") + uci_write_config 0 ondemand 648000 1296000 10 50 + ;; esac uci -q batch <<-EOF >/dev/null diff --git a/package/lean/luci-proto-bonding/po/templates/bonding.pot b/package/lean/luci-proto-bonding/po/templates/bonding.pot deleted file mode 100644 index 96878ec981..0000000000 --- a/package/lean/luci-proto-bonding/po/templates/bonding.pot +++ /dev/null @@ -1,348 +0,0 @@ -msgid "" -msgstr "Content-Type: text/plain; charset=UTF-8" - -msgid "ARP" -msgstr "" - -msgid "ARP IP Targets" -msgstr "" - -msgid "ARP Interval" -msgstr "" - -msgid "ARP Validation" -msgstr "" - -msgid "ARP mode to consider a slave as being up" -msgstr "" - -msgid "ARP monitoring is not supported for the selected policy" -msgstr "" - -msgid "Active-Backup policy (active-backup, 1)" -msgstr "" - -msgid "Adaptive load balancing (balance-alb, 6)" -msgstr "" - -msgid "Adaptive transmit load balancing (balance-tlb, 5)" -msgstr "" - -msgid "Aggregation Selection Logic" -msgstr "" - -msgid "Aggregator: All slaves down or has no slaves (stable, 0)" -msgstr "" - -msgid "" -"Aggregator: Chosen by the largest number of ports + slave added/removed or " -"state changes (count, 2)" -msgstr "" - -msgid "Aggregator: Slave added/removed or state changes (bandwidth, 1)" -msgstr "" - -msgid "Bonding Policy" -msgstr "" - -msgid "Broadcast policy (broadcast, 3)" -msgstr "" - -msgid "Consider the slave up when all ARP IP targets are reachable (all, 1)" -msgstr "" - -msgid "Consider the slave up when any ARP IP target is reachable (any, 0)" -msgstr "" - -msgid "Down Delay" -msgstr "" - -msgid "Drop Duplicate Frames" -msgstr "" - -msgid "Enable Dynamic Shuffling Of Flows" -msgstr "" - -msgid "Every 30 seconds (slow, 0)" -msgstr "" - -msgid "Every second (fast, 1)" -msgstr "" - -msgid "Filtering for all slaves, no validation" -msgstr "" - -msgid "Filtering for all slaves, validation only for active slave" -msgstr "" - -msgid "Filtering for all slaves, validation only for backup slaves" -msgstr "" - -msgid "IEEE 802.3ad Dynamic link aggregation (802.3ad, 4)" -msgstr "" - -msgid "IPv4 address" -msgstr "" - -msgid "IPv4 netmask" -msgstr "" - -msgid "Interval For Sending Learning Packets" -msgstr "" - -msgid "LACPDU Packets" -msgstr "" - -msgid "Link Aggregation (Channel Bonding)" -msgstr "" - -msgid "Link Monitoring" -msgstr "" - -msgid "MAC Address For The Actor" -msgstr "" - -msgid "MII" -msgstr "" - -msgid "MII / ETHTOOL ioctls" -msgstr "" - -msgid "MII Interval" -msgstr "" - -msgid "Method of link monitoring" -msgstr "" - -msgid "Method to determine link status" -msgstr "" - -msgid "Minimum Number of Links" -msgstr "" - -msgid "No" -msgstr "" - -msgid "No validation or filtering" -msgstr "" - -msgid "Number of IGMP membership reports" -msgstr "" - -msgid "Number of peer notifications after failover event" -msgstr "" - -msgid "Off" -msgstr "" - -msgid "" -"Only if current active slave fails and the primary slave is up (failure, 2)" -msgstr "" - -msgid "Packets To Transmit Before Moving To Next Slave" -msgstr "" - -msgid "Primary Slave" -msgstr "" - -msgid "" -"Primary becomes active slave when it comes back up if speed and duplex " -"better than current slave (better, 1)" -msgstr "" - -msgid "Primary becomes active slave whenever it comes back up (always, 0)" -msgstr "" - -msgid "Reselection policy for primary slave" -msgstr "" - -msgid "Round-Robin policy (balance-rr, 0)" -msgstr "" - -msgid "Selects the transmit hash policy to use for slave selection" -msgstr "" - -msgid "Set same MAC Address to all slaves" -msgstr "" - -msgid "Set to currently active slave (active, 1)" -msgstr "" - -msgid "Set to first slave added to the bond (follow, 2)" -msgstr "" - -msgid "Slave Interfaces" -msgstr "" - -msgid "" -"Specifies that duplicate frames (received on inactive ports) should be " -"dropped or delivered" -msgstr "" - -msgid "Specifies the ARP link monitoring frequency in milliseconds" -msgstr "" - -msgid "Specifies the IP addresses to use for ARP monitoring" -msgstr "" - -msgid "Specifies the MII link monitoring frequency in milliseconds" -msgstr "" - -msgid "Specifies the aggregation selection logic to use" -msgstr "" - -msgid "" -"Specifies the mac-address for the actor in protocol packet exchanges " -"(LACPDUs). If empty, masters' mac address defaults to system default" -msgstr "" - -msgid "" -"Specifies the minimum number of links that must be active before asserting " -"carrier" -msgstr "" - -msgid "Specifies the mode to be used for this bonding interface" -msgstr "" - -msgid "" -"Specifies the number of IGMP membership reports to be issued after a " -"failover event in 200ms intervals" -msgstr "" - -msgid "" -"Specifies the number of packets to transmit through a slave before moving to " -"the next one" -msgstr "" - -msgid "" -"Specifies the number of peer notifications (gratuitous ARPs and unsolicited " -"IPv6 Neighbor Advertisements) to be issued after a failover event" -msgstr "" - -msgid "" -"Specifies the number of seconds between instances where the bonding driver " -"sends learning packets to each slaves peer switch" -msgstr "" - -msgid "Specifies the quantity of ARP IP targets that must be reachable" -msgstr "" - -msgid "" -"Specifies the rate in which the link partner will be asked to transmit " -"LACPDU packets" -msgstr "" - -msgid "" -"Specifies the reselection policy for the primary slave when failure of the " -"active slave or recovery of the primary slave occurs" -msgstr "" - -msgid "Specifies the system priority" -msgstr "" - -msgid "" -"Specifies the time in milliseconds to wait before disabling a slave after a " -"link failure detection" -msgstr "" - -msgid "" -"Specifies the time in milliseconds to wait before enabling a slave after a " -"link recovery detection" -msgstr "" - -msgid "" -"Specifies whether ARP probes and replies should be validated or non-ARP " -"traffic should be filtered for link monitoring" -msgstr "" - -msgid "" -"Specifies whether active-backup mode should set all slaves to the same MAC " -"address at enslavement" -msgstr "" - -msgid "" -"Specifies whether or not miimon should use MII or ETHTOOL ioctls vs. " -"netif_carrier_ok()" -msgstr "" - -msgid "Specifies whether the bonding interface should use DHCP client mode" -msgstr "" - -msgid "" -"Specifies whether to shuffle active flows across slaves based on the load" -msgstr "" - -msgid "" -"Specifies which slave interfaces should be attached to this bonding interface" -msgstr "" - -msgid "" -"Specifies which slave is the primary device. It will always be the active " -"slave while it is available" -msgstr "" - -msgid "System Priority" -msgstr "" - -msgid "Transmit Hash Policy" -msgstr "" - -msgid "Up Delay" -msgstr "" - -msgid "Use DHCP (Client Mode)" -msgstr "" - -msgid "Use XOR of hardware MAC addresses (layer2)" -msgstr "" - -msgid "Use XOR of hardware MAC addresses and IP addresses (layer2+3)" -msgstr "" - -msgid "" -"Use XOR of hardware MAC addresses and IP addresses, rely on skb_flow_dissect " -"(encap2+3)" -msgstr "" - -msgid "Use upper layer protocol information (layer3+4)" -msgstr "" - -msgid "" -"Use upper layer protocol information, rely on skb_flow_dissect (encap3+4)" -msgstr "" - -msgid "Validation for all slaves" -msgstr "" - -msgid "Validation only for active slave" -msgstr "" - -msgid "Validation only for backup slaves" -msgstr "" - -msgid "XOR policy (balance-xor, 2)" -msgstr "" - -msgid "Yes" -msgstr "" - -msgid "Yes (none, 0)" -msgstr "" - -msgid "You must select a primary interface for the selected policy" -msgstr "" - -msgid "" -"You must select a primary interface which is included in selected slave " -"interfaces" -msgstr "" - -msgid "" -"You must select at least one ARP IP target if ARP monitoring is selected" -msgstr "" - -msgid "You must select at least one slave interface" -msgstr "" - -msgid "netif_carrier_ok()" -msgstr "" diff --git a/package/lean/vsftpd-alt/files/vsftpd_prepare b/package/lean/vsftpd-alt/files/vsftpd_prepare index 612e90b5aa..b66b303b93 100755 --- a/package/lean/vsftpd-alt/files/vsftpd_prepare +++ b/package/lean/vsftpd-alt/files/vsftpd_prepare @@ -144,7 +144,7 @@ output_bool global lsrecurse "ls_recurse_enable" output_bool global dotfile "force_dot_files" output_field global 'umask' "local_umask" 022 -ftpd_banner=`get_value global ftpd_banner` +ftpd_banner=`get_value global banner` if ! [ -z $ftpd_banner ]; then output_const "ftpd_banner" $ftpd_banner fi diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 989fd29349..e3d1c3c601 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -324,7 +324,7 @@ endif OPENSSL_TARGET:=linux-$(call qstrip,$(CONFIG_ARCH))-openwrt -STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(shell echo $(OPENSSL_OPTIONS) | mkhash md5) +STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(shell echo $(OPENSSL_OPTIONS) | $(MKHASH) md5) define Build/Configure (cd $(PKG_BUILD_DIR); \ diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 8bbb26f829..77887f39db 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -37,7 +37,7 @@ PKG_CONFIG_DEPENDS:= \ include $(INCLUDE_DIR)/package.mk ifneq ($(DUMP),1) - STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | mkhash md5) + STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | $(MKHASH) md5) endif define Package/dropbear/Default diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile index acb16d4dd8..00ead29bbe 100644 --- a/package/network/utils/iptables/Makefile +++ b/package/network/utils/iptables/Makefile @@ -28,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) -include $(LINUX_DIR)/.config include $(INCLUDE_DIR)/netfilter.mk - STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep 'NETFILTER' $(LINUX_DIR)/.config | mkhash md5) + STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep 'NETFILTER' $(LINUX_DIR)/.config | $(MKHASH) md5) endif diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 4e0d864d7c..b73bb1fc7b 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -32,7 +32,7 @@ include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk ifeq ($(DUMP),) - STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | mkhash md5) + STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(CONFIG_TARGET_INIT_PATH) | $(MKHASH) md5) endif CMAKE_OPTIONS += -DEARLY_PATH="$(TARGET_INIT_PATH)" diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 362ae942d8..914507d364 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.33.0 -PKG_RELEASE:=3 +PKG_VERSION:=1.33.1 +PKG_RELEASE:=1 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.busybox.net/downloads \ http://sources.buildroot.net -PKG_HASH:=d568681c91a85edc6710770cebc1e80e042ad74d305b5c2e6d57a5f3de3b8fbd +PKG_HASH:=12cec6bd2b16d8a9446dd16130f2b92982f1819f6e1c5f5887b6db03f5660d28 PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam PKG_BUILD_PARALLEL:=1 @@ -38,7 +38,7 @@ endif include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) - STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | mkhash md5) + STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | $(MKHASH) md5) endif # All files provided by busybox will serve as fallback alternatives by opkg. diff --git a/package/utils/busybox/patches/001-backport1330fix-ash-make-strdup-copy.patch b/package/utils/busybox/patches/001-backport1330fix-ash-make-strdup-copy.patch deleted file mode 100644 index b495227d9f..0000000000 --- a/package/utils/busybox/patches/001-backport1330fix-ash-make-strdup-copy.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 67cc582d4289c5de521d11b08307c8ab26ee1e28 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Sun, 3 Jan 2021 10:55:39 +0100 -Subject: ash: make a strdup copy of $HISTFILE for line editing - -Otherwise if $HISTFILE is unset or reassigned, bad things can happen. - -function old new delta -ash_main 1210 1218 +8 - -Signed-off-by: Denys Vlasenko ---- - shell/ash.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/shell/ash.c b/shell/ash.c -index f16d7fb6a..ecbfbf091 100644 ---- a/shell/ash.c -+++ b/shell/ash.c -@@ -14499,7 +14499,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv) - - if (sflag || minusc == NULL) { - #if MAX_HISTORY > 0 && ENABLE_FEATURE_EDITING_SAVEHISTORY -- if (iflag) { -+ if (line_input_state) { - const char *hp = lookupvar("HISTFILE"); - if (!hp) { - hp = lookupvar("HOME"); -@@ -14513,7 +14513,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv) - } - } - if (hp) -- line_input_state->hist_file = hp; -+ line_input_state->hist_file = xstrdup(hp); - # if ENABLE_FEATURE_SH_HISTFILESIZE - hp = lookupvar("HISTFILESIZE"); - line_input_state->max_history = size_from_HISTFILESIZE(hp); --- -cgit v1.2.1 - diff --git a/package/utils/busybox/patches/002-backport1330fix-traceroute.patch b/package/utils/busybox/patches/002-backport1330fix-traceroute.patch deleted file mode 100644 index eb03094eee..0000000000 --- a/package/utils/busybox/patches/002-backport1330fix-traceroute.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 89358a7131d3e75c74af834bb117b4fad7914983 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Tue, 2 Feb 2021 13:48:21 +0100 -Subject: traceroute: fix option parsing - -Signed-off-by: Denys Vlasenko ---- - networking/traceroute.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/networking/traceroute.c b/networking/traceroute.c -index 3f1a9ab46..29f5e480b 100644 ---- a/networking/traceroute.c -+++ b/networking/traceroute.c -@@ -896,7 +896,7 @@ traceroute_init(int op, char **argv) - - op |= getopt32(argv, "^" - OPT_STRING -- "\0" "-1:x-x" /* minimum 1 arg */ -+ "\0" "-1" /* minimum 1 arg */ - , &tos_str, &device, &max_ttl_str, &port_str, &nprobes_str - , &source, &waittime_str, &pausemsecs_str, &first_ttl_str - ); --- -cgit v1.2.1 - diff --git a/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch b/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch deleted file mode 100644 index 7637679a69..0000000000 --- a/package/utils/busybox/patches/005-backport-CVE-2021-28831.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f25d254dfd4243698c31a4f3153d4ac72aa9e9bd Mon Sep 17 00:00:00 2001 -From: Samuel Sapalski -Date: Wed, 3 Mar 2021 16:31:22 +0100 -Subject: decompress_gunzip: Fix DoS if gzip is corrupt - -On certain corrupt gzip files, huft_build will set the error bit on -the result pointer. If afterwards abort_unzip is called huft_free -might run into a segmentation fault or an invalid pointer to -free(p). - -In order to mitigate this, we check in huft_free if the error bit -is set and clear it before the linked list is freed. - -Signed-off-by: Samuel Sapalski -Signed-off-by: Peter Kaestle -Signed-off-by: Denys Vlasenko ---- - archival/libarchive/decompress_gunzip.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - ---- a/archival/libarchive/decompress_gunzip.c -+++ b/archival/libarchive/decompress_gunzip.c -@@ -220,10 +220,20 @@ static const uint8_t border[] ALIGN1 = { - * each table. - * t: table to free - */ -+#define BAD_HUFT(p) ((uintptr_t)(p) & 1) -+#define ERR_RET ((huft_t*)(uintptr_t)1) - static void huft_free(huft_t *p) - { - huft_t *q; - -+ /* -+ * If 'p' has the error bit set we have to clear it, otherwise we might run -+ * into a segmentation fault or an invalid pointer to free(p) -+ */ -+ if (BAD_HUFT(p)) { -+ p = (huft_t*)((uintptr_t)(p) ^ (uintptr_t)(ERR_RET)); -+ } -+ - /* Go through linked list, freeing from the malloced (t[-1]) address. */ - while (p) { - q = (--p)->v.t; -@@ -289,8 +299,6 @@ static unsigned fill_bitbuffer(STATE_PAR - * or a valid pointer to a Huffman table, ORed with 0x1 if incompete table - * is given: "fixed inflate" decoder feeds us such data. - */ --#define BAD_HUFT(p) ((uintptr_t)(p) & 1) --#define ERR_RET ((huft_t*)(uintptr_t)1) - static huft_t* huft_build(const unsigned *b, const unsigned n, - const unsigned s, const struct cp_ext *cp_ext, - unsigned *m) diff --git a/package/utils/busybox/patches/010-fix-wrong-variable.patch b/package/utils/busybox/patches/010-fix-wrong-variable.patch deleted file mode 100644 index 1b6fa7be61..0000000000 --- a/package/utils/busybox/patches/010-fix-wrong-variable.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libbb/update_passwd.c -+++ b/libbb/update_passwd.c -@@ -48,7 +48,7 @@ static void check_selinux_update_passwd( - bb_simple_error_msg_and_die("SELinux: access denied"); - } - if (ENABLE_FEATURE_CLEAN_UP) -- freecon(context); -+ freecon(seuser); - } - #else - # define check_selinux_update_passwd(username) ((void)0) diff --git a/package/utils/busybox/patches/230-add_nslookup_lede.patch b/package/utils/busybox/patches/230-add_nslookup_lede.patch index 446b01c3f1..280d4e238e 100644 --- a/package/utils/busybox/patches/230-add_nslookup_lede.patch +++ b/package/utils/busybox/patches/230-add_nslookup_lede.patch @@ -34,7 +34,7 @@ Signed-off-by: Jo-Philipp Wich # However, on *other platforms* it fails when some of those flags --- /dev/null +++ b/networking/nslookup_lede.c -@@ -0,0 +1,914 @@ +@@ -0,0 +1,934 @@ +/* + * nslookup_lede - musl compatible replacement for busybox nslookup + * @@ -128,6 +128,7 @@ Signed-off-by: Jo-Philipp Wich + { ns_t_cname, "CNAME" }, + { ns_t_mx, "MX" }, + { ns_t_txt, "TXT" }, ++ { ns_t_srv, "SRV" }, + { ns_t_ptr, "PTR" }, + { ns_t_any, "ANY" }, + { } @@ -259,6 +260,25 @@ Signed-off-by: Jo-Philipp Wich + } + break; + ++ case ns_t_srv: ++ if (rdlen < 6) { ++ //printf("SRV record too short\n"); ++ return -1; ++ } ++ ++ cp = ns_rr_rdata(rr); ++ n = ns_name_uncompress(ns_msg_base(handle), ns_msg_end(handle), ++ cp + 6, dname, sizeof(dname)); ++ ++ if (n < 0) { ++ //printf("Unable to uncompress domain: %s\n", strerror(errno)); ++ return -1; ++ } ++ ++ printf("%s\tservice = %hu %hu %hu %s\n", ns_rr_name(rr), ++ ns_get16(cp), ns_get16(cp + 2), ns_get16(cp + 4), dname); ++ break; ++ + case ns_t_soa: + if (rdlen < 20) { + //fprintf(stderr, "SOA record too short\n"); diff --git a/rules.mk b/rules.mk index 08f5d3ca5c..971781e8bb 100644 --- a/rules.mk +++ b/rules.mk @@ -27,7 +27,7 @@ empty:= space:= $(empty) $(empty) comma:=, merge=$(subst $(space),,$(1)) -confvar=$(shell echo '$(foreach v,$(1),$(v)=$(subst ','\'',$($(v))))' | $(STAGING_DIR_HOST)/bin/mkhash md5) +confvar=$(shell echo '$(foreach v,$(1),$(v)=$(subst ','\'',$($(v))))' | $(MKHASH) md5) strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1)) paren_left = ( @@ -268,6 +268,9 @@ TARGET_CXX:=$(TARGET_CROSS)g++ KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh SED:=$(STAGING_DIR_HOST)/bin/sed -i -e ESED:=$(STAGING_DIR_HOST)/bin/sed -E -i -e +MKHASH:=$(STAGING_DIR_HOST)/bin/mkhash +# MKHASH is used in /scripts, so we export it here. +export MKHASH CP:=cp -fpR LN:=ln -sf XARGS:=xargs -r @@ -401,7 +404,7 @@ endef # $(2) => If set, recurse into subdirectories define sha256sums (cd $(1); find . $(if $(2),,-maxdepth 1) -type f -not -name 'sha256sums' -printf "%P\n" | sort | \ - xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums) + xargs -r $(MKHASH) -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums) endef # file extension diff --git a/scripts/combined-ext-image.sh b/scripts/combined-ext-image.sh index 7ff287bde7..c20203f23b 100755 --- a/scripts/combined-ext-image.sh +++ b/scripts/combined-ext-image.sh @@ -63,7 +63,7 @@ while [ "$#" -gt 1 ] [ ! -f "$file" ] && echo "$ME: Not a valid file: $file" && usage FILES="$FILES $file" - md5=$(mkhash md5 "$file") + md5=$($MKHASH md5 "$file") printf "%-32s%08x%32s" "$filename" $(stat -c "%s" "$file") "${md5%% *}" >> "${IMG_TMP_OUT}" shift 2 done diff --git a/scripts/combined-image.sh b/scripts/combined-image.sh index 4e00cb89a2..a365fbc536 100755 --- a/scripts/combined-image.sh +++ b/scripts/combined-image.sh @@ -16,7 +16,7 @@ dd if="$1" of="$kern" bs=$BLKSZ conv=sync 2>/dev/null dd if="$2" of="$root" bs=$BLKSZ conv=sync 2>/dev/null # Calculate md5sum over combined kernel and rootfs image. -md5=$(cat "$kern" "$root" | mkhash md5) +md5=$(cat "$kern" "$root" | $MKHASH md5) # Write image header followed by kernel and rootfs image. # The header is padded to 64k, format is: diff --git a/scripts/download.pl b/scripts/download.pl index 747f33b53c..e0a2a17efa 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -65,8 +65,8 @@ sub hash_cmd() { my $len = length($file_hash); my $cmd; - $len == 64 and return "mkhash sha256"; - $len == 32 and return "mkhash md5"; + $len == 64 and return "$ENV{'MKHASH'} sha256"; + $len == 32 and return "$ENV{'MKHASH'} md5"; return undef; } diff --git a/scripts/ipkg-make-index.sh b/scripts/ipkg-make-index.sh index f6f15d7dd8..8965d0aa18 100755 --- a/scripts/ipkg-make-index.sh +++ b/scripts/ipkg-make-index.sh @@ -18,7 +18,7 @@ for pkg in `find $pkg_dir -name '*.ipk' | sort`; do [[ "$name" = "libc" ]] && continue echo "Generating index for package $pkg" >&2 file_size=$(stat -L -c%s $pkg) - sha256sum=$(mkhash sha256 $pkg) + sha256sum=$($MKHASH sha256 $pkg) # Take pains to make variable value sed-safe sed_safe_pkg=`echo $pkg | sed -e 's/^\.\///g' -e 's/\\//\\\\\\//g'` tar -xzOf $pkg ./control.tar.gz | tar xzOf - ./control | sed -e "s/^Description:/Filename: $sed_safe_pkg\\ diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh index 98464c631b..2167599f61 100755 --- a/scripts/om-fwupgradecfg-gen.sh +++ b/scripts/om-fwupgradecfg-gen.sh @@ -54,8 +54,8 @@ esac CHECK_BS=65536 KERNEL_SIZE=$(stat -c%s "$KERNEL_PATH") -KERNEL_MD5=$(mkhash md5 $KERNEL_PATH) -KERNEL_SHA256=$(mkhash sha256 $KERNEL_PATH) +KERNEL_MD5=$($MKHASH md5 $KERNEL_PATH) +KERNEL_SHA256=$($MKHASH sha256 $KERNEL_PATH) KERNEL_PART_SIZE_KB=$((KERNEL_SIZE / 1024)) KERNEL_PART_SIZE=$(printf $SIZE_FORMAT $(($KERNEL_PART_SIZE_KB * $SIZE_FACTOR))) @@ -63,9 +63,9 @@ ROOTFS_FLASH_ADDR=$(addr=$(($KERNEL_FLASH_ADDR + ($KERNEL_PART_SIZE_KB * 1024))) ROOTFS_SIZE=$(stat -c%s "$ROOTFS_PATH") ROOTFS_SQUASHFS_SIZE=$((ROOTFS_SIZE-4)) ROOTFS_CHECK_BLOCKS=$((ROOTFS_SQUASHFS_SIZE / CHECK_BS)) -ROOTFS_MD5=$(dd if=$ROOTFS_PATH bs=$CHECK_BS count=$ROOTFS_CHECK_BLOCKS 2>&- | mkhash md5) -ROOTFS_MD5_FULL=$(mkhash md5 $ROOTFS_PATH) -ROOTFS_SHA256_FULL=$(mkhash sha256 $ROOTFS_PATH) +ROOTFS_MD5=$(dd if=$ROOTFS_PATH bs=$CHECK_BS count=$ROOTFS_CHECK_BLOCKS 2>&- | $MKHASH md5) +ROOTFS_MD5_FULL=$($MKHASH md5 $ROOTFS_PATH) +ROOTFS_SHA256_FULL=$($MKHASH sha256 $ROOTFS_PATH) ROOTFS_CHECK_SIZE=$(printf '0x%x' $ROOTFS_SQUASHFS_SIZE) ROOTFS_PART_SIZE_KB=$(($MAX_PART_SIZE - $KERNEL_PART_SIZE_KB)) ROOTFS_PART_SIZE=$(printf $SIZE_FORMAT $(($ROOTFS_PART_SIZE_KB * $SIZE_FACTOR))) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index f14c7da42b..f9b623c365 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -39,7 +39,7 @@ define Build/addpattern endef define Build/append-md5sum-bin - $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | sed 's/../\\\\x&/g' |\ + $(MKHASH) md5 $@ | sed 's/../\\\\x&/g' |\ xargs echo -ne >> $@ endef @@ -159,9 +159,9 @@ define Build/xwrt_csac10-factory -[ -f "$@" ] && \ mkdir -p "$@.tmp" && \ mv "$@" "$@.tmp/UploadBrush-bin.img" && \ - binmd5=$$($(STAGING_DIR_HOST)/bin/mkhash md5 "$@.tmp/UploadBrush-bin.img" | head -c32) && \ - oemmd5=$$(echo -n TB-CSAC10-QCA9563_9886-ROUTE-CSAC10 | $(STAGING_DIR_HOST)/bin/mkhash md5 | head -c32) && \ - echo -n $${binmd5}$${oemmd5} | $(STAGING_DIR_HOST)/bin/mkhash md5 | head -c32 >"$@.tmp/bin_random_oem.txt" && \ + binmd5=$$($(MKHASH) md5 "$@.tmp/UploadBrush-bin.img" | head -c32) && \ + oemmd5=$$(echo -n TB-CSAC10-QCA9563_9886-ROUTE-CSAC10 | $(MKHASH) md5 | head -c32) && \ + echo -n $${binmd5}$${oemmd5} | $(MKHASH) md5 | head -c32 >"$@.tmp/bin_random_oem.txt" && \ echo -n V4.4-201910201745 >"$@.tmp/version.txt" && \ $(TAR) -czf $@.tmp.tgz -C "$@.tmp" UploadBrush-bin.img bin_random_oem.txt version.txt && \ $(STAGING_DIR_HOST)/bin/openssl aes-256-cbc -md md5 -salt -in $@.tmp.tgz -out "$@" -k QiLunSmartWL && \ @@ -173,9 +173,9 @@ define Build/xwrt_csac05-factory -[ -f "$@" ] && \ mkdir -p "$@.tmp" && \ mv "$@" "$@.tmp/UploadBrush-bin.img" && \ - binmd5=$$($(STAGING_DIR_HOST)/bin/mkhash md5 "$@.tmp/UploadBrush-bin.img" | head -c32) && \ - oemmd5=$$(echo -n TB-CSAC05-QCA9563_9886-ROUTE-CSAC05 | $(STAGING_DIR_HOST)/bin/mkhash md5 | head -c32) && \ - echo -n $${binmd5}$${oemmd5} | $(STAGING_DIR_HOST)/bin/mkhash md5 | head -c32 >"$@.tmp/bin_random_oem.txt" && \ + binmd5=$$($(MKHASH) md5 "$@.tmp/UploadBrush-bin.img" | head -c32) && \ + oemmd5=$$(echo -n TB-CSAC05-QCA9563_9886-ROUTE-CSAC05 | $(MKHASH) md5 | head -c32) && \ + echo -n $${binmd5}$${oemmd5} | $(MKHASH) md5 | head -c32 >"$@.tmp/bin_random_oem.txt" && \ echo -n V4.4-201910201745 >"$@.tmp/version.txt" && \ $(TAR) -czf $@.tmp.tgz -C "$@.tmp" UploadBrush-bin.img bin_random_oem.txt version.txt && \ $(STAGING_DIR_HOST)/bin/openssl aes-256-cbc -md md5 -salt -in $@.tmp.tgz -out "$@" -k QiLunSmartWL && \ diff --git a/target/linux/ramips/dts/mt7620a_youku_yk1.dts b/target/linux/ramips/dts/mt7620a_youku_yk1.dts index f06402c102..f1c4f264a1 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk1.dts +++ b/target/linux/ramips/dts/mt7620a_youku_yk1.dts @@ -12,6 +12,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; + label-mac-device = ðernet; }; leds { @@ -107,7 +108,7 @@ ðernet { pinctrl-names = "default"; - mtd-mac-address = <&factory 0x4>; + mtd-mac-address = <&factory 0x28>; mediatek,portmap = "llllw"; }; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 5937970a37..fc5223f3a4 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -91,7 +91,7 @@ endef define Build/netis-tail echo -n $(1) >> $@ - echo -n $(UIMAGE_NAME)-yun | $(STAGING_DIR_HOST)/bin/mkhash md5 | \ + echo -n $(UIMAGE_NAME)-yun | $(MKHASH) md5 | \ sed 's/../\\\\x&/g' | xargs echo -ne >> $@ endef diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index aa7832e233..3efc16ef10 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -9,9 +9,9 @@ DEVICE_VARS += DLINK_ROM_ID DLINK_FAMILY_MEMBER DLINK_FIRMWARE_SIZE DLINK_IMAGE_ define Build/elecom-header cp $@ $(KDIR)/v_0.0.0.bin ( \ - mkhash md5 $(KDIR)/v_0.0.0.bin && \ + $(MKHASH) md5 $(KDIR)/v_0.0.0.bin && \ echo 458 \ - ) | mkhash md5 > $(KDIR)/v_0.0.0.md5 + ) | $(MKHASH) md5 > $(KDIR)/v_0.0.0.md5 $(STAGING_DIR_HOST)/bin/tar -c \ $(if $(SOURCE_DATE_EPOCH),--mtime=@$(SOURCE_DATE_EPOCH)) \ --owner=0 --group=0 -f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5 diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 9791b70a3a..a1a21ee21f 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -12,7 +12,7 @@ DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME define Build/elecom-wrc-gs-factory $(eval product=$(word 1,$(1))) $(eval version=$(word 2,$(1))) - ( $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | tr -d '\n' ) >> $@ + ( $(MKHASH) md5 $@ | tr -d '\n' ) >> $@ ( \ echo -n "ELECOM $(product) v$(version)" | \ dd bs=32 count=1 conv=sync; \ @@ -25,7 +25,7 @@ endef define Build/elecom-wrc-factory $(eval product=$(word 1,$(1))) $(eval version=$(word 2,$(1))) - $(STAGING_DIR_HOST)/bin/mkhash md5 $@ >> $@ + $(MKHASH) md5 $@ >> $@ ( \ echo -n "ELECOM $(product) v$(version)" | \ dd bs=32 count=1 conv=sync; \ @@ -73,13 +73,13 @@ define Build/ubnt-erx-factory-image $(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; \ + $(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; \ + $(MKHASH) md5 $(1).rootfs > $(1).md5; \ $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \ \ echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \ diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index c2d0fcdaf8..404b00e4bd 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -262,7 +262,6 @@ ramips_setup_macs() sanlinking,d240|\ vonets,var11n-300|\ wrtnode,wrtnode|\ - youku,yk1|\ zbtlink,zbt-ape522ii|\ zbtlink,zbt-wa05|\ zbtlink,zbt-we2026|\ @@ -346,6 +345,7 @@ ramips_setup_macs() lenovo,newifi-y1|\ lenovo,newifi-y1s|\ ohyeah,oy-0001) + youku,yk1) wan_mac=$(mtd_get_mac_binary factory 0x2e) ;; linksys,e1700)