mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-24 10:51:55 +01:00
-finally adjusted the homebrew app booter entry point to be safe with the new memory manager
-updated the app booter to be compilable with the current devkitppc, that means if you compile wiiflow it will from now on also compile the app booter -fixed a little compiler issue for the new wiiflow loader
This commit is contained in:
parent
368cfc2b7d
commit
d31f40a84b
15
Makefile
15
Makefile
@ -2,23 +2,38 @@
|
|||||||
CURDIR_TMP := $(CURDIR)
|
CURDIR_TMP := $(CURDIR)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
@echo Make App Booter
|
||||||
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/app_booter \
|
||||||
|
-f $(CURDIR_TMP)/resources/app_booter/Makefile
|
||||||
|
@mv -u $(CURDIR_TMP)/resources/app_booter/app_booter.bin \
|
||||||
|
$(CURDIR_TMP)/out/bins/app_booter.bin
|
||||||
|
|
||||||
@echo Make WiiFlow Loader
|
@echo Make WiiFlow Loader
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/extldr \
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/extldr \
|
||||||
-f $(CURDIR_TMP)/resources/extldr/Makefile
|
-f $(CURDIR_TMP)/resources/extldr/Makefile
|
||||||
|
|
||||||
@echo Make WiiFlow Booter
|
@echo Make WiiFlow Booter
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/wiiflow_game_booter \
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/wiiflow_game_booter \
|
||||||
-f $(CURDIR_TMP)/resources/wiiflow_game_booter/Makefile
|
-f $(CURDIR_TMP)/resources/wiiflow_game_booter/Makefile
|
||||||
@mv -u $(CURDIR_TMP)/resources/wiiflow_game_booter/booter.bin \
|
@mv -u $(CURDIR_TMP)/resources/wiiflow_game_booter/booter.bin \
|
||||||
$(CURDIR_TMP)/out/bins/ext_booter.bin
|
$(CURDIR_TMP)/out/bins/ext_booter.bin
|
||||||
|
|
||||||
@echo Make WiiFlow Main
|
@echo Make WiiFlow Main
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP) -f $(CURDIR_TMP)/Makefile.main
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP) -f $(CURDIR_TMP)/Makefile.main
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@echo Cleanup App Booter
|
||||||
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/app_booter \
|
||||||
|
-f $(CURDIR_TMP)/resources/app_booter/Makefile clean
|
||||||
|
|
||||||
@echo Cleanup WiiFlow Loader
|
@echo Cleanup WiiFlow Loader
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/extldr \
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/extldr \
|
||||||
-f $(CURDIR_TMP)/resources/extldr/Makefile clean
|
-f $(CURDIR_TMP)/resources/extldr/Makefile clean
|
||||||
|
|
||||||
@echo Cleanup WiiFlow Booter
|
@echo Cleanup WiiFlow Booter
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/wiiflow_game_booter \
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP)/resources/wiiflow_game_booter \
|
||||||
-f $(CURDIR_TMP)/resources/wiiflow_game_booter/Makefile clean
|
-f $(CURDIR_TMP)/resources/wiiflow_game_booter/Makefile clean
|
||||||
|
|
||||||
@echo Cleanup WiiFlow Main
|
@echo Cleanup WiiFlow Main
|
||||||
@$(MAKE) --no-print-directory -C $(CURDIR_TMP) -f $(CURDIR_TMP)/Makefile.main clean
|
@$(MAKE) --no-print-directory -C $(CURDIR_TMP) -f $(CURDIR_TMP)/Makefile.main clean
|
||||||
run:
|
run:
|
||||||
|
@ -151,7 +151,8 @@ all:
|
|||||||
clean:
|
clean:
|
||||||
@echo clean ...
|
@echo clean ...
|
||||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol $(CURDIR)/source/svnrev.h \
|
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol $(CURDIR)/source/svnrev.h \
|
||||||
$(CURDIR)/source/loader/alt_ios_gen.h $(CURDIR)/out/bins/ext_booter.bin
|
$(CURDIR)/source/loader/alt_ios_gen.h \
|
||||||
|
$(CURDIR)/out/bins/ext_booter.bin $(CURDIR)/out/bins/app_booter.bin
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
else
|
else
|
||||||
|
Binary file not shown.
@ -11,7 +11,7 @@ export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)
|
|||||||
export LIBOGC_INC := $(DEVKITPRO)/libogc/include
|
export LIBOGC_INC := $(DEVKITPRO)/libogc/include
|
||||||
export LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii
|
export LIBOGC_LIB := $(DEVKITPRO)/libogc/lib/wii
|
||||||
|
|
||||||
PREFIX := powerpc-gekko-
|
PREFIX := powerpc-eabi-
|
||||||
|
|
||||||
export AS := $(PREFIX)as
|
export AS := $(PREFIX)as
|
||||||
export CC := $(PREFIX)gcc
|
export CC := $(PREFIX)gcc
|
||||||
@ -36,8 +36,8 @@ INCLUDES :=
|
|||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
MACHDEP := -mno-eabi -mno-sdata -mcpu=750
|
MACHDEP := -mno-eabi -mno-sdata -mcpu=750
|
||||||
CFLAGS := -Wall -W -Os -ffreestanding -std=gnu99 -Wstrict-aliasing=2 $(MACHDEP) $(INCLUDE)
|
CFLAGS := -Wall -W -O1 -ffreestanding -std=gnu99 -Wstrict-aliasing=2 $(MACHDEP) $(INCLUDE)
|
||||||
CXXFLAGS := $(CFLAGS)
|
LDFLAGS := -nostartfiles -nostdlib $(MACHDEP)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# move loader to another location - THANKS CREDIAR - 0x81330000 for HBC
|
# move loader to another location - THANKS CREDIAR - 0x81330000 for HBC
|
||||||
@ -136,21 +136,21 @@ $(OUTPUT).elf: $(OFILES)
|
|||||||
# This rule links in binary data with the .jpg extension
|
# This rule links in binary data with the .jpg extension
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@echo " OBJCOPY $@"
|
@echo "output ... $@"
|
||||||
$(Q)$(OBJCOPY) -O binary $< $@
|
$(Q)$(OBJCOPY) -O binary $< $@
|
||||||
|
|
||||||
%.elf: link.ld $(OFILES)
|
%.elf: link.ld $(OFILES)
|
||||||
@echo " LINK $@"
|
@echo "linking ... $@"
|
||||||
$(Q)$(LD) -n -T $^ $(LDFLAGS) -o $@
|
$(Q)$(CC) -n -T $^ $(LDFLAGS) -o $@
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
@echo " COMPILE $@"
|
@echo "$@"
|
||||||
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%.o: %.s
|
%.o: %.s
|
||||||
@echo " ASSEMBLE $@"
|
@echo "$@"
|
||||||
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
-include $(DEPENDS)
|
-include $(DEPENDS)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# This code is licensed to you under the terms of the GNU GPL, version 2;
|
# This code is licensed to you under the terms of the GNU GPL, version 2;
|
||||||
# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
||||||
|
|
||||||
|
.extern _main
|
||||||
.globl _start
|
.globl _start
|
||||||
_start:
|
_start:
|
||||||
|
|
||||||
@ -18,4 +19,4 @@ _start:
|
|||||||
bl memset
|
bl memset
|
||||||
|
|
||||||
# Go!
|
# Go!
|
||||||
b main
|
bl _main
|
||||||
|
@ -8,7 +8,7 @@ OUTPUT_ARCH(powerpc:common)
|
|||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
. = 0x93100000;
|
. = 0x93300000;
|
||||||
|
|
||||||
.start : { crt0.o(*) }
|
.start : { crt0.o(*) }
|
||||||
.text : { *(.text) }
|
.text : { *(.text) }
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
|
|
||||||
#define EXECUTABLE_MEM_ADDR 0x92000000
|
#define EXECUTABLE_MEM_ADDR 0x92000000
|
||||||
#define SYSTEM_ARGV ((struct __argv *)0x93200000)
|
#define SYSTEM_ARGV ((struct __argv *)0x90100000)
|
||||||
|
|
||||||
void main(void)
|
void _main(void)
|
||||||
{
|
{
|
||||||
void *exeBuffer = (void *)EXECUTABLE_MEM_ADDR;
|
void *exeBuffer = (void *)EXECUTABLE_MEM_ADDR;
|
||||||
u32 exeEntryPointAddress = 0;
|
u32 exeEntryPointAddress = 0;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
export PATH := $(DEVKITPPC)/bin:$(PATH)
|
||||||
PREFIX = powerpc-eabi-
|
PREFIX = powerpc-eabi-
|
||||||
|
|
||||||
AR = $(PREFIX)ar
|
AR = $(PREFIX)ar
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
#include "gecko/gecko.hpp"
|
#include "gecko/gecko.hpp"
|
||||||
|
|
||||||
#define EXECUTE_ADDR ((u8 *)0x92000000)
|
#define EXECUTE_ADDR ((u8 *)0x92000000)
|
||||||
#define BOOTER_ADDR ((u8 *)0x93100000)
|
#define BOOTER_ADDR ((u8 *)0x93300000)
|
||||||
#define ARGS_ADDR ((u8 *)0x93200000)
|
#define ARGS_ADDR ((u8 *)0x90100000)
|
||||||
#define BOOTER_ENTRY ((entry)BOOTER_ADDR)
|
#define BOOTER_ENTRY ((entry)BOOTER_ADDR)
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
Loading…
Reference in New Issue
Block a user