[PATCH] usb: Make what it takes for "usbkbd" to work in "stdin" clear
Marek Vasut
marex at denx.de
Tue Jan 28 02:47:59 CET 2025
On 1/28/25 12:22 AM, Dragan Simic wrote:
[...]
>>> Maybe another good option would be to modify the console_init_r()
>>> function to simply leave "usbkbd" in the environment variables when
>>> USB_KEYBOARD is selected, so the "usb start" executed later can
>>> actually make USB keyboards work? I think such an approach should
>>> have the lowest potential for causing some issues or regressions,
>>> while it would pretty much eliminate any confusion.
>>
>> Yes, this looks like the best option, because if 'usbkbd' is in
>> 'stdin' environment variable, the user likely expects the USB keyboard
>> will show up later, but it is not available this early yet and
>> removing it from stdin variable would be unhelpful.
>>
>> Please also update SYS_CONSOLE_ENV_OVERWRITE Kconfig symbol
>> description to reflect this change .
>
> I'm glad that you like it, I'll move forward with that approach.
>
> I was also thinking about making sure that "usbkbd" gets removed
> from the "stdin" environment variable if there are actually no USB
> keyboards detected during the "usb start", but that would actually
> be wrong, because a USB keyboard should be detected after being
> plugged in (in interactive mode, of course) after "usb start" is
> executed, followed by executing "usb reset" on the UART console.
That would also be problematic in case the keyboard would not be
detected on first 'usb start' run, but it would be detected afterward,
on the next 'usb start/reset' run.
Thanks
More information about the U-Boot
mailing list