Make the grub timeout configurable on x86 targets
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 19 Jan 2012 01:14:45 +0000 (01:14 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 19 Jan 2012 01:14:45 +0000 (01:14 +0000)
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
SVN-Revision: 29786

target/linux/x86/image/Config.in
target/linux/x86/image/Makefile
target/linux/x86/image/menu.lst

index a9412cdd67a12e9766a258f9b2f3b939b859d1b3..b60baeabb9fa83330afeac27fd1800c6eba74c20 100644 (file)
@@ -47,6 +47,13 @@ config X86_GRUB_BOOTOPTS
        help
          If you don't know, just leave it blank.
 
+config X86_GRUB_TIMEOUT
+       string "Seconds to wait before booting the default entry"
+       depends X86_GRUB_IMAGES
+       default "5"
+       help
+         If you don't know, 5 seconds is a reasonable default.
+
 config X86_VDI_IMAGES
        bool "Build VirtualBox image files (VDI)"
        depends X86_GRUB_IMAGES
index c070a103198eccda1dbb6563beb68e4c3dae5fa5..185da1096c10117b8c35fcd66c54d117bbffa7b8 100644 (file)
@@ -31,6 +31,8 @@ endif
 
 ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
 
+GRUB_TIMEOUT:=$(call qstrip,$(CONFIG_X86_GRUB_TIMEOUT))
+
 ifneq ($(CONFIG_X86_GRUB_IMAGES),)
 
   BOOTOPTS:=$(call qstrip,$(CONFIG_X86_GRUB_BOOTOPTS))
@@ -64,6 +66,7 @@ ifneq ($(CONFIG_X86_GRUB_IMAGES),)
                -e 's#@SERIAL_CONFIG@#$(strip $(GRUB_SERIAL_CONFIG))#g' \
                -e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
                -e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \
+               -e 's#@TIMEOUT@#$(GRUB_TIMEOUT)#g' \
                ./menu.lst > $(KDIR)/root.grub/boot/grub/menu.lst
        PADDING="$(CONFIG_TARGET_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_x86.sh \
                $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
index 5f99f21560b10f68142e11b57671969fd94f6c0b..5af1e955b3b1e85ac0c9523ddd392cde3afba650 100644 (file)
@@ -2,7 +2,7 @@
 @TERMINAL_CONFIG@
 
 default 0
-timeout 5
+timeout @TIMEOUT@
 
 title   OpenWrt
 root    (hd0,0)