mkimage on 64bit
Hi.
Unless something like enclosed patch is applied, tools/mkimage cannot show image headers when built on 64bit platform, due to size problem of 'unsigned long'.
-dbu.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkimage64.patch
Type: text/x-patch
Size: 428 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060906/aa24f8ef/attachment.bin
Dear David,
Quoted 4 lines · in message <[email protected]> you wrote:
Unless something like enclosed patch is applied,
tools/mkimagecannot show image headers when built on 64bit platform, due to size problem of 'unsigned long'.
First, I think your patch is inconsequent:
Review
Quoted 5 lines
(quoted diff) +1
-1uint32_t pos; - unsigned long *len_ptr = (unsigned long *) ( + uint32_t *len_ptr = (uint32_t *) ( (unsigned long)hdr + sizeof(image_header_t) );
If you change the "unsigned long" in the first line, then you probably want to change the "(unsigned long)hdr", too.
From you patch it seems that on your platform a pointer to "unsigned long" is different from a pointer to uint32_t? Is this really the case?
I cannot confirm your problem on a 64 bit AMD Opteron system:
-> file ./mkimage
./mkimage: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped -> ./mkimage -l /tftpboot/ebony/uImage
Image Name: Linux-2.6.14-rc1-gd8ac1063 Created: Wed Sep 14 14:57:10 2005 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 947802 Bytes = 925.59 kB = 0.90 MB Load Address: 0x00000000 Entry Point: 0x00000000
So for me this works fine.
Can you please explain which sort of system you are working on, and what's going on there?
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Of all possible committee reactions to any given agenda item, the reaction that will occur is the one which will liberate the greatest amount of hot air. -- Thomas L. Martin