[U-Boot-Users] [PATCH] Add option -p to mkimage to align an image to word boundary

CHANGELOG: * Add option -p to mkimage for always alligning an image to word boundary.
This patch adds a feature to tools/mkimage.c by making it possible to always align a filesystem image to word boundary. Images created with this option are always aligned on word boundary and will always correctly be loaded with the ARM RVDS when using raw mode (Raw data one word per word of memory). Images created without this option will not boot with u-boot and abort with "Data CRC error". This situation has been reported several times on this maillinglist.
It is tested against todays git repository.
Signed-off-by: Jean-Paul Saman jean-paul.saman@nxp.com
Kind greetings,
Jean-Paul Saman
NXP Semiconductors CTO/RTG DesignIP Philips HighTech Campus, building WDA 3.29 Professor van den Holstlaan 4 5655 AA Eindhoven tel: +31 (0)40 27 45131

Would anybody be bothered if mkimage _always_ aligned images? That way we could loose the third argument of copy_file, as well as the new -p flag. - Amnon
On 3/2/07, Jean-Paul Saman jean-paul.saman@nxp.com wrote:
CHANGELOG:
- Add option -p to mkimage for always alligning an image to word boundary.
This patch adds a feature to tools/mkimage.c by making it possible to always align a filesystem image to word boundary. Images created with this
option are always aligned on word boundary and will always correctly be loaded with the ARM RVDS when using raw mode (Raw data one word per word of memory). Images created without this option will not boot with u-boot and abort with "Data CRC error". This situation has been reported several times on this maillinglist.
It is tested against todays git repository.
Signed-off-by: Jean-Paul Saman < jean-paul.saman@nxp.com>
Kind greetings,
Jean-Paul Saman
NXP Semiconductors CTO/RTG DesignIP Philips HighTech Campus, building WDA 3.29 Professor van den Holstlaan 4 5655 AA Eindhoven tel: +31 (0)40 27 45131
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=D... _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

In message ab648d4b0703020620w312211fbp6608df104abbc1ce@mail.gmail.com you wrote:
Would anybody be bothered if mkimage _always_ aligned images?
Images are already always aligned.
That way we could loose the third argument of copy_file, as well as the new -p flag.
Why should we add padding bytes? Nobody needs them.
Best regards,
Wolfgang Denk

In message OFD9437230.22326F6B-ONC1257292.00465732-C1257292.0047638F@philips.com you wrote:
CHANGELOG:
- Add option -p to mkimage for always alligning an image to word boundary.
Images are already aligned. They have a 64 byte header prepended.
This patch adds a feature to tools/mkimage.c by making it possible to always align a filesystem image to word boundary. Images created with this option are always aligned on word boundary and will always correctly be loaded with the ARM RVDS when using raw mode (Raw data one word per word
I don't get what you're trying to tell.
Looking at your patch, it seems you're confusing padding to a multiuple of 32 bit words with alignment - note these are completely different things.
of memory). Images created without this option will not boot with u-boot and abort with "Data CRC error". This situation has been reported several times on this maillinglist.
Has it? I have never seen it. Do you have a reference?
It is tested against todays git repository.
You patch is not acceptable; the description is wrong both in the log and in the help message, it has coding style violations (indentation not by TAB etc.) and spelling errors.
Also, I'm not sure if this is really a mkimage problem.
Best regards,
Wolfgang Denk

wd@denx.de wrote on 02-03-2007 16:10:06:
In message <OFD9437230.22326F6B-ONC1257292.00465732-C1257292. 0047638F@philips.com> you wrote:
CHANGELOG:
- Add option -p to mkimage for always alligning an image to word
boundary.
Images are already aligned. They have a 64 byte header prepended.
I was not talking about the header, but about the resulting image. Maybe aligning is the wrong english word for this.
This patch adds a feature to tools/mkimage.c by making it possible to always align a filesystem image to word boundary. Images created with
this
option are always aligned on word boundary and will always correctly
be
loaded with the ARM RVDS when using raw mode (Raw data one word per
word
I don't get what you're trying to tell.
Maybe my english is not correct (I am not a native english speaker). Let me try again:
Sometimes an ramdisk image created with mkimage has a size not a multiple of 32 bit words. Loading such an image with the ARM RVDS in "raw word mode" directly into the main memory, later on results in a CRC checksum failure detected by u-boot (eg: using bootm ). The cause is that the ARM RVDS doesn't upload the last bytes if they are not a multiple of 32 bit words. The error is in ARM RVDS and not in mkimage, hence I named it a new options/addition.
Looking at your patch, it seems you're confusing padding to a multiuple of 32 bit words with alignment - note these are completely different things.
I mean padding to a multiple of 32 bit words.
of memory). Images created without this option will not boot with
u-boot
and abort with "Data CRC error". This situation has been reported
several
times on this maillinglist.
Has it? I have never seen it. Do you have a reference?
Here is a report from a guy, probably using ARM RVDS (however not clear from his description). http://sourceforge.net/mailarchive/message.php?msg_id=8559627
I remember there were a few more at the end of last year but fail to find them. Here is another reference from another mailinglist: http://lists.gro.clinux.org/pipermail/skyeye-developer/2006-March/000915.htm...
It is tested against todays git repository.
You patch is not acceptable; the description is wrong both in the log and in the help message, it has coding style violations (indentation not by TAB etc.) and spelling errors.
The indentation and spelling can be fixed.
Also, I'm not sure if this is really a mkimage problem.
I never said it was a mkimage problem.
Best regards,
Wolfgang Denk
Kind greetings,
Jean-Paul Saman
NXP Semiconductors CTO/RTG DesignIP Philips HighTech Campus, building WDA 3.29 Professor van den Holstlaan 4 5655 AA Eindhoven tel: +31 (0)40 27 45131
participants (3)
-
Amnon Cohen
-
Jean-Paul Saman
-
Wolfgang Denk