image: Move common image code to image_board and command

We should use the cmd/ directory for commands rather than for common code
used elsewhere in U-Boot. Move the common 'source' code into
image-board.c to achieve this.

The image_source_script() function needs to call run_command_list()  so
seems to belong better in the command library. Move and rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-01-06 08:52:28 -06:00
committed by Tom Rini
parent 858fefd5fc
commit 30f3333d88
8 changed files with 194 additions and 203 deletions

View File

@@ -154,7 +154,7 @@ static int do_stm32prog(struct cmd_tbl *cmdtp, int flag, int argc,
do_bootz(cmdtp, 0, 4, bootm_argv);
}
if (data->script)
image_source_script(data->script, NULL, NULL);
cmd_source_script(data->script, NULL, NULL);
if (reset) {
puts("Reset...\n");