All of lore.kernel.org
 help / color / mirror / Atom feed
* [cip-dev] isar-cip-core: Fix lack of console option when starting qemu-amd64 with nographic
@ 2019-03-15  6:38 Akihiro Suzuki
  2019-03-15  6:38 ` [cip-dev] [PATCH] Add a console option to the kernel command line Akihiro Suzuki
  0 siblings, 1 reply; 10+ messages in thread
From: Akihiro Suzuki @ 2019-03-15  6:38 UTC (permalink / raw)
  To: cip-dev

I have added "console=ttyS0" to the kernel command line to be able to
see a serial output when starting qemu-amd64 with nographic.

  [PATCH] Add a console option to the kernel command line

I have already made a merge request in GitLab before sending this e-mail.
If it's not in line with the workflow of isar-cip-core, please close it.
<https://gitlab.com/cip-project/cip-core/isar-cip-core/merge_requests/1>

Best regards,
Suzuki

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH] Add a console option to the kernel command line
  2019-03-15  6:38 [cip-dev] isar-cip-core: Fix lack of console option when starting qemu-amd64 with nographic Akihiro Suzuki
@ 2019-03-15  6:38 ` Akihiro Suzuki
  2019-03-15  9:17   ` Jan Kiszka
  0 siblings, 1 reply; 10+ messages in thread
From: Akihiro Suzuki @ 2019-03-15  6:38 UTC (permalink / raw)
  To: cip-dev

This option is required when starting qemu-amd64 with nographic.

Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@toshiba.co.jp>
---
 start-qemu.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/start-qemu.sh b/start-qemu.sh
index b71ba32..52498fa 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -79,6 +79,7 @@ INITRD_FILE=$(ls ${IMAGE_PREFIX}.initrd.img* | tail -1)
 
 if [ -z "${DISPLAY}" ]; then
 	QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} -nographic"
+	KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
 fi
 
 shift 1
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH] Add a console option to the kernel command line
  2019-03-15  6:38 ` [cip-dev] [PATCH] Add a console option to the kernel command line Akihiro Suzuki
@ 2019-03-15  9:17   ` Jan Kiszka
  2019-03-18  5:55     ` akihiro27.suzuki at toshiba.co.jp
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Kiszka @ 2019-03-15  9:17 UTC (permalink / raw)
  To: cip-dev

On 15.03.19 07:38, Akihiro Suzuki wrote:
> This option is required when starting qemu-amd64 with nographic.
> 
> Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@toshiba.co.jp>
> ---
>   start-qemu.sh | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/start-qemu.sh b/start-qemu.sh
> index b71ba32..52498fa 100755
> --- a/start-qemu.sh
> +++ b/start-qemu.sh
> @@ -79,6 +79,7 @@ INITRD_FILE=$(ls ${IMAGE_PREFIX}.initrd.img* | tail -1)
>   
>   if [ -z "${DISPLAY}" ]; then
>   	QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} -nographic"
> +	KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
>   fi
>   
>   shift 1
> 

Valid point. But I think this should rather go to the original, per-target 
definition of KERNEL_CMDLINE. And we can make it unconditional, ie. provide a 
uart console independent of DISPLAY settings. That's how it is on ARM[64] already.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH] Add a console option to the kernel command line
  2019-03-15  9:17   ` Jan Kiszka
@ 2019-03-18  5:55     ` akihiro27.suzuki at toshiba.co.jp
  2019-03-18  6:22       ` Jan Kiszka
  0 siblings, 1 reply; 10+ messages in thread
From: akihiro27.suzuki at toshiba.co.jp @ 2019-03-18  5:55 UTC (permalink / raw)
  To: cip-dev

Hi Jan,

I agree with your opinion.
We have to be able to use a uart console even if DISPLAY has a value.

But I couldn't understand the statement of "That's how it is on ARM[64] already".
Could you explain it in more detail?
Do you mean that, on ARM[64], we don't have to add console option to KERNEL_CMDLINE
on current start-qemu.sh?

Best regards,
Suzuki


> -----Original Message-----
> From: Jan Kiszka [mailto:jan.kiszka at siemens.com]
> Sent: Friday, March 15, 2019 6:17 PM
> To: suzuki akihiro(?? ?? ????????)
> <akihiro27.suzuki@toshiba.co.jp>; cip-dev at lists.cip-project.org
> Subject: Re: [cip-dev] [PATCH] Add a console option to the kernel command
> line
> 
> On 15.03.19 07:38, Akihiro Suzuki wrote:
> > This option is required when starting qemu-amd64 with nographic.
> >
> > Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@toshiba.co.jp>
> > ---
> >   start-qemu.sh | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/start-qemu.sh b/start-qemu.sh
> > index b71ba32..52498fa 100755
> > --- a/start-qemu.sh
> > +++ b/start-qemu.sh
> > @@ -79,6 +79,7 @@ INITRD_FILE=$(ls ${IMAGE_PREFIX}.initrd.img* | tail
> -1)
> >
> >   if [ -z "${DISPLAY}" ]; then
> >   	QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} -nographic"
> > +	KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
> >   fi
> >
> >   shift 1
> >
> 
> Valid point. But I think this should rather go to the original, per-target
> definition of KERNEL_CMDLINE. And we can make it unconditional, ie.
> provide a
> uart console independent of DISPLAY settings. That's how it is on ARM[64]
> already.
> 
> Jan
> 
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH] Add a console option to the kernel command line
  2019-03-18  5:55     ` akihiro27.suzuki at toshiba.co.jp
@ 2019-03-18  6:22       ` Jan Kiszka
  2019-04-03  8:33         ` [cip-dev] [PATCH v2 isar-cip-core/master] start-qemu.sh: Set console when using qemu-amd64 with nographic Akihiro Suzuki
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Kiszka @ 2019-03-18  6:22 UTC (permalink / raw)
  To: cip-dev

On 18.03.19 06:55, akihiro27.suzuki at toshiba.co.jp wrote:
> Hi Jan,
> 
> I agree with your opinion.
> We have to be able to use a uart console even if DISPLAY has a value.
> 
> But I couldn't understand the statement of "That's how it is on ARM[64] already".
> Could you explain it in more detail?
> Do you mean that, on ARM[64], we don't have to add console option to KERNEL_CMDLINE
> on current start-qemu.sh?

On ARM, QEMU ensures that the guest uses the UART by injecting this as console 
into its device tree. This mechanism is not available on the x86 boot, therefore 
we need to set this on the command line.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH v2 isar-cip-core/master] start-qemu.sh: Set console when using qemu-amd64 with nographic
  2019-03-18  6:22       ` Jan Kiszka
@ 2019-04-03  8:33         ` Akihiro Suzuki
  2019-04-03  8:33           ` [cip-dev] [PATCH] " Akihiro Suzuki
  0 siblings, 1 reply; 10+ messages in thread
From: Akihiro Suzuki @ 2019-04-03  8:33 UTC (permalink / raw)
  To: cip-dev

Hi Jan,

Sorry for my late reply.

I have created a new patch.
After applying the patch, "console=ttyS0" is added to KERNEL_CMDLINE
only when you use qemu-system-x86_64 with "-nographic" option.

Best regards,
Suzuki

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH] start-qemu.sh: Set console when using qemu-amd64 with nographic
  2019-04-03  8:33         ` [cip-dev] [PATCH v2 isar-cip-core/master] start-qemu.sh: Set console when using qemu-amd64 with nographic Akihiro Suzuki
@ 2019-04-03  8:33           ` Akihiro Suzuki
  2019-04-03  9:14             ` Jan Kiszka
  0 siblings, 1 reply; 10+ messages in thread
From: Akihiro Suzuki @ 2019-04-03  8:33 UTC (permalink / raw)
  To: cip-dev

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}
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH] start-qemu.sh: Set console when using qemu-amd64 with nographic
  2019-04-03  8:33           ` [cip-dev] [PATCH] " Akihiro Suzuki
@ 2019-04-03  9:14             ` Jan Kiszka
  2019-04-03  9:54               ` akihiro27.suzuki at toshiba.co.jp
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Kiszka @ 2019-04-03  9:14 UTC (permalink / raw)
  To: cip-dev

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH] start-qemu.sh: Set console when using qemu-amd64 with nographic
  2019-04-03  9:14             ` Jan Kiszka
@ 2019-04-03  9:54               ` akihiro27.suzuki at toshiba.co.jp
  2019-04-03 16:01                 ` Jan Kiszka
  0 siblings, 1 reply; 10+ messages in thread
From: akihiro27.suzuki at toshiba.co.jp @ 2019-04-03  9:54 UTC (permalink / raw)
  To: cip-dev

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 at siemens.com]
> Sent: Wednesday, April 03, 2019 6:15 PM
> To: suzuki akihiro(?? ?? ????????) <akihiro27.suzuki@toshiba.co.jp>
> Cc: cip-dev at 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [cip-dev] [PATCH] start-qemu.sh: Set console when using qemu-amd64 with nographic
  2019-04-03  9:54               ` akihiro27.suzuki at toshiba.co.jp
@ 2019-04-03 16:01                 ` Jan Kiszka
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Kiszka @ 2019-04-03 16:01 UTC (permalink / raw)
  To: cip-dev

On 03.04.19 11:54, akihiro27.suzuki at 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

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-04-03 16:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-15  6:38 [cip-dev] isar-cip-core: Fix lack of console option when starting qemu-amd64 with nographic Akihiro Suzuki
2019-03-15  6:38 ` [cip-dev] [PATCH] Add a console option to the kernel command line Akihiro Suzuki
2019-03-15  9:17   ` Jan Kiszka
2019-03-18  5:55     ` akihiro27.suzuki at toshiba.co.jp
2019-03-18  6:22       ` Jan Kiszka
2019-04-03  8:33         ` [cip-dev] [PATCH v2 isar-cip-core/master] start-qemu.sh: Set console when using qemu-amd64 with nographic Akihiro Suzuki
2019-04-03  8:33           ` [cip-dev] [PATCH] " Akihiro Suzuki
2019-04-03  9:14             ` Jan Kiszka
2019-04-03  9:54               ` akihiro27.suzuki at toshiba.co.jp
2019-04-03 16:01                 ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.