Re: [PATCH / RFC] PowerPC: boot: Parse chosen/cmdline-timeout parameter
From: Grant Likely <hidden>
Date: 2014-09-09 14:05:22
On Tue, Sep 9, 2014 at 3:01 PM, Simon K=E5gstr=F6m [off-list ref] 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 =3D "console=3DttyUL0 root=3D/dev/ram0";
linux,stdout-path =3D "/plb@0/serial@46000000";
cmdline-timeout =3D <100>;
} ;
Signed-off-by: Simon Kagstrom <redacted>
---
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=
)
quoted hunk ↗ jump to hunk
{ int timer =3D 0, count; char ch, *cp;@@ -44,7 +44,7 @@ static void serial_edit_cmdline(char *buf, int len) cp =3D &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.