diff mbox series

[OpenWrt-Devel] busybox: Include hdparm by default on nas type device

Message ID 20200101133411.10451-1-linus.walleij@linaro.org
State Accepted
Delegated to: John Crispin
Headers show
Series [OpenWrt-Devel] busybox: Include hdparm by default on nas type device | expand

Commit Message

Linus Walleij Jan. 1, 2020, 1:34 p.m. UTC
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 | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jo-Philipp Wich Jan. 1, 2020, 3:55 p.m. UTC | #1
Hi Linus,

can you move the condition before the sed program populating the initial
config? That should restore the ability for users to deselect busybox
hdparm (e.g. to replace it with something different).

~ Jo
John Crispin Jan. 15, 2020, 6:58 p.m. UTC | #2
On 01/01/2020 16:55, Jo-Philipp Wich wrote:
> Hi Linus,
> 
> can you move the condition before the sed program populating the initial
> config? That should restore the ability for users to deselect busybox
> hdparm (e.g. to replace it with something different).
> 
> ~ Jo

folded Jo's comment into the patch
Merged, thanks !
diff mbox series

Patch

diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index c0f3007e5d85..b9684d2da66e 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -93,6 +93,9 @@  endif
 
 define Build/Configure
 	grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config
+ifeq ($(DEVICE_TYPE),nas)
+	echo "CONFIG_HDPARM=y" >> $(PKG_BUILD_DIR)/.config
+endif
 	yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) oldconfig
 endef