tools: fix fw_printenv tool to compile again
This patch updates the fw_printenv/fw_setenv userspace tool to include
the correct MTD header in order to compile against current kernel
headers. Backward compatibility is preserved by introducing an option
MTD_VERSION which can be set to "old" for compilation using the old MTD
headers. Along with this a number of warnings are fixed.
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
diff --git a/Makefile b/Makefile
index 35e9031..46156f2 100644
--- a/Makefile
+++ b/Makefile
@@ -329,7 +329,7 @@
$(MAKE) -C tools/updater all || exit 1
env:
- $(MAKE) -C tools/env all || exit 1
+ $(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
depend dep: version
for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done