bootctl: Allow switching between logos

The bootctl tests are currently disabled due to some image
incompatibilities: the multi UI uses one image and the simple UI uses a
different one.

Update the logic to switch between these logos when the layout changes.
For now, use the U-Boot logo in both cases.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-18 15:54:58 -07:00
parent e47ca5518a
commit ceab1d8010
5 changed files with 24 additions and 5 deletions

View File

@@ -215,6 +215,10 @@ static int multiboot_ui_set_props(struct udevice *dev, struct scene *scn,
scene_obj_set_hide(scn, OBJ_AUTOBOOT, !lpriv->opt_autoboot);
if (upriv->logo) {
ret = scene_img_set_data(scn, OBJ_U_BOOT_LOGO, upriv->logo,
upriv->logo_size);
if (ret)
return log_msg_ret("log", ret);
ret = scene_obj_set_pos(scn, OBJ_U_BOOT_LOGO, 1045, 10);
if (ret)
return log_msg_ret("lop", ret);

View File

@@ -92,8 +92,11 @@ static int simple_ui_show(struct udevice *dev)
abuf_printf(buf, "Boot control");
if (upriv->logo) {
ret = scene_img_set_data(scn, OBJ_U_BOOT_LOGO,
upriv->logo, upriv->logo_size);
const void *logo;
int size;
logo = video_get_u_boot_logo(&size);
ret = scene_img_set_data(scn, OBJ_U_BOOT_LOGO, logo, size);
if (ret)
return log_msg_ret("log", ret);
ret = scene_obj_set_pos(scn, OBJ_U_BOOT_LOGO, 1135, 10);

View File

@@ -80,9 +80,18 @@ int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo,
1366, 60);
ret |= scene_obj_set_halign(scn, OBJ_MENU_TITLE, SCENEOA_CENTRE);
if (has_logo)
if (has_logo) {
const void *logo;
int size;
ret |= scene_obj_set_pos(scn, OBJ_U_BOOT_LOGO, 1165, 100);
logo = video_get_u_boot_logo(&size);
ret |= scene_img_set_data(scn, OBJ_U_BOOT_LOGO, logo, size);
if (ret)
return log_msg_ret("log", ret);
}
ret |= scene_obj_set_bbox(scn, OBJ_PROMPT1A, 0, 590,
1366, 590 + 40);
ret |= scene_obj_set_bbox(scn, OBJ_PROMPT1B, 0, 620,