Skip to content

Commit

Permalink
New entry and elf loader
Browse files Browse the repository at this point in the history
- Now excecuted on FSAddClientEX
- getting the persistentID from the system instead of guessing
- cleaner log files
- improved the installer (thanks to dimok for the loadiine code)
- loading saviine as elf (thanks to dimok for the loadiine code)
- should support more games
  • Loading branch information
Maschell committed Oct 18, 2015
1 parent a25fcc1 commit 3939be8
Show file tree
Hide file tree
Showing 17 changed files with 1,504 additions and 952 deletions.
3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Saviine 0.2
Saviine 0.3

Compatible with 5.3.2 fw

Expand All @@ -7,6 +7,7 @@ dumps WiiU Saves and is a mod of cafiine. Thanks to everyone who worked on cafii
Compilation :
- in order to compile saviine you need to put the saviine folder in your libwiiu project
- libwiiu/saviine/installer must be compiled like the other libwiiu examples (with the build.py script)
- copy the saviine532.elf from the saviine/installer/bin to the www folder

Pre-made version :
- in www/saviine, it is already compiled, just put the folder in your server
Expand Down
36 changes: 24 additions & 12 deletions saviine/client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,37 @@ CFLAGS := -O2 -Wall -x c -std=gnu99 \
SRC := $(wildcard *.S) $(wildcard *.c)
OBJ := $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(SRC)))

all: ../installer/saviine532.h

../installer/saviine%.h: saviine%.text.bin saviine%.magic.bin
xxd -i saviine$*.magic.bin | sed "s/unsigned/static const unsigned/g;s/ine$*/ine/g" > $@
xxd -i saviine$*.text.bin | sed "s/unsigned/static const unsigned/g;s/ine$*/ine/g" >> $@
# Simulate an order only dependency
BUILD_REQ := $(filter-out $(wildcard build),build)
BIN_REQ := $(filter-out $(wildcard bin),bin)

saviine%.text.bin: saviine%.elf
all: build/saviine532.elf copy

../installer/saviine%.h: build/saviine%.text.bin build/saviine%.magic.bin $(BIN_REQ)
xxd -i build/saviine$*.magic.bin | sed "s/unsigned/static const unsigned/g;s/saviine$*/saviine/g" > $@
xxd -i build/saviine$*.text.bin | sed "s/unsigned/static const unsigned/g;s/saviine$*/saviine/g" >> $@

build/saviine%.text.bin: build/saviine%.elf $(BUILD_REQ)
$(OBJCOPY) -j .text -O binary $< $@
saviine%.magic.bin: saviine%.elf
build/saviine%.magic.bin: build/saviine%.elf $(BUILD_REQ)
$(OBJCOPY) -j .magic -O binary $< $@

saviine%.elf: saviine%.ld $(OBJ)
$(LD) -T $< $(OBJ)
build/saviine%.elf: saviine%.ld $(OBJ) $(BUILD_REQ)
$(LD) -o $@ -T $< $(OBJ) -s -L"$(DEVKITPPC)/lib/gcc/powerpc-eabi/4.8.2" -lgcc

%.o: %.c
build/%.o: %.c $(BUILD_REQ)
$(CC) -c $(CFLAGS) -o $@ $+
%.o: %.S
build/%.o: %.S $(BUILD_REQ)
$(AS) $(SFLAGS) -o $@ $+

clean:
rm -f $(wildcard *.o) $(wildcard *.elf) $(wildcard ../installer/saviine532.h)
bin:
mkdir $@
build:
mkdir $@

copy:
cp build/saviine532.elf ../installer/bin/

clean:
rm -rf $(wildcard build) $(wildcard bin) $(wildcard ../installer/saviine532.h)
Loading

0 comments on commit 3939be8

Please sign in to comment.