Patchwork [1/1] runqemu-internal: add "console=ttyS0" to ramfs image kernel parameters

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date May 19, 2014, 8:03 a.m.
Message ID <3ca9244054e803966bbe4cccf29a1636b675a20d.1400486523.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/72351/
State Accepted
Commit cdaee026f5f957c0271c5ba146c1cee0866a9052
Headers show

Comments

Qi.Chen@windriver.com - May 19, 2014, 8:03 a.m.
We need this kernel command parameter so that when we start a ramfs
image, we can actually get some output. Although we can make this
happen by specifying the 'bootparams' for the 'runqemu' command, it's
better to make this the default behaviour.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 scripts/runqemu-internal |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Khem Raj - May 19, 2014, 9:11 p.m.
On Mon, May 19, 2014 at 1:03 AM, Chen Qi <Qi.Chen@windriver.com> wrote:
> +    KERNCMDLINE="root=/dev/ram0 console=ttyS0 debugshell"

is this valid for all kind of qemu machines ?
Qi.Chen@windriver.com - May 20, 2014, 1:56 a.m.
On 05/20/2014 05:11 AM, Khem Raj wrote:
> On Mon, May 19, 2014 at 1:03 AM, Chen Qi <Qi.Chen@windriver.com> wrote:
>> +    KERNCMDLINE="root=/dev/ram0 console=ttyS0 debugshell"
> is this valid for all kind of qemu machines ?
>
>

I think so.
Notice in runqemu scripts, if '-nographic' is supplied to the qemu 
command, then 'console=ttyS0' is supplied to the '-append' option. This 
is the behaviour for the 'nographic' parameter for the 'runqemu' 
command. The exception is the case of starting a ramfs image. And this 
patch fixes this.

Thanks,
Chen Qi

Patch

diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index d317dfd..38745dd 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -550,7 +550,7 @@  fi
 
 if [ "x$RAMFS" = "xtrue" ]; then
     QEMUOPTIONS="-initrd $ROOTFS -nographic"
-    KERNCMDLINE="root=/dev/ram0 debugshell"
+    KERNCMDLINE="root=/dev/ram0 console=ttyS0 debugshell"
 fi
 
 if [ "x$ISOFS" = "xtrue" ]; then