[U-Boot-Users] helloworld app from flash?

Hi, im trying to run the helloworld application
1st Option: download the hello_world.bin to some location on RAM and execute it
OMAP5912OSK: tftpboot 0x10000000 hello_world.bin OMAP5912OSK: go 0x10000004
This works fine. no problem
2nd Option: I want to burn the hello_world.bin into flash. During startup i want u-boot to launch it after booting - just like the way it boots the kernel.
It does not work for me, this is what i did. $ ../tools/mkimage -A arm -O linux -T kernel -C gzip -a 0x10000000 -e 0x10000004 -n 'Hello Image' -d hello_world.bin.gz hello.img
I downloaded the hello.img and burnt it to 0x40000
I did: setenv bootcmd bootm 0x40000
Now when i restarted the boot i get the following:-
Example expects ABI version 2 Actual U-Boot ABI version 2 Hello World argc = 0 data abort pc : [<10000058>] lr : [<10000048>] sp : 1103fc10 ip : ffffffff fp : 00000001 r10: 110996d8 r9 : 1103fca4 r8 : 1103ffdc r7 : 110996d8 r6 : 00000203 r5 : 00000000 r4 : 00000000 r3 : 00000020 r2 : 00000001 r1 : 0000000a r0 : 00000000 Flags: nZCv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
All i am doing in the hello world example is to read a line and print the line entered.
I am using readline function for doing that.
The programs works fine if i download it to RAM and say go. but if i flash it it does not work?.
Am i missing something?.
Regards, sriram

In message 8bf247760607180211r7f92f1cbs58dd865100ab939e@mail.gmail.com you wrote:
im trying to run the helloworld application
And you did read the manual, right?
1st Option: download the hello_world.bin to some location on RAM and execute it
OMAP5912OSK: tftpboot 0x10000000 hello_world.bin OMAP5912OSK: go 0x10000004 This works fine. no problem
No, this doesn't work, at least not in the default configuration, because '0x10000000" is not the correct link / download adress.
2nd Option: I want to burn the hello_world.bin into flash. During startup i want u-boot to launch it after booting - just like the way it boots the kernel.
It does not work for me, this is what i did.
$ ../tools/mkimage -A arm -O linux -T kernel -C gzip -a 0x10000000 -e 0x10000004 -n 'Hello Image' -d hello_world.bin.gz hello.img
"-T kernel" says you that you are building a Linux kernel image. You are lying to U-Boot - what you give it is not a Linux kernel, but somethign else. U-Boot does not like liars, so it refuses to work for you.
Am i missing something?.
Yes, an understandign of image types.
Best regards,
Wolfgang Denk

Hi, Sorry, it was a mistrake.
Eventhough i had given -T standalone, i made a mistake duing mentioning it in by mail.
As far as the load address is concerned i have changed the LOAD_ADDR in the makefile LOAD_ADDR=0x10000000
I have flashed the image at 0x40000 and then given command bootm 0x40000
All im doing in the hello world example is accepting some data and printing it.
This works if i load the program directly into RAM using tftpboot and do go 0x10000000
However, the application works fine. ONLY problem is while returning back to the u-boot. i get a crash. do i have to do something special to safely return back to the u-boot?.
I just do a return 0.
I thank you for your patience.
Regards, sriram
[sriram@localhost examples]$ ../tools/mkimage -A arm -O linux -T standalone -C gzip -a 0x10000000 -e 0x10000004 -n 'Hello Image' -d hello_world.bin.gz hello.img Image Name: Hello Image Created: Tue Jul 18 17:05:09 2006 Image Type: ARM Linux Standalone Program (gzip compressed) Data Size: 1004 Bytes = 0.98 kB = 0.00 MB Load Address: 0x10000000 Entry Point: 0x10000004
OMAP5912 OSK # bootm 0x40000 ## Booting image at 00040000 ... Image Name: Hello Image Image Type: ARM Linux Standalone Program (gzip compressed) Data Size: 1004 Bytes = 1 kB Load Address: 10000000 Entry Point: 10000004 Verifying Checksum ... OK Uncompressing Standalone Application ... OK Example expects ABI version 2 Actual U-Boot ABI version 2 Hello World argc = 1 argv[0] = "0x40000" argv[1] = "<NULL>" MyPrompt:hi
entered:hi data abort pc : [<100004c0>] lr : [<00000005>] sp : 1103fc54 ip : ffffffff fp : 00000002 r10: 00040000 r9 : 00000000 r8 : 1103ffdc r7 : 1fffffe0 r6 : 00000000 r5 : 100004c0 r4 : fffffcbf r3 : 00000020 r2 : 00000001 r1 : 0000000a r0 : 00000000 Flags: nzcv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
On 7/18/06, Wolfgang Denk wd@denx.de wrote:
In message 8bf247760607180211r7f92f1cbs58dd865100ab939e@mail.gmail.com you wrote:
im trying to run the helloworld application
And you did read the manual, right?
1st Option: download the hello_world.bin to some location on RAM and execute it
OMAP5912OSK: tftpboot 0x10000000 hello_world.bin OMAP5912OSK: go 0x10000004 This works fine. no problem
No, this doesn't work, at least not in the default configuration, because '0x10000000" is not the correct link / download adress.
2nd Option: I want to burn the hello_world.bin into flash. During startup i want u-boot to launch it after booting - just like the way it boots the kernel.
It does not work for me, this is what i did.
$ ../tools/mkimage -A arm -O linux -T kernel -C gzip -a 0x10000000 -e 0x10000004 -n 'Hello Image' -d hello_world.bin.gz hello.img
"-T kernel" says you that you are building a Linux kernel image. You are lying to U-Boot - what you give it is not a Linux kernel, but somethign else. U-Boot does not like liars, so it refuses to work for you.
Am i missing something?.
Yes, an understandign of image types.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de It would be illogical to assume that all conditions remain stable -- Spock, "The Enterprise" Incident", stardate 5027.3

Hi, I encounter a weird problems, I found my code works fine on the 440EPX iic0, while I can't make the iic1 work, why? Is the IIC1 need additional initialzation to make it work? however so far I found IIC0 and IIC1 are using the same code. No answer I found from the CPU user manual. ,Thanks- Denny

In message 12992415.836201188908728200.JavaMail.coremail@bj163app65.163.com you wrote:
Hi, I encounter a weird problems, I found my code works fine on the 440EPX iic0, while I can't make the iic1 work, why? Is the IIC1 need additional initialzation to make it work? however so far I found IIC0 and IIC1 are using the same code. No answer I found from the CPU user manual. ,Thanks- Denny
Which exact version of U-Boot are you referring to?
Content-Type: text/html; charset=gbk Content-Transfer-Encoding: quoted-printable
I asked you before (several times, actually) to use a line legth of70 characters max, and to stop posting HTML.
Please respect the rules of this mailing list!
Best regards,
Wolfgang Denk

The issue is resolved, thanks all. Btw,Sorry for posting the HTML which isn't what I expect. Even if I changed to my work email box, still keep posting HTML,I will also check more on my machine to resolve this problem. ,Regards - Denny

Dear Ram!
Ram schrieb:
It does not work for me, this is what i did.
$ ../tools/mkimage -A arm -O linux -T kernel -C gzip -a 0x10000000 -e 0x10000004 -n 'Hello Image' -d hello_world.bin.gz hello.img
I downloaded the hello.img and burnt it to 0x40000
It is quite amusing to notice that you still refuse to read any documentation. Do you really understand what your invocation of mkimage does?
Andreas Schweigstill
participants (4)
-
Andreas Schweigstill
-
jxnuxdy
-
Ram
-
Wolfgang Denk