mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
41598c8251
Since commit bb597c0eeb
("common: bootdelay: move CONFIG_BOOTDELAY
into a Kconfig option"), CONFIG_BOOTDELAY is defined for all boards.
Prior to that commit, it was allowed to unset CONFIG_BOOTDELAY to
not compile common/autoboot.c, as described in common/Makefile:
# This option is not just y/n - it can have a numeric value
ifdef CONFIG_BOOTDELAY
obj-y += autoboot.o
endif
It was a bit odd to enable/disable code with an integer type option,
but it was how this option worked before that commit, and several
boards actually unset it to opt out of the autoboot feature.
This commit adds a new bool option, CONFIG_AUTOBOOT, and makes
CONFIG_BOOTDELAY depend on it.
I chose "default y" for this option because most boards use the
autoboot. I added "# CONFIG_AUTOBOOT is not set" for the boards that
had not set CONFIG_BOOTDELAY prior to the bad commit.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
47 lines
1 KiB
C
47 lines
1 KiB
C
/*
|
|
* (C) Copyright 2000
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
*
|
|
* Add to readline cmdline-editing by
|
|
* (C) Copyright 2005
|
|
* JinHua Luo, GuangDong Linux Center, <luo.jinhua@gd-linux.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef __AUTOBOOT_H
|
|
#define __AUTOBOOT_H
|
|
|
|
#ifdef CONFIG_AUTOBOOT
|
|
/**
|
|
* bootdelay_process() - process the bootd delay
|
|
*
|
|
* Process the boot delay, boot limit, then get the value of either
|
|
* bootcmd, failbootcmd or altbootcmd depending on the current state.
|
|
* Return this command so it can be executed.
|
|
*
|
|
* @return command to executed
|
|
*/
|
|
const char *bootdelay_process(void);
|
|
|
|
/**
|
|
* autoboot_command() - run the autoboot command
|
|
*
|
|
* If enabled, run the autoboot command returned from bootdelay_process().
|
|
* Also do the CONFIG_MENUKEY processing if enabled.
|
|
*
|
|
* @cmd: Command to run
|
|
*/
|
|
void autoboot_command(const char *cmd);
|
|
#else
|
|
static inline const char *bootdelay_process(void)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline void autoboot_command(const char *s)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif
|