Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial rewrite of elf-loader to use mostly code on EE #488

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
18 changes: 9 additions & 9 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,19 +16,19 @@ 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

.NOTPARALLEL:: \
$(PS2SDKSRC)/tools/bin2c/bin/bin2c \
src/loader/bin/loader.elf
src/ldrsrc/bin/ldrsrc.bin
Loading
Loading