mkimxboot: factor code, add support for ELF files

Refactor code.
This tool can now either load a scrambled rockbox
firmware (in which case the model is check against the
firmware), or any ELF file. This is useful for example
for hwstub which produces a ELF file and still needs
to be loaded by producing a SB file.

Change-Id: I7aa381b3f6587788d1950793e89ce5608c53cccc
This commit is contained in:
Amaury Pouly 2013-06-16 01:33:16 +02:00
parent 7c7fa36918
commit d561017f35
3 changed files with 150 additions and 33 deletions

View file

@ -13,7 +13,7 @@ CFLAGS += -std=c99 -g -O3
OUTPUT = mkimxboot
# inputs for lib
IMXTOOLS_SOURCES = misc.c sb.c crypto.c crc.c aes128.c sha1.c
IMXTOOLS_SOURCES = misc.c sb.c crypto.c crc.c aes128.c sha1.c elf.c
LIBSOURCES := dualboot.c mkimxboot.c md5.c \
$(addprefix $(IMXTOOLS_DIR),$(IMXTOOLS_SOURCES))
# inputs for binary only