]> git.baikalelectronics.ru Git - uboot.git/commit
pxe: Clean up the use of bootfile
authorSimon Glass <sjg@chromium.org>
Thu, 14 Oct 2021 18:48:04 +0000 (12:48 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 12 Nov 2021 00:02:28 +0000 (19:02 -0500)
commit2e8b81d340eac9312b9ef8e58fba267e150da9fd
treecb34fdc5fbc3f5941141fcc3a8e830369aa35e60
parentbf20ea2bc820d01936829809ac94d18b338c64f4
pxe: Clean up the use of bootfile

The 'bootfile' environment variable is read in the bowels of pxe_util to
provide a directory to which all loaded files are relative.

This is not obvious from the API to PXE and it is strange to make the
caller set an environment variable rather than pass this as a parameter.

The code is also convoluted, which this feature implemented by
get_bootfile_path().

Update the API to improve this. Unfortunately this means that
pxe_setup_ctx() can fail, so add error checking.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
boot/pxe_utils.c
cmd/pxe.c
cmd/sysboot.c
include/pxe_utils.h