Re: [OE-core] [PATCH v8] systemd: update to v254

Khem Raj
2023-08-08T00:01:36Z

Can you try this patch on top

https://git.yoctoproject.org/poky-contrib/commit/?h=yoe/mut&id=0defb14c600170434befe8c94dad4732041a3513

On Mon, Aug 7, 2023 at 3:48 PM Luca Boccassi <luca.boccassi@gmail.com> wrote:
>
> On Mon, 7 Aug 2023 at 23:37, Alexandre Belloni
> <alexandre.belloni@bootlin.com> wrote:
> >
> > On 07/08/2023 16:40:25+0200, Alexandre Belloni wrote:
> > > Hello,
> > >
> > > I've been looking a bit more at this. there is definitively another
> > > issue here which is the first one I found:
> > >
> > > x86_64-poky-linux-objcopy: /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub: file format not recognized
> > >
> > > This is the main issue here.
> > >
> > > $ file /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub
> > > /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub: MS-DOS executable PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows
> > > $ objdump -p /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub
> > > objdump: /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub (.reloc): section flag STYP_GROUP (0x4) ignored
> > > objdump: /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub (.reloc): section flag STYP_COPY (0x10) ignored
> > > objdump: /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub: warning: ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section .reloc
> > > objdump: /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub (.reloc): section flag STYP_GROUP (0x4) ignored
> > > objdump: /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub (.reloc): section flag STYP_COPY (0x10) ignored
> > > objdump: /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub: warning: ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section .reloc
> > > objdump: /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub: file format not recognized
> > >
> > > I tested with v253.7 and I properly get:
> > >
> > > $ file /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub
> > > /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub: PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows
> > > $ ./build-st/tmp/sysroots-components/x86_64/binutils-cross-x86_64/usr/bin/x86_64-poky-linux/x86_64-poky-linux-objdump -h /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub
> > >
> > > /home/alexandre/poky/build-st/tmp/deploy/images/qemux86-64/linuxx64.efi.stub: file format pei-x86-64
> > >
> > > Sections:
> > > Idx Name Size VMA LMA File off Algn
> > > 0 .text 0000d7f0 0000000000004000 0000000000004000 00000400 2**4
> > > CONTENTS, ALLOC, LOAD, READONLY, CODE
> > > 1 .reloc 0000000c 0000000000012000 0000000000012000 0000dc00 2**2
> > > CONTENTS, ALLOC, LOAD, READONLY, DATA
> > > 2 .data 00002ab0 0000000000013000 0000000000013000 0000de00 2**4
> > > CONTENTS, ALLOC, LOAD, DATA
> > > 3 .dynamic 00000100 0000000000016000 0000000000016000 00010a00 2**2
> > > CONTENTS, ALLOC, LOAD, DATA
> > > 4 .rela 00000630 0000000000017000 0000000000017000 00010c00 2**2
> > > CONTENTS, ALLOC, LOAD, READONLY, DATA
> > > 5 .dynsym 00000018 0000000000018000 0000000000018000 00011400 2**2
> > > CONTENTS, ALLOC, LOAD, READONLY, DATA
> > > 6 .sdmagic 0000002a 000000000001a460 000000000001a460 00011600 2**2
> > > CONTENTS, ALLOC, LOAD, READONLY, DATA
> > >
> > > I really believe the recipe is not generating a working efi.stub. Can
> > > you check?
> > >
> >
> > I've built systemd-boot v254 outside of YP and it generated a proper
> > linuxx64.efi.stub. I still don't get why the recipe doesn't generate a
> > working binary.
> >
> > The issue seems to be at the linuxx64.elf.stub generation as I took the
> > one from my YP build, ran it through elf2efi.py on my PC and this didn't
> > generate a working linuxx64.efi.stub
>
> Strange - do you see a difference in compiler/linker flags? That would
> be the only thing I can think of