* [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation @ 2023-08-08 16:08 Jose Quaresma 2023-08-08 16:08 ` [OE-core][PATCH 2/2] systemd: fix efi stubs Jose Quaresma 2023-08-08 17:05 ` [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation Khem Raj 0 siblings, 2 replies; 11+ messages in thread From: Jose Quaresma @ 2023-08-08 16:08 UTC (permalink / raw) To: openembedded-core; +Cc: Jose Quaresma Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> --- meta/recipes-core/systemd/systemd-boot_254.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb b/meta/recipes-core/systemd/systemd-boot_254.bb index 5d69cf83ab..b91bbfe485 100644 --- a/meta/recipes-core/systemd/systemd-boot_254.bb +++ b/meta/recipes-core/systemd/systemd-boot_254.bb @@ -53,7 +53,7 @@ COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux" COMPATIBLE_HOST:x86-x32 = "null" do_compile() { - ninja systemd-boot + ninja -v systemd-boot } do_install() { -- 2.34.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OE-core][PATCH 2/2] systemd: fix efi stubs 2023-08-08 16:08 [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation Jose Quaresma @ 2023-08-08 16:08 ` Jose Quaresma 2023-08-08 16:29 ` Alexandre Belloni 2023-08-08 17:05 ` [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation Khem Raj 1 sibling, 1 reply; 11+ messages in thread From: Jose Quaresma @ 2023-08-08 16:08 UTC (permalink / raw) To: openembedded-core; +Cc: Jose Quaresma Before the patch: | $ objdump -h deploy/images/intel-corei7-64/linuxx64.efi.stub | objdump: deploy/images/intel-corei7-64/linuxx64.efi.stub (.reloc): section flag STYP_GROUP (0x4) ignored | objdump: deploy/images/intel-corei7-64/linuxx64.efi.stub (.reloc): section flag STYP_GROUP (0x4) ignored | objdump: deploy/images/intel-corei7-64/linuxx64.efi.stub: file format not recognized After the patch: | $objdump -h deploy/images/intel-corei7-64/linuxx64.efi.stub | | deploy/images/intel-corei7-64/linuxx64.efi.stub: file format pei-x86-64 | | Sections: | Idx Name Size VMA LMA File off Algn | 0 .text 0000f99f 000000014df91000 000000014df91000 00000400 2**4 | CONTENTS, ALLOC, LOAD, READONLY, CODE | 1 .rodata 00002c40 000000014dfa1000 000000014dfa1000 0000fe00 2**2 | CONTENTS, ALLOC, LOAD, READONLY, DATA | 2 .data 000002d8 000000014dfa4000 000000014dfa4000 00012c00 2**4 | CONTENTS, ALLOC, LOAD, DATA | 3 .sdmagic 00000032 000000014dfa5000 000000014dfa5000 00013000 2**2 | CONTENTS, ALLOC, LOAD, READONLY, DATA | 4 .reloc 00000080 000000014dfa6000 000000014dfa6000 00013200 2**2 | CONTENTS, ALLOC, LOAD, READONLY, DATA Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> --- meta/recipes-core/systemd/systemd.inc | 1 + ...-elf2efi-Fix-header-size-calculation.patch | 70 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index b00a49884b..e5686fbe44 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc @@ -17,6 +17,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ SRCREV = "994c7978608a0bd9b317f4f74ff266dd50a3e74e" SRCBRANCH = "v254-stable" SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ + file://0001-elf2efi-Fix-header-size-calculation.patch \ " S = "${WORKDIR}/git" diff --git a/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch b/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch new file mode 100644 index 0000000000..0e8924d27d --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch @@ -0,0 +1,70 @@ +From d082d6502fa86e08dda858933838dde0406b824f Mon Sep 17 00:00:00 2001 +From: Jan Janssen <medhefgo@web.de> +Date: Sun, 30 Jul 2023 20:59:04 +0200 +Subject: [PATCH] elf2efi: Fix header size calculation + +The PE header size calculation failed to take the PE magic and coff +header size into account, which will lead to header truncation if we are +writing only 5 sections. + +Upstream-Status: Backport [https://github.com/systemd/systemd/commit/ee91e06a5841c30bc7306260528ef407e0ebbab3] + +Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> +--- + tools/elf2efi.py | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/tools/elf2efi.py b/tools/elf2efi.py +index e233c8e3ab..2e478940f5 100755 +--- a/tools/elf2efi.py ++++ b/tools/elf2efi.py +@@ -210,6 +210,7 @@ FILE_ALIGNMENT = 512 + + # Nobody cares about DOS headers, so put the PE header right after. + PE_OFFSET = 64 ++PE_MAGIC = b"PE\0\0" + + + def align_to(x: int, align: int) -> int: +@@ -304,7 +305,10 @@ def copy_sections(elf: ELFFile, opt: PeOptionalHeader) -> typing.List[PeSection] + + + def apply_elf_relative_relocation( +- reloc: ElfRelocation, image_base: int, sections: typing.List[PeSection], addend_size: int ++ reloc: ElfRelocation, ++ image_base: int, ++ sections: typing.List[PeSection], ++ addend_size: int, + ): + # fmt: off + [target] = [ +@@ -439,7 +443,7 @@ def write_pe( + file.seek(0x3C, io.SEEK_SET) + file.write(PE_OFFSET.to_bytes(2, byteorder="little")) + file.seek(PE_OFFSET, io.SEEK_SET) +- file.write(b"PE\0\0") ++ file.write(PE_MAGIC) + file.write(coff) + file.write(opt) + +@@ -453,6 +457,8 @@ def write_pe( + file.write(pe_s) + offset = align_to(offset + len(pe_s.data), FILE_ALIGNMENT) + ++ assert file.tell() <= opt.SizeOfHeaders ++ + for pe_s in sections: + file.seek(pe_s.PointerToRawData, io.SEEK_SET) + file.write(pe_s.data) +@@ -515,6 +521,8 @@ def elf2efi(args: argparse.Namespace): + + opt.SizeOfHeaders = align_to( + PE_OFFSET ++ + len(PE_MAGIC) ++ + sizeof(PeCoffHeader) + + coff.SizeOfOptionalHeader + + sizeof(PeSection) * max(coff.NumberOfSections, args.minimum_sections), + FILE_ALIGNMENT, +-- +2.34.1 + -- 2.34.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 2/2] systemd: fix efi stubs 2023-08-08 16:08 ` [OE-core][PATCH 2/2] systemd: fix efi stubs Jose Quaresma @ 2023-08-08 16:29 ` Alexandre Belloni 0 siblings, 0 replies; 11+ messages in thread From: Alexandre Belloni @ 2023-08-08 16:29 UTC (permalink / raw) To: Jose Quaresma; +Cc: openembedded-core, Jose Quaresma On 08/08/2023 16:08:28+0000, Jose Quaresma wrote: > Before the patch: > > | $ objdump -h deploy/images/intel-corei7-64/linuxx64.efi.stub > | objdump: deploy/images/intel-corei7-64/linuxx64.efi.stub (.reloc): section flag STYP_GROUP (0x4) ignored > | objdump: deploy/images/intel-corei7-64/linuxx64.efi.stub (.reloc): section flag STYP_GROUP (0x4) ignored > | objdump: deploy/images/intel-corei7-64/linuxx64.efi.stub: file format not recognized > > After the patch: > > | $objdump -h deploy/images/intel-corei7-64/linuxx64.efi.stub > | > | deploy/images/intel-corei7-64/linuxx64.efi.stub: file format pei-x86-64 > | > | Sections: > | Idx Name Size VMA LMA File off Algn > | 0 .text 0000f99f 000000014df91000 000000014df91000 00000400 2**4 > | CONTENTS, ALLOC, LOAD, READONLY, CODE > | 1 .rodata 00002c40 000000014dfa1000 000000014dfa1000 0000fe00 2**2 > | CONTENTS, ALLOC, LOAD, READONLY, DATA > | 2 .data 000002d8 000000014dfa4000 000000014dfa4000 00012c00 2**4 > | CONTENTS, ALLOC, LOAD, DATA > | 3 .sdmagic 00000032 000000014dfa5000 000000014dfa5000 00013000 2**2 > | CONTENTS, ALLOC, LOAD, READONLY, DATA > | 4 .reloc 00000080 000000014dfa6000 000000014dfa6000 00013200 2**2 > | CONTENTS, ALLOC, LOAD, READONLY, DATA > > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> > --- > meta/recipes-core/systemd/systemd.inc | 1 + > ...-elf2efi-Fix-header-size-calculation.patch | 70 +++++++++++++++++++ > 2 files changed, 71 insertions(+) > create mode 100644 meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch > > diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc > index b00a49884b..e5686fbe44 100644 > --- a/meta/recipes-core/systemd/systemd.inc > +++ b/meta/recipes-core/systemd/systemd.inc > @@ -17,6 +17,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ > SRCREV = "994c7978608a0bd9b317f4f74ff266dd50a3e74e" > SRCBRANCH = "v254-stable" > SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ > + file://0001-elf2efi-Fix-header-size-calculation.patch \ Yes, this is exactly what Ross pointed to me and I had locally, I've put this through the autobuilders now. > " > > S = "${WORKDIR}/git" > diff --git a/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch b/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch > new file mode 100644 > index 0000000000..0e8924d27d > --- /dev/null > +++ b/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch > @@ -0,0 +1,70 @@ > +From d082d6502fa86e08dda858933838dde0406b824f Mon Sep 17 00:00:00 2001 > +From: Jan Janssen <medhefgo@web.de> > +Date: Sun, 30 Jul 2023 20:59:04 +0200 > +Subject: [PATCH] elf2efi: Fix header size calculation > + > +The PE header size calculation failed to take the PE magic and coff > +header size into account, which will lead to header truncation if we are > +writing only 5 sections. > + > +Upstream-Status: Backport [https://github.com/systemd/systemd/commit/ee91e06a5841c30bc7306260528ef407e0ebbab3] > + > +Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> > +--- > + tools/elf2efi.py | 12 ++++++++++-- > + 1 file changed, 10 insertions(+), 2 deletions(-) > + > +diff --git a/tools/elf2efi.py b/tools/elf2efi.py > +index e233c8e3ab..2e478940f5 100755 > +--- a/tools/elf2efi.py > ++++ b/tools/elf2efi.py > +@@ -210,6 +210,7 @@ FILE_ALIGNMENT = 512 > + > + # Nobody cares about DOS headers, so put the PE header right after. > + PE_OFFSET = 64 > ++PE_MAGIC = b"PE\0\0" > + > + > + def align_to(x: int, align: int) -> int: > +@@ -304,7 +305,10 @@ def copy_sections(elf: ELFFile, opt: PeOptionalHeader) -> typing.List[PeSection] > + > + > + def apply_elf_relative_relocation( > +- reloc: ElfRelocation, image_base: int, sections: typing.List[PeSection], addend_size: int > ++ reloc: ElfRelocation, > ++ image_base: int, > ++ sections: typing.List[PeSection], > ++ addend_size: int, > + ): > + # fmt: off > + [target] = [ > +@@ -439,7 +443,7 @@ def write_pe( > + file.seek(0x3C, io.SEEK_SET) > + file.write(PE_OFFSET.to_bytes(2, byteorder="little")) > + file.seek(PE_OFFSET, io.SEEK_SET) > +- file.write(b"PE\0\0") > ++ file.write(PE_MAGIC) > + file.write(coff) > + file.write(opt) > + > +@@ -453,6 +457,8 @@ def write_pe( > + file.write(pe_s) > + offset = align_to(offset + len(pe_s.data), FILE_ALIGNMENT) > + > ++ assert file.tell() <= opt.SizeOfHeaders > ++ > + for pe_s in sections: > + file.seek(pe_s.PointerToRawData, io.SEEK_SET) > + file.write(pe_s.data) > +@@ -515,6 +521,8 @@ def elf2efi(args: argparse.Namespace): > + > + opt.SizeOfHeaders = align_to( > + PE_OFFSET > ++ + len(PE_MAGIC) > ++ + sizeof(PeCoffHeader) > + + coff.SizeOfOptionalHeader > + + sizeof(PeSection) * max(coff.NumberOfSections, args.minimum_sections), > + FILE_ALIGNMENT, > +-- > +2.34.1 > + > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#185666): https://lists.openembedded.org/g/openembedded-core/message/185666 > Mute This Topic: https://lists.openembedded.org/mt/100625046/3617179 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com] > -=-=-=-=-=-=-=-=-=-=-=- > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation 2023-08-08 16:08 [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation Jose Quaresma 2023-08-08 16:08 ` [OE-core][PATCH 2/2] systemd: fix efi stubs Jose Quaresma @ 2023-08-08 17:05 ` Khem Raj 2023-08-08 23:00 ` Jose Quaresma 1 sibling, 1 reply; 11+ messages in thread From: Khem Raj @ 2023-08-08 17:05 UTC (permalink / raw) To: Jose Quaresma; +Cc: openembedded-core, Jose Quaresma On Tue, Aug 8, 2023 at 9:08 AM Jose Quaresma <quaresma.jose@gmail.com> wrote: > > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> > --- > meta/recipes-core/systemd/systemd-boot_254.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb b/meta/recipes-core/systemd/systemd-boot_254.bb > index 5d69cf83ab..b91bbfe485 100644 > --- a/meta/recipes-core/systemd/systemd-boot_254.bb > +++ b/meta/recipes-core/systemd/systemd-boot_254.bb > @@ -53,7 +53,7 @@ COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux" > COMPATIBLE_HOST:x86-x32 = "null" > > do_compile() { > - ninja systemd-boot > + ninja -v systemd-boot I think this is only useful during debugging. So perhaps a comment to enable it is better than enabling it always. > } > > do_install() { > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#185665): https://lists.openembedded.org/g/openembedded-core/message/185665 > Mute This Topic: https://lists.openembedded.org/mt/100625045/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation 2023-08-08 17:05 ` [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation Khem Raj @ 2023-08-08 23:00 ` Jose Quaresma 2023-08-08 23:06 ` Khem Raj 0 siblings, 1 reply; 11+ messages in thread From: Jose Quaresma @ 2023-08-08 23:00 UTC (permalink / raw) To: Khem Raj; +Cc: openembedded-core, Jose Quaresma [-- Attachment #1: Type: text/plain, Size: 1769 bytes --] Khem Raj <raj.khem@gmail.com> escreveu no dia terça, 8/08/2023 à(s) 18:05: > On Tue, Aug 8, 2023 at 9:08 AM Jose Quaresma <quaresma.jose@gmail.com> > wrote: > > > > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> > > --- > > meta/recipes-core/systemd/systemd-boot_254.bb | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb > b/meta/recipes-core/systemd/systemd-boot_254.bb > > index 5d69cf83ab..b91bbfe485 100644 > > --- a/meta/recipes-core/systemd/systemd-boot_254.bb > > +++ b/meta/recipes-core/systemd/systemd-boot_254.bb > > @@ -53,7 +53,7 @@ COMPATIBLE_HOST = > "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux" > > COMPATIBLE_HOST:x86-x32 = "null" > > > > do_compile() { > > - ninja systemd-boot > > + ninja -v systemd-boot > > I think this is only useful during debugging. So perhaps a comment to > enable it is better than enabling it always. > The meson bbclass also compile with verbose so in my opinion it is better to do the same and make it consistent with the main systemd recipe meson_do_compile() { meson compile -v ${PARALLEL_MAKE} } Jose > > } > > > > do_install() { > > -- > > 2.34.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#185665): > https://lists.openembedded.org/g/openembedded-core/message/185665 > > Mute This Topic: https://lists.openembedded.org/mt/100625045/1997914 > > Group Owner: openembedded-core+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > raj.khem@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > > -- Best regards, José Quaresma [-- Attachment #2: Type: text/html, Size: 3583 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation 2023-08-08 23:00 ` Jose Quaresma @ 2023-08-08 23:06 ` Khem Raj 2023-08-09 6:47 ` Alexander Kanavin 0 siblings, 1 reply; 11+ messages in thread From: Khem Raj @ 2023-08-08 23:06 UTC (permalink / raw) To: Jose Quaresma; +Cc: Jose Quaresma, openembedded-core [-- Attachment #1: Type: text/plain, Size: 2119 bytes --] On Tue, Aug 8, 2023 at 4:00 PM Jose Quaresma <quaresma.jose@gmail.com> wrote: > > > Khem Raj <raj.khem@gmail.com> escreveu no dia terça, 8/08/2023 à(s) 18:05: > >> On Tue, Aug 8, 2023 at 9:08 AM Jose Quaresma <quaresma.jose@gmail.com> >> wrote: >> > >> > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> >> > --- >> > meta/recipes-core/systemd/systemd-boot_254.bb | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb >> b/meta/recipes-core/systemd/systemd-boot_254.bb >> > index 5d69cf83ab..b91bbfe485 100644 >> > --- a/meta/recipes-core/systemd/systemd-boot_254.bb >> > +++ b/meta/recipes-core/systemd/systemd-boot_254.bb >> > @@ -53,7 +53,7 @@ COMPATIBLE_HOST = >> "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux" >> > COMPATIBLE_HOST:x86-x32 = "null" >> > >> > do_compile() { >> > - ninja systemd-boot >> > + ninja -v systemd-boot >> >> I think this is only useful during debugging. So perhaps a comment to >> enable it is better than enabling it always. >> > > The meson bbclass also compile with verbose so in my opinion it is better > to do the same > and make it consistent with the main systemd recipe > > meson_do_compile() { > meson compile -v ${PARALLEL_MAKE} > } > Ideally we only want the verbosity when something goes wrong and meson ninja etc are good at that with their defaults perhaps that -v should be turned off by default as well > > > Jose > > >> > } >> > >> > do_install() { >> > -- >> > 2.34.1 >> > >> > >> > -=-=-=-=-=-=-=-=-=-=-=- >> > Links: You receive all messages sent to this group. >> > View/Reply Online (#185665): >> https://lists.openembedded.org/g/openembedded-core/message/185665 >> > Mute This Topic: https://lists.openembedded.org/mt/100625045/1997914 >> > Group Owner: openembedded-core+owner@lists.openembedded.org >> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ >> raj.khem@gmail.com] >> > -=-=-=-=-=-=-=-=-=-=-=- >> > >> > > > -- > Best regards, > > José Quaresma > [-- Attachment #2: Type: text/html, Size: 4371 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation 2023-08-08 23:06 ` Khem Raj @ 2023-08-09 6:47 ` Alexander Kanavin 2023-08-09 9:24 ` Mikko Rapeli 2023-08-09 14:49 ` Ross Burton 0 siblings, 2 replies; 11+ messages in thread From: Alexander Kanavin @ 2023-08-09 6:47 UTC (permalink / raw) To: Khem Raj; +Cc: Jose Quaresma, Jose Quaresma, openembedded-core On Wed, 9 Aug 2023 at 01:06, Khem Raj <raj.khem@gmail.com> wrote: >>> I think this is only useful during debugging. So perhaps a comment to >>> enable it is better than enabling it always. >> >> >> The meson bbclass also compile with verbose so in my opinion it is better to do the same >> and make it consistent with the main systemd recipe >> >> meson_do_compile() { >> meson compile -v ${PARALLEL_MAKE} >> } > > > Ideally we only want the verbosity when something goes wrong and meson ninja etc are good at that with their defaults perhaps that -v should be turned off by default as well Absolutely not. As someone who spends a lot of time fixing build and runtime failures across all of oe-core I beg to differ. I want verbosity all the time, everywhere. I also do not want to spend a second figuring out how to switch it on (it's different everywhere too), or to run another build just to get the verbose logs out of it. Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation 2023-08-09 6:47 ` Alexander Kanavin @ 2023-08-09 9:24 ` Mikko Rapeli 2023-08-09 14:49 ` Ross Burton 1 sibling, 0 replies; 11+ messages in thread From: Mikko Rapeli @ 2023-08-09 9:24 UTC (permalink / raw) To: Alexander Kanavin Cc: Khem Raj, Jose Quaresma, Jose Quaresma, openembedded-core Hi, On Wed, Aug 09, 2023 at 08:47:05AM +0200, Alexander Kanavin wrote: > On Wed, 9 Aug 2023 at 01:06, Khem Raj <raj.khem@gmail.com> wrote: > >>> I think this is only useful during debugging. So perhaps a comment to > >>> enable it is better than enabling it always. > >> > >> > >> The meson bbclass also compile with verbose so in my opinion it is better to do the same > >> and make it consistent with the main systemd recipe > >> > >> meson_do_compile() { > >> meson compile -v ${PARALLEL_MAKE} > >> } > > > > > > Ideally we only want the verbosity when something goes wrong and meson ninja etc are good at that with their defaults perhaps that -v should be turned off by default as well > > Absolutely not. As someone who spends a lot of time fixing build and > runtime failures across all of oe-core I beg to differ. I want > verbosity all the time, everywhere. I also do not want to spend a > second figuring out how to switch it on (it's different everywhere > too), or to run another build just to get the verbose logs out of it. I prefer verbose-by-default too. It is really annoying to investigate build race conditions in various CI environments without enough details in logs. Had to trigger a lot test builds because of this in the past. Same goes for testing. I know logging infra can be abused and on the limit too, but I don't think bitbake task log sizes increase that much compared to other stuff remaining in build tmp directories after builds. Cheers, -Mikko ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation 2023-08-09 6:47 ` Alexander Kanavin 2023-08-09 9:24 ` Mikko Rapeli @ 2023-08-09 14:49 ` Ross Burton 2023-08-09 15:04 ` Jose Quaresma 2023-08-09 16:03 ` Khem Raj 1 sibling, 2 replies; 11+ messages in thread From: Ross Burton @ 2023-08-09 14:49 UTC (permalink / raw) To: Jose Quaresma; +Cc: Khem Raj, Alexander Kanavin, OE-core On 9 Aug 2023, at 07:47, Alexander Kanavin via lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> wrote: >> Ideally we only want the verbosity when something goes wrong and meson ninja etc are good at that with their defaults perhaps that -v should be turned off by default as well > > Absolutely not. As someone who spends a lot of time fixing build and > runtime failures across all of oe-core I beg to differ. I want > verbosity all the time, everywhere. I also do not want to spend a > second figuring out how to switch it on (it's different everywhere > too), or to run another build just to get the verbose logs out of it. Agreed with Alex. Unless Ninja is clever enough to emit the full log for _every_ build step that was involved in the failure, I definitely always want verbose logs. For what it’s worth this made me look at the recipe to see why it has to define do_compile, and I ended up extending meson.bbclass making this patch redundant. Ross ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation 2023-08-09 14:49 ` Ross Burton @ 2023-08-09 15:04 ` Jose Quaresma 2023-08-09 16:03 ` Khem Raj 1 sibling, 0 replies; 11+ messages in thread From: Jose Quaresma @ 2023-08-09 15:04 UTC (permalink / raw) To: Ross Burton; +Cc: Khem Raj, Alexander Kanavin, OE-core [-- Attachment #1: Type: text/plain, Size: 1395 bytes --] Ross Burton <Ross.Burton@arm.com> escreveu no dia quarta, 9/08/2023 à(s) 15:49: > On 9 Aug 2023, at 07:47, Alexander Kanavin via lists.openembedded.org > <alex.kanavin=gmail.com@lists.openembedded.org> wrote: > >> Ideally we only want the verbosity when something goes wrong and meson > ninja etc are good at that with their defaults perhaps that -v should be > turned off by default as well > > > > Absolutely not. As someone who spends a lot of time fixing build and > > runtime failures across all of oe-core I beg to differ. I want > > verbosity all the time, everywhere. I also do not want to spend a > > second figuring out how to switch it on (it's different everywhere > > too), or to run another build just to get the verbose logs out of it. > > Agreed with Alex. > > Unless Ninja is clever enough to emit the full log for _every_ build step > that was involved in the failure, I definitely always want verbose logs. > > For what it’s worth this made me look at the recipe to see why it has to > define do_compile, and I ended up extending meson.bbclass making this patch > redundant. > > Ross I also prefer to have the verbose enabled everywhere so the bitbake logs have more details when debug is needed. The Ross patch includes everything we need, thanks for looking at that. Please drop this one. Jose -- Best regards, José Quaresma [-- Attachment #2: Type: text/html, Size: 2055 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation 2023-08-09 14:49 ` Ross Burton 2023-08-09 15:04 ` Jose Quaresma @ 2023-08-09 16:03 ` Khem Raj 1 sibling, 0 replies; 11+ messages in thread From: Khem Raj @ 2023-08-09 16:03 UTC (permalink / raw) To: Ross Burton; +Cc: Jose Quaresma, Alexander Kanavin, OE-core On Wed, Aug 9, 2023 at 7:49 AM Ross Burton <Ross.Burton@arm.com> wrote: > > On 9 Aug 2023, at 07:47, Alexander Kanavin via lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> wrote: > >> Ideally we only want the verbosity when something goes wrong and meson ninja etc are good at that with their defaults perhaps that -v should be turned off by default as well > > > > Absolutely not. As someone who spends a lot of time fixing build and > > runtime failures across all of oe-core I beg to differ. I want > > verbosity all the time, everywhere. I also do not want to spend a > > second figuring out how to switch it on (it's different everywhere > > too), or to run another build just to get the verbose logs out of it. > > Agreed with Alex. > > Unless Ninja is clever enough to emit the full log for _every_ build step that was involved in the failure, I definitely always want verbose logs. I found Ninja defaults are good for debugging build failures, I deal with this on large projects like chromium and clang often, Most of the time I want to get to the error quickly and have command to reproduce the one compile failure or other steps and they are emitted in full while succeeding steps are curtailed and most of the time that is what one needs to solve build issues. verbose logs for such large projects are huge, need space and time to generate them, I understand the view of people who fix build issues on daily bases, Most of the time builds succeed so its important to keep that also in consideration. Perhaps it could be a global option which could be default verbose and opted-out if build modes chose to do so. > > For what it’s worth this made me look at the recipe to see why it has to define do_compile, and I ended up extending meson.bbclass making this patch redundant. Thats good. > > Ross ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-08-09 16:04 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-08-08 16:08 [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation Jose Quaresma 2023-08-08 16:08 ` [OE-core][PATCH 2/2] systemd: fix efi stubs Jose Quaresma 2023-08-08 16:29 ` Alexandre Belloni 2023-08-08 17:05 ` [OE-core][PATCH 1/2] systemd-boot: enable verbose compilation Khem Raj 2023-08-08 23:00 ` Jose Quaresma 2023-08-08 23:06 ` Khem Raj 2023-08-09 6:47 ` Alexander Kanavin 2023-08-09 9:24 ` Mikko Rapeli 2023-08-09 14:49 ` Ross Burton 2023-08-09 15:04 ` Jose Quaresma 2023-08-09 16:03 ` Khem Raj
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.