Photon's bootloader

This commit is contained in:
alpine9000
2016-03-19 12:53:59 +11:00
parent f088f204fd
commit 46c2d062a8
11 changed files with 644 additions and 3 deletions
+18 -3
View File
@@ -11,6 +11,14 @@ RESIZE=$(RESIZEDIR)/out/resize
A500_RUN_SCRIPT=~/Google\ Drive/Amiga/amiga500.sh
A600_RUN_SCRIPT=~/Google\ Drive/Amiga/amiga600.sh
ifndef FLOPPY
FLOPPY=bin/$(EXAMPLE_NAME).adf
endif
ifndef MODULE
MODULE=$(EXAMPLE_NAME).s
endif
ifndef SHRINKLER
SHRINKLER=0
endif
@@ -29,15 +37,22 @@ endif
ifeq ($(SHRINKLER),1)
ifndef BOOTBLOCK_ASM
BOOTBLOCK_ASM=../shared/shrinkler_bootblock.s
endif
PROGRAM_BIN=out/shrunk.bin
VASM_EXTRA_BOOTBLOCK_ARGS=-DDECOMPRESS_ADDRESS="\$$$(DECOMPRESS_ADDRESS)" -DSHRINKLER=$(SHRINKLER)
else
ifndef BOOTBLOCK_ASM
BOOTBLOCK_ASM=../shared/bootblock.s
endif
PROGRAM_BIN=out/main.bin
VASM_EXTRA_BOOTBLOCK_ARGS=
VASM_EXTRA_BOOTBLOCK_ARGS=-DSHRINKLER=$(SHRINKLER)
endif
ifndef LINK_COMMANDLINE
LINK_COMMANDLINE=vlink -Ttext 0x$(BASE_ADDRESS) -brawbin1 $< $(OBJS) -o $@
endif
all: bin out $(MAKEADF) $(FLOPPY)
@@ -82,7 +97,7 @@ out/bootblock.bin: out/bootblock.o
vlink -brawbin1 $< -o $@
out/bootblock.o: $(BOOTBLOCK_ASM) $(PROGRAM_BIN)
vasmm68k_mot $(VASM_EXTRA_BOOTBLOCK_ARGS) -DBASE_ADDRESS="\$$$(BASE_ADDRESS)" -Fhunk -phxass -opt-fconst -nowarn=62 -quiet $< -o $@ -I/usr/local/amiga/os-include
vasmm68k_mot $(VASM_EXTRA_BOOTBLOCK_ARGS) -DUSERSTACK_ADDRESS="\$$$(USERSTACK_ADDRESS)" -DBASE_ADDRESS="\$$$(BASE_ADDRESS)" -Fhunk -phxass -opt-fconst -nowarn=62 -quiet $< -o $@ -I/usr/local/amiga/os-include
out/main.o: $(MODULE) $(EXTRA)
vasmm68k_mot $(VASM_EXTRA_ARGS) -Fhunk -phxass -opt-fconst -nowarn=62 -quiet $< -o $@ -I/usr/local/amiga/os-include
@@ -97,7 +112,7 @@ out/%.o: %.c
out/main.bin: out/main.o $(OBJS)
@#-T ../link.script
vlink -Ttext 0x$(BASE_ADDRESS) -brawbin1 $< $(OBJS) -o $@
$(LINK_COMMANDLINE)
out/shrunk.bin: $(SHRINKLER_EXE) out/main.bin
$(SHRINKLEREXE) -d out/main.bin out/shrunk.bin