U-Boot 1.2 - Cannot run hello_world
A message that is not in the archive (sent off-list or not yet received): mailman.29221.1182256330.29999.u-boot-users@lists.sourceforge.net
Quoted 33 lines
Message: 2
Date: Mon, 18 Jun 2007 10:20:15 -0700
From: Arun Biyani <"abiyani@unix dot telasic dot
com"@unix.telasic.com>
Subject: Re: [U-Boot-Users] U-Boot 1.2 - Cannot runhello_world-
Coldfire
To: ganesh.patro at softdel.com
Cc: U-Boot-Users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowedQuoted 14 lines · Ganesh Chandra Patro
-----Original Message-----
From: u-boot-users-bounces at lists.sourceforge.net [mailto:u-boot-users-bounces at lists.sourceforge.net]On Behalf Of Arun Hi Arun,
There is a specific way to run a bin file. First you have to load to a specific memory location let's say0x2000. You have find the entry point address of the bin from it's symbol table and assuming the flash start address of the bin file 0, add0x2000to know the entry point address of the bin in the memory just loaded. Now say go "address" on the CLI. The program will run. Every time you load to a different address you need to find the actual physical address. That's why loading an ELF is easier than a bin from CLI. The same bin or srec can be burnt and run from the flash, but running a bin would involve this much to do be done.Quoted 3 lines
Thanks and Regards
Ganesh Chandra Patro
Ganesh, Thx for your response.
Quoted 8 lines
The program "
hello_world" is part of the release package. I've verified that the entry point is indeed "0x20000". So, the problem is something else. Can anyone think of what else
might be the cause? I have 2-3 previous posts on the same subject.The documentation does not talk about running "elf" files. Could someone give me a basic intro?
Arun
First check that your U-Boot implements the bootelf command, e.g. by typing it on the command line. If it is not found, add CFG_CMD_ELF to your U-Boot commands and rebuild U-Boot, e.g.
#define CONFIG_COMMANDS (CONFIG_CMD_DFL | CONFIG_CMD_ELF)
make
<re-install U-Boot>Now, get the ELF file into memory somewhere NOT where it is linked. I use tftpboot, but you could also burn it somewhere in your Flash. Use the bootelf command to run it. For example,
tftpboot <somewhere> hello_world
bootelf <somewhere>
Maybe 30000 is a good value for <somewhere> for your board. The address is the place in memory where the bootelf command reads the ELF file in order to load it to the address it is linked with. This is why it must be somewhere that won't be overwritten when it is loaded by bootelf.
Good luck,
Jude Miller
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
try to add CFG_CMD_CACHE to the CONFIG_COMMANDS, although this options is packed with warnings in the README file
2007/6/26, at unix dot telasic dot com"@unix.telasic.com Arun Biyani <"abiyani>:
Quoted 46 lines
Quoted 18 lines · Arun Biyani
When I add
CFG_CMD_ELFto the configuration, I get the error below. Maybe theCFG_CMD_ELFneeds
to be coupled with some other configuration option. Please help.My current definition is -
#define CONFIG_COMMANDS ( \ CONFIG_CMD_DFL | \ CFG_CMD_ELF | \ CFG_CMD_MII | \ CFG_CMD_JFFS2 | \ CFG_CMD_NET | \ CFG_CMD_DHCP | \ CFG_CMD_PING \ )The error I get is - (
dcache_status&dcache_disablemissing):Quoted 10 lines
/home/local/bin/../lib/gcc/m68k-uclinux/4.1.1/m5307/msep-data-lgcc \
-Map u-boot.map -o u-boot
common/libcommon.a(cmd_elf.o): In function `do_bootelf':/home/abiyani/wrk/u-boot-1.2.0/common/cmd_elf.c:62: undefined reference todcache_status' /home/abiyani/wrk/u-boot-1.2.0/common/cmd_elf.c:63: undefined reference todcache_disable'
make: *** [u-boot] Error 1
[u-boot-1.2.0$:1046]I get this error above if I add elf file support to u-boot for Coldfire processor. Looks like
cmd_elf.c
expectsdcache_disableanddcache_statusfunctions. Which library provides these symbol values?-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users