diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2019-11-17 09:25:11 -0600 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2019-11-18 10:16:54 -0300 |
commit | c1ebb48c52762fbc75ef5efb6e2541c1869586bc (patch) | |
tree | a99d95a8bb377417c148fcd4674d005b6ef21155 /recipes-graphics/wayland | |
parent | e0f804586ad86f5247e99d80ff5e466be8a30333 (diff) | |
download | meta-freescale-c1ebb48c52762fbc75ef5efb6e2541c1869586bc.tar.gz |
weston: Replace copies of weston.ini with logic
Install a common base weston.ini and then customize
it in the recipe by specifying custom options.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-graphics/wayland')
4 files changed, 25 insertions, 75 deletions
diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 13818bc3..ce6c4c7c 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend | |||
@@ -11,10 +11,35 @@ SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file | |||
11 | HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" | 11 | HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" |
12 | HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" | 12 | HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" |
13 | 13 | ||
14 | # To customize weston.ini, start by setting the desired assignment in weston.ini, | ||
15 | # commented out. Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. | ||
16 | INI_UNCOMMENT_ASSIGNMENTS = "" | ||
17 | INI_UNCOMMENT_ASSIGNMENTS_append_mx7ulp = " \ | ||
18 | use-g2d=1 \ | ||
19 | " | ||
20 | INI_UNCOMMENT_ASSIGNMENTS_append_mx8mm = " \ | ||
21 | use-g2d=1 \ | ||
22 | " | ||
23 | INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \ | ||
24 | gbm-format=argb8888 \ | ||
25 | \\[shell\\] \ | ||
26 | size=1920x1080 \ | ||
27 | " | ||
28 | |||
29 | uncomment() { | ||
30 | if ! (grep "^#$1" $2); then | ||
31 | bbfatal "Commented setting '#$1' not found in file $2" | ||
32 | fi | ||
33 | sed -i -e 's,^#'"$1"','"$1"',g' $2 | ||
34 | } | ||
35 | |||
14 | do_install_append() { | 36 | do_install_append() { |
15 | if ${HAS_SYSTEMD}; then | 37 | if ${HAS_SYSTEMD}; then |
16 | if ${HAS_XWAYLAND}; then | 38 | if ${HAS_XWAYLAND}; then |
17 | install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston | 39 | install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston |
18 | fi | 40 | fi |
19 | fi | 41 | fi |
42 | for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do | ||
43 | uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini | ||
44 | done | ||
20 | } | 45 | } |
diff --git a/recipes-graphics/wayland/weston-init/mx7ulp/weston.ini b/recipes-graphics/wayland/weston-init/mx7ulp/weston.ini deleted file mode 100644 index 390932bc..00000000 --- a/recipes-graphics/wayland/weston-init/mx7ulp/weston.ini +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | [core] | ||
2 | #gbm-format=argb8888 | ||
3 | idle-time=0 | ||
4 | use-g2d=1 | ||
5 | #xwayland=true | ||
6 | |||
7 | #[shell] | ||
8 | #size=1920x1080 | ||
9 | |||
10 | #[output] | ||
11 | #name=HDMI-A-1 | ||
12 | #mode=1920x1080@60 | ||
13 | #transform=90 | ||
14 | |||
15 | #[output] | ||
16 | #name=HDMI-A-2 | ||
17 | #mode=off | ||
18 | # WIDTHxHEIGHT Resolution size width and height in pixels | ||
19 | # off Disables the output | ||
20 | # preferred Uses the preferred mode | ||
21 | # current Uses the current crt controller mode | ||
22 | #transform=90 | ||
23 | |||
24 | [screen-share] | ||
25 | command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize | ||
diff --git a/recipes-graphics/wayland/weston-init/mx8mm/weston.ini b/recipes-graphics/wayland/weston-init/mx8mm/weston.ini deleted file mode 100644 index 390932bc..00000000 --- a/recipes-graphics/wayland/weston-init/mx8mm/weston.ini +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | [core] | ||
2 | #gbm-format=argb8888 | ||
3 | idle-time=0 | ||
4 | use-g2d=1 | ||
5 | #xwayland=true | ||
6 | |||
7 | #[shell] | ||
8 | #size=1920x1080 | ||
9 | |||
10 | #[output] | ||
11 | #name=HDMI-A-1 | ||
12 | #mode=1920x1080@60 | ||
13 | #transform=90 | ||
14 | |||
15 | #[output] | ||
16 | #name=HDMI-A-2 | ||
17 | #mode=off | ||
18 | # WIDTHxHEIGHT Resolution size width and height in pixels | ||
19 | # off Disables the output | ||
20 | # preferred Uses the preferred mode | ||
21 | # current Uses the current crt controller mode | ||
22 | #transform=90 | ||
23 | |||
24 | [screen-share] | ||
25 | command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize | ||
diff --git a/recipes-graphics/wayland/weston-init/mx8mq/weston.ini b/recipes-graphics/wayland/weston-init/mx8mq/weston.ini deleted file mode 100644 index eceb6456..00000000 --- a/recipes-graphics/wayland/weston-init/mx8mq/weston.ini +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | [core] | ||
2 | gbm-format=argb8888 | ||
3 | idle-time=0 | ||
4 | #use-g2d=1 | ||
5 | #xwayland=true | ||
6 | |||
7 | [shell] | ||
8 | size=1920x1080 | ||
9 | |||
10 | #[output] | ||
11 | #name=HDMI-A-1 | ||
12 | #mode=1920x1080@60 | ||
13 | #transform=90 | ||
14 | |||
15 | #[output] | ||
16 | #name=HDMI-A-2 | ||
17 | #mode=off | ||
18 | # WIDTHxHEIGHT Resolution size width and height in pixels | ||
19 | # off Disables the output | ||
20 | # preferred Uses the preferred mode | ||
21 | # current Uses the current crt controller mode | ||
22 | #transform=90 | ||
23 | |||
24 | [screen-share] | ||
25 | command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize | ||