All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/7] Post genimage.cfg beautify
@ 2021-11-08 23:05 Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 1/7] board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to wrong offset value suffix Giulio Benetti
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Giulio Benetti @ 2021-11-08 23:05 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Luca Ceresoli, Giulio Benetti,
	Heiko Thiery

This patchset has a critical patch(a20_olinuxino) that prevents from
creating the image. While the rest is still code style related.

As promised I'm going to write the linter for genimage.cfg files.

Best regards
Giulio Benetti
Benetti Engineering sas

Giulio Benetti (7):
  board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to
    wrong offset value suffix
  board/altera/socrates_cyclone5/genimage.cfg: fix offset suffix
  board/friendlyarm/nanopi-neo2/genimage.cfg: fix comment
  board/orangepi/orangepi-pc2/genimage.cfg: fix comment
  board/minnowboard/genimage.cfg: fix option assignment spaces
  board/kontron/pitx-imx8m/genimage.cfg: fix option suffix
  board/kontron/smarc-sal28/genimage.cfg: fix option suffix

 board/altera/socrates_cyclone5/genimage.cfg | 2 +-
 board/friendlyarm/nanopi-neo2/genimage.cfg  | 2 +-
 board/kontron/pitx-imx8m/genimage.cfg       | 2 +-
 board/kontron/smarc-sal28/genimage.cfg      | 2 +-
 board/minnowboard/genimage.cfg              | 2 +-
 board/olimex/a20_olinuxino/genimage.cfg     | 2 +-
 board/orangepi/orangepi-pc2/genimage.cfg    | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/7] board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to wrong offset value suffix
  2021-11-08 23:05 [Buildroot] [PATCH 0/7] Post genimage.cfg beautify Giulio Benetti
@ 2021-11-08 23:05 ` Giulio Benetti
  2021-11-09  9:01   ` Luca Ceresoli
  2021-11-08 23:05 ` [Buildroot] [PATCH 2/7] board/altera/socrates_cyclone5/genimage.cfg: fix offset suffix Giulio Benetti
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Giulio Benetti @ 2021-11-08 23:05 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Luca Ceresoli, Giulio Benetti,
	Heiko Thiery

With commit[1] I've introduced a bug:
offset = 8KB(not valid for genimage)
and this prevents genimage to work, so let's substitute 8KB with 8K.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/olimex/a20_olinuxino/genimage.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/olimex/a20_olinuxino/genimage.cfg b/board/olimex/a20_olinuxino/genimage.cfg
index 5a735ed2de..b48e12a831 100644
--- a/board/olimex/a20_olinuxino/genimage.cfg
+++ b/board/olimex/a20_olinuxino/genimage.cfg
@@ -5,7 +5,7 @@ image sdcard.img {
 	partition u-boot {
 		in-partition-table = "no"
 		image = "u-boot-sunxi-with-spl.bin"
-		offset = 8KB
+		offset = 8K
 		size = 1016K # 1MB - 8KB
 	}
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/7] board/altera/socrates_cyclone5/genimage.cfg: fix offset suffix
  2021-11-08 23:05 [Buildroot] [PATCH 0/7] Post genimage.cfg beautify Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 1/7] board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to wrong offset value suffix Giulio Benetti
@ 2021-11-08 23:05 ` Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 3/7] board/friendlyarm/nanopi-neo2/genimage.cfg: fix comment Giulio Benetti
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Giulio Benetti @ 2021-11-08 23:05 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Luca Ceresoli, Giulio Benetti,
	Heiko Thiery

For consistency 'offset = 256k' must be 'offset = 256K'

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/altera/socrates_cyclone5/genimage.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/altera/socrates_cyclone5/genimage.cfg b/board/altera/socrates_cyclone5/genimage.cfg
index 0af3f2ec60..d31c3838be 100644
--- a/board/altera/socrates_cyclone5/genimage.cfg
+++ b/board/altera/socrates_cyclone5/genimage.cfg
@@ -24,7 +24,7 @@ image uboot.img {
 	partition uboot-full {
 		in-partition-table = "no"
 		image = "u-boot.img"
-		offset = 256k
+		offset = 256K
 	}
 
 	size = 1M
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 3/7] board/friendlyarm/nanopi-neo2/genimage.cfg: fix comment
  2021-11-08 23:05 [Buildroot] [PATCH 0/7] Post genimage.cfg beautify Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 1/7] board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to wrong offset value suffix Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 2/7] board/altera/socrates_cyclone5/genimage.cfg: fix offset suffix Giulio Benetti
@ 2021-11-08 23:05 ` Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 4/7] board/orangepi/orangepi-pc2/genimage.cfg: " Giulio Benetti
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Giulio Benetti @ 2021-11-08 23:05 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Luca Ceresoli, Giulio Benetti,
	Heiko Thiery

For consistency comment '# 1MB - 40K' must be '# 1MB - 40KB'.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/friendlyarm/nanopi-neo2/genimage.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/friendlyarm/nanopi-neo2/genimage.cfg b/board/friendlyarm/nanopi-neo2/genimage.cfg
index 45d081e197..3163a06592 100644
--- a/board/friendlyarm/nanopi-neo2/genimage.cfg
+++ b/board/friendlyarm/nanopi-neo2/genimage.cfg
@@ -24,7 +24,7 @@ image sdcard.img {
 		in-partition-table = "no"
 		image = "u-boot.itb"
 		offset = 40K
-		size = 1M # 1MB - 40K
+		size = 1M # 1MB - 40KB
 	}
 
 	partition boot {
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 4/7] board/orangepi/orangepi-pc2/genimage.cfg: fix comment
  2021-11-08 23:05 [Buildroot] [PATCH 0/7] Post genimage.cfg beautify Giulio Benetti
                   ` (2 preceding siblings ...)
  2021-11-08 23:05 ` [Buildroot] [PATCH 3/7] board/friendlyarm/nanopi-neo2/genimage.cfg: fix comment Giulio Benetti
@ 2021-11-08 23:05 ` Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 5/7] board/minnowboard/genimage.cfg: fix option assignment spaces Giulio Benetti
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Giulio Benetti @ 2021-11-08 23:05 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Luca Ceresoli, Giulio Benetti,
	Heiko Thiery

For consistency comment '# 1MB - 40K' must be '# 1MB - 40KB'.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/orangepi/orangepi-pc2/genimage.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/orangepi/orangepi-pc2/genimage.cfg b/board/orangepi/orangepi-pc2/genimage.cfg
index 72adc47518..cc8695c9f1 100644
--- a/board/orangepi/orangepi-pc2/genimage.cfg
+++ b/board/orangepi/orangepi-pc2/genimage.cfg
@@ -24,7 +24,7 @@ image sdcard.img {
 		in-partition-table = "no"
 		image = "u-boot.itb"
 		offset = 40K
-		size = 1M # 1MB - 40K
+		size = 1M # 1MB - 40KB
 	}
 
 	partition boot {
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 5/7] board/minnowboard/genimage.cfg: fix option assignment spaces
  2021-11-08 23:05 [Buildroot] [PATCH 0/7] Post genimage.cfg beautify Giulio Benetti
                   ` (3 preceding siblings ...)
  2021-11-08 23:05 ` [Buildroot] [PATCH 4/7] board/orangepi/orangepi-pc2/genimage.cfg: " Giulio Benetti
@ 2021-11-08 23:05 ` Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 6/7] board/kontron/pitx-imx8m/genimage.cfg: fix option suffix Giulio Benetti
  2021-11-08 23:05 ` [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: " Giulio Benetti
  6 siblings, 0 replies; 19+ messages in thread
From: Giulio Benetti @ 2021-11-08 23:05 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Luca Ceresoli, Giulio Benetti,
	Heiko Thiery

Option 'size=10M' must be 'size = 10M'.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/minnowboard/genimage.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/minnowboard/genimage.cfg b/board/minnowboard/genimage.cfg
index 34b3070901..2eccce2de4 100644
--- a/board/minnowboard/genimage.cfg
+++ b/board/minnowboard/genimage.cfg
@@ -9,7 +9,7 @@ image efi-part.vfat {
 		}
 	}
 
-	size=10M
+	size = 10M
 }
 
 # Create the sdcard image, pulling in
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 6/7] board/kontron/pitx-imx8m/genimage.cfg: fix option suffix
  2021-11-08 23:05 [Buildroot] [PATCH 0/7] Post genimage.cfg beautify Giulio Benetti
                   ` (4 preceding siblings ...)
  2021-11-08 23:05 ` [Buildroot] [PATCH 5/7] board/minnowboard/genimage.cfg: fix option assignment spaces Giulio Benetti
@ 2021-11-08 23:05 ` Giulio Benetti
  2021-11-09  7:37   ` Heiko Thiery
  2021-11-08 23:05 ` [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: " Giulio Benetti
  6 siblings, 1 reply; 19+ messages in thread
From: Giulio Benetti @ 2021-11-08 23:05 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Luca Ceresoli, Giulio Benetti,
	Heiko Thiery

Option 'offset = 4k' must be 'option = 4K'.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/kontron/pitx-imx8m/genimage.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/kontron/pitx-imx8m/genimage.cfg b/board/kontron/pitx-imx8m/genimage.cfg
index c335b0c026..c78ef0f910 100644
--- a/board/kontron/pitx-imx8m/genimage.cfg
+++ b/board/kontron/pitx-imx8m/genimage.cfg
@@ -5,7 +5,7 @@ image sdcard.img {
 	partition imx-boot {
 		in-partition-table = "no"
 		image = "imx8-boot-sd.bin"
-		offset = 33k
+		offset = 33K
 	}
 
 	partition rootfs {
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: fix option suffix
  2021-11-08 23:05 [Buildroot] [PATCH 0/7] Post genimage.cfg beautify Giulio Benetti
                   ` (5 preceding siblings ...)
  2021-11-08 23:05 ` [Buildroot] [PATCH 6/7] board/kontron/pitx-imx8m/genimage.cfg: fix option suffix Giulio Benetti
@ 2021-11-08 23:05 ` Giulio Benetti
  2021-11-09  8:04   ` Michael Walle
  6 siblings, 1 reply; 19+ messages in thread
From: Giulio Benetti @ 2021-11-08 23:05 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Luca Ceresoli, Giulio Benetti,
	Heiko Thiery

Option 'offset = 4k' must be 'option = 4K'.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 board/kontron/smarc-sal28/genimage.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/kontron/smarc-sal28/genimage.cfg b/board/kontron/smarc-sal28/genimage.cfg
index f3fb77e00a..8c8a7baaae 100644
--- a/board/kontron/smarc-sal28/genimage.cfg
+++ b/board/kontron/smarc-sal28/genimage.cfg
@@ -4,7 +4,7 @@ image sdcard-emmc.img {
 	}
 
 	partition rcw {
-		offset = 4k
+		offset = 4K
 		in-partition-table = "no"
 		image = "rcw.bin"
 	}
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 6/7] board/kontron/pitx-imx8m/genimage.cfg: fix option suffix
  2021-11-08 23:05 ` [Buildroot] [PATCH 6/7] board/kontron/pitx-imx8m/genimage.cfg: fix option suffix Giulio Benetti
@ 2021-11-09  7:37   ` Heiko Thiery
  2021-11-09  7:49     ` Giulio Benetti
  0 siblings, 1 reply; 19+ messages in thread
From: Heiko Thiery @ 2021-11-09  7:37 UTC (permalink / raw)
  To: Giulio Benetti
  Cc: Michael Walle, Jagan Teki, Michał Łyszczek, buildroot,
	Luca Ceresoli, Yann E . MORIN

Hi Guilio,


Am Di., 9. Nov. 2021 um 00:05 Uhr schrieb Giulio Benetti
<giulio.benetti@benettiengineering.com>:
>
> Option 'offset = 4k' must be 'option = 4K'.

Is it really a must that the kilobyte value has an uppercase 'k'? From
the code I see that both k and K are allowed for that. But I have
nothing against unifying it.

Small nitpick here: s/'option = 4K'/option 'offset = 4K'/

>
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  board/kontron/pitx-imx8m/genimage.cfg | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/kontron/pitx-imx8m/genimage.cfg b/board/kontron/pitx-imx8m/genimage.cfg
> index c335b0c026..c78ef0f910 100644
> --- a/board/kontron/pitx-imx8m/genimage.cfg
> +++ b/board/kontron/pitx-imx8m/genimage.cfg
> @@ -5,7 +5,7 @@ image sdcard.img {
>         partition imx-boot {
>                 in-partition-table = "no"
>                 image = "imx8-boot-sd.bin"
> -               offset = 33k
> +               offset = 33K
>         }
>
>         partition rootfs {
> --
> 2.25.1

Acked-by: Heiko Thiery <heiko.thiery@gmail.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 6/7] board/kontron/pitx-imx8m/genimage.cfg: fix option suffix
  2021-11-09  7:37   ` Heiko Thiery
@ 2021-11-09  7:49     ` Giulio Benetti
  0 siblings, 0 replies; 19+ messages in thread
From: Giulio Benetti @ 2021-11-09  7:49 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Michael Walle, Jagan Teki, Michał Łyszczek, buildroot,
	Luca Ceresoli, Yann E . MORIN

Hi Heiko,

> Il giorno 9 nov 2021, alle ore 08:38, Heiko Thiery <heiko.thiery@gmail.com> ha scritto:
> 
> Hi Guilio,
> 
> 
>> Am Di., 9. Nov. 2021 um 00:05 Uhr schrieb Giulio Benetti
>> <giulio.benetti@benettiengineering.com>:
>> 
>> Option 'offset = 4k' must be 'option = 4K'.
> 
> Is it really a must that the kilobyte value has an uppercase 'k'? From
> the code I see that both k and K are allowed for that. But I have
> nothing against unifying it.

Yes, it’s for unifying, I have to add it to the manual.

> 
> Small nitpick here: s/'option = 4K'/option 'offset = 4K'/

Oh, yes, thank you. I reword and send a v2 tonight.

Thank you
Giulio Benetti
Benetti Engineering sas

> 
>> 
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>> board/kontron/pitx-imx8m/genimage.cfg | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/board/kontron/pitx-imx8m/genimage.cfg b/board/kontron/pitx-imx8m/genimage.cfg
>> index c335b0c026..c78ef0f910 100644
>> --- a/board/kontron/pitx-imx8m/genimage.cfg
>> +++ b/board/kontron/pitx-imx8m/genimage.cfg
>> @@ -5,7 +5,7 @@ image sdcard.img {
>>        partition imx-boot {
>>                in-partition-table = "no"
>>                image = "imx8-boot-sd.bin"
>> -               offset = 33k
>> +               offset = 33K
>>        }
>> 
>>        partition rootfs {
>> --
>> 2.25.1
> 
> Acked-by: Heiko Thiery <heiko.thiery@gmail.com>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: fix option suffix
  2021-11-08 23:05 ` [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: " Giulio Benetti
@ 2021-11-09  8:04   ` Michael Walle
  2021-11-09  8:26     ` Edgar Bonet
                       ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Michael Walle @ 2021-11-09  8:04 UTC (permalink / raw)
  To: Giulio Benetti
  Cc: Jagan Teki, Michał Łyszczek, buildroot, Luca Ceresoli,
	Heiko Thiery, Yann E . MORIN

Am 2021-11-09 00:05, schrieb Giulio Benetti:
> Option 'offset = 4k' must be 'option = 4K'.

Why is this is a 'must'? Apparently it works, no? So if anything
it is for unifying; but even then it's moving in the wrong
direction. There is no "K" prefix in si units. Stictly speaking
there is no "KB"; there is a "kB" or a "KiB".

Anyway. I'll let the buildroot maintainers decide on this.

-michael
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: fix option suffix
  2021-11-09  8:04   ` Michael Walle
@ 2021-11-09  8:26     ` Edgar Bonet
  2021-11-09  8:49       ` Giulio Benetti
  2021-11-09  8:38     ` Giulio Benetti
  2021-11-09  8:50     ` Yann E. MORIN
  2 siblings, 1 reply; 19+ messages in thread
From: Edgar Bonet @ 2021-11-09  8:26 UTC (permalink / raw)
  To: buildroot

Hello!

Michael Walle wrote:
> There is no "K" prefix in si units. Stictly speaking there is no "KB";
> there is a "kB" or a "KiB".

Although not a de jure standard, quite a few Linux tools have adopted
the following convention:

    1 KB = 1000 B (i.e. 1 kB)
    1 K  = 1024 B (i.e. 1 KiB)

Here is an excerpt from man losetup:

    The  size  and  offset  arguments may be followed by the
    multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on
    for  GiB,  TiB,  PiB, EiB,  ZiB and YiB (the "iB" is optional,
    e.g., "K" has the same meaning as "KiB") or the suffixes KB
    (=1000), MB (=1000*1000), and  so  on  for GB, TB, PB, EB, ZB
    and YB.

Given that this is a common Linux convention, "offset = 4K" makes it
clearer that these are KiB ("offset = 4KiB" would be still clearer if
supported).

Regards,

Edgar.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: fix option suffix
  2021-11-09  8:04   ` Michael Walle
  2021-11-09  8:26     ` Edgar Bonet
@ 2021-11-09  8:38     ` Giulio Benetti
  2021-11-09  8:50       ` Michael Walle
  2021-11-09  8:50     ` Yann E. MORIN
  2 siblings, 1 reply; 19+ messages in thread
From: Giulio Benetti @ 2021-11-09  8:38 UTC (permalink / raw)
  To: Michael Walle
  Cc: Jagan Teki, Michał Łyszczek, buildroot, Luca Ceresoli,
	Heiko Thiery, Yann E . MORIN


[-- Attachment #1.1: Type: text/plain, Size: 1426 bytes --]

Hi Michael, All,

> Il giorno 9 nov 2021, alle ore 09:05, Michael Walle <michael@walle.cc> ha scritto:
> 
> Am 2021-11-09 00:05, schrieb Giulio Benetti:
>> Option 'offset = 4k' must be 'option = 4K'.
> 
> Why is this is a 'must'? Apparently it works, no?

This is a standard I’ve proposed and it’s been accepted by committing all the 102 patches.
There is not an existing standard and I’ve created one, that’s all.

> So if anything
> it is for unifying; but even then it's moving in the wrong
> direction. There is no "K" prefix in si units. Stictly speaking
> there is no "KB"; there is a "kB" or a "KiB".

Here we had 2 choices using genimage “K” or “k”. I went for “K” since the most of the files had “K”.
And anyway both “K” and “k” are not that good, but it’s not our fault, it depends on genimage input format.

Yann already explained the differences between notations here:
https://lists.buildroot.org/pipermail/buildroot/2021-November/627885.html

You can follow-up the thread and the motivations on such thing.

Feel free to propose a modification on this topic since it’s “fresh”. I have to integrate a bit the manual and write a Linter for this kind of files so it’s better I know it early.

Thank you
Best regards
Giulio Benetti
Benetti Engineering sas

> 
> Anyway. I'll let the buildroot maintainers decide on this.
> 
> -michael

[-- Attachment #1.2: Type: text/html, Size: 2252 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: fix option suffix
  2021-11-09  8:26     ` Edgar Bonet
@ 2021-11-09  8:49       ` Giulio Benetti
  0 siblings, 0 replies; 19+ messages in thread
From: Giulio Benetti @ 2021-11-09  8:49 UTC (permalink / raw)
  To: Edgar Bonet, buildroot

Hi Edgar,

On 11/9/21 9:26 AM, Edgar Bonet wrote:
> Hello!
> 
> Michael Walle wrote:
>> There is no "K" prefix in si units. Stictly speaking there is no "KB";
>> there is a "kB" or a "KiB".
> 
> Although not a de jure standard, quite a few Linux tools have adopted
> the following convention:
> 
>      1 KB = 1000 B (i.e. 1 kB)
>      1 K  = 1024 B (i.e. 1 KiB)

+1

> Here is an excerpt from man losetup:
> 
>      The  size  and  offset  arguments may be followed by the
>      multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on
>      for  GiB,  TiB,  PiB, EiB,  ZiB and YiB (the "iB" is optional,
>      e.g., "K" has the same meaning as "KiB") or the suffixes KB
>      (=1000), MB (=1000*1000), and  so  on  for GB, TB, PB, EB, ZB
>      and YB.

This is a good description

> Given that this is a common Linux convention, "offset = 4K" makes it
> clearer that these are KiB ("offset = 4KiB" would be still clearer if
> supported).

Thank you
Best regards
-- 
Giulio Benetti
Benetti Engineering sas

> Regards,
> 
> Edgar.
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: fix option suffix
  2021-11-09  8:38     ` Giulio Benetti
@ 2021-11-09  8:50       ` Michael Walle
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Walle @ 2021-11-09  8:50 UTC (permalink / raw)
  To: Giulio Benetti
  Cc: Jagan Teki, Michał Łyszczek, buildroot, Luca Ceresoli,
	Heiko Thiery, Yann E . MORIN

Am 2021-11-09 09:38, schrieb Giulio Benetti:
> Hi Michael, All,
> 
>> Il giorno 9 nov 2021, alle ore 09:05, Michael Walle
>> <michael@walle.cc> ha scritto:
> 
>> Am 2021-11-09 00:05, schrieb Giulio Benetti:
>> 
>>> Option 'offset = 4k' must be 'option = 4K'.
>> 
>> Why is this is a 'must'? Apparently it works, no?
> 
> This is a standard I’ve proposed and it’s been accepted by
> committing all the 102 patches.
> There is not an existing standard and I’ve created one, that’s
> all.
> 
>> So if anything
>> it is for unifying; but even then it's moving in the wrong
>> direction. There is no "K" prefix in si units. Stictly speaking
>> there is no "KB"; there is a "kB" or a "KiB".
> 
> Here we had 2 choices using genimage “K” or “k”. I went for
> “K” since the most of the files had “K”.
> And anyway both “K” and “k” are not that good, but it’s not
> our fault, it depends on genimage input format.
> 
> Yann already explained the differences between notations here:
> https://lists.buildroot.org/pipermail/buildroot/2021-November/627885.html
> 
> You can follow-up the thread and the motivations on such thing.

Thanks for the pointer, but I won't make a fuzz. I'm fine with
the change.

-michael
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: fix option suffix
  2021-11-09  8:04   ` Michael Walle
  2021-11-09  8:26     ` Edgar Bonet
  2021-11-09  8:38     ` Giulio Benetti
@ 2021-11-09  8:50     ` Yann E. MORIN
  2021-11-09  9:23       ` Arnout Vandecappelle
  2 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2021-11-09  8:50 UTC (permalink / raw)
  To: Michael Walle
  Cc: Jagan Teki, Michał Łyszczek, buildroot, Luca Ceresoli,
	Heiko Thiery, Giulio Benetti

Michael, All,

On 2021-11-09 09:04 +0100, Michael Walle spake thusly:
> Am 2021-11-09 00:05, schrieb Giulio Benetti:
> >Option 'offset = 4k' must be 'option = 4K'.
> Why is this is a 'must'? Apparently it works, no? So if anything
> it is for unifying; but even then it's moving in the wrong
> direction. There is no "K" prefix in si units. Stictly speaking
> there is no "KB"; there is a "kB" or a "KiB".

This SI reference was also my comment on the preceding series, but
unfortunately, that ship has sailed now that the series has been
applied...

Regards,
Yann E. MORIN.

> Anyway. I'll let the buildroot maintainers decide on this.
> 
> -michael

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/7] board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to wrong offset value suffix
  2021-11-08 23:05 ` [Buildroot] [PATCH 1/7] board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to wrong offset value suffix Giulio Benetti
@ 2021-11-09  9:01   ` Luca Ceresoli
  2021-11-09  9:16     ` Giulio Benetti
  0 siblings, 1 reply; 19+ messages in thread
From: Luca Ceresoli @ 2021-11-09  9:01 UTC (permalink / raw)
  To: Giulio Benetti, buildroot
  Cc: Michael Walle, Jagan Teki, Michał Łyszczek,
	Heiko Thiery, Yann E . MORIN

Hi Giulio.

On 09/11/21 00:05, Giulio Benetti wrote:
> With commit[1] I've introduced a bug:
             ^^^
Which commit? :)

> offset = 8KB(not valid for genimage)
> and this prevents genimage to work, so let's substitute 8KB with 8K.

I wanted to test this patch, but the build succeeds on current master.
How do you detect the wrong behaviour?

-- 
Luca
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/7] board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to wrong offset value suffix
  2021-11-09  9:01   ` Luca Ceresoli
@ 2021-11-09  9:16     ` Giulio Benetti
  0 siblings, 0 replies; 19+ messages in thread
From: Giulio Benetti @ 2021-11-09  9:16 UTC (permalink / raw)
  To: Luca Ceresoli, buildroot
  Cc: Yann E . MORIN, Michael Walle, Jagan Teki,
	Michał Łyszczek, Heiko Thiery

Hi Luca,

On 11/9/21 10:01 AM, Luca Ceresoli wrote:
> Hi Giulio.
> 
> On 09/11/21 00:05, Giulio Benetti wrote:
>> With commit[1] I've introduced a bug:
>               ^^^
> Which commit? :)

I've forgotten, thank you for pointing, I've just reworded for v2 series.

This is the commit:
https://gitlab.com/buildroot.org/buildroot/-/commit/43bfa1cf1046b0e44e87a02bc5a358bf1de5bfdd

>> offset = 8KB(not valid for genimage)
>> and this prevents genimage to work, so let's substitute 8KB with 8K.
> 
> I wanted to test this patch, but the build succeeds on current master.
> How do you detect the wrong behaviour?

I've supposed genimage parser was stronger but I've just found as you've 
found that it builds even if it shouldn't. Genimage only checks the 
first letter of suffix, so if you try to modify that offset to:
offset = 8KDEADBEEF
it will build with offset at 8K.

So I reword by adding commit URL and changing from "fix build 
failure..." to "offset value must be...".


Thank you for checking!
Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: fix option suffix
  2021-11-09  8:50     ` Yann E. MORIN
@ 2021-11-09  9:23       ` Arnout Vandecappelle
  0 siblings, 0 replies; 19+ messages in thread
From: Arnout Vandecappelle @ 2021-11-09  9:23 UTC (permalink / raw)
  To: Yann E. MORIN, Michael Walle
  Cc: Jagan Teki, Michał Łyszczek, buildroot, Luca Ceresoli,
	Heiko Thiery, Giulio Benetti



On 09/11/2021 09:50, Yann E. MORIN wrote:
> Michael, All,
> 
> On 2021-11-09 09:04 +0100, Michael Walle spake thusly:
>> Am 2021-11-09 00:05, schrieb Giulio Benetti:
>>> Option 'offset = 4k' must be 'option = 4K'.
>> Why is this is a 'must'? Apparently it works, no? So if anything
>> it is for unifying; but even then it's moving in the wrong
>> direction. There is no "K" prefix in si units. Stictly speaking
>> there is no "KB"; there is a "kB" or a "KiB".
> 
> This SI reference was also my comment on the preceding series, but
> unfortunately, that ship has sailed now that the series has been
> applied...

  What has been applied is uppercase K everywhere. Lowercase k looks like a SI 
unit, i.e. 1000, so I think uppercase is a little better. To be fully correct, 
we should use KiB instead (which apparently works since genimage apparently 
ignores everything after the first letter). But as you say, that ship has sailed...

  Anyway, this stuff is never going to be fully accurate, so anything is OK in 
my book, as long as it's consistent.

  Regards,
  Arnout
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-11-09  9:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 23:05 [Buildroot] [PATCH 0/7] Post genimage.cfg beautify Giulio Benetti
2021-11-08 23:05 ` [Buildroot] [PATCH 1/7] board/olimex/a20_olinuxino/genimage.cfg: fix build failure due to wrong offset value suffix Giulio Benetti
2021-11-09  9:01   ` Luca Ceresoli
2021-11-09  9:16     ` Giulio Benetti
2021-11-08 23:05 ` [Buildroot] [PATCH 2/7] board/altera/socrates_cyclone5/genimage.cfg: fix offset suffix Giulio Benetti
2021-11-08 23:05 ` [Buildroot] [PATCH 3/7] board/friendlyarm/nanopi-neo2/genimage.cfg: fix comment Giulio Benetti
2021-11-08 23:05 ` [Buildroot] [PATCH 4/7] board/orangepi/orangepi-pc2/genimage.cfg: " Giulio Benetti
2021-11-08 23:05 ` [Buildroot] [PATCH 5/7] board/minnowboard/genimage.cfg: fix option assignment spaces Giulio Benetti
2021-11-08 23:05 ` [Buildroot] [PATCH 6/7] board/kontron/pitx-imx8m/genimage.cfg: fix option suffix Giulio Benetti
2021-11-09  7:37   ` Heiko Thiery
2021-11-09  7:49     ` Giulio Benetti
2021-11-08 23:05 ` [Buildroot] [PATCH 7/7] board/kontron/smarc-sal28/genimage.cfg: " Giulio Benetti
2021-11-09  8:04   ` Michael Walle
2021-11-09  8:26     ` Edgar Bonet
2021-11-09  8:49       ` Giulio Benetti
2021-11-09  8:38     ` Giulio Benetti
2021-11-09  8:50       ` Michael Walle
2021-11-09  8:50     ` Yann E. MORIN
2021-11-09  9:23       ` Arnout Vandecappelle

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.