On 22/05/17 14:31, Amit Kucheria wrote:
Similarly it might be useful to have a couple of events nominated where we recommend a firmware level bootloader[1] change LED status. Some examples:
- Set USR1 on when bootloader starts up (a NOR/eMMC/SD is not empty light).
- Set USR3 on when entering fastboot mode (if supported)
- Set USR3 off when leaving fastboot mode, including via "fastboot boot" (if supported)
- Set USR1 off and USR2, 3 and 4 on if bootloader panics.
You want to create you own implementation of BIOS codes from the PC world :)
Unless, you make it mandatory though, they won't be reliably implemented across boards. And making them mandatory defeats the purpose of these being user LEDs. So I'm loathe to require this in the specs.
Do we currently formally recommend console on LS-UART1 for CE boards anywhere? I really consider this sort of thing as similar (essentially "arbitrary" choices that boards that we recommend as good practice).
Especially for CE board (where users often don't have a UART adapter) even the above simple hints that the bootloader has been fetched from somewhere is useful.
I know this can't be a rule, only "good advice" (like asking CE boards to put console on LS-UART1 if possible). However, is there any appetite to converge for the boards we have influence over?
IMHO, one could start by implementing a few of these suggestions for a board or two and get that merged into the relevant codebases. If there is enough traction perhaps we might start seeing convergence?
The list above *is* a description of the current Hikey UEFI behaviour (and I believe Hikey960 will eventually behave similarly) although I cannot tell by observation whether it is bootloader or kernel that causes USR1 to go out.
We could have something as elaborate as follows and document it in a wikipage for future boards, if needed (B=blink, DC=don't care):
USR1 USR2 USR3 USR4 Event
OFF B OFF B bootloader panic B B B B Transition from bootloader to kernel (blink at 2Hz for 2s?) OFF B B B kernel panic B DC DC DC heartbeat (1Hz, bootloader and kernel) DC B DC DC onboard storage i/o (1Hz, bootloader and kernel) DC DC B DC SD card i/o (1Hz, bootloader and kernel)
Bootloaders may not have timers required to blink anything (at least not whilst they are still doing something useful). Until the OS starts we need fire-and-forget actions (on/off/DC).
Getting even one board to do this might set the trend but I see it as a bunch of small projects for anybody in the community that'd like to get their hands dirty. Perhaps list it in the page the Robert is going to maintain for ideas on starter projects?
This was originally a user feature request: https://discuss.96boards.org/t/status-led-for-fastboot-mode-feature-request/...
I escalated here because so many boards suffer from "dark" boot sequences (even after hikey blazed a trail). Ultimately all the *implementers* have UART so unless they are told dark boot sequences are unnerving for users they never realize it.
Daniel.