Compare commits

..

6 Commits

Author SHA1 Message Date
Simon Glass
638e5af7da net: Move env_get_ip() out of the header file
This function requires access to env.h but it is a lot to include just
for the env_get() function. It eventually pulls in linux/byteorder which
causes a conflict with exfat which has its own byteorder functions.

Move the function to a C file instead.

Series-to: u-boot
Series-cc: trini
Series-cc: Jerome Forissier <jerome.forissier@linaro.org>

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-30 08:38:15 -06:00
Simon Glass
eb3a1b3ab6 net: Use a forward declaration for cmd_tbl in net-common.h
We don't need to include command.h just for this declaration. It
eventually pulls in linux/byteorder which causes a conflict with exfat
which has its own byteorder functions.

Use a forward declaration instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-30 08:37:27 -06:00
Simon Glass
b5d6220dd2 Merge branch 'ci' into 'master'
boot: Add missing code for bootz_run()

See merge request u-boot/u-boot!60
2025-04-18 12:23:03 +00:00
Simon Glass
4a03fbc8bb boot: Add missing code for bootz_run()
The bootz method is special in that it uses its own implementation of
several of the bootm states.

The existing do_bootz() function calls bootz_run() but first does a few
other things. These are missing in the direct call to bootz_run(). I
probably missed this because bootz_start() sets up its own
struct bootm_info so I assumed it was independent. While the struct
itself is independent, changes to the images member (which is a pointer)
persist.

Move the required code into bootz_run()

This change was manually tested on an rpi2 with postmarketOS added,
using standard boot and also the 'bootz' command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 47eda7e80e ("boot: pxe: Use bootm_...() functions where possible")
Reported-by: Svyatoslav Ryhel <clamor95@gmail.com>
Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895
2025-04-18 05:02:56 -06:00
Simon Glass
5841e78ed6 Merge branch 'ci' into 'master'
bloblist: Drop BSD license

See merge request u-boot/u-boot!59
2025-04-17 15:55:40 +00:00
Simon Glass
8fa2f3610d bloblist: Drop BSD license
Linaro has decided to write their own version of bloblist from scratch,
so there is no point in having a non-GPL license on this file. Change
it, to better fit with the U-Boot project.

Signed-off-by: Simon Glass <sjg@chromium.org>
Link: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/22215
Acked-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-17 09:54:26 -06:00
4 changed files with 11 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0+ BSD-3-Clause
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2018 Google, Inc
* Written by Simon Glass <sjg@chromium.org>

View File

@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0+ BSD-3-Clause */
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* This provides a standard way of passing information between boot phases
* (TPL -> SPL -> U-Boot proper.)

View File

@@ -4,8 +4,6 @@
#define __NET_COMMON_H__
#include <asm/cache.h>
#include <command.h>
#include <env.h>
#include <hexdump.h>
#include <linux/if_ether.h>
#include <linux/sizes.h>
@@ -13,6 +11,8 @@
#include <rand.h>
#include <time.h>
struct cmd_tbl;
#define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */
/*
@@ -463,10 +463,7 @@ int update_tftp(ulong addr, char *interface, char *devstring);
* 0 to 255
* Return: IP address, or 0 if invalid
*/
static inline struct in_addr env_get_ip(char *var)
{
return string_to_ip(env_get(var));
}
struct in_addr env_get_ip(char *var);
int net_init(void);

View File

@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include <env.h>
#include <net-common.h>
void copy_filename(char *dst, const char *src, int size)
@@ -25,3 +26,8 @@ int wget_request(ulong dst_addr, char *uri, struct wget_http_info *info)
wget_info = info ? info : &default_wget_info;
return wget_with_dns(dst_addr, uri);
}
struct in_addr env_get_ip(char *var)
{
return string_to_ip(env_get(var));
}