
On Wed, 12 Feb 2020 at 03:37, Schrempf Frieder frieder.schrempf@kontron.de wrote:
From: Frieder Schrempf frieder.schrempf@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@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@chromium.org