[core] add option to write a small enough ISO to an ESP

* This is mostly aimed at Debian 11 netinst on the Raspberry Pi 4
* Only available for regular UEFI ISOs if GPT and FAT are selected (no MBR ESPs).
* Also fix a MinGW warning in GetUnusedDriveLetter()
This commit is contained in:
Pete Batard 2020-06-06 22:19:20 +01:00
parent 23057f6124
commit c601aed054
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
7 changed files with 72 additions and 29 deletions

View file

@ -66,7 +66,7 @@ extern uint32_t dur_mins, dur_secs;
extern uint32_t wim_nb_files, wim_proc_files, wim_extra_files;
static int actual_fs_type, wintogo_index = -1, wininst_index = 0;
extern BOOL force_large_fat32, enable_ntfs_compression, lock_drive, zero_drive, fast_zeroing, enable_file_indexing, write_as_image;
extern BOOL use_vds;
extern BOOL use_vds, write_as_esp;
uint8_t *grub2_buf = NULL, *sec_buf = NULL;
long grub2_len;
@ -1997,7 +1997,7 @@ DWORD WINAPI FormatThread(void* param)
if (fs_type < FS_EXT2)
ToValidLabel(label, (fs_type == FS_FAT16) || (fs_type == FS_FAT32) || (fs_type == FS_EXFAT));
ClusterSize = (DWORD)ComboBox_GetItemData(hClusterSize, ComboBox_GetCurSel(hClusterSize));
if (ClusterSize < 0x200)
if ((ClusterSize < 0x200) || (write_as_esp))
ClusterSize = 0; // 0 = default cluster size
Flags = FP_FORCE;