public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-09-30 13:02 kentropy
  2005-09-30 13:27 ` Wolfgang Denk
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: kentropy @ 2005-09-30 13:02 UTC (permalink / raw)
  To: u-boot

Hello,
I'm sorry but I am still facing to problems trying to replace the existing u-boot-0.3.2 with the latest 1.1.3 on a at91rm9200dk board.
I built u.boot
 make at91rm9200dk_config
 make
then I reomved R159 from the board and booted,
then I sent loader.bin (found on Atmel website)
then I send the just builded u-boot.bin
but at this point the AT91 system freezes showing few random characters on the serial console.

If I use the original u-boot.bin 0.3.2 everything is ok,
what am I missing ?

Thank you for your time

----

loader 1.0 (Aug  8 2003 - 12:01:07)                                             
                                                                                
XMODEM: Download U-BOOT                                                         
C                                                                               
U-Boot downloaded successfully                                                  
                                                                                
                                                                                
U-Boot 0.3.2 (Jun 24 2003 - 17:04:08)                                           
                                                                                
U-Boot code: 21F00000 -> 21F14160  BSS: -> 21F1FAEC                             
DRAM Configuration:                                                             
Bank #0: 20000000 32 MB                                                         
Atmel: AT49BV1614A (16Mbit)                                                     
Flash:  2 MB                                                                    
DataFlash:AT45DB642                                                             
Nb pages:   8192                                                                
Page Size:   1056                                                               
Size= 8650752 bytes                                                             
Logical address: 0xC0000000                                                     
Uboot>  

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-01  7:42 kentropy
  0 siblings, 0 replies; 25+ messages in thread
From: kentropy @ 2005-10-01  7:42 UTC (permalink / raw)
  To: u-boot

> Why are you doing this? If you have U-Boot running, you can just  use
> the  existing old version to download and install the new image. This
> is a trivial procedure.

Wolfgang, thank you for answering.
I have done as you suggested, but now the board don't boot (I am going to install the old u-boot)
I don't understand why the default configuration for at91rm9200dk is  don't work on my board, after 3 days I'm still unable to use 1.1.3 :-(
BTW the u-boot.gz I am sending here is created with gzip-ping u-boot.bin

These are the commands I've done:

Uboot> loadb 20000000
...SEND BOOT.BIN...
## Ready for binary (kermit) download to 0x20000000 at 115200 bps...                                                                    
## Total Size      = 0x00002908 = 10504 Bytes                                             
## Start Addr      = 0x20000000                               
Uboot> cp.b 20000000 10000000 5fff
Copy to Flash... done

Uboot> protect on 10000000 10005fff
Protected 3 sectors

Uboot> loadb 20000000
...SEND U-BOOT.GZ...
## Ready for binary (kermit) download to 0x20000000 at 115200 bps...
## Total Size      = 0x0000b9a9 = 47529 Bytes
## Start Addr      = 0x20000000

Uboot> protect off 10010000 1001ffff
Un-Protected 1 sectors

Uboot> erase 10010000 1001ffff
Erase Flash from 0x10010000 to 0x1001ffff Erasing sector  8 ... ok.
Erased 1 sectors

Uboot> cp.b 20000000 10010000 ffff
Copy to Flash... done

Uboot> protect on 10010000 1001ffff
Protected 1 sectors
Uboot>

...here resetting...

boot 1.0 (Aug  8 2003 - 12:29:00)
Uncompressing image...

...frozen...

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-01 12:24 kentropy
  2005-10-01 12:58 ` Wolfgang Denk
  0 siblings, 1 reply; 25+ messages in thread
From: kentropy @ 2005-10-01 12:24 UTC (permalink / raw)
  To: u-boot

> Why are you doing this? If you have U-Boot running, you can just use
> the existing old version to download and install the new image. This
> is a trivial procedure.

Wolfgang, thank you for answering.
I have done as you suggested, but now the board don't boot (I am going to install the old u-boot)
I don't understand why the default configuration for at91rm9200dk is don't work on my board, after 3 days I'm still unable to use 1.1.3 :-(
BTW the u-boot.gz I am sending here is created with gzip-ping u-boot.bin

These are the commands I've done:

Uboot> loadb 20000000
...SEND BOOT.BIN...
## Ready for binary (kermit) download to 0x20000000 at 115200 bps...
## Total Size = 0x00002908 = 10504 Bytes
## Start Addr = 0x20000000
Uboot> cp.b 20000000 10000000 5fff
Copy to Flash... done

Uboot> protect on 10000000 10005fff
Protected 3 sectors

Uboot> loadb 20000000
...SEND U-BOOT.GZ...
## Ready for binary (kermit) download to 0x20000000 at 115200 bps...
## Total Size = 0x0000b9a9 = 47529 Bytes
## Start Addr = 0x20000000

Uboot> protect off 10010000 1001ffff
Un-Protected 1 sectors

Uboot> erase 10010000 1001ffff
Erase Flash from 0x10010000 to 0x1001ffff Erasing sector 8 ... ok.
Erased 1 sectors

Uboot> cp.b 20000000 10010000 ffff
Copy to Flash... done

Uboot> protect on 10010000 1001ffff
Protected 1 sectors
Uboot>

...here resetting...

boot 1.0 (Aug 8 2003 - 12:29:00)
Uncompressing image...

...frozen...

TIA

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-01 22:01 kentropy
  2005-10-01 22:53 ` Wolfgang Denk
  0 siblings, 1 reply; 25+ messages in thread
From: kentropy @ 2005-10-01 22:01 UTC (permalink / raw)
  To: u-boot

> Why are you doing this? You should just store the u-boot.bin file  in
> flash. Forget about boot.bin - it is not needed.

Great news

> Wrong. Use the unmodified u-boot.bin file.

Yesssss.

> Wrong again. On ARM systems like the at91rm9200dk the reset vector is at address 0x000, so U-Boot must be stored at this address.
> 
> Copy the u-boot.bin image to the addresses starting at 0x0000.

As with every ARM based board, ok
I wondered why Atmel used a so tricky boot methos instead of using only u-boot ;-)

YEAH !
Now is perfect (except for a weird CRC error message:

U-Boot 1.1.3 (Sep 30 2005 - 15:33:58)

U-Boot code: 21F00000 -> 21F172AC  BSS: -> 21F1B968
RAM Configuration:
Bank #0: 20000000 32 MB
Atmel: AT49BV1614A (16Mbit)
Flash:  2 MB
DataFlash:AT45DB642
Nb pages:   8192
Page Size:   1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C0007FFF (RO)
Area 1: C0008000 to C001FFFF (RO)
Area 2: C0020000 to C0027FFF
Area 3: C0028000 to C083FFFF
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
U-Boot>

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-01 22:30 kentropy
  2005-10-01 22:57 ` Wolfgang Denk
  0 siblings, 1 reply; 25+ messages in thread
From: kentropy @ 2005-10-01 22:30 UTC (permalink / raw)
  To: u-boot

Now I have u-boot-1.1.3 on AT91RM9200DK, but something is still going wrong :-(

U-Boot 1.1.3 (Sep 30 2005 - 15:33:58)

U-Boot code: 21F00000 -> 21F172AC  BSS: -> 21F1B968
RAM Configuration:
Bank #0: 20000000 32 MB
Atmel: AT49BV1614A (16Mbit)
Flash:  2 MB
DataFlash:AT45DB642
Nb pages:   8192
Page Size:   1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0:	C0000000 to C0007FFF (RO)
Area 1:	C0008000 to C001FFFF (RO)
Area 2:	C0020000 to C0027FFF 
Area 3:	C0028000 to C083FFFF 
In:    serial
Out:   serial
Err:   serial
U-Boot> printenv

bootdelay=3
baudrate=115200
ethaddr=00:02:a5:6e:3f:fd
filesize=3638c0
fileaddr=21140000
netmask=255.255.255.0
ipaddr=192.168.0.184
serverip=192.168.0.11
bootargs=root=/dev/ram rw initrd=0x21100000,6000000 ramdisk_size=15360 console=ttyS0,115200 mem=32M
stdin=serial
stdout=serial
stderr=serial

Environment size: 294/8188 bytes
U-Boot> tftp 21000000 uImage

TFTP from server 192.168.0.11; our IP address is 192.168.0.184
Filename 'uImage'.
Load address: 0x21000000
Loading: *\b#################################################################
	 ##############################################################
done
Bytes transferred = 646841 (9deb9 hex)
U-Boot> tftp 21100000 ramdisk

TFTP from server 192.168.0.11; our IP address is 192.168.0.184
Filename 'ramdisk'.
Load address: 0x21100000
Loading: *\b#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #############################################
done
Bytes transferred = 3553472 (3638c0 hex)
U-Boot> bootm 21000000

## Booting image at 21000000 ...
   Image Name:   
   Image Type:   ARM Linux Kernel Image (gzip compressed)
   Data Size:    646777 Bytes = 631.6 kB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... 
[here is freezed]

Maybe into boot.bin there were some setting necessary for the system ?
AFAIK nobody (either Atmel) uses u-boot stored at the beginning of the flash (as many others ARM board producers do), but AT91 uses a pre-bootloader.
FYI, I have
ParallelFlash: AT49BV1614A
DataFlash: AT45DB642

Any help will be appreciated
TIA

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-02  7:36 kentropy
  2005-10-02  8:44 ` Wolfgang Denk
  0 siblings, 1 reply; 25+ messages in thread
From: kentropy @ 2005-10-02  7:36 UTC (permalink / raw)
  To: u-boot

> ...I did not see where you defined your "bootargs" variable, and  the
> correct  boot comand for using a ramdisk has two arguments instead of
> one.

Sorry I'm confused, why these settings won't be enough ?

U-Boot> printenv

bootdelay=3
baudrate=115200
ethaddr=00:02:a5:6e:3f:fd
filesize=3638c0
fileaddr=21140000
netmask=255.255.255.0
ipaddr=192.168.0.184
serverip=192.168.0.11
bootargs=root=/dev/ram rw initrd=0x21100000,6000000  
  ramdisk_size=15360 console=ttyS0,115200 mem=32M
stdin=serial
stdout=serial
stderr=serial

TIA

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-02 14:52 kentropy
  2005-10-02 19:58 ` Wolfgang Denk
  0 siblings, 1 reply; 25+ messages in thread
From: kentropy @ 2005-10-02 14:52 UTC (permalink / raw)
  To: u-boot

> Sorry, I missed this.
> Remove the initrd= and mem= part. U-Boot passes correct ATAGS
> to  the kernel.

Thank you again.
I followed your suggestions:

U-Boot> printenv
bootdelay=3
baudrate=115200
ethaddr=00:02:a5:6e:3f:fd
filesize=3638c0
fileaddr=21140000
netmask=255.255.255.0
ipaddr=192.168.0.184
serverip=192.168.0.11
bootargs=root=/dev/ram rw ramdisk_size=15360 console=ttyS0,115200
stdin=serial
stdout=serial
stderr=serial

U-Boot> tftp 21100000 ramdisk
TFTP from server 192.168.0.11; our IP address is 192.168.0.184
Filename 'ramdisk'.
Load address: 0x21100000
Loading: ###
.snip.
########
done
Bytes transferred = 3553472 (3638c0 hex)

U-Boot> tftp 21000000 uImage
TFTP from server 192.168.0.11; our IP address is 192.168.0.184
Filename 'uImage'.
Load address: 0x21000000
Loading: ##############################################
        #######################################
done
Bytes transferred = 646841 (9deb9 hex)

U-Boot> bootm
## Booting image at 21000000 ...
   Image Name:
   Image Type:   ARM Linux Kernel Image (gzip compressed)
   Data Size:    646777 Bytes = 631.6 kB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ...

[here is still freezed]

Every test I do I'm more confused.
Please apologize my question, but did you ever used an AT91RM9200DK board with u-boot (reading help and your site seems that you are a PPC expert but there is no examples using AT91) ?
Why Atmel give out and say to use boot.bin as pre-bootloader and you say not ?
Why the u-boot-1.1.3 default configuration for this board don't work ?
Maybe there is something missing or wrong ?
TIA

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-02 20:47 kentropy
  2005-10-02 21:56 ` Wolfgang Denk
  2005-10-02 22:15 ` Andrey P. Vasilyev
  0 siblings, 2 replies; 25+ messages in thread
From: kentropy @ 2005-10-02 20:47 UTC (permalink / raw)
  To: u-boot

Thank you again for your patience answering.

> The messages you showed make it clear that U-Boot *is*  running  fine
> on your board.

The thing I can't understand due to my inexperience is why using u-boot-0.3.2 with my kernel 2.6.13.2 everything worked
and simply changing u-boot-1.1.3 not.
So I suppose that the kernel is not the problem, but only the changed things: loader and u-boot.
Trying to guess: can the problem be caused by a different kind of SDRAM or Flash between my DK and your compatible one ?
TIA

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-03  8:58 kentropy
  2005-10-03  9:42 ` Wolfgang Denk
  0 siblings, 1 reply; 25+ messages in thread
From: kentropy @ 2005-10-03  8:58 UTC (permalink / raw)
  To: u-boot

>You should
> attach a debugger and  actually  try  to  *devbug*  this
>  insetad  of guessing (and blaming U-Boot).

Ok, I won't guess anymore ;-)
But I don't know how to debug it, I have no debuggers.

> One of the things that did change is the mach-types.h file;  
> if  your
> kernel  uses some invalid ID this could explain such a hang. 
> But this
> is wild guessing - please debug the problem.

I verified that entries 
MACH_TYPE_AT91RM9200 and MACH_TYPE_AT91RM9200DK
are the same you found in kernel 2.6.13
and tried replacing MACH_TYPE_AT91RM9200DK
MACHINE_START(MACH_TYPE_AT91RM9200DK
with
MACHINE_START(MACH_TYPE_AT91RM9200
in board-dk.c without success.

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-03 10:28 kentropy
  2005-10-03 13:13 ` Mirco Fuchs
  0 siblings, 1 reply; 25+ messages in thread
From: kentropy @ 2005-10-03 10:28 UTC (permalink / raw)
  To: u-boot

> > May be into boot.bin there were some setting necessary for the system ?
> 
> Nargh. Please forget boot.bin. You will not need it any more.
> 
> > AFAIK nobody (either Atmel) uses u-boot stored at the beginning of the flash
> > (as many others ARM board producers do), but AT91 uses a pre-bootloader.
> 
> I don't know where you got this "knowledge" from, but it is plain wrong.


Confusing news from AT91 website about boot.bin / loader.bin
[
You need to download a "boot.bin" into the first sector.
The boot.bin may need to know about which flash you are using.
loader.bin has the same problem.
.snip.
Ulf Samuelsson
]

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-03 13:26 kentropy
  0 siblings, 0 replies; 25+ messages in thread
From: kentropy @ 2005-10-03 13:26 UTC (permalink / raw)
  To: u-boot

> AFAIK loader.bin is used to download boot.bin to RAM location. 

Correct

> boot.bin itself is an u-boot binary image. 
> It is straight executed after
> downloading. Now it's possible to install a new u-boot version.

Definitely not.
BTW binary sizes are too different to say that
boot.bin is 10KB
loader.bin is 7KB
u-boot is 92KB

Referring to Atmel manuals boot.bin is a pre-loader ususlly stored at the beginning of flash (0x10000000) which calls u-boot (usually stored at 0x10010000).
You can found sources for loader.bin and boot.bin on Atmel CDROM and until last saturday on this website. 
http://www.at91.com/Pages/products/EvaluationBoard/AT91RM3400DK/at91rm3400dk.html#flash
Today these sources have been removed (I don't know why ?) 

^ permalink raw reply	[flat|nested] 25+ messages in thread
* [U-Boot-Users] Replacing AT91 u-boot
@ 2005-10-04  9:52 kentropy
  2005-10-13 17:23 ` Peter Menzebach
  0 siblings, 1 reply; 25+ messages in thread
From: kentropy @ 2005-10-04  9:52 UTC (permalink / raw)
  To: u-boot

Peter,
your explanation is fantastic ans exhaustive.

> Only for this procedure you have to remove R159!

Or if you destroy the existing u-boot in Parallel Flash ;-)


> I can definitely confirm, that u-boot-1.1.2 works fine in that case. If
> needed, I can send you the u-boot config.

Could you please send it to me ?


> Hope, that helps a step further...

Yes, sometimes help and readme aren't clear enough for newbies ;-)

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

end of thread, other threads:[~2005-10-13 17:23 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-30 13:02 [U-Boot-Users] Replacing AT91 u-boot kentropy
2005-09-30 13:27 ` Wolfgang Denk
2005-10-04  9:36 ` Peter Menzebach
2005-10-04  9:37 ` Peter Menzebach
  -- strict thread matches above, loose matches on Subject: below --
2005-10-01  7:42 kentropy
2005-10-01 12:24 kentropy
2005-10-01 12:58 ` Wolfgang Denk
2005-10-01 22:01 kentropy
2005-10-01 22:53 ` Wolfgang Denk
2005-10-01 22:30 kentropy
2005-10-01 22:57 ` Wolfgang Denk
2005-10-02  7:36 kentropy
2005-10-02  8:44 ` Wolfgang Denk
2005-10-02 14:52 kentropy
2005-10-02 19:58 ` Wolfgang Denk
2005-10-02 20:47 kentropy
2005-10-02 21:56 ` Wolfgang Denk
2005-10-02 22:15 ` Andrey P. Vasilyev
2005-10-03  8:58 kentropy
2005-10-03  9:42 ` Wolfgang Denk
2005-10-03 10:28 kentropy
2005-10-03 13:13 ` Mirco Fuchs
2005-10-03 13:26 kentropy
2005-10-04  9:52 kentropy
2005-10-13 17:23 ` Peter Menzebach

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