diff options
author | Ross Burton <ross.burton@arm.com> | 2024-11-22 14:21:58 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-23 14:44:54 +0000 |
commit | b2e64adf18e05177858322e3eb21b79ffc73af5e (patch) | |
tree | 6d556400015720af1a8219880a29d1179a461730 /meta/recipes-graphics/xorg-driver | |
parent | f7116bd84acc8c6571d66570722d16a4726d52b1 (diff) | |
download | poky-b2e64adf18e05177858322e3eb21b79ffc73af5e.tar.gz |
xserver-xorg: rewrite ABI dependency generation
This was motivated by remembering that both xserver-xorg and xorgxrdp
need to ignore the xorg-driver-abi test in do_package_qa because the
logic to generate the required dependencies is contained in
xorg-driver-common.inc, so can't be reused easily by the xserver (which
ships the modesetting driver) or xorgxrdp (which ships drivers and more).
Merge both the RPROVIDES (xserver) and RDEPENDS (driver) functions into a
single xserver-abi.inc to ensure that their logic remains in sync.
Generalise the names: instead of hardcoding 'input' and 'video' extract
the ABI names from the pkg-config file directly. This means 'input' is
now 'xinput' and 'video' is now 'videodrv', also 'ansic' and 'extension'
are new ABIs exposed.
Rewrite the RDEPENDS generation so that it is more flexible, and can be
used from inside the xserver-xorg recipe to generate RDEPENDS for the
modesetting driver. This means that recipe can remove the INSANE_SKIP.
There's an argument that this new .inc file could be a bbclass, I'm
undecided on this myself right now and this patch is essentially a
rationalisation of the existing code.
(From OE-Core rev: f40b36fb089f6ccd4fb25373ed4cb57fae78a79f)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/xorg-driver')
3 files changed, 4 insertions, 18 deletions
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc index 38848676f4..dd964d466d 100644 --- a/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc +++ b/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc | |||
@@ -20,20 +20,6 @@ inherit_defer ${XORGBUILDCLASS} | |||
20 | # depends on virtual/xserver | 20 | # depends on virtual/xserver |
21 | REQUIRED_DISTRO_FEATURES = "x11" | 21 | REQUIRED_DISTRO_FEATURES = "x11" |
22 | 22 | ||
23 | # Function to add the relevant ABI dependency to drivers, which should be called | ||
24 | # from a PACKAGEFUNC. | ||
25 | def _add_xorg_abi_depends(d, name): | ||
26 | # Map of ABI names exposed in the dependencies to pkg-config variables | ||
27 | abis = { | ||
28 | "video": "abi_videodrv", | ||
29 | "input": "abi_xinput" | ||
30 | } | ||
31 | |||
32 | output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read() | ||
33 | mlprefix = d.getVar('MLPREFIX') or '' | ||
34 | abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0]) | ||
35 | |||
36 | pn = d.getVar("PN") | ||
37 | d.appendVar('RDEPENDS:' + pn, ' ' + abi) | ||
38 | |||
39 | SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}" | 23 | SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}" |
24 | |||
25 | require recipes-graphics/xorg-xserver/xserver-abi.inc | ||
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc index 4efb90278c..269a78931e 100644 --- a/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc +++ b/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc | |||
@@ -1,7 +1,7 @@ | |||
1 | require xorg-driver-common.inc | 1 | require xorg-driver-common.inc |
2 | 2 | ||
3 | python add_xorg_abi_depends() { | 3 | python add_xorg_abi_depends() { |
4 | _add_xorg_abi_depends(d, "input") | 4 | _add_xorg_abi_depends(d, "xinput") |
5 | } | 5 | } |
6 | PACKAGEFUNCS =+ "add_xorg_abi_depends" | 6 | PACKAGEFUNCS =+ "add_xorg_abi_depends" |
7 | 7 | ||
diff --git a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc index c9365d8954..18441210c2 100644 --- a/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc +++ b/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | require xorg-driver-common.inc | 1 | require xorg-driver-common.inc |
2 | 2 | ||
3 | python add_xorg_abi_depends() { | 3 | python add_xorg_abi_depends() { |
4 | _add_xorg_abi_depends(d, "video") | 4 | _add_xorg_abi_depends(d, "videodrv") |
5 | } | 5 | } |
6 | PACKAGEFUNCS =+ "add_xorg_abi_depends" | 6 | PACKAGEFUNCS =+ "add_xorg_abi_depends" |