summaryrefslogtreecommitdiff
path: root/tests/fs-tests/integrity/Makefile
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-05-20 18:27:36 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-05-27 15:55:06 +0300
commitfdfd2889ad3e59444275e063ada5247727cb079d (patch)
tree2068e9989d87283fe7d20b0f956eacc6cf33f822 /tests/fs-tests/integrity/Makefile
parent04665066ebedb0a31335b525fb5f19df32cb8cfe (diff)
fs-tests: integck: implement MTD reattaching
This patch adds -m <mtdnum> option to integck and teaches integck to re-attach the MTD device to UBI in case of an emulated power cut event. This is needed for the new UBI power cut and unstable bits emulation infrastructure: when UBI emulates a power cut the only way to recover form this is to re-attach the MTD device. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/fs-tests/integrity/Makefile')
-rw-r--r--tests/fs-tests/integrity/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/fs-tests/integrity/Makefile b/tests/fs-tests/integrity/Makefile
index 2cdd470..509a94e 100644
--- a/tests/fs-tests/integrity/Makefile
+++ b/tests/fs-tests/integrity/Makefile
@@ -4,8 +4,11 @@ CC = gcc
endif
COMMON_HEADERS_DIR := ../../../include
+LIBUBI_PATH=../../../ubi-utils/
+LIBUBI_SRC_PATH=../../../ubi-utils/src/
+LIBUBI_HEADER_PATH=../../../ubi-utils/include
-CFLAGS := $(CFLAGS) -Wall -g -O2 -I$(COMMON_HEADERS_DIR)
+CFLAGS := $(CFLAGS) -Wall -g -O2 -I$(COMMON_HEADERS_DIR) -I$(LIBUBI_HEADER_PATH)
LDFLAGS := $(LDFLAGS)
@@ -13,10 +16,17 @@ TARGETS = integck
all: $(TARGETS)
+# Compile ubilib
+libubi.a:
+ $(CC) $(CFLAGS) -I $(LIBUBI_SRC_PATH) -c $(LIBUBI_SRC_PATH)/libubi.c -o libubi.o
+ ar cr libubi.a libubi.o
+
+$(TARGETS): libubi.a
+
# Disable optimizations to make it possible to use gdb comfortably
# Use -rdynamic to have stack backtraces
-debug:
- gcc $(CFLAGS) -O0 -D INTEGCK_DEBUG -rdynamic integck.c -o integck
+debug: libubi.a
+ gcc $(CFLAGS) -O0 -D INTEGCK_DEBUG -rdynamic integck.c libubi.a -o integck
clean:
- rm -f *.o $(TARGETS)
+ rm -f *.o $(TARGETS) libubi.a