bk_crc build

This commit is contained in:
Banjo Kazooie 2022-01-13 14:19:09 -06:00
parent e18ce22aa7
commit 8b23c47c17
2 changed files with 10 additions and 7 deletions

2
.gitignore vendored
View File

@ -19,7 +19,7 @@ assets/
assets/*
bin/
bin/*
tools/bk_crc/bk_crc
# This folder will hold modified asset binaries
# these assets will override the original game

View File

@ -315,10 +315,10 @@ $(OVERLAY_RZIP_OBJS) : $(BUILD_DIR)/$(BIN_ROOT)/%.$(VERSION).rzip.bin.o : $(BUIL
$(BUILD_DIR)/bk_boot.full: $(BUILD_DIR)/bk_boot.elf
@mips-linux-gnu-objcopy -O binary --only-section .boot_bk_boot $(BUILD_DIR)/bk_boot.elf $@
$(BUILD_DIR)/crc.bin : $(BUILD_DIR)/bk_boot.full $(BUILD_DIR)/core1.code $(BUILD_DIR)/core1.data
@$(BK_CRC) $(BUILD_DIR)/bk_boot.full > $(BUILD_DIR)/crc.bin
@$(BK_CRC) $(BUILD_DIR)/core1.code >> $(BUILD_DIR)/crc.bin
@$(BK_CRC) $(BUILD_DIR)/core1.data >> $(BUILD_DIR)/crc.bin
$(BUILD_DIR)/crc.bin : $(BUILD_DIR)/bk_boot.full $(BUILD_DIR)/core1.code $(BUILD_DIR)/core1.data $(BK_CRC)
@$(BK_CRC) $< > $(BUILD_DIR)/crc.bin
@$(BK_CRC) $< >> $(BUILD_DIR)/crc.bin
@$(BK_CRC) $< >> $(BUILD_DIR)/crc.bin
# .bin -> .o (overlay crc check)
$(CRC_OBJS) : $(BUILD_DIR)/crc.bin
@ -402,10 +402,10 @@ $(OVERLAY_DATA_BINS) : $(BUILD_DIR)/%.data : $(BUILD_DIR)/%.elf
@$(OBJCOPY) -O binary --only-section .data --only-section .*_data_* $< $@
# .code to
$(BUILD_DIR)/core2.code.crc : $(BUILD_DIR)/core2.code
$(BUILD_DIR)/core2.code.crc : $(BUILD_DIR)/core2.code $(BK_CRC)
$(BK_CRC) -D CORE2_CODE $< > $@
$(BUILD_DIR)/core2.data.crc : $(BUILD_DIR)/core2.data
$(BUILD_DIR)/core2.data.crc : $(BUILD_DIR)/core2.data $(BK_CRC)
$(BK_CRC) -D CORE2_DATA $< > $@
# .elf -> .full
@ -446,6 +446,9 @@ $(BK_TOOLS)/%: $(BK_TOOLS)/gzip-1.2.4/gzip
$(call print1,Compiling build tool:,$@)
@$(CD) $(BK_TOOLS) && $(MAKE) $*
$(BK_CRC) :
gcc $@.c -o $@
# Combined symbol addresses file
$(SYMBOL_ADDRS): $(SYMBOL_ADDR_FILES)
$(call print0,Combining symbol address files)