Message ID | 20240821101322.896500-1-luca.boccassi@gmail.com |
---|---|
State | New |
Headers | show |
Series | UBUNTU: [Packaging] do not attempt to generate BTF header on armhf | expand |
luca.boccassi@gmail.com kirjoitti 21.8.2024 klo 13.13: > From: Luca Boccassi <bluca@debian.org> > > BugLink: https://bugs.launchpad.net/bugs/2050083 > > armhf does not have working BTF for now, so create an empty header file > like Debian does for now, to be dropped once that issue is fixed. > > Follow-up for 60df5eb6035b53143695d8e6a6bff62a05fd0884 > > Signed-off-by: Luca Boccassi <bluca@debian.org> > --- > debian/rules.d/2-binary-arch.mk | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk > index 792276bf8458..5486ceb672f8 100644 > --- a/debian/rules.d/2-binary-arch.mk > +++ b/debian/rules.d/2-binary-arch.mk > @@ -659,7 +659,12 @@ ifeq ($(do_tools_perf),true) > endif > mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux > $(kmake) NO_LIBTRACEEVENT=1 CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool > + # TODO: armhf does not have working BTF, so ship a stub header for now, can be removed once it's fixed > +ifneq ($(arch),armhf) > $(builddirpa)/tools/bpf/bpftool/bpftool btf dump file $(builddirpa)/vmlinux format c > $(builddirpa)/vmlinux.h > +else > + echo '#error "Kernel does not support CONFIG_DEBUG_INFO_BTF"' > $(builddirpa)/vmlinux.h > +endif > rm -f $(builddirpa)/vmlinux > ifeq ($(do_tools_x86),true) > cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE) Please amend the previous patch (which is dropped now), and protect this (and the other parts) checking for 'do_tools_bpftool' instead of hardcoding the arch here.
On Thu, 22 Aug 2024 at 14:04, Timo Aaltonen <tjaalton@ubuntu.com> wrote: > > luca.boccassi@gmail.com kirjoitti 21.8.2024 klo 13.13: > > From: Luca Boccassi <bluca@debian.org> > > > > BugLink: https://bugs.launchpad.net/bugs/2050083 > > > > armhf does not have working BTF for now, so create an empty header file > > like Debian does for now, to be dropped once that issue is fixed. > > > > Follow-up for 60df5eb6035b53143695d8e6a6bff62a05fd0884 > > > > Signed-off-by: Luca Boccassi <bluca@debian.org> > > --- > > debian/rules.d/2-binary-arch.mk | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk > > index 792276bf8458..5486ceb672f8 100644 > > --- a/debian/rules.d/2-binary-arch.mk > > +++ b/debian/rules.d/2-binary-arch.mk > > @@ -659,7 +659,12 @@ ifeq ($(do_tools_perf),true) > > endif > > mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux > > $(kmake) NO_LIBTRACEEVENT=1 CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool > > + # TODO: armhf does not have working BTF, so ship a stub header for now, can be removed once it's fixed > > +ifneq ($(arch),armhf) > > $(builddirpa)/tools/bpf/bpftool/bpftool btf dump file $(builddirpa)/vmlinux format c > $(builddirpa)/vmlinux.h > > +else > > + echo '#error "Kernel does not support CONFIG_DEBUG_INFO_BTF"' > $(builddirpa)/vmlinux.h > > +endif > > rm -f $(builddirpa)/vmlinux > > ifeq ($(do_tools_x86),true) > > cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE) > > > Please amend the previous patch (which is dropped now), and protect this > (and the other parts) checking for 'do_tools_bpftool' instead of > hardcoding the arch here. Ok - is https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/oracular the right git repository to use to base this on? If not, would you be able to please link the right repo and branch? Thanks
Luca Boccassi kirjoitti 22.8.2024 klo 16.12: > On Thu, 22 Aug 2024 at 14:04, Timo Aaltonen <tjaalton@ubuntu.com> wrote: >> >> luca.boccassi@gmail.com kirjoitti 21.8.2024 klo 13.13: >>> From: Luca Boccassi <bluca@debian.org> >>> >>> BugLink: https://bugs.launchpad.net/bugs/2050083 >>> >>> armhf does not have working BTF for now, so create an empty header file >>> like Debian does for now, to be dropped once that issue is fixed. >>> >>> Follow-up for 60df5eb6035b53143695d8e6a6bff62a05fd0884 >>> >>> Signed-off-by: Luca Boccassi <bluca@debian.org> >>> --- >>> debian/rules.d/2-binary-arch.mk | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk >>> index 792276bf8458..5486ceb672f8 100644 >>> --- a/debian/rules.d/2-binary-arch.mk >>> +++ b/debian/rules.d/2-binary-arch.mk >>> @@ -659,7 +659,12 @@ ifeq ($(do_tools_perf),true) >>> endif >>> mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux >>> $(kmake) NO_LIBTRACEEVENT=1 CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool >>> + # TODO: armhf does not have working BTF, so ship a stub header for now, can be removed once it's fixed >>> +ifneq ($(arch),armhf) >>> $(builddirpa)/tools/bpf/bpftool/bpftool btf dump file $(builddirpa)/vmlinux format c > $(builddirpa)/vmlinux.h >>> +else >>> + echo '#error "Kernel does not support CONFIG_DEBUG_INFO_BTF"' > $(builddirpa)/vmlinux.h >>> +endif >>> rm -f $(builddirpa)/vmlinux >>> ifeq ($(do_tools_x86),true) >>> cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE) >> >> >> Please amend the previous patch (which is dropped now), and protect this >> (and the other parts) checking for 'do_tools_bpftool' instead of >> hardcoding the arch here. > > Ok - is https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/oracular > the right git repository to use to base this on? If not, would you be > able to please link the right repo and branch? Thanks yes, updated now with 6.11.0-4.4 on top on master-next branch
luca.boccassi@gmail.com kirjoitti 21.8.2024 klo 13.13: > From: Luca Boccassi <bluca@debian.org> > > BugLink: https://bugs.launchpad.net/bugs/2050083 > > armhf does not have working BTF for now, so create an empty header file > like Debian does for now, to be dropped once that issue is fixed. > > Follow-up for 60df5eb6035b53143695d8e6a6bff62a05fd0884 > > Signed-off-by: Luca Boccassi <bluca@debian.org> > --- > debian/rules.d/2-binary-arch.mk | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk > index 792276bf8458..5486ceb672f8 100644 > --- a/debian/rules.d/2-binary-arch.mk > +++ b/debian/rules.d/2-binary-arch.mk > @@ -659,7 +659,12 @@ ifeq ($(do_tools_perf),true) > endif > mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux > $(kmake) NO_LIBTRACEEVENT=1 CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool > + # TODO: armhf does not have working BTF, so ship a stub header for now, can be removed once it's fixed > +ifneq ($(arch),armhf) > $(builddirpa)/tools/bpf/bpftool/bpftool btf dump file $(builddirpa)/vmlinux format c > $(builddirpa)/vmlinux.h > +else > + echo '#error "Kernel does not support CONFIG_DEBUG_INFO_BTF"' > $(builddirpa)/vmlinux.h > +endif > rm -f $(builddirpa)/vmlinux > ifeq ($(do_tools_x86),true) > cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE) Applied with minor changes, added do_tools_bpftool_stub=true to armhf.mk to avoid hardcoding the arch in rules.
On Wed, 4 Sept 2024 at 07:57, Timo Aaltonen <tjaalton@ubuntu.com> wrote: > > luca.boccassi@gmail.com kirjoitti 21.8.2024 klo 13.13: > > From: Luca Boccassi <bluca@debian.org> > > > > BugLink: https://bugs.launchpad.net/bugs/2050083 > > > > armhf does not have working BTF for now, so create an empty header file > > like Debian does for now, to be dropped once that issue is fixed. > > > > Follow-up for 60df5eb6035b53143695d8e6a6bff62a05fd0884 > > > > Signed-off-by: Luca Boccassi <bluca@debian.org> > > --- > > debian/rules.d/2-binary-arch.mk | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk > > index 792276bf8458..5486ceb672f8 100644 > > --- a/debian/rules.d/2-binary-arch.mk > > +++ b/debian/rules.d/2-binary-arch.mk > > @@ -659,7 +659,12 @@ ifeq ($(do_tools_perf),true) > > endif > > mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux > > $(kmake) NO_LIBTRACEEVENT=1 CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool > > + # TODO: armhf does not have working BTF, so ship a stub header for now, can be removed once it's fixed > > +ifneq ($(arch),armhf) > > $(builddirpa)/tools/bpf/bpftool/bpftool btf dump file $(builddirpa)/vmlinux format c > $(builddirpa)/vmlinux.h > > +else > > + echo '#error "Kernel does not support CONFIG_DEBUG_INFO_BTF"' > $(builddirpa)/vmlinux.h > > +endif > > rm -f $(builddirpa)/vmlinux > > ifeq ($(do_tools_x86),true) > > cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE) > > > Applied with minor changes, added do_tools_bpftool_stub=true to armhf.mk > to avoid hardcoding the arch in rules. Thank you very much for your help!
On Wed, 4 Sept 2024 at 10:31, Luca Boccassi <luca.boccassi@gmail.com> wrote: > > On Wed, 4 Sept 2024 at 07:57, Timo Aaltonen <tjaalton@ubuntu.com> wrote: > > > > luca.boccassi@gmail.com kirjoitti 21.8.2024 klo 13.13: > > > From: Luca Boccassi <bluca@debian.org> > > > > > > BugLink: https://bugs.launchpad.net/bugs/2050083 > > > > > > armhf does not have working BTF for now, so create an empty header file > > > like Debian does for now, to be dropped once that issue is fixed. > > > > > > Follow-up for 60df5eb6035b53143695d8e6a6bff62a05fd0884 > > > > > > Signed-off-by: Luca Boccassi <bluca@debian.org> > > > --- > > > debian/rules.d/2-binary-arch.mk | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk > > > index 792276bf8458..5486ceb672f8 100644 > > > --- a/debian/rules.d/2-binary-arch.mk > > > +++ b/debian/rules.d/2-binary-arch.mk > > > @@ -659,7 +659,12 @@ ifeq ($(do_tools_perf),true) > > > endif > > > mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux > > > $(kmake) NO_LIBTRACEEVENT=1 CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool > > > + # TODO: armhf does not have working BTF, so ship a stub header for now, can be removed once it's fixed > > > +ifneq ($(arch),armhf) > > > $(builddirpa)/tools/bpf/bpftool/bpftool btf dump file $(builddirpa)/vmlinux format c > $(builddirpa)/vmlinux.h > > > +else > > > + echo '#error "Kernel does not support CONFIG_DEBUG_INFO_BTF"' > $(builddirpa)/vmlinux.h > > > +endif > > > rm -f $(builddirpa)/vmlinux > > > ifeq ($(do_tools_x86),true) > > > cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE) > > > > > > Applied with minor changes, added do_tools_bpftool_stub=true to armhf.mk > > to avoid hardcoding the arch in rules. > > Thank you very much for your help! Hello Timo, Now that the new linux-bpf-dev package is in Oracular, is there any chance the change could be backported to Noble too, please? The two commits cherry pick cleanly between the branches. The systemd upstream CI tests Noble too, so it would be very useful for us to have it available there as well. Thanks!
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 792276bf8458..5486ceb672f8 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -659,7 +659,12 @@ ifeq ($(do_tools_perf),true) endif mv $(builddirpa)/tools/bpf/bpftool/vmlinux $(builddirpa)/vmlinux $(kmake) NO_LIBTRACEEVENT=1 CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool + # TODO: armhf does not have working BTF, so ship a stub header for now, can be removed once it's fixed +ifneq ($(arch),armhf) $(builddirpa)/tools/bpf/bpftool/bpftool btf dump file $(builddirpa)/vmlinux format c > $(builddirpa)/vmlinux.h +else + echo '#error "Kernel does not support CONFIG_DEBUG_INFO_BTF"' > $(builddirpa)/vmlinux.h +endif rm -f $(builddirpa)/vmlinux ifeq ($(do_tools_x86),true) cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE)