Hi,
I am using a AT91SAM9263-EK .The board was already ported with
bootloader,kernel and filesystem.I am new to porting the embeeded boards and
wanted to port my own kernel and filesystem into its nand flash but I got stuck
as below .
Steps followed :
Step 1 :Configured tftpsever in host.Created /tftpboot directory,copied
uImage,ramdisk.gz into it.
Step 2 :Set the environment variables as follows
bootdelay=3
baudrate5200
ethact=macb0
ethaddr: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
filesize6FDC
fileaddr"200000
ipaddr2.168.1.56
serverip2.168.2.239
nf_kernel=nand read 22200000 2100000 200000
bootargs memdM console=ttyS0 115200 root=/dev/mtdblock1 rw rootfstype=jffs2
ramdisk_evset=setenv bootargs memdM console=ttyS0 115200 root=/dev/ram0
initrd=0x211000000,0x600000
Step 3 :Transferred uImage via TFTP
U-Boot> tftp 22200000 uImage
< Trying to write uImage to nand >
U-Boot> nand erase
NAND erase: device 0 whole chip
Skipping bad block at 0x02000000
Erasing at 0x3ffc000 -- 100% complete.
OK
U-Boot> nand write 22200000 2100000 200000
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,
U-Boot> run ramdisk
NAND read: device 0 offset 0x0, size 0x200000
2097152 bytes read: OK
macb0: link up, 100Mbps full-duplex (lpa: 0xc5e1)
Using macb0 device
TFTP from server 192.168.2.239; our IP address is 192.168.1.56
Filename 'ramdisk.gz'.
Load address: 0x21100000
Loading: #################################################################
#####################
done
Bytes transferred = 3161839 (303eef hex)
## 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 ...
Uncompressing
Linux.............................................................
Linux version 2.6.20 (r...@localhost.localdomain) (gcc version 3.4.4) #11 Mon
M9
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr053177
Machine: Atmel AT91SAM9263-EK
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Ramesh-->Going to Register all the clocks
Ramesh-->Registered all the clocksOB
Ramesh-->Registered the PWM clock
Ramesh-->Registered all the clocks--second
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists. Total pages: 16256
Kernel command line: memdM console=ttyS0 115200 root=/dev/ram0
initrd=0x600000
AT91: 160 gpio irqs in 5 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61616KB available (2788K code, 266K data, 196K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_pwmc.0: 4 channels
hello lcd!
atmel_lcdfb_probe ...
LCD CLOCK: 0xc02f9694Hz
atmel_lcdfb atmel_lcdfb.0: 150KiB frame buffer at 23d40000 (mapped at ffc00000)
Console: switching to colour frame buffer device 40x30
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00700000 (mapped at c4856000),
6
atmel_usart.0: ttyS0 at MMIO 0xfeffee00 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfff8c000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfff90000 (irq = 8) is a ATMEL_SERIAL
atmel_usart.3: ttyS3 at MMIO 0xfff94000 (irq = 9) is a ATMEL_SERIAL
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
macb macb: detected PHY at address 0 (ID 0181:b8a0)
eth0: Atmel MACB at 0xfffbc000 irq 21 (12:34:56:78:90:22)
vcan: Virtual CAN interface driver
at91_can netdevice driver
at91_can at91_can: device registered (base_addr=0xc4878000, irq)
CAN netdevice library
Linux video capture interface: v2.00
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V
8-bi)
Scanning device for bad blocks
Bad eraseblock 2048 at 0x02000000
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "Kernel"
0x00200000-0x02200000 : "Filesystem-1"
0x02200000-0x04000000 : "Filesystem-2"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 14)
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 29, io mem 0x00a00000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
ads7846 spi0.3: touchscreen, irq 31
RAMESH--Sampl. Val: 0
input: ADS784x Touchscreen as /class/input/input0
i2c /dev entries driver
at91-rtc: rtc intf: dev (254:0)
ds1307 0-0068: rtc core: registered ds1307 as rtc0
at91_i2c at91_i2c: AT91 i2c bus driver.
AT91 MMC: 4 wire bus mode not supported by this driver - using 1 wire
Advanced Linux Sound Architecture Driver Version 1.0.14rc1 (Tue Jan 09
09:56:17.
AC97C regs = FFFA0000
AC97C irq = 18
ALSA device list:
#0: Atmel AC97 Controller at 0xfffa0000, irq 18
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
can: controller area network core (rev 20081130 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20081130)
can: broadcast manager protocol (rev 20081130)
ds1307 0-0068: setting the system clock to 2000-01-01 00:39:21 (946687161)
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.
Could anyone please give any suggestions on how to tackle the problem
Regards,
Meera