~vdupras/collapseos-rc2014

30aa7210ac85a23baef7ad951acaa1a58fc4946c — Virgil Dupras 2 months ago 6480b65
Target Dusk v9
6 files changed, 26 insertions(+), 29 deletions(-)

M .gitignore
M Makefile
M buildpre.fs
M conf/emul_mc6850.args
M conf/emul_sio.args
M files/SHA512
M .gitignore => .gitignore +2 -3
@@ 1,9 1,8 @@
*.o
/*.rom
/fs
/posix
/emul/rc2014
/memdump
/emul_*.sh
/files/*.tar.gz
/duskos
/duskv*
/cos.blk

M Makefile => Makefile +17 -18
@@ 1,36 1,35 @@
DUSKVER = v9
DUSKDIR = dusk$(DUSKVER)
DUSK = $(DUSKDIR)/dusk
DUSKURL = http://duskos.org
CONF ?= mc6850
ROMNAME = rc2014_$(CONF).rom
TARGETS = $(ROMNAME) emul_$(CONF).sh
DUSKURL = http://duskos.org

all: $(TARGETS)

files/duskv1.tar.gz:
files/dusk$(DUSKVER).tar.gz:
	curl -o $@ $(DUSKURL)/$@

duskos: files/duskv1.tar.gz
$(DUSKDIR): files/dusk$(DUSKVER).tar.gz
	cd files && cksum -c SHA512
	tar zxf files/duskv1.tar.gz
	mv duskv1 duskos
	tar zxf files/dusk$(DUSKVER).tar.gz

duskos/cos/extra.fs: rc2014.fs
$(DUSKDIR)/cos/extra.fs: $(DUSKDIR) rc2014.fs
	cp rc2014.fs $@

fs: duskos
	ln -sf duskos/fs .

posix: duskos
	ln -sf duskos/posix .
$(DUSK): $(DUSKDIR)/cos/extra.fs
	$(MAKE) -C $(DUSKDIR) dusk

duskos/dusk: fs posix duskos/cos/extra.fs
	$(MAKE) -C duskos dusk

$(ROMNAME): duskos/dusk buildpre.fs buildpost.fs conf/$(CONF).fs
$(ROMNAME): $(DUSK) buildpre.fs buildpost.fs conf/$(CONF).fs
	dd if=/dev/zero of=rc2014.rom bs=1024 count=8
	cat buildpre.fs conf/$(CONF).fs buildpost.fs | ./duskos/dusk
	cat buildpre.fs conf/$(CONF).fs buildpost.fs | $(DUSK)
	mv rc2014.rom $@

emul_$(CONF).sh: $(ROMNAME)
cos.blk: $(DUSKDIR)/fs/data/cos.blk
	ln -sf $(DUSKDIR)/fs/data/cos.blk $@

emul_$(CONF).sh: cos.blk $(ROMNAME)
	$(MAKE) -C emul rc2014
	echo "#/bin/sh" > $@
	echo -n "./emul/rc2014 " | cat - conf/emul_$(CONF).args >> $@


@@ 39,6 38,6 @@ emul_$(CONF).sh: $(ROMNAME)

.PHONY: clean
clean:
	$(MAKE) -C duskos clean
	$(MAKE) -C $(DUSKDIR) clean
	$(MAKE) -C emul clean
	rm -f *.rom emul_*.sh

M buildpre.fs => buildpre.fs +4 -5
@@ 1,6 1,5 @@
?f<< /lib/drive.fs
needs io/drvstr
"rc2014.rom" mountImage const mydrv
mydrv newdrivestream const myfile
: spitrom ( a u -- ) myfile write# myfile flush ;
f<< /cos/cos.fs
S" rc2014.rom" mountImage ( drv ) value mydrv
mydrv DriveIO :new structbind IO myfile
: spitrom ( a u -- ) myfile :write myfile :flush ;


M conf/emul_mc6850.args => conf/emul_mc6850.args +1 -1
@@ 1,1 1,1 @@
-cfs/cos/blk 
\ No newline at end of file
-ccos.blk 
\ No newline at end of file

M conf/emul_sio.args => conf/emul_sio.args +1 -1
@@ 1,1 1,1 @@
-s -cfs/cos/blk 
\ No newline at end of file
-s -ccos.blk 
\ No newline at end of file

M files/SHA512 => files/SHA512 +1 -1
@@ 1,1 1,1 @@
SHA512 (duskv1.tar.gz) = 684210c9fbb8943fb7db82534345e625637876344236a479595108c3e398ffb90268e742408e4daaa37bc4c895dc93007cf3020d3a9b48b7caeed94eeb6d202c
SHA512 (duskv9.tar.gz) = a5afb4a65252ef291f4935d5fb6cac0a7a77e34f8c4ec6b1ca08ebc9caded1255edc4fba3e9090acf2e1ecca9573ba12fe2d5aa42727460034a74bf708362075