weston-init: add customizations for ccimx93

Update the recipe (using meta-imx's reference) to add support for the
ccimx93 and delete obsolete code.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2023-01-19 17:21:41 +01:00
parent 31d9863fea
commit a9c06bc432
2 changed files with 11 additions and 22 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2019-2021 Digi International. # Copyright (C) 2019-2023 Digi International.
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
@ -7,17 +7,13 @@ SRC_URI += " \
file://profile \ file://profile \
" "
# Remove duplicate entries for the ccimx6 platform INI_UNCOMMENT_ASSIGNMENTS:append:mx9-nxp-bsp = " \
# and uncomment with an individual append repaint-window=16 \
INI_UNCOMMENT_ASSIGNMENTS:remove:ccimx6 = "use-g2d=1" "
INI_UNCOMMENT_ASSIGNMENTS:append:mx93-nxp-bsp = " \
INI_UNCOMMENT_ASSIGNMENTS:append:mx8ulp-nxp-bsp = " \
use-g2d=1 \ use-g2d=1 \
" "
WATCHDOG_SEC = "40"
WATCHDOG_SEC:mx8ulp-nxp-bsp = "240"
update_file() { update_file() {
if ! grep -q "$1" $3; then if ! grep -q "$1" $3; then
bbfatal $1 not found in $3 bbfatal $1 not found in $3
@ -25,28 +21,22 @@ update_file() {
sed -i -e "s,$1,$2," $3 sed -i -e "s,$1,$2," $3
} }
do_install:append:ccimx6() {
uncomment "use-g2d=1" ${D}${sysconfdir}/xdg/weston/weston.ini
}
do_install:append() { do_install:append() {
install -Dm0755 ${WORKDIR}/profile ${D}${sysconfdir}/profile.d/weston.sh
# Add weston.log back, used by NXP for testing # Add weston.log back, used by NXP for testing
update_file "ExecStart=/usr/bin/weston " "ExecStart=/usr/bin/weston --log=\$\{XDG_RUNTIME_DIR\}/weston.log " ${D}${systemd_system_unitdir}/weston.service update_file "ExecStart=/usr/bin/weston " "ExecStart=/usr/bin/weston --log=\$\{XDG_RUNTIME_DIR\}/weston.log " ${D}${systemd_system_unitdir}/weston.service
# FIXME: weston should be run as weston, not as root # FIXME: weston should be run as weston, not as root
update_file "User=weston" "User=root" ${D}${systemd_system_unitdir}/weston.service update_file "User=weston" "User=root" ${D}${systemd_system_unitdir}/weston.service
update_file "Group=weston" "Group=root" ${D}${systemd_system_unitdir}/weston.service update_file "Group=weston" "Group=root" ${D}${systemd_system_unitdir}/weston.service
}
update_file "WatchdogSec=20" "WatchdogSec=${WATCHDOG_SEC}" ${D}${systemd_system_unitdir}/weston.service # DEY customizations
do_install:append() {
install -Dm0755 ${WORKDIR}/profile ${D}${sysconfdir}/profile.d/weston.sh
install -Dm0644 ${WORKDIR}/digi_background.png ${D}${datadir}/weston/digi_background.png
update_file "Before=graphical.target" "Before=multi-user.target" ${D}${systemd_system_unitdir}/weston.service update_file "Before=graphical.target" "Before=multi-user.target" ${D}${systemd_system_unitdir}/weston.service
update_file "WantedBy=graphical.target" "WantedBy=multi-user.target" ${D}${systemd_system_unitdir}/weston.service update_file "WantedBy=graphical.target" "WantedBy=multi-user.target" ${D}${systemd_system_unitdir}/weston.service
# Add custom background image
install -d ${D}${datadir}/weston
install ${WORKDIR}/digi_background.png ${D}${datadir}/weston
} }
FILES:${PN} += "${datadir}/weston/digi_background.png" FILES:${PN} += "${datadir}/weston/digi_background.png"

View File

@ -1,6 +1,5 @@
[core] [core]
#gbm-format=argb8888 #gbm-format=argb8888
#gbm-format=rgb565
idle-time=0 idle-time=0
#use-g2d=1 #use-g2d=1
#xwayland=true #xwayland=true
@ -29,7 +28,7 @@ touchscreen_calibrator=true
#transform=rotate-90 #transform=rotate-90
[screen-share] [screen-share]
command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize --rdp-tls-cert=/etc/freerdp/keys/server.crt --rdp-tls-key=/etc/freerdp/keys/server.key command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize --rdp-tls-cert=/etc/freerdp/keys/server.crt --rdp-tls-key=/etc/freerdp/keys/server.key
# Digi: Set custom background # Digi: Set custom background
[shell] [shell]