diff --git a/reactos/ReactOS-ppc.rbuild b/reactos/ReactOS-ppc.rbuild
index 092cbc3aa4a..1804d47dc6d 100644
--- a/reactos/ReactOS-ppc.rbuild
+++ b/reactos/ReactOS-ppc.rbuild
@@ -9,7 +9,7 @@
-
+
diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c b/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c
index 17de0f61daa..d5e63ad792d 100644
--- a/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c
+++ b/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c
@@ -61,7 +61,6 @@ extern boot_infos_t BootInfo;
#define BAT_GRANULARITY (64 * 1024)
#define KernelMemorySize (8 * 1024 * 1024)
-#define KernelEntryPoint (KernelEntry - KERNEL_BASE_PHYS) + KernelBase
#define XROUNDUP(x,n) ((((ULONG)x) + ((n) - 1)) & (~((n) - 1)))
/* Load Address of Next Module */
@@ -77,7 +76,7 @@ ULONG_PTR KernelBase;
BOOLEAN PaeModeEnabled;
/* Kernel Entrypoint in Physical Memory */
-ULONG_PTR KernelEntry;
+ULONG_PTR KernelEntryPoint;
/* Dummy to bring in memmove */
PVOID memmove_dummy = memmove;
@@ -127,7 +126,7 @@ NTAPI
FrLdrStartup(ULONG Magic)
{
KernelEntryFn KernelEntryAddress =
- (KernelEntryFn)(KernelEntry + KernelBase);
+ (KernelEntryFn)(KernelEntryPoint + KernelBase);
ULONG_PTR i, j, page, count;
PCHAR ModHeader;
boot_infos_t *LocalBootInfo = &BootInfo;
@@ -459,7 +458,7 @@ FrLdrMapModule(FILE *KernelImage, PCHAR ImageName, PCHAR MemLoadAddr, ULONG Kern
}
ImageSize = SWAPD(NtHeader->OptionalHeader.SizeOfImage);
- KernelEntry = SWAPD(NtHeader->OptionalHeader.AddressOfEntryPoint);
+ KernelEntryPoint = SWAPD(NtHeader->OptionalHeader.AddressOfEntryPoint);
printf("Total image size is %x\n", ImageSize);
/* Handle relocation sections */
@@ -677,6 +676,24 @@ FrLdrLoadModule(FILE *ModuleImage,
return(ModuleData->ModStart);
}
+PVOID
+NTAPI
+FrLdrMapImage(IN FILE *Image, IN PCHAR ShortName, IN ULONG ImageType)
+{
+ PVOID Result;
+
+ if (ImageType == 1)
+ {
+ if(FrLdrMapKernel(Image))
+ return (PVOID)KernelBase;
+ else
+ return NULL;
+ }
+ else
+ Result = (PVOID)FrLdrLoadModule(Image, ShortName, NULL);
+ return Result;
+}
+
ULONG_PTR
NTAPI
FrLdrCreateModule(LPCSTR ModuleName)
diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c b/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c
index b3fe7d56ae9..dfffd560fc9 100644
--- a/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c
+++ b/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c
@@ -61,7 +61,7 @@ void PpcPrepVideoGetDisplaySize( PULONG Width, PULONG Height, PULONG Depth )
*Depth = 16;
}
-void PpcPrepVideoPrepareForReactOS()
+void PpcPrepVideoPrepareForReactOS(BOOLEAN setup)
{
pci_setup(&pci1_desc);
}
diff --git a/reactos/boot/freeldr/freeldr/freeldr.rbuild b/reactos/boot/freeldr/freeldr/freeldr.rbuild
index 025ab5c7c6a..edfcecfb867 100644
--- a/reactos/boot/freeldr/freeldr/freeldr.rbuild
+++ b/reactos/boot/freeldr/freeldr/freeldr.rbuild
@@ -22,5 +22,6 @@
rossym
cmlib
rtl
+ libcntpr
diff --git a/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild b/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
index 6f55745e3c6..b2783833787 100644
--- a/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
+++ b/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
@@ -57,8 +57,16 @@
-fno-zero-initialized-in-bss
-Os
boot.s
+ loader.c
mach.c
mboot.c
+ ofw.c
+ ofw_util.s
+ ofw_calls.s
+ prep.c
+ prep_ide.c
+ prep_pci.c
+ prep_vga.c
diff --git a/reactos/lib/sdk/libcntpr/libcntpr.rbuild b/reactos/lib/sdk/libcntpr/libcntpr.rbuild
index 5a1296f6efd..fa777f6b2cb 100644
--- a/reactos/lib/sdk/libcntpr/libcntpr.rbuild
+++ b/reactos/lib/sdk/libcntpr/libcntpr.rbuild
@@ -5,7 +5,9 @@
- "extern __attribute__ ((dllexport))"
+
+ "extern __attribute__ ((dllexport))"
+
.
diff --git a/reactos/tools/ppc.lost+found/link-freeldr b/reactos/tools/ppc.lost+found/link-freeldr
index c8d1e4ed0f9..125f22f3acf 100755
--- a/reactos/tools/ppc.lost+found/link-freeldr
+++ b/reactos/tools/ppc.lost+found/link-freeldr
@@ -1,74 +1,7 @@
#!/bin/sh -v
export PATH=$PATH:/usr/local/pkg/reactos-powerpc/bin
-make -C lib/mmu
powerpc-unknown-linux-gnu-ld \
-g -nostartfiles -nostdlib -N -Ttext=0xe00000 \
- -o freeldr.elf \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/boot.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/ofw_util.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/ofw_calls.o \
- obj-ppc/boot/freeldr/freeldr/cache/blocklist.o \
- obj-ppc/boot/freeldr/freeldr/cache/cache.o \
- obj-ppc/boot/freeldr/freeldr/comm/rs232.o \
- obj-ppc/boot/freeldr/freeldr/disk/disk.o \
- obj-ppc/boot/freeldr/freeldr/disk/partition.o \
- obj-ppc/boot/freeldr/freeldr/fs/ext2.o \
- obj-ppc/boot/freeldr/freeldr/fs/fat.o \
- obj-ppc/boot/freeldr/freeldr/fs/fs.o \
- obj-ppc/boot/freeldr/freeldr/fs/fsrec.o \
- obj-ppc/boot/freeldr/freeldr/fs/iso.o \
- obj-ppc/boot/freeldr/freeldr/fs/ntfs.o \
- obj-ppc/boot/freeldr/freeldr/inifile/ini_init.o \
- obj-ppc/boot/freeldr/freeldr/inifile/inifile.o \
- obj-ppc/boot/freeldr/freeldr/inifile/parse.o \
- obj-ppc/boot/freeldr/freeldr/math/libgcc2.o \
- obj-ppc/boot/freeldr/freeldr/mm/meminit.o \
- obj-ppc/boot/freeldr/freeldr/mm/mm.o \
- obj-ppc/boot/freeldr/freeldr/reactos/registry.o \
- obj-ppc/boot/freeldr/freeldr/reactos/binhive.o \
- obj-ppc/boot/freeldr/freeldr/reactos/arcname.o \
- obj-ppc/boot/freeldr/freeldr/reactos/reactos.o \
- obj-ppc/boot/freeldr/freeldr/rtl/list.o \
- obj-ppc/boot/freeldr/freeldr/rtl/libsupp.o \
- obj-ppc/boot/freeldr/freeldr/ui/gui.o \
- obj-ppc/boot/freeldr/freeldr/ui/tui.o \
- obj-ppc/boot/freeldr/freeldr/ui/tuimenu.o \
- obj-ppc/boot/freeldr/freeldr/ui/ui.o \
- obj-ppc/boot/freeldr/freeldr/video/bank.o \
- obj-ppc/boot/freeldr/freeldr/video/fade.o \
- obj-ppc/boot/freeldr/freeldr/video/palette.o \
- obj-ppc/boot/freeldr/freeldr/video/pixel.o \
- obj-ppc/boot/freeldr/freeldr/video/video.o \
- obj-ppc/boot/freeldr/freeldr/freeldr.o \
- obj-ppc/boot/freeldr/freeldr/debug.o \
- obj-ppc/boot/freeldr/freeldr/version.o \
- obj-ppc/boot/freeldr/freeldr/cmdline.o \
- obj-ppc/boot/freeldr/freeldr/machine.o \
- obj-ppc/boot/freeldr/freeldr/windows/conversion.o \
- obj-ppc/boot/freeldr/freeldr/windows/peloader.o \
- obj-ppc/boot/freeldr/freeldr/windows/winldr.o \
- obj-ppc/boot/freeldr/freeldr/windows/wlmemory.o \
- obj-ppc/boot/freeldr/freeldr/windows/wlregistry.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/mach.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/ofw.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/mboot.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/loader.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/prep.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/prep_ide.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/prep_pci.o \
- obj-ppc/boot/freeldr/freeldr/arch/powerpc/prep_vga.o \
- obj-ppc/boot/freeldr/freeldr/bootmgr.o \
- obj-ppc/boot/freeldr/freeldr/drivemap.o \
- obj-ppc/boot/freeldr/freeldr/miscboot.o \
- obj-ppc/boot/freeldr/freeldr/options.o \
- obj-ppc/boot/freeldr/freeldr/linuxboot.o \
- obj-ppc/boot/freeldr/freeldr/oslist.o \
- obj-ppc/boot/freeldr/freeldr/custom.o \
- obj-ppc/lib/rossym/rossym.a \
- obj-ppc/lib/cmlib/cmlib.a \
- obj-ppc/lib/string/string.a \
- obj-ppc/lib/rtl/rtl.a \
- obj-ppc/lib/mmu/libmmu.a \
- obj-ppc/lib/mmu/libmmu_code.a \
- /usr/local/pkg/reactos-powerpc/lib/libgcc.a
+ -o freeldr.elf output-ppc/boot/freeldr/freeldr/ofwldr \
+ -Lobj-ppc/lib/ppcmmu -lppcmmu_code -lppcmmu
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
index 91a5ecbfb25..1f6e0330d42 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
@@ -146,7 +146,7 @@ MingwModuleHandler::PassThruCacheDirectory (const FileLocation* fileLocation )
MingwModuleHandler::GetTargetDirectoryTree (
const Module& module )
{
- if ( module.type == StaticLibrary || module.type == BootProgram )
+ if ( module.type == StaticLibrary )
return backend->intermediateDirectory;
return backend->outputDirectory;
}