lwext4: add port of ext2/3/4 filesystem library

Besides the missing supported features noted in the README, missing
support for extending files via truncation/seeking might limit its
application.

Issue #124.
This commit is contained in:
Josef Söntgen
2018-02-11 11:39:11 +01:00
committed by Christian Helmuth
parent 6cf7ec6c35
commit b35caec726
14 changed files with 865 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
INC_DIR += $(call select_from_ports,lwext4)/include
INC_DIR += $(REP_DIR)/src/lib/lwext4/include

30
lib/mk/lwext4.mk Normal file
View File

@@ -0,0 +1,30 @@
LWEXT4_PORT_DIR := $(call select_from_ports,lwext4)
LWEXT4_DIR := $(LWEXT4_PORT_DIR)/src/lib/lwext4
SRC_C := $(notdir $(wildcard $(LWEXT4_DIR)/src/*.c))
SRC_C += $(notdir $(wildcard $(LWEXT4_DIR)/blockdev/*.c))
# from musl
SRC_C += qsort.c
SRC_CC := block libc.cc
INC_DIR += $(LWEXT4_PORT_DIR)/include
INC_DIR += $(LWEXT4_DIR)/blockdev
INC_DIR += $(REP_DIR)/src/lib/lwext4/include
CC_OPT += -DCONFIG_USE_DEFAULT_CFG=1
CC_OPT += -DCONFIG_HAVE_OWN_ERRNO=1
CC_OPT += -DCONFIG_HAVE_OWN_ASSERT=1
CC_OPT += -DCONFIG_BLOCK_DEV_CACHE_SIZE=256
LIBS += base
#SHARED_LIB = yes
vpath %.c $(LWEXT4_DIR)/src
vpath %.c $(LWEXT4_DIR)/blockdev
vpath qsort.c $(REP_DIR)/src/lib/lwext4/
vpath %.cc $(REP_DIR)/src/lib/lwext4/
CC_CXX_WARN_STRICT =