Commit 4962e38e authored by Stefano Babic's avatar Stefano Babic Committed by Wolfgang Denk

mkimage: adding support for Davinci AIS image

Some Davinci processors supports the Application
Image Script (AIS) boot process. The patch adds the generation
of the AIS image inside the mkimage tool to make possible
to generate a bootable U-boot without external tools
(TI Davinci AIS Generator).
Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
parent daaaf028
......@@ -131,19 +131,20 @@ static const table_entry_t uimage_os[] = {
};
static const table_entry_t uimage_type[] = {
{ IH_TYPE_AISIMAGE, "aisimage", "Davinci AIS image",},
{ IH_TYPE_FILESYSTEM, "filesystem", "Filesystem Image", },
{ IH_TYPE_FIRMWARE, "firmware", "Firmware", },
{ IH_TYPE_FLATDT, "flat_dt", "Flat Device Tree", },
{ IH_TYPE_KERNEL, "kernel", "Kernel Image", },
{ IH_TYPE_KWBIMAGE, "kwbimage", "Kirkwood Boot Image",},
{ IH_TYPE_IMXIMAGE, "imximage", "Freescale i.MX Boot Image",},
{ IH_TYPE_INVALID, NULL, "Invalid Image", },
{ IH_TYPE_MULTI, "multi", "Multi-File Image", },
{ IH_TYPE_OMAPIMAGE, "omapimage", "TI OMAP SPL With GP CH",},
{ IH_TYPE_RAMDISK, "ramdisk", "RAMDisk Image", },
{ IH_TYPE_SCRIPT, "script", "Script", },
{ IH_TYPE_STANDALONE, "standalone", "Standalone Program", },
{ IH_TYPE_IMXIMAGE, "imximage", "Freescale i.MX Boot Image",},
{ IH_TYPE_KWBIMAGE, "kwbimage", "Kirkwood Boot Image",},
{ IH_TYPE_OMAPIMAGE, "omapimage", "TI OMAP SPL With GP CH",},
{ IH_TYPE_UBLIMAGE, "ublimage", "Davinci UBL image",},
{ IH_TYPE_INVALID, NULL, "Invalid Image", },
{ -1, "", "", },
};
......
......@@ -161,6 +161,7 @@
#define IH_TYPE_IMXIMAGE 10 /* Freescale IMXBoot Image */
#define IH_TYPE_UBLIMAGE 11 /* Davinci UBL Image */
#define IH_TYPE_OMAPIMAGE 12 /* TI OMAP Config Header Image */
#define IH_TYPE_AISIMAGE 13 /* TI Davinci AIS Image */
/*
* Compression Types
......
......@@ -86,6 +86,7 @@ NOPED_OBJ_FILES-y += fit_image.o
OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
OBJ_FILES-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes.o
NOPED_OBJ_FILES-y += aisimage.o
NOPED_OBJ_FILES-y += kwbimage.o
NOPED_OBJ_FILES-y += imximage.o
NOPED_OBJ_FILES-y += omapimage.o
......@@ -184,7 +185,8 @@ $(obj)xway-swap-bytes$(SFX): $(obj)xway-swap-bytes.o
$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
$(HOSTSTRIP) $@
$(obj)mkimage$(SFX): $(obj)crc32.o \
$(obj)mkimage$(SFX): $(obj)aisimage.o \
$(obj)crc32.o \
$(obj)default_image.o \
$(obj)fit_image.o \
$(obj)image.o \
......
This diff is collapsed.
/*
* (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
*/
#ifndef _AISIMAGE_H_
#define _AISIMAGE_H_
/* all values are for little endian systems */
#define AIS_MAGIC_WORD 0x41504954
#define AIS_FCN_MAX 8
enum {
AIS_CMD_LOAD = 0x58535901,
AIS_CMD_VALCRC = 0x58535902,
AIS_CMD_ENCRC = 0x58535903,
AIS_CMD_DISCRC = 0x58535904,
AIS_CMD_JMP = 0x58535905,
AIS_CMD_JMPCLOSE = 0x58535906,
AIS_CMD_BOOTTBL = 0x58535907,
AIS_CMD_FILL = 0x5853590A,
AIS_CMD_FNLOAD = 0x5853590D,
AIS_CMD_SEQREAD = 0x58535963,
};
struct ais_cmd_load {
uint32_t cmd;
uint32_t addr;
uint32_t size;
uint32_t data[1];
};
struct ais_cmd_func {
uint32_t cmd;
uint32_t func_args;
uint32_t parms[AIS_FCN_MAX];
};
struct ais_cmd_jmpclose {
uint32_t cmd;
uint32_t addr;
};
#define CMD_DATA_STR "DATA"
enum ais_file_cmd {
CMD_INVALID,
CMD_FILL,
CMD_CRCON,
CMD_CRCOFF,
CMD_CRCCHECK,
CMD_JMPCLOSE,
CMD_JMP,
CMD_SEQREAD,
CMD_DATA,
CMD_PLL0,
CMD_PLL1,
CMD_CLK,
CMD_DDR2,
CMD_EMIFA,
CMD_EMIFA_ASYNC,
CMD_PLL,
CMD_PSC,
CMD_PINMUX,
CMD_BOOTTABLE
};
enum aisimage_fld_types {
CFG_INVALID = -1,
CFG_COMMAND,
CFG_VALUE,
};
struct ais_header {
uint32_t magic;
char data[1];
};
#endif /* _AISIMAGE_H_ */
......@@ -162,6 +162,8 @@ main (int argc, char **argv)
init_default_image_type ();
/* Init Davinci UBL support */
init_ubl_image_type();
/* Init Davinci AIS support */
init_ais_image_type();
params.cmdname = *argv;
params.addr = params.ep = 0;
......
......@@ -147,6 +147,7 @@ void mkimage_register (struct image_type_params *tparams);
*
* Supported image types init functions
*/
void init_ais_image_type(void);
void init_kwb_image_type (void);
void init_imx_image_type (void);
void init_default_image_type (void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment