From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1d30kv-0001OP-6U for rauc@pengutronix.de; Tue, 25 Apr 2017 15:43:49 +0200 Received: by mail-oi0-x22e.google.com with SMTP id j201so171666320oih.2 for ; Tue, 25 Apr 2017 06:43:48 -0700 (PDT) MIME-Version: 1.0 From: Philip Downer Date: Tue, 25 Apr 2017 14:43:41 +0100 Message-ID: Subject: [RAUC] Understanding u-boot integration List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2144324069==" Errors-To: rauc-bounces@pengutronix.de Sender: "RAUC" To: rauc@pengutronix.de --===============2144324069== Content-Type: multipart/alternative; boundary=001a1134fdbe72428e054dfde951 --001a1134fdbe72428e054dfde951 Content-Type: text/plain; charset=UTF-8 After seeing a presentation on RAUC at FOSDEM I've been looking to integrate it with a Yocto based i.mx6 embedded system that I'm working on. Everything is pretty much working but I'm just trying to understand the integration with u-boot, I've based my u-boot scripts on the one in contrib from the RAUC repository. I've had to make some changes due to an old version of u-boot and quirks of our setup, however my questions are about the general process. As I understand it, when the system boots, the first slot from BOOT_ORDER will be selected, say slot A. Then BOOT_A_LEFT will be decremented from 3 to 2 and we will save the environment to nand flash. Is it then intended that when the OS boots successfully it should change the BOOT_A_LEFT variable in nand flash back to 3? Following on from that, if I'm correct, this seems like a lot of writes to nand flash. Writing to nand is also not that quick for us at 3.41 seconds from within Linux, is there not a reasonable chance of corruption if the system was reset during that write? -- Philip Downer +44 (0)7879 470 969 pdowner@prospero-tech.com --001a1134fdbe72428e054dfde951 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
After seeing a presentation on RAUC at FOSDEM I'v= e been looking to integrate it with a Yocto based i.mx6 embedded system tha= t I'm working on.

Everything is pretty much wo= rking but I'm just trying to understand the integration with u-boot, I&= #39;ve based my u-boot scripts on the one in contrib from the RAUC reposito= ry. I've had to make some changes due to an old version of u-boot and q= uirks of our setup, however my questions are about the general process.

As I understand it, when the system boots, the first = slot from BOOT_ORDER will be selected, say slot A. Then BOOT_A_LEFT will be= decremented from 3 to 2 and we will save the environment to nand flash. Is= it then intended that when the OS boots successfully it should change the = BOOT_A_LEFT variable in nand flash back to 3?

Foll= owing on from that, if I'm correct, this seems like a lot of writes to = nand flash. Writing to nand is also not that quick for us at 3.41 seconds f= rom within Linux, is there not a reasonable chance of corruption if the sys= tem was reset during that write?

--
Philip = Downer
+44 (0)7879 470 969
--001a1134fdbe72428e054dfde951-- --===============2144324069== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KUkFVQyBtYWls aW5nIGxpc3Q= --===============2144324069==--