api: Rename legacy API files and examples

The API is not very useful these days, since it doesn't support driver
model. It is laborious to add new functions to the API as there are so
many needed.

A better approach would be to create a library containing all of U-Boot,
then have the API be generated by a script containing a list of
functions, perhaps with wildcards. Then a stub could be created, with
a list of entry points, which links with and calls through into the
library.

In preparation for heading in this direction, rename some of the
existing files and directories:

- examples/api -> examples/legacy_api
- include/api*.h -> include/legacy_api*.h
- API_BUILD to LEGACY_API_BUILD

Co-developed-by: Claude <noreply@anthropic.com>
This commit is contained in:
Simon Glass
2025-09-04 18:04:13 -06:00
parent a417edcb4a
commit c5188188e2
21 changed files with 26 additions and 26 deletions

View File

@@ -308,7 +308,7 @@ static __maybe_unused char *string16(char *buf, char *end, u16 *s,
return buf;
}
#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) && !defined(API_BUILD)
#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) && !defined(LEGACY_API_BUILD)
static char *device_path_string(char *buf, char *end, void *dp, int field_width,
int precision, int flags)
{
@@ -469,7 +469,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr,
switch (*fmt) {
/* Device paths only exist in the EFI context. */
#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) && !defined(API_BUILD)
#if CONFIG_IS_ENABLED(EFI_DEVICE_PATH_TO_TEXT) && !defined(LEGACY_API_BUILD)
case 'D':
return device_path_string(buf, end, ptr, field_width,
precision, flags);
@@ -630,7 +630,7 @@ repeat:
case 's':
/* U-Boot uses UTF-16 strings in the EFI context only. */
#if (CONFIG_IS_ENABLED(EFI_LOADER) || IS_ENABLED(CONFIG_EFI_APP)) && \
!defined(API_BUILD)
!defined(LEGACY_API_BUILD)
if (qualifier == 'l') {
str = string16(str, end, va_arg(args, u16 *),
field_width, precision, flags);