Compare commits

..

9 Commits

Author SHA1 Message Date
Simon Glass
1ae3b1953b video: Provide a command to list built-in images
Add a new 'video images' command which lists the graphical images that
are compiled into U-Boot. Generally the only one is the logo.

Series-to: concept
Series-cc: heinrich
Cover-letter:
video: Tidy up embedded graphical images
U-Boot includes a few graphical images which are compiled in, such as
the logo and the BGRT logo used for EFI.

At present these are handled by a Makefile rule which looks for files
ending with '_logo.bmp'.

This series moves these into a new drivers/video/images directory and
puts them in a linker list, so it is possible to see what images are
available.

Adding a new image is simpler, just requiring the addition of the normal
'obj-y += file.bmp' rule.

This series also adds a new 'video' command which provides the existing
'setcurs' and 'lcdputs' as subcommands, along with documentation and
tests.

It also adds a more convenient 'write' subcommand.

END
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-links: 1:43
Series-version: 2
2025-10-02 09:42:43 -06:00
Simon Glass
7695d711e6 acpi: bgrt: Move the BGRT image into the images directory
Move the BGRT image to use the same video_image linker-list approach
as the other embedded image. Move it into the drivers/video/images
directory and rename it to 'bgrt.bmp' since we know it is an image.

Drop the old bgrt Makefile rule as it is no-longer needed.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 09:41:47 -06:00
Simon Glass
aa9d53d696 video: Move the logo into the new video-images directory
Move u_boot_logo.bmp into drivers/video/images and include it in the
build.

Make use of the new video_image_get() macro to obtain the logo.

Drop the old SPLASH_...() macros.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 09:41:47 -06:00
Simon Glass
c4c6e183fd video: Support a linker list of images
It is inconvenient to have to access graphical images as independent
symbols. Create a new rule which handles any file mentioned in
drivers/video/images/Makefile

For each graphical image, embed in the image and create a linker-list
entry for it.

Series-changes: 2
- Use Canonical copyright

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 09:41:47 -06:00
Simon Glass
0a592b5941 video: Add a write subcommand
This allows writing strings at particular positions on the display,
using either character or pixel positions.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-10-02 09:41:43 -06:00
Simon Glass
463328ec10 video: Add video command with subcommands
Add a new 'video' command with 'setcursor' and 'puts' subcommands that
provide an alternative interface to the existing setcurs and lcdputs
commands.

Update the test is updated to test both the legacy commands and the new
'video' command.

Series-changes: 2
- Correct confusing output text which should be 16 instead of 10
- Improve docs for row and col

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 09:24:50 -06:00
Simon Glass
42fc24044d video: Add tests for the video commands
Add a simple test for the setcurs and lcdputs commands.

Series-changes: 2
- Pull out the docs into a separate patch
- Update test result for hex

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 09:05:38 -06:00
Simon Glass
3802cb3b87 doc: video: Add docs for video commands
Add documentation and a simple test for the setcurs and lcdputs
commands.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

Series-changes: 2
- Split out docs into its own patch; use video: tag

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 09:05:37 -06:00
Simon Glass
7e6f668f70 cmd: Update setcurs to use hex
Commands in U-Boot should use hex consistently. Update this command
accordingly.

Series-changes: 2
- Add new patch to switch this command to use hex

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-02 08:53:17 -06:00
5 changed files with 6 additions and 9 deletions

View File

@@ -3,7 +3,7 @@
VERSION = 2025
PATCHLEVEL = 10
SUBLEVEL =
EXTRAVERSION =
EXTRAVERSION = -rc3
NAME =
# *DOCUMENTATION*

View File

@@ -43,7 +43,6 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_TIME=y
CONFIG_CMD_SOUND=y
# CONFIG_CMD_VIDCONSOLE is not set
CONFIG_CMD_BOOTSTAGE=y
CONFIG_CMD_TPM=y
CONFIG_CMD_TPM_TEST=y

View File

@@ -9,7 +9,7 @@
#include <linker_lists.h>
#include <stdio_dev.h>
#include <video_defs.h>
#include <video_image.h>
#ifdef CONFIG_SANDBOX
#include <asm/state.h>
#endif

View File

@@ -1,15 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Video definitions
*
* Copyright 2025 Canonical Ltd
* Written by Simon Glass <simon.glass@canonical.com>
*/
#ifndef __VIDEO_DEFS_H
#define __VIDEO_DEFS_H
#ifndef __VIDEO_IMAGE_H
#define __VIDEO_IMAGE_H
/* Maximum length of an embedded image name */
#define VIDEO_IMAGE_NAMELEN 16
#endif /* __VIDEO_DEFS_H */
#endif /* __VIDEO_IMAGE_H */

View File

@@ -528,7 +528,7 @@ $(obj)/%_logo.S: $(src)/%_logo.bmp
quiet_cmd_S_image= IMAGE $@
cmd_S_image= \
( \
echo '\#include <video_defs.h>'; \
echo '\#include <video_image.h>'; \
echo '.section .rodata.image.init,"a"'; \
echo '.balign 16'; \
echo '.global __image_$(*F)_begin'; \