SRAM mount read write MTD partition in LS1021A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SRAM mount read write MTD partition in LS1021A

1,057 Views
winstonjacob
Contributor IV

I am using LS1021A with SRAM module, the SRAM created the MTD node in linux, but I need to know how to mount and do the read write operation, please suggest me the steps, I tried flashcp command but its not working. the log attached below, but in u-boot read write is happening using mw and md command.

Log

root@atc-gen2:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "Pre-Bootloader Configuration(PBLC)"
mtd1: 00020000 00020000 "Ethernet Data"
mtd2: 00040000 00020000 "Bootloader Environment(BLE)"
mtd3: 00020000 00020000 "DTS-D"
mtd4: 00020000 00020000 "DTS-1"
mtd5: 00020000 00020000 "QE uCode Image"
mtd6: 00020000 00020000 "DTS-2"
mtd7: 00100000 00020000 "Bootloader Image (BLI)"
mtd8: 00400000 00020000 "Kernel Image Default (KI-D)"
mtd9: 00400000 00020000 "Kernel Image1 (KI-1)"
mtd10: 00600000 00020000 "Kernel Image-2 (KI-2)"
mtd11: 01000000 00020000 "Rootfs-1 (RFS-1)"
mtd12: 00600000 00020000 "Rootfs Default (RFS-D)"
mtd13: 01000000 00020000 "Rootfs-2 (RFS-2)"
mtd14: 00900000 00020000 "ADFS"
mtd15: 00080000 00001000 "68000000.sram"
root@atc-gen2:~#

root@atc-gen2:~# flashcp -v 1.txt /dev/mtd15
Erasing blocks: 1/1 (100%)
Writing data: 0k/0k (100%)
Verifying data: 0k/0k (0%)File does not seem to match flash data. First mismatch at 0x00000000-0x00000002
root@atc-gen2:~#

 

Regards

Winston

0 Kudos
Reply
1 Reply

1,054 Views
winstonjacob
Contributor IV

When I tried fdisk command to partition and I am getting the below error, please suggest me to solve this.

 

Log

==

root@atc-gen2:~# fdisk /dev/mtdblock15
Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.

Unknown value(s) for: cylinders (settable in the extra functions menu)

Command (m for help): p

Disk /dev/mtdblock15: 0 MB, 524288 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Unknown value(s) for: cylinders (settable in the extra functions menu)

Command (m for help):

 

 

For mount

=======

root@atc-gen2:~# mkfs.ext2 /dev/mtdblock15
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
64 inodes, 512 blocks
25 blocks (5%) reserved for the super user
First data block=1
Maximum filesystem blocks=262144
1 block groups
8192 blocks per group, 8192 fragments per group
64 inodes per group
root@atc-gen2:~# mount -t ext2 /dev/mtdblock15 /mnt
mount: mounting /dev/mtdblock15 on /mnt failed: Invalid argument

 

Regards

Winston

0 Kudos
Reply