[PATCH v2 1/2] pxe_utils: Fix arguments to x86 zboot

Simon Glass sjg at chromium.org
Sun Oct 24 21:53:47 CEST 2021


On Wed, 20 Oct 2021 at 01:18, Zhaofeng Li <hello at zhaofeng.li> wrote:
>
> bootm and zboot accept different arguments:
>
> > bootm [addr [arg ...]]
> >    - boot application image stored in memory
> >        passing arguments 'arg ...'; when booting a Linux kernel,
> >        'arg' can be the address of an initrd image
>
> > zboot [addr] [size] [initrd addr] [initrd size] [setup] [cmdline]
> >       addr -        The optional starting address of the bzimage.
> >                     If not set it defaults to the environment
> >                     variable "fileaddr".
> >       size -        The optional size of the bzimage. Defaults to
> >                     zero.
> >       initrd addr - The address of the initrd image to use, if any.
> >       initrd size - The size of the initrd image to use, if any.
>
> In the zboot flow, the current code will reuse the bootm args and attempt
> to pass the initrd arg (argv[2]) as the kernel size (should be argv[3]).
> zboot also expects the initrd address and size to be separate arguments.
>
> Let's untangle them and have separate argv/argc locals.
>
> Signed-off-by: Zhaofeng Li <hello at zhaofeng.li>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> ---
>  cmd/pxe_utils.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>

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


More information about the U-Boot mailing list