[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] NuHo S3/1500 - FLASH detected; how do Imount?
Hi David,
David Banas wrote:
> OK, I've got the FLASH detected and partitions created at kernel boot time,
> as per:
>
> -------- kernel boot log excerpt begins here. -----------
> <5>MBVanilla flash probe(0xff800000,8388608,2): 800000 at ff800000
> <4>Entering mtd_do_chip_probe
> <4>Returning from genprobe_ident_chips not null
> <4>genprobe_ident_chips returned non null
> <4>Entering check_cmd_set
> <5> Amd/Fujitsu Extended Query Table v1.0 at 0x0040
> <4>reading id at :2
> <4>bootloc=2
> <5>number of CFI chips: 1
> <5>cfi_cmdset_0002: Disabling fast programming due to code brokenness.
> <4>mtd_do_chip_probe returning non null mtd
> <5>Creating 8 MTD partitions on "Flash":
> <5>0x00000000-0x00020000 : "Bootloader"
> <5>0x00020000-0x00040000 : "Bootargs"
> <5>0x00040000-0x00060000 : "MAC"
> <5>0x00080000-0x00100000 : "Config"
> <5>0x00060000-0x00080000 : "Spare"
> <5>0x00100000-0x00300000 : "Image"
> <5>0x00300000-0x00800000 : "JFFS2"
> <4>mtd: partition "JFFS2" extends beyond the end of device "Flash" -- size
> trunc
> <5>0x00000000-0x00400000 : "Flash"
> -------- kernel boot log excerpt ends here. -----------
>
> although later in the boot sequence, I see:
>
> -------- kernel boot log excerpt begins here. -----------
> Populating /etc/config:
> flatfsd: invalid header magic
> flatfsd: Nonexistent or bad flatfs (-183), creating new one...
> ( >2 min. wait here; kernel appears to have hung, but hasn't.)
> flatfsd: Wrote 288 bytes to flash in 143 seconds
> flatfsd: Created 4 configuration files (183 bytes)
> -------- kernel boot log excerpt ends here. -----------
Search ucdot.org for Dave McCullough's article about flatfsd. It's a
neat little flat file system used to store persisetent config info. The
idea is you mount ramdisk under /etc/config, and flatfsd saves this to
flash backing store (/dev/flash/config). The message you are seeing is
because your current /dev/flash/config partition doesn't yet contain a
valid flatfsd image (no surprises there!). You should find that next
time you boot, you don't get those messages. Check out David's article
for all the good stuff.
> Now, my question is, how do I mount the FLASH device as a file system?
> Here's what I get when I try 'mount' a couple of different ways:
Terminology matters here: you don't mount devices as filesystems, but
rather you mount filesystems *on* devices. So, for example, you can
mount a JFFS2 (journalling flash file system) on an MTD flash partition.
>
> -------- shell session excerpt begins here. -----------
> # mount /dev/mtdblock0 /mnt
> VFS: Can't find ext2 file system on dev mtdblock(31,0).
> VFS: Can't find a romfs file system on dev 1f:00.
> mount: Mounting /dev/mtdblock0 on /mnt failed: Invalid argument
> # mount -t flat /dev/mtdblock0 /mnt
> mount: Mounting /dev/mtdblock0 on /mnt failed: No such device
> -------- shell session excerpt ends here. -----------
When you try to mount a filesystem or device, the kernel iterates
through the filesystem types it knows about (in your case ext2 and
romfs), and asks the FS drivers to attempt to mount.
It wouldn't be advisable to mount and ext2 FS on flash, you are probably
better off with a flash-aware filesystem like JFFS2 and the like. Trawl
the archives of this list and uclinux-dev, you'll uncover many earlier
discussions on the subject.
Regards,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/