Windows Bootloader: Fix Rescue Disk issue when Cascades and SHA256 used. It was caused by the bootloader becoming too big in this case with PIM implementation (larger than the limit of 31232 bytes). We also increase memory requirement for this case

This commit is contained in:
Mounir IDRASSI 2015-09-13 00:16:14 +02:00
parent 22152878f8
commit 7e73208e62
4 changed files with 11 additions and 2 deletions

View File

@ -17,7 +17,7 @@
#include "BootDefs.h"
// The user will be advised to upgrade the rescue disk if upgrading from the following or any previous version
#define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x0111
#define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x0113
#define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS)

View File

@ -14,7 +14,11 @@
#define TC_HEADER_Boot_BootDefs
// Total memory required (CODE + DATA + BSS + STACK + 0x100) in KBytes - determined from linker map.
#define TC__BOOT_MEMORY_REQUIRED 42
#ifdef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
#define TC__BOOT_MEMORY_REQUIRED 44
#else
#define TC__BOOT_MEMORY_REQUIRED 42
#endif
#ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE
# undef TC__BOOT_MEMORY_REQUIRED

View File

@ -193,6 +193,10 @@ $(LIBS)
$(LD) $(LFLAGS) @$(PROJ).crf
del $(PROJ).crf $(PROJ).crf2
# Compress the Rescue Disk botloader for Cascades and SHA2 since it is too big (size > 31232 bytes)
!if DEFINED(RESCUE_DISK) && !DEFINED (SINGLE_CIPHER) && "$(SINGLE_PRF)" == "SHA2"
upx $(PROJ).$(TARGETEXT)
!endif
gzip.exe -c -n --best $(PROJ).$(TARGETEXT) >$(PROJ).$(TARGETEXT).gz
-dd.exe conv=notrunc,sync bs=512 seek=5 if=$(PROJ).$(TARGETEXT).gz of=$(PROJ).flp 2>NUL:
cd ..

View File

@ -51,6 +51,7 @@ Requirements for Building VeraCrypt for Windows:
header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20)
- NASM assembler 2.08 or compatible
- gzip compressor
- upx packer (available at http://upx.sourceforge.net/)
IMPORTANT: