diff mbox series

start-qemu.sh: Set console when using qemu-amd64 with nographic

Message ID 20190403083323.21613-2-akihiro27.suzuki@toshiba.co.jp (mailing list archive)
State Accepted
Headers show
Series start-qemu.sh: Set console when using qemu-amd64 with nographic | expand

Commit Message

Akihiro Suzuki April 3, 2019, 8:33 a.m. UTC
Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@toshiba.co.jp>
---
 start-qemu.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Jan Kiszka April 3, 2019, 9:14 a.m. UTC | #1
On 03.04.19 10:33, Akihiro Suzuki wrote:
> Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@toshiba.co.jp>
> ---
>  start-qemu.sh | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/start-qemu.sh b/start-qemu.sh
> index b71ba32..46b7961 100755
> --- a/start-qemu.sh
> +++ b/start-qemu.sh
> @@ -83,8 +83,15 @@ fi
>  
>  shift 1
>  
> +QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} $@"
> +if [ -n "`echo ${QEMU_EXTRA_ARGS} | grep -- -nographic`" ]; then
> +	if [ ${DISTRO_ARCH} = "amd64" ]; then
> +		KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
> +	fi
> +fi
> +
>  ${QEMU_PATH}${QEMU} \
>  	-drive file=${IMAGE_FILE},discard=unmap,if=none,id=disk,format=raw \
>  	-m 1G -serial mon:stdio -netdev user,id=net \
>  	-kernel ${KERNEL_FILE} -append "${KERNEL_CMDLINE}" \
> -	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS} "$@"
> +	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS}
> 

This is not what I meant. I was rather thinking of

diff --git a/start-qemu.sh b/start-qemu.sh
index b71ba32..62522db 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -32,7 +32,7 @@ case "$1" in
 			-device ide-hd,drive=disk \
 			-device virtio-net-pci,netdev=net"
 		KERNEL_CMDLINE=" \
-			root=/dev/sda vga=0x305"
+			root=/dev/sda vga=0x305 console=ttyS0"
 		;;
 	arm64|aarch64)
 		DISTRO_ARCH=arm64


As mentioned before, there is no reason to confine this to -nographic
mode.

Jan
Akihiro Suzuki April 3, 2019, 9:54 a.m. UTC | #2
Hi Jan,

> > Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@toshiba.co.jp>
> > ---
> >  start-qemu.sh | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/start-qemu.sh b/start-qemu.sh
> > index b71ba32..46b7961 100755
> > --- a/start-qemu.sh
> > +++ b/start-qemu.sh
> > @@ -83,8 +83,15 @@ fi
> >
> >  shift 1
> >
> > +QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} $@"
> > +if [ -n "`echo ${QEMU_EXTRA_ARGS} | grep -- -nographic`" ]; then
> > +	if [ ${DISTRO_ARCH} = "amd64" ]; then
> > +		KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
> > +	fi
> > +fi
> > +
> >  ${QEMU_PATH}${QEMU} \
> >  	-drive file=${IMAGE_FILE},discard=unmap,if=none,id=disk,format=raw \
> >  	-m 1G -serial mon:stdio -netdev user,id=net \
> >  	-kernel ${KERNEL_FILE} -append "${KERNEL_CMDLINE}" \
> > -	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS} "$@"
> > +	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS}
> >
> 
> This is not what I meant. I was rather thinking of
> 
> diff --git a/start-qemu.sh b/start-qemu.sh
> index b71ba32..62522db 100755
> --- a/start-qemu.sh
> +++ b/start-qemu.sh
> @@ -32,7 +32,7 @@ case "$1" in
>  			-device ide-hd,drive=disk \
>  			-device virtio-net-pci,netdev=net"
>  		KERNEL_CMDLINE=" \
> -			root=/dev/sda vga=0x305"
> +			root=/dev/sda vga=0x305 console=ttyS0"
>  		;;
>  	arm64|aarch64)
>  		DISTRO_ARCH=arm64
> 
> 
> As mentioned before, there is no reason to confine this to -nographic
> mode.

I'm sorry, I misunderstood.
The changes you have shown are enough to solve the issue.
Could you commit and push it for me instead?

Best regards,
Suzuki

> -----Original Message-----
> From: Jan Kiszka [mailto:jan.kiszka@siemens.com]
> Sent: Wednesday, April 03, 2019 6:15 PM
> To: suzuki akihiro(鈴木 章浩 ○SWC□OST) <akihiro27.suzuki@toshiba.co.jp>
> Cc: cip-dev@lists.cip-project.org
> Subject: Re: [PATCH] start-qemu.sh: Set console when using qemu-amd64 with nographic
> 
> On 03.04.19 10:33, Akihiro Suzuki wrote:
> > Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@toshiba.co.jp>
> > ---
> >  start-qemu.sh | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/start-qemu.sh b/start-qemu.sh
> > index b71ba32..46b7961 100755
> > --- a/start-qemu.sh
> > +++ b/start-qemu.sh
> > @@ -83,8 +83,15 @@ fi
> >
> >  shift 1
> >
> > +QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} $@"
> > +if [ -n "`echo ${QEMU_EXTRA_ARGS} | grep -- -nographic`" ]; then
> > +	if [ ${DISTRO_ARCH} = "amd64" ]; then
> > +		KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
> > +	fi
> > +fi
> > +
> >  ${QEMU_PATH}${QEMU} \
> >  	-drive file=${IMAGE_FILE},discard=unmap,if=none,id=disk,format=raw \
> >  	-m 1G -serial mon:stdio -netdev user,id=net \
> >  	-kernel ${KERNEL_FILE} -append "${KERNEL_CMDLINE}" \
> > -	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS} "$@"
> > +	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS}
> >
> 
> This is not what I meant. I was rather thinking of
> 
> diff --git a/start-qemu.sh b/start-qemu.sh
> index b71ba32..62522db 100755
> --- a/start-qemu.sh
> +++ b/start-qemu.sh
> @@ -32,7 +32,7 @@ case "$1" in
>  			-device ide-hd,drive=disk \
>  			-device virtio-net-pci,netdev=net"
>  		KERNEL_CMDLINE=" \
> -			root=/dev/sda vga=0x305"
> +			root=/dev/sda vga=0x305 console=ttyS0"
>  		;;
>  	arm64|aarch64)
>  		DISTRO_ARCH=arm64
> 
> 
> As mentioned before, there is no reason to confine this to -nographic
> mode.
> 
> Jan
> 
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
Jan Kiszka April 3, 2019, 4:01 p.m. UTC | #3
On 03.04.19 11:54, akihiro27.suzuki@toshiba.co.jp wrote:
> Hi Jan,
> 
>>> Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@toshiba.co.jp>
>>> ---
>>>   start-qemu.sh | 9 ++++++++-
>>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/start-qemu.sh b/start-qemu.sh
>>> index b71ba32..46b7961 100755
>>> --- a/start-qemu.sh
>>> +++ b/start-qemu.sh
>>> @@ -83,8 +83,15 @@ fi
>>>
>>>   shift 1
>>>
>>> +QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} $@"
>>> +if [ -n "`echo ${QEMU_EXTRA_ARGS} | grep -- -nographic`" ]; then
>>> +	if [ ${DISTRO_ARCH} = "amd64" ]; then
>>> +		KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
>>> +	fi
>>> +fi
>>> +
>>>   ${QEMU_PATH}${QEMU} \
>>>   	-drive file=${IMAGE_FILE},discard=unmap,if=none,id=disk,format=raw \
>>>   	-m 1G -serial mon:stdio -netdev user,id=net \
>>>   	-kernel ${KERNEL_FILE} -append "${KERNEL_CMDLINE}" \
>>> -	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS} "$@"
>>> +	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS}
>>>
>>
>> This is not what I meant. I was rather thinking of
>>
>> diff --git a/start-qemu.sh b/start-qemu.sh
>> index b71ba32..62522db 100755
>> --- a/start-qemu.sh
>> +++ b/start-qemu.sh
>> @@ -32,7 +32,7 @@ case "$1" in
>>   			-device ide-hd,drive=disk \
>>   			-device virtio-net-pci,netdev=net"
>>   		KERNEL_CMDLINE=" \
>> -			root=/dev/sda vga=0x305"
>> +			root=/dev/sda vga=0x305 console=ttyS0"
>>   		;;
>>   	arm64|aarch64)
>>   		DISTRO_ARCH=arm64
>>
>>
>> As mentioned before, there is no reason to confine this to -nographic
>> mode.
> 
> I'm sorry, I misunderstood.
> The changes you have shown are enough to solve the issue.
> Could you commit and push it for me instead?

Sure, patch pushed into next branch.

Jan
diff mbox series

Patch

diff --git a/start-qemu.sh b/start-qemu.sh
index b71ba32..46b7961 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -83,8 +83,15 @@  fi
 
 shift 1
 
+QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} $@"
+if [ -n "`echo ${QEMU_EXTRA_ARGS} | grep -- -nographic`" ]; then
+	if [ ${DISTRO_ARCH} = "amd64" ]; then
+		KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
+	fi
+fi
+
 ${QEMU_PATH}${QEMU} \
 	-drive file=${IMAGE_FILE},discard=unmap,if=none,id=disk,format=raw \
 	-m 1G -serial mon:stdio -netdev user,id=net \
 	-kernel ${KERNEL_FILE} -append "${KERNEL_CMDLINE}" \
-	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS} "$@"
+	-initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS}