[U-Boot] UBIFS fails on SheevaPlug

Dimax dimax.main at gmail.com
Mon Oct 29 20:05:34 CET 2012


> U-boot will _not_ recover your UBIFS partition like the Linux kernel.
CMIIW.
In other words it is not possible to use UBIFS on embedded Linux boards
with u-boot unless you can provide unterminated power supply.

I'm going to another solution - Split flash in two UBIFS partitions. Make
the first one read only and put kernel and all critical data where. And
have logs and user data on second RW partition. This way kernel should
always start and if required recover second RW partition.

Do you have any suggestions on how to do it or where to start?
More likely I have to look at mtd utilities?


On Mon, Oct 29, 2012 at 8:53 PM, Vikram Narayanan <vikram186 at gmail.com>wrote:

> On 10/29/2012 10:55 PM, Dimax wrote:
> > I remember I have unbricked sheevaplug with USB key.
> > But I'm still not sure if effort is not useless as I see no conclusion
> > about u-boot ability to recover UBIFS partition (at least to try).
> > Can anybody tell it for sure?
>
> This is what I've got from the code [1].
>
> Code flow
> ---------
> common/cmd_ubifs.c:
> do_ubifs_mount calls ubifs_mount
>
> fs/ubifs/super.c,
> In ubifs_mount()  (line 1167)
>         flags = MS_RDONLY;      (line 1188)
> calls ubifs_get_sb (with flags as a param)
> ubifs_get_sb (line 1018)
> The flags get updated here.
>         sb->s_flags = flags; (line 1057)
>
> Calls ubifs_fill_super
> sb gets assigned, so are the flags.
>         c->vfs_sb = sb; (line 962)
>
> Calls mount_ubifs
>         mount_ubifs(c); (line 983)
>
> In mount_ubifs() (line 582)
>
>         struct super_block *sb = c->vfs_sb;
>         int err, mounted_read_only = (sb->s_flags & MS_RDONLY);
>
> sb taken from the assigned ptr @ line 962.
> Flags extracted from the assigned flags @ 1188.
> Just see where the variable 'mounter_read_only' gets referred and you'll
> get the answer.
> U-boot will _not_ recover your UBIFS partition like the Linux kernel.
> CMIIW.
>
> [1]
> http://git.denx.de/?p=u-boot.git;a=tree;h=5bb3505fa867ded03cbee83f7722ab5182930637;hb=5bb3505fa867ded03cbee83f7722ab5182930637
>
> Hope this helps,
> Vikram
>


More information about the U-Boot mailing list