ubiattach issue
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1 Count of UBI devices: 0 UBI control device major/minor: 10:62
/bin # ubiformat /dev/mtd5 -y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % complete
/bin # ubiattach /dev/ubi_ctrl --mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)
Best Regards
Dimitar
Hi again,
Bellow the results of few mtd test tools I've tried.
==========================================================mtd_speedtest: MTD device: 5mtd_speedtest: MTD device size 511705088, eraseblock size 131072, page size 2048, count of eraseblocks 3904, pages per eraseblock 64, OOB size 64mtd_speedtest: scanning for bad eraseblocksmtd_speedtest: scanned 3904 eraseblocks, 0 are badmtd_speedtest: testing eraseblock write speedmtd_speedtest: eraseblock write speed is 4552 KiB/smtd_speedtest: testing eraseblock read speedmtd_speedtest: eraseblock read speed is 2722 KiB/smtd_speedtest: testing page write speedmtd_speedtest: page write speed is 4517 KiB/smtd_speedtest: testing page read speedmtd_speedtest: page read speed is 2712 KiB/smtd_speedtest: testing 2 page write speedmtd_speedtest: 2 page write speed is 4533 KiB/smtd_speedtest: testing 2 page read speedmtd_speedtest: 2 page read speed is 2715 KiB/smtd_speedtest: Testing erase speedmtd_speedtest: erase speed is 153662 KiB/smtd_speedtest: Testing 2x multi-block erase speedmtd_speedtest: 2x multi-block erase speed is 292571 KiB/smtd_speedtest: Testing 4x multi-block erase speedmtd_speedtest: 4x multi-block erase speed is 293258 KiB/smtd_speedtest: Testing 8x multi-block erase speedmtd_speedtest: 8x multi-block erase speed is 293258 KiB/smtd_speedtest: Testing 16x multi-block erase speedmtd_speedtest: 16x multi-block erase speed is 294641 KiB/smtd_speedtest: Testing 32x multi-block erase speedmtd_speedtest: 32x multi-block erase speed is 292571 KiB/smtd_speedtest: Testing 64x multi-block erase speedmtd_speedtest: 64x multi-block erase speed is 294641 KiB/smtd_speedtest: finished
=================================================
=================================================mtd_pagetest: MTD device: 5mtd_pagetest: MTD device size 511705088, eraseblock size 131072, page size 2048, count of eraseblocks 3904, pages per eraseblock 64, OOB size 64mtd_pagetest: scanning for bad eraseblocksmtd_pagetest: scanned 3904 eraseblocks, 0 are badmtd_pagetest: erasing whole devicemtd_pagetest: erased 3904 eraseblocksmtd_pagetest: writing whole devicemtd_pagetest: written up to eraseblock 0mtd_pagetest: written up to eraseblock 256mtd_pagetest: written up to eraseblock 512mtd_pagetest: written up to eraseblock 768mtd_pagetest: written up to eraseblock 1024mtd_pagetest: written up to eraseblock 1280mtd_pagetest: written up to eraseblock 1536mtd_pagetest: written up to eraseblock 1792mtd_pagetest: written up to eraseblock 2048mtd_pagetest: written up to eraseblock 2304mtd_pagetest: written up to eraseblock 2560mtd_pagetest: written up to eraseblock 2816mtd_pagetest: written up to eraseblock 3072mtd_pagetest: written up to eraseblock 3328mtd_pagetest: written up to eraseblock 3584mtd_pagetest: written up to eraseblock 3840mtd_pagetest: written 3904 eraseblocksmtd_pagetest: verifying all eraseblocksmtd_pagetest: verified up to eraseblock 0mtd_pagetest: verified up to eraseblock 256mtd_pagetest: verified up to eraseblock 512mtd_pagetest: verified up to eraseblock 768mtd_pagetest: verified up to eraseblock 1024mtd_pagetest: verified up to eraseblock 1280mtd_pagetest: verified up to eraseblock 1536mtd_pagetest: verified up to eraseblock 1792mtd_pagetest: verified up to eraseblock 2048mtd_pagetest: verified up to eraseblock 2304mtd_pagetest: verified up to eraseblock 2560mtd_pagetest: verified up to eraseblock 2816mtd_pagetest: verified up to eraseblock 3072mtd_pagetest: verified up to eraseblock 3328mtd_pagetest: verified up to eraseblock 3584mtd_pagetest: verified up to eraseblock 3840
uncorrectable error :mtd_pagetest: error: read failed at 0x1e7fd800
uncorrectable error :mtd_pagetest: error: read failed at 0x1e7fd800mtd_pagetest: error -74 occurred
=================================================
modprobe: can't load module mtd_pagetest (kernel/drivers/mtd/tests/mtd_pagetest.ko): Bad message
Thanks
Dimitar
----- Original Message ----- From: "Dimitar Penev" <[email protected]>
To: <[email protected]>
Sent: Thursday, September 20, 2012 11:44 AM
Subject: ubiattach issue
Quoted 32 lines
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1 Count of UBI devices: 0 UBI control device major/minor: 10:62/bin # ubiformat
/dev/mtd5-y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % complete/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)Best Regards
Dimitar______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 21 lines · Dimitar Penev
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1
Count of UBI devices: 0
UBI control device major/minor: 10:62/bin # ubiformat
/dev/mtd5-y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % complete
Quoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)
Before any pointers, which version of mtd-utils are you using? How to:
(http://linux-mtd.infradead.org/faq/general.html#L_compile_mtd)
~Vikram
Hi Vikram,
Thank you for your response.
It is a check out from http://git.infradead.org/?p=mtd-utils.git
Git signature 36d8de81049c9c908740b690c664b5bd3703ccd6
If you expect version in a different format please let me know what to check.
Best Regards
Dimitar
----- Original Message ----- From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, September 20, 2012 9:25 PM
Subject: Re: ubiattach issue
Quoted 36 lines · Dimitar Penev
Quoted 21 lines
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1
Count of UBI devices: 0
UBI control device major/minor: 10:62/bin # ubiformat
/dev/mtd5-y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % completeQuoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)Before any pointers, which version of mtd-utils are you using? How to:
(http://linux-mtd.infradead.org/faq/general.html#L_compile_mtd)~Vikram
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Hello,
My nanddump reports
nanddump 1.4.6
Best Regards
Dimitar
----- Original Message ----- From: "Dimitar Penev" <[email protected]>
To: "Vikram Narayanan" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, September 20, 2012 10:22 PM
Subject: Re: ubiattach issue
Quoted 62 lines
Hi Vikram,
Thank you for your response.
It is a check out from http://git.infradead.org/?p=mtd-utils.git
Git signature36d8de81049c9c908740b690c664b5bd3703ccd6If you expect version in a different format please let me know what to check.
Best Regards
Dimitar----- Original Message -----
From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, September 20, 2012 9:25 PM
Subject: Re: ubiattach issueQuoted 30 lines · Dimitar Penev
Quoted 21 lines
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1
Count of UBI devices: 0
UBI control device major/minor: 10:62/bin # ubiformat
/dev/mtd5-y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % completeQuoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)Before any pointers, which version of mtd-utils are you using? How to:
(http://linux-mtd.infradead.org/faq/general.html#L_compile_mtd)Quoted 6 lines
~Vikram
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Hello Dimitar,
Cc-ing Artem
Quoted 6 lines · Dimitar Penev
Hi Vikram,
Thank you for your response.
It is a check out from http://git.infradead.org/?p=mtd-utils.git
Git signature36d8de81049c9c908740b690c664b5bd3703ccd6
I tested with this checkout in my nandsim under x86. But couldn't reproduce the issue. (But I was on 2.6.38.8 kernel).
Could you also post the corresponding kernel logs when you issued the ubiattach command? That should give more hints.
~Vikram
Quoted 45 lines
----- Original Message ----- From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, September 20, 2012 9:25 PM
Subject: Re: ubiattach issueQuoted 36 lines · Dimitar Penev
Quoted 21 lines
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1
Count of UBI devices: 0
UBI control device major/minor: 10:62/bin # ubiformat
/dev/mtd5-y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % completeQuoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)Before any pointers, which version of mtd-utils are you using? How to:
(http://linux-mtd.infradead.org/faq/general.html#L_compile_mtd)~Vikram
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Hello Vikram,
Let me explain some more in details on my issue:
We have custom Blackfin based board running uClinux (using kernel 3.0.8) and using mtd-utils (nanddump 1.4.6).
On this board we are using the Blackfin platform nand driver. UBIFS is working OK on this board.
Now we have another custom board also based on Blackfin CPU but this CPU has a hardware nand controller which we have used to connect to our nand chip.
Under u-boot this driver seems to work fine and we can read/write on the nand flash without issues. On Linux we are using the same uClinux (using kernel 3.0.8) and mtd-utils (nanddump 1.4.6). This time we get:
/bin # ubiattach /dev/ubi_ctrl --mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)
The difference between the two boards seems to be the fact that the second board is using the hardware nand controler and the corresponding Blackfin Linux driver.
I don't see anything in my system logs related with ubiattach so I guess I have to enable some debugging in the kernel. Let me recompile and try again.
If you want me to test something specific I will appreciate your advices.
Thank you.
Dimitar
----- Original Message ----- From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Thursday, September 20, 2012 11:37 PM
Subject: Re: ubiattach issue
Quoted 70 lines
Hello Dimitar,
Cc-ing Artem
Quoted 6 lines · Dimitar Penev
Hi Vikram,
Thank you for your response.
It is a check out from http://git.infradead.org/?p=mtd-utils.git
Git signature36d8de81049c9c908740b690c664b5bd3703ccd6I tested with this checkout in my nandsim under x86. But couldn't reproduce the issue. (But I was on 2.6.38.8 kernel).
Could you also post the corresponding kernel logs when you issued the ubiattach command? That should give more hints.
~Vikram
Quoted 46 lines
----- Original Message ----- From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, September 20, 2012 9:25 PM
Subject: Re: ubiattach issueQuoted 36 lines · Dimitar Penev
Quoted 21 lines
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1
Count of UBI devices: 0
UBI control device major/minor: 10:62/bin # ubiformat
/dev/mtd5-y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % completeQuoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)Before any pointers, which version of mtd-utils are you using? How to:
(http://linux-mtd.infradead.org/faq/general.html#L_compile_mtd)~Vikram
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Hi Gents,
I have enabled CONFIG_MTD_DEBUG, CONFIG_MTD_UBI_DEBUG, CONFIG_UBIFS_FS_DEBUG
And got some more messages during ubiformat however no additional info in my system log after ubiattach
The only information I get in the console is the old message
Quoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)
It seems it is failing in /mtd-utils/ubi-utils/libubi.c at
static int do_attach(const char *node, const struct ubi_attach_req *r)
...
ret = ioctl(fd, UBI_IOCATT, r);
...
I get ret == -1 here, it seems my node /dev/ubi_ctrl doesn't have UBI_IOCATT command hooked.
Note that the node /dev/ubi_ctrl I create manually like this:
mknod /dev/ubi_ctrl c 10 63
So my ubi character control device seems not hooked to the /dev/ubi_ctrl? Any suggestions?
Thanks
Dimitar
----- Original Message ----- From: "Dimitar Penev" <[email protected]>
To: "Vikram Narayanan" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, September 21, 2012 9:40 AM
Subject: Re: ubiattach issue
Quoted 116 lines
Hello Vikram,
Let me explain some more in details on my issue:
We have custom Blackfin based board running uClinux (using kernel 3.0.8) and using mtd-utils (nanddump 1.4.6).
On this board we are using the Blackfin platform nand driver. UBIFS is working OK on this board.Now we have another custom board also based on Blackfin CPU but this CPU has a hardware nand controller which we have used to connect to our nand chip.
Under u-boot this driver seems to work fine and we can read/write on the nand flash without issues. On Linux we are using the same uClinux (using kernel 3.0.8) and mtd-utils (nanddump 1.4.6). This time we get:
/bin # ubiattach/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)The difference between the two boards seems to be the fact that the second board is using the hardware nand controler and the corresponding Blackfin Linux driver.
I don't see anything in my system logs related with ubiattach so I guess I have to enable some debugging in the kernel. Let me recompile and try again.
If you want me to test something specific I will appreciate your advices.Thank you.
Dimitar----- Original Message -----
From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Thursday, September 20, 2012 11:37 PM
Subject: Re: ubiattach issueQuoted 66 lines
Hello Dimitar,
Cc-ing Artem
Quoted 6 lines · Dimitar Penev
Hi Vikram,
Thank you for your response.
It is a check out from http://git.infradead.org/?p=mtd-utils.git
Git signature36d8de81049c9c908740b690c664b5bd3703ccd6I tested with this checkout in my nandsim under x86. But couldn't reproduce the issue. (But I was on 2.6.38.8 kernel).
Could you also post the corresponding kernel logs when you issued the ubiattach command? That should give more hints.
~Vikram
Quoted 46 lines
----- Original Message ----- From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, September 20, 2012 9:25 PM
Subject: Re: ubiattach issueQuoted 36 lines · Dimitar Penev
Quoted 21 lines
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1
Count of UBI devices: 0
UBI control device major/minor: 10:62/bin # ubiformat
/dev/mtd5-y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % completeQuoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)Before any pointers, which version of mtd-utils are you using? How to:
(http://linux-mtd.infradead.org/faq/general.html#L_compile_mtd)~Vikram
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/Quoted 4 lines
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Hi Gents,
I had my UBI control at minor number 62 instead of 63 and thats why I got the error :) I have never understood how those numbers gets assigned.
Now I have my ubifs working.
Thank you for the support and sorry for the noise. Dimitar
----- Original Message ----- From: "Dimitar Penev" <[email protected]>
To: "Vikram Narayanan" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, September 21, 2012 11:44 AM
Subject: Re: ubiattach issue
Quoted 164 lines
Hi Gents,
I have enabled
CONFIG_MTD_DEBUG,CONFIG_MTD_UBI_DEBUG,CONFIG_UBIFS_FS_DEBUG
And got some more messages during ubiformat however no additional info in my system log after ubiattachThe only information I get in the console is the old message
Quoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)It seems it is failing in /mtd-utils/ubi-utils/libubi.c at
static int
do_attach(const char *node, const struct ubi_attach_req *r)
...
ret =ioctl(fd, UBI_IOCATT, r);
...I get ret == -1 here, it seems my node
/dev/ubi_ctrldoesn't haveUBI_IOCATTcommand hooked.Note that the node
/dev/ubi_ctrlI create manually like this:mknod
/dev/ubi_ctrlc 10 63So my ubi character control device seems not hooked to the
/dev/ubi_ctrl? Any suggestions?Thanks
Dimitar----- Original Message -----
From: "Dimitar Penev" <[email protected]>
To: "Vikram Narayanan" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, September 21, 2012 9:40 AM
Subject: Re: ubiattach issueQuoted 112 lines
Hello Vikram,
Let me explain some more in details on my issue:
We have custom Blackfin based board running uClinux (using kernel 3.0.8) and using mtd-utils (nanddump 1.4.6).
On this board we are using the Blackfin platform nand driver. UBIFS is working OK on this board.Now we have another custom board also based on Blackfin CPU but this CPU has a hardware nand controller which we have used to connect to our nand chip.
Under u-boot this driver seems to work fine and we can read/write on the nand flash without issues. On Linux we are using the same uClinux (using kernel 3.0.8) and mtd-utils (nanddump 1.4.6). This time we get:
/bin # ubiattach/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)The difference between the two boards seems to be the fact that the second board is using the hardware nand controler and the corresponding Blackfin Linux driver.
I don't see anything in my system logs related with ubiattach so I guess I have to enable some debugging in the kernel. Let me recompile and try again.
If you want me to test something specific I will appreciate your advices.Thank you.
Dimitar----- Original Message -----
From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Thursday, September 20, 2012 11:37 PM
Subject: Re: ubiattach issueQuoted 66 lines
Hello Dimitar,
Cc-ing Artem
Quoted 6 lines · Dimitar Penev
Hi Vikram,
Thank you for your response.
It is a check out from http://git.infradead.org/?p=mtd-utils.git
Git signature36d8de81049c9c908740b690c664b5bd3703ccd6I tested with this checkout in my nandsim under x86. But couldn't reproduce the issue. (But I was on 2.6.38.8 kernel).
Could you also post the corresponding kernel logs when you issued the ubiattach command? That should give more hints.
~Vikram
Quoted 46 lines
----- Original Message ----- From: "Vikram Narayanan" <[email protected]>
To: "Dimitar Penev" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, September 20, 2012 9:25 PM
Subject: Re: ubiattach issueQuoted 36 lines · Dimitar Penev
Quoted 21 lines
Hi Gents,
I am facing an issue with ubiattach on Linux kernel 3.0.8 On our target we have nand flash with mtd layer on top. The logs attached below.
Can you please give me a pointer?
/bin # ubinfo -a
UBI version: 1
Count of UBI devices: 0
UBI control device major/minor: 10:62/bin # ubiformat
/dev/mtd5-y --vid-hdr-offset="2048"
ubiformat: mtd5 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 3
ubiformat: formatting eraseblock 3903 -- 100 % completeQuoted 3 lines
/bin # ubiattach
/dev/ubi_ctrl--mtdn=5 --devn=0 --vid-hdr-offset="2048"
ubiattach: error!: cannot attach mtd5
error 25 (Inappropriate ioctl for device)Before any pointers, which version of mtd-utils are you using? How to:
(http://linux-mtd.infradead.org/faq/general.html#L_compile_mtd)~Vikram
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/Quoted 4 lines
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/Quoted 4 lines
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/