From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2501C49EA5 for ; Thu, 24 Jun 2021 16:02:20 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC991613DC for ; Thu, 24 Jun 2021 16:02:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC991613DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1lwRo0-0002vY-UJ for kernelnewbies@archiver.kernel.org; Thu, 24 Jun 2021 12:02:16 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1lwRmC-0000o8-A4 for kernelnewbies@kernelnewbies.org; Thu, 24 Jun 2021 12:00:24 -0400 Received: by mail-ej1-x62a.google.com with SMTP id hz1so10369486ejc.1 for ; Thu, 24 Jun 2021 09:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=CzdyB8B5Sqxrj2oED9u5I9+bl1SvhIlrUTAhlqVx9zY=; b=eAkj9zt54aAf//xHntnimxAh3y4sq8dC7qwMUZErs5BCywNuwGrqgwmDJW3GgOxlQa 4d6S24uJYapPS9i54UAD48zZ3o2+FdxTy6Cv8e0qX3CUvewuDwJZ+fQLQROF+REh6rbg xOT6m4m2cZMfwNPQa/BLg+rXcnEMmVLA6zvSIErqJ9A69NJyjIHvgBKOsX+CUKjYP8Xj BUDrx12EE4AYQOg+2g+KxGNqhJ1FX2Pbk1T2yZpuWFnFoICZBaWZg/chkB8cI3vYKDYt npX/gGRY6trrDKluOfMlroKlay3J8ELNfr/M6woDMfY2mHzKTFFz7Y6Ynpfkck0C3MWs k8GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CzdyB8B5Sqxrj2oED9u5I9+bl1SvhIlrUTAhlqVx9zY=; b=BxtrbvGrgtYUHDYUbbD8AYjQwabHzYYSrIUc+9ju1MWyAEblku41iCk3qjR8sBu3Z5 eMXFsaVlkHtVK71PY0EkxtZz1Jo0b4SE+6/k2+ZXKixi4acJIAmnl9RDbG31AACwgUPx 2IoPjb6T0WS1rdfvT31XpTnPwVwtfyYJIy5YkAgwilrkthUzw7ZwMZ4BMsXN1yRbv2Mb DXq9zwtR6uGtY6HRDp+0zFpjU7OG/T1e5zDL1FK5PNzbsXDOxPGtfH9BEykbwL3ZbQxv SmJIaFkEK9hjudnP13CjqiXO1K34A0HdE4bv10F4xBYkikLMDW5l5hm0TDL1CDdkqJ9t HkAA== X-Gm-Message-State: AOAM531nVR9HLjk9tNjIJ/oZn7hKLapgEWGUKwDJ7hVyXFqXm/Bm3Jjd kN2vlGVSu1xNPphFnlwDkhrULLeHlYnp39oLQMc= X-Google-Smtp-Source: ABdhPJxYnU+kqejrZAK+7npt103yTXGI9BPHsqhLLSBmTLudYjV6I8P2clEEBFlDj4mzm8XRMH65TeLB/fP3t94d2/Y= X-Received: by 2002:a17:906:a0d3:: with SMTP id bh19mr6054756ejb.205.1624550422403; Thu, 24 Jun 2021 09:00:22 -0700 (PDT) MIME-Version: 1.0 From: Pintu Agarwal Date: Thu, 24 Jun 2021 21:30:11 +0530 Message-ID: Subject: Query: UBIFS: How to detect empty volumes To: open list , linux-mtd , Richard Weinberger , linux-fsdevel , Phillip Lougher , Sean Nyekjaer , Kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0113450881410058211==" Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org --===============0113450881410058211== Content-Type: multipart/alternative; boundary="000000000000d8df8105c5851e80" --000000000000d8df8105c5851e80 Content-Type: text/plain; charset="UTF-8" Hi, I have one basic query related to UBIFS volumes on a system with NAND partition. In short, how to detect a particular empty volume inside a system partition while flashing the partition image? Suppose I have one big system partition that consists of 4-5 ubi volumes inside it with varying sizes. Lets say: -- System Partition (ubi image) - rootfs volume (ro, squashfs) - data volume (rw, ubifs) - firmware volume (ro, ubifs) - some-other volume (ro, squashfs) Consider that all these could be flashed together as part of system.ubi image in a single shot from the bootloader. Now, suppose, one of the volume image (say firmware) is missing or remains empty (as you know we can have empty volumes). So, during system image flashing, we wanted to detect if one of the volume (firmware) is empty. Since this is an important volume, so we wanted to detect if this volume is empty/missing we will abort flashing the system partition. As there is no point in booting the system without this partition. So, I am exploring options, how can this be detected ? I mean is there any kind of magic number or header information which we can read to detect a particular empty volume ? Can we get any information from just "system.ubi" image to indicate about the volume information ? Also it could be possible that 2 or more volumes are empty, but we are only concerned about one particular volume (firmware), so how to detect particular volume ? If anyone has any thoughts about this requirement, please share your opinion. Thanks, Pintu --000000000000d8df8105c5851e80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I have one basic query related to UBIFS volumes on a s= ystem with NAND partition.
In short, how to detect a particular empty volum= e inside a system partition while flashing the partition image?

<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">Suppos= e I have one big system partition that consists of 4-5 ubi volumes inside i= t with varying sizes.
Lets say:
-- System Partition (ubi image)
=C2=A0 = =C2=A0 - rootfs volume (ro, squashfs)
=C2=A0 =C2=A0 - data volume (rw, ubif= s)
=C2=A0 =C2=A0 - firmware volume (ro, ubifs)
=C2=A0 =C2=A0 - some-other v= olume (ro, squashfs)

Consider that all these could be flashed together= as part of system.ubi image in a single shot from the bootloader.
Now, sup= pose, one of the volume image (say firmware) is missing or remains empty (a= s you know we can have empty volumes).

So, during system image flashin= g, we wanted to detect if one of the volume (firmware) is empty.
Since this= is an important volume, so we wanted to detect if this volume is empty/mis= sing we will abort flashing the system partition.
As there is no point in b= ooting the system without this partition.

So, I am exploring options, = how can this be detected ?
I mean is there any kind of magic number or head= er information which we can read to detect a particular empty volume ?
Can = we get any information from just "system.ubi" image to indicate a= bout the volume information ?
Also it could be possible that 2 or more volu= mes are empty, but we are only concerned about one particular volume (firmw= are), so how to detect particular volume ?

If anyone has any thoughts = about this requirement, please share your opinion.


Thanks,
<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">Pintu<= /div>
=

--000000000000d8df8105c5851e80-- --===============0113450881410058211== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============0113450881410058211==--