[PATCH 1/4] fs/squashfs: new filesystem

Rasmus Villemoes rasmus.villemoes at prevas.dk
Fri Jul 10 10:54:24 CEST 2020


On 10/07/2020 10.29, Thomas Petazzoni wrote:
> Hello Rasmus,
> 
> On Thu, 9 Jul 2020 21:50:03 +0200
> Rasmus Villemoes <rasmus.villemoes at prevas.dk> wrote:
> 
>>> +config SPL_FS_SQUASHFS
>>> +	bool "Support SquashFS filesystems"
>>> +	select FS_SQUASHFS  
>>
>> Is there any reason U-Boot proper must support squashfs if the SPL does?
>> This isn't quite specific to this patch; I see a number of 'config
>> SPL_FOO' that either depends on or selects FOO (e.g. SPL_FS_FAT), and I
>> wonder why.
> 
> Well, if your Linux kernel image and Device Tree are stored in a
> squashfs filesystem, then U-Boot proper needs SquashFS support, right ?

Exactly.

> And that is completely independent of whether the SPL has SquashFS
> support to be able to load U-Boot proper (which potentially could be
> stored on SquashFS as well).

Exactly.

> It's very much like the FAT filesystem case: if you have U-Boot proper
> and your Linux kernel image in a FAT filesystem, 

No, this is very much _not_ like the above. In this paragraph, you
combine "U-Boot proper and your Linux kernel", imposing an implicit
assumption that they are stored in the same way. Sure, _if_ both these
items are stored in squashfs images (possibly the same, possibly
distinct), then the thing that loads the respective images obviously
needs squashfs (or FAT, or whatnot) support.

My point is that it's possible that, say, U-Boot proper is stored in a
FAT file system, and the kernel is stored in a UBI volume. So SPL needs
FAT support. Why should I be forced to compile FAT support into U-Boot
proper if U-Boot proper never needs to access a FAT filesystem? And the
same for squashfs. Or any of the drivers or DM_ frameworks that do that
"depends on" or "select".

I can see why things like bloblist that are very much about passing info
from one stage to the next only make sense if both sides have that
configured in. But the drivers/filesystems that are needed in SPL need
not have anything to do with that which is needed in U-Boot proper.

Rasmus



More information about the U-Boot mailing list