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.c...@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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-