diff --git a/repos/libports/ports/fatfs.hash b/repos/libports/ports/fatfs.hash index 55aff6bd13..cbf780c471 100644 --- a/repos/libports/ports/fatfs.hash +++ b/repos/libports/ports/fatfs.hash @@ -1 +1 @@ -4ca5681b074e2b5f64454b4065faab28b33f2cc5 +819dcca8a2acf0b63c6b316e0b799445aa922ffe diff --git a/repos/libports/ports/fatfs.port b/repos/libports/ports/fatfs.port index a5d89998e5..c271db24b8 100644 --- a/repos/libports/ports/fatfs.port +++ b/repos/libports/ports/fatfs.port @@ -1,13 +1,30 @@ LICENSE := BSD -VERSION := 0.13 +VERSION := 0.13a DOWNLOADS := fatfs.archive -URL(fatfs) := http://www.elm-chan.org/fsw/ff/arc/ff13.zip -SHA(fatfs) := 8ce22f86e339b0fc59c8c69941fbaf86e5cf9364 +URL(fatfs) := http://www.elm-chan.org/fsw/ff/arc/ff13a.zip +SHA(fatfs) := 0c74176ccf0c20b66e55b700c9ba826b43815b8b DIR(fatfs) := src/lib/fatfs -PATCHES := src/lib/fatfs/ffconf.patch src/lib/fatfs/integer.patch +PATCHES := src/lib/fatfs/integer.patch DIRS := include/fatfs DIR_CONTENT(include/fatfs) := \ - $(addprefix src/lib/fatfs/source/, ff.h ffconf.h diskio.h integer.h) + $(addprefix src/lib/fatfs/source/, ff.h diskio.h integer.h ffconf.h) + +default: edit_conf + +edit_conf: src/lib/fatfs/source/ffconf.h + @$(MSG_GENERATE)$(notdir $<) + $(VERBOSE)sed \ + -e 's/define FF_USE_LABEL.*/define FF_USE_LABEL 1/' \ + -e 's/define FF_CODE_PAGE.*/define FF_CODE_PAGE 0/' \ + -e 's/define FF_USE_LFN.*/define FF_USE_LFN 2/' \ + -e 's/define FF_FS_RPATH.*/define FF_FS_RPATH 1/' \ + -e 's/define FF_VOLUMES.*/define FF_VOLUMES 10/' \ + -e 's/define FF_MAX_SS.*/define FF_MAX_SS 4096/' \ + -e 's/define FF_FS_EXFAT.*/define FF_FS_EXFAT 1/' \ + -e 's/define FF_FS_NORTC.*/define FF_FS_NORTC 1/' \ + -i $< + +src/lib/fatfs/source/ffconf.h: $(DOWNLOADS) diff --git a/repos/libports/recipes/api/fatfs/content.mk b/repos/libports/recipes/api/fatfs/content.mk new file mode 100644 index 0000000000..d0ae92d873 --- /dev/null +++ b/repos/libports/recipes/api/fatfs/content.mk @@ -0,0 +1,20 @@ +PORT_DIR := $(call port_dir,$(REP_DIR)/ports/fatfs) + +MIRROR_FROM_REP_DIR := \ + lib/import/import-fatfs_block.mk \ + lib/mk/fatfs_block.mk + +content: include src $(MIRROR_FROM_REP_DIR) + +include: + mkdir -p include/fatfs + cp -r $(PORT_DIR)/$@/* $@ + cp $(REP_DIR)/include/fatfs/block.h include/fatfs + +src: + mkdir -p src/lib/fatfs + cp -r $(PORT_DIR)/$@/* $@ + cp $(REP_DIR)/src/lib/fatfs/diskio_block.cc src/lib/fatfs/ + +$(MIRROR_FROM_REP_DIR): + $(mirror_from_rep_dir) diff --git a/repos/libports/recipes/api/fatfs/hash b/repos/libports/recipes/api/fatfs/hash new file mode 100644 index 0000000000..15013e9c41 --- /dev/null +++ b/repos/libports/recipes/api/fatfs/hash @@ -0,0 +1 @@ +2018-02-09 151c753cb1cbe40b65cd72069a938468d6d5211d diff --git a/repos/libports/recipes/src/vfs_fatfs/content.mk b/repos/libports/recipes/src/vfs_fatfs/content.mk new file mode 100644 index 0000000000..ac86a2d73d --- /dev/null +++ b/repos/libports/recipes/src/vfs_fatfs/content.mk @@ -0,0 +1,9 @@ +MIRROR_FROM_REP_DIR := lib/mk/vfs_fatfs.mk src/lib/vfs/fatfs + +content: $(MIRROR_FROM_REP_DIR) LICENSE + +$(MIRROR_FROM_REP_DIR): + $(mirror_from_rep_dir) + +LICENSE: + cp $(GENODE_DIR)/LICENSE $@ diff --git a/repos/libports/recipes/src/vfs_fatfs/hash b/repos/libports/recipes/src/vfs_fatfs/hash new file mode 100644 index 0000000000..87082126f3 --- /dev/null +++ b/repos/libports/recipes/src/vfs_fatfs/hash @@ -0,0 +1 @@ +2018-02-09 fc48f67489afc55e246f092cb3a572e1f8edf4da diff --git a/repos/libports/recipes/src/vfs_fatfs/used_apis b/repos/libports/recipes/src/vfs_fatfs/used_apis new file mode 100644 index 0000000000..f99fa1de19 --- /dev/null +++ b/repos/libports/recipes/src/vfs_fatfs/used_apis @@ -0,0 +1,5 @@ +base +block_session +fatfs +os +vfs diff --git a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc index 9f56ef919a..21e9075513 100644 --- a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc +++ b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc @@ -20,7 +20,6 @@ #include #include #include -#include /* Genode block backend */ #include