** Description changed:

  When booting on SiFive boards, there are two gettys launched on the same
  console.
  
  There is sifive serial console which is the active/only physical
  console.
  
  But also, there is serial console exposed over legacy opensbi extension;
  which in linux kernel is implemented as hvc0 console, which systemd
  starts getty for.
  
  The issue is that the both consoles are actually the same one.
  
  Thus some other distros chose to hard-code disable hvc0 console on
  riscv64.
  
  But given that the legacy sbi serial console extension will eventually
  go away, it makes sense to disable that in the kernel out right.
  
  By setting:
  
  +# CONFIG_RISCV_SBI_V01 is not set
  +# CONFIG_SERIAL_EARLYCON_RISCV_SBI is not set
  +# CONFIG_HVC_RISCV_SBI is not set
  
  This way sifive0 console will be discovered and used automatically;
  ditto earlyprintk without needing to specify sbi or explicitely set
  sifive0 console.
  
  This will also improve UX experience with just a single getty on the
  serial connection.
+ 
+ Before the patch is applied:
+ # ls /run/systemd/generator/getty.target.wants/
+ serial-getty@hvc0.service  serial-getty@ttySIF0.service
+ 
+ After the patch is applied:
+ $ sudo ls /run/systemd/generator/getty.target.wants/
+ serial-getty@ttySIF0.service

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-riscv in Ubuntu.
https://bugs.launchpad.net/bugs/1923084

Title:
  duplicate consoles on riscv64

Status in linux-riscv package in Ubuntu:
  Confirmed

Bug description:
  When booting on SiFive boards, there are two gettys launched on the
  same console.

  There is sifive serial console which is the active/only physical
  console.

  But also, there is serial console exposed over legacy opensbi
  extension; which in linux kernel is implemented as hvc0 console, which
  systemd starts getty for.

  The issue is that the both consoles are actually the same one.

  Thus some other distros chose to hard-code disable hvc0 console on
  riscv64.

  But given that the legacy sbi serial console extension will eventually
  go away, it makes sense to disable that in the kernel out right.

  By setting:

  +# CONFIG_RISCV_SBI_V01 is not set
  +# CONFIG_SERIAL_EARLYCON_RISCV_SBI is not set
  +# CONFIG_HVC_RISCV_SBI is not set

  This way sifive0 console will be discovered and used automatically;
  ditto earlyprintk without needing to specify sbi or explicitely set
  sifive0 console.

  This will also improve UX experience with just a single getty on the
  serial connection.

  Before the patch is applied:
  # ls /run/systemd/generator/getty.target.wants/
  serial-getty@hvc0.service  serial-getty@ttySIF0.service

  After the patch is applied:
  $ sudo ls /run/systemd/generator/getty.target.wants/
  serial-getty@ttySIF0.service

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-riscv/+bug/1923084/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to