Skip to content

Commit

Permalink
Initial rewrite of elf-loader to use mostly code on EE
Browse files Browse the repository at this point in the history
  • Loading branch information
uyjulian committed Dec 23, 2023
1 parent 416eb73 commit 35a4e32
Show file tree
Hide file tree
Showing 12 changed files with 821 additions and 396 deletions.
2 changes: 1 addition & 1 deletion ee/elf-loader-nocolour/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Copyright ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Copyright ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.

EE_SRC_DIR = $(PS2SDKSRC)/ee/elf-loader/src/loader/src/
EE_INC_DIR = $(PS2SDKSRC)/ee/elf-loader/src/loader/include/
EE_SRC_DIR = $(PS2SDKSRC)/ee/elf-loader/src/ldrsrc/src/
EE_INC_DIR = $(PS2SDKSRC)/ee/elf-loader/src/ldrsrc/include/

LOADER_ENABLE_DEBUG_COLORS ?= 0

EE_LINKFILE ?= $(PS2SDKSRC)/ee/elf-loader/src/loader/linkfile
EE_LINKFILE ?= $(PS2SDKSRC)/ee/elf-loader/src/ldrsrc/linkfile

EE_BIN ?= loader.elf

include $(PS2SDKSRC)/ee/elf-loader/src/loader/Makefile
include $(PS2SDKSRC)/ee/elf-loader/src/ldrsrc/Makefile
16 changes: 8 additions & 8 deletions ee/elf-loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# (c) 2020 Francisco Javier Trujillo Mata <[email protected]>
# Copyright ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.

EE_OBJS = elf.o loader.o
EE_OBJS = elf.o ldrsrc.o

include $(PS2SDKSRC)/Defs.make
include $(PS2SDKSRC)/ee/Rules.lib.make
Expand All @@ -16,15 +16,15 @@ include $(PS2SDKSRC)/ee/Rules.release
$(PS2SDKSRC)/tools/bin2c/bin/bin2c: $(PS2SDKSRC)/tools/bin2c
$(MAKEREC) $<

src/loader/bin/loader.elf:
$(MAKEREC) src/loader
src/ldrsrc/bin/ldrsrc.bin:
$(MAKEREC) src/ldrsrc

$(EE_OBJS_DIR)loader.c: src/loader/bin/loader.elf $(PS2SDKSRC)/tools/bin2c/bin/bin2c
$(PS2SDKSRC)/tools/bin2c/bin/bin2c $< $@ loader_elf
$(EE_OBJS_DIR)ldrsrc.c: src/ldrsrc/bin/ldrsrc.bin $(PS2SDKSRC)/tools/bin2c/bin/bin2c
$(PS2SDKSRC)/tools/bin2c/bin/bin2c $< $@ ldrsrc

$(EE_OBJS_DIR)loader.o: $(EE_OBJS_DIR)loader.c
$(EE_OBJS_DIR)ldrsrc.o: $(EE_OBJS_DIR)ldrsrc.c
$(DIR_GUARD)
$(EE_C_COMPILE) $< -c -o $@

clean::
$(MAKEREC) src/loader clean
$(MAKEREC) src/ldrsrc clean
Loading

0 comments on commit 35a4e32

Please sign in to comment.