Question

To stop autoboot we have 2 ifdef (CONFIG_AUTOBOOT_STOP_ [STR2 || STR1] ). Which is very easy and straightforward to implement. Halting a boot with single “Keystroke” or with a pharase is having its own advantages to the user. But, why contole key support is ignored say like [ctrl + anykey ] combination. Especially, BIOS vendors prefer at least simultaneous pressing of 2 or more keys to halt the boot. Any specific reasons to avoid this. Other than simplicity is there any specific reason to stick on this.

Was it helpful?

Solution

The CTRL key is a modifier. And CTRL+KEY combos register as normal KEY press event with additional flags set to indicate the status of modifier keys. Read about modifiers in keyboard drivers in the Linux kernel keyboard driver documentation.

Also check this excellent article on how keyboards work.

Handling all the modifiers requires additional complexity in the code. Bootloaders run in a severely constrained environment. Especially on embedded systems(which u-boot is meant for), it is very common to expect the entire u-boot to load and run within 64/128K of RAM (the binary + stack).

Considering the fact that we have >50 unique keys on our keyboards to bang before we require using modifiers, software support for them is usually not implemented in u-boot.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top