diff --git a/uboot-mtk-20250711/common/main.c b/uboot-mtk-20250711/common/main.c index b0b6e74f5..3693871ff 100644 --- a/uboot-mtk-20250711/common/main.c +++ b/uboot-mtk-20250711/common/main.c @@ -14,6 +14,9 @@ #include #include #include +#ifdef CONFIG_CMD_GL_BTN +#include +#endif #include #include #include @@ -64,6 +67,22 @@ void main_loop(void) process_button_cmds(); +#ifdef CONFIG_MTK_HTTPD + if (env_get("failsafe") != NULL) { + env_set("failsafe", NULL); + env_save(); + +#ifdef CONFIG_CMD_GL_BTN + led_control("led", "system_led", "on"); +#endif /* CONFIG_CMD_GL_BTN */ + run_command("httpd", 0); + } +#endif /* CONFIG_MTK_HTTPD */ + +#ifdef CONFIG_CMD_GL_BTN + run_command("glbtn", 0); +#endif + s = bootdelay_process(); if (cli_process_fdt(&s)) cli_secure_boot_cmd(s);