Skip to content

Commit

Permalink
app: aboot: Initialize lk2nd before display
Browse files Browse the repository at this point in the history
Run lk2nd_init() before display initialization so it can still
influence the way the display gets enabled. Add a check if the serialno
is already populated since it's sometimes initialized already by lk2nd.
  • Loading branch information
stephan-gh committed Sep 10, 2023
1 parent ee60a2b commit 4d2d958
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/aboot/aboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -5519,6 +5519,10 @@ void aboot_init(const struct app_descriptor *app)
}
}

#if WITH_LK2ND
lk2nd_init();
#endif

/* Display splash screen if enabled */
#if DISPLAY_SPLASH_SCREEN
#if NO_ALARM_DISPLAY
Expand Down Expand Up @@ -5546,15 +5550,12 @@ void aboot_init(const struct app_descriptor *app)
#endif
#endif

target_serialno((unsigned char *) sn_buf);
if (!IS_ENABLED(WITH_LK2ND) || !sn_buf[0])
target_serialno((unsigned char *) sn_buf);
dprintf(SPEW,"serial number: %s\n",sn_buf);

memset(display_panel_buf, '\0', MAX_PANEL_BUF_SIZE);

#if WITH_LK2ND
lk2nd_init();
#endif

/*
* Check power off reason if user force reset,
* if yes phone will do normal boot.
Expand Down

0 comments on commit 4d2d958

Please sign in to comment.