All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] wic: allow sizes to be specified in sectors
Date: Sat, 17 Feb 2024 16:21:42 -0500	[thread overview]
Message-ID: <20240217212142.GA34693@localhost> (raw)
In-Reply-To: <20240217205103.27285-1-twoerner@gmail.com>

Sorry, please ignore.

The assumption that everything is a multiple of 1024 runs very deep throughout
wic and is hard-coded in too many places for a patch this simple to work.


On Sat 2024-02-17 @ 03:51:03 PM, Trevor Woerner wrote:
> The partition layout of boot devices for some SBCs (e.g. Rockchip[1])
> are specified in multiples of sectors (which are multiples of 512 bytes,
> instead of 1024). Therefore allow wic to understand partition sizing
> specified in sectors as well.
> 
> [1] https://opensource.rock-chips.com/wiki_Partitions
> 
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>  scripts/lib/wic/ksparser.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
> index 7ef3dc83ddce..35681bdc8d13 100644
> --- a/scripts/lib/wic/ksparser.py
> +++ b/scripts/lib/wic/ksparser.py
> @@ -178,8 +178,8 @@ class KickStart():
>          # --error, but since nesting mutually exclusive groups does not work,
>          # ----extra-space/--overhead-factor are handled later
>          sizeexcl = part.add_mutually_exclusive_group()
> -        sizeexcl.add_argument('--size', type=sizetype("M"), default=0)
> -        sizeexcl.add_argument('--fixed-size', type=sizetype("M"), default=0)
> +        sizeexcl.add_argument('--size', type=sizetype("M", True), default=0)
> +        sizeexcl.add_argument('--fixed-size', type=sizetype("M", True), default=0)
>  
>          part.add_argument('--source')
>          part.add_argument('--sourceparams')
> -- 
> 2.43.0.76.g1a87c842ece3
> 


      reply	other threads:[~2024-02-17 21:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 20:51 [PATCH] wic: allow sizes to be specified in sectors Trevor Woerner
2024-02-17 21:21 ` Trevor Woerner [this message]

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=20240217212142.GA34693@localhost \
    --to=twoerner@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.