Hi,
I am using a AT91SAM9263-EK .The board was already ported with bootloader,kernel and filesystem.I am new to porting embedded boards and wanted to port my own kernel and filesystem into its nand flash but I got stuck as below .Steps that followed :
Step 1 :Configured tftpsever in host.Created /tftpboot directory,copied uImage,ramdisk.gz into it.
Step 2 :Set the environment variables as follows
Quote:
bootdelay=3
baudrate=115200
ethact=macb0
ethaddr=12:34:56:78:90:22
bootcmd=run nf_kernel;run boot
ramdisk=run nf_kernel;run tftp_ramdisk;run ramdisk_evset; run boot
tftp_ramdisk=tftp 21100000 ramdisk.gz
boot=bootm 22200000
filesize=176FDC
fileaddr=22200000
ipaddr=192.168.1.56
serverip=192.168.2.239
nf_kernel=nand read 22200000 2100000 200000
bootargs mem=64M console=ttyS0 115200 root=/dev/mtdblock1 rw rootfstype=jffs2
ramdisk_evset=setenv bootargs mem=64M console=ttyS0 115200 root=/dev/ram0 initrd=0x211000000,0x600000
|
Step 3 :Transferred uImage via TFTP
Code:
U-Boot> tftp 22200000 uImage
< Trying to write uImage to nand >
[QUOTE]NAND erase: device 0 whole chip
Skipping bad block at 0x02000000
Erasing at 0x3ffc000 -- 100% complete.
OK[/QUOTE
<Its showing a bad sector at location 2000000.>
Code:
U-Boot> nand write 22200000 2100000 200000
Quote:
NAND write: device 0 offset 0x2100000, size 0x200000
2097152 bytes written: OK
|
Step 4 : When I give command to run ramdisk to boot the board with ramdisk filesystem,
Code:
u-boot> run ramdisk
its showing loading ramdisk.gz from tftp success and will start uncompressing linux
Quote:
## Booting kernel from Legacy Image at 22200000 ...
Image Name: Linux 2.6.20
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1535900 Bytes = 1.5 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK Starting kernel ..
|
.
But finally its showing error,
Quote:
“No filesystem could mount root, tried: ext2 vfat romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) ''
|
I think the problem is filesystem have been corrupted.
My plan was to load my filesystem as follows:
After booting the board with ramdisk ,connect the USB device (that contain 9263-mtblock1.jffs2 and 9263-mtblock2.jffs2 filesystem images), mount it and write it to nand as follows
$ nandwrite -p /dev/mtd1 /mnt/nfs/9263-mtblock1.jffs2
Similarly
$ nandwrite -p /dev/mtd2 /mnt/nfs/9263-mtblock2.jffs2
But since I am stuck in booting the board with ramdisk,I cannot port my filesystem.
Can anyone help me how to proceed..