lib: Add support for text rendering on splash screen
Introduce FRAMEBUFFER_SPLASH_TEXT to allow rendering status messages directly into the linear framebuffer. This enables displaying dynamic information, such as battery levels or system status, during the bootsplash stage without requiring complex graphics libraries. Changes: - Add Kconfig option to toggle framebuffer text support. - User to call `render_text_to_framebuffer` to display the text message. - Include render_text.c in ramstage build when FRAMEBUFFER_SPLASH_TEXT is enabled. - Create 24x32 font table entry using GoogleSansFlex_24pt-Medium.ttf. TEST=Able to build google/fatcat. Change-Id: I6ac25d8d8a9d3d77a9cc2f8c6e0139268b2066b9 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91092 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
5aeda3e7bb
commit
8cd9454d00
6 changed files with 967 additions and 0 deletions
|
|
@ -20,6 +20,16 @@ enum bootsplash_type {
|
|||
BOOTSPLASH_MAX_NUM,
|
||||
};
|
||||
|
||||
enum bootsplash_text_type {
|
||||
/* Indicates a bootsplash text message appear at the center of the screen. */
|
||||
BOOTSPLASH_TEXT_CENTER,
|
||||
/* Indicates a bootsplash text message appear at the footer of the screen. */
|
||||
BOOTSPLASH_TEXT_FOOTER,
|
||||
|
||||
/* It's used to determine the total number of bootsplash types. */
|
||||
BOOTSPLASH_TEXT_MAX_NUM,
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets up the framebuffer with the bootsplash.jpg from cbfs.
|
||||
* Returns 0 on success
|
||||
|
|
@ -157,6 +167,9 @@ void load_and_convert_bmp_to_blt(uintptr_t *logo, size_t *logo_size,
|
|||
void convert_bmp_to_blt(uintptr_t logo, size_t logo_size,
|
||||
uintptr_t *blt, size_t *blt_size, uint32_t *pixel_height, uint32_t *pixel_width,
|
||||
enum lb_fb_orientation orientation);
|
||||
void render_text_to_framebuffer(struct logo_config *config, const char *str,
|
||||
enum bootsplash_text_type type);
|
||||
bool platform_get_splash_text(enum bootsplash_type logo_type, char *msg, size_t msg_max);
|
||||
|
||||
/* Mainboard-specific override for logo filenames */
|
||||
const char *mainboard_bmp_logo_filename(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue