* [Buildroot] ubifs rootfs attached error
@ 2013-08-13 13:04 Woody Wu
2013-08-13 13:39 ` Stefan Peter
2013-08-13 16:44 ` Arnout Vandecappelle
0 siblings, 2 replies; 6+ messages in thread
From: Woody Wu @ 2013-08-13 13:04 UTC (permalink / raw)
To: buildroot
Hi,
I use buildroot created an ubifs as my rootfs, which is intended put on
my ARM target with MTD partitions. In u-boot bootloader I wrote the ubi
image to my NAND flash and changed kernel command line accordingly. But
the kernel did not boot, the messages shown that it cannot attach the
image successfully. I will describe my steps and related information in
blow and hope people here can sort me out the difficulties.
Firstly, below are the kernel error messages:
------------------------------------------------------------------
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 77 at 0x0000009a0000
Bad eraseblock 89 at 0x000000b20000
...
Bad eraseblock 2419 at 0x000012e60000
Bad eraseblock 3458 at 0x00001b040000
Creating 5 MTD partitions on "NAND":
0x000000000000-0x000000100000 : "Bootloader"
0x000000100000-0x000000300000 : "LOGO"
0x000000300000-0x000000700000 : "Kernel"
0x000000700000-0x000002700000 : "ROOTFS"
0x000002700000-0x000040000000 : "Data"
UBI: attaching mtd3 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: max. sequence number: 0
UBI error: vtbl_check: volume table check failed: record 0, error 9
UBI error: ubi_init: cannot attach mtd3
----------------------------------------------------------------------
My ubi image was create with the following buildroot configs:
BR2_TARGET_ROOTFS_UBIFS=y
BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f800
BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800
BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2048
# BR2_TARGET_ROOTFS_UBIFS_RT_NONE is not set
# BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB is not set
BR2_TARGET_ROOTFS_UBIFS_RT_LZO=y
BR2_TARGET_ROOTFS_UBIFS_NONE=y
# BR2_TARGET_ROOTFS_UBIFS_GZIP is not set
# BR2_TARGET_ROOTFS_UBIFS_BZIP2 is not set
# BR2_TARGET_ROOTFS_UBIFS_LZMA is not set
# BR2_TARGET_ROOTFS_UBIFS_LZO is not set
# BR2_TARGET_ROOTFS_UBIFS_XZ is not set
BR2_TARGET_ROOTFS_UBIFS_OPTS=""
BR2_TARGET_ROOTFS_UBI=y
BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x8000
BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048
BR2_TARGET_ROOTFS_UBI_OPTS=""
I write the resulted ubi (not the ubifs) image to my nand flash using
u-boot: 'nand write memory-address my-mtd-part-start my-mtd-part-size'
Then I change my kernel command line before boot it:
ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs noinitrd ...
Can anyone please have a look at above information and give me a clue?
Is that possible I setup incorrect parameters in making the UBI image?
Actually I don't really understand the meanings of those parameters.
Thanks in advance.
--
I can't go back to yesterday - because I was a different person then
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ubifs rootfs attached error
2013-08-13 13:04 [Buildroot] ubifs rootfs attached error Woody Wu
@ 2013-08-13 13:39 ` Stefan Peter
2013-08-13 14:08 ` Woody Wu
2013-08-13 16:44 ` Arnout Vandecappelle
1 sibling, 1 reply; 6+ messages in thread
From: Stefan Peter @ 2013-08-13 13:39 UTC (permalink / raw)
To: buildroot
Dear Woody Wu,
On 13.08.2013 15:04, Woody Wu wrote:
> Hi,
...
> Firstly, below are the kernel error messages:
>
> ------------------------------------------------------------------
> NAND_ECC_NONE selected by board driver. This is not recommended !!
Modern flash chips actually rely on specific forms of cyclic redundancy
checks in order to be able to correct for bit errors in NAND flash.
Without using the proper CRC algorithm, you can never be sure to be able
to read from the flash what you have written to it. Another hint at this
problem are the "Bad eraseblock" messages that follow.
Check your kernel configuration and the documentation of your target for
the proper ECC settings for the NAND flash.
With kind regards
Stefan Peter
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ubifs rootfs attached error
2013-08-13 13:39 ` Stefan Peter
@ 2013-08-13 14:08 ` Woody Wu
2013-08-13 18:21 ` Stefan Peter
0 siblings, 1 reply; 6+ messages in thread
From: Woody Wu @ 2013-08-13 14:08 UTC (permalink / raw)
To: buildroot
On Tue, Aug 13, 2013 at 03:39:07PM +0200, Stefan Peter wrote:
> Dear Woody Wu,
>
> On 13.08.2013 15:04, Woody Wu wrote:
> > Hi,
> ...
> > Firstly, below are the kernel error messages:
> >
> > ------------------------------------------------------------------
> > NAND_ECC_NONE selected by board driver. This is not recommended !!
>
> Modern flash chips actually rely on specific forms of cyclic redundancy
> checks in order to be able to correct for bit errors in NAND flash.
> Without using the proper CRC algorithm, you can never be sure to be able
> to read from the flash what you have written to it. Another hint at this
> problem are the "Bad eraseblock" messages that follow.
>
> Check your kernel configuration and the documentation of your target for
> the proper ECC settings for the NAND flash.
Stefan, thanks for the hints. Yes, my kernel configuration disalbed the
NAND ECC. I like to study on that. But, do you think this is reason why
my ubifs did not get attached? Thanks.
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
I can't go back to yesterday - because I was a different person then
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ubifs rootfs attached error
2013-08-13 14:08 ` Woody Wu
@ 2013-08-13 18:21 ` Stefan Peter
2013-08-13 22:12 ` Woody Wu
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Peter @ 2013-08-13 18:21 UTC (permalink / raw)
To: buildroot
On 13.08.2013 16:08, Woody Wu wrote:
> Stefan, thanks for the hints. Yes, my kernel configuration disalbed the
> NAND ECC. I like to study on that. But, do you think this is reason why
> my ubifs did not get attached? Thanks.
Yes, definitively. I don't want to say that there are no other problems
in your setup, but as long as you can not read back exactly what you
have written to the flash, there is very little chance that UBI will work.
UBIFS is based upon MTD. And MTD relies on a working FLASH driver. As
long as one of these layers does not work properly, the topmost (UBIFS)
layer can not work properly, either.
With kind regards
Stefan Peter
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ubifs rootfs attached error
2013-08-13 18:21 ` Stefan Peter
@ 2013-08-13 22:12 ` Woody Wu
0 siblings, 0 replies; 6+ messages in thread
From: Woody Wu @ 2013-08-13 22:12 UTC (permalink / raw)
To: buildroot
On Tue, Aug 13, 2013 at 08:21:22PM +0200, Stefan Peter wrote:
> On 13.08.2013 16:08, Woody Wu wrote:
>
> > Stefan, thanks for the hints. Yes, my kernel configuration disalbed the
> > NAND ECC. I like to study on that. But, do you think this is reason why
> > my ubifs did not get attached? Thanks.
>
> Yes, definitively. I don't want to say that there are no other problems
> in your setup, but as long as you can not read back exactly what you
> have written to the flash, there is very little chance that UBI will work.
> UBIFS is based upon MTD. And MTD relies on a working FLASH driver. As
> long as one of these layers does not work properly, the topmost (UBIFS)
> layer can not work properly, either.
>
If so, that's really wired. Since befor trying the ubifs, the same
kernel was actually running jffs2 as rootfs without a sign that there is
a i/o problem. Just because the performance concerns to jffs2, I decided
to try ubifs.
--
I can't go back to yesterday - because I was a different person then
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] ubifs rootfs attached error
2013-08-13 13:04 [Buildroot] ubifs rootfs attached error Woody Wu
2013-08-13 13:39 ` Stefan Peter
@ 2013-08-13 16:44 ` Arnout Vandecappelle
1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2013-08-13 16:44 UTC (permalink / raw)
To: buildroot
On 13/08/13 15:04, Woody Wu wrote:
> Hi,
>
> I use buildroot created an ubifs as my rootfs, which is intended put on
> my ARM target with MTD partitions. In u-boot bootloader I wrote the ubi
> image to my NAND flash and changed kernel command line accordingly. But
> the kernel did not boot, the messages shown that it cannot attach the
> image successfully. I will describe my steps and related information in
> blow and hope people here can sort me out the difficulties.
>
> Firstly, below are the kernel error messages:
>
> ------------------------------------------------------------------
> NAND_ECC_NONE selected by board driver. This is not recommended !!
> Scanning device for bad blocks
> Bad eraseblock 77 at 0x0000009a0000
> Bad eraseblock 89 at 0x000000b20000
> ...
> Bad eraseblock 2419 at 0x000012e60000
> Bad eraseblock 3458 at 0x00001b040000
> Creating 5 MTD partitions on "NAND":
> 0x000000000000-0x000000100000 : "Bootloader"
> 0x000000100000-0x000000300000 : "LOGO"
> 0x000000300000-0x000000700000 : "Kernel"
> 0x000000700000-0x000002700000 : "ROOTFS"
> 0x000002700000-0x000040000000 : "Data"
> UBI: attaching mtd3 to ubi0
> UBI: physical eraseblock size: 131072 bytes (128 KiB)
> UBI: logical eraseblock size: 126976 bytes
> UBI: smallest flash I/O unit: 2048
> UBI: VID header offset: 2048 (aligned 2048)
> UBI: data offset: 4096
> UBI: max. sequence number: 0
> UBI error: vtbl_check: volume table check failed: record 0, error 9
> UBI error: ubi_init: cannot attach mtd3
> ----------------------------------------------------------------------
>
> My ubi image was create with the following buildroot configs:
>
> BR2_TARGET_ROOTFS_UBIFS=y
> BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f800
> BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800
> BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2048
> # BR2_TARGET_ROOTFS_UBIFS_RT_NONE is not set
> # BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB is not set
> BR2_TARGET_ROOTFS_UBIFS_RT_LZO=y
> BR2_TARGET_ROOTFS_UBIFS_NONE=y
> # BR2_TARGET_ROOTFS_UBIFS_GZIP is not set
> # BR2_TARGET_ROOTFS_UBIFS_BZIP2 is not set
> # BR2_TARGET_ROOTFS_UBIFS_LZMA is not set
> # BR2_TARGET_ROOTFS_UBIFS_LZO is not set
> # BR2_TARGET_ROOTFS_UBIFS_XZ is not set
> BR2_TARGET_ROOTFS_UBIFS_OPTS=""
> BR2_TARGET_ROOTFS_UBI=y
> BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x8000
This looks wrong: your eraseblock size is 128K, so this should be 0x20000.
Regards,
Arnout
> BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048
> BR2_TARGET_ROOTFS_UBI_OPTS=""
>
> I write the resulted ubi (not the ubifs) image to my nand flash using
> u-boot: 'nand write memory-address my-mtd-part-start my-mtd-part-size'
>
> Then I change my kernel command line before boot it:
>
> ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs noinitrd ...
>
> Can anyone please have a look at above information and give me a clue?
> Is that possible I setup incorrect parameters in making the UBI image?
> Actually I don't really understand the meanings of those parameters.
>
> Thanks in advance.
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-13 22:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 13:04 [Buildroot] ubifs rootfs attached error Woody Wu
2013-08-13 13:39 ` Stefan Peter
2013-08-13 14:08 ` Woody Wu
2013-08-13 18:21 ` Stefan Peter
2013-08-13 22:12 ` Woody Wu
2013-08-13 16:44 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox