[PATCH u-boot-mvebu v2 16/41] tools: kwbimage: Don't parse PAYLOAD keyword

Stefan Roese sr at denx.de
Wed Jul 21 11:33:25 CEST 2021


On 19.07.21 14:20, Marek Behún wrote:
> From: Pali Rohár <pali at kernel.org>
> 
> The PAYLOAD keyword does nothing. No code is using it and both mkimage
> and kwbimage completely ignore it. It looks like a relict from the past.
> The payload image itself can be specified only via -d parameter to
> mkimage.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Reviewed-by: Marek Behún <marek.behun at nic.cz>
> Reviewed-by: Chris Packham <judge.packham at gmail.com>
> Tested-by: Chris Packham <judge.packham at gmail.com>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   tools/kwbimage.c | 13 -------------
>   1 file changed, 13 deletions(-)
> 
> diff --git a/tools/kwbimage.c b/tools/kwbimage.c
> index 1bfc524424..74a77412d7 100644
> --- a/tools/kwbimage.c
> +++ b/tools/kwbimage.c
> @@ -103,7 +103,6 @@ enum image_cfg_type {
>   	IMAGE_CFG_NAND_ECC_MODE,
>   	IMAGE_CFG_NAND_PAGESZ,
>   	IMAGE_CFG_BINARY,
> -	IMAGE_CFG_PAYLOAD,
>   	IMAGE_CFG_DATA,
>   	IMAGE_CFG_BAUDRATE,
>   	IMAGE_CFG_DEBUG,
> @@ -131,7 +130,6 @@ static const char * const id_strs[] = {
>   	[IMAGE_CFG_NAND_ECC_MODE] = "NAND_ECC_MODE",
>   	[IMAGE_CFG_NAND_PAGESZ] = "NAND_PAGE_SIZE",
>   	[IMAGE_CFG_BINARY] = "BINARY",
> -	[IMAGE_CFG_PAYLOAD] = "PAYLOAD",
>   	[IMAGE_CFG_DATA] = "DATA",
>   	[IMAGE_CFG_BAUDRATE] = "BAUDRATE",
>   	[IMAGE_CFG_DEBUG] = "DEBUG",
> @@ -157,7 +155,6 @@ struct image_cfg_element {
>   			unsigned int args[BINARY_MAX_ARGS];
>   			unsigned int nargs;
>   		} binary;
> -		const char *payload;
>   		unsigned int dstaddr;
>   		unsigned int execaddr;
>   		unsigned int nandblksz;
> @@ -874,11 +871,6 @@ static void *image_create_v0(size_t *imagesz, struct image_tool_params *params,
>   		headersz += sizeof(struct ext_hdr_v0);
>   	}
>   
> -	if (image_count_options(IMAGE_CFG_PAYLOAD) > 1) {
> -		fprintf(stderr, "More than one payload, not possible\n");
> -		return NULL;
> -	}
> -
>   	image = malloc(headersz);
>   	if (!image) {
>   		fprintf(stderr, "Cannot allocate memory for image\n");
> @@ -950,11 +942,6 @@ static size_t image_headersz_v1(int *hasext)
>   	 */
>   	headersz = sizeof(struct main_hdr_v1);
>   
> -	if (image_count_options(IMAGE_CFG_PAYLOAD) > 1) {
> -		fprintf(stderr, "More than one payload, not possible\n");
> -		return 0;
> -	}
> -
>   	for (cfgi = 0; cfgi < cfgn; cfgi++) {
>   		int ret;
>   		struct stat s;
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list