From: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/4] spl: fat/fs: Add option to include/exclude FAT write build in SPL
Date: Wed, 23 Jan 2019 07:52:39 +0100 [thread overview]
Message-ID: <CAAh8qsxV_5_fAzLeSbbtDz23k1H-iKeqyGgcAx0ObqgAhV6JmQ@mail.gmail.com> (raw)
In-Reply-To: <1548224406-37649-2-git-send-email-tien.fong.chee@intel.com>
On Wed, Jan 23, 2019 at 7:20 AM <tien.fong.chee@intel.com> wrote:
>
> From: Tien Fong Chee <tien.fong.chee@intel.com>
>
> Most of the time SPL only needs very simple FAT reading, so having
> CONFIG_IS_ENABLED(FAT_WRITE) to exclude it from SPL build would help
> to save 64KiB default max clustersize from memory.
>
> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>
> ---
>
> Changes in v2:
> - Changed to CONFIG_IS_ENABLED(FAT_WRITE) to control build for FAT write
> int both SPL and U-Boot
> - Changed to CONFIG_IS_ENABLED for config FS_FAT too.
> ---
> common/spl/Kconfig | 7 +++++++
> fs/fat/Makefile | 4 ++--
> fs/fat/fat.c | 3 ++-
> fs/fs.c | 2 +-
> 4 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index 93e7fe9..9042117 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -403,6 +403,13 @@ config SPL_FS_FAT
> filesystem from within SPL. Support for the underlying block
> device (e.g. MMC or USB) must be enabled separately.
>
> +config SPL_FAT_WRITE
> + bool "Support write for FAT filesystems"
> + help
> + Enable write support for FAT and VFAT filesystems with SPL.
> + Support for the underlying block device (e.g. MMC or USB) must be
> + enabled separately.
> +
> config SPL_FPGA_SUPPORT
> bool "Support FPGAs"
> help
> diff --git a/fs/fat/Makefile b/fs/fat/Makefile
> index e64b61a..f84efac 100644
> --- a/fs/fat/Makefile
> +++ b/fs/fat/Makefile
> @@ -1,5 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0+
> #
>
> -obj-$(CONFIG_FS_FAT) := fat.o
> -obj-$(CONFIG_FAT_WRITE):= fat_write.o
> +obj-$(CONFIG_$(SPL_)FS_FAT) = fat.o
> +obj-$(CONFIG_$(SPL_)FAT_WRITE) = fat_write.o
> diff --git a/fs/fat/fat.c b/fs/fat/fat.c
> index ac8913e..ecfa255 100644
> --- a/fs/fat/fat.c
> +++ b/fs/fat/fat.c
> @@ -145,7 +145,8 @@ static void get_name(dir_entry *dirent, char *s_name)
> }
>
> static int flush_dirty_fat_buffer(fsdata *mydata);
> -#if !defined(CONFIG_FAT_WRITE)
> +
> +#if !CONFIG_IS_ENABLED(FAT_WRITE)
> /* Stub for read only operation */
> int flush_dirty_fat_buffer(fsdata *mydata)
> {
> diff --git a/fs/fs.c b/fs/fs.c
> index cb26517..48b8e9a 100644
> --- a/fs/fs.c
> +++ b/fs/fs.c
> @@ -168,7 +168,7 @@ static struct fstype_info fstypes[] = {
> .exists = fat_exists,
> .size = fat_size,
> .read = fat_read_file,
> -#ifdef CONFIG_FAT_WRITE
> +#if CONFIG_IS_ENABLED(FAT_WRITE)
> .write = file_fat_write,
> .unlink = fat_unlink,
> .mkdir = fat_mkdir,
> --
> 2.2.0
>
next prev parent reply other threads:[~2019-01-23 6:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 6:20 [U-Boot] [PATCH v2 1/4] spl: Kconfig: Replace CONFIG_SPL_FAT_SUPPORT with CONFIG_SPL_FS_FAT tien.fong.chee at intel.com
2019-01-23 6:20 ` [U-Boot] [PATCH v2 2/4] spl: fat/fs: Add option to include/exclude FAT write build in SPL tien.fong.chee at intel.com
2019-01-23 6:52 ` Simon Goldschmidt [this message]
2019-01-23 13:53 ` Tom Rini
2019-02-03 1:08 ` [U-Boot] [U-Boot, v2, " Tom Rini
2019-01-23 6:20 ` [U-Boot] [PATCH v2 3/4] spl: Kconfig: Replace CONFIG_SPL_EXT_SUPPORT to CONFIG_SPL_FS_EXT4 tien.fong.chee at intel.com
2019-01-23 13:53 ` Tom Rini
2019-02-03 1:08 ` [U-Boot] [U-Boot, v2, " Tom Rini
2019-01-23 6:20 ` [U-Boot] [PATCH v2 4/4] spl: fat/fs: Add control to build FS EXT4 in SPL tien.fong.chee at intel.com
2019-01-23 13:53 ` Tom Rini
2019-02-03 1:08 ` [U-Boot] [U-Boot, v2, " Tom Rini
2019-01-23 6:51 ` [U-Boot] [PATCH v2 1/4] spl: Kconfig: Replace CONFIG_SPL_FAT_SUPPORT with CONFIG_SPL_FS_FAT Simon Goldschmidt
2019-01-23 13:53 ` Tom Rini
2019-02-03 1:08 ` [U-Boot] [U-Boot, v2, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAh8qsxV_5_fAzLeSbbtDz23k1H-iKeqyGgcAx0ObqgAhV6JmQ@mail.gmail.com \
--to=simon.k.r.goldschmidt@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.