From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 19 May 2025 10:22:09 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uGvlB-000S4y-1r for lore@lore.pengutronix.de; Mon, 19 May 2025 10:22:09 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uGvlB-0003eF-As; Mon, 19 May 2025 10:22:09 +0200 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uGvl0-0003dO-AQ; Mon, 19 May 2025 10:21:58 +0200 Message-ID: <21c11f09562c5987a980dc1489c1e9929569e317.camel@pengutronix.de> To: "Bapat, Nachiket" , "rauc@pengutronix.de" Date: Mon, 19 May 2025 10:21:57 +0200 In-Reply-To: References: <2cb8b9b5-7984-4886-8fd4-760469915ca7.7fef0f57-7ad4-47cf-8abe-df29b96c0cf4.fef9f08d-bb28-42f4-a6ae-e3ae26e0bc23@emailsignatures365.codetwo.com> <2cb8b9b5-7984-4886-8fd4-760469915ca7.25e9171f-7c7d-463c-bab4-1e4e606dd275.0ae3c648-e0ec-47d4-bfc2-882794389c36@emailsignatures365.codetwo.com> Organization: Pengutronix Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 Subject: Re: [RAUC] RAUC integration NAND flash: PEC error -74 on UBIFS X-BeenThere: rauc@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Jan_L=C3=BCbbe_via_RAUC?= Reply-To: jlu@pengutronix.de Sender: "RAUC" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: rauc-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hi, On Fri, 2025-05-16 at 14:34 +0000, Bapat, Nachiket via RAUC wrote: > I will be using RAUC for integration with NAND flash. > =C2=A0 > I have the exact same error as shown in the following post: > Solved: Re: After writing ubifs and booting into Linux bad nodes are foun= d - > NXP Community First,=C2=A0you need to make sure that your UBIFS image works with ubiupdat= evol. If that fails, you're likely using a wrong UBIFS NAND layout during image crea= tion. It needs to match the target's NAND configuration (mtdinfo -u) exactly.=20 When ubiupdatevol works on the target, RAUC bundles with that slot image sh= ould work as well, it uses the same kernel API as ubiupdatevol. > Unfortunately using the solution from this post will not help me .=20 > Reason being that RAUC requires a UBIFS to be written into the slot. > According to this solution I need to reflash the ubi partition with the > correct UBIFS image from either an SD-card of TFTPBOOT. > Is there a way I can still integrate RAUC with the above solution ? > =C2=A0 > If not is there a pre-execution script or a function which I can override= to > attach my custom script which copies data to the UBI partition? Ifyour *UBI partition* NAND layout doesn't match the hardware and you have separate UBI partitions, you could use a install hook: https://rauc.readthedocs.io/en/latest/using.html#slot-hooks:~:text=3DThe%20= install%20hook%20will%20replace%20the%20entire%20default%20installation%20p= rocess%20for%20the%20target%20slot%20of%20the%20image%20it%20was%20specifie= d%20for In that hook, you could recreate the inactive UBI partition and volume, and= then use ubiupdatevol. If you need to repair the layout of the currently running slot, you can do = that from a normal userspace service running after the update. After repairing t= he layout, you can remove the hooks again.=20 If you only have only one UBI partition and no rescue slot, I don't see a w= ay to repair the layout while the partition is in use, so you probably have to re= flash from an external device. Regards, Jan --=20 Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |