busybox: support millisecond watchdog periods
authorSimon Dawson <spdawson@gmail.com>
Mon, 18 Feb 2013 00:38:31 +0000 (00:38 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 18 Feb 2013 21:30:42 +0000 (22:30 +0100)
The BusyBox watchdog application supports reset periods specified in
milliseconds. The Buildroot package will only allow an integer reset period,
which prevents the use of the required "ms" suffix. Change the watchdog period
configuration item to a string, to allow the use of the "ms" suffix.

Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/busybox/Config.in
package/busybox/busybox.mk

index 2890c492d1f3b1d899fcae2563cb14ab952ad5cc..4d9899dbffa09f8207dfa99467f08528e9662feb 100644 (file)
@@ -64,12 +64,14 @@ config BR2_PACKAGE_BUSYBOX_WATCHDOG
 if BR2_PACKAGE_BUSYBOX_WATCHDOG
 
 config BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD
-       int "Delay between reset"
+       string "Delay between reset"
        default "5"
        help
          Select the number of seconds between each
          reset of the watchdog (default 5)
 
+         Use ms suffix to specify milliseconds (e.g. 500ms)
+
 endif
 
 endif
index 599e1455388c88399dd3ac2e367a0e0f7ba74fc4..900896f700b30f4a3256154f211dbb23b7c71a54 100644 (file)
@@ -168,7 +168,7 @@ define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
        [ -f $(TARGET_DIR)/etc/init.d/S15watchdog ] || \
                install -D -m 0755 package/busybox/S15watchdog \
                        $(TARGET_DIR)/etc/init.d/S15watchdog && \
-               sed -i s/PERIOD/$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD)/ \
+               sed -i s/PERIOD/$(call qstrip,$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD))/ \
                        $(TARGET_DIR)/etc/init.d/S15watchdog
 endef
 endif