[FREELDR]

- Fix MSVC linkerflags for setupldr
- Move stack from 78000 to 98000 to fix conflicts with freeldr code, which is larger when built with MSVC
- MSVC compiled setupldr works now!

svn path=/trunk/; revision=52360
This commit is contained in:
Timo Kreuzer 2011-06-19 10:03:45 +00:00
parent 9dedf3489c
commit 5119d4e93c
3 changed files with 7 additions and 9 deletions

View file

@ -117,9 +117,6 @@ if(ARCH MATCHES i386)
list(APPEND FREELDR_COMMON_SOURCE
arch/i386/drvmap.S
arch/i386/multiboot.S)
else()
list(APPEND FREELDR_COMMON_SOURCE
arch/i386/realmode.S)
endif()
elseif(ARCH MATCHES amd64)
list(APPEND FREELDR_COMMON_SOURCE
@ -217,7 +214,7 @@ add_executable(setupldr_pe ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE})
if(NOT MSVC)
set_target_properties(setupldr_pe PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,--exclude-all-symbols -Wl,--file-alignment,0x1000 -Wl,-T,${CMAKE_CURRENT_SOURCE_DIR}/freeldr_i386.lnk" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP")
else()
set_target_properties(setupldr_pe PROPERTIES LINK_FLAGS "/DRIVER /SECTION:.text,ERWP,ALIGN=0x1000" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP")
set_target_properties(setupldr_pe PROPERTIES LINK_FLAGS "/ignore:4078 /ignore:4254 /DRIVER /FIXED /ALIGN:0x400 /SECTION:.text,ERW /SECTION:.data,RW /MERGE:.text16=.text /MERGE:.data=.text /MERGE:.rdata=.text /MERGE:.bss=.text /SUBSYSTEM:BOOT_APPLICATION" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP")
endif()
set_image_base(setupldr_pe 0x10000)

View file

@ -140,7 +140,7 @@ VOID RunLoader(VOID)
}
TimeOut = GetTimeOut();
if (!UiInitialize(TimeOut))
if (!UiInitialize(TimeOut != 0))
{
UiMessageBoxCritical("Unable to initialize UI.");
return;

View file

@ -8,14 +8,15 @@
#define BSS_START HEX(6F00)
#define FREELDR_BASE HEX(F800)
#define FREELDR_PE_BASE HEX(10000)
#define STACK32ADDR HEX(78000) /* The 32-bit stack top will be at 7000:8000, or 0x78000 */
#define BIOSCALLBUFFER HEX(78000) /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFSEGMENT HEX(7800) /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFOFFSET HEX(0000) /* Buffer to store temporary data for any Int386() call */
#define STACK32ADDR HEX(98000) /* The 32-bit stack top will be at 9000:8000, or 0xA8000 */
#define BIOSCALLBUFFER HEX(98000) /* Buffer to store temporary data for any Int386() call */
#define FILESYSBUFFER HEX(80000) /* Buffer to store file system data (e.g. cluster buffer for FAT) */
#define DISKREADBUFFER HEX(90000) /* Buffer to store data read in from the disk via the BIOS */
#define DISKREADBUFFER_SIZE 512
#define BIOSCALLBUFSEGMENT (BIOSCALLBUFFER/16) /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFOFFSET HEX(0000) /* Buffer to store temporary data for any Int386() call */
/* These addresses specify the realmode "BSS section" layout */
#define BSS_RealModeEntry (BSS_START + 0)
#define BSS_CallbackAddress (BSS_START + 4)