* Problems mounting jffs2 image on nor flash > Erase at 0x.... failed immediately: -EROFS. Is the sector locked?
@ 2008-04-30 8:05 Markus Wagner
2008-05-08 3:03 ` Vernon Sauder
0 siblings, 1 reply; 3+ messages in thread
From: Markus Wagner @ 2008-04-30 8:05 UTC (permalink / raw)
To: linux-mtd
Hello,
i have some problems to mount my jffs2 image on my NOR-Flash.
I ported UBoot and Linux to my new board.
So far UBoot works well but Linux has some problems to mount the flash.
I can read from my flash with the dd command.
But when I mount the flash with 'mount -t jffs2 /dev/mtdblock4 /mnt/' I get the error: 'Erase at 0x...... failed immediately: -EROFS. Is the sector locked?'
Some Infos:
Its an Intel P33 Strataflash.
Setup of my partitions in the boardfile:
static struct mtd_partition at91_nor_partitions[] = {
{
.name = "Bootstrap",
.offset = 0x0,
.size = 0x8000,
},
{
.name = "U-Boot Env.",
.offset = 0x8000,
.size = 0x8000,
},
{
.name = "U-Boot",
.offset = 0x10000,
.size = 0x30000,
},
{
.name = "Kernel",
.offset = 0x40000,
.size = 0x200000,
},
{
.name = "Filesystem",
.offset = 0x240000,
.size = 0x1DC0000,
.mask_flags = 0,
},
};
Partitions under Linux:
# cat /proc/mtd
dev: size erasesize name
mtd0: 00008000 00008000 "Bootstrap"
mtd1: 00008000 00008000 "U-Boot Env."
mtd2: 00030000 00020000 "U-Boot"
mtd3: 00200000 00020000 "Kernel"
mtd4: 01dc0000 00020000 "Filesystem"
mtd_debug output:
# mtd_debug info /dev/mtd4
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NORFLASH
mtd.size = 31195136 (29M)
mtd.erasesize = 131072 (128K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0
Kernel Bootoutput:
....
physmap platform flash device: 02000000 at 10000000
Number of erase regions: 2
Primary Vendor Command Set: 0001 (Intel/Sharp Extended)
Primary Algorithm Table at 010A
Alternative Vendor Command Set: 0000 (None)
No Alternate Algorithm Table
Vcc Minimum: 2.3 V
Vcc Maximum: 3.6 V
Vpp Minimum: 8.5 V
Vpp Maximum: 9.5 V
Typical byte/word write timeout: 256 µs
Maximum byte/word write timeout: 512 µs
Typical full buffer write timeout: 512 µs
Maximum full buffer write timeout: 1024 µs
Typical block erase timeout: 1024 ms
Maximum block erase timeout: 4096 ms
Chip erase not supported
Device size: 0x2000000 bytes (32 MiB)
Flash Device Interface description: 0x0001
- x16-only asynchronous interface
Max. bytes in buffer write: 0x40
Number of Erase Block Regions: 2
Erase Region #0: BlockSize 0x8000 bytes, 4 blocks
Erase Region #1: BlockSize 0x20000 bytes, 255 blocks
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Extended Query version 1.5
Feature/Command Support: 01E6
- Chip Erase: unsupported
- Suspend Erase: supported
- Suspend Program: supported
- Legacy Lock/Unlock: unsupported
- Queued Erase: unsupported
- Instant block lock: supported
- Protection Bits: supported
- Page-mode read: supported
- Synchronous read: supported
- Simultaneous operations: unsupported
- Extended Flash Array: unsupported
Supported functions after Suspend: 01
- Program after Erase Suspend: supported
Block Status Register Mask: 0003
- Lock Bit Active: yes
- Lock-Down Bit Active: yes
- EFA Lock Bit: no
- EFA Lock-Down Bit: no
Vcc Logic Supply Optimum Program/Erase Voltage: 3.0 V
Vpp Programming Supply Optimum Program/Erase Voltage: 9.0 V
cfi_cmdset_0001: Erase suspend on write enabled
RedBoot partition parsing not available
Using physmap partition information
Creating 5 MTD partitions on "physmap-flash.0":
0x00000000-0x00008000 : "Bootstrap"
mtd: Giving out device 0 to Bootstrap
0x00008000-0x00010000 : "U-Boot Env."
mtd: Giving out device 1 to U-Boot Env.
0x00010000-0x00040000 : "U-Boot"
mtd: partition "U-Boot" doesn't start on an erase block boundary -- force read-only
mtd: Giving out device 2 to U-Boot
0x00040000-0x00240000 : "Kernel"
mtd: Giving out device 3 to Kernel
0x00240000-0x02000000 : "Filesystem"
mtd: Giving out device 4 to Filesystem
.....
It seems to me that the kernel doesn't know that the flash is protected after power up.
How can I get it to work?
Where should I look at?
Thanks for your help.
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems mounting jffs2 image on nor flash > Erase at 0x.... failed immediately: -EROFS. Is the sector locked?
2008-04-30 8:05 Problems mounting jffs2 image on nor flash > Erase at 0x.... failed immediately: -EROFS. Is the sector locked? Markus Wagner
@ 2008-05-08 3:03 ` Vernon Sauder
2008-05-08 6:59 ` AW: Problems mounting jffs2 image on nor flash > Erase at 0x....failed " Markus Wagner
0 siblings, 1 reply; 3+ messages in thread
From: Vernon Sauder @ 2008-05-08 3:03 UTC (permalink / raw)
To: Markus Wagner; +Cc: linux-mtd
Markus Wagner wrote:
> Hello,
>
> i have some problems to mount my jffs2 image on my NOR-Flash.
> I ported UBoot and Linux to my new board.
> So far UBoot works well but Linux has some problems to mount the flash.
>
> I can read from my flash with the dd command.
> But when I mount the flash with 'mount -t jffs2 /dev/mtdblock4 /mnt/' I get the error: 'Erase at 0x...... failed immediately: -EROFS. Is the sector locked?'
>
> Some Infos:
> Its an Intel P33 Strataflash.
>
> <SNIP>
>
> It seems to me that the kernel doesn't know that the flash is protected after power up.
>
> How can I get it to work?
> Where should I look at?
>
> Thanks for your help.
> Markus
>
>
You did not mention exactly which device you are using. I just posted a
patch to the list that added more StrataFlash devices to the fixup table
so they are unlocked at power up.
See [PATCH] mtd: add more StrataFlash chip ids that need powerup fixup
Vern
^ permalink raw reply [flat|nested] 3+ messages in thread
* AW: Problems mounting jffs2 image on nor flash > Erase at 0x....failed immediately: -EROFS. Is the sector locked?
2008-05-08 3:03 ` Vernon Sauder
@ 2008-05-08 6:59 ` Markus Wagner
0 siblings, 0 replies; 3+ messages in thread
From: Markus Wagner @ 2008-05-08 6:59 UTC (permalink / raw)
To: vernoninhand; +Cc: linux-mtd
> Hello,
>
> i have some problems to mount my jffs2 image on my NOR-Flash.
> I ported UBoot and Linux to my new board.
> So far UBoot works well but Linux has some problems to mount the flash.
>
> I can read from my flash with the dd command.
> But when I mount the flash with 'mount -t jffs2 /dev/mtdblock4 /mnt/' I
get the error: 'Erase at 0x...... failed immediately: -EROFS. Is the sector
locked?'
>
> Some Infos:
> Its an Intel P33 Strataflash.
>
> <SNIP>
>
> It seems to me that the kernel doesn't know that the flash is protected
after power up.
>
> How can I get it to work?
> Where should I look at?
>
> Thanks for your help.
> Markus
>
>
>You did not mention exactly which device you are using. I just posted a
>patch to the list that added more StrataFlash devices to the fixup table
>so they are unlocked at power up.
>See [PATCH] mtd: add more StrataFlash chip ids that need powerup fixup
>Vern
It s a 28F256P33 Strataflash.
I have done a workaround in add_mtd_partitions()
If I detect the filesystem partition I fire a manually unlock to it.
Works so far.
But I will search your patch in the archive.
Seems to be the better solution.
Thx
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-08 7:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 8:05 Problems mounting jffs2 image on nor flash > Erase at 0x.... failed immediately: -EROFS. Is the sector locked? Markus Wagner
2008-05-08 3:03 ` Vernon Sauder
2008-05-08 6:59 ` AW: Problems mounting jffs2 image on nor flash > Erase at 0x....failed " Markus Wagner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox