{"id":13698707,"url":"https://github.com/pbatard/efifs","last_synced_at":"2025-05-15T13:05:34.891Z","repository":{"id":48078321,"uuid":"20904851","full_name":"pbatard/EfiFs","owner":"pbatard","description":"EFI FileSystem drivers","archived":false,"fork":false,"pushed_at":"2024-11-30T13:08:44.000Z","size":17204,"stargazers_count":552,"open_issues_count":0,"forks_count":84,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-04-29T11:40:56.463Z","etag":null,"topics":["aarch64","arm","c","driver","edk2","efi","efi-drivers","exfat","f2fs","fs","gcc","gnu-efi","grub","grub2","ia32","ntfs","qemu","uefi","x64"],"latest_commit_sha":null,"homepage":"https://efi.akeo.ie","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbatard.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-17T00:19:31.000Z","updated_at":"2025-04-20T19:36:24.000Z","dependencies_parsed_at":"2024-06-04T17:27:53.259Z","dependency_job_id":"ba026894-4d4e-4f52-a8e5-17265a2d710d","html_url":"https://github.com/pbatard/EfiFs","commit_stats":{"total_commits":185,"total_committers":8,"mean_commits":23.125,"dds":"0.048648648648648596","last_synced_commit":"408787353c3ad06226f54940437101323efec11b"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2FEfiFs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2FEfiFs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2FEfiFs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2FEfiFs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbatard","download_url":"https://codeload.github.com/pbatard/EfiFs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254346624,"owners_count":22055808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aarch64","arm","c","driver","edk2","efi","efi-drivers","exfat","f2fs","fs","gcc","gnu-efi","grub","grub2","ia32","ntfs","qemu","uefi","x64"],"created_at":"2024-08-02T19:00:52.091Z","updated_at":"2025-05-15T13:05:34.869Z","avatar_url":"https://github.com/pbatard.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"EfiFs - EFI File System Drivers\n===============================\n\n[![Build status](https://img.shields.io/github/actions/workflow/status/pbatard/EfiFs/windows_msvc_gnu-efi.yml?style=flat-square\u0026label=MSVC%20(gnu-efi))](https://github.com/pbatard/EfiFs/actions/workflows/windows_msvc_gnu-efi.yml)\n[![Build status](https://img.shields.io/github/actions/workflow/status/pbatard/EfiFs/windows_msvc_edk2.yml?style=flat-square\u0026label=MSVC%20(EDK2))](https://github.com/pbatard/EfiFs/actions/workflows/windows_msvc_edk2.yml)\n[![Build status](https://img.shields.io/github/actions/workflow/status/pbatard/EfiFs/linux_gcc_gnu-efi.yml?style=flat-square\u0026label=gcc%20(gnu-efi))](https://github.com/pbatard/EfiFs/actions/workflows/linux_gcc_gnu-efi.yml)\n[![Build status](https://img.shields.io/github/actions/workflow/status/pbatard/EfiFs/linux_gcc_edk2.yml?style=flat-square\u0026label=gcc%20(EDK2))](https://github.com/pbatard/EfiFs/actions/workflows/linux_gcc_edk2.yml)\n[![Github stats](https://img.shields.io/github/downloads/pbatard/EfiFs/total.svg?label=Downloads\u0026style=flat-square)](https://github.com/pbatard/EfiFs/releases)  \n[![Release](https://img.shields.io/github/release-pre/pbatard/EfiFs.svg?label=Latest%20Release\u0026style=flat-square)](https://github.com/pbatard/EfiFs/releases)\n[![Licence](https://img.shields.io/badge/license-GPLv3-blue.svg?label=License\u0026style=flat-square)](https://www.gnu.org/licenses/gpl-3.0.en.html)\n\nThis is a GPLv3+ implementation of standalone EFI File System drivers, based on\nthe [GRUB 2.0](http://www.gnu.org/software/grub/) __read-only__ drivers.\n\nFor additional info as well as precompiled drivers, see https://efi.akeo.ie\n\n## Requirements\n\n* [Visual Studio 2022](https://www.visualstudio.com/vs/community/) (Windows),\n  MinGW (Windows), gcc (Linux) or [EDK2](https://github.com/tianocore/edk2).\n* A git client able to initialize/update submodules\n* [QEMU](https://www.qemu.org) __v2.7 or later__ if debugging with Visual Studio\n  (NB: You can find QEMU Windows binaries [here](https://qemu.weilnetz.de/w64/))\n\n## Compilation\n\n### Common\n\n* Fetch the git submodules with `git submodule init` and `git submodule update`.  \n  __NOTE__ This only works if you cloned the directory using `git`.\n* Apply `0001-GRUB-fixes.patch` to the `grub\\` subdirectory. This applies the\n  changes that are required for successful compilation of GRUB.\n\n### Visual Studio (non EDK2)\n\n* Open the solution file and hit `F5` to compile and debug the default driver.\n\n### gcc (non EDK2)\n\n* Run `make` in the top directory. If needed you can also issue something like\n  `make ARCH=\u003carch\u003e CROSS_COMPILE=\u003ctuple\u003e` where `\u003carch\u003e` is one of `ia32`,\n  `x64`, `arm`, `aa64`, `riscv64` or `loongarch64` (the __official__ UEFI\n  abbreviations for an arch, as used in `/efi/boot/boot[ARCH].efi`) and `\u003ctuple\u003e`\n  is the one for your cross-compiler, such as `arm-linux-gnueabi-` or\n  `aarch64-linux-gnu-`.\n  e.g. `make ARCH=aa64 CROSS_COMPILE=aarch64-linux-gnu-`\n\n### EDK2\n\n* Open an elevated command prompt and create a symbolic link called `EfiFsPkg`,\n  inside your EDK2 directory, to the EfiFs source. On Windows, from an elevated\n  prompt, you could run something like `mklink /D EfiFsPkg C:\\efifs`, and on\n  Linux `ln -s ../efifs EfiFsPkg`.\n* From a command prompt, set Grub to target the platform you are compiling for\n  by invoking:\n  * (Windows) `set_grub_cpu.cmd \u003carch\u003e`\n  * (Linux) `./set_grub_cpu.sh \u003carch\u003e`  \n  Where `\u003carch\u003e` is one of `ia32`, `x64`, `arm`, `aarch64`, `riscv64` or `loongarch64`.\n  Note that you __MUST__ invoke the `set_grub_cpu` script __every time you\n  switch target__.\n* After having invoked `edksetup.bat` (Windows) or `edksetup.sh` (Linux) run\n  something like:  \n  ```\n  build -a X64 -b RELEASE -t \u003ctoolchain\u003e -p EfiFsPkg/EfiFsPkg.dsc\n  ```  \n  where `\u003ctoolchain\u003e` is something like `VS2022` (Windows) or `GCC5` (Linux).  \n  NB: To build an individual driver, such as NTFS, you can also use something\n  like:  \n  ```\n  build -a X64 -b RELEASE -t \u003ctoolchain\u003e -p EfiFsPkg/EfiFsPkg.dsc -m EfiFsPkg/EfiFsPkg/Ntfs.inf\n  ```\n* A Windows script to build the drivers, using EDK2 with VS2022 is also provided\n  as `edk2_build_drivers.cmd`.\n\n## Testing\n\nIf QEMU is installed, the Visual Studio solution will set up and test the\ndrivers using QEMU (by also downloading a sample image for each target file\nsystem). Note however that VS debugging expects a 64-bit version of QEMU to be\ninstalled in `C:\\Program Files\\qemu\\` (which you can download [here](https://qemu.weilnetz.de/w64/)).\nIf that is not the case, you should edit `.msvc\\debug.vbs` accordingly.\n\nFor testing outside of Visual Studio, make sure you have at least one disk with\na target partition using the target filesystem, that is not being handled by\nother EFI filesystem drivers.\nThen boot into the EFI shell and run the following:\n* `load fs0:\\\u003cfs_name\u003e_\u003carch\u003e.efi` or wherever your driver was copied\n* `map -r` this should make a new `fs#` available, eg `fs2:`\n* You should now be able to navigate and access content (in read-only mode)\n* For logging output, set the `FS_LOGGING` shell variable to 1 or more\n* To unload use the `drivers` command, then `unload` with the driver ID\n\n## Visual Studio 2022 and ARM/ARM64 support\n\nPlease be mindful that, to enable ARM/ARM64 compilation support in Visual\nStudio 2022, you __MUST__ go to the _Individual components_ screen in the setup\napplication and select the ARM compilers and libraries there, as they do __NOT__\nappear in the default _Workloads_ screen:\n\n![VS2022 Individual Components](https://files.akeo.ie/pics/VS2019_Individual_Components.png)\n\n## Additional Notes\n\nThis is a pure GPLv3+ implementation of EFI drivers. Great care was taken not to\nuse any code from non GPLv3 compatible sources, such as rEFInd's `fsw_efi`\n(GPLv2 only) or Intel's FAT driver (requires an extra copyright notice).\n\nNote however that some files (the non `grub_####` sources under `./src/`) are\nlicensed under GPLv2+ rather than GPLv3+ and that, just like the GPLv3+ sources,\nwe took great care of ensuring that we are fully compliant with any licensing\nor relicensing matters, so that they can legally be reused into GPLv2+ works.\n\n## Bonus: Commands to compile EfiFs using EDK2 on a vanilla Debian GNU/Linux 10.x\n\n```\nsudo apt install nasm uuid-dev gcc-multilib gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi gcc-riscv64-linux-gnu\ngit clone --recurse-submodules https://github.com/tianocore/edk2.git\ncd edk2\nmake -C BaseTools\ngit clone --recurse-submodules https://github.com/pbatard/EfiFs.git EfiFsPkg\ncd EfiFsPkg/grub\ngit apply ../0001-GRUB-fixes.patch\ncd -\nexport GCC5_ARM_PREFIX=arm-linux-gnueabi-\nexport GCC5_AARCH64_PREFIX=aarch64-linux-gnu-\nexport GCC5_RISCV64_PREFIX=riscv64-linux-gnu-\nsource edksetup.sh --reconfig\n./EfiFsPkg/set_grub_cpu.sh X64\nbuild -a X64 -b RELEASE -t GCC5 -p EfiFsPkg/EfiFsPkg.dsc\n./EfiFsPkg/set_grub_cpu.sh IA32\nbuild -a IA32 -b RELEASE -t GCC5 -p EfiFsPkg/EfiFsPkg.dsc\n./EfiFsPkg/set_grub_cpu.sh AARCH64\nbuild -a AARCH64 -b RELEASE -t GCC5 -p EfiFsPkg/EfiFsPkg.dsc\n./EfiFsPkg/set_grub_cpu.sh ARM\nbuild -a ARM -b RELEASE -t GCC5 -p EfiFsPkg/EfiFsPkg.dsc\n./EfiFsPkg/set_grub_cpu.sh RISCV64\nbuild -a RISCV64 -b RELEASE -t GCC5 -p EfiFsPkg/EfiFsPkg.dsc\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbatard%2Fefifs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbatard%2Fefifs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbatard%2Fefifs/lists"}