public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Writing JFFS2 to Samsung K9F1208U0B NAND on AMCC PPC405EX/r Kilauea/Haleakala
@ 2008-02-29  0:30 Grant Erickson
  2008-02-29  8:50 ` Schlägl Manfred jun.
  2008-02-29 14:17 ` Josh Boyer
  0 siblings, 2 replies; 4+ messages in thread
From: Grant Erickson @ 2008-02-29  0:30 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org

I am attempting to create and write a JFFS2 file system to the Samsung
K9F1208U0B NAND part on an AMCC PPC405EXr "Haleakala" board and seem to be
running into a hurdle or two.

Given the Samsung K9F1208U0B's 16 KiB erase block and 512 B page sizes, I
invoked mkfs.jffs2 with:

% mkfs.jffs2 -n -b -s 512 -e 16 KiB -d /export/haleakala -o haleakala.img

I then erase the device with 'flash_eraseall' using the '-j' option:

# flash_eraseall -j /dev/mtd9
Erasing 16 Kibyte @ 3f94000 -- 99 % complete. Cleanmarker written at
3f94000.

However, when I attempt to lay down the file system image with nandwrite
(again, using the '-j' option), I get a driver error:

# nandwrite -j /dev/mtd9 haleakala.img
MEMSETOOBSEL: Inappropriate ioctl for device

Eliding the '-j' option, I get errors about page alignment:

# nandwrite /dev/mtd9 haleakala.img
Input file is not page aligned
Data was only partially written due to error: Success

The output from 'mtd_debug':

# mtd_debug info /dev/mtd9
mtd.type = MTD_NANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 66682880 (63M)
mtd.erasesize = 16384 (16K)
mtd.writesize = 512
mtd.oobsize = 16 
regions = 0

The version of mtd-utils is 1.1.0 from the MTD FTP site.

This occurs with either hand-built kernels using the GIT repo or
'git://www.denx.de/git/linux-2.6-denx.git' the latest pre-built kernel
posted to the AMCC-partner (DENX) site:

    ftp://ftp.denx.de/pub/linux/images/amcc/kilauea/uImage-g8adfc2c

# uname -a
Linux haleakala 2.6.25-rc2-00492-g8adfc2c #1 Sat Feb 23 23:10:15 CET 2008
ppc unknown

Anyone have success with writing a JFFS2 file system on these boards or have
any insight into the errors above?

Regards,

Grant Erickson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Writing JFFS2 to Samsung K9F1208U0B NAND on AMCC PPC405EX/r Kilauea/Haleakala
  2008-02-29  0:30 Writing JFFS2 to Samsung K9F1208U0B NAND on AMCC PPC405EX/r Kilauea/Haleakala Grant Erickson
@ 2008-02-29  8:50 ` Schlägl Manfred jun.
  2008-02-29 18:55   ` Grant Erickson
  2008-02-29 14:17 ` Josh Boyer
  1 sibling, 1 reply; 4+ messages in thread
From: Schlägl Manfred jun. @ 2008-02-29  8:50 UTC (permalink / raw)
  To: Grant Erickson; +Cc: linux-mtd

Am Donnerstag, den 28.02.2008, 16:30 -0800 schrieb Grant Erickson:
> I am attempting to create and write a JFFS2 file system to the Samsung
> K9F1208U0B NAND part on an AMCC PPC405EXr "Haleakala" board and seem to be
> running into a hurdle or two.
> 
> Given the Samsung K9F1208U0B's 16 KiB erase block and 512 B page sizes, I
> invoked mkfs.jffs2 with:
> 
> % mkfs.jffs2 -n -b -s 512 -e 16 KiB -d /export/haleakala -o haleakala.img

> I then erase the device with 'flash_eraseall' using the '-j' option:
> 
> # flash_eraseall -j /dev/mtd9
> Erasing 16 Kibyte @ 3f94000 -- 99 % complete. Cleanmarker written at
> 3f94000.
> 
> However, when I attempt to lay down the file system image with nandwrite
> (again, using the '-j' option), I get a driver error:
> 
> # nandwrite -j /dev/mtd9 haleakala.img
> MEMSETOOBSEL: Inappropriate ioctl for device
> 
> Eliding the '-j' option, I get errors about page alignment:
> 
> # nandwrite /dev/mtd9 haleakala.img
> Input file is not page aligned
> Data was only partially written due to error: Success
> 
> The output from 'mtd_debug':
> 
> # mtd_debug info /dev/mtd9
> mtd.type = MTD_NANDFLASH
> mtd.flags = MTD_CAP_NANDFLASH
> mtd.size = 66682880 (63M)
> mtd.erasesize = 16384 (16K)
> mtd.writesize = 512
> mtd.oobsize = 16 
> regions = 0
> 
> The version of mtd-utils is 1.1.0 from the MTD FTP site.
> 
> This occurs with either hand-built kernels using the GIT repo or
> 'git://www.denx.de/git/linux-2.6-denx.git' the latest pre-built kernel
> posted to the AMCC-partner (DENX) site:
> 
>     ftp://ftp.denx.de/pub/linux/images/amcc/kilauea/uImage-g8adfc2c
> 
> # uname -a
> Linux haleakala 2.6.25-rc2-00492-g8adfc2c #1 Sat Feb 23 23:10:15 CET 2008
> ppc unknown
> 
> Anyone have success with writing a JFFS2 file system on these boards or have
> any insight into the errors above?
> 
> Regards,
> 
> Grant Erickson
> 
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 

You have to pad(-p) your image, so that it's size is a multiple of page
size
% mkfs.jffs2 -n -b -s 512 -p 512 -e 16 KiB -d /export/haleakala -o
haleakala.img

Then you should be able to write it with:
% nandwrite /dev/mtd9 haleakala.img

greetings
	manfred

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Writing JFFS2 to Samsung K9F1208U0B NAND on AMCC PPC405EX/r Kilauea/Haleakala
  2008-02-29  0:30 Writing JFFS2 to Samsung K9F1208U0B NAND on AMCC PPC405EX/r Kilauea/Haleakala Grant Erickson
  2008-02-29  8:50 ` Schlägl Manfred jun.
@ 2008-02-29 14:17 ` Josh Boyer
  1 sibling, 0 replies; 4+ messages in thread
From: Josh Boyer @ 2008-02-29 14:17 UTC (permalink / raw)
  To: Grant Erickson; +Cc: tglx, linux-mtd@lists.infradead.org

On Thu, 28 Feb 2008 16:30:38 -0800
Grant Erickson <gerickson@nuovations.com> wrote:

> I am attempting to create and write a JFFS2 file system to the Samsung
> K9F1208U0B NAND part on an AMCC PPC405EXr "Haleakala" board and seem to be
> running into a hurdle or two.
> 
> Given the Samsung K9F1208U0B's 16 KiB erase block and 512 B page sizes, I
> invoked mkfs.jffs2 with:
> 
> % mkfs.jffs2 -n -b -s 512 -e 16 KiB -d /export/haleakala -o haleakala.img
> 
> I then erase the device with 'flash_eraseall' using the '-j' option:
> 
> # flash_eraseall -j /dev/mtd9
> Erasing 16 Kibyte @ 3f94000 -- 99 % complete. Cleanmarker written at
> 3f94000.
> 
> However, when I attempt to lay down the file system image with nandwrite
> (again, using the '-j' option), I get a driver error:
> 
> # nandwrite -j /dev/mtd9 haleakala.img
> MEMSETOOBSEL: Inappropriate ioctl for device

This has been broken since the ECC rework went into the kernel.  I hear
there are patches floating around to fix it.  Maybe they will magically
appear today...

josh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Writing JFFS2 to Samsung K9F1208U0B NAND on AMCC PPC405EX/r Kilauea/Haleakala
  2008-02-29  8:50 ` Schlägl Manfred jun.
@ 2008-02-29 18:55   ` Grant Erickson
  0 siblings, 0 replies; 4+ messages in thread
From: Grant Erickson @ 2008-02-29 18:55 UTC (permalink / raw)
  To: Manfred jun. Schlägl; +Cc: linux-mtd

On 2/29/08 12:50 AM, Manfred jun. Schlägl wrote:
> Am Donnerstag, den 28.02.2008, 16:30 -0800 schrieb Grant Erickson:
>> I am attempting to create and write a JFFS2 file system to the Samsung
>> K9F1208U0B NAND part on an AMCC PPC405EXr "Haleakala" board and seem to be
>> running into a hurdle or two.
>> 
>> Given the Samsung K9F1208U0B's 16 KiB erase block and 512 B page sizes, I
>> invoked mkfs.jffs2 with:
>> 
>> % mkfs.jffs2 -n -b -s 512 -e 16 KiB -d /export/haleakala -o haleakala.img
> 
>> I then erase the device with 'flash_eraseall' using the '-j' option:
>> 
>> # flash_eraseall -j /dev/mtd9
>> Erasing 16 Kibyte @ 3f94000 -- 99 % complete. Cleanmarker written at
>> 3f94000.
>> 
>> However, when I attempt to lay down the file system image with nandwrite
>> (again, using the '-j' option), I get a driver error:
>> 
>> # nandwrite -j /dev/mtd9 haleakala.img
>> MEMSETOOBSEL: Inappropriate ioctl for device
>> 
>> Eliding the '-j' option, I get errors about page alignment:
>> 
>> # nandwrite /dev/mtd9 haleakala.img
>> Input file is not page aligned
>> Data was only partially written due to error: Success

> You have to pad(-p) your image, so that it's size is a multiple of page
> size
> % mkfs.jffs2 -n -b -s 512 -p 512 -e 16 KiB -d /export/haleakala -o
> haleakala.img
> 
> Then you should be able to write it with:
> % nandwrite /dev/mtd9 haleakala.img
> 
> greetings
> manfred

Manfred:

Danke schön. Your suggestion of adding padding ('-p 512') along with
Andrey's suggestion to remove the deprecated '-j' options to flash_eraseall
and nandwrite did the trick:

# mount -t jffs2 /dev/mtdblock9 /import/
# df -h
Filesystem                Size      Used Available Use% Mounted on
...
/dev/mtdblock9           63.6M     14.4M     49.2M  23% /import

Regards,

Grant

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-29 18:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-29  0:30 Writing JFFS2 to Samsung K9F1208U0B NAND on AMCC PPC405EX/r Kilauea/Haleakala Grant Erickson
2008-02-29  8:50 ` Schlägl Manfred jun.
2008-02-29 18:55   ` Grant Erickson
2008-02-29 14:17 ` Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox