[U-Boot] [PATCH] image: Fix Android boot image support

Ahmad Draidi ar2000jp at gmail.com
Tue Oct 21 18:30:27 CEST 2014


Hello, Mr. Glass

On Tue, Oct 21, 2014 at 12:42 AM, Simon Glass <sjg at chromium.org> wrote:
>
> Why have ANDR_BOOT_ARGS_SIZE? If you are going to malloc() anyway, you
> may as well avoid the limit. Something like:
>
> char *bootargs = getenv("bootargs");
> int len = 0;
>
> if (*hdr->cmdline)
>    len += strlen(hdr->cmdline);
> if (bootargs)
>    len += strlen(bootargs);
> malloc(len +1) bytes
> copy them in
>

I wanted to make my modifications as little as possible, since the
code might be addressing some corner case in the image making tool.
I checked the code for the mkbootimg tool, and verified that there are
no need for the extra checks.
I'll send the second version of the patch soon.

Regards,
Ahmad Draidi


More information about the U-Boot mailing list