Have CBM DOS filetype of imported files match the one used by cc65.

CFS_WRITE implies O_TRUNC which is implemented on CBM DOS by deleting an
exsisting file. Hoewever this succeeds only if the CBM DOS filetype matches.

We need a working O_TRUNC in order to be able to overwrite the contiki.cfg
configuration file.

Note: Now it has be clarified why overwriting the configuration file started to
fail the CBM PFS (platform file system) can be activated for the recently added
ethconfig program.
This commit is contained in:
Oliver Schmidt 2013-12-12 18:57:40 +01:00
parent 8386be428c
commit 3b2173e01f
5 changed files with 77 additions and 75 deletions

View File

@ -0,0 +1 @@
DEFINES = WITH_PFS

View File

@ -0,0 +1 @@
DEFINES = WITH_PFS

View File

@ -47,15 +47,15 @@ endif
disk: all
$(C1541) -format contiki,00 d71 contiki.d71
$(C1541) -attach contiki.d71 -write $(CONTIKI_PROJECT).$(TARGET) contiki,p
$(C1541) -attach contiki.d71 -write $(CONTIKI)/tools/$(TARGET)/sample.cfg contiki.cfg,u
$(C1541) -attach contiki.d71 -write cs8900a.eth cs8900a.eth,u
$(C1541) -attach contiki.d71 -write lan91c96.eth lan91c96.eth,u
$(C1541) -attach contiki.d71 -write $(CONTIKI)/tools/$(TARGET)/sample.cfg contiki.cfg,s
$(C1541) -attach contiki.d71 -write cs8900a.eth cs8900a.eth,s
$(C1541) -attach contiki.d71 -write lan91c96.eth lan91c96.eth,s
ifeq ($(findstring WITH_MOUSE,$(DEFINES)),WITH_MOUSE)
$(C1541) -attach contiki.d71 -write $(CC65_HOME)/mou/c128-1351.mou c128-1351.mou,u
$(C1541) -attach contiki.d71 -write $(CC65_HOME)/mou/c128-1351.mou c128-1351.mou,s
endif
ifeq ($(HTTPD-CFS),1)
$(C1541) -attach contiki.d71 -write httpd-cfs/index.htm index.htm,u
$(C1541) -attach contiki.d71 -write httpd-cfs/backgrnd.gif backgrnd.gif,u
$(C1541) -attach contiki.d71 -write httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach contiki.d71 -write httpd-cfs/notfound.htm notfound.htm,u
$(C1541) -attach contiki.d71 -write httpd-cfs/index.htm index.htm,s
$(C1541) -attach contiki.d71 -write httpd-cfs/backgrnd.gif backgrnd.gif,s
$(C1541) -attach contiki.d71 -write httpd-cfs/contiki.gif contiki.gif,s
$(C1541) -attach contiki.d71 -write httpd-cfs/notfound.htm notfound.htm,s
endif

View File

@ -47,15 +47,15 @@ endif
disk: all
$(C1541) -format contiki,00 d64 contiki.d64
$(C1541) -attach contiki.d64 -write $(CONTIKI_PROJECT).$(TARGET) contiki,p
$(C1541) -attach contiki.d64 -write $(CONTIKI)/tools/$(TARGET)/sample.cfg contiki.cfg,u
$(C1541) -attach contiki.d64 -write cs8900a.eth cs8900a.eth,u
$(C1541) -attach contiki.d64 -write lan91c96.eth lan91c96.eth,u
$(C1541) -attach contiki.d64 -write $(CONTIKI)/tools/$(TARGET)/sample.cfg contiki.cfg,s
$(C1541) -attach contiki.d64 -write cs8900a.eth cs8900a.eth,s
$(C1541) -attach contiki.d64 -write lan91c96.eth lan91c96.eth,s
ifeq ($(findstring WITH_MOUSE,$(DEFINES)),WITH_MOUSE)
$(C1541) -attach contiki.d64 -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,u
$(C1541) -attach contiki.d64 -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,s
endif
ifeq ($(HTTPD-CFS),1)
$(C1541) -attach contiki.d64 -write httpd-cfs/index.htm index.htm,u
$(C1541) -attach contiki.d64 -write httpd-cfs/backgrnd.gif backgrnd.gif,u
$(C1541) -attach contiki.d64 -write httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach contiki.d64 -write httpd-cfs/notfound.htm notfound.htm,u
$(C1541) -attach contiki.d64 -write httpd-cfs/index.htm index.htm,s
$(C1541) -attach contiki.d64 -write httpd-cfs/backgrnd.gif backgrnd.gif,s
$(C1541) -attach contiki.d64 -write httpd-cfs/contiki.gif contiki.gif,s
$(C1541) -attach contiki.d64 -write httpd-cfs/notfound.htm notfound.htm,s
endif

View File

@ -265,10 +265,10 @@ contiki-c64-1.d64: c64-makes
$(C1541) -attach $@ -write ../../examples/webbrowser/webbrowser.c64 webbrowser,p
$(C1541) -attach $@ -write ../../examples/wget/wget.c64 wget,p
$(C1541) -attach $@ -write ../../examples/irc/irc-client.c64 irc,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,u
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,s
contiki-c64-2.d64: c64-makes
$(C1541) -format contiki-2,00 d64 $@
@ -277,10 +277,10 @@ contiki-c64-2.d64: c64-makes
$(C1541) -attach $@ -write ../../../contikiprojects/vandenbrande.com/twitter/platform/c64/breadbox64.c64 breadbox64,p
$(C1541) -attach $@ -write ../../examples/email/email-client.c64 email,p
$(C1541) -attach $@ -write ../../examples/ftp/ftp-client.c64 ftp,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,u
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,s
contiki-c64-3.d64: c64-makes
$(C1541) -format contiki-3,00 d64 $@
@ -288,14 +288,14 @@ contiki-c64-3.d64: c64-makes
$(C1541) -attach $@ -write ../../cpu/6502/ipconfig/ipconfig.c64 ipconfig,p
$(C1541) -attach $@ -write ../../examples/webserver/webserver-example.c64 webserver,p
$(C1541) -attach $@ -write ../../examples/telnet-server/telnet-server.c64 telnetd,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,u
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,s
contiki-c64.d71: c64-makes
$(C1541) -format contiki,00 d71 $@
@ -309,14 +309,14 @@ contiki-c64.d71: c64-makes
$(C1541) -attach $@ -write ../../examples/ftp/ftp-client.c64 ftp,p
$(C1541) -attach $@ -write ../../examples/webserver/webserver-example.c64 webserver,p
$(C1541) -attach $@ -write ../../examples/telnet-server/telnet-server.c64 telnetd,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,u
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,s
contiki-c64.d81: c64-makes
$(C1541) -format contiki,00 d81 $@
@ -330,14 +330,14 @@ contiki-c64.d81: c64-makes
$(C1541) -attach $@ -write ../../examples/ftp/ftp-client.c64 ftp,p
$(C1541) -attach $@ -write ../../examples/webserver/webserver-example.c64 webserver,p
$(C1541) -attach $@ -write ../../examples/telnet-server/telnet-server.c64 telnetd,p
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,u
$(C1541) -attach $@ -write ../c64/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write $(CC65_HOME)/mou/c64-1351.mou c64-1351.mou,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,s
$(eval $(call makes,c128))
@ -350,9 +350,9 @@ contiki-c128-1.d64: c128-makes
$(C1541) -attach $@ -write ../../examples/webbrowser/webbrowser.c128 webbrowser,p
$(C1541) -attach $@ -write ../../examples/wget/wget.c128 wget,p
$(C1541) -attach $@ -write ../../examples/irc/irc-client.c128 irc,p
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
contiki-c128-2.d64: c128-makes
$(C1541) -format contiki-2,00 d64 $@
@ -361,9 +361,9 @@ contiki-c128-2.d64: c128-makes
$(C1541) -attach $@ -write ../../../contikiprojects/vandenbrande.com/twitter/platform/c128/breadbox64.c128 breadbox64,p
$(C1541) -attach $@ -write ../../examples/email/email-client.c128 email,p
$(C1541) -attach $@ -write ../../examples/ftp/ftp-client.c128 ftp,p
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
contiki-c128-3.d64: c128-makes
$(C1541) -format contiki-3,00 d64 $@
@ -371,13 +371,13 @@ contiki-c128-3.d64: c128-makes
$(C1541) -attach $@ -write ../../cpu/6502/ipconfig/ipconfig.c128 ipconfig,p
$(C1541) -attach $@ -write ../../examples/webserver/webserver-example.c128 webserver,p
$(C1541) -attach $@ -write ../../examples/telnet-server/telnet-server.c128 telnetd,p
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,u
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,s
contiki-c128.d71: c128-makes
$(C1541) -format contiki,00 d71 $@
@ -391,13 +391,13 @@ contiki-c128.d71: c128-makes
$(C1541) -attach $@ -write ../../examples/ftp/ftp-client.c128 ftp,p
$(C1541) -attach $@ -write ../../examples/webserver/webserver-example.c128 webserver,p
$(C1541) -attach $@ -write ../../examples/telnet-server/telnet-server.c128 telnetd,p
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,u
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,s
contiki-c128.d81: c128-makes
$(C1541) -format contiki,00 d81 $@
@ -411,10 +411,10 @@ contiki-c128.d81: c128-makes
$(C1541) -attach $@ -write ../../examples/ftp/ftp-client.c128 ftp,p
$(C1541) -attach $@ -write ../../examples/webserver/webserver-example.c128 webserver,p
$(C1541) -attach $@ -write ../../examples/telnet-server/telnet-server.c128 telnetd,p
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,u
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,u
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,u
$(C1541) -attach $@ -write ../c128/default.cfg contiki.cfg,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/cs8900a.eth cs8900a.eth,s
$(C1541) -attach $@ -write ../../cpu/6502/ethconfig/lan91c96.eth lan91c96.eth,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/index.htm index.htm,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/backgrnd.gif backgrnd.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/contiki.gif contiki.gif,s
$(C1541) -attach $@ -write ../../examples/webserver/httpd-cfs/notfound.htm notfound.htm,s