diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-04-10 13:50:29 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-04-10 14:09:40 -0700 |
commit | 322eebbae40c6e4450ab4867de31d56e37471436 (patch) | |
tree | 22957b3bdd4eef72730bb36a6b1aebd4b3a39002 /common/main.c | |
parent | eac723c3e5567a8c968e25773da9875bd1e66e1e (diff) | |
download | chrome-ec-322eebbae40c6e4450ab4867de31d56e37471436.tar.gz |
Add fake developer switch
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8884
TEST=manual
optget fake_dev_switch --> 0
optset fake_dev_switch 1
optget fake_dev_switch --> 1
optset fake_dev_switch 0
optget fake_dev_switch --> 0
Reboot by holding ESC+D and tapping power
optget fake_dev_switch --> 1
Reboot by holding ESC+F and tapping power
optget fake_dev_switch --> 0
Change-Id: Iccb3bc8b3d571e551e204892769efc4161858055
Diffstat (limited to 'common/main.c')
-rw-r--r-- | common/main.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/common/main.c b/common/main.c index 52c26c2cc9..95a0298a4b 100644 --- a/common/main.c +++ b/common/main.c @@ -12,6 +12,7 @@ #include "config.h" #include "console.h" #include "eeprom.h" +#include "eoption.h" #include "flash.h" #include "gpio.h" #include "i2c.h" @@ -89,17 +90,24 @@ int main(void) timer_init(); /* Verified boot needs to read the initial keyboard state and EEPROM - * contents. */ -#ifdef CONFIG_TASK_KEYSCAN - keyboard_scan_init(); -#endif + * contents. EEPROM must be up first, so keyboard_scan can toggle + * debugging settings via keys held at boot. */ #ifdef CONFIG_EEPROM eeprom_init(); #endif +#ifdef CONFIG_EOPTION + eoption_init(); +#endif +#ifdef CONFIG_TASK_KEYSCAN + keyboard_scan_init(); +#endif /* Verified boot initialization. This may jump to another image, which * will need to reconfigure / reinitialize the system, so as little as - * possible should be done above this step. */ + * possible should be done above this step. + * + * Note that steps above here may be done TWICE per boot, once in the + * RO image and once in the RW image. */ vboot_init(); system_init(); |