public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: Andrew Fish <afish@apple.com>, Rick Warner <rick@microway.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: how do I use RamDiskDxe?
Date: Tue, 13 Feb 2018 03:05:04 +0000	[thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A0931D541E3@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <CC4D5E09-9CE7-4A98-A81C-F3629145A4E0@apple.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Andrew Fish
> Sent: Tuesday, February 13, 2018 8:40 AM
> To: Rick Warner
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] how do I use RamDiskDxe?
> 
> 
> 
> > On Feb 12, 2018, at 1:07 PM, Rick Warner <rick@microway.com> wrote:
> >
> > Hi All,
> >
> > I'm trying to develop a tool for automated BIOS flashing from the EFI shell
> using IPMI serial over lan to drive it.  To accomplish this, my plan is to use a
> network booted EFI shell with a tftp client and a ramdisk to download the flash
> tools and ROM into as a workspace and then run the flash commands from that
> ram disk.
> >
> > I've been able to successfully build and boot an efi shell from the edk 2
> sources including the tftp client.  I've also been able to separately build the
> RamDiskDxe driver from the MdeModulePkg. Loading the RamDiskDxe.efi
> driver file results in a successful message, but I do not get any usable ram disk
> made available to me?
> >
> > How do I get a usable drive letter/name (ie blk0: or any other name) from the
> RamDiskDxe driver?
> >
> 
> Looks like when you load the RamDiskDxe it registers gEfiRamDiskProtocolGuid
> https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Protocol/Ra
> mDisk.h
> <https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Protocol/Ra
> mDisk.h> which notes this API was added in UEFI 2.6 so you can read up on it in
> that version of the EFI Spec.
> 
> From a quick site read of the code it looks like the driver just produces a
> Protocol that lets you create a RAM disk and VRF (Setup Pages) that let you
> configure one. Seems like you still need to call it and give the raw disk image.
> 



> > Once I've done that, will it be possible to include the RamDiskDxe driver as
> part of the network bootable efi shell image?  I assume I'll need to modify
> the .dsc file for the ShellPkg to include the MdeModulePkg pieces.
> >
> > If anyone has any other suggestions for this, I'm open to ideas. The only way
> I've been successful in network booting EFI shell is using just that file directly.  I
> tried creating a dos filesystem image with the efi shell file in it just like would
> work with a USB key, but that would not boot over the network stack. If there is
> some way of creating a network bootable EFI shell filesystem image (similar to
> how Linux can network boot a separate vmlinuz kernel and initrd image)?
> >
> > Are there any docs that I've missed (I've tried looking in the user docs and on
> the wiki) regarding setting up RamDiskDxe?
> >
> 
> Traditionally network booting has involved loading a single file over the
> network (like an OS Loader) and that file uses the UEFI networking stack to
> download (TFTP read) more images (like the Kernel) from a location implied by
> the location used to download the single file (OS Loader).
> 

Hi,

For the RamDiskDxe part:

Just as the previous reply, the RamDiskDxe driver provides:
a). A protocol to (un)register a range of memory to a Ram disk
b). A setup page for user to create:
    a raw Ram disk (no data on the created one) or,
    from a selected file (the file will be the content in the Ram disk,
    no file system though)

If you want to place the flash tools in the Ram disk and use it, I think
you also need to format the Ram disk and create file system on it first
(e.g. FAT).

Best Regards,
Hao Wu

> Thanks,
> 
> Andrew Fish
> 
> > Thanks!
> > Rick Warner
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org <mailto:edk2-devel@lists.01.org>
> > https://lists.01.org/mailman/listinfo/edk2-devel
> <https://lists.01.org/mailman/listinfo/edk2-devel>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2018-02-13  2:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 21:07 how do I use RamDiskDxe? Rick Warner
2018-02-13  0:40 ` Andrew Fish
2018-02-13  3:05   ` Wu, Hao A [this message]
2018-02-13 16:33     ` Rick Warner
2018-02-14  0:48       ` Wu, Hao A
2018-03-06 19:41         ` Rick Warner

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=B80AF82E9BFB8E4FBD8C89DA810C6A0931D541E3@SHSMSX104.ccr.corp.intel.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