aboutsummaryrefslogtreecommitdiff
path: root/cmd/pxe_utils.c
AgeCommit message (Collapse)AuthorFilesLines
2021-02-03cmd: pxe_utils: sysboot: Add zboot support to boot x86 Linux kernel imageKory Maincent1-0/+3
Add "zboot" command to the list of supported boot in the label_boot function. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: add component tags in the summary] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2021-02-03cmd: pxe_utils: Replace ifdef by IS_ENABLEDKory Maincent1-26/+24
Replace all the macro ifdef by IS_ENABLED. All of these configs are set in the defconfig files and not in the include board headers files. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: keep the preprocessor case unchanged] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2021-01-27cmd: pxe: add support for FDT overlaysNeil Armstrong1-0/+103
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 <trini@konsulko.com> Cc: Andre Heider <a.heider@gmail.com> Cc: Jernej Škrabec <jernej.skrabec@siol.net> Cc: Jonas Karlman <jonas@kwiboo.se> Tested-by: Jernej Škrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Škrabec <jernej.skrabec@siol.net> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-12-04cli: Support macro processing with a fixed-size bufferSimon Glass1-2/+4
At present cli_simple_process_macros() requires that the caller provide an output buffer that is exactly CONFIG_SYS_CBSIZE bytes in length. This makes sense since it is designed to be used from the command line. But we also want to use it for bootargs substitution. Update the function to allow the caller to specify the buffer size. Also return an error if the buffer is exhausted. The caller can ignore that if preferred. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-01cmd: pxe: Use internal FDT if retrieving from FDTDIR failsAnton Leontiev1-7/+14
As FDTDIR label doesn't specify exact file to be loaded, it should not fail if no file exists in the directory. In this case try to boot with internal FDT if it exists. Signed-off-by: Anton Leontiev <aleontiev@elvees.com>
2020-05-18common: Drop log.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass1-13/+15
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 <sjg@chromium.org>
2020-05-18common: Drop net.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-07menu: add support for client defined statusline functionThirupathaiah Annapureddy1-1/+1
Currently displaying status line is done in a weak function menu_display_statusline(). bootmenu.c overrides the weak default function. It calls menu_default_choice() and interprets the data as struct bootmenu_entry. pxe boot also uses common menu code for pxe menus. If there is a system that enables both bootmenu and pxe, menu_display_statusline() defined in bootmenu.c will be called and it will interpret struct pxe_label as struct bootmenu_entry. This leads to data aborts and pxe menu corruptions. This patch adds support for client defined statusline function to resolve the above bug. Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
2020-01-22cmd: pxe: execute the cls command only when supportedPatrick Delaunay1-1/+2
Execute the command cls (for clear screen), when the "menu background" keyword is present in extlinux.conf file, only if the command is supported. This patch avoid the warning "Unknown command 'cls'" with "menu background" in extlinux.conf when CONFIG_CMD_BMP is activated and CONFIG_CMD_CLS not activated (default for CONFIG_DM_VIDEO). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-01-17common: Move the image globals into image.hSimon Glass1-0/+1
These three globals relate to image handling. Move them to the image header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17image: Rename load_addr, save_addr, save_sizeSimon Glass1-2/+2
These global variables are quite short and generic. In fact the same name is more often used locally for struct members and function arguments. Add a image_ prefix to make them easier to distinguish. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-12-09cmd: pxe: Increase maximum path lengthBen Wolsieffer1-1/+1
On NixOS, cross compiled kernels have long suffixes that cause them to exceed the current maximum path length. The PXE/TFTP max path length is used for extlinux.conf support as well, which is where this problem usually manifest's itself. Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-06cmd: pxe_utils: Fix checkpatch WARNING/CHECKPatrice Chotard1-47/+46
Fix checkpatch WARNING and CHECK issues Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-12-06cmd: Prepare sysboot command independencePatrice Chotard1-0/+1353
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 <patrice.chotard@st.com>