mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: iw3gtf@arcor.de
To: s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: Aw: Re: Re: errors copying UBI volumes
Date: Thu, 15 Sep 2016 13:57:10 +0200 (CEST)	[thread overview]
Message-ID: <1664854076.360311.1473940630343.JavaMail.ngmail@webmail18.arcor-online.net> (raw)
In-Reply-To: <20160915114401.z5tdaxcb6eesv3qn@pengutronix.de>

Hi,

> On Thu, Sep 15, 2016 at 01:13:14PM +0200, iw3gtf@arcor.de wrote:
> > Hi Sascha,
> > 
> > thanks for the answer,
> > 
> > > Hi Giorgio,
> > > 
> > > On Wed, Sep 14, 2016 at 05:52:32PM +0200, iw3gtf@arcor.de wrote:
> > > > Hi,
> > > > 
> > > > I'm working on an embedded board with an iMX25 arm CPU and a nand
> flash.
> > > > 
> > > > The board runs a linux kernel/userland.
> > > > 
> > > > When the user updates the firmware, the running userland/kernel
> creates
> > > some
> > > > new ubi volumes on the nand, let's say 'kernel_next' and
> 'userland_next'.
> > > > On the next system reboot barebox looks if it finds, lets say, the
> > > 'kernel_next' volume
> > > > and, in this case, it removes the old one ('kernel'), creates a new,
> empty
> > > one ('kernel'),
> > > > copies 'kernel_next' to the just created 'kernel' and finally removes
> the
> > > 'kernel_next'
> > > > to complete the update.
> > > 
> > > While this should work, why so complicated? Since this commit:
> > > 
> > > | commit 892abde56c1c5a62d49d8b70c73e5d388e74345d
> > > | Author: Richard Weinberger <richard@nod.at>
> > > | Date:   Mon Nov 24 22:30:10 2014 +0100
> > > |
> > > |    UBI: rename_volumes: Use UBI_METAONLY
> > > |    
> > > |    By using UBI_METAONLY in rename_volumes() it is now possible to
> rename
> > > |    an UBI volume atomically while it is open for writing.
> > > |    This is useful for firmware upgrades.
> > > 
> > > It should be possible to just remove 'kernel' and rename 'kernel_next'
> to
> > > 'kernel'
> > > without bootloader intervention.
> > 
> > This is a very good news for me, I already wanted to ask for a UBI rename
> feature.
> > Could you please elaborate a bit on this point: I looked for a shell
> command like the
> > 'ubirename', present in the 'mtd-utils' package, but could not find it.
> Maybe we just
> > need a new command implemented in '<barebox_root>/commands/ubi.c'.
> 
> You can add a ubirename command, patches welcome. Anyway, I suggested to
> rename it under Linux since you write your new Kernel/rootfs under Linux
> aswell.
> 

OK, I think I'll try to write a new command in commands/ubi.c and if it
results in something usable I'll send a patch to be reviewed.

giorgio


Giorgio, iw3gtf@arcor.de

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2016-09-15 11:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15 11:13 Aw: " iw3gtf
2016-09-15 11:44 ` Sascha Hauer
2016-09-15 11:57 ` iw3gtf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1664854076.360311.1473940630343.JavaMail.ngmail@webmail18.arcor-online.net \
    --to=iw3gtf@arcor.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox