Skip to contentSkip to conversation

configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

PATCH New Bin Meng 4 participants 8 messages Mar 7, 2020 – Apr 21, 2020 RISC-V

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

Currently BR2_TARGET_GENERIC_GETTY_PORT is set to ttyS0 in both qemu_riscv32_virt and qemu_riscv64_virt defconfig files. This limits usecases when the same one rootfs could be used on QEMU 'sifive_u' machine and SiFive HiFive Unleashed board.

Remove it so that the default boot console can be used.

---

 configs/qemu_riscv32_virt_defconfig | 1 -
 configs/qemu_riscv64_virt_defconfig | 1 -
 2 files changed, 2 deletions(-)
configs/qemu_riscv32_virt_defconfig +0 -1
index 914eada..093d888 100644
@@ -5,7 +5,6 @@ BR2_RISCV_32=y
 # System
 BR2_SYSTEM_DHCP="eth0"
 BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_GLOBAL_PATCH_DIR="board/qemu/riscv32-virt/patches/"
 
 # Filesystem
configs/qemu_riscv64_virt_defconfig +0 -1
index 5c52f7a..54390fc 100644
@@ -5,7 +5,6 @@ BR2_RISCV_64=y
 # System
 BR2_SYSTEM_DHCP="eth0"
 BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/1 configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

Quoted 6 lines · Bin Meng

Currently BR2_TARGET_GENERIC_GETTY_PORT is set to ttyS0 in both qemu_riscv32_virt and qemu_riscv64_virt defconfig files. This limits usecases when the same one rootfs could be used on QEMU 'sifive_u' machine and SiFive HiFive Unleashed board.

Quoted 9 lines

Remove it so that the default boot console can be used.

---

 configs/qemu_riscv32_virt_defconfig | 1 -
 configs/qemu_riscv64_virt_defconfig | 1 -
 2 files changed, 2 deletions(-)

Ping?

author
#2 lore raw

PATCH 1/1 configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

Quoted 13 lines · Bin Meng
Quoted 11 lines · Bin Meng

Currently BR2_TARGET_GENERIC_GETTY_PORT is set to ttyS0 in both qemu_riscv32_virt and qemu_riscv64_virt defconfig files. This limits usecases when the same one rootfs could be used on QEMU 'sifive_u' machine and SiFive HiFive Unleashed board.

Remove it so that the default boot console can be used.

---

Quoted 6 lines
Quoted 4 lines
 configs/qemu_riscv32_virt_defconfig | 1 -
 configs/qemu_riscv64_virt_defconfig | 1 -
 2 files changed, 2 deletions(-)

Ping?

Ping again?

#3 lore raw

PATCH 1/1 configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

In reply to Bin Meng

Hi,

Le 07/03/2020 ? 13:20, Bin Meng a ?crit?:

Quoted 6 lines

Currently BR2_TARGET_GENERIC_GETTY_PORT is set to ttyS0 in both qemu_riscv32_virt and qemu_riscv64_virt defconfig files. This limits usecases when the same one rootfs could be used on QEMU 'sifive_u' machine and SiFive HiFive Unleashed board.

Remove it so that the default boot console can be used.

By doing this change, we need to check if -nographic is used to start qemu (so the serial port is the default console) or if console=ttyS0 is used in the kernel command line.

riscv32 and risc64 are both using -nographic to start Qemu.

Your use case is similar to the one from [1]

[1]
https://git.buildroot.net/buildroot/commit/?id=131300e6f1d0745a1455d246684550e6ecb68549

Best regards,
Romain

Quoted 33 lines

---

 configs/qemu_riscv32_virt_defconfig | 1 -
 configs/qemu_riscv64_virt_defconfig | 1 -
 2 files changed, 2 deletions(-)
configs/qemu_riscv32_virt_defconfig +0 -1
index 914eada..093d888 100644
@@ -5,7 +5,6 @@ BR2_RISCV_32=y
 # System
 BR2_SYSTEM_DHCP="eth0"
 BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_GLOBAL_PATCH_DIR="board/qemu/riscv32-virt/patches/"
 
 # Filesystem
configs/qemu_riscv64_virt_defconfig +0 -1
index 5c52f7a..54390fc 100644
@@ -5,7 +5,6 @@ BR2_RISCV_64=y
 # System
 BR2_SYSTEM_DHCP="eth0"
 BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
#4 lore raw

PATCH 1/1 configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

Romain, Bin, All,

On 2020-03-22 16:52 +0100, Romain Naour spake thusly:

Quoted 12 lines

Le 07/03/2020 ? 13:20, Bin Meng a ?crit?:

Quoted 6 lines

Currently BR2_TARGET_GENERIC_GETTY_PORT is set to ttyS0 in both qemu_riscv32_virt and qemu_riscv64_virt defconfig files. This limits usecases when the same one rootfs could be used on QEMU 'sifive_u' machine and SiFive HiFive Unleashed board.

Remove it so that the default boot console can be used.

By doing this change, we need to check if -nographic is used to start qemu (so the serial port is the default console) or if console=ttyS0 is used in the kernel command line.

Quoted 8 lines

riscv32 and risc64 are both using -nographic to start Qemu.

Your use case is similar to the one from [1]

[1]
https://git.buildroot.net/buildroot/commit/?id=131300e6f1d0745a1455d246684550e6ecb68549

Thanks Romain for this review (and for bringing me in!)

However, I disagree: these defconfig files are for qemu, not the real hardware.

Additionally, we do have a configuration for the hifive unleashed board already, hifive_unleashed_defconfig, which is what should be used for the real hardware.

Regards,
Yann E. MORIN.

Quoted 42 lines

Best regards,
Romain

Quoted 26 lines

---

 configs/qemu_riscv32_virt_defconfig | 1 -
 configs/qemu_riscv64_virt_defconfig | 1 -
 2 files changed, 2 deletions(-)
configs/qemu_riscv32_virt_defconfig +0 -1
index 914eada..093d888 100644
@@ -5,7 +5,6 @@ BR2_RISCV_32=y
 # System
 BR2_SYSTEM_DHCP="eth0"
 BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_GLOBAL_PATCH_DIR="board/qemu/riscv32-virt/patches/"
 
 # Filesystem
configs/qemu_riscv64_virt_defconfig +0 -0
index 5c52f7a..54390fc 100644

configs/qemu_riscv64_virt_defconfig BR2_RISCV_64=y · line 10

Quoted 7 lines
configs/qemu_riscv64_virt_defconfig +0 -1
@@ -5,7 +5,6 @@ BR2_RISCV_64=y
 # System
 BR2_SYSTEM_DHCP="eth0"
 BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/1 configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

Romain, Bin, All,

On 2020-03-22 17:01 +0100, Yann E. MORIN spake thusly:

Quoted 22 lines

On 2020-03-22 16:52 +0100, Romain Naour spake thusly:

Quoted 12 lines

Le 07/03/2020 ? 13:20, Bin Meng a ?crit?:

Quoted 6 lines

Currently BR2_TARGET_GENERIC_GETTY_PORT is set to ttyS0 in both qemu_riscv32_virt and qemu_riscv64_virt defconfig files. This limits usecases when the same one rootfs could be used on QEMU 'sifive_u' machine and SiFive HiFive Unleashed board.

Remove it so that the default boot console can be used.

By doing this change, we need to check if -nographic is used to start qemu (so the serial port is the default console) or if console=ttyS0 is used in the kernel command line.

Quoted 8 lines

riscv32 and risc64 are both using -nographic to start Qemu.

Your use case is similar to the one from [1]

[1]
https://git.buildroot.net/buildroot/commit/?id=131300e6f1d0745a1455d246684550e6ecb68549

Quoted 8 lines

Thanks Romain for this review (and for bringing me in!)

However, I disagree: these defconfig files are for qemu, not the real hardware.

Additionally, we do have a configuration for the hifive unleashed board already, hifive_unleashed_defconfig, which is what should be used for the real hardware.

Romain pointed out on IRC that this change is in fact dual-sided:

- it allows the generic riscv defconfigs to boot on the real hardware HiFive Unleashed board

- it allows the generic riscv defconfigs to boot on the emulated HiFive Unleashed board which is known to qemu as sifive_u.

Still, my position does not change: if one wants to boot something in the sifive_u which emulates a HiFive Unleashed board, then one better use the original hifive_unleashed_defconfig, rather than the generic riscv one.

Regards,
Yann E. MORIN.

Quoted 57 lines

Regards,
Yann E. MORIN.

Quoted 42 lines

Best regards,
Romain

Quoted 26 lines

---

 configs/qemu_riscv32_virt_defconfig | 1 -
 configs/qemu_riscv64_virt_defconfig | 1 -
 2 files changed, 2 deletions(-)
configs/qemu_riscv32_virt_defconfig +0 -1
index 914eada..093d888 100644
@@ -5,7 +5,6 @@ BR2_RISCV_32=y
 # System
 BR2_SYSTEM_DHCP="eth0"
 BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_GLOBAL_PATCH_DIR="board/qemu/riscv32-virt/patches/"
 
 # Filesystem
configs/qemu_riscv64_virt_defconfig +0 -0
index 5c52f7a..54390fc 100644

configs/qemu_riscv64_virt_defconfig BR2_RISCV_64=y · line 10

Quoted 7 lines
configs/qemu_riscv64_virt_defconfig +0 -1
@@ -5,7 +5,6 @@ BR2_RISCV_64=y
 # System
 BR2_SYSTEM_DHCP="eth0"
 BR2_TARGET_GENERIC_GETTY=y
-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
author
#6 lore raw

PATCH 1/1 configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

Hi Yann,

Quoted 31 lines · Yann E. MORIN

Romain, Bin, All,

On 2020-03-22 17:01 +0100, Yann E. MORIN spake thusly:

Quoted 27 lines

On 2020-03-22 16:52 +0100, Romain Naour spake thusly:

Quoted 12 lines

Le 07/03/2020 ? 13:20, Bin Meng a ?crit :

Quoted 6 lines

Currently BR2_TARGET_GENERIC_GETTY_PORT is set to ttyS0 in both qemu_riscv32_virt and qemu_riscv64_virt defconfig files. This limits usecases when the same one rootfs could be used on QEMU 'sifive_u' machine and SiFive HiFive Unleashed board.

Remove it so that the default boot console can be used.

By doing this change, we need to check if -nographic is used to start qemu (so the serial port is the default console) or if console=ttyS0 is used in the kernel command line.

Quoted 8 lines

riscv32 and risc64 are both using -nographic to start Qemu.

Your use case is similar to the one from [1]

[1]
https://git.buildroot.net/buildroot/commit/?id=131300e6f1d0745a1455d246684550e6ecb68549

Thanks Romain for this review (and for bringing me in!)

However, I disagree: these defconfig files are for qemu, not the real hardware.

I understand your points.

Quoted 8 lines
Quoted 3 lines

Additionally, we do have a configuration for the hifive unleashed board already, hifive_unleashed_defconfig, which is what should be used for the real hardware.

Romain pointed out on IRC that this change is in fact dual-sided:

- it allows the generic riscv defconfigs to boot on the real hardware HiFive Unleashed board

The changes wanted to make the rootfs be generic so that it can be reusable among all RISC-V targets. IMO QEMU RISC-V config is the best candidate to do such things.

Quoted 4 lines

- it allows the generic riscv defconfigs to boot on the emulated HiFive Unleashed board which is known to qemu as sifive_u.

That's correct.

Quoted 5 lines

Still, my position does not change: if one wants to boot something in the sifive_u which emulates a HiFive Unleashed board, then one better use the original hifive_unleashed_defconfig, rather than the generic riscv one.

The hifive_unleashed_defconfig can do something specific to one particular board (eg: generating a workable flash or SD card image), but the proposed change in this patch is for generic RISC-V boards' rootfs.

Regards,
Bin

#7 lore raw

PATCH 1/1 configs/qemu_riscv{32, 64}_virt_defconfig: Remove BR2_TARGET_GENERIC_GETTY_PORT

In reply to Bin Meng
Quoted 9 lines · On Sat, 7 Mar 2020 04:20:30 -0800 Bin Meng <[email protected]> wrote:

Currently BR2_TARGET_GENERIC_GETTY_PORT is set to ttyS0 in both qemu_riscv32_virt and qemu_riscv64_virt defconfig files. This limits usecases when the same one rootfs could be used on QEMU 'sifive_u' machine and SiFive HiFive Unleashed board.

Remove it so that the default boot console can be used.

---

Applied to master with a reworked commit log. Indeed, these options are not really needed, but the idea that these defconfigs should be used on other HW platforms than the Qemu emulation is not a good idea, as pointed out by other reviewers.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com