[RFC][PATCH 1/1] drm/msm: require python3 and xml.parsers.expat module
Rob Clark
robdclark at gmail.com
Wed Nov 20 18:50:58 UTC 2024
On Wed, Nov 20, 2024 at 7:49 AM Petr Vorel <pvorel at suse.cz> wrote:
>
> 0fddd045f88e introduced python3 dependency, require it to quick early.
>
> Signed-off-by: Petr Vorel <pvorel at suse.cz>
> ---
> Hi all,
>
> RFC because I'm not sure if previous failed build wasn't better:
>
> GENHDR drivers/gpu/drm/msm/generated/a2xx.xml.h
> /bin/sh: python3: not found
>
> This way it's documented, but CONFIG_DRM_MSM just silently disappears
> from .config. Also because depends on $(success ..) is not evaluated
> (understand, some expressions can be really long) one see only:
> Depends on: n [=n].
>
> I was thinking about testing via $(PYTHON3) -m "xml.parsers.expat",
> but because expat parser (and other modules) should be part the official
> python3 and are installed even on minimal python3 installations (e.g.
> python3-minimal on Debian). Therefore depending on "$(PYTHON3) -V"
> should be enough.
>
Would it be more clear to do something like:
config HAS_PYTHON3
dev_bool $(success ...)
(in init/Kconfig or somewhere central) and then use 'depends on
HAS_PYTHON3'? That might make the dependency easier to see in
menuconfig/etc
BR,
-R
> Kind regards,
> Petr
>
> drivers/gpu/drm/msm/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
> index 90c68106b63b..2cf4573a2ff1 100644
> --- a/drivers/gpu/drm/msm/Kconfig
> +++ b/drivers/gpu/drm/msm/Kconfig
> @@ -11,6 +11,7 @@ config DRM_MSM
> depends on QCOM_LLCC || QCOM_LLCC=n
> depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
> depends on PM
> + depends on $(success,$(PYTHON3) -V)
> select IOMMU_IO_PGTABLE
> select QCOM_MDT_LOADER if ARCH_QCOM
> select REGULATOR
> @@ -36,7 +37,7 @@ config DRM_MSM
> select PM_GENERIC_DOMAINS
> select TRACE_GPU_MEM
> help
> - DRM/KMS driver for MSM/snapdragon.
> + DRM/KMS driver for MSM/snapdragon. Requires python3.
>
> config DRM_MSM_GPU_STATE
> bool
> --
> 2.47.0
>
>
More information about the Freedreno
mailing list