ARM: mxs: tools: Add mkimage support for MXS bootstream
Subsystems (2)
PATCH v2 1/1 ARM: mxs: tools: Add mkimage support for MXS bootstream
Add mkimage support for generating and verifying MXS bootstream. The implementation here is mostly a glue code between MXSSB v0.4 and mkimage, but the long-term goal is to rectify this and merge MXSSB with mkimage more tightly. Once this code is properly in U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage support.
Note that the mxsimage generator needs libcrypto from OpenSSL, I therefore enabled the libcrypto/libssl unconditionally.
MXSSB: http://git.denx.de/?p=mxssb.git;a=summary
The code is based on research presented at:
http://www.rockbox.org/wiki/SbFileFormat
--- arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg | 6 + arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg | 8 + common/image.c | 1 + config.mk | 6 + doc/README.mxsimage | 165 ++ include/image.h | 1 + tools/Makefile | 2 + tools/mkimage.c | 2 + tools/mkimage.h | 1 + tools/mxsimage.c | 2312 ++++++++++++++++++++++++++ tools/mxsimage.h | 203 +++ 11 files changed, 2707 insertions(+) create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg create mode 100644 doc/README.mxsimage create mode 100644 tools/mxsimage.c create mode 100644 tools/mxsimage.h
V2: Remove the time hack fixing timestamp at certain time
Enable -lssl and -lcrypto only if CONFIG_MX23/CONFIG_MX28 is set
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg new file +6 -0
@@ -0,0 +1,6 @@ +SECTION 0x0 BOOTABLE + TAG LAST + LOAD 0x0 spl/u-boot-spl.bin + CALL 0x14 0x0 + LOAD 0x40000100 u-boot.bin + CALL 0x40000100 0x0
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg new file +8 -0
@@ -0,0 +1,8 @@ +SECTION 0x0 BOOTABLE + TAG LAST + LOAD 0x0 spl/u-boot-spl.bin + LOAD IVT 0x8000 0x14 + CALL HAB 0x8000 0x0 + LOAD 0x40000100 u-boot.bin + LOAD IVT 0x8000 0x40000100 + CALL HAB 0x8000 0x0
common/image.c +1 -0
@@ -135,6 +135,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_SCRIPT, "script", "Script", }, { IH_TYPE_STANDALONE, "standalone", "Standalone Program", }, { IH_TYPE_UBLIMAGE, "ublimage", "Davinci UBL image",}, + { IH_TYPE_MXSIMAGE, "mxsimage", "Freescale MXS Boot Image",}, { -1, "", "", }, };
config.mk +6 -0
@@ -194,6 +194,12 @@ LDFLAGS_FINAL += --gc-sections endif # TODO(sjg at chromium.org): Is this correct on Mac OS? + +# MXSImage needs LibSSL +ifneq ($(CONFIG_MX23)$(CONFIG_MX28),) +HOSTLIBS += -lssl -lcrypto +endif + ifdef CONFIG_FIT_SIGNATURE HOSTLIBS += -lssl -lcrypto
doc/README.mxsimage new file +165 -0
165 lines not on this page · raw message
include/image.h +1 -0
@@ -212,6 +212,7 @@ struct lmb;#define IH_TYPE_AISIMAGE 13/* TI Davinci AIS Image */ #define IH_TYPE_KERNEL_NOLOAD 14/* OS Kernel Image, can run from any load address */ #define IH_TYPE_PBLIMAGE 15/* Freescale PBL Boot Image */ +#define IH_TYPE_MXSIMAGE 16/* Freescale MXSBoot Image */ /* * Compression Types
tools/Makefile +2 -0
@@ -83,6 +83,7 @@ NOPED_OBJ_FILES-y += aisimage.o NOPED_OBJ_FILES-y += kwbimage.o NOPED_OBJ_FILES-y += pblimage.o NOPED_OBJ_FILES-y += imximage.o +NOPED_OBJ_FILES-y += mxsimage.o NOPED_OBJ_FILES-y += image-host.o NOPED_OBJ_FILES-y += omapimage.o NOPED_OBJ_FILES-y += mkenvimage.o
@@ -209,6 +210,7 @@ $(obj)mkimage$(SFX): $(obj)aisimage.o \ $(obj)image-host.o \ $(FIT_SIG_OBJS) \ $(obj)imximage.o \ + $(obj)mxsimage.o \ $(obj)kwbimage.o \ $(obj)pblimage.o \ $(obj)md5.o \
tools/mkimage.c +2 -0
@@ -144,6 +144,8 @@ main (int argc, char **argv)init_kwb_image_type ();/* Init Freescale imx Boot image generation/list support */ init_imx_image_type (); +/* Init Freescale mxs Boot image generation/list support */ +init_mxs_image_type ();/* Init FIT image generation/list support */ init_fit_image_type ();/* Init TI OMAP Boot image generation/list support */
tools/mkimage.h +1 -0
@@ -158,6 +158,7 @@ void init_pbl_image_type(void);void init_ais_image_type (void );void init_kwb_image_type (void );void init_imx_image_type (void ); +void init_mxs_image_type (void );void init_default_image_type (void );void init_fit_image_type (void );void init_ubl_image_type (void );
tools/mxsimage.c new file +2312 -0
2,312 lines not on this page · raw message
tools/mxsimage.h new file +203 -0
203 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v3 1/1 ARM: mxs: tools: Add mkimage support for MXS bootstream
Add mkimage support for generating and verifying MXS bootstream. The implementation here is mostly a glue code between MXSSB v0.4 and mkimage, but the long-term goal is to rectify this and merge MXSSB with mkimage more tightly. Once this code is properly in U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage support.
Note that the mxsimage generator needs libcrypto from OpenSSL, I therefore enabled the libcrypto/libssl unconditionally.
MXSSB: http://git.denx.de/?p=mxssb.git;a=summary
The code is based on research presented at:
http://www.rockbox.org/wiki/SbFileFormat
--- arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg | 6 + arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg | 8 + common/image.c | 1 + config.mk | 6 + doc/README.mxsimage | 165 ++ include/image.h | 1 + tools/Makefile | 2 + tools/mkimage.c | 2 + tools/mkimage.h | 1 + tools/mxsimage.c | 2339 ++++++++++++++++++++++++++ tools/mxsimage.h | 230 +++ 11 files changed, 2761 insertions(+) create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg create mode 100644 doc/README.mxsimage create mode 100644 tools/mxsimage.c create mode 100644 tools/mxsimage.h
V2: Remove the time hack fixing timestamp at certain time
Enable -lssl and -lcrypto only if CONFIG_MX23/CONFIG_MX28 is set
V3: Checkpatch fixes for all but openssl
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg new file +6 -0
@@ -0,0 +1,6 @@ +SECTION 0x0 BOOTABLE + TAG LAST + LOAD 0x0 spl/u-boot-spl.bin + CALL 0x14 0x0 + LOAD 0x40000100 u-boot.bin + CALL 0x40000100 0x0
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg new file +8 -0
@@ -0,0 +1,8 @@ +SECTION 0x0 BOOTABLE + TAG LAST + LOAD 0x0 spl/u-boot-spl.bin + LOAD IVT 0x8000 0x14 + CALL HAB 0x8000 0x0 + LOAD 0x40000100 u-boot.bin + LOAD IVT 0x8000 0x40000100 + CALL HAB 0x8000 0x0
common/image.c +1 -0
@@ -135,6 +135,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_SCRIPT, "script", "Script", }, { IH_TYPE_STANDALONE, "standalone", "Standalone Program", }, { IH_TYPE_UBLIMAGE, "ublimage", "Davinci UBL image",}, + { IH_TYPE_MXSIMAGE, "mxsimage", "Freescale MXS Boot Image",}, { -1, "", "", }, };
config.mk +6 -0
@@ -194,6 +194,12 @@ LDFLAGS_FINAL += --gc-sections endif # TODO(sjg at chromium.org): Is this correct on Mac OS? + +# MXSImage needs LibSSL +ifneq ($(CONFIG_MX23)$(CONFIG_MX28),) +HOSTLIBS += -lssl -lcrypto +endif + ifdef CONFIG_FIT_SIGNATURE HOSTLIBS += -lssl -lcrypto
doc/README.mxsimage new file +165 -0
165 lines not on this page · raw message
include/image.h +1 -0
@@ -212,6 +212,7 @@ struct lmb;#define IH_TYPE_AISIMAGE 13/* TI Davinci AIS Image */ #define IH_TYPE_KERNEL_NOLOAD 14/* OS Kernel Image, can run from any load address */ #define IH_TYPE_PBLIMAGE 15/* Freescale PBL Boot Image */ +#define IH_TYPE_MXSIMAGE 16/* Freescale MXSBoot Image */ /* * Compression Types
tools/Makefile +2 -0
@@ -83,6 +83,7 @@ NOPED_OBJ_FILES-y += aisimage.o NOPED_OBJ_FILES-y += kwbimage.o NOPED_OBJ_FILES-y += pblimage.o NOPED_OBJ_FILES-y += imximage.o +NOPED_OBJ_FILES-y += mxsimage.o NOPED_OBJ_FILES-y += image-host.o NOPED_OBJ_FILES-y += omapimage.o NOPED_OBJ_FILES-y += mkenvimage.o
@@ -209,6 +210,7 @@ $(obj)mkimage$(SFX): $(obj)aisimage.o \ $(obj)image-host.o \ $(FIT_SIG_OBJS) \ $(obj)imximage.o \ + $(obj)mxsimage.o \ $(obj)kwbimage.o \ $(obj)pblimage.o \ $(obj)md5.o \
tools/mkimage.c +2 -0
@@ -144,6 +144,8 @@ main (int argc, char **argv)init_kwb_image_type ();/* Init Freescale imx Boot image generation/list support */ init_imx_image_type (); +/* Init Freescale mxs Boot image generation/list support */ +init_mxs_image_type ();/* Init FIT image generation/list support */ init_fit_image_type ();/* Init TI OMAP Boot image generation/list support */
tools/mkimage.h +1 -0
@@ -158,6 +158,7 @@ void init_pbl_image_type(void);void init_ais_image_type (void );void init_kwb_image_type (void );void init_imx_image_type (void ); +void init_mxs_image_type (void );void init_default_image_type (void );void init_fit_image_type (void );void init_ubl_image_type (void );
tools/mxsimage.c new file +2339 -0
2,339 lines not on this page · raw message
tools/mxsimage.h new file +230 -0
230 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v2 1/1 ARM: mxs: tools: Add mkimage support for MXS bootstream
In reply to Marek VasutQuoted 39 lines · Marek Vasut
Add mkimage support for generating and verifying MXS bootstream. The implementation here is mostly a glue code between MXSSB v0.4 and mkimage, but the long-term goal is to rectify this and merge MXSSB with mkimage more tightly. Once this code is properly in U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage support.
Note that the mxsimage generator needs libcrypto from OpenSSL, I therefore enabled the libcrypto/libssl unconditionally.
MXSSB: http://git.denx.de/?p=mxssb.git;a=summary
The code is based on research presented at:
http://www.rockbox.org/wiki/SbFileFormatSigned-off-by Marek Vasut <[email protected]>Cc Tom Rini <[email protected]>Cc Fabio Estevam <[email protected]>Cc Stefano Babic <[email protected]>Cc Otavio Salvador <[email protected]>--- arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg | 6 + arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg | 8 + common/image.c | 1 + config.mk | 6 + doc/README.mxsimage | 165 ++ include/image.h | 1 + tools/Makefile | 2 + tools/mkimage.c | 2 + tools/mkimage.h | 1 + tools/mxsimage.c | 2312 ++++++++++++++++++++++++++ tools/mxsimage.h | 203 +++ 11 files changed, 2707 insertions(+) create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg create mode 100644 doc/README.mxsimage create mode 100644 tools/mxsimage.c create mode 100644 tools/mxsimage.h
Quoted 2 lines
V2: Remove the time hack fixing timestamp at certain time
Enable -lssl and -lcrypto only if CONFIG_MX23/CONFIG_MX28 is set
I think this now breaks non-MX23/28 builds as we still build and try and link all of the crypto stuff. Please double check this with how Simon handled this for FIT signature stuff.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130819/06c8f5e3/attachment.pgp>
PATCH v2 1/1 ARM: mxs: tools: Add mkimage support for MXS bootstream
Dear Tom Rini,
Quoted 42 lines · Marek Vasut
Quoted 41 lines
Add mkimage support for generating and verifying MXS bootstream. The implementation here is mostly a glue code between MXSSB v0.4 and mkimage, but the long-term goal is to rectify this and merge MXSSB with mkimage more tightly. Once this code is properly in U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage support.
Note that the mxsimage generator needs libcrypto from OpenSSL, I therefore enabled the libcrypto/libssl unconditionally.
MXSSB: http://git.denx.de/?p=mxssb.git;a=summary
The code is based on research presented at:
http://www.rockbox.org/wiki/SbFileFormatSigned-off-by Marek Vasut <[email protected]>Cc Tom Rini <[email protected]>Cc Fabio Estevam <[email protected]>Cc Stefano Babic <[email protected]>Cc Otavio Salvador <[email protected]>---
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg | 6 + arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg | 8 + common/image.c | 1 + config.mk | 6 + doc/README.mxsimage | 165 ++ include/image.h | 1 + tools/Makefile | 2 + tools/mkimage.c | 2 + tools/mkimage.h | 1 + tools/mxsimage.c | 2312 ++++++++++++++++++++++++++ tools/mxsimage.h | 203 +++ 11 files changed, 2707 insertions(+) create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg create mode 100644 doc/README.mxsimage create mode 100644 tools/mxsimage.c create mode 100644 tools/mxsimage.h
Quoted 6 lines
Quoted 3 lines
V2: Remove the time hack fixing timestamp at certain time
Enable -lssl and -lcrypto only if CONFIG_MX23/CONFIG_MX28 is set
I think this now breaks non-MX23/28 builds as we still build and try and link all of the crypto stuff.
It will, but only if CONFIG_MX23/MX28 is selected, so what's the problem exactly?
Quoted 2 lines
Please double check this with how Simon
handled this for FIT signature stuff.
I wonder if we shouldn't just unconditionally link openssl anyway. But that's for another discussion.
Best regards,
Marek Vasut
PATCH v2 1/1 ARM: mxs: tools: Add mkimage support for MXS bootstream
Quoted 46 lines · Marek Vasut
Dear Tom Rini,
Quoted 44 lines · Marek Vasut
Quoted 43 lines
Add mkimage support for generating and verifying MXS bootstream. The implementation here is mostly a glue code between MXSSB v0.4 and mkimage, but the long-term goal is to rectify this and merge MXSSB with mkimage more tightly. Once this code is properly in U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage support.
Note that the mxsimage generator needs libcrypto from OpenSSL, I therefore enabled the libcrypto/libssl unconditionally.
MXSSB: http://git.denx.de/?p=mxssb.git;a=summary
The code is based on research presented at:
http://www.rockbox.org/wiki/SbFileFormatSigned-off-by Marek Vasut <[email protected]>Cc Tom Rini <[email protected]>Cc Fabio Estevam <[email protected]>Cc Stefano Babic <[email protected]>Cc Otavio Salvador <[email protected]>---
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg | 6 + arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg | 8 + common/image.c | 1 + config.mk | 6 + doc/README.mxsimage | 165 ++ include/image.h | 1 + tools/Makefile | 2 + tools/mkimage.c | 2 + tools/mkimage.h | 1 + tools/mxsimage.c | 2312 ++++++++++++++++++++++++++ tools/mxsimage.h | 203 +++ 11 files changed, 2707 insertions(+) create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg create mode 100644 arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg create mode 100644 doc/README.mxsimage create mode 100644 tools/mxsimage.c create mode 100644 tools/mxsimage.hV2: Remove the time hack fixing timestamp at certain time
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Enable -lssl and -lcrypto only if CONFIG_MX23/CONFIG_MX28 is set
I think this now breaks non-MX23/28 builds as we still build and try and link all of the crypto stuff.
It will, but only if CONFIG_MX23/MX28 is selected, so what's the problem exactly?
The code will still make calls that require those libraries, yes?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130819/a5f4dcaa/attachment.pgp>