add support for failsafe boot via env (#62)

To use it in openwrt, run: fw_setenv failsafe 1
This commit is contained in:
Shuanglei Tao
2024-06-17 19:08:39 +08:00
committed by GitHub
parent 6f1582df4d
commit d74880eccc
2 changed files with 16 additions and 0 deletions

View File

@@ -60,6 +60,14 @@ void main_loop(void)
efi_launch_capsules();
}
if (env_get("failsafe") != NULL) {
env_set("failsafe", NULL);
env_save();
led_control("led", "system_led", "on");
run_command("httpd", 0);
}
run_command("glbtn", 0);
s = bootdelay_process();

View File

@@ -61,6 +61,14 @@ void main_loop(void)
efi_launch_capsules();
}
if (env_get("failsafe") != NULL) {
env_set("failsafe", NULL);
env_save();
led_control("led", "system_led", "on");
run_command("httpd", 0);
}
run_command("glbtn", 0);
s = bootdelay_process();