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  [ 6 posts ] 
Author Message
 Post subject: Linuxroot file system load failure
PostPosted: Thu Mar 01, 2012 12:27 am 
Offline

Joined: Thu Mar 01, 2012 12:15 am
Posts: 3
I am trying load a file system ram disk and it keeps failing with the error:

RAMDISK gzip image found at block 0
RAMDISK: incomplete write (7993 != 32768)

I am creating the ram disk via the following commands:

#!/bin/sh
dd if=/dev/zero of=ramdisk/ramdisk bs=1k count=32768
mke2fs -F -v -m0 ramdisk/ramdisk
sudo mount -o loop ramdisk/ramdisk /mnt/ramdisk
sudo cp -av tmp/* /mnt/ramdisk
/root/images
sudo umount /mnt/ramdisk
cd ramdisk
gzip -9v ramdisk

I'm using SAM-BA to transfer the file to memory and then UBOOT to save into flash.

Linux kernel 2.6.36
AT91SAM9261 uP

I using a shareed drive between my linux distro and the XP machine. Both are VMs.


Does anybody have any suggestions?

I have tried it on a 8MB file image and it loads correctly.

:evil:


Top
 Profile  
 
 Post subject: Re: Linuxroot file system load failure
PostPosted: Thu Mar 01, 2012 4:34 am 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 784
Do you have enough free RAM to do this?

Why use SAM-BA and uBoot, both are capable of writing flash independently, and TFTP could be used to send data to uBoot directly?

Be cautious about the memory regions used to store/park the data, and whether you reset via AT91Bootstrap to get to uBoot after exiting SAM-BA, and that reconfigures the processor, bus, and SDRAM speeds/settings.

Try doing a read-back test of the data you have written, and confirm it made the round trip without getting corrupted.


Top
 Profile  
 
 Post subject: Re: Linuxroot file system load failure
PostPosted: Thu Mar 01, 2012 4:11 pm 
Offline

Joined: Thu Mar 01, 2012 12:15 am
Posts: 3
unfortunately, I don't have a Ethernet port on this device. I only have the debug serial port and a USB port


Top
 Profile  
 
 Post subject: Re: Linuxroot file system load failure
PostPosted: Thu Mar 01, 2012 4:45 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 784
Doesn't uBoot support xmodem?

Have SAM-BA write data directly into NAND.


Top
 Profile  
 
 Post subject: Re: Linuxroot file system load failure
PostPosted: Fri Mar 02, 2012 4:25 pm 
Offline

Joined: Thu Mar 01, 2012 12:15 am
Posts: 3
transferring a ~7MB file via serial @ 115200 would take forever thats why the designers are using USB/SAMBA. I was able to get around the error by changing the default RAM disk size to 40960 from the default 4K but, now I'm dealing with a Kernel panic - not syncing error while mounting the file system.


Top
 Profile  
 
 Post subject: Re: Linuxroot file system load failure
PostPosted: Fri Mar 02, 2012 6:37 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 784
No doubt it would take a while, but why do you even need uBoot to transfer this to the board? Does your board have a JTAG, or did they leave that off too?

Currently you're fighting symtoms, and trying to debug things, SAM-BA code is running in a totally different environment than AT91BootStrap & uBoot. The symtoms suggest the data is corrupt, or not in the right format/wrapping.

Have you written the image to NAND and verified it in SAM-BA?


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


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: