mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
Initial version of standalone e200rpatcher tool to upload and run the e200r patching application to patch the original Sansa bootloader. This requires the patching binary (called bootloader.bin) to be in the e200rpatcher directory when compiling. Currently only tested on Linux.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14656 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cce117240c
commit
dd998b7f94
2 changed files with 255 additions and 0 deletions
44
rbutil/e200rpatcher/Makefile
Normal file
44
rbutil/e200rpatcher/Makefile
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
CFLAGS=-Wall -W
|
||||
|
||||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||
OUTPUT=e200rpatcher.exe
|
||||
CROSS=
|
||||
CFLAGS+=-mno-cygwin
|
||||
else
|
||||
OUTPUT=e200rpatcher
|
||||
CROSS=i586-mingw32msvc-
|
||||
endif
|
||||
|
||||
LIBS = -lusb
|
||||
|
||||
NATIVECC = gcc
|
||||
CC = $(CROSS)gcc
|
||||
|
||||
all: $(OUTPUT)
|
||||
|
||||
e200rpatcher: e200rpatcher.c bootimg.c
|
||||
gcc $(CFLAGS) $(LIBS) -o e200rpatcher e200rpatcher.c bootimg.c
|
||||
strip e200rpatcher
|
||||
|
||||
e200rpatcher.exe: e200rpatcher.c bootimg.c
|
||||
$(CC) $(CFLAGS) $(LIBS) -o e200rpatcher.exe e200rpatcher.c bootimg.c
|
||||
$(CROSS)strip e200rpatcher.exe
|
||||
|
||||
e200rpatcher-mac: e200rpatcher-i386 e200rpatcher-ppc
|
||||
lipo -create e200rpatcher-ppc e200rpatcher-i386 -output e200rpatcher-mac
|
||||
e200rpatcher-i386: e200rpatcher.c bootimg.c
|
||||
gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -o bin/i386/program -arch i386 $(CFLAGS) $(LIBS) -o e200rpatcher-i386 e200rpatcher.c bootimg.c
|
||||
strip e200rpatcher-i386
|
||||
|
||||
e200rpatcher-ppc: e200rpatcher.c bootimg.c
|
||||
gcc -arch ppc $(CFLAGS) $(LIBS) -o e200rpatcher-ppc e200rpatcher.c bootimg.c
|
||||
strip e200rpatcher-ppc
|
||||
|
||||
bin2c: ../sansapatcher/bin2c.c
|
||||
$(NATIVECC) $(CFLAGS) -o bin2c ../sansapatcher/bin2c.c
|
||||
|
||||
bootimg.c: bootloader.bin bin2c
|
||||
./bin2c bootloader.bin bootimg
|
||||
|
||||
clean:
|
||||
rm -f e200rpatcher.exe e200rpatcher-mac e200rpatcher-i386 e200rpatcher-ppc e200rpatcher bin2c bootimg.c bootimg.h *~
|
||||
Loading…
Add table
Add a link
Reference in a new issue