GPTDiskCreator

所属分类:磁盘编程
开发工具:C
文件大小:16KB
下载次数:0
上传日期:2021-08-29 11:54:11
上 传 者sh-1993
说明:  GPT(UEFI)磁盘创建器
(GPT (UEFI) Disk Creator)

文件列表:
LICENSE (1070, 2021-08-29)
src (0, 2021-08-29)
src\.clang-format (2003, 2021-08-29)
src\CMakeLists.txt (251, 2021-08-29)
src\basic_types.h (507, 2021-08-29)
src\crc_32.c (3502, 2021-08-29)
src\crc_32.h (214, 2021-08-29)
src\disk.c (8027, 2021-08-29)
src\disk.h (1661, 2021-08-29)
src\fat_32.c (2979, 2021-08-29)
src\fat_32.h (2585, 2021-08-29)
src\gpt.c (2132, 2021-08-29)
src\gpt.h (2104, 2021-08-29)
src\guid.c (1574, 2021-08-29)
src\guid.h (816, 2021-08-29)
src\lba.c (890, 2021-08-29)
src\lba.h (673, 2021-08-29)
src\main.c (1431, 2021-08-29)
src\mbr.c (743, 2021-08-29)
src\mbr.h (859, 2021-08-29)

# GPTDiskCreator This is a GPT (GUID Partition Table) virtual disk file creator library that follows the UEFI Specification Version 2.9 (March 2021) document accessible from [here](https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf). ## How to Build In the root directory of the repository, run the following commands: ``` cmake -S src -B build cmake --build build ``` Now you'll have an executable which you can run by executing: ``` ./build/ThatDiskCreator ``` Which will generate a file called `disk.hdd` in the same directory it was run from. You can change the parameters for the output in `src/main.c`. ## The API This library takes in a struct of type `disk_options_t` and outputs a virtual disk file. The parameters are as follows: ```c typedef struct { // 0 indicates "inferred", max size of about 4 terabytes, i.e. 4*1024^2 megabytes disk_size_b_t disk_size_b; // 512 is the only supported value, however multiples of 512 up to 4096 are allowed only experimentally block_size_b_t logical_block_size_b; // array of partition sizes in megabytes, max partition size of 8 terabytes partition_size_b_t partition_sizes_b[GPT_PARTITION_ARRAY_LENGTH]; // index of EFI System Partition in the partition array, negative values indicate no ESP partition_index_t efi_system_partition_index; // index of Partition with its boot flag set, negative values indicate no partitions with boot flag partition_index_t boot_partition_index; } disk_options_t; ```

近期下载者

相关文件


收藏者