[PATCH / RFC] PowerPC: boot: Parse chosen/cmdline-timeout parameter

Grant Likely grant.likely at linaro.org
Wed Sep 10 00:05:00 EST 2014


On Tue, Sep 9, 2014 at 3:01 PM, Simon Kågström
<simon.kagstrom at netinsight.net> wrote:
> A 5 second timeout during boot might be too long, so make it
> configurable.
>
> The property is added to the chosen node, e.g.,
>
>         chosen {
>                 bootargs = "console=ttyUL0 root=/dev/ram0";
>                 linux,stdout-path = "/plb at 0/serial at 46000000";
>                 cmdline-timeout = <100>;
>         } ;
>
>
> Signed-off-by: Simon Kagstrom <simon.kagstrom at netinsight.net>
> ---
>
> We build a simpleImage for a Virtex 4 PPC405 target, and the
> delay-for-command-line-edits is a significant part of the total boot
> time.
>
> Questions (apart from the patch in general):
>
> - Should the property be in the chosen node?
yes

>
> - Naming of the property?

Use a 'linux,' prefix. "linux,cmdline-timeout"


> -static void serial_edit_cmdline(char *buf, int len)
> +static void serial_edit_cmdline(char *buf, int len, unsigned int timeout)
>  {
>         int timer = 0, count;
>         char ch, *cp;
> @@ -44,7 +44,7 @@ static void serial_edit_cmdline(char *buf, int len)
>         cp = &buf[count];
>         count++;
>
> -       while (timer++ < 5*1000) {
> +       while (timer++ < timeout) {

Perhaps allow the loop to go through at least once so that the editor
can be broken into by holding down a key.

g.


More information about the Linuxppc-dev mailing list