[PATCH v4 2/2] pxe: Get default selection from board type if label matches

Simon Glass sjg at chromium.org
Wed Feb 12 18:14:35 CET 2020


On Wed, 12 Feb 2020 at 03:37, Schrempf Frieder
<frieder.schrempf at kontron.de> wrote:
>
> From: Frieder Schrempf <frieder.schrempf at kontron.de>
>
> In order to auto-select an option from the pxe boot menu, that
> matches the detected board, we check the board model string in the
> devicetree and set the default menu selection, if it matches the
> label of the menu entry and there is no default selection already
> set.
>
> This is useful in combination with SPL that loads a FIT image with
> U-Boot and multiple DTBs. SPL can detect the board and choose the
> matching configuration in the FIT by using
> board_fit_config_name_match().
>
> Signed-off-by: Frieder Schrempf <frieder.schrempf at kontron.de>
> ---
> Changes in v4:
> * Remove #ifdef that would cause build failures in case of OF_CONTROL being
>   disabled.
>
> Changes in v3:
> * Get rid of #ifdef by using IS_ENABLED() in else branch.
>
> Changes in v2:
> * Don't use internal structs of menu, but instead call
> ---
>  cmd/pxe_utils.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list