public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Fish" <afish@apple.com>
To: devel@edk2.groups.io, pintu.ping@gmail.com
Cc: edk2-devel <edk2-devel@lists.01.org>
Subject: Re: [edk2-devel] [EDK2 / UEFI]: Support for flashing ubi-volume using fastboot
Date: Wed, 14 Apr 2021 12:34:19 -0700	[thread overview]
Message-ID: <E0DB238F-23D3-4428-A8B8-A44F3E49FEBE@apple.com> (raw)
In-Reply-To: <CAOuPNLiz4DA+uuLC97g_dvJN-iPK+x4GTtrq+Ev-MVoFUBOQaw@mail.gmail.com>



> On Apr 14, 2021, at 11:12 AM, Pintu Agarwal <pintu.ping@gmail.com> wrote:
> 
> Hi,
> 
> I am new to EDK2 and UEFI.
> I am working on an ARM32 embedded Linux board that supports NAND and UBI images.
> I have several partitions in my system images, and some partitions
> have sub-volumes.
> I am looking for help on how to support flashing ubi-volumes directly
> using the fastboot flash method.
> 
> I see that our EDK2 does not have a mechanism to flash ubi-volumes.
> But the underlying UEFI code, have support for ubi-volume.
> {{{
> UEFI Code flow:
> ubi_flasher_write(...)
> {
> [...]
>        if (hdl->is_it_volume) {
>                result = ubi_flasher_vol_write(hdl);
>                if (result != 0)
>                        goto End;
>        } else {
>                result = ubi_flasher_ubi_write(hdl);
>                if (result != 0)
>                        goto End;
>        }
> [...]
> }
> }}}
> 
> When I tried to invoke ubi_flasher_write from EDK2, by passing the
> ubifs volume name, instead of PartitionName, it does not work (crash).
> 

EFI does not have a concept of Volume names, EFI has a concept of EFI_HANDLEs that contain device paths that indentify the volume. 

The UEFI Shell has volume names, but that is a construct produced by the UEFI Shell. 

Thanks,

Andrew Fish

> Thus I am wondering, what needs to done at EDK2 (and how) to invoke
> this ubi volume write at uefi.
> Or, is there some functionality missing at the UEFI layer itself ?
> 
> Please provide some suggestions on this.
> 
> Thanks,
> Pintu
> 
> 
> 
> 
> 


  reply	other threads:[~2021-04-14 19:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 18:12 [EDK2 / UEFI]: Support for flashing ubi-volume using fastboot Pintu Agarwal
2021-04-14 19:34 ` Andrew Fish [this message]
2021-04-14 19:41   ` [edk2-devel] " Michael Brown
2021-04-15 11:00     ` Laszlo Ersek
2021-04-15 17:47       ` Pintu Agarwal
2021-04-15 17:56         ` Andrew Fish

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-list 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=E0DB238F-23D3-4428-A8B8-A44F3E49FEBE@apple.com \
    --to=devel@edk2.groups.io \
    /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