]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
fs: Kconfig: Add a separate option for FS_JFFS2
authorSimon Glass <sjg@chromium.org>
Wed, 17 May 2017 09:25:38 +0000 (03:25 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 22 May 2017 16:45:31 +0000 (12:45 -0400)
Rather than using CMD_JFFS2 for both the filesystem and its command, we
should have a separate option for each. This allows us to enable JFFS2
support without the command, if desired, which reduces U-Boot's size
slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>
cmd/Kconfig
cmd/cramfs.c
doc/README.JFFS2
fs/Makefile
fs/jffs2/Kconfig

index e4cb6c92b0cc6b1e56c7cd0e3f96d690ffd462ab..be6b314c260570dac42209ea5f9da7bcf2bab32e 100644 (file)
@@ -1147,6 +1147,7 @@ config CMD_FS_UUID
 
 config CMD_JFFS2
        bool "jffs2 command"
+       select FS_JFFS2
        help
          Enables commands to support the JFFS2 (Journalling Flash File System
          version 2) filesystem. This enables fsload, ls and fsinfo which
index 4e75de8f29db155cbb10fc5f8db6324668246e3d..49ee36c74aec81cbdb512d0e46526ba7cce380e0 100644 (file)
@@ -39,7 +39,7 @@
 # define OFFSET_ADJUSTMENT     (flash_info[id.num].start[0])
 #endif
 
-#ifndef CONFIG_CMD_JFFS2
+#ifndef CONFIG_FS_JFFS2
 #include <linux/stat.h>
 char *mkmodestr(unsigned long mode, char *str)
 {
@@ -70,7 +70,7 @@ char *mkmodestr(unsigned long mode, char *str)
        str[10] = '\0';
        return str;
 }
-#endif /* CONFIG_CMD_JFFS2 */
+#endif /* CONFIG_FS_JFFS2 */
 
 extern int cramfs_check (struct part_info *info);
 extern int cramfs_load (char *loadoffset, struct part_info *info, char *filename);
index 604e5b9686db0d05ffae0022dad6c5e9b5dc9628..0245da0488fb6ef65d6b665b332cf0e1f3ce81db 100644 (file)
@@ -10,6 +10,9 @@ fsinfo  - print information about file systems
 ls      - list files in a directory
 chpart  - change active partition
 
+If you do now need the commands, you can enable the filesystem separately
+with CONFIG_FS_JFFS2 and call the jffs2 functions yourself.
+
 If you boot from a partition which is mounted writable, and you
 update your boot environment by replacing single files on that
 partition, you should also define CONFIG_SYS_JFFS2_SORT_FRAGMENTS. Scanning
index 5c90656ba1db1d373865d952d4ade386eab47c77..5770f41c0b01a1a9b87220b09a842bdec25f24b9 100644 (file)
@@ -16,7 +16,7 @@ obj-$(CONFIG_FS_CBFS) += cbfs/
 obj-$(CONFIG_CMD_CRAMFS) += cramfs/
 obj-$(CONFIG_FS_EXT4) += ext4/
 obj-y += fat/
-obj-$(CONFIG_CMD_JFFS2) += jffs2/
+obj-$(CONFIG_FS_JFFS2) += jffs2/
 obj-$(CONFIG_CMD_REISER) += reiserfs/
 obj-$(CONFIG_SANDBOX) += sandbox/
 obj-$(CONFIG_CMD_UBIFS) += ubifs/
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1b9ecdd8cca3491891d21ff5311b2d777547c8c8 100644 (file)
@@ -0,0 +1,7 @@
+config FS_JFFS2
+       bool "Enable JFFS2 filesystem support"
+       help
+         This provides support for reading images from JFFS2 (Journalling
+         Flash File System version 2). JFFS2 is a log-structured file system
+         for use with flash memory devices. It supports raw NAND devices,
+         hard links and compression.