[aboot] unless cancelled with 'back' key, default to booting from flash

This commit is contained in:
Dima Zavin
2009-01-26 16:36:57 -08:00
committed by Brian Swetland
parent d6455cda90
commit b42836029f

View File

@@ -39,6 +39,7 @@
#include <dev/flash.h>
#include <lib/ptable.h>
#include <dev/keys.h>
#include "bootimg.h"
#include "fastboot.h"
@@ -289,6 +290,14 @@ void cmd_continue(const char *arg, void *data, unsigned sz)
void aboot_init(const struct app_descriptor *app)
{
if (keys_get_state(KEY_BACK) != 0)
goto fastboot;
boot_linux_from_flash();
dprintf(CRITICAL, "ERROR: Could not do normal boot. Reverting "
"to fastboot mode.\n");
fastboot:
udc_init(&surf_udc_device);
fastboot_register("boot", cmd_boot);