[PATCH v2 08/21] bootm: Create a struct for argument information

Tom Rini trini at konsulko.com
Thu Dec 14 18:51:07 CET 2023


On Thu, Dec 14, 2023 at 09:50:17AM -0700, Simon Glass wrote:

> Some OS functions require the arguments to the 'bootm' command. This is
> inconvenient for two reasons.
> 
> Firstly, there may not be any actual command, if CMDLINE is not enabled
> and programmatic boot is being used.
> 
> Secondly, most functions don't require the arguments, so it is
> inefficient to pass them when not needed. For example it increases code
> size.
> 
> Create a new struct which holds the arguments, which can be used if
> needed.
> 
> Add the images pointer as well, since this is commonly needed.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
[snip]
> @@ -39,7 +53,7 @@ typedef int boot_os_fn(int flag, int argc, char *const argv[],
>  extern boot_os_fn do_bootm_linux;
>  extern boot_os_fn do_bootm_vxworks;
>  
> -int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
> +int do_bootelf(struct cmd_tbl *cmdtp, int fglag, int argc, char *const argv[]);

Typo, can just drop when applying if there's no v3.

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231214/d29ba954/attachment.sig>


More information about the U-Boot mailing list