Skip to contentSkip to conversation

support usb storage in u-boot for at91rm9200

U-Boot-Users kiennd 3 participants 4 messages Sep 18, 2006 – Sep 19, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

kiennd

author
#1 lore raw

---------- Forwarded message ----------
From: kiennd <[email protected]>
Date: Sep 18, 2006 3:05 PM
Subject: support usb storage in u-boot for at91rm9200
To: u-boot-users at lists.sourceforge.net

Hi everybody!

I'm building u-boot bin file to load into ARM9 single board ( Atmel AT91RM9200 ).

With default functions ( command ) of u-boot version 1.1.4, u-boot is loaded into my board and run correctly.

Note: I use u-boot-1.1.4-g7213859d.tar.bz2<ftp://ftp.denx.de/pub/u-boot/u-boot-1.1.4-g7213859d.tar.bz2>downloaded from
ftp://ftp.denx.de/pub/u-boot/, I also try u-boot source from git repository
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git

But when i add some functions for usb storage ( i want to boot my debian os in compact flash ), u-boot can't start.

some lines added in include/configs/at91rm9200dk.h

############################################################

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_COMMANDS \
((CONFIG_CMD_DFL | CFG_CMD_MII | CFG_CMD_PING |

CFG_CMD_USB ) & \
                      ~(CFG_CMD_BDI | \
                        CFG_CMD_IMI | \
                        CFG_CMD_AUTOSCRIPT | \
                        CFG_CMD_FPGA | \
                        CFG_CMD_MISC | \
                        CFG_CMD_LOADS ))

/* For USB support */
#if (CONFIG_COMMANDS & CFG_CMD_USB)
#define CONFIG_USB_STORAGE
#define CONFIG_USB_OHCI
#define CONFIG_DOS_PARTITION
/*#define CONFIG_USB_KEYBOARD */
/*#define CFG_DEVICE_DEREGISTER */
/*#define CONFIG_SUPPORT_VFAT*/
#define LITTLEENDIAN
#endif /* CONFIG_COMMANDS & CFG_CMD_USB*/

############################################################

Then build u-boot.bin and load into. The terminal display :

######################################
1: Upload loader to Dataflash with vector 6 modification. 2: Upload u-boot to Dataflash.
3: Upload linux to Dataflash
4: Start U-boot
5: [nm] Identify Dataflash

[nm] dataflash_print_info :.id =
DataFlash:AT45DB321
Dataflash read successful: Starting U-boot
######################################
and stop here.... and I can't use u-boot.

Can you give me some suggestion. If possible, can you share me your u-boot.bin .

PS: I send you some attack files: one for my u-boot.bin ( can't start ), one for at91rm9200dk.h, one for my board picture. You check and give me some suggestion.

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060918/e027a5b4/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: at91rm9200dk.h
Type: application/octet-stream
Size: 10228 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060918/e027a5b4/attachment.obj

#2 lore raw
Quoted 63 lines

I'm building u-boot bin file to load into ARM9 single board ( Atmel AT91RM9200 ).

With default functions ( command ) of u-boot version 1.1.4, u-boot is loaded into my board and run correctly.

Note: I use u-boot-1.1.4-g7213859d.tar.bz2 <ftp://ftp.denx.de/pub/u-boot/u-boot-1.1.4-g7213859d.tar.bz2> downloaded from ftp://ftp.denx.de/pub/u-boot/, I also try u-boot source from git repository http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git
<http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git>

But when i add some functions for usb storage ( i want to boot my debian os in compact flash ), u-boot can't start.

some lines added in include/configs/at91rm9200dk.h

##############################
##############################

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_COMMANDS \
((CONFIG_CMD_DFL | CFG_CMD_MII | CFG_CMD_PING |

CFG_CMD_USB ) & \
                      ~(CFG_CMD_BDI | \
                        CFG_CMD_IMI | \
                        CFG_CMD_AUTOSCRIPT | \
                        CFG_CMD_FPGA | \
                        CFG_CMD_MISC | \
                        CFG_CMD_LOADS ))

/* For USB support */
#if (CONFIG_COMMANDS & CFG_CMD_USB)
#define CONFIG_USB_STORAGE
#define CONFIG_USB_OHCI
#define CONFIG_DOS_PARTITION
/*#define CONFIG_USB_KEYBOARD */
/*#define CFG_DEVICE_DEREGISTER */
/*#define CONFIG_SUPPORT_VFAT*/
#define LITTLEENDIAN
#endif /* CONFIG_COMMANDS & CFG_CMD_USB*/

############################################################

Then build u-boot.bin and load into. The terminal display :

######################################
1: Upload loader to Dataflash with vector 6 modification. 2: Upload u-boot to Dataflash.
3: Upload linux to Dataflash
4: Start U-boot
5: [nm] Identify Dataflash

[nm] dataflash_print_info :.id =
DataFlash:AT45DB321
Dataflash read successful: Starting U-boot
######################################
and stop here.... and I can't use u-boot.

Quoted 3 lines

Can you give me some suggestion. If possible, can you share me your u-boot.bin .

Your problem is that U-boot is linked to the wrong address (0). Instead it should be linked to the position, where you intend to run u-boot (in SDRAM)
I know Wolfgang Denx diesnt like the idea of running U.boot from RAM, but you cannot run from an SPI flash, have to copy to RAM first, and the SDRAM on AT91RM9200 is located at 0x20000000 and above.

The prinout you see, is not from U.boot.
It looks like a customized version of "dataflashboot.bin" It "bombs" after dataflashboot.bin has loaded u-boot into SDRAM and jumped to it starting point.

Since it is in the wrong locatgion, all the constant string pointers are off, and really only points at '\0' characters, so any attempt to printout data will fail.

You can get my u-boot at
ftp://at91dist:distib at ftp.atmel.fr/ in the "third Party" directory.

do:

make at91rm9200df_config

to get dataflash support.

This u-boot is based on the same source package, but with a number of modifications, all not acceptable to Wolfgang...

Quoted 16 lines

PS: I send you some attack files: one for my u-boot.bin ( can't start ), one for at91rm9200dk.h, one for my board picture. You check and give me some suggestion.

Thank you!

------------------------------------------------------------------------

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Quoted 6 lines

------------------------------------------------------------------------

_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ulf.vcf
Type: text/x-vcard
Size: 297 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060918/8f74c7ea/attachment.vcf

#3 lore raw
Quoted 7 lines

Your problem is that U-boot is linked to the wrong address (0). Instead it should be linked to the position, where you intend to run u-boot (in SDRAM)
I know Wolfgang Denx diesnt like the idea of running U.boot from RAM, but you cannot run from an SPI flash, have to copy to RAM first, and the SDRAM on AT91RM9200 is located at 0x20000000 and above.

Quoted 10 lines

The prinout you see, is not from U.boot.
It looks like a customized version of "dataflashboot.bin" It "bombs" after dataflashboot.bin has loaded u-boot into SDRAM and jumped to it starting point.

Since it is in the wrong locatgion, all the constant string pointers are off, and really only points at '\0' characters, so any attempt to printout data will fail.

If you are using Dataflash to store u-boot,
you can read this as well.
http://www.koansoftware.com/it/art.php?art=90
HTH

Signature · 6 lines
Marco Cavallini
Koan s.a.s. - Bergamo - ITALIA
Embedded and Real-Time Software Engineering
  - Atmel Third Party Consultant
Tel. +39-(0)35-255.235 - Fax +39-178-223.9748
www.KoanSoftware.com   |    www.KaeilOS.com
#4 lore raw

----- Original Message -----
From: "Marco Cavallini" <[email protected]>
To: "kiennd" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, September 19, 2006 7:59 AM
Subject: Re: [U-Boot-Users] support usb storage in u-boot for at91rm9200

Quoted 18 lines
Quoted 7 lines

Your problem is that U-boot is linked to the wrong address (0). Instead it should be linked to the position, where you intend to run u-boot (in SDRAM)
I know Wolfgang Denx diesnt like the idea of running U.boot from RAM, but you cannot run from an SPI flash, have to copy to RAM first, and the SDRAM on AT91RM9200 is located at 0x20000000 and above.

Quoted 10 lines

The prinout you see, is not from U.boot.
It looks like a customized version of "dataflashboot.bin" It "bombs" after dataflashboot.bin has loaded u-boot into SDRAM and jumped to it starting point.

Since it is in the wrong locatgion, all the constant string pointers are off, and really only points at '\0' characters, so any attempt to printout data will fail.

Quoted 6 lines

If you are using Dataflash to store u-boot,
you can read this as well.
http://www.koansoftware.com/it/art.php?art=90
HTH

The Atmel web site is unfortunately a little dated.
The ftp://at91dist:distrib at ftp.atmel.fr/ has more updated dataflashboot in the Third Party Section

Best Regards
Ulf Samuelsson ulf at atmel.com
Atmel Nordic AB

Mail:  Box 2033, 174 02 Sundbyberg, Sweden
Visit:  Kavalleriv?gen 24, 174 58 Sundbyberg, Sweden

Phone +46 (8) 441 54 22 Fax +46 (8) 441 54 29
GSM +46 (706) 22 44 57

Technical support when I am not available:
AT89 C51 Applications Group: mailto:micro.hotline at nto.atmel.com AT90 AVR Applications Group: mailto:avr at atmel.com AT91 ARM Applications Group: mailto:at91support at atmel.com FPSLIC Application Group: mailto:fpslic at atmel.com Best AVR link: www.avrfreaks.net