public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Fish via groups.io" <afish=apple.com@groups.io>
To: edk2-devel-groups-io <devel@edk2.groups.io>,
	yuinyee.chew@starfivetech.com
Cc: Yoshinoya <yoshinoyatoko@163.com>
Subject: Re: [edk2-devel] Is there a way to create filesystem in UEFI Shell ?
Date: Wed, 17 Apr 2024 13:30:40 -0700	[thread overview]
Message-ID: <DEE010F4-07D5-4D93-95EE-BB791FCB707B@apple.com> (raw)
In-Reply-To: <30325.1712200260725716779@groups.io>

[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]

FYI you can have much larger files in the newer version of the filesystem. See EFI_COMMON_SECTION_HEADER2

https://uefi.org/specs/PI/1.8A/V3_Code_Definitions.html#firmware-file-system
https://uefi.org/specs/PI/1.8A/V3_Code_Definitions.html#firmware-file-section

Thanks,

Andrew Fish

> On Apr 3, 2024, at 8:11 PM, John Chew <yuinyee.chew@starfivetech.com> wrote:
> 
> On Wed, Apr 3, 2024 at 03:48 PM, Yoshinoya wrote:
> Maybe ref to ramdisk sample, create a memory type block io device, then mount file system on it.
> UEFI supports fat file system, some 3rd drivers could be added to support ext4 filesystem.
> Search them on github website
> Thanks Yoshinoya for your input. =)
> 
>  
> I have tried to compile the filesystem into my FD image as a separate FV. Then building FV HOB with it using "BuildFvHob".
> 
> Next, using the "GetSectionFromAnyFv" to load the filesystem into buffer as follow:
> 
> <dummyfile.0.part>
> 
> Finally, create a disk with the filesystem buffer created earlier. 
> 
> <dummyfile.1.part>
> 
> This works without having to create filesystem in EDK2. Instead loading it from somewhere else.
> 
> However, this method has some limitations because the maximum size of each SECTION in FFS is only 16MB.
> 
> <dummyfile.2.part>
> 
> Thus, I still couldn't TFTP Linux (~25MB) into my filesystem "FS0:"
> 
>  
> My solution:
> 
> <dummyfile.3.part> <dummyfile.4.part>
> 
> 1. Allocate buffer
> 
> 2. Populate the buffer by with100MB FAT16 header
> 
> 3. Register virtual disk with the buffer
> 
>  
> I'm able to allocate 100MB of FAT16 filesystem and TFTP Linux successfully:
> <dummyfile.5.part>
> 
> <dummyfile.6.part>
> 
>  
> Thanks everyone!!
> 
> John
> 
>  
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117933): https://edk2.groups.io/g/devel/message/117933
Mute This Topic: https://groups.io/mt/105212723/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 4364 bytes --]

  parent reply	other threads:[~2024-04-17 20:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29  8:21 [edk2-devel] Is there a way to create filesystem in UEFI Shell ? John Chew
2024-03-29 22:10 ` Andrew Fish via groups.io
2024-03-30  0:16   ` Michael D Kinney
2024-04-01  3:43     ` John Chew
2024-04-03  7:47       ` Yoshinoya
2024-04-03 12:27         ` Pedro Falcato
2024-04-04  3:11         ` John Chew
2024-04-17 10:42           ` charlleygreen.work
2024-04-17 20:30           ` Andrew Fish via groups.io [this message]
2024-04-01  3:39   ` John Chew
2024-04-01 15:07     ` Andrew Fish via groups.io

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=DEE010F4-07D5-4D93-95EE-BB791FCB707B@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