busybox: Include hdparm by default on nas type device
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 1 Jan 2020 13:34:11 +0000 (14:34 +0100)
committerJohn Crispin <john@phrozen.org>
Wed, 15 Jan 2020 18:57:27 +0000 (19:57 +0100)
NAS devices certainly need to have hdparm to configure
things like spin-down time or their disks will be
constantly spinning. Just catenate CONFIG_HDPARM=y
on these configs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
package/utils/busybox/Makefile

index c0f3007e5d8587c15a4d80b4465e081c9375439d..9af0f4853e47e2f2dd5e3bbf1e8a003b937368a1 100644 (file)
@@ -92,6 +92,9 @@ ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
 endif
 
 define Build/Configure
+ifeq ($(DEVICE_TYPE),nas)
+       echo "CONFIG_HDPARM=y" >> $(PKG_BUILD_DIR)/.config
+endif
        grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config
        yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) oldconfig
 endef