File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed
Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ list(APPEND FREELDR_BOOTLIB_SOURCE
5858
5959list (APPEND FREELDR_BOOTMGR_SOURCE
6060 include /freeldr.h
61+ custom.c
62+ # linuxboot.c
63+ miscboot.c
64+ options.c
65+ oslist.c
6166 settings.c
6267 ui/directui.c
6368 # ui/gui.c
@@ -83,7 +88,10 @@ if(ARCH STREQUAL "i386")
8388 # arch/i386/linux.S
8489
8590 list (APPEND FREELDR_ARC_SOURCE
86- arch/i386/i386bug.c)
91+ arch/i386/i386bug.c
92+ arch/i386/halstub.c
93+ arch/i386/ntoskrnl.c
94+ disk/scsiport.c)
8795
8896 list (APPEND FREELDR_NTLDR_SOURCE
8997 ntldr/arch/i386/winldr.c
@@ -110,8 +118,14 @@ else()
110118endif ()
111119
112120list (APPEND FREELDR_BASE_SOURCE
121+ bootmgr.c # This file is compiled with custom definitions
113122 freeldr.c
114- ntldr/ntldropts.c # Should be in rosload, but is currently needed by machpc.c, etc.
123+ ntldr/setupldr.c ## Strangely enough this file is needed in GCC builds
124+ ## even if ${FREELDR_NTLDR_SOURCE} is not added,
125+ ## otherwise we get linking errors with Rtl**Bitmap** APIs.
126+ ## Do not happen on MSVC builds however...
127+ ntldr/inffile.c
128+ ntldr/ntldropts.c
115129 lib/rtl/libsupp.c)
116130
117131if (ARCH STREQUAL "i386" OR ARCH STREQUAL "amd64" )
@@ -121,7 +135,6 @@ if(ARCH STREQUAL "i386" OR ARCH STREQUAL "amd64")
121135endif ()
122136
123137include (pcat.cmake )
124- include (rosload.cmake )
125138if (NOT ARCH STREQUAL "i386" OR NOT (SARCH STREQUAL "pc98" OR SARCH STREQUAL "xbox" ))
126139 include (uefi.cmake )
127140endif ()
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ CCHAR FrLdrBootPath[MAX_PATH] = "";
3030
3131/* FUNCTIONS ******************************************************************/
3232
33+ VOID RunLoader (VOID );
34+
3335static
3436BOOLEAN
3537LoadRosload (
6870ULONG
6971LaunchSecondStageLoader (VOID )
7072{
73+ RunLoader ();
74+ return ESUCCESS ;
75+
7176 PLDR_DATA_TABLE_ENTRY RosloadDTE ;
7277 PVOID ImageBase ;
7378 LONG (* EntryPoint )(VOID );
Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ add_library(freeldr_common
155155 ${PCATLDR_ARC_SOURCE}
156156 ${FREELDR_BOOTLIB_SOURCE}
157157 ${PCATLDR_BOOTMGR_SOURCE}
158+ ${FREELDR_NTLDR_SOURCE}
158159)
159160
160161if (MSVC AND CMAKE_C_COMPILER_ID STREQUAL "Clang" )
@@ -170,6 +171,7 @@ set(PCH_SOURCE
170171 ${PCATLDR_ARC_SOURCE}
171172 ${FREELDR_BOOTLIB_SOURCE}
172173 ${PCATLDR_BOOTMGR_SOURCE}
174+ ${FREELDR_NTLDR_SOURCE}
173175)
174176
175177add_pch (freeldr_common include /freeldr.h PCH_SOURCE )
@@ -221,7 +223,7 @@ if(ARCH STREQUAL "i386")
221223 target_link_libraries (freeldr_pe mini_hal )
222224endif ()
223225
224- target_link_libraries (freeldr_pe freeldr_common cportlib libcntpr blrtl )
226+ target_link_libraries (freeldr_pe freeldr_common cportlib blcmlib blrtl libcntpr )
225227
226228# dynamic analysis switches
227229if (STACK_PROTECTOR)
You can’t perform that action at this time.
0 commit comments