firmware/2lib: Add visual/audio error handling

Adding an enum parameter to vb2ex_display_ui to facilitate printing
errors to the screen.  Currently, errors are only printed to the
serial console. Also adding in beep if an error is displayed.

TEST=Boot into dev warning screen and try to hit ctrl-u when no USB is
     plugged in.  Ensure error beep occurs.
     Ensure in dev mode.  Boot into recovery and press ctrl-d.
     Ensure that error message is printed to the screen and beep occurs.
     make runtests

Cq-Depend: chromium:2243513
Change-Id: I548d624532ad8816497c37a726275b33171e28dc
Signed-off-by: Shelley Chen <>
Tested-by: Shelley Chen <>
Reviewed-by: Yu-Ping Wu <>
Commit-Queue: Shelley Chen <>
7 files changed