u-boot/arch/sandbox/include/asm/spl.h
Sean Anderson 53d8bf8f9c test: spl: Add a test for the NET load method
Add a test for loading U-Boot over TFTP. As with other sandbox net
routines, we need to initialize our packets manually since things like
net_set_ether and net_set_udp_header always use "our" addresses. We use
BOOTP instead of DHCP, since DHCP has a tag/length-based format which is
harder to parse. Our TFTP implementation doesn't define as many constants
as I'd like, so I create some here. Note that the TFTP block size is
one-based, but offsets are zero-based.

In order to avoid address errors, we need to set up/define some additional
address information settings. dram_init_banksize would be a good candidate
for settig up bi_dram, but it gets called too late in board_init_r.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-17 20:50:52 -04:00

31 lines
724 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c) 2016 Google, Inc
*/
#ifndef __asm_spl_h
#define __asm_spl_h
enum {
BOOT_DEVICE_MMC1,
BOOT_DEVICE_MMC2,
BOOT_DEVICE_MMC2_2,
BOOT_DEVICE_BOARD,
BOOT_DEVICE_VBE,
BOOT_DEVICE_CPGMAC,
};
/**
* sandbox_find_next_phase() - Find the next phase of U-Boot
*
* This function is intended to be called from within sandbox SPL. It uses
* a few rules to find the filename of the next U-Boot phase. See also
* os_find_u_boot().
*
* @fname: place to put full path to U-Boot
* @maxlen: maximum size of @fname
* @use_img: select the 'u-boot.img' file instead of the 'u-boot' ELF file
*/
int sandbox_find_next_phase(char *fname, int maxlen, bool use_img);
#endif