imximage: Add MX53 boot image support
PATCH v5 1/1 imximage: Add MX53 boot image support
This patch add the MX53 boot image support.
This patch has been tested on Freescale MX53EVK board and MX51EVK board.
---
Changes for v2:
- Address the following comments from Stefano,
- Get rid of #ifdef in the imximage.h and .c file and use the runtime check for imximage version
- Document the IMXIMAGE_VERSION definiton in doc/README.imximage
- Move mx53evk/config.mk and mx53evk/imximage.cfg to MX53EVK board support patch.
Changes for v3:
- Address the following comments from Stefano,
- Not change the mx51evk file. The code should take VERSION=1 as default, and we do not need to change the actual boards.
- add a note in the documentation and raise an error in code if the VERSION command is read after any other suitable commands.
- Change command IMXIMAGE_VERSION simply to IMAGE_VERSION
- Need recognize the version directly from its structure and not storing the version into the header when do header verify and print.
- Use function pointer to simpliy the code when the version of header is recognized
Changes for v4:
- Address the following comments from Wolfgang,
- Keep the imximage_cmds table sorted,
- Add braces for (expx) && (expy) gloably,
- Return failure to upper call if met errors for function
- Add comments for function set_dcd_rst_v1 alike,
- Re-orgnize code to avoid deep nesting,
Changes for v5:
- Remove the blank line before the only one line statement and
not using braces for the one line statment for the sake of the
same coding style of this file. For example,
if (!exp)
return ret; --- doc/README.imximage | 12 +- tools/imximage.c | 525 +++++++++++++++++++++++++++++++++++++-------------- tools/imximage.h | 110 +++++++++-- 3 files changed, 487 insertions(+), 160 deletions(-)
doc/README.imximage +10 -2
@@ -57,6 +57,13 @@ Configuration command line syntax: 2. Following are the valid command strings and associated data strings:- Command string data string -------------- ----------- + IMXIMAGE_VERSION 1/2 + 1 is for mx25/mx35/mx51 compatible, + 2 is for mx53 compatible, + others is invalid and error is generated. + This command need appear the fist before + other valid commands in configuration file. + BOOT_FROM nand/spi/sd/onenand Example: BOOT_FROM spi
@@ -69,8 +76,9 @@ Configuration command line syntax: Example (write to IOMUXC): DATA 4 0x73FA88a0 0x200 -The processor support up to 60 register programming commands. An error -is generated if more commands are found in the configuration file. +The processor support up to 60 register programming commands for IMXIMAGE_VERSION 1 +and 121 register programming commands for IMXIMAGE_VERSION 2. +An error is generated if more commands are found in the configuration file. 3. All commands are optional to program.
tools/imximage.c +387 -138
604 lines not on this page · raw message
tools/imximage.h +90 -20
153 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v5 1/1 imximage: Add MX53 boot image support
Hi, Wolfgang,
2011/1/20 Jason Liu <[email protected]>:
Quoted 40 lines
This patch add the MX53 boot image support.
This patch has been tested on Freescale MX53EVK board and MX51EVK board.
Signed-off-by Jason Liu <[email protected]>---
Changes for v2:
- Address the following comments from Stefano,
?- Get rid of ?#ifdef in theimximage.hand .c file and use ? ?the runtime check for imximage version
?- Document theIMXIMAGE_VERSIONdefiniton in doc/README.imximage ?- Movemx53evk/config.mkand mx53evk/imximage.cfg to MX53EVK board ? ?support patch.Changes for v3:
- Address the following comments from Stefano,
?- Not change the mx51evk file. The code should take VERSION=1 as default, ? and we do not need to change the actual boards.
?- add a note in the documentation and raise an error in code if the
? VERSION command is read after any other suitable commands.
?- Change commandIMXIMAGE_VERSIONsimply toIMAGE_VERSION
?- Need recognize the version directly from its structure and not storing the ? version into the header when do header verify and print.
?- Use function pointer to simpliy the code when the version of header is recognized Changes for v4:
- Address the following comments from Wolfgang,
?- Keep theimximage_cmdstable sorted,
?- Add braces for (expx) && (expy) gloably,
?- Return failure to upper call if met errors for function
?- Add comments for functionset_dcd_rst_v1alike,
?- Re-orgnize code to avoid deep nesting,
Changes for v5:
?- Remove the blank line before the only one line statement and
?not using braces for the one line statment for the sake of the
?same coding style of this file. For example,
?if (!exp)
? ? ? ?return ret;
---
Quoted 5 lines
?doc/README.imximage | ? 12 +- ?tools/imximage.c ? ?| ?525 +++++++++++++++++++++++++++++++++++++-------------- ?tools/imximage.h ? ?| ?110 +++++++++--?3 files changed, 487 insertions(+), 160 deletions(-)
Any feedback about this patch?
Quoted 6 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v5 1/1 imximage: Add MX53 boot image support
Le 25/01/2011 08:56, Jason Liu a ?crit :
Quoted 49 lines
Hi, Wolfgang,
2011/1/20 Jason Liu<[email protected]>:
Quoted 38 lines
This patch add the MX53 boot image support.
This patch has been tested on Freescale MX53EVK board and MX51EVK board.
Signed-off-by Jason Liu<[email protected]>---
Changes for v2:
- Address the following comments from Stefano,
- Get rid of #ifdef in theimximage.hand .c file and use the runtime check for imximage version
- Document theIMXIMAGE_VERSIONdefiniton in doc/README.imximage
- Movemx53evk/config.mkand mx53evk/imximage.cfg to MX53EVK board support patch.Changes for v3:
- Address the following comments from Stefano,
- Not change the mx51evk file. The code should take VERSION=1 as default, and we do not need to change the actual boards.
- add a note in the documentation and raise an error in code if the VERSION command is read after any other suitable commands.
- Change commandIMXIMAGE_VERSIONsimply toIMAGE_VERSION
- Need recognize the version directly from its structure and not storing the version into the header when do header verify and print.
- Use function pointer to simpliy the code when the version of header is recognized
Changes for v4:
- Address the following comments from Wolfgang,
- Keep theimximage_cmdstable sorted,
- Add braces for (expx)&& (expy) gloably,
- Return failure to upper call if met errors for function
- Add comments for functionset_dcd_rst_v1alike,
- Re-orgnize code to avoid deep nesting,
Changes for v5:
- Remove the blank line before the only one line statement and
not using braces for the one line statment for the sake of the
same coding style of this file. For example,
if (!exp)Quoted 7 lines
return ret; --- doc/README.imximage | 12 +- tools/imximage.c | 525 +++++++++++++++++++++++++++++++++++++-------------- tools/imximage.h | 110 +++++++++-- 3 files changed, 487 insertions(+), 160 deletions(-)
Quoted 1 line
Any feedback about this patch?
I think Stefano should be added in Cc: as IMX custodian.
Amicalement,
Signature · 1 line
Albert.
PATCH v5 1/1 imximage: Add MX53 boot image support
Quoted 4 lines · Albert ARIBAUD
Quoted 2 lines
Any feedback about this patch?
I think Stefano should be added in Cc: as IMX custodian.
I have already got it. This is the revisited patch that was too fast merged in u-boot-imx.
Jason, I have no remarks on it and for testing purpose I have already merged all pending imx patches into the next branch of u-boot-imx. If there will be no further comments, all these patches will be part of my next pull request.
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
PATCH v5 1/1 imximage: Add MX53 boot image support
In reply to Jason LiuQuoted 8 lines · Jason Liu
This patch add the MX53 boot image support.
This patch has been tested on Freescale MX53EVK board and MX51EVK board.
Signed-off-by Jason Liu <[email protected]>---
Applied to u-boot-imx, thanks
Regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================
[U-Boot] imximage: Create i.MX6 NOR flash images (was: [PATCH v5 1/1] imximage: Add MX53 boot image support)
In reply to Jason LiuHi Jason,
Quoted 7 lines · Jason Liu
This patch add the MX53 boot image support.
This patch has been tested on Freescale MX53EVK board and MX51EVK board.
Signed-off-by Jason Liu <[email protected]>
...
Quoted 4 lines
tools/imximage.c +0
-0
...
Quoted 4 lines
tools/imximage.c +4
-0+static void set_imx_hdr_v2 (struct imx_header *imxhdr,uint32_t dcd_len, +struct stat *sbuf, +struct mkimage_params *params) +{
...
tools/imximage.c
Quoted 2 lines
tools/imximage.c +2
-0+/* Set default offset */ + imxhdr->flash_offset =FLASH_OFFSET_STANDARD ;
I have some doubts that this hard coding (over writing) of imxhdr->flash_offset is correct here.
For booting from i.MX6 parallel NOR or NAND, flash_offset is != 0x400 (FLASH_OFFSET_STANDARD).
In parse_cfg_cmd() we read the correct flash offset valid for the selected boot device from the configuration:
case CMD_BOOT_FROM:imxhdr->flash_offset = get_table_entry_id(imximage_bootops,
"imximage boot option", token);
But this correct flash offset is afterwards overwritten by
imxhdr->flash_offset = FLASH_OFFSET_STANDARD;
as mentioned above, which I think is wrong. It doesn't matter for all devices which use FLASH_OFFSET_STANDARD (e.g. SD/SPI NOR etc), but it doesn't seem to work for parallel NOR and NAND.
What do you think?
I will need some time to verify this with a != 0x400 boot device, but as soon as I have this working I will send a patch for the imximage tool.
Best regards
Dirk
Btw.: I'm not sure if the same statement for the v1 header set_imx_hdr_v1() is wrong, too, though?