Atmel website | ARM Community | AVR freaks | Technical Support
Banner
Welcome to AT91SAM Community Forum
http://www.at91.com/samphpbb/

Linuxroot file system load failure
http://www.at91.com/samphpbb/viewtopic.php?f=9&t=20706
Page 1 of 1

Author:  pivodog [ Thu Mar 01, 2012 12:27 am ]
Post subject:  Linuxroot file system load failure

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:

Author:  CptTitanic [ Thu Mar 01, 2012 4:34 am ]
Post subject:  Re: Linuxroot file system load failure

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.

Author:  pivodog [ Thu Mar 01, 2012 4:11 pm ]
Post subject:  Re: Linuxroot file system load failure

unfortunately, I don't have a Ethernet port on this device. I only have the debug serial port and a USB port

Author:  CptTitanic [ Thu Mar 01, 2012 4:45 pm ]
Post subject:  Re: Linuxroot file system load failure

Doesn't uBoot support xmodem?

Have SAM-BA write data directly into NAND.

Author:  pivodog [ Fri Mar 02, 2012 4:25 pm ]
Post subject:  Re: Linuxroot file system load failure

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.

Author:  CptTitanic [ Fri Mar 02, 2012 6:37 pm ]
Post subject:  Re: Linuxroot file system load failure

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?

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/