ulib: Move ulib into its own directory
Before adding more files, create a new lib/ulib directory and put the only existing file in there. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
6
lib/ulib/Makefile
Normal file
6
lib/ulib/Makefile
Normal file
@@ -0,0 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
# Copyright 2025 Canonical
|
||||
# Written by Simon Glass <simon.glass@canonical.com>
|
||||
|
||||
obj-y += ulib.o
|
||||
36
lib/ulib/ulib.c
Normal file
36
lib/ulib/ulib.c
Normal file
@@ -0,0 +1,36 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Simplified U-Boot library interface implementation
|
||||
*
|
||||
* Copyright 2025 Canonical
|
||||
* Written by Simon Glass <simon.glass@canonical.com>
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <version.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <u-boot-lib.h>
|
||||
|
||||
/* Static storage for global data when using simplified API */
|
||||
static struct global_data static_gd;
|
||||
|
||||
int ulib_init(char *progname)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Initialize the U-Boot library with our static global data */
|
||||
ret = ulib_init_with_data(progname, &static_gd);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ulib_uninit(void)
|
||||
{
|
||||
}
|
||||
|
||||
const char *ulib_get_version(void)
|
||||
{
|
||||
return PLAIN_VERSION;
|
||||
}
|
||||
Reference in New Issue
Block a user