优化了启动顺序和 storage使用不规范问题

This commit is contained in:
CSBOOK\44744
2026-06-28 18:57:02 +08:00
parent 104c3a10e0
commit 4c6bb66f7c
6 changed files with 46 additions and 773 deletions
@@ -26,6 +26,7 @@ static const char *TAG = "app_comp_boot";
typedef enum {
APP_COMPOSITION_BOOT_STAGE_POWER_HOLD = 1,
APP_COMPOSITION_BOOT_STAGE_STORAGE_PREPARE,
APP_COMPOSITION_BOOT_STAGE_AUDIO_INIT,
APP_COMPOSITION_BOOT_STAGE_BOOT_SOUND,
APP_COMPOSITION_BOOT_STAGE_AUDIO_READY,
@@ -33,7 +34,6 @@ typedef enum {
APP_COMPOSITION_BOOT_STAGE_LCD_RENDER_LOOP,
APP_COMPOSITION_BOOT_STAGE_PLATFORM_DOMAIN,
APP_COMPOSITION_BOOT_STAGE_TURNTABLE_CALIBRATION,
APP_COMPOSITION_BOOT_STAGE_STORAGE_PREPARE,
APP_COMPOSITION_BOOT_STAGE_WIFI_BOOTSTRAP,
APP_COMPOSITION_BOOT_STAGE_RUNTIME_WORKERS,
APP_COMPOSITION_BOOT_STAGE_NETWORK_SERVICES,
@@ -70,6 +70,15 @@ static esp_err_t app_composition_run_plan_a_boot_sequence(void)
"power_hold",
"already_asserted_by_platform_core");
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_STORAGE_PREPARE,
"storage_prepare",
"control_plane_prepare_runtime_storage");
esp_err_t err = control_plane_prepare_runtime_storage();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Runtime storage prepare failed: %s", esp_err_to_name(err));
return err;
}
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_AUDIO_INIT,
"audio_init",
"boot_sound_policy_begin");
@@ -124,7 +133,7 @@ static esp_err_t app_composition_run_plan_a_boot_sequence(void)
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_PLATFORM_DOMAIN,
"platform_domain",
"control_plane_init");
esp_err_t err = control_plane_init();
err = control_plane_init();
if (err != ESP_OK) {
ESP_LOGE(TAG, "control_plane_init failed: %s", esp_err_to_name(err));
return err;
@@ -157,15 +166,6 @@ static esp_err_t app_composition_run_plan_a_boot_sequence(void)
"disabled_by_config");
#endif
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_STORAGE_PREPARE,
"storage_prepare",
"control_plane_prepare_runtime_storage");
err = control_plane_prepare_runtime_storage();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Runtime storage prepare failed: %s", esp_err_to_name(err));
return err;
}
app_composition_log_stage(APP_COMPOSITION_BOOT_STAGE_WIFI_BOOTSTRAP,
"wifi_bootstrap",
"control_plane_bootstrap_connectivity");