* nftl_format
@ 2001-04-25 19:00 Marc Karasek
0 siblings, 0 replies; 3+ messages in thread
From: Marc Karasek @ 2001-04-25 19:00 UTC (permalink / raw)
To: 'mtd@infradead.org'
I just d/l and compiled the format utility to format a 32mb doc device.
When I tried to run it, it complained about the erase size not being 8K in
size. I did a printf
to see what size it was reading and it is 16K (0x4000). Is this an issue
just with nftl_format? If so i will fix this, if this is also an issue with
the driver I can look into this also.
Marc Karasek
Sr. Firmware Eng
iVivity Inc.
marc_karasek@ivivity.com
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* nftl_format
@ 2003-11-06 17:10 Chris Ellec
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ellec @ 2003-11-06 17:10 UTC (permalink / raw)
To: linux-mtd
I got an older Diskonchip with NFTL all messed up after trying to
install Grub on it, so I had to nftl_format it.
First I had to make the changes below to get nftldump and nftl_format to
compile again.
When I ran nftl_format, it took about 20 minutes for a 96MB DOC, is that
normal ?
The nftl_format worked and the DOC is now back to its original state.
Chris.
-------
Please note that the following breaks the compilation of the kernel, so
you can only do it to compile nftl_format then you have to change it
back if you need to recompile bzImage.
in mtd/include/linux/mtd:
--- nftl.h~ 2003-10-27 15:47:40.000000000 -0800
+++ nftl.h 2003-10-28 17:18:36.000000000 -0800
@@ -8,7 +8,7 @@
#define __MTD_NFTL_H__
#include <linux/mtd/mtd.h>
-#include <linux/mtd/blktrans.h>
+//#include <linux/mtd/blktrans.h>
/* Block Control Information */
in mtd/util:
--- Makefile~ 2003-10-28 17:05:35.000000000 -0800
+++ Makefile 2003-10-28 17:06:00.000000000 -0800
@@ -10,7 +10,8 @@
TARGETS = ftl_format erase eraseall nanddump doc_loadbios \
mkfs.jffs ftl_check mkfs.jffs2 lock unlock \
einfo mtd_debug fcp nandwrite jffs2dump \
- jffs2reader nftldump nftl_format
+ nftldump nftl_format
+ #jffs2reader
SYMLINKS = crc32.h crc32.c compr_rtime.c
^ permalink raw reply [flat|nested] 3+ messages in thread
* nftl_format
@ 2003-11-27 22:55 Denis Dowling
0 siblings, 0 replies; 3+ messages in thread
From: Denis Dowling @ 2003-11-27 22:55 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
Hi,
Attached is a patch to get nftl_format compiling with the latest version of
mtd. I managed to get 2 of my DoC chips into a state where DFORMAT would not
want to reprogram them. The trigger for this seemed to be loading the
grub_firmware into them with doc_loadbios. Anyway with this patch I was able
to build nftl_format and reformat both of the chips.
Regards,
Denis.
[-- Attachment #2: mtd.patch --]
[-- Type: application/octet-stream, Size: 3798 bytes --]
Index: mtd/include/linux/mtd/nftl.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/nftl.h,v
retrieving revision 1.13
diff -u -b -B -w -p -r1.13 nftl.h
--- mtd/include/linux/mtd/nftl.h 23 May 2003 11:25:02 -0000 1.13
+++ mtd/include/linux/mtd/nftl.h 27 Nov 2003 22:46:29 -0000
@@ -8,7 +8,10 @@
#define __MTD_NFTL_H__
#include <linux/mtd/mtd.h>
+
+#ifdef __KERNEL__
#include <linux/mtd/blktrans.h>
+#endif /* __KERNEL__ */
/* Block Control Information */
Index: mtd/util/Makefile
===================================================================
RCS file: /home/cvs/mtd/util/Makefile,v
retrieving revision 1.34
diff -u -b -B -w -p -r1.34 Makefile
--- mtd/util/Makefile 20 Jun 2003 13:58:46 -0000 1.34
+++ mtd/util/Makefile 27 Nov 2003 22:46:29 -0000
@@ -10,7 +10,8 @@ CFLAGS += -I../include -O2 -Wall -Wstric
TARGETS = ftl_format erase eraseall nanddump doc_loadbios \
mkfs.jffs ftl_check mkfs.jffs2 lock unlock \
einfo mtd_debug fcp nandwrite jffs2dump \
- #jffs2reader nftldump nftl_format
+ nftl_format nftldump
+# jffs2reader
SYMLINKS = crc32.h crc32.c compr_rtime.c
Index: mtd/util/nftl_format.c
===================================================================
RCS file: /home/cvs/mtd/util/nftl_format.c,v
retrieving revision 1.19
diff -u -b -B -w -p -r1.19 nftl_format.c
--- mtd/util/nftl_format.c 1 May 2002 10:59:04 -0000 1.19
+++ mtd/util/nftl_format.c 27 Nov 2003 22:46:29 -0000
@@ -59,7 +59,8 @@
#define le32_to_cpu(x) cpu_to_le32(x)
#define le16_to_cpu(x) cpu_to_le16(x)
-extern ssize_t pread(), pwrite();
+ssize_t pread(int fd, void *buf, size_t count, off_t offset);
+ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
unsigned char BadUnitTable[MAX_ERASE_ZONES];
unsigned char *readbuf;
@@ -330,7 +331,7 @@ int main(int argc, char **argv)
continue;
oob.start = (ezone * meminfo.erasesize) + 512;
if (ioctl(fd, MEMWRITEOOB, &oob))
- printf("MEMWRITEOOB at %lx: %s\n", (unsigned long)oob.start, sys_errlist[errno]);
+ printf("MEMWRITEOOB at %lx: %s\n", (unsigned long)oob.start, strerror(errno));
}
exit(0);
Index: mtd/util/nftldump.c
===================================================================
RCS file: /home/cvs/mtd/util/nftldump.c,v
retrieving revision 1.14
diff -u -b -B -w -p -r1.14 nftldump.c
--- mtd/util/nftldump.c 16 Jul 2001 16:13:50 -0000 1.14
+++ mtd/util/nftldump.c 27 Nov 2003 22:46:29 -0000
@@ -37,7 +37,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/nftl.h>
-extern ssize_t pread();
+ssize_t pread(int fd, void *buf, size_t count, off_t offset);
static struct NFTLMediaHeader MedHead[2];
static mtd_info_t meminfo;
@@ -87,7 +87,7 @@ static unsigned short nextEUN(unsigned s
return UCItable[curEUN][0].a.ReplUnitNum;
}
-static unsigned int find_media_headers()
+static unsigned int find_media_headers(void)
{
int i;
static unsigned long ofs = 0;
@@ -135,7 +135,7 @@ static unsigned int find_media_headers()
return NumMedHeads;
}
-static void dump_erase_units()
+static void dump_erase_units(void)
{
int i, j;
unsigned long ofs;
@@ -150,7 +150,7 @@ static void dump_erase_units()
oob.start = ofs + (j * 512);
if (ioctl(fd, MEMREADOOB, &oob))
printf("MEMREADOOB at %lx: %s\n",
- (unsigned long) oob.start, sys_errlist[errno]);
+ (unsigned long) oob.start, strerror(errno));
memcpy(&UCItable[i][j], &oobbuf.u, 8);
}
if (UCItable[i][1].b.EraseMark != cpu_to_le16(0x3c69)) {
@@ -199,7 +199,7 @@ static void dump_erase_units()
}
}
-static void dump_virtual_units()
+static void dump_virtual_units(void)
{
int i, j;
char readbuf[512];
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-11-27 23:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-06 17:10 nftl_format Chris Ellec
-- strict thread matches above, loose matches on Subject: below --
2003-11-27 22:55 nftl_format Denis Dowling
2001-04-25 19:00 nftl_format Marc Karasek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox