Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions app/aboot/aboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -4680,6 +4680,27 @@ void cmd_continue(const char *arg, void *data, unsigned sz)
}
}

#if WITH_LK2ND_BOOT
void cmd_continue_skip_lk2ndboot(const char *arg, void *data, unsigned sz)
{
fastboot_okay("");
fastboot_stop();

if (target_is_emmc_boot())
{
#if FBCON_DISPLAY_MSG
/* Exit keys' detection thread firstly */
exit_menu_keys_detection();
#endif
boot_linux_from_mmc();
}
else
{
boot_linux_from_flash();
}
}
#endif

void cmd_reboot(const char *arg, void *data, unsigned sz)
{
dprintf(INFO, "rebooting the device\n");
Expand Down
9 changes: 9 additions & 0 deletions lk2nd/device/menu/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

// Defined in app/aboot/aboot.c
extern void cmd_continue(const char *arg, void *data, unsigned sz);
#if WITH_LK2ND_BOOT
extern void cmd_continue_skip_lk2ndboot(const char *arg, void *data, unsigned sz);
#endif

#define FONT_WIDTH (5+1)
#define FONT_HEIGHT 12
Expand Down Expand Up @@ -122,6 +125,9 @@ static uint16_t wait_key(void)
#define str(s) #s

static void opt_continue(void) { cmd_continue(NULL, NULL, 0); }
#ifdef WITH_LK2ND_BOOT
static void opt_continue_skip_lk2nd(void) { cmd_continue_skip_lk2ndboot(NULL, NULL, 0); }
#endif
static void opt_reboot(void) { reboot_device(0); }
static void opt_recovery(void)
{
Expand All @@ -141,6 +147,9 @@ static struct {
} menu_options[] = {
{ " Reboot ", GREEN, opt_reboot },
{ " Continue ", WHITE, opt_continue },
#ifdef WITH_LK2ND_BOOT
{ "Skip lk2nd", WHITE, opt_continue_skip_lk2nd },
#endif
{ " Recovery ", ORANGE, opt_recovery },
{ "Bootloader", ORANGE, opt_bootloader },
{ " EDL ", RED, opt_edl },
Expand Down