[U-Boot] [PATCH v2 3/8] cmd: bootimg: Add bootimg command

Eugeniu Rosca erosca at de.adit-jv.com
Wed Nov 27 19:16:49 UTC 2019


Hi Sam,

On Wed, Oct 23, 2019 at 05:34:22PM +0300, Sam Protsenko wrote:
> +static int do_bootimg_get_dtb_file(cmd_tbl_t *cmdtp, int flag, int argc,
> +				   char * const argv[])
> +{
> +	char *endp;
> +	char buf[65];
> +	u32 index;
> +	ulong addr;
> +	u32 size;
> +
> +	if (argc < 3 || argc > 4)
> +		return CMD_RET_USAGE;
> +
> +	index = simple_strtoul(argv[1], &endp, 0);
> +	if (*endp != '\0') {
> +		printf("Error: Wrong index\n");
> +		return CMD_RET_FAILURE;
> +	}
> +
> +	if (!android_image_get_dtb_by_index(bootimg_addr(), index, &addr,
> +					    &size))

As discussed in https://patchwork.ozlabs.org/patch/958594/#2302310, we
try to enhance the "dtimg" U-Boot command to be able to identify DT
blobs by "id" or "rev" [*] field value.

It's quite challenging in this context to avoid conflicting with your
recently proposed "bootimg" command, since the latter makes use of the
android_image_get_dtb_by_index API, which is subject of modification
and/or renaming.

I am willing to cooperate to entirely avoid or reconcile the conflict
in the best possible way, but for that I need your feedback.

[*] https://source.android.google.cn/devices/architecture/dto/partitions

-- 
Best Regards,
Eugeniu


More information about the U-Boot mailing list