From e6c55d70f48695ec2e16efe7628fe55eb20561c6 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Sun, 23 Feb 2020 13:05:27 +0900 Subject: [PATCH 1/9] ltq-vdsl-mei: avoid underscore in package name As 07e1d88d7beb ("kernel: avoid underscore in *6lowpan package names") shows, underscores might cause build failures. Replace underscore with dash. Signed-off-by: Sungbo Eo --- package/kernel/lantiq/ltq-vdsl-mei/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-mei/Makefile index b8d75a8b2b..5d15f2650b 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile @@ -38,7 +38,7 @@ define KernelPackage/ltq-vdsl-vr9-mei/description endef -define Package/ltq-vdsl-mei_test +define Package/ltq-vdsl-mei-test SECTION:=net CATEGORY:=Network TITLE:=Lantiq mei driver test tool @@ -46,7 +46,7 @@ define Package/ltq-vdsl-mei_test DEPENDS:=@TARGET_lantiq_xrx200 endef -define Package/ltq-vdsl-mei_test/description +define Package/ltq-vdsl-mei-test/description Userland tool to directly control the mei driver, this is only needed for test and development purposes. endef @@ -80,9 +80,9 @@ endef $(eval $(call KernelPackage,ltq-vdsl-vr9-mei)) -define Package/ltq-vdsl-mei_test/install +define Package/ltq-vdsl-mei-test/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mei_cpe_drv_test $(1)/bin endef -$(eval $(call BuildPackage,ltq-vdsl-mei_test)) +$(eval $(call BuildPackage,ltq-vdsl-mei-test)) From 33c1d5eee48d98afc0f31a72d50df31f496a6166 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Sun, 23 Feb 2020 13:05:35 +0900 Subject: [PATCH 2/9] x86: avoid underscore in package name As 07e1d88d7beb ("kernel: avoid underscore in *6lowpan package names") shows, underscores might cause build failures. Replace underscore with dash. Signed-off-by: Sungbo Eo --- target/linux/x86/modules.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/x86/modules.mk b/target/linux/x86/modules.mk index 87733c2850..c8722938d3 100644 --- a/target/linux/x86/modules.mk +++ b/target/linux/x86/modules.mk @@ -20,7 +20,7 @@ endef $(eval $(call KernelPackage,sound-cs5535audio)) -define KernelPackage/sp5100_tco +define KernelPackage/sp5100-tco SUBMENU:=$(OTHER_MENU) TITLE:=SP5100 Watchdog Support DEPENDS:=@TARGET_x86 @@ -29,8 +29,8 @@ define KernelPackage/sp5100_tco AUTOLOAD:=$(call AutoLoad,50,sp5100_tco,1) endef -define KernelPackage/sp5100_tco/description +define KernelPackage/sp5100-tco/description Kernel module for the SP5100_TCO hardware watchdog. endef -$(eval $(call KernelPackage,sp5100_tco)) +$(eval $(call KernelPackage,sp5100-tco)) From 55c153538d894f6fe71404fa3b73cb52ad946d63 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 23 Feb 2020 12:50:30 +0100 Subject: [PATCH 3/9] ath79: fix TP-Link TL-WA901ND v2 PHY stuck in reset Some newer bootloaders for the TP-Link TL-WA901ND put the ethernet PHY in reset before loading the kernel, thus the LAN interface is not working in OpenWrt. Clear the reset to restore ethernet functionality. Signed-off-by: David Bauer --- target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts index e55affdf20..6542ce9e4d 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts @@ -113,6 +113,12 @@ phy12: ethernet-phy@c { reg = <0xc>; phy-mode = "mii"; + + resets = <&rst 8>; + reset-names = "phy"; + + reset-assert-us = <10000>; + reset-deassert-us = <10000>; }; }; From c24e01fcccdb8fe3f4a2c9134b584a6076b7c1ef Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Mon, 24 Feb 2020 00:12:23 +0900 Subject: [PATCH 4/9] kirkwood: fix device node name of Iomega ix2-200 The current device node name of ix2-200 is "iom_ix2_200", which results in a SUPPORTED_DEVICES string "iom,ix2,200" that does not match the compatible in DTS and the board name used in board.d. Fix this by replacing the second underscore with a dash, following vendor_model scheme. Fixes: 27b2f0fc0fc5 ("kirkwood: add support for Iomega Storcenter ix2-200") Signed-off-by: Sungbo Eo [commit title/message rephrase] Signed-off-by: Adrian Schmutzler --- target/linux/kirkwood/image/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index 9c5681901c..cbdfbc11ec 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -62,7 +62,7 @@ define Device/iom_iconnect-1.1 endef TARGET_DEVICES += iom_iconnect-1.1 -define Device/iom_ix2_200 +define Device/iom_ix2-200 DEVICE_VENDOR := Iomega DEVICE_MODEL := StorCenter ix2-200 DEVICE_DTS := kirkwood-iomega_ix2_200 @@ -77,7 +77,7 @@ define Device/iom_ix2_200 IMAGE_SIZE := 32505856 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE) endef -TARGET_DEVICES += iom_ix2_200 +TARGET_DEVICES += iom_ix2-200 define Device/linksys_audi DEVICE_VENDOR := Linksys From 4528128b052299604ad37b0c9bc23f465cd40e98 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Mon, 24 Feb 2020 00:16:16 +0900 Subject: [PATCH 5/9] kirkwood: tidy up image Makefile - use k in SIZE variables - break long lines Signed-off-by: Sungbo Eo --- target/linux/kirkwood/image/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index cbdfbc11ec..92188854a3 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -70,12 +70,13 @@ define Device/iom_ix2-200 DEVICE_TYPE:=nas PAGESIZE := 512 SUBPAGESIZE := 256 - BLOCKSIZE := 16KiB + BLOCKSIZE := 16k KERNEL_SIZE := 3072k KERNEL_IN_UBI := UBINIZE_OPTS := -E 5 - IMAGE_SIZE := 32505856 - IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE_SIZE := 31744k + IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \ + check-size $$$$(IMAGE_SIZE) endef TARGET_DEVICES += iom_ix2-200 @@ -85,7 +86,7 @@ define Device/linksys_audi DEVICE_PACKAGES := kmod-mwl8k swconfig wpad-basic kmod-gpio-button-hotplug PAGESIZE := 512 SUBPAGESIZE := 256 - BLOCKSIZE := 16KiB + BLOCKSIZE := 16k KERNEL_SIZE := 2624k KERNEL_IN_UBI := UBINIZE_OPTS := -E 5 From 1013b140a663b5f40e27397c0c4c6a542a4d4a24 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Mon, 24 Feb 2020 00:14:22 +0900 Subject: [PATCH 6/9] kirkwood: add kmod-hwmon-core to DEVICE_PACKAGES kmod-hwmon-lm* will not get into images unless kmod-hwmon-core is added to DEVICE_PACKAGES as well. Signed-off-by: Sungbo Eo [only address kmod-hwmon-core in this commit] Signed-off-by: Adrian Schmutzler --- target/linux/kirkwood/image/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index 92188854a3..0837c65711 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -66,7 +66,8 @@ define Device/iom_ix2-200 DEVICE_VENDOR := Iomega DEVICE_MODEL := StorCenter ix2-200 DEVICE_DTS := kirkwood-iomega_ix2_200 - DEVICE_PACKAGES += kmod-gpio-button-hotplug kmod-i2c-mv64xxx kmod-hwmon-lm63 + DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-i2c-mv64xxx kmod-hwmon-core \ + kmod-hwmon-lm63 DEVICE_TYPE:=nas PAGESIZE := 512 SUBPAGESIZE := 256 @@ -138,7 +139,8 @@ TARGET_DEVICES += seagate_goflexhome define Device/zyxel_nsa310b DEVICE_VENDOR := ZyXEL DEVICE_MODEL := NSA310b - DEVICE_PACKAGES := kmod-r8169 kmod-gpio-button-hotplug kmod-hwmon-lm85 + DEVICE_PACKAGES := kmod-r8169 kmod-gpio-button-hotplug kmod-hwmon-core \ + kmod-hwmon-lm85 BOARD_NAME := nsa310b endef TARGET_DEVICES += zyxel_nsa310b From 33ecc694d5fdf5390d2e2703ef995ef8459f5071 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Sun, 23 Feb 2020 21:37:36 +0900 Subject: [PATCH 7/9] urandom-seed: avoid PKG_NAME in define lines > Avoid reuse of PKG_NAME in call, define and eval lines for consistency and > readability. Write the full name instead. Ref: https://openwrt.org/docs/guide-developer/packages Signed-off-by: Sungbo Eo --- package/system/urandom-seed/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/system/urandom-seed/Makefile b/package/system/urandom-seed/Makefile index 6bde2e0b8a..aa13765a52 100644 --- a/package/system/urandom-seed/Makefile +++ b/package/system/urandom-seed/Makefile @@ -9,7 +9,7 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk -define Package/$(PKG_NAME) +define Package/urandom-seed SECTION:=base CATEGORY:=Base system DEPENDS:=+getrandom @@ -25,7 +25,7 @@ define Build/Compile/Default endef Build/Compile = $(Build/Compile/Default) -define Package/$(PKG_NAME)/install +define Package/urandom-seed/install $(CP) ./files/* $(1)/ endef From 3124c9afe32d80f8068777bec0ed785cc85a6738 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Sun, 23 Feb 2020 21:38:24 +0900 Subject: [PATCH 8/9] urngd: avoid PKG_NAME in define lines > Avoid reuse of PKG_NAME in call, define and eval lines for consistency and > readability. Write the full name instead. Ref: https://openwrt.org/docs/guide-developer/packages Signed-off-by: Sungbo Eo --- package/system/urngd/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/system/urngd/Makefile b/package/system/urngd/Makefile index 9e26f222b6..54a1f457d2 100644 --- a/package/system/urngd/Makefile +++ b/package/system/urngd/Makefile @@ -17,14 +17,14 @@ PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -define Package/$(PKG_NAME) +define Package/urngd SECTION:=utils CATEGORY:=Base system TITLE:=OpenWrt non-physical true random number generator based on timing jitter DEPENDS:=+libubox endef -define Package/$(PKG_NAME)/description +define Package/urngd/description urngd is OpenWrt's micro non-physical true random number generator based on timing jitter. @@ -38,11 +38,11 @@ define Package/$(PKG_NAME)/description Jitter RNGd provides a source of sufficient entropy. endef -define Package/$(PKG_NAME)/install +define Package/urngd/install $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) $(INSTALL_DIR) $(1)/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin/$(PKG_NAME) endef -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,urngd)) From 7e9c7e7b2d4c36734912074aa1c19acea8f3801a Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Mon, 24 Feb 2020 00:17:16 +0900 Subject: [PATCH 9/9] kirkwood: tidy up hwmon_fancontrol Add indent and sort board_name alphabetically. Sourcing /lib/functions.sh is already handled by /etc/rc.common. Drop the line. Signed-off-by: Sungbo Eo --- .../base-files/etc/init.d/hwmon_fancontrol | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol index 0adc5d0726..a0e3de062b 100755 --- a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol +++ b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol @@ -1,23 +1,22 @@ #!/bin/sh /etc/rc.common START=98 + boot() { -. /lib/functions.sh + # configuring (lm85/lm63) onboard temp/fan controller to run the fan on its own + # for more information, please read https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface -#configuring (lm85/lm63) onboard temp/fan controller to run the fan on its own -#for more information, please read https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface - -case $(board_name) in -zyxel,nsa310b) - path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0' - echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1 - echo 1 > "$path_to_hwmon/pwm1_auto_channels" # temp1 is the only one that changes - echo 23000 > "$path_to_hwmon/temp1_auto_temp_min" - echo 43000 > "$path_to_hwmon/temp1_auto_temp_max" # next step is 49600 millicelsius, or 50 celsius, 43 celsius is better - ;; -iom,ix2-200) - path_to_hwmon='/sys/class/hwmon/hwmon0' - echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1 - ;; -esac + case $(board_name) in + iom,ix2-200) + path_to_hwmon='/sys/class/hwmon/hwmon0' + echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1 + ;; + zyxel,nsa310b) + path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0' + echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1 + echo 1 > "$path_to_hwmon/pwm1_auto_channels" # temp1 is the only one that changes + echo 23000 > "$path_to_hwmon/temp1_auto_temp_min" + echo 43000 > "$path_to_hwmon/temp1_auto_temp_max" # next step is 49600 millicelsius, or 50 celsius, 43 celsius is better + ;; + esac }