CONFIG_BOOTDELAY default should not affect runtime
Because the code that handles bootdelay is compiled in conditionally based on the default value, you are restricted in the default, regardless of what you want the runtime options to be. Change the source to always check if any default is given so that other values can be selected and used at runtime. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
fe492cee35
commit
d514544fe0
|
@ -95,7 +95,7 @@ extern void mdm_init(void); /* defined in board.c */
|
||||||
* Watch for 'delay' seconds for autoboot stop or autoboot delay string.
|
* Watch for 'delay' seconds for autoboot stop or autoboot delay string.
|
||||||
* returns: 0 - no key string, allow autoboot 1 - got key string, abort
|
* returns: 0 - no key string, allow autoboot 1 - got key string, abort
|
||||||
*/
|
*/
|
||||||
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
|
#if defined(CONFIG_BOOTDELAY)
|
||||||
# if defined(CONFIG_AUTOBOOT_KEYED)
|
# if defined(CONFIG_AUTOBOOT_KEYED)
|
||||||
#ifndef CONFIG_MENU
|
#ifndef CONFIG_MENU
|
||||||
static inline
|
static inline
|
||||||
|
@ -279,7 +279,7 @@ int abortboot(int bootdelay)
|
||||||
return abort;
|
return abort;
|
||||||
}
|
}
|
||||||
# endif /* CONFIG_AUTOBOOT_KEYED */
|
# endif /* CONFIG_AUTOBOOT_KEYED */
|
||||||
#endif /* CONFIG_BOOTDELAY >= 0 */
|
#endif /* CONFIG_BOOTDELAY */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Runs the given boot command securely. Specifically:
|
* Runs the given boot command securely. Specifically:
|
||||||
|
@ -295,8 +295,7 @@ int abortboot(int bootdelay)
|
||||||
* printing the error message to console.
|
* printing the error message to console.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) && \
|
#if defined(CONFIG_BOOTDELAY) && defined(CONFIG_OF_CONTROL)
|
||||||
defined(CONFIG_OF_CONTROL)
|
|
||||||
static void secure_boot_cmd(char *cmd)
|
static void secure_boot_cmd(char *cmd)
|
||||||
{
|
{
|
||||||
cmd_tbl_t *cmdtp;
|
cmd_tbl_t *cmdtp;
|
||||||
|
@ -358,11 +357,10 @@ void main_loop (void)
|
||||||
int rc = 1;
|
int rc = 1;
|
||||||
int flag;
|
int flag;
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) && \
|
#if defined(CONFIG_BOOTDELAY) && defined(CONFIG_OF_CONTROL)
|
||||||
defined(CONFIG_OF_CONTROL)
|
|
||||||
char *env;
|
char *env;
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
|
#if defined(CONFIG_BOOTDELAY)
|
||||||
char *s;
|
char *s;
|
||||||
int bootdelay;
|
int bootdelay;
|
||||||
#endif
|
#endif
|
||||||
|
@ -435,7 +433,7 @@ void main_loop (void)
|
||||||
update_tftp (0UL);
|
update_tftp (0UL);
|
||||||
#endif /* CONFIG_UPDATE_TFTP */
|
#endif /* CONFIG_UPDATE_TFTP */
|
||||||
|
|
||||||
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
|
#if defined(CONFIG_BOOTDELAY)
|
||||||
s = getenv ("bootdelay");
|
s = getenv ("bootdelay");
|
||||||
bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;
|
bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue