* (C) Copyright 2011
* Stefano Babic, DENX Software Engineering, sbabic@denx.de.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier: GPL-2.0+
*/
-/* Required to obtain the getline prototype from stdio.h */
-#define _GNU_SOURCE
-
#include "mkimage.h"
#include "aisimage.h"
#include <image.h>
#define WORD_ALIGN0 4
#define WORD_ALIGN(len) (((len)+WORD_ALIGN0-1) & ~(WORD_ALIGN0-1))
#define MAX_CMD_BUFFER 4096
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
static uint32_t ais_img_size;
static uint32_t *ais_insert_cmd_header(uint32_t cmd, uint32_t nargs,
uint32_t *parms, struct image_type_params *tparams,
- uint32_t *ptr, uint32_t size)
+ uint32_t *ptr)
{
int i;
uint32_t nargs, cmd_parms[10];
uint32_t value, size;
char *name = params->imagename;
- uint32_t *aishdr, tsize;
+ uint32_t *aishdr;
fd = fopen(name, "r");
if (fd == 0) {
if (cmd != CMD_INVALID) {
/* Now insert the command into the header */
aishdr = ais_insert_cmd_header(cmd, nargs, cmd_parms,
- tparams, aishdr, tsize);
+ tparams, aishdr);
}
}