From 3b2173e01f2b1708aede364a0b68b9e42f80d946 Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Thu, 12 Dec 2013 18:57:40 +0100
Subject: [PATCH] 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.
---
cpu/6502/ethconfig/Makefile.c128.defines | 1 +
cpu/6502/ethconfig/Makefile.c64.defines | 1 +
platform/c128/Makefile.c128 | 16 +--
platform/c64/Makefile.c64 | 16 +--
tools/6502/Makefile | 118 +++++++++++------------
5 files changed, 77 insertions(+), 75 deletions(-)
create mode 100644 cpu/6502/ethconfig/Makefile.c128.defines
create mode 100644 cpu/6502/ethconfig/Makefile.c64.defines
diff --git a/cpu/6502/ethconfig/Makefile.c128.defines b/cpu/6502/ethconfig/Makefile.c128.defines
new file mode 100644
index 000000000..0b150a411
--- /dev/null
+++ b/cpu/6502/ethconfig/Makefile.c128.defines
@@ -0,0 +1 @@
+DEFINES = WITH_PFS
diff --git a/cpu/6502/ethconfig/Makefile.c64.defines b/cpu/6502/ethconfig/Makefile.c64.defines
new file mode 100644
index 000000000..0b150a411
--- /dev/null
+++ b/cpu/6502/ethconfig/Makefile.c64.defines
@@ -0,0 +1 @@
+DEFINES = WITH_PFS
diff --git a/platform/c128/Makefile.c128 b/platform/c128/Makefile.c128
index 1bf27a715..fa642ff7e 100644
--- a/platform/c128/Makefile.c128
+++ b/platform/c128/Makefile.c128
@@ -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
diff --git a/platform/c64/Makefile.c64 b/platform/c64/Makefile.c64
index 3ddea60d4..bec90e48d 100644
--- a/platform/c64/Makefile.c64
+++ b/platform/c64/Makefile.c64
@@ -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
diff --git a/tools/6502/Makefile b/tools/6502/Makefile
index dbd9f2468..798cc56cb 100644
--- a/tools/6502/Makefile
+++ b/tools/6502/Makefile
@@ -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