All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] i.MX8MQ-EVK with ext4 read support
@ 2018-12-19 16:15 Chris Spencer
  2018-12-20 13:29 ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Spencer @ 2018-12-19 16:15 UTC (permalink / raw)
  To: u-boot

Hi,

I'm trying to get started with the new i.MX8MQ-EVK support and I've
got a bit of an issue enabling ext4 read support without also enabling
write support.

CONFIG_FS_EXT4=y

I get a build error here:

fs/fs.c:198:12: error: ‘ext4_write_file’ undeclared here (not in a
function); did you mean ‘ext4_read_file’?
   .write = ext4_write_file,
            ^~~~~~~~~~~~~~~

This line is wrapped with an ifdef check for CONFIG_CMD_EXT4_WRITE.
The write function is declared in include/ext4fs.h, where it is
wrapped with a check for CONFIG_EXT4_WRITE.

The problem is that include/configs/imx8mq_evk.h has this define:

#define CONFIG_CMD_EXT4_WRITE

This results in the 'write' code being enabled in fs.c but disabled in
ext4fs.h. The two ifdefs probably ought to be made consistent, but I
don't really understand why imx8mq_evk.h needs to define it in the
first place. Can anybody shed some light on this?

Thanks,

Chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] i.MX8MQ-EVK with ext4 read support
  2018-12-19 16:15 [U-Boot] i.MX8MQ-EVK with ext4 read support Chris Spencer
@ 2018-12-20 13:29 ` Fabio Estevam
  2018-12-20 14:27   ` Chris Spencer
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2018-12-20 13:29 UTC (permalink / raw)
  To: u-boot

Hi Chris,

On Thu, Dec 20, 2018 at 10:59 AM Chris Spencer <spencercw@gmail.com> wrote:
>
> Hi,
>
> I'm trying to get started with the new i.MX8MQ-EVK support and I've
> got a bit of an issue enabling ext4 read support without also enabling
> write support.
>
> CONFIG_FS_EXT4=y
>
> I get a build error here:
>
> fs/fs.c:198:12: error: ‘ext4_write_file’ undeclared here (not in a
> function); did you mean ‘ext4_read_file’?
>    .write = ext4_write_file,
>             ^~~~~~~~~~~~~~~
>
> This line is wrapped with an ifdef check for CONFIG_CMD_EXT4_WRITE.
> The write function is declared in include/ext4fs.h, where it is
> wrapped with a check for CONFIG_EXT4_WRITE.
>
> The problem is that include/configs/imx8mq_evk.h has this define:
>
> #define CONFIG_CMD_EXT4_WRITE
>
> This results in the 'write' code being enabled in fs.c but disabled in
> ext4fs.h. The two ifdefs probably ought to be made consistent, but I
> don't really understand why imx8mq_evk.h needs to define it in the
> first place. Can anybody shed some light on this?

Does the change below help?

diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index f216d46a8f..92d8b7a6de 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -35,3 +35,8 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_THERMAL=y
 CONFIG_FS_FAT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
+CONFIG_DOS_PARTITION=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index 35f81152f2..f0430224cb 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -226,12 +226,6 @@
 #define CONFIG_SYS_FSL_USDHC_NUM       2
 #define CONFIG_SYS_FSL_ESDHC_ADDR       0

-#define CONFIG_DOS_PARTITION
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_EXT4
-#define CONFIG_CMD_EXT4_WRITE
-#define CONFIG_CMD_FAT
-
 #define CONFIG_SUPPORT_EMMC_BOOT       /* eMMC specific */
 #define CONFIG_SYS_MMC_IMG_LOAD_PART   1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] i.MX8MQ-EVK with ext4 read support
  2018-12-20 13:29 ` Fabio Estevam
@ 2018-12-20 14:27   ` Chris Spencer
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Spencer @ 2018-12-20 14:27 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

> Does the change below help?

Your patch does indeed fix the problem.

Thanks,

Chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-20 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 16:15 [U-Boot] i.MX8MQ-EVK with ext4 read support Chris Spencer
2018-12-20 13:29 ` Fabio Estevam
2018-12-20 14:27   ` Chris Spencer

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.