2015-09-04 14:16:56 +00:00
|
|
|
|
|
|
|
include_directories(BEFORE include)
|
|
|
|
include_directories(BEFORE include/efi)
|
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include)
|
2016-04-20 12:36:25 +00:00
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/cmlib)
|
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs)
|
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/drivers/filesystems)
|
2015-09-04 14:16:56 +00:00
|
|
|
|
|
|
|
add_definitions(-D_NTHAL_ -D_BLDR_ -D_NTSYSTEM_)
|
|
|
|
|
2015-09-05 19:18:54 +00:00
|
|
|
list(APPEND BOOTLIB_SOURCE
|
2015-09-04 14:16:56 +00:00
|
|
|
app/bootmgr/bootmgr.h
|
|
|
|
lib/bootlib.c
|
[BOOTLIB]:
- WIP work to begin reading, parsing, mounting and loading the BCD hive into a data store. Untested, has missing pieces.
- Implement BlFileSet/GetInformation, BlFileReadEx, BlFileReadAtOffsetEx and helper structures/functions. Document multiple previously unknown/magic flags.
- Implement BlMmAllocatePhysicalPages. Stub BlMmFreePhysicalPages.
- Implement MmUnmapVirtualAddress, BlMmUnmapVirtualAddressEx when operating in real mode.
- Implement ImgpGetFileSize, ImgpReadFileAtOffset, ImgpOpenFile, ImgpCloseFile, BlImgAllocateImageBuffer, BlImgLoadImageWithProgress2.
- Implement BdDebuggerInitialized, BlBdDebuggerEnabled, BlStatusPrint, BlStatuserror. Stub BlBdPullRemoteFile.
- Implement BlGetBootOptionDevice.
- Implement BiReferenceHive, BiDereferenceHive, BiCloseKey, BiOpenKey. Stub BiFlushKey, BiLoadHive.
- Implement BiAddStoreFromFile, BcdOpenStoreFromFile.
- Stub BlUtlUpdateProcess and BlResourceFindMessage.
- Other misc. cleanups.
[BOOTMGR]:
- Implement BmpFatalErrorMessageFilter, BmErrorPurge, BmpErrorLog, BmFatalErrorEx.
- Implement BmpFwGetFullPath.
- Implement BmOpenDataStore.
- Stub BmOpenBootIni
svn path=/trunk/; revision=69447
2015-10-04 21:07:12 +00:00
|
|
|
lib/misc/debug.c
|
2015-09-05 16:05:20 +00:00
|
|
|
lib/misc/bcd.c
|
2016-01-05 06:09:22 +00:00
|
|
|
lib/misc/bcdopt.c
|
|
|
|
lib/misc/bootreg.c
|
2015-09-05 20:31:14 +00:00
|
|
|
lib/misc/util.c
|
[BOOTLIB]:
- WIP work to begin reading, parsing, mounting and loading the BCD hive into a data store. Untested, has missing pieces.
- Implement BlFileSet/GetInformation, BlFileReadEx, BlFileReadAtOffsetEx and helper structures/functions. Document multiple previously unknown/magic flags.
- Implement BlMmAllocatePhysicalPages. Stub BlMmFreePhysicalPages.
- Implement MmUnmapVirtualAddress, BlMmUnmapVirtualAddressEx when operating in real mode.
- Implement ImgpGetFileSize, ImgpReadFileAtOffset, ImgpOpenFile, ImgpCloseFile, BlImgAllocateImageBuffer, BlImgLoadImageWithProgress2.
- Implement BdDebuggerInitialized, BlBdDebuggerEnabled, BlStatusPrint, BlStatuserror. Stub BlBdPullRemoteFile.
- Implement BlGetBootOptionDevice.
- Implement BiReferenceHive, BiDereferenceHive, BiCloseKey, BiOpenKey. Stub BiFlushKey, BiLoadHive.
- Implement BiAddStoreFromFile, BcdOpenStoreFromFile.
- Stub BlUtlUpdateProcess and BlResourceFindMessage.
- Other misc. cleanups.
[BOOTMGR]:
- Implement BmpFatalErrorMessageFilter, BmErrorPurge, BmpErrorLog, BmFatalErrorEx.
- Implement BmpFwGetFullPath.
- Implement BmOpenDataStore.
- Stub BmOpenBootIni
svn path=/trunk/; revision=69447
2015-10-04 21:07:12 +00:00
|
|
|
lib/misc/image.c
|
2016-01-06 04:43:23 +00:00
|
|
|
lib/misc/resource.c
|
|
|
|
lib/misc/font.c
|
2016-01-20 06:59:12 +00:00
|
|
|
lib/misc/rtlcompat.c
|
2020-03-28 13:28:49 +00:00
|
|
|
lib/rtl/libsupp.c
|
2016-01-06 04:43:23 +00:00
|
|
|
lib/firmware/fwutil.c
|
2015-09-06 03:24:30 +00:00
|
|
|
lib/firmware/efi/firmware.c
|
|
|
|
lib/mm/mm.c
|
|
|
|
lib/mm/pagealloc.c
|
|
|
|
lib/mm/heapalloc.c
|
|
|
|
lib/mm/blkalloc.c
|
2015-09-06 20:55:50 +00:00
|
|
|
lib/mm/descriptor.c
|
2015-09-06 21:29:41 +00:00
|
|
|
lib/platform/time.c
|
2015-09-09 16:50:05 +00:00
|
|
|
lib/io/blkcache.c
|
2015-09-11 04:33:24 +00:00
|
|
|
lib/io/etfs.c
|
2015-09-06 21:29:41 +00:00
|
|
|
lib/io/io.c
|
|
|
|
lib/io/device.c
|
|
|
|
lib/io/file.c
|
2015-09-07 04:37:01 +00:00
|
|
|
lib/io/fat.c
|
2015-09-07 19:46:50 +00:00
|
|
|
lib/io/display/display.c
|
|
|
|
lib/io/display/emscons.c
|
|
|
|
lib/io/display/guicons.c
|
|
|
|
lib/io/display/textcons.c
|
|
|
|
lib/io/display/efi/textcons.c
|
|
|
|
lib/io/display/efi/guicons.c
|
|
|
|
lib/io/display/efi/gop.c
|
|
|
|
lib/io/display/efi/uga.c)
|
2015-09-04 14:16:56 +00:00
|
|
|
|
|
|
|
if(ARCH STREQUAL "i386")
|
2015-09-05 19:18:54 +00:00
|
|
|
list(APPEND BOOTLIB_ASM_SOURCE
|
2017-02-04 21:59:52 +00:00
|
|
|
lib/arch/i386/transfer.s
|
2015-09-04 14:16:56 +00:00
|
|
|
)
|
2015-09-05 19:18:54 +00:00
|
|
|
list(APPEND BOOTLIB_SOURCE
|
2015-09-05 20:31:14 +00:00
|
|
|
lib/arch/i386/arch.c
|
2015-09-06 03:24:30 +00:00
|
|
|
lib/mm/i386/mmx86.c
|
2015-09-04 14:16:56 +00:00
|
|
|
)
|
|
|
|
elseif(ARCH STREQUAL "amd64")
|
2015-09-05 19:18:54 +00:00
|
|
|
list(APPEND BOOTLIB_ASM_SOURCE
|
2015-09-04 14:16:56 +00:00
|
|
|
#lib/arch/amd64/foo.asm
|
|
|
|
)
|
2015-09-05 19:18:54 +00:00
|
|
|
list(APPEND BOOTLIB_SOURCE
|
2015-09-04 14:16:56 +00:00
|
|
|
#lib/arch/amd64/foo.c
|
2015-09-08 15:56:33 +00:00
|
|
|
lib/arch/stub/arch.c
|
|
|
|
lib/mm/stub/mm.c
|
2015-09-04 14:16:56 +00:00
|
|
|
)
|
|
|
|
else()
|
2015-09-08 15:56:33 +00:00
|
|
|
list(APPEND BOOTLIB_SOURCE
|
|
|
|
lib/arch/stub/arch.c
|
2015-09-08 15:57:47 +00:00
|
|
|
lib/mm/stub/mm.c
|
2015-09-08 15:56:33 +00:00
|
|
|
)
|
2015-09-04 14:16:56 +00:00
|
|
|
endif()
|
|
|
|
|
2015-09-05 19:18:54 +00:00
|
|
|
add_asm_files(bootlib_asm ${BOOTLIB_ASM_SOURCE})
|
|
|
|
add_library(bootlib ${BOOTLIB_SOURCE} ${bootlib_asm})
|
|
|
|
add_pch(bootlib app/bootmgr/bootmgr.h BOOTLIB_SOURCE)
|
2017-02-05 10:45:50 +00:00
|
|
|
add_dependencies(bootlib bugcodes asm bootmsg xdk)
|
2015-09-04 14:16:56 +00:00
|
|
|
|
|
|
|
list(APPEND BOOTMGR_BASE_SOURCE
|
|
|
|
app/bootmgr/efiemu.c
|
|
|
|
app/bootmgr/bootmgr.c
|
|
|
|
)
|
|
|
|
|
2016-01-06 04:43:23 +00:00
|
|
|
add_executable(bootmgfw ${BOOTMGR_BASE_SOURCE} app/bootmgr/bootmgr.rc)
|
2015-09-04 14:16:56 +00:00
|
|
|
set_target_properties(bootmgfw PROPERTIES SUFFIX ".efi")
|
|
|
|
|
|
|
|
if(MSVC)
|
2020-05-26 18:24:02 +00:00
|
|
|
if(ARCH STREQUAL "arm")
|
2021-09-13 16:51:08 +00:00
|
|
|
target_link_options(bootmgfw PRIVATE /ignore:4078 /ignore:4254 /DRIVER)
|
2017-07-25 17:30:21 +00:00
|
|
|
else()
|
2021-09-13 16:51:08 +00:00
|
|
|
target_link_options(bootmgfw PRIVATE /ignore:4078 /ignore:4254 /DRIVER /DYNAMICBASE:NO /NXCOMPAT:NO /FIXED)
|
2017-07-25 17:30:21 +00:00
|
|
|
endif()
|
2015-09-04 14:16:56 +00:00
|
|
|
else()
|
2021-09-13 16:51:08 +00:00
|
|
|
target_link_options(bootmgfw PRIVATE "-Wl,--strip-all,--exclude-all-symbols")
|
2015-09-04 14:16:56 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set_image_base(bootmgfw 0x10000)
|
2015-09-04 14:40:15 +00:00
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set_subsystem(bootmgfw EFI_APPLICATION)
|
|
|
|
else()
|
|
|
|
set_subsystem(bootmgfw 10)
|
|
|
|
endif()
|
|
|
|
|
2015-09-04 14:16:56 +00:00
|
|
|
set_entrypoint(bootmgfw EfiEntry)
|
|
|
|
|
2022-08-21 19:17:05 +00:00
|
|
|
target_link_libraries(bootmgfw bootlib cportlib blcmlib blrtl libcntpr)
|
2015-09-04 14:16:56 +00:00
|
|
|
|
2020-04-09 01:40:17 +00:00
|
|
|
# dynamic analysis switches
|
2015-09-04 15:33:12 +00:00
|
|
|
if(STACK_PROTECTOR)
|
2020-12-31 16:56:39 +00:00
|
|
|
target_sources(bootmgfw PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
|
2020-04-09 01:40:17 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(RUNTIME_CHECKS)
|
2015-09-04 15:33:12 +00:00
|
|
|
target_link_libraries(bootmgfw runtmchk)
|
|
|
|
endif()
|
|
|
|
|
2015-09-04 14:43:01 +00:00
|
|
|
add_dependencies(bootmgfw asm bugcodes)
|
2015-09-04 14:16:56 +00:00
|
|
|
|
2016-01-20 06:59:12 +00:00
|
|
|
list(APPEND ROSLOAD_BASE_SOURCE
|
|
|
|
app/rosload/rosload.c
|
2018-02-03 17:16:06 +00:00
|
|
|
app/rosload/roslogo.c
|
2016-01-20 06:59:12 +00:00
|
|
|
)
|
|
|
|
|
2018-02-03 17:16:06 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
|
|
|
list(APPEND ROSLOAD_ASM_SOURCE
|
|
|
|
app/rosload/i386/osxfera.s
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_asm_files(rosload_asm ${ROSLOAD_ASM_SOURCE})
|
|
|
|
add_executable(rosload ${ROSLOAD_BASE_SOURCE} ${rosload_asm})
|
2016-01-20 06:59:12 +00:00
|
|
|
set_target_properties(rosload PROPERTIES SUFFIX ".efi")
|
|
|
|
|
|
|
|
if(MSVC)
|
2021-09-13 16:51:08 +00:00
|
|
|
target_link_options(rosload PRIVATE /ignore:4078 /ignore:4254 /DRIVER)
|
2016-01-20 06:59:12 +00:00
|
|
|
else()
|
2021-09-13 16:51:08 +00:00
|
|
|
target_link_options(rosload PRIVATE "-Wl,--strip-all,--exclude-all-symbols,--dynamicbase,--pic-executable")
|
2016-01-20 06:59:12 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set_image_base(rosload 0x10000)
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set_subsystem(rosload BOOT_APPLICATION)
|
|
|
|
else()
|
2016-01-20 17:00:51 +00:00
|
|
|
set_subsystem(rosload 16)
|
2016-01-20 06:59:12 +00:00
|
|
|
endif()
|
|
|
|
|
2016-02-03 19:12:34 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
|
|
|
set_entrypoint(rosload OslMain 4)
|
|
|
|
else()
|
|
|
|
set_entrypoint(rosload OslMain)
|
|
|
|
endif()
|
2016-01-20 06:59:12 +00:00
|
|
|
|
2022-08-21 19:17:05 +00:00
|
|
|
target_link_libraries(rosload bootlib cportlib blcmlib blrtl libcntpr)
|
2016-01-20 06:59:12 +00:00
|
|
|
|
2020-04-09 01:40:17 +00:00
|
|
|
# dynamic analysis switches
|
2016-01-20 06:59:12 +00:00
|
|
|
if(STACK_PROTECTOR)
|
2020-12-31 16:56:39 +00:00
|
|
|
target_sources(rosload PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
|
2020-04-09 01:40:17 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(RUNTIME_CHECKS)
|
2016-01-20 06:59:12 +00:00
|
|
|
target_link_libraries(rosload runtmchk)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_dependencies(rosload asm bugcodes)
|
|
|
|
|
|
|
|
add_cd_file(TARGET rosload DESTINATION reactos/system32/boot NO_CAB FOR all)
|