diff --git a/linux/Config.in b/linux/Config.in index 023fa0a2ec..b4e88214d6 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -492,6 +492,17 @@ config BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE such as "BTF: .tmp_vmlinux.btf: pahole (pahole) is not available". +config BR2_LINUX_KERNEL_NEEDS_HOST_PYTHON3 + bool "Needs host python3" + help + Some Linux kernel configuration options (such as the + CONFIG_DRM_MSM in v6.10 and greater) require a host python3 + interpreter. Enabling this option will ensure host-python3 + gets built before the Linux kernel. + + Enable this option if you get a Linux kernel build failure + such as "python3: not found". + # Linux extensions source "linux/Config.ext.in" diff --git a/linux/linux.mk b/linux/linux.mk index 16d9f19470..92035d0da9 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -138,6 +138,10 @@ define LINUX_FIXUP_CONFIG_PAHOLE_CHECK endef endif +ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_PYTHON3),y) +LINUX_DEPENDENCIES += host-python3 +endif + # If host-uboot-tools is selected by the user, assume it is needed to # create a custom image ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS),y)