Message ID | 20190315063834.3788-2-akihiro27.suzuki@toshiba.co.jp (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | Add a console option to the kernel command line | expand |
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
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@siemens.com] > Sent: Friday, March 15, 2019 6:17 PM > To: suzuki akihiro(鈴木 章浩 ○SWC□OST) > <akihiro27.suzuki@toshiba.co.jp>; cip-dev@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
On 18.03.19 06:55, akihiro27.suzuki@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
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
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
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(+)