From: "John Chew" <yuinyee.chew@starfivetech.com>
To: "Yoshinoya" <yoshinoyatoko@163.com>, devel@edk2.groups.io
Subject: Re: [edk2-devel] Is there a way to create filesystem in UEFI Shell ?
Date: Wed, 03 Apr 2024 20:11:00 -0700 [thread overview]
Message-ID: <30325.1712200260725716779@groups.io> (raw)
In-Reply-To: <e5eb299.adcd.18ea2edc3c3.Coremail.yoshinoyatoko@163.com>
[-- Attachment #1.1: Type: text/plain, Size: 1501 bytes --]
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:
Finally, create a disk with the filesystem buffer created earlier.
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.
Thus, I still couldn't TFTP Linux (~25MB) into my filesystem "FS0:"
My solution:
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:
Thanks everyone!!
John
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117400): https://edk2.groups.io/g/devel/message/117400
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 #1.2: Type: text/html, Size: 2731 bytes --]
[-- Attachment #2: dummyfile.0.part --]
[-- Type: image/png, Size: 15916 bytes --]
[-- Attachment #3: dummyfile.1.part --]
[-- Type: image/png, Size: 8100 bytes --]
[-- Attachment #4: dummyfile.2.part --]
[-- Type: image/png, Size: 45655 bytes --]
[-- Attachment #5: dummyfile.3.part --]
[-- Type: image/png, Size: 87659 bytes --]
[-- Attachment #6: dummyfile.4.part --]
[-- Type: image/png, Size: 95689 bytes --]
[-- Attachment #7: dummyfile.5.part --]
[-- Type: image/png, Size: 6186 bytes --]
[-- Attachment #8: dummyfile.6.part --]
[-- Type: image/png, Size: 7499 bytes --]
next prev parent reply other threads:[~2024-04-04 3:11 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 [this message]
2024-04-17 10:42 ` charlleygreen.work
2024-04-17 20:30 ` Andrew Fish via groups.io
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=30325.1712200260725716779@groups.io \
--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