tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)
PATCH v2 7/8 tools: mkimage: Add: Kirkwood Boot Image support (kwbimage)
This is Third step towards cleaning mkimage code for kwbimage support in clean way.
This patch adds type kwbimabe support for mkimage For more details refer docs/README.kwbimage
This patch is tested with Sheevaplug board
Signed-off-by Prafulla Wadaskar <[email protected]>
---
Change log:
v2: typos corrected
missing functions tuned for foo () style
Makefile | 5 + common/image.c | 1 + doc/README.kwbimage | 93 +++++++++++++ include/image.h | 1 + tools/Makefile | 4 + tools/kwbimage.c | 364 +++++++++++++++++++++++++++++++++++++++++++++++++++ tools/kwbimage.h | 118 +++++++++++++++++ tools/mkimage.c | 2 + 8 files changed, 588 insertions(+), 0 deletions(-) create mode 100644 doc/README.kwbimage create mode 100644 tools/kwbimage.c create mode 100644 tools/kwbimage.h
Makefile +5 -0
@@ -314,6 +314,10 @@ $(obj)u-boot.img: $(obj)u-boot.bin sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ -d $< $@ +$(obj)u-boot.kwb: $(obj)u-boot.bin + $(obj)tools/mkimage -n $(KWD_CONFIG) -T kwbimage \ + -a $(TEXT_BASE) -e $(TEXT_BASE) -d $< $@ + $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)tools/ubsha1 $(obj)u-boot.bin
@@ -3671,6 +3675,7 @@ clobber: clean @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \ $(obj)cscope.* $(obj)*.*~ @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL) + @rm -f $(obj)u-boot.kwb @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes} @rm -f $(obj)cpu/mpc824x/bedbug_603e.c @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
common/image.c +1 -0
@@ -139,6 +139,7 @@ static table_entry_t uimage_type[] = { { IH_TYPE_SCRIPT, "script", "Script", }, { IH_TYPE_STANDALONE, "standalone", "Standalone Program", }, { IH_TYPE_FLATDT, "flat_dt", "Flat Device Tree", }, + { IH_TYPE_KWBIMAGE, "kwbimage", "Kirkwood Boot Image",}, { -1, "", "", }, };
doc/README.kwbimage new file +93 -0
93 lines not on this page · raw message
include/image.h +1 -0
@@ -155,6 +155,7 @@#define IH_TYPE_SCRIPT 6/* Script file */ #define IH_TYPE_FILESYSTEM 7/* Filesystem Image (any type) */ #define IH_TYPE_FLATDT 8/* Binary Flat Device Tree Blob */ +#define IH_TYPE_KWBIMAGE 9/* Kirkwood Boot Image */ /* * Compression Types
tools/Makefile +4 -0
@@ -172,6 +172,7 @@ $(obj)img2srec$(SFX): $(obj)img2srec.o $(obj)mkimage$(SFX): $(obj)mkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \ $(obj)default_image.o \ + $(obj)kwbimage.o \ $(obj)sha1.o $(LIBFDT_OBJS) $(obj)os_support.o $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(STRIP) $@
@@ -207,6 +208,9 @@ $(obj)image.o: $(SRCTREE)/common/image.c $(obj)default_image.o: $(SRCTREE)/tools/default_image.c $(CC) -g $(FIT_CFLAGS) -c -o $@ $< +$(obj)kwbimage.o: $(SRCTREE)/tools/kwbimage.c + $(CC) -g $(FIT_CFLAGS) -c -o $@ $< + $(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
tools/kwbimage.c new file +364 -0
364 lines not on this page · raw message
tools/kwbimage.h new file +118 -0
118 lines not on this page · raw message
tools/mkimage.c +2 -0
@@ -25,6 +25,7 @@#include "mkimage.h" #include <image.h> #include "default_image.h" +#include "kwbimage.h" static void copy_file (int ,const char *,int );static void usage (void );
@@ -59,6 +60,7 @@ static struct image_functions image_ftable[] = { {image_get_tparams,}, /* for IH_TYPE_SCRIPT */ {image_get_tparams,}, /* for IH_TYPE_STANDALONE */ {fitimage_get_tparams,}, /* for IH_TYPE_FLATDT */ + {kwbimage_get_tparams,}, /* for IH_TYPE_KWBIMAGE */ };int
Signature · 1 line
1.5.3.3