From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] CONFIG_BOOTDELAY default should not affect runtime
Date: Mon, 18 Feb 2013 12:20:40 -0500 [thread overview]
Message-ID: <512262E8.2000703@ti.com> (raw)
In-Reply-To: <CAP9ODKqs5Fsw+NVQzNvm6+4VVK6jfC1vD6eZQfumdKvxzCqsjQ@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/09/2013 11:21 AM, Otavio Salvador wrote:
> Hello Wolfgang,
>
> On Sat, Feb 9, 2013 at 4:54 AM, Wolfgang Denk <wd@denx.de> wrote:
>> Dear Joe Hershberger,
>>
>> In message
>> <1360355280-1197-1-git-send-email-joe.hershberger@ni.com> you
>> wrote:
>>> 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> ---
>>> common/main.c | 14 ++++++-------- 1 file changed, 6
>>> insertions(+), 8 deletions(-)
>>>
>>> diff --git a/common/main.c b/common/main.c index
>>> e2d2e09..0973c59 100644 --- a/common/main.c +++
>>> b/common/main.c @@ -95,7 +95,7 @@ extern void mdm_init(void);
>>> /* defined in board.c */ * Watch for 'delay' seconds for
>>> autoboot stop or autoboot delay string. * returns: 0 - no key
>>> string, allow autoboot 1 - got key string, abort */ -#if
>>> defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) +#if
>>> defined(CONFIG_BOOTDELAY)
>>
>> Careful!! This is probably changing behaviour of a number of
>> boards significantly.
>>
>> we have to check if we really want this, and if yes, we have to
>> announce it and provide a grace period (eventually using
>> doc/feature-removal-schedule.txt ?)
>
> It seems the CONFIG_BOOTDELAY as < 0 is not very common:
>
> ~/hacking/u-boot% git grep CONFIG_BOOTDELAY | egrep 'BOOTDELAY\s*
> \-[0-9]' include/configs/RPXsuper.h:#define CONFIG_BOOTDELAY
> -1 include/configs/ep8260.h:#define CONFIG_BOOTDELAY -1
> include/configs/espt.h:#define CONFIG_BOOTDELAY -1
> include/configs/scb9328.h:#define CONFIG_BOOTDELAY -1
> include/configs/sh7763rdp.h:#define CONFIG_BOOTDELAY -1
I count 49 boards with git grep -E
'CONFIG_BOOTDELAY[[:blank:]]+-[0-9]' so it's not _that_ uncommon.
> So maybe those could have CONFIG_BOOTDELAY undefined keeping them
> working as before?
The problem is that as I read the README, we document CONFIG_BOOTDELAY
as having a valid value range of from -2 to sane positive value. So
yes, if we want to change this we need to (a) change the README too
and (b) give some sort of heads-up.
Off the top of my head, we could change to:
CONFIG_AUTOBOOT_DISABLED and CONFIG_FORCE_AUTOBOOT_NO_DELAY and update
doc/README.autoboot as well and add some sanity #warning checks for a
release or two in some common generated config related file or
something like that.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRImLoAAoJENk4IS6UOR1W78kP/1xHVrQ4pZbAV8WnBsxje+gn
qphEJU5Ud+gA5ThyEm/I1d1VSSvLgOWGqnarleOSXUmcWkBcbfetO69VVLnvlUI+
oVXEopn7plCO7iM2YAiOW8vx5fy97JqGxWn1/BJ64ySjup5GlEXd97Op9LQ+wjy7
xNgFQ1KN9wdoabQU2PUy7jeGXY8LTdFx4GsYSK/KRJWIvo3O57c2uOsE2BiA2Uxq
Ue780cVqqsoRmZxo2gooAUTupz3kPYmFthPn2qxs1y3nLn4GVrJM5YurOhH2weeA
sHOffHqlUn1kUxrhRnM6mpeu+JUeKFP8IoyOuhCYA7D28Bk1XtqkZai+yobOrf3U
cr4WUdhZEA9hFZAXnlrVe/FjVLe6pvQ9hPjUshPoCerahrcpUOwiegrw6IWg+vzB
DdK5hbPh09rTdpfnjWWRf0fSrqQqaXmNQALmRQOc4G1Vn8xKruC4vacetdNRfgCn
gFOSTpbDBG7oKFXHpCzliXEg8lFy+af+oMKTztR/UtPrBX5cfr6XF2SekNm9jus4
Njjq1ouYKXfOyeNIrg0prOi14ZMF3uQYb/eUsffzeujdmbhcgENopUrGLl9FvlxV
bsktw7oWhgirVZ5CsODk/3siDfJc1pi9yz3oMO61Qqtrrv3HLLjGIFEx4DjxNmkk
COfH7og2vh8xQavT8IXY
=oTlx
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-02-18 17:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 20:28 [U-Boot] [PATCH] CONFIG_BOOTDELAY default should not affect runtime Joe Hershberger
2013-02-09 6:54 ` Wolfgang Denk
2013-02-09 16:21 ` Otavio Salvador
2013-02-17 20:18 ` Wolfgang Denk
2013-02-17 20:33 ` Otavio Salvador
2013-02-17 21:02 ` Wolfgang Denk
2013-02-17 21:16 ` Otavio Salvador
2013-02-18 17:20 ` Tom Rini [this message]
2013-02-27 20:11 ` Joe Hershberger
2013-03-01 20:28 ` Tom Rini
2013-03-04 23:52 ` Joe Hershberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=512262E8.2000703@ti.com \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox