public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] starting with u-boot
@ 2005-01-14  4:01 Zhu Yong
  2005-01-14  4:36 ` Sam Song
  2005-01-14 10:50 ` [U-Boot-Users] starting with u-boot Wolfgang Denk
  0 siblings, 2 replies; 13+ messages in thread
From: Zhu Yong @ 2005-01-14  4:01 UTC (permalink / raw)
  To: u-boot

Hi, 

I am a newbie to u-boot as well as embedded system development, I have problem to port u-boot to my board.

I have a customized board with Motorola MC9328MXL processor,  which is the same as mx1ads board. The hardware configurations as below:

CPU: Motorola Dragon Ball MXL microcontroller (ARM920T CPU Core)
CPU Core speed 192MHZ and System Speed 96MHz

RAM: 8M bytes
Ram address: 0x08000000 ---- 0x08800000

Flash: 2M Bytes
For bootup, 0x00000000 -- 0x00200000
For normal working, 0x10000000 -- 0x10200000

I/O:
1 Serial at UART 1
1 USB slave
No Ethernet

According to the above configs, I did the following modification to mx1ads.h

#define CFG_MEMTEST_START 0x08100000 /* memtest works on */
#define CFG_MEMTEST_END  0x08800000 /* 7 MB in DRAM */

#define CFG_LOAD_ADDR  0x08400000 /* default load address */

/*-----------------------------------------------------------------------
 * Physical Memory Map
 */

#define CONFIG_NR_DRAM_BANKS 1  /* we have 1 bank of SDRAM */
#define PHYS_SDRAM_1  0x08000000 /* SDRAM  on CSD0  */
#define PHYS_SDRAM_1_SIZE 0x00800000 /* 8 MB   */

#define CFG_MAX_FLASH_BANKS 1  /* 1 bank of SyncFlash  */
#define CFG_FLASH_BASE  0x00000000 /* SyncFlash on CSD1  */
#define FLASH_BANK_SIZE  0x00200000 /* 2 MB Total   */

/*-----------------------------------------------------------------------
 * FLASH and environment organization
 */

#define CONFIG_SYNCFLASH 1
#define PHYS_FLASH_SIZE  0x00200000
#define CFG_MAX_FLASH_SECT (8)
#define CFG_ENV_ADDR  (CFG_FLASH_BASE+0x00080000)

#define CFG_ENV_IS_IN_FLASH 1
#define CFG_ENV_SIZE  0x04000 /* Total Size of Environment Sector */
#define CFG_ENV_SECT_SIZE 0x040000

After compilation, I download the u-boot.bin to 0x08000000 with Trace32
Then set PC to 0x08000000 and run

But how can I know it running ok? The serial port doesn't have any data ( I monitored with oscilloscope)
And from the Trace32 Debugger, the CPU will keep looping at some point.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20050114/ad3bfdc2/attachment.htm 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] starting with u-boot
  2005-01-14  4:01 [U-Boot-Users] starting with u-boot Zhu Yong
@ 2005-01-14  4:36 ` Sam Song
  2005-01-14 10:47   ` Zhu Yong
  2005-01-14 10:50 ` [U-Boot-Users] starting with u-boot Wolfgang Denk
  1 sibling, 1 reply; 13+ messages in thread
From: Sam Song @ 2005-01-14  4:36 UTC (permalink / raw)
  To: u-boot

Zhu Yong <zhu.mm.yong@gmail.com> wrote?
> After compilation, I download the u-boot.bin to
> 0x08000000 with Trace32
> Then set PC to 0x08000000 and run

Pls try to program your u-booot.bin into FLASH and 
debug from there. The method of loading the image into

RAM to debug isn't recommonded to a newbie of U-Boot.
 
> But how can I know it running ok? The serial port
> doesn't have any data ( I monitored with
> oscilloscope) 

Well, the method you used made yourself on your own.
It shouldn't be surprised.

Pls try to avoid posting HTML message to this list.
Only PLAIN TEXT is welcome.

=====
Best regards,

Sam

_________________________________________________________
Do You Yahoo!?
150??MP3????????????
http://music.yisou.com/
???????????????????
http://image.yisou.com
1G??1000???????????
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] starting with u-boot
  2005-01-14  4:36 ` Sam Song
@ 2005-01-14 10:47   ` Zhu Yong
  2005-01-14 15:49     ` Wolfgang Denk
  2005-01-15  2:06     ` Sam Song
  0 siblings, 2 replies; 13+ messages in thread
From: Zhu Yong @ 2005-01-14 10:47 UTC (permalink / raw)
  To: u-boot

Now I burn the u-boot.bin into flash.

After reset the board, code stopped after some running.
I know that U-boot will copy code from flash to RAM after startup, but how
do I know if the data copied correctly?

Because I set TEXT_BASE to 0x08400000, I dumped data from flash as well as
RAM (from 0x08400000) with length equal to the size of u-boot.bin, the two
file are totally different.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] starting with u-boot
  2005-01-14  4:01 [U-Boot-Users] starting with u-boot Zhu Yong
  2005-01-14  4:36 ` Sam Song
@ 2005-01-14 10:50 ` Wolfgang Denk
  1 sibling, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2005-01-14 10:50 UTC (permalink / raw)
  To: u-boot

In message <001701c4f9ed$b51d2cd0$a1b9a8c0@ZhuYong> you wrote:
> 
> I am a newbie to u-boot as well as embedded system development, I have
> problem to port u-boot to my board.

Especially as a newbee you are expected  to  read  the  documentation
(README, DULG, and especially the FAQ section) _before_ posting.

> After compilation, I download the u-boot.bin to 0x08000000 with Trace32
> Then set PC to 0x08000000 and run

This is a FAQ. What you are doing is explicitely unsupported.
See http://www.denx.de/twiki/bin/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM

> Content-Type: text/html;
> 	charset?b2312"
> Content-Transfer-Encoding: quoted-printable
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

And please NEVER post HTML to this list.

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
If there was anything that depressed him more than his own  cynicism,
it was that quite often it still wasn't as cynical as real life.
                                 - Terry Pratchett, _Guards! Guards!_

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] starting with u-boot
  2005-01-14 10:47   ` Zhu Yong
@ 2005-01-14 15:49     ` Wolfgang Denk
  2005-01-15  2:06     ` Sam Song
  1 sibling, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2005-01-14 15:49 UTC (permalink / raw)
  To: u-boot

In message <000a01c4fa26$7c202840$a1b9a8c0@ZhuYong> you wrote:
> Now I burn the u-boot.bin into flash.

Good.

> After reset the board, code stopped after some running.

Analyze the "some running" part.

> I know that U-boot will copy code from flash to RAM after startup, but how
> do I know if the data copied correctly?

Rn the code under the debugger. You got a Trace32.  This  is  a  very
expensive tool (you can get several BDI2000's for it), so make use of
it. Set break points, single step etc. Use the tools you got.

> If content in flash and RAM are totally different, does it mean my RAM not
> initialized correctly? Or they are supposed to be different?

Naybe the code just crashed before copying the code,  maybe  anything
else  happened.  How could we know? It is YOU who is sitting in front
of a high-tech debugger. USE IT!!

> What's the possible reason to stuck at data_abort?

This can be anything. Debug your code.

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
Digital computers are themselves more complex than most things people
build: They have very large numbers of states. This makes conceiving,
describing, and testing them hard. Software systems  have  orders-of-
magnitude more states than computers do.           - Fred Brooks, Jr.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] starting with u-boot
  2005-01-14 10:47   ` Zhu Yong
  2005-01-14 15:49     ` Wolfgang Denk
@ 2005-01-15  2:06     ` Sam Song
  2005-01-15 13:18       ` Jeff Stevens
  1 sibling, 1 reply; 13+ messages in thread
From: Sam Song @ 2005-01-15  2:06 UTC (permalink / raw)
  To: u-boot

Zhu Yong <zhu.mm.yong@gmail.com> wrote?
> Because I set TEXT_BASE to 0x08400000, I dumped data
> from flash as well as RAM (from 0x08400000) with
> length equal to the size of u-boot.bin, the two
> file are totally different.

Seems wrong to me. 

> #define CFG_FLASH_BASE  0x00000000 /* SyncFlash on
CSD1  */
> #define FLASH_BANK_SIZE  0x00200000 /* 2 MB Total  
*/

You should set TEXT_BASE in the scope of 0x200000, one
address which reset vector locates in FLASH according
to your hardware configuration. 

Read the DOC Wolfgang suggested and search some  
related threads in this maillist archive and try:-)

Good Luck!

=====
Best regards,

Sam

_________________________________________________________
Do You Yahoo!?
150??MP3????????????
http://music.yisou.com/
???????????????????
http://image.yisou.com
1G??1000???????????
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] starting with u-boot
  2005-01-15  2:06     ` Sam Song
@ 2005-01-15 13:18       ` Jeff Stevens
  2005-01-16  1:42         ` Paul Ruhland
  2005-01-17 15:22         ` [U-Boot-Users] Loading Uboot Image from SDRAM Alireza Sadri
  0 siblings, 2 replies; 13+ messages in thread
From: Jeff Stevens @ 2005-01-15 13:18 UTC (permalink / raw)
  To: u-boot

I'm pretty sure TEXT_BASE should be set to the
beginning of U-Boot.  I am assuming that you are
running from Flash.  The TEXT_BASE you have set is 132
MB from the start of flash, which is only 2 MB.  So
I'm not sure what you are hitting at 0x08400000
(depends on your memory map).  So I would set
TEXT_BASE to wherever you are programming u-boot.bin
to.  For example in my system I have 128 MB of flash
residing at 0xf8000000.  I program U-Boot starting at
0xfff80000.  So my TEXT_BASE is set to 0xfff80000.

Hope it helps!

Jeff Stevens

--- Sam Song <samsongshu@yahoo.com.cn> wrote:

> Zhu Yong <zhu.mm.yong@gmail.com> wrote??
> > Because I set TEXT_BASE to 0x08400000, I dumped
> data
> > from flash as well as RAM (from 0x08400000) with
> > length equal to the size of u-boot.bin, the two
> > file are totally different.
> 
> Seems wrong to me. 
> 
> > #define CFG_FLASH_BASE  0x00000000 /* SyncFlash on
> CSD1  */
> > #define FLASH_BANK_SIZE  0x00200000 /* 2 MB Total 
> 
> */
> 
> You should set TEXT_BASE in the scope of 0x200000,
> one
> address which reset vector locates in FLASH
> according
> to your hardware configuration. 
> 
> Read the DOC Wolfgang suggested and search some  
> related threads in this maillist archive and try:-)
> 
> Good Luck!
> 
> =====
> Best regards,
> 
> Sam
> 
>
_________________________________________________________
> Do You Yahoo!?
> 150????MP3????????????????????????
> http://music.yisou.com/
> ??????????????????????????????????????
> http://image.yisou.com
> 1G????1000??????????????????????
>
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
> 
> 
>
-------------------------------------------------------
> The SF.Net email is sponsored by: Beat the
> post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt
> from ThinkGeek.
> It's fun and FREE -- well,
> almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] starting with u-boot
  2005-01-15 13:18       ` Jeff Stevens
@ 2005-01-16  1:42         ` Paul Ruhland
  2005-01-17 15:22         ` [U-Boot-Users] Loading Uboot Image from SDRAM Alireza Sadri
  1 sibling, 0 replies; 13+ messages in thread
From: Paul Ruhland @ 2005-01-16  1:42 UTC (permalink / raw)
  To: u-boot

On Saturday 15 January 2005 08:18 am, Jeff Stevens wrote:
> So I would set 
> TEXT_BASE to wherever you are programming u-boot.bin
> to.  For example in my system I have 128 MB of flash
> residing at 0xf8000000.  I program U-Boot starting at
> 0xfff80000.  So my TEXT_BASE is set to 0xfff80000.
>
Zhu Yong <zhu.mm.yong@gmail.com> wrote
> > You should set TEXT_BASE in the scope of 0x200000,
> > one
> > address which reset vector locates in FLASH
> > according
> > to your hardware configuration.
> >

What you describe may be how it works for PPC platforms but not for ARM.

For the ARM platforms, TEXT_BASE is the location of U-Boot in RAM.  You 
program the binary to the location your cpu executes on reset...the start of 
a flash bank.  This is for the few arm920 based SoCs I've worked on or seen.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] Loading Uboot Image from SDRAM
  2005-01-15 13:18       ` Jeff Stevens
  2005-01-16  1:42         ` Paul Ruhland
@ 2005-01-17 15:22         ` Alireza Sadri
  2005-01-17 16:04           ` richard at uclinux.net
                             ` (3 more replies)
  1 sibling, 4 replies; 13+ messages in thread
From: Alireza Sadri @ 2005-01-17 15:22 UTC (permalink / raw)
  To: u-boot

Hi , 

I need to load my new uboot image from SDRAM , not
from Flash. Is that possible and how can i do that?

Also , if this discussion has been done before, that
would be great if someone replies me with the link.

Regards,
Alireza Sadri.



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] Loading Uboot Image from SDRAM
  2005-01-17 15:22         ` [U-Boot-Users] Loading Uboot Image from SDRAM Alireza Sadri
@ 2005-01-17 16:04           ` richard at uclinux.net
  2005-01-17 18:04           ` Jerry Van Baren
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: richard at uclinux.net @ 2005-01-17 16:04 UTC (permalink / raw)
  To: u-boot

> Hi , 
> 
> I need to load my new uboot image from SDRAM , not
> from Flash. Is that possible and how can i do that?

And where does the SDRAM gets it u-boot image from????
So you have to load it into SDRAM first after every power-up?

And load from SDRAM to where? SDRAM???

Makes absolutely no sense to me (o;

> 
> Also , if this discussion has been done before, that
> would be great if someone replies me with the link.

Maybe time for you telling about your board specs and your intention
why to do it this strange way?


rick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] Loading Uboot Image from SDRAM
  2005-01-17 15:22         ` [U-Boot-Users] Loading Uboot Image from SDRAM Alireza Sadri
  2005-01-17 16:04           ` richard at uclinux.net
@ 2005-01-17 18:04           ` Jerry Van Baren
  2005-01-17 18:34           ` Wolfgang Denk
  2005-01-17 19:17           ` Bradley Remedios
  3 siblings, 0 replies; 13+ messages in thread
From: Jerry Van Baren @ 2005-01-17 18:04 UTC (permalink / raw)
  To: u-boot

Alireza Sadri wrote:
> Hi , 
> 
> I need to load my new uboot image from SDRAM , not
> from Flash. Is that possible and how can i do that?
> 
> Also , if this discussion has been done before, that
> would be great if someone replies me with the link.
> 
> Regards,
> Alireza Sadri.

Read the FAQ on the subject: 
<http://www.denx.de/twiki/bin/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM>

gvb

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] Loading Uboot Image from SDRAM
  2005-01-17 15:22         ` [U-Boot-Users] Loading Uboot Image from SDRAM Alireza Sadri
  2005-01-17 16:04           ` richard at uclinux.net
  2005-01-17 18:04           ` Jerry Van Baren
@ 2005-01-17 18:34           ` Wolfgang Denk
  2005-01-17 19:17           ` Bradley Remedios
  3 siblings, 0 replies; 13+ messages in thread
From: Wolfgang Denk @ 2005-01-17 18:34 UTC (permalink / raw)
  To: u-boot

In message <20050117152203.76982.qmail@web12822.mail.yahoo.com> you wrote:
> 
> I need to load my new uboot image from SDRAM , not
> from Flash. Is that possible and how can i do that?

This is possible, but not supported.

> Also , if this discussion has been done before, that
> would be great if someone replies me with the link.

No. It's the other way round. _You_ are supposed to read the
documentation and especially the FAQ section _before_ posting here.

See http://www.denx.de/twiki/bin/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM


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
Power is danger.
	-- The Centurion, "Balance of Terror", stardate 1709.2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot-Users] Loading Uboot Image from SDRAM
  2005-01-17 15:22         ` [U-Boot-Users] Loading Uboot Image from SDRAM Alireza Sadri
                             ` (2 preceding siblings ...)
  2005-01-17 18:34           ` Wolfgang Denk
@ 2005-01-17 19:17           ` Bradley Remedios
  3 siblings, 0 replies; 13+ messages in thread
From: Bradley Remedios @ 2005-01-17 19:17 UTC (permalink / raw)
  To: u-boot

On Mon, 17 Jan 2005 07:22:03 -0800 (PST), Alireza Sadri
<arsadri@yahoo.ca> wrote:
> I need to load my new uboot image from SDRAM , not
> from Flash. Is that possible and how can i do that?

Yes this is possible, however in most cases not a good idea (See the
links to the FAQs already posted.)

I've done this with our platform as we only have 4KB able to be booted
from (much much too small for U-Boot.)  So we have a primary
bootloader that comes up on boot, does all board and processor
initialization (including TLB's and SDRAM) required for the platform
and then loads a modified version of U-Boot into SDRAM.

In this case, U-Boot is only used as a ROM Loader and does not handle
many of the tasks that it would normally handle to normally bring-up
the board.  Additionally, in this case, the U-Boot Loader running from
SDRAM CANNOT be used as the only boot agent and will require another
boot agent to load it.

Regards,
-- 
Bradley Remedios
bremedios at gmail.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-01-17 19:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-14  4:01 [U-Boot-Users] starting with u-boot Zhu Yong
2005-01-14  4:36 ` Sam Song
2005-01-14 10:47   ` Zhu Yong
2005-01-14 15:49     ` Wolfgang Denk
2005-01-15  2:06     ` Sam Song
2005-01-15 13:18       ` Jeff Stevens
2005-01-16  1:42         ` Paul Ruhland
2005-01-17 15:22         ` [U-Boot-Users] Loading Uboot Image from SDRAM Alireza Sadri
2005-01-17 16:04           ` richard at uclinux.net
2005-01-17 18:04           ` Jerry Van Baren
2005-01-17 18:34           ` Wolfgang Denk
2005-01-17 19:17           ` Bradley Remedios
2005-01-14 10:50 ` [U-Boot-Users] starting with u-boot Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox