diff --git a/reactos/Makefile b/reactos/Makefile
index 89ac3ddbb9d..63d8c4ccc87 100644
--- a/reactos/Makefile
+++ b/reactos/Makefile
@@ -401,7 +401,7 @@ ifeq ($(ARCH),powerpc)
PREAUTO += $(OFW_INTERFACE_SERVICE_FILES) $(PPCMMU_TARGETS)
endif
-$(ROS_AUTOMAKE): $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES)
+$(ROS_AUTOMAKE): $(RBUILD_TARGET) $(XMLBUILDFILES) | $(PREAUTO)
${mkdir} $(OUTPUT_)media$(SEP)inf 2>$(NUL)
$(ECHO_RBUILD)
$(Q)$(RBUILD_TARGET) $(RBUILD_FLAGS) $(ROS_RBUILDFLAGS) mingw
diff --git a/reactos/ReactOS-i386.rbuild b/reactos/ReactOS-i386.rbuild
index 1c4acdd35d2..f7fc299b509 100644
--- a/reactos/ReactOS-i386.rbuild
+++ b/reactos/ReactOS-i386.rbuild
@@ -13,6 +13,8 @@
+
+
-Os
diff --git a/reactos/ReactOS-ppc.rbuild b/reactos/ReactOS-ppc.rbuild
index 0a5f712b0af..a0882d399f5 100644
--- a/reactos/ReactOS-ppc.rbuild
+++ b/reactos/ReactOS-ppc.rbuild
@@ -9,27 +9,31 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
- 1
-
- -fshort-wchar
- -fsigned-char
- -mfull-toc
- -meabi
- -O2
- -Wno-strict-aliasing
- -Wno-trampolines
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ extern
+
+
+ -fshort-wchar
+ -fsigned-char
+ -mfull-toc
+ -meabi
+ -O2
+ -Wno-strict-aliasing
diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s b/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s
index 7efff45fb7b..62e0f3cb9d6 100644
--- a/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s
+++ b/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s
@@ -28,10 +28,18 @@ _start:
lwz %r3,ofw_call_addr@l(%r3)
cmpw %r3,%r31 /* Zero? */
mr %r3,%r31
- beq bootme
+ beq initfp
lis %r3,call_ofw@ha
addi %r3,%r3,call_ofw@l
+ b bootme
+
+initfp:
+ /* Enabling FP at this point won't hurt, and the varargs scheme we're
+ * using now requires it. */
+ mfmsr %r0
+ ori %r0,%r0,8192
+ mtmsr %r0
bootme:
blr
diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c b/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
index de937c04bd0..64882187b55 100644
--- a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
+++ b/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
@@ -591,9 +591,11 @@ void MachInit(const char *CmdLine) {
}
if( strlen(BootPart) == 0 ) {
- len = ofw_getprop(chosen_package, "bootpath",
- BootPath, sizeof(BootPath));
-
+ if (ofproxy)
+ len = ofw_getprop(chosen_package, "bootpath",
+ BootPath, sizeof(BootPath));
+ else
+ len = 0;
if( len < 0 ) len = 0;
BootPath[len] = 0;
printf( "Boot Path: %s\n", BootPath );
diff --git a/reactos/boot/freeldr/freeldr/freeldr.rbuild b/reactos/boot/freeldr/freeldr/freeldr.rbuild
index 5e129deeae9..e4d4dbfeed9 100644
--- a/reactos/boot/freeldr/freeldr/freeldr.rbuild
+++ b/reactos/boot/freeldr/freeldr/freeldr.rbuild
@@ -26,6 +26,7 @@
cmlib
rtl
libcntpr
+ ppcmmu
diff --git a/reactos/boot/freeldr/freeldr/fs/fat.c b/reactos/boot/freeldr/freeldr/fs/fat.c
index 49156110a4e..74528fb3a2c 100644
--- a/reactos/boot/freeldr/freeldr/fs/fat.c
+++ b/reactos/boot/freeldr/freeldr/fs/fat.c
@@ -242,7 +242,7 @@ BOOLEAN FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector, ULONG Partitio
//
// Check the boot sector magic
//
- if (! ISFATX(FatType) && SWAPW(FatVolumeBootSector->BootSectorMagic) != 0xaa55)
+ if (! ISFATX(FatType) && FatVolumeBootSector->BootSectorMagic != 0xaa55)
{
sprintf(ErrMsg, "Invalid boot sector magic on drive 0x%x (expected 0xaa55 found 0x%x)",
DriveNumber, FatVolumeBootSector->BootSectorMagic);
diff --git a/reactos/boot/freeldr/freeldr/include/arch.h b/reactos/boot/freeldr/freeldr/include/arch.h
index 037f1cf4310..c92c4c91e56 100644
--- a/reactos/boot/freeldr/freeldr/include/arch.h
+++ b/reactos/boot/freeldr/freeldr/include/arch.h
@@ -34,11 +34,17 @@
#define STACK16ADDR 0x7000 /* The 16-bit stack top will be at 0000:7000 */
#define STACK32ADDR 0x78000 /* The 32-bit stack top will be at 7000:8000, or 0x78000 */
+#ifdef _M_IX86
#define BIOSCALLBUFFER 0x78000 /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFSEGMENT 0x7800 /* Buffer to store temporary data for any Int386() call */
#define BIOSCALLBUFOFFSET 0x0000 /* Buffer to store temporary data for any Int386() call */
#define FILESYSBUFFER 0x80000 /* Buffer to store file system data (e.g. cluster buffer for FAT) */
#define DISKREADBUFFER 0x90000 /* Buffer to store data read in from the disk via the BIOS */
+#elif defined(_M_PPC)
+extern PVOID FsStaticBufferDisk, FsStaticBufferData;
+#define DISKREADBUFFER FsStaticBufferDisk
+#define FILESYSBUFFER FsStaticBufferData
+#endif
/* Makes "x" a global variable or label */
#define EXTERN(x) .global x; x:
diff --git a/reactos/config-ppc.template.rbuild b/reactos/config-ppc.template.rbuild
index 36f36b8690b..9eca1ed4696 100644
--- a/reactos/config-ppc.template.rbuild
+++ b/reactos/config-ppc.template.rbuild
@@ -35,6 +35,10 @@
-->
+
+