Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Problem with U-Boot Booting Image
PostPosted: Thu May 29, 2008 12:58 pm 
Offline

Joined: Thu May 29, 2008 10:36 am
Posts: 7
Location: Germany
Hello,

i've got a problem with u-boot bootloader on AT91SAM9263-EK.
I have change the kernelconfiguration (kernel 2.6.24) to use wireless LAN.
After cross compiling and building the uImage file i flashed the board. The Result after reboot:

U-Boot 1.1.5 (Apr 10 2008 - 20:12:24)

DRAM: 64 MB
NAND: NAND device: Manufacturer ID: 0xec, Chip ID: 0xda ( NAND 256MiB 3,3V 8-bit)
NAND: Pagesize: 2048, Blocksize: 128K, OOBsize: 64
256 MiB
DataFlash:AT45DB642
Nb pages: 8192
Page Size: 1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C0003FFF (RO)
Area 1: C0004000 to C0007FFF
Area 2: C0008000 to C0037FFF (RO)
Area 3: C0038000 to C083FFFF
In: serial
Out: serial
Err: serial
DM9161A PHY Detected
End of Autonegociation
Hit any key to stop autoboot: 0
## Booting image at 22200000 ...
Image Name: linux-2.6
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1600856 Bytes = 1.5 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... Bad Data CRC
U-Boot>

What can i do to get the right checksum?
Thanks for your help.

Stefan


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 29, 2008 11:55 pm 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 204
Location: USA
Hi there

Code:
## Booting image at 22200000 ...


That seems to be a rather high memory address.
I've been using 0x2008 0000.
Where is U-Boot located?


Quote:
After cross compiling and building the uImage file i flashed the board.


Assuming that you have a good mkimage, a uImage will always be created with a good checksum.
What exactly did you do when you "flashed the board"?
If you used 'tftpboot' in U-Boot to download the kernel image, then use the 'iminfo' command to verify the checksum before you write it to flash.


Regards


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 8:43 am 
Offline

Joined: Thu May 29, 2008 10:36 am
Posts: 7
Location: Germany
Hi,

Quote:
Where is U-Boot located?


U-Boot is located on data flash card in 0x8000. Linux Kernel in 0x40000.

Quote:
That seems to be rather high memory address.


Do i have to change the memory address in the u-boot envirement?

Quote:
What exactly did you do when you "flashed the board"?


I don't use 'ftpboot'. I use SAM-BA to write on data flash card. When i flashed the board, i wrote the uImage file on data flash in address 0x40000.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 10:27 am 
Offline

Joined: Mon May 28, 2007 5:02 pm
Posts: 50
Location: Walton-on-Thames, UK
The most likely problem is that you are not copying all of the kernel to RAM before trying to boot so you get a bad crc when U-boot checks it.



What is your u-boot environment?
U-boot>printenv


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 11:06 am 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 204
Location: USA
Hi there

Quote:
U-Boot is located on data flash card in 0x8000. Linux Kernel in 0x40000.


Okay, but what about U-Boot's location in SDRAM?
That is specified by the value of TEXT_BASE in board/at91sam9263ek/config.mk
You need to verify nothing is stepping on each other in SDRAM.


Quote:
Do i have to change the memory address in the u-boot envirement?


Asking that question is a red flag.
The output of a U-Boot 'printenv' command is needed.
What is the value of the "bootcmd" environment variable?

The "bootcmd" (apparently) should be something like:

bootcmd=cp.b c0040000 22200000 186d58; bootm 22200000

The destination of the copy command has to match the address of the 'bootm' command. The load address of 0x22200000 seems high to me.

The "186d58" is the length of your uImage in hex, as reported by the 'iminfo' command in your original post. The length to copy in the command can be bigger than the uImage. If it's shorter, then that's the cause of the checksum error.

It's a bit weird that the storage location that you have stored the uImage, 0x40000, is not at the start of the dataflash partition #3.

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 1:15 pm 
Offline

Joined: Thu May 29, 2008 10:36 am
Posts: 7
Location: Germany
Hi,

Quote:
Okay, but what about U-Boot's location in SDRAM?


TEXT_BASE = 0x23f00000

Quote:

Asking that question is a red flag


Sorry for asking such stupid questions. Its the first time i work with this board and with u-boot.


U-Boot> printenv
ethaddr=3a:1f:34:08:54:54
bootdelay=3
baudrate=115200
bootargs=mem=64M console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2
bootcmd= cp.b 0xC0040000 0x22200000 0x00159008; bootm 0x22200000
stdin=serial
stdout=serial
stderr=serial

Quote:
The destination of the copy command has to match the address of the 'bootm' command. The load address of 0x22200000 seems high to me


But it worked before i changed the kernelconfig. Wich address could be possible?


Quote:
It's a bit weird that the storage location that you have stored the uImage, 0x40000, is not at the start of the dataflash partition #3


I made the settings like they told on:
http://www.linux4sam.org/twiki/bin/view ... memory_map

Stefan


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 7:45 pm 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 204
Location: USA
Hi there

Sorry, I did not mean to imply that your questions are "stupid", but rather that it is a hint that you are not familiar with U-Boot's "bootcmd" or the copy command, 'cp' :

http://www.denx.de/wiki/view/DULG/UBootCmdGroupMemory#Section_5.9.2.4.

You should be able to figure out the solution from fingar's and my previous post. Ignore my comments on the various address issues.

Manually enter the new cp command, then a 'iminfo' to verify. Once you're sure of the values, use the 'setenv' and saveenv' commands to change and save the new environment variable "bootcmd".

(Be sure to escape the semicolon with a backslash when setting "bootcmd". That is, type
"setenv bootcmd xx xx xx xx \; xxx xxx ")


Regards


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 11:42 am 
Offline

Joined: Thu May 29, 2008 10:36 am
Posts: 7
Location: Germany
Hi there,

i tried to figure out the solution with your posts. Unfortunately with no result.
Following things i made.

Code:
U-Boot> setenv bootcmd cp.b 0xC0040000 0x20080000 0x171364\;0x20080000
U-Boot> saveenv
Saving Environment to dataflash...
U-Boot> printenv
ethaddr=3a:1f:34:08:54:54
bootdelay=3
baudrate=115200
bootargs=mem=64M console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2
stdin=serial
stdout=serial
stderr=serial
bootcmd=cp.b 0xC0040000 0x20080000 0x171364;0x20080000

Environment size: 228/16380 bytes


Result:
Code:
U-Boot> bootm 20080000
## Booting image at 20080000 ...
   Image Name:   linux-2.6
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1512292 Bytes =  1.4 MB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... Bad Data CRC
U-Boot>


Quote:
then a 'iminfo' to verify

There is no iminfo command.

Code:
U-Boot> help
?       - alias for 'help'
autoscr - run script from memory
base    - print or set address offset
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
cls     - clear screen
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
echo    - echo args to console
erase   - erase FLASH memory
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
tftpboot- boot image via network using TFTP protocol
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version
U-Boot>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 7:30 pm 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 204
Location: USA
blue_z wrote:
The "bootcmd" (apparently) should be something like:

bootcmd=cp.b c0040000 22200000 186d58; bootm 22200000



Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 04, 2008 8:31 am 
Offline

Joined: Thu May 29, 2008 10:36 am
Posts: 7
Location: Germany
:D

It could be so easy... Thanks a lot. It's working.

best regards
Stefan


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: