From 581f04a4bc0f49452690c79b2adfb554c585f371 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 29 Apr 2020 19:38:43 -0400 Subject: [PATCH] Keep stage1 bootstrap bin instead of stage 0 XPACKed source needing to be kept in bootstrap bin didn't make much sense. With the removal of stripfc, it makes more sense to keep the compiled form of stage 1 in repository as a bootstrap binary. Also, rename it to forth.bin. --- emul/.gitignore | 2 +- emul/Makefile | 21 +++++++++++---------- emul/forth.bin | Bin 0 -> 5929 bytes emul/forth.c | 2 +- emul/stage.c | 2 +- emul/stage0.bin | Bin 7457 -> 0 bytes 6 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 emul/forth.bin delete mode 100644 emul/stage0.bin diff --git a/emul/.gitignore b/emul/.gitignore index ae9e1d9..6955b1f 100644 --- a/emul/.gitignore +++ b/emul/.gitignore @@ -3,5 +3,5 @@ /stage2 /forth /*-bin.h -/stage1.bin +/stage0.bin /blkfs diff --git a/emul/Makefile b/emul/Makefile index 7f4e648..751fb26 100644 --- a/emul/Makefile +++ b/emul/Makefile @@ -14,7 +14,10 @@ $(BLKPACK): $(BIN2C): $(BLKPACK) $(BLKUNPACK): $(BLKPACK) -stage0-bin.h: $(BIN2C) +stage0.bin: stage2 xcomp.fs + cat xcomp.fs | ./stage2 > stage0.bin + +stage0-bin.h: stage0.bin $(BIN2C) $(BIN2C) KERNEL < stage0.bin > $@ stage1: stage.c $(OBJS) stage0-bin.h @@ -23,13 +26,11 @@ stage1: stage.c $(OBJS) stage0-bin.h stage1dbg: stage.c $(OBJS) stage0-bin.h $(CC) -DDEBUG stage.c $(OBJS) -o $@ -stage1.bin: stage1.fs stage1 - ./stage1 < stage1.fs > $@ +# not dependent on forth.bin to avoid circular deps. +forth-bin.h: $(BIN2C) + $(BIN2C) KERNEL < forth.bin > $@ -stage1-bin.h: stage1.bin $(BIN2C) - $(BIN2C) KERNEL < stage1.bin > $@ - -stage2: stage.c $(OBJS) stage1-bin.h blkfs-bin.h +stage2: stage.c $(OBJS) forth-bin.h blkfs-bin.h $(CC) -DSTAGE2 stage.c $(OBJS) -o $@ blkfs: $(BLKPACK) @@ -38,7 +39,7 @@ blkfs: $(BLKPACK) blkfs-bin.h: blkfs $(BIN2C) $(BIN2C) BLKFS < blkfs > $@ -forth: forth.c $(OBJS) stage1-bin.h blkfs-bin.h +forth: forth.c $(OBJS) forth-bin.h blkfs-bin.h $(CC) forth.c $(OBJS) -o $@ libz80/libz80.o: libz80/z80.c @@ -50,8 +51,8 @@ emul.o: emul.c .PHONY: updatebootstrap -updatebootstrap: stage2 - cat xcomp.fs | ./stage2 > stage0.bin +updatebootstrap: stage1 stage1.fs + ./stage1 < stage1.fs > forth.bin .PHONY: pack pack: diff --git a/emul/forth.bin b/emul/forth.bin new file mode 100644 index 0000000000000000000000000000000000000000..c2de2e47ae6a1ab4815de789e6c6299543061774 GIT binary patch literal 5929 zcmai2ZERcTbw2m(!MnQ#Itx{QmkpgYd zPT`*CeMwovHq?g5d(L~lKi+dLm%bxQKN68}i!6;8OL=4IkFw-2)<2Y`$Bd;%jEnM3 zxrp@X}h)TI+C1&|F&& z{Dr(@lcmqd+p93+jg22(-stNN9n3^l@3cPjt84%4uWN0MwniTM7r)u?$?cWU&ehh| z);sIZwiQ>d{6omLky~H!zxPJh%3C*=+wlJdS-xQ0T%M5SQDZr>9Jv{KVRZarSOPv{ zYGTW->}iPNTV29z-|gW z;0Ab`=D>U+Iy^+Y1q3YVX$aqHy4Bce)pi<9-TseBaA+{o7l8YU=8~fUWS_g`YuWg- zja;X>yT0M$V=BynKvmC7+cemE>j^_F62-vA1D>iUGX#6x1aUsGPpBpv4|w6!TSRS~ zSBPE@5rFr}#+OKwq^-KT6u7@0GL|PkT^=nH9-wc_6aTe5x=FAn$79Mv0RhhS5N3Y? zh@DK-LHbwl7@9selh20TQq!{WqO4UgxqR3Q3_Avxd^dBY;)Y(Zm)e^Azkd+p_+WNV zH6aKq4nlU@<7Qpm+h83UJwI`F4~u|Bh874p*=szyV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xI=`-SYw<3;&KaPa|JGKFOqpfN&&tTA|GSR->6;G}s>H0;P zPx=*_Px}4ty6uDJSD{?L+qKK|4o$uNt?ad$8x?wPs@2BBwp5Wz%^s|Y+_FAs&chK> z>7O--)%N7(5D#u8dfgg9cYoBl$2+%!UVXgHs}sp=f@z>xg1PZGZto6kN&Wd=E_}eD z;JH~vp+tX@N=s!Ra<*5SxeDrK?xSszAtMm|lQJ~-AxO8NgVt@AkxVBGl)*KgTijnZ t<85K*F(kiTzQ41G@2ibLy~xFCf)d9Mqr+1(=lq$xn%jH}9O@S1zX7& #include #include "emul.h" -#include "stage1-bin.h" +#include "forth-bin.h" #include "blkfs-bin.h" // in sync with glue.asm diff --git a/emul/stage.c b/emul/stage.c index 27d4aea..36ec647 100644 --- a/emul/stage.c +++ b/emul/stage.c @@ -3,7 +3,7 @@ #include #include "emul.h" #ifdef STAGE2 -#include "stage1-bin.h" +#include "forth-bin.h" #include "blkfs-bin.h" #else #include "stage0-bin.h" diff --git a/emul/stage0.bin b/emul/stage0.bin deleted file mode 100644 index 219ea6946009e64c91f80b00b0d5237742f76fbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7457 zcmcIoUrd|V6~CV`4*5qQ=|Wms=^EPD#(~&|5TM4v|B^a2Hnj~&iV`bpMLAsDX zRk}%2-l9EBs+z}X%S$$O)mE|XVO50s5M_}Tsccdu9?-%>$2?Wt!>V;^s%* zr|Yfjt)OcbEEZ|Cvb^%av25u>r6-on7DVu08>LyXy5tsLxZhoEajv%2i5AD|n)^rM zagA8$6rZfXjSos6UMnT~y&YNq%3|{if4TJ=xxKkL+U$Sfchb@D)stoK-j(L&=Eb!$ zts~3Vf9b6$<<^$vryqouA3R)Y#s9a((iP+3(xh0LFqZsF{)gVTCoW(033sDW8g;BH zQ!8y^)sKJkrJ3bF?0bq(mR6P<#TWCXT+bh^P}a`u6>EDwM>LNc1zBuGJo`SU2p88{ zTS3_O=j6#`e7KNoFt#*3fu4Pja@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