summaryrefslogtreecommitdiff
path: root/tools/Makefile
diff options
context:
space:
mode:
authorPrafulla Wadaskar <prafulla@marvell.com>2009-08-19 17:36:46 +0530
committerWolfgang Denk <wd@denx.de>2009-09-10 22:58:48 +0200
commit89a4d6b12fd6394898b8a454cbabeaf1cd59bae5 (patch)
tree9cf4f2afe41f1206b11e8e58dbfce0af9e24973a /tools/Makefile
parent449609f5b11cce6beba7338bc4ce0f3345376a0b (diff)
downloadu-boot-imx-89a4d6b12fd6394898b8a454cbabeaf1cd59bae5.zip
u-boot-imx-89a4d6b12fd6394898b8a454cbabeaf1cd59bae5.tar.gz
u-boot-imx-89a4d6b12fd6394898b8a454cbabeaf1cd59bae5.tar.bz2
tools: mkimage: split code into core, default and FIT image specific
This is a first step towards reorganizing the mkimage code to make it easier to add support for additional images types. Current mkimage code is specific to generating uImage and FIT image files, but the same framework can be used to generate other image types like Kirkwood boot images (kwbimage-TBD). For this, the mkimage code gets reworked: Here is the brief plan for the same:- a) Split mkimage code into core and image specific support b) Implement callback functions for image specific code c) Move image type specific code to respective C files Currently there are two types of file generation/list supported (i.e uImage, FIT), the code is abstracted from mkimage.c/.h and put in default_image.c and fit_image.c; all code in these file is static except init function call d) mkimage_register API is added to add new image type support All above is addressed in this patch e) Add kwbimage type support to this new framework (TBD) This will be implemented in a following commit. Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Edit commit message, fix coding style and typos. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 6f36f23..858b0e8 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -183,8 +183,15 @@ $(obj)inca-swap-bytes$(SFX): $(obj)inca-swap-bytes.o
$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
$(STRIP) $@
-$(obj)mkimage$(SFX): $(obj)crc32.o $(obj)mkimage.o $(obj)image.o $(obj)md5.o $(obj)mkimage.o \
- $(obj)os_support.o $(obj)sha1.o $(LIBFDT_OBJS)
+$(obj)mkimage$(SFX): $(obj)crc32.o \
+ $(obj)default_image.o \
+ $(obj)fit_image.o \
+ $(obj)image.o \
+ $(obj)md5.o \
+ $(obj)mkimage.o \
+ $(obj)os_support.o \
+ $(obj)sha1.o \
+ $(LIBFDT_OBJS)
$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
$(STRIP) $@
@@ -200,6 +207,12 @@ $(obj)ubsha1$(SFX): $(obj)os_support.o $(obj)sha1.o $(obj)ubsha1.o
$(CC) $(CFLAGS) -o $@ $^
# Some files complain if compiled with -pedantic, use FIT_CFLAGS
+$(obj)default_image.o: $(SRCTREE)/tools/default_image.c
+ $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+
+$(obj)fit_image.o: $(SRCTREE)/tools/fit_image.c
+ $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+
$(obj)image.o: $(SRCTREE)/common/image.c
$(CC) -g $(FIT_CFLAGS) -c -o $@ $<