From: Wolfgang Denk Date: Wed, 06 Sep 2006 23:02:29 +0200 Subject: [U-Boot-Users] mkimage on 64bit In-Reply-To: Your message of "Wed, 06 Sep 2006 10:27:54 CDT." Message-ID: <20060906210229.6BE7F353C39@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear David, in message you wrote: > > 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'. First, I think your patch is inconsequent: > uint32_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 -- 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