[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiple console support in d-i



On Wed, 2019-01-23 at 03:41 +0000, Wookey wrote:
> You are right. I wasn't taking note of those:
> 
> E=enabled
> C=preferred console
> p=used for printk buffer
> a=safe to use when CPU is offline
> 
> console=tty0
> tty0                 -WU (EC p  )    4:7
> ttyAMA0              -W- (E  p a)  204:64
> 
> console=ttyAMA0
> tty0                 -WU (E  p  )    4:7
> ttyAMA0              -W- (EC p a)  204:64
> 
> console=tty0 console=ttyAMA0
> tty0                 -WU (E  p  )    4:7
> ttyAMA0              -W- (E  p a)  204:64
> 
> Any idea how we should choose a D-I primary console when none of them
> is marked 'preferred'? Or should D-i do away with the concept and try
> to treat them all equally (which is a slightly more intrusive
> change).
> 
> Currently I use the one marked 'C' or the last one if none.

I wonder if the lack of a 'C' in the final entry is considered a bug?

Looking at the kernel code I see:

   fs/proc/consoles.c:             { CON_CONSDEV,          'C' },

where CON_CONSDEV is:

   include/linux/console.h:#define CON_CONSDEV     (2) /* Last on the command line */

So it being lacking on ttyAMA0 in that case seems wrong.

Even if the bug were fixed it seems sensible to deal with this case,
last one (with sufficient other flags set) seems like as good as
anything...

Ian.


Reply to: