uboot-2025: start httpd and glbtn at boot

This commit is contained in:
hanwckf
2025-08-21 12:55:12 +08:00
parent c2a4ac823b
commit fdca8cbf91

View File

@@ -14,6 +14,9 @@
#include <command.h> #include <command.h>
#include <console.h> #include <console.h>
#include <env.h> #include <env.h>
#ifdef CONFIG_CMD_GL_BTN
#include <glbtn.h>
#endif
#include <fdtdec.h> #include <fdtdec.h>
#include <init.h> #include <init.h>
#include <net.h> #include <net.h>
@@ -64,6 +67,22 @@ void main_loop(void)
process_button_cmds(); 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(); s = bootdelay_process();
if (cli_process_fdt(&s)) if (cli_process_fdt(&s))
cli_secure_boot_cmd(s); cli_secure_boot_cmd(s);