Skip to contentSkip to conversation

help: images in example directory are invalid

U-Boot-Users Benjamin Collar 2 participants 2 messages Sep 30, 2004

lore
Share & tools
lore
#0 lore raw

Hi Nicholas,

I've written to the u-boot this about this question, but thought I would write to you as well. u-boot is supposed to build valid stand-alone applications, and I do indeed get .srec stuff in the examples directory. (We did get past the loads problem, btw). However, these srecs are not valid images. (We also confirmed that what we're writing into ram and flash are actually being written -- the data dump shows the same data as we see with objdump).

After I loads the hello_world app, I check it with iminfo and get:
"bad magic number".

Using mkimage -l hello_world.srec, I get 'Bad Magic Number:
"hello_world.srec" is no valid image' I get the same result for hello_world (the elf format).

Using powerpc-linux-objdump -fs hello_world.srec, I see:

hello_world.srec: file format srec
architecture: UNKNOWN!, flags 0x00000000:

start address 0x00040004

Contents of section .sec1:

 40000 000182b0 9421ffd8 7c0802a6 429f0005  .....!..|...B...
 40010 bf610014 7fc802a6 9001002c 801efff0  .a.........,....
 40020 7c7c1b78 7fc0f214 7c832378 7c9b2378  ||.x....|.#x|.#x

Indeed, the first numbers there are not the magic number from image.h:
0x27051956. We tried to load a kernel, just for kicks (just because we're hopeful folk), but of course got the same result.

Do you have any idea how I'm doing this wrong? Why is u-boot creating invalid stand-alone images?

Thanks
Ben

Signature · 5 lines
Benjamin Collar
Siemens AG
CT SE 2
Embedded Linux
089-636-53711
#1 lore raw
Quoted 1 line · In message <1096543290.5348.64.camel@mhpajh5c> you wrote:

Hi Nicholas,

Who is Nicholas? No such name in the list of addresses you used.

Quoted 2 lines

I've written to the u-boot this about this question, but thought I would write to you as well. u-boot is supposed to build valid stand-alone

It's not only sup[posed to, it does.

Quoted 2 lines

After I loads the hello_world app, I check it with iminfo and get:
"bad magic number".

This is normale and not a problem. Or did you add a mkimage header?

Quoted 2 lines

Do you have any idea how I'm doing this wrong? Why is u-boot creating invalid stand-alone images?

I think you should really start reading the documentation. Ideally _before_ posting to the list.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"Now here's something you're really going to like!"
- Rocket J. Squirrel