From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 08 May 2015 08:00:41 +0200 Subject: [U-Boot] [PATCH v1 3/4] autoboot.c: Move config options to Kconfig In-Reply-To: References: <1431000847-22183-1-git-send-email-sr@denx.de> <1431000847-22183-4-git-send-email-sr@denx.de> Message-ID: <554C5109.5050800@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Masahiro, On 08.05.2015 05:30, Masahiro Yamada wrote: > 2015-05-08 8:51 GMT+09:00 Simon Glass : >> Hi Stefan, >> >> On 7 May 2015 at 06:13, Stefan Roese wrote: >>> This patch moves the following config options to Kconfig: >>> >>> CONFIG_AUTOBOOT_KEYED >>> CONFIG_AUTOBOOT_PROMPT >>> CONFIG_AUTOBOOT_DELAY_STR >>> CONFIG_AUTOBOOT_STOP_STR >>> AUTOBOOT_KEYED_CTRLC >>> >>> Signed-off-by: Stefan Roese >>> Cc: Masahiro Yamada >>> Cc: Simon Glass > > > Thanks for working on a task requiring much effort. Yes. I really admire you for all your hard work on this. Now that I've done a tiny bit here as well. ;) > I am just wondering if we need not move the prompt messages verbatim to Kconfig. > > I know CONFIG_AUTOBOOT_PROMPT provides us the best flexibility, > but the messages are most likely "autoboot in %d seconds" or "Press ...". > > Can we put the message directly into common/autoboot.c like this? > > #ifdef CONFIG_SHOW_AUTOBOOT_PROMPT > printf("Autoboot in %d seconds\n", CONFIG_BOOTDELAY); > printf("Press %c to abort in %d seconds\n", CONFIG_AUTOBOOT_STOP_STR); > #endif > > > I think I am missing some things here: > - Those boards that require a password do not want to show it > - We need to convert " " to user-visible "" if > CONFIG_AUTOBOOT_STOP_STP == " " > > > Any ideas? Unfortunately not all boards print such a message. There is quite a range of alternatives, I'm afraid. Some boards use CONFIG_AUTOBOOT_STOP_STR, some CONFIG_AUTOBOOT_DELAY_STR. Some print this string / char, some don't. So we can't really convert them all into such a generic implementation. Without breaking backward (user) compatibility. At least I don't see such a way. Thanks, Stefan