mbox series

[0/5,v2] image_types: use IMAGE_FILE_MAXSIZE variable to create fixed partition size

Message ID 20230806211348.1191553-1-charles-antoine.couret@mind.be
Headers show
Series image_types: use IMAGE_FILE_MAXSIZE variable to create fixed partition size | expand

Message

Charles-Antoine Couret Aug. 6, 2023, 9:13 p.m. UTC
Details are described in the first patch now.

Difference from v1:

* Added documentation for IMAGE_FILE_MAXSIZE variable
* Added Python function to get the value of this variable from shell functions
otherwise parsing issue can happen
* Added an additional task to check the final result which works for all filesystems
and not only those created with dd command.

Charles-Antoine Couret (5):
  image_types: add python function to get the IMAGE_FILE_MAXSIZE:fstype
    value
  image_types: use IMAGE_FILE_MAXSIZE variable for ext2/3/4 image types
  image_types: use IMAGE_FILE_MAXSIZE variable for btrfs image types
  image_types: use IMAGE_FILE_MAXSIZE variable for f2fs image types
  image: add check_image_max_size as post function to check file size
    against IMAGE_FILE_MAXSIZE

 documentation/ref-manual/variables.rst  | 14 ++++++++
 meta/classes-recipe/image.bbclass       | 30 +++++++++++++++++
 meta/classes-recipe/image_types.bbclass | 43 ++++++++++++++++++++-----
 3 files changed, 79 insertions(+), 8 deletions(-)

Comments

Alexander Kanavin Aug. 7, 2023, 8:04 a.m. UTC | #1
On Sun, 6 Aug 2023 at 23:14, Charles-Antoine Couret via
lists.openembedded.org
<charles-antoine.couret=mind.be@lists.openembedded.org> wrote:
>  documentation/ref-manual/variables.rst  | 14 ++++++++
>  meta/classes-recipe/image.bbclass       | 30 +++++++++++++++++
>  meta/classes-recipe/image_types.bbclass | 43 ++++++++++++++++++++-----

This does need tests and examples. You can grep the poky tree for
places where related variables are used, and see if you can expand
those places to include the mechanism. Please include an explanation
or a demonstration for why existing facilities are not good enough.

Documentation updates go to yocto-docs mailing lists.

Alex
Richard Purdie Aug. 10, 2023, 9:36 a.m. UTC | #2
On Mon, 2023-08-07 at 10:04 +0200, Alexander Kanavin wrote:
> On Sun, 6 Aug 2023 at 23:14, Charles-Antoine Couret via
> lists.openembedded.org
> <charles-antoine.couret=mind.be@lists.openembedded.org> wrote:
> >  documentation/ref-manual/variables.rst  | 14 ++++++++
> >  meta/classes-recipe/image.bbclass       | 30 +++++++++++++++++
> >  meta/classes-recipe/image_types.bbclass | 43 ++++++++++++++++++++-----
> 
> This does need tests and examples. You can grep the poky tree for
> places where related variables are used, and see if you can expand
> those places to include the mechanism. Please include an explanation
> or a demonstration for why existing facilities are not good enough.
> 
> Documentation updates go to yocto-docs mailing lists.

Alex is right about this needing tests but there is a deeper issue with
this around naming.

"MAXSIZE" could easily be interpreted as some kind of upper limit on
the filesystem size above which you'd get an error. In reality, it is
an override on the overall partition size to a specific value, which
isn't a maximum at all.

I understand the need to differentiate it with IMAGE_ROOTFS_SIZE but
effectively they are the same thing or very closely related.

I think the naming needs a lot more thought.

Cheers,

Richard