diff mbox series

[scarthgap,RFC] bitbake.conf: Add truncate to HOSTTOOLS

Message ID 20240930-6-11-kallsyms-truncate-v1-1-47fc9143fff9@cherry.de
State Accepted, archived
Delegated to: Steve Sakoman
Headers show
Series [scarthgap,RFC] bitbake.conf: Add truncate to HOSTTOOLS | expand

Commit Message

Quentin Schulz Sept. 30, 2024, 10:36 a.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

Some wic images need this command. Since it is part of coreutils, it doesn't really
cost anything to have in HOSTTOOLS and it avoids signifiant build dependencies on
coreutils-native.

[YOCTO #15571]

(cherry picked from commit 522000ce5c4f0201cbe42d7826b6a8489ed10117)
[necessary for building Linux kernel >= 6.11 with CONFIG_KALLSYMS, c.f.
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1472464c6248575bf2d01c7f076b94704bb32c95]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
The Linux kernel in its 6.11 release or later, with KALLSYMS config
enabled, will now fail to build because truncate host tools is
required, c.f.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1472464c6248575bf2d01c7f076b94704bb32c95

but the kernel recipe doesn't depend on coreutils-native, which is too
big of a dependency for what it brings according to Richard (for the
original patch destined to wic) and Bruce (as discussed over mailing
list for the linux-yocto recipe).

Let's backport a patch that was implemented for something else (wic)
from styhead/master as truncate is pretty much guaranteed to be present
on the host with hopefully no compatibility issues between
implementation.

Marked as RFC because it's a "big" change and I don't want the ML to
just gloss over it without questioning it :)

Note: I'm currently NOT building that kernel in my layer, but it'll come
at some point next year, though I did hit this issue when doing a very
quick test with a local tree.
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: f888dd911529a828820799a7a1b75dfd3a44847c
change-id: 20240930-6-11-kallsyms-truncate-d8d4d9f16d41

Best regards,

Comments

Quentin Schulz Oct. 14, 2024, 10:53 a.m. UTC | #1
Hi all,

On 9/30/24 12:36 PM, Quentin Schulz wrote:
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> Some wic images need this command. Since it is part of coreutils, it doesn't really
> cost anything to have in HOSTTOOLS and it avoids signifiant build dependencies on
> coreutils-native.
> 
> [YOCTO #15571]
> 
> (cherry picked from commit 522000ce5c4f0201cbe42d7826b6a8489ed10117)
> [necessary for building Linux kernel >= 6.11 with CONFIG_KALLSYMS, c.f.
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1472464c6248575bf2d01c7f076b94704bb32c95]
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
> The Linux kernel in its 6.11 release or later, with KALLSYMS config
> enabled, will now fail to build because truncate host tools is
> required, c.f.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1472464c6248575bf2d01c7f076b94704bb32c95
> 
> but the kernel recipe doesn't depend on coreutils-native, which is too
> big of a dependency for what it brings according to Richard (for the
> original patch destined to wic) and Bruce (as discussed over mailing
> list for the linux-yocto recipe).
> 
> Let's backport a patch that was implemented for something else (wic)
> from styhead/master as truncate is pretty much guaranteed to be present
> on the host with hopefully no compatibility issues between
> implementation.
> 
> Marked as RFC because it's a "big" change and I don't want the ML to
> just gloss over it without questioning it :)
> 
> Note: I'm currently NOT building that kernel in my layer, but it'll come
> at some point next year, though I did hit this issue when doing a very
> quick test with a local tree.

Any feedback on that patch?

Cheers,
Quentin
Martin Jansa Oct. 14, 2024, 10:55 a.m. UTC | #2
https://git.openembedded.org/openembedded-core/commit/?h=scarthgap&id=85451cdaee4718233211da1e43db01f5cd2b1aff

On Mon, Oct 14, 2024 at 12:54 PM Quentin Schulz via
lists.openembedded.org
<quentin.schulz=cherry.de@lists.openembedded.org> wrote:
>
> Hi all,
>
> On 9/30/24 12:36 PM, Quentin Schulz wrote:
> > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> >
> > Some wic images need this command. Since it is part of coreutils, it doesn't really
> > cost anything to have in HOSTTOOLS and it avoids signifiant build dependencies on
> > coreutils-native.
> >
> > [YOCTO #15571]
> >
> > (cherry picked from commit 522000ce5c4f0201cbe42d7826b6a8489ed10117)
> > [necessary for building Linux kernel >= 6.11 with CONFIG_KALLSYMS, c.f.
> >   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1472464c6248575bf2d01c7f076b94704bb32c95]
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> > ---
> > The Linux kernel in its 6.11 release or later, with KALLSYMS config
> > enabled, will now fail to build because truncate host tools is
> > required, c.f.
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1472464c6248575bf2d01c7f076b94704bb32c95
> >
> > but the kernel recipe doesn't depend on coreutils-native, which is too
> > big of a dependency for what it brings according to Richard (for the
> > original patch destined to wic) and Bruce (as discussed over mailing
> > list for the linux-yocto recipe).
> >
> > Let's backport a patch that was implemented for something else (wic)
> > from styhead/master as truncate is pretty much guaranteed to be present
> > on the host with hopefully no compatibility issues between
> > implementation.
> >
> > Marked as RFC because it's a "big" change and I don't want the ML to
> > just gloss over it without questioning it :)
> >
> > Note: I'm currently NOT building that kernel in my layer, but it'll come
> > at some point next year, though I did hit this issue when doing a very
> > quick test with a local tree.
>
> Any feedback on that patch?
>
> Cheers,
> Quentin
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#205745): https://lists.openembedded.org/g/openembedded-core/message/205745
> Mute This Topic: https://lists.openembedded.org/mt/108733316/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index ba8bd5f975..78f15b76ae 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -521,7 +521,7 @@  HOSTTOOLS += " \
     mktemp mv nm objcopy objdump od patch perl pr printf pwd \
     python3 pzstd ranlib readelf readlink realpath rm rmdir rpcgen sed seq sh \
     sha1sum sha224sum sha256sum sha384sum sha512sum \
-    sleep sort split stat strings strip tail tar tee test touch tr true uname \
+    sleep sort split stat strings strip tail tar tee test touch tr true truncate uname \
     uniq unzstd wc wget which xargs zstd \
 "