summaryrefslogtreecommitdiff
path: root/cmd/pxe_utils.h
AgeCommit message (Collapse)Author
2021-11-11pxe: Move pxe_utils filesSimon Glass
Move the header file into the main include/ directory so we can use it from the bootmethod code. Move the C file into boot/ since it relates to booting. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Tidy up the is_pxe globalSimon Glass
Move this into the context to avoid a global variable. Also rename it since the current name does not explain what it actually affects. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Add a userdata field to the contextSimon Glass
Allow the caller to provide some info which is passed back to the readfile() method. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Move do_getfile() into the contextSimon Glass
Rather than having a global variable, pass the function as part of the context. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Use a context pointerSimon Glass
At present the PXE functions pass around a pointer to command-table entry which is very strange. It is only needed in a few places and it is odd to pass around a data structure from another module in this way. For bootmethod we will need to provide some context information when reading files. Create a PXE context struct to hold the command-table-entry pointer and pass that around instead. We can then add more things to the context as needed. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-11-11pxe: Move API comments to the header filesSimon Glass
Put the function comments in the header file so that the full API can we examined in one place. Expand the comments to cover parameters and return values. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Artem Lapkin <[email protected]> Tested-by: Artem Lapkin <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2021-01-27cmd: pxe: add support for FDT overlaysNeil Armstrong
This adds support for specifying FDT overlays in an extlinux/pxelinux configuration file. Without this, there is no simple way to apply overlays when the kernel and fdt is loaded by the pxe command. This change adds the 'fdtoverlays' keyword for a label, supporting multiple overlay files to be applied on top of the fdt specified in the 'fdt' or 'devicetree' keyword. Example: label linux kernel /Image fdt /soc-board.dtb fdtoverlays /soc-board-function.dtbo append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait This code makes usage of a new variable called fdtoverlay_addr_r used to load the overlay files without overwritting anything important. Cc: Tom Rini <[email protected]> Cc: Andre Heider <[email protected]> Cc: Jernej Škrabec <[email protected]> Cc: Jonas Karlman <[email protected]> Tested-by: Jernej Škrabec <[email protected]> Reviewed-by: Jernej Škrabec <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <[email protected]>
2019-12-06cmd: Prepare sysboot command independencePatrice Chotard
As sysboot and pxe commands are sharing piece of code, migrate this common code into a new file pxe_utils.c to prepare sysboot command code extraction from pxe.c Signed-off-by: Patrice Chotard <[email protected]>