mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Christian Eggers <ceggers@arri.de>
Cc: barebox@lists.infradead.org
Subject: Re: Updating barebox from Linux
Date: Tue, 4 Feb 2020 16:02:15 +0100	[thread overview]
Message-ID: <20200204150215.fl7bplcbyxtgiwc7@pengutronix.de> (raw)
In-Reply-To: <3901844.loAZRtzaGB@n95hx1g2>

On Tue, Feb 04, 2020 at 03:08:18PM +0100, Christian Eggers wrote:
> Platform: i.MX6 (booting from NAND)
> 
> I would like to be able to update Barebox from Linux using a framework like 
> RAUC or swupdate. The RAUC documentation states:
> 
> https://rauc.readthedocs.io/en/latest/advanced.html#bootloader-update-ideas
> > 7.6.3. Bootloader Update Ideas
> > 
> > The NXP i.MX6 supports up to four bootloader copies when booting from NAND
> > flash. The ROM code will try each copy in turn until it finds one which is
> > readable without uncorrectable ECC errors and has a correct header. By
> > using the trait of NAND flash that interrupted writes cause ECC errors and
> > writing the first page (containing the header) last, the bootloader images
> > can be replaced one after the other, while ensuring that the system will
> > boot even in case of a crash or power failure.
> > 
> > The slot type could be called “boot-imx6-nand” analogous to eMMC.
> 
> In the barebox documentation I only found how to update barebox via the 
> barebox_update command within barebox itself.
> 
> Updating barebox seems to be SoC specific. Is there already any existing code 
> to do this from Linux?

I remember that someone asked for updating i.MX6 NAND bootloader from
Linux and also that in the end he reported he was successful.
Unfortunately I can't remember who it was :(

> Or would it be more wise to write the new barebox image 
> to a temporary UBI partition and let barebox do the update itself on next 
> reboot?

At least this is the easiest way out in the current situation.

It would be great to have code similar to what barebox has in the
barebox_update code under Linux, especially for cases where updating
barebox is more than just writing plain to a device or file, like it
is on i.MX6 NAND.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      reply	other threads:[~2020-02-04 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 14:08 Christian Eggers
2020-02-04 15:02 ` Sascha Hauer [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=20200204150215.fl7bplcbyxtgiwc7@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ceggers@arri.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