Post genimage.cfg beautify
v2 cover Post genimage.cfg beautify
This patchset contains other code style fixes and an integration to the Buildroot manual regarding the values suffix notation.
Best regards
Giulio Benetti
Benetti Engineering sas
Giulio Benetti (9):
board/olimex/a20_olinuxino/genimage.cfg: fix option 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 docs/manual: add allowed notations section for genimage.cfg files board/nezha/genimage.cfg: fix offset value notation
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/nezha/genimage.cfg | 2 +- board/olimex/a20_olinuxino/genimage.cfg | 2 +- board/orangepi/orangepi-pc2/genimage.cfg | 2 +- docs/manual/writing-rules.txt | 5 +++++ 9 files changed, 13 insertions(+), 8 deletions(-)
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/9 board/olimex/a20_olinuxino/genimage.cfg: fix option suffix
With commit[1] I've introduced a code style bug:
offset = 8KB
so let's substitute 8KB with 8K.
[1]: https://gitlab.com/buildroot.org/buildroot/-/commit/43bfa1cf1046b0e44e87a02bc5a358bf1de5bfdd
---V1->V2: reworded as suggested by Luca Ceresoli
--- board/olimex/a20_olinuxino/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/olimex/a20_olinuxino/genimage.cfg +1 -1
@@ -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 }
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/9 board/altera/socrates_cyclone5/genimage.cfg: fix offset suffix
In reply to Giulio BenettiFor consistency 'offset = 256k' must be 'offset = 256K'
--- board/altera/socrates_cyclone5/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/altera/socrates_cyclone5/genimage.cfg +1 -1
@@ -24,7 +24,7 @@ image uboot.img { partition uboot-full { in-partition-table = "no" image = "u-boot.img" - offset = 256k + offset = 256K } size = 1M
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/9 board/friendlyarm/nanopi-neo2/genimage.cfg: fix comment
In reply to Giulio BenettiFor consistency comment '# 1MB - 40K' must be '# 1MB - 40KB'.
--- board/friendlyarm/nanopi-neo2/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/friendlyarm/nanopi-neo2/genimage.cfg +1 -1
@@ -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 {
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 4/9 board/orangepi/orangepi-pc2/genimage.cfg: fix comment
In reply to Giulio BenettiFor consistency comment '# 1MB - 40K' must be '# 1MB - 40KB'.
--- board/orangepi/orangepi-pc2/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/orangepi/orangepi-pc2/genimage.cfg +1 -1
@@ -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 {
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 5/9 board/minnowboard/genimage.cfg: fix option assignment spaces
In reply to Giulio BenettiOption 'size=10M' must be 'size = 10M'.
--- board/minnowboard/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/minnowboard/genimage.cfg +1 -1
@@ -9,7 +9,7 @@ image efi-part.vfat { } } - size=10M + size = 10M } # Create the sdcard image, pulling in
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 6/9 board/kontron/pitx-imx8m/genimage.cfg: fix option suffix
In reply to Giulio BenettiOption 'offset = 4k' must be 'offset = 4K'.
--- board/kontron/pitx-imx8m/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/kontron/pitx-imx8m/genimage.cfg +1 -1
@@ -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 {
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 6/9] board/kontron/pitx-imx8m/genimage.cfg: fix option suffix
Sorry, I've forgotten,
Quoted 3 lines · Giulio Benetti
Option 'offset = 4k' must be 'offset = 4K'.
Signed-off-by Giulio Benetti <[email protected]>
---V1->V2:
* reworded 'option = 4K' to 'offset = 4K' as suggested by Heiko Thiery
Quoted 18 lines
--- board/kontron/pitx-imx8m/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)board/kontron/pitx-imx8m/genimage.cfg +1
-1@@ -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 {
Signature · 6 lines
Giulio Benetti Benetti Engineering sas _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 7/9 board/kontron/smarc-sal28/genimage.cfg: fix option suffix
In reply to Giulio BenettiOption 'offset = 4k' must be 'offset = 4K'.
--- board/kontron/smarc-sal28/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/kontron/smarc-sal28/genimage.cfg +1 -1
@@ -4,7 +4,7 @@ image sdcard-emmc.img { } partition rcw { - offset = 4k + offset = 4K in-partition-table = "no" image = "rcw.bin" }
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 8/9 docs/manual: add allowed notations section for genimage.cfg files
In reply to Giulio BenettiAdd allowed notations section for genimage.cfg files by specifying the accepted suffix or prefix. Note that "K" has been decided to specify KiloBytes as 1024 bytes. This has been done because in Buildroot the 90% of the cases were using "K" and not "k".
--- docs/manual/writing-rules.txt | 5 +++++ 1 file changed, 5 insertions(+)
docs/manual/writing-rules.txt +5 -0
@@ -192,6 +192,11 @@ image sdimage.img { * Filename must at least begin with genimage prefix and have the .cfg extension to be easy to recognize. +* Allowed notations for +offset+ and +size+ options are: +G+, +M+, +K+(not k). + If it's not possible to express a precise byte count with notations above + then use hexadecimal +0x+ prefix or, as last chance, the byte count. + In comments instead use +GB+, +MB+, +KB+(not kb) in place of +G+, +M+, +K+. + The +genimage.cfg+ files are the input for the genimage tool used in Buildroot to generate the final image file(i.e. sdcard.img). For further details about the _genimage_ language, refer to
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 9/9 board/nezha/genimage.cfg: fix offset value notation
In reply to Giulio BenettiOption "offset = 12288K" must be "offset = 12M" according to the new guidelines specified in Buildroot Manual with previous patch.
--- board/nezha/genimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/nezha/genimage.cfg +1 -1
@@ -19,7 +19,7 @@ image sdcard.img { partition u-boot-1 { in-partition-table = "no" image = "u-boot.toc1" - offset = 12288K + offset = 12M } partition u-boot-2 {
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 10 lines · On Tue, 9 Nov 2021 11:18:35 +0100 Giulio Benetti…
Giulio Benetti (9):
board/olimex/a20_olinuxino/genimage.cfg: fix option 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 docs/manual: add allowed notations section for genimage.cfg files board/nezha/genimage.cfg: fix offset value notation
Series applied to next, with some really minor adjustments on two patches.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot