I create recipe in
my-layer/recipes-graphics/wayland
weston-init.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://wallpaper-logo.png \
(and weston.ini or .patch)
"
do_install_append() {
install -D -p ${WORKDIR}/wallpaper-logo.png ${D}/opt/InertGas/wallpaper-logo.png
install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini # if whole weston.ini, not patch for weston.ini
}
FILES_${PN} += "/opt/InertGas/wallpaper-logo.png"
I try to modify weston.ini with a patch and copy a whole weston.ini.
But the result is the same - no changes in weston.ini after build.
Where weston.ini is overridden and how to modify this file?
In my case on a Congatec iMX6 SOM with Yocto Kirkstone, I made the following recipe <my-layer>/recipes-graphics/wayland/weston-init.bbappend.
# Uncomment the weston.ini [shell] section identifier string.
INI_UNCOMMENT_ASSIGNMENTS:append = " \
\\[shell\\] \
"
do_install:append() {
# Search for the [shell] string and add the following two lines after it.
# panel-location=""
# panel-position=none
sed -i "/\[shell\]/apanel-location=\"\"\npanel-position=none" ${D}${sysconfdir}/xdg/weston/weston.ini
}
I found that the meta-imx/meta-bsp/recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini was the actual weston.ini file being placed in the image. It had the [shell] string commented and no other weston-init.bbappend file was uncommenting it. After that, I found the easiest thing to do was just use sed to add the options in that I wanted to this existing file.
My research showed me that simply creating a /home/weston/.config/weston/weston.ini file would override settings under /etc/, but in practice this did not work. I have some ideas why, but it doesn't really matter because the above worked for me.
The trick is to make sure the override weston.ini is located in an imx-nxp-bsp subdirectory when referencing it in FILESEXTRAPATHS in a bbappend file, as it is in variscite's example: https://github.com/varigit/meta-variscite-sdk/tree/kirkstone/recipes-graphics/wayland/weston-init/im...
To do this, one needs a weston-init.bbappend in a layer with higher priority than all of the other westin-init.bbappends. Here are the bbappend contents to pickup the override westin.ini:
$ cat weston-init.bbapend
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
And here is the directory structure adjacent to this bbappend that makes this work:
$ find .
.
./weston-init
./weston-init/imx-nxp-bsp
./weston-init/imx-nxp-bsp/weston.ini
./weston-init.bbappend
I have the same problem. I cannot get my patch to apply to modify wayland.ini to hide the panel.
sources/meta-mylayer/recipe-graphics/wayland/weston-init.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = " \
file://weston-hide-panel.patch \
"
sources/meta-mylayer/recipe-graphics/wayland/files/weston-hide-panel.patch
--- weston.ini 2021-04-29 02:19:58.850000000 -0500
+++ weston.ini 2021-04-29 02:20:03.540000000 -0500
@@ -8,6 +8,7 @@
cursor-theme=Adwaita
cursor-size=22
#size=1920x1080
+panel-position=none
#[output]
#name=HDMI-A-1
Hi Egor,
I share a guide that can help you create a recipe.
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-add-a-new-layer-and-a-new-recipe-...
Best regards,
Diego.