bootm: Adjust the parameters of bootm_find_images()

Rather than passing it all the command-line args, pass in the pieces
that it needs. These are the image address, the ramdisk address/name
and the FDT address/name.

Ultimately this will allow usage of this function without being called
from the command line.

Move the function comment to the header file and tidy it a little.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-11-18 14:05:16 -07:00
committed by Tom Rini
parent b020254d71
commit 3ac85bdc6a
4 changed files with 43 additions and 36 deletions

View File

@@ -95,7 +95,9 @@ static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc,
* Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not
* have a header that provide this informaiton.
*/
if (bootm_find_images(flag, argc, argv, relocated_addr, image_size))
if (bootm_find_images(image_load_addr, argc > 1 ? argv[1] : NULL,
argc > 2 ? argv[2] : NULL, relocated_addr,
image_size))
return 1;
return 0;

View File

@@ -54,7 +54,9 @@ static int bootz_start(struct cmd_tbl *cmdtp, int flag, int argc,
* Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not
* have a header that provide this informaiton.
*/
if (bootm_find_images(flag, argc, argv, images->ep, zi_end - zi_start))
if (bootm_find_images(image_load_addr, argc > 1 ? argv[1] : NULL,
argc > 2 ? argv[2] : NULL, images->ep,
zi_end - zi_start))
return 1;
return 0;