u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] disk: part: remove dependency to ubifs for spl
@ 2022-08-08 14:45 Stefan Herbrechtsmeier
  2022-08-08 19:26 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stefan Herbrechtsmeier @ 2022-08-08 14:45 UTC (permalink / raw)
  To: u-boot
  Cc: Stefan Herbrechtsmeier, AKASHI Takahiro, Heinrich Schuchardt,
	Oleksii Bidnichenko, Sean Anderson, Simon Glass, schspa

From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

The spl doesn't support ubifs and thereby doesn't provide the
ubifs_is_mounted function. Remove the dependency to ubifs for the spl.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

---

 disk/part.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/disk/part.c b/disk/part.c
index 79955c7fb0..de1b917e84 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -479,7 +479,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
 	}
 #endif
 
-#ifdef CONFIG_CMD_UBIFS
+#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD)
 	/*
 	 * Special-case ubi, ubi goes through a mtd, rather than through
 	 * a regular block device.
-- 
2.30.2


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

* Re: [PATCH] disk: part: remove dependency to ubifs for spl
  2022-08-08 14:45 [PATCH] disk: part: remove dependency to ubifs for spl Stefan Herbrechtsmeier
@ 2022-08-08 19:26 ` Simon Glass
  2022-08-09  7:27   ` Stefan Herbrechtsmeier
  2022-08-27 12:06 ` Tom Rini
  2022-08-29 15:01 ` Heinrich Schuchardt
  2 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2022-08-08 19:26 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier
  Cc: U-Boot Mailing List, Stefan Herbrechtsmeier, AKASHI Takahiro,
	Heinrich Schuchardt, Oleksii Bidnichenko, Sean Anderson, schspa

Hi Stefan,

On Mon, 8 Aug 2022 at 08:45, Stefan Herbrechtsmeier
<stefan.herbrechtsmeier-oss@weidmueller.com> wrote:
>
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> The spl doesn't support ubifs and thereby doesn't provide the
> ubifs_is_mounted function. Remove the dependency to ubifs for the spl.
>
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> ---
>
>  disk/part.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/disk/part.c b/disk/part.c
> index 79955c7fb0..de1b917e84 100644
> --- a/disk/part.c
> +++ b/disk/part.c
> @@ -479,7 +479,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
>         }
>  #endif
>
> -#ifdef CONFIG_CMD_UBIFS
> +#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD)
>         /*
>          * Special-case ubi, ubi goes through a mtd, rather than through
>          * a regular block device.
> --
> 2.30.2
>

A CMD config should not be used outside cmd/ - can we add a proper
CONFIG_UBIFS ?

Regards,
Simon

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

* Re: [PATCH] disk: part: remove dependency to ubifs for spl
  2022-08-08 19:26 ` Simon Glass
@ 2022-08-09  7:27   ` Stefan Herbrechtsmeier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Herbrechtsmeier @ 2022-08-09  7:27 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, Stefan Herbrechtsmeier, AKASHI Takahiro,
	Heinrich Schuchardt, Oleksii Bidnichenko, Sean Anderson, schspa

Hi Simon,

Am 08.08.2022 um 21:26 schrieb Simon Glass:
> Hi Stefan,
> 
> On Mon, 8 Aug 2022 at 08:45, Stefan Herbrechtsmeier
> <stefan.herbrechtsmeier-oss@weidmueller.com> wrote:
>>
>> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>>
>> The spl doesn't support ubifs and thereby doesn't provide the
>> ubifs_is_mounted function. Remove the dependency to ubifs for the spl.
>>
>> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>>
>> ---
>>
>>   disk/part.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/disk/part.c b/disk/part.c
>> index 79955c7fb0..de1b917e84 100644
>> --- a/disk/part.c
>> +++ b/disk/part.c
>> @@ -479,7 +479,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
>>          }
>>   #endif
>>
>> -#ifdef CONFIG_CMD_UBIFS
>> +#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD)
>>          /*
>>           * Special-case ubi, ubi goes through a mtd, rather than through
>>           * a regular block device.
>> --
>> 2.30.2
>>
> 
> A CMD config should not be used outside cmd/ - can we add a proper
> CONFIG_UBIFS ?

The code use the ubifs_is_mounted function from cmd/ubifs.c file and 
reference the ubifsmount command from the same file. The 
drivers/misc/fs_loader.c and fs/fs.c files use functions from the 
cmd/ubifs.c file too.


Regards
   Stefan

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

* Re: [PATCH] disk: part: remove dependency to ubifs for spl
  2022-08-08 14:45 [PATCH] disk: part: remove dependency to ubifs for spl Stefan Herbrechtsmeier
  2022-08-08 19:26 ` Simon Glass
@ 2022-08-27 12:06 ` Tom Rini
  2022-08-29 15:01 ` Heinrich Schuchardt
  2 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2022-08-27 12:06 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier
  Cc: u-boot, Stefan Herbrechtsmeier, AKASHI Takahiro,
	Heinrich Schuchardt, Oleksii Bidnichenko, Sean Anderson,
	Simon Glass, schspa

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

On Mon, Aug 08, 2022 at 04:45:17PM +0200, Stefan Herbrechtsmeier wrote:

> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
> 
> The spl doesn't support ubifs and thereby doesn't provide the
> ubifs_is_mounted function. Remove the dependency to ubifs for the spl.
> 
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH] disk: part: remove dependency to ubifs for spl
  2022-08-08 14:45 [PATCH] disk: part: remove dependency to ubifs for spl Stefan Herbrechtsmeier
  2022-08-08 19:26 ` Simon Glass
  2022-08-27 12:06 ` Tom Rini
@ 2022-08-29 15:01 ` Heinrich Schuchardt
  2022-08-29 15:53   ` Stefan Herbrechtsmeier
  2 siblings, 1 reply; 8+ messages in thread
From: Heinrich Schuchardt @ 2022-08-29 15:01 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier
  Cc: Stefan Herbrechtsmeier, AKASHI Takahiro, Oleksii Bidnichenko,
	Sean Anderson, Simon Glass, schspa, u-boot

On 8/8/22 16:45, Stefan Herbrechtsmeier wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> The spl doesn't support ubifs and thereby doesn't provide the
> ubifs_is_mounted function. Remove the dependency to ubifs for the spl.
>
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> ---
>
>   disk/part.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/disk/part.c b/disk/part.c
> index 79955c7fb0..de1b917e84 100644
> --- a/disk/part.c
> +++ b/disk/part.c
> @@ -479,7 +479,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
>   	}
>   #endif
>
> -#ifdef CONFIG_CMD_UBIFS
> +#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD)

This configuration seems strange. The support for a file system should
not depend on a command. I think a CONFIG_UBIFS is missing.

Best regards

Heinrich

>   	/*
>   	 * Special-case ubi, ubi goes through a mtd, rather than through
>   	 * a regular block device.


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

* Re: [PATCH] disk: part: remove dependency to ubifs for spl
  2022-08-29 15:01 ` Heinrich Schuchardt
@ 2022-08-29 15:53   ` Stefan Herbrechtsmeier
  2022-08-30  2:29     ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Herbrechtsmeier @ 2022-08-29 15:53 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Stefan Herbrechtsmeier, AKASHI Takahiro, Oleksii Bidnichenko,
	Sean Anderson, Simon Glass, schspa, u-boot

Hi Heinrich,

Am 29.08.2022 um 17:01 schrieb Heinrich Schuchardt:
> On 8/8/22 16:45, Stefan Herbrechtsmeier wrote:
>> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>>
>> The spl doesn't support ubifs and thereby doesn't provide the
>> ubifs_is_mounted function. Remove the dependency to ubifs for the spl.
>>
>> Signed-off-by: Stefan Herbrechtsmeier 
>> <stefan.herbrechtsmeier@weidmueller.com>
>>
>> ---
>>
>>   disk/part.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/disk/part.c b/disk/part.c
>> index 79955c7fb0..de1b917e84 100644
>> --- a/disk/part.c
>> +++ b/disk/part.c
>> @@ -479,7 +479,7 @@ int blk_get_device_part_str(const char *ifname, 
>> const char *dev_part_str,
>>       }
>>   #endif
>>
>> -#ifdef CONFIG_CMD_UBIFS
>> +#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD)
> 
> This configuration seems strange. The support for a file system should
> not depend on a command. I think a CONFIG_UBIFS is missing.

The support for the ubi file system depends on the command. The code use 
the ubifs_is_mounted function from cmd/ubifs.c file and reference the 
ubifsmount command from the same file.

Regards
   Stefan

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

* Re: [PATCH] disk: part: remove dependency to ubifs for spl
  2022-08-29 15:53   ` Stefan Herbrechtsmeier
@ 2022-08-30  2:29     ` Simon Glass
  2022-08-30  7:58       ` Stefan Herbrechtsmeier
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2022-08-30  2:29 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier
  Cc: Heinrich Schuchardt, Stefan Herbrechtsmeier, AKASHI Takahiro,
	Oleksii Bidnichenko, Sean Anderson, schspa, U-Boot Mailing List

Hi Stefan,

On Mon, 29 Aug 2022 at 09:53, Stefan Herbrechtsmeier
<stefan.herbrechtsmeier-oss@weidmueller.com> wrote:
>
> Hi Heinrich,
>
> Am 29.08.2022 um 17:01 schrieb Heinrich Schuchardt:
> > On 8/8/22 16:45, Stefan Herbrechtsmeier wrote:
> >> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
> >>
> >> The spl doesn't support ubifs and thereby doesn't provide the
> >> ubifs_is_mounted function. Remove the dependency to ubifs for the spl.
> >>
> >> Signed-off-by: Stefan Herbrechtsmeier
> >> <stefan.herbrechtsmeier@weidmueller.com>
> >>
> >> ---
> >>
> >>   disk/part.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/disk/part.c b/disk/part.c
> >> index 79955c7fb0..de1b917e84 100644
> >> --- a/disk/part.c
> >> +++ b/disk/part.c
> >> @@ -479,7 +479,7 @@ int blk_get_device_part_str(const char *ifname,
> >> const char *dev_part_str,
> >>       }
> >>   #endif
> >>
> >> -#ifdef CONFIG_CMD_UBIFS
> >> +#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD)
> >
> > This configuration seems strange. The support for a file system should
> > not depend on a command. I think a CONFIG_UBIFS is missing.
>
> The support for the ubi file system depends on the command. The code use
> the ubifs_is_mounted function from cmd/ubifs.c file and reference the
> ubifsmount command from the same file.

Yes it does, but it should not (I think I made the point in another
thread but did not understand your response). The UBIFS Kconfig should
be separate from CMD_UBIFS.

The above can then be:

if (CONFIG_IS_ENABLED(UBIFS))

Regards,
Simon

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

* Re: [PATCH] disk: part: remove dependency to ubifs for spl
  2022-08-30  2:29     ` Simon Glass
@ 2022-08-30  7:58       ` Stefan Herbrechtsmeier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Herbrechtsmeier @ 2022-08-30  7:58 UTC (permalink / raw)
  To: Simon Glass
  Cc: Heinrich Schuchardt, Stefan Herbrechtsmeier, AKASHI Takahiro,
	Oleksii Bidnichenko, Sean Anderson, schspa, U-Boot Mailing List

Hi,

Am 30.08.2022 um 04:29 schrieb Simon Glass:
> Hi Stefan,
> 
> On Mon, 29 Aug 2022 at 09:53, Stefan Herbrechtsmeier
> <stefan.herbrechtsmeier-oss@weidmueller.com> wrote:
>>
>> Hi Heinrich,
>>
>> Am 29.08.2022 um 17:01 schrieb Heinrich Schuchardt:
>>> On 8/8/22 16:45, Stefan Herbrechtsmeier wrote:
>>>> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>>>>
>>>> The spl doesn't support ubifs and thereby doesn't provide the
>>>> ubifs_is_mounted function. Remove the dependency to ubifs for the spl.
>>>>
>>>> Signed-off-by: Stefan Herbrechtsmeier
>>>> <stefan.herbrechtsmeier@weidmueller.com>
>>>>
>>>> ---
>>>>
>>>>    disk/part.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/disk/part.c b/disk/part.c
>>>> index 79955c7fb0..de1b917e84 100644
>>>> --- a/disk/part.c
>>>> +++ b/disk/part.c
>>>> @@ -479,7 +479,7 @@ int blk_get_device_part_str(const char *ifname,
>>>> const char *dev_part_str,
>>>>        }
>>>>    #endif
>>>>
>>>> -#ifdef CONFIG_CMD_UBIFS
>>>> +#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD)
>>>
>>> This configuration seems strange. The support for a file system should
>>> not depend on a command. I think a CONFIG_UBIFS is missing.
>>
>> The support for the ubi file system depends on the command. The code use
>> the ubifs_is_mounted function from cmd/ubifs.c file and reference the
>> ubifsmount command from the same file.
> 
> Yes it does, but it should not (I think I made the point in another
> thread but did not understand your response). The UBIFS Kconfig should
> be separate from CMD_UBIFS.

I think we agree that the ubifs implementation isn't optimal. But this 
patch only fix a problem for SPL if UBIFS is enabled in u-boot proper. 
The wrong implementation was accept by u-boot 7 years ago.

The problem for me is that we no longer use UBI. I fear that a rework of 
UBI needs a lot of time to to fix a 'should not'. On the other hand I 
have patches with an unclear status that fix problems / incompatibilities.

Regards
   Stefan

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

end of thread, other threads:[~2022-08-30  7:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08 14:45 [PATCH] disk: part: remove dependency to ubifs for spl Stefan Herbrechtsmeier
2022-08-08 19:26 ` Simon Glass
2022-08-09  7:27   ` Stefan Herbrechtsmeier
2022-08-27 12:06 ` Tom Rini
2022-08-29 15:01 ` Heinrich Schuchardt
2022-08-29 15:53   ` Stefan Herbrechtsmeier
2022-08-30  2:29     ` Simon Glass
2022-08-30  7:58       ` Stefan Herbrechtsmeier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).