recipe changes in weston.ini are overridden

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

recipe changes in weston.ini are overridden

3,254件の閲覧回数
Egor_I_InertgasM
Contributor II

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?

0 件の賞賛
返信
7 返答(返信)

1,538件の閲覧回数
spetroce
Contributor II

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.

455件の閲覧回数
kluszon
Contributor II
Confirmed using sed is the only way to modify weston.ini. You can easily add new lines, replace existing ones, or comment.
0 件の賞賛
返信

1,902件の閲覧回数
msandstedt
Contributor I

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


0 件の賞賛
返信

2,581件の閲覧回数
mgordon
Contributor I

Did you ever solve this problem? I'm facing the same issue.

 

0 件の賞賛
返信

3,062件の閲覧回数
Slawek1
Contributor I

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

 

0 件の賞賛
返信

2,582件の閲覧回数
mgordon
Contributor I

Did you ever get this working? I'm facing the same problem and can't seem to find a solution.

0 件の賞賛
返信

3,234件の閲覧回数
Juan-Rodarte
NXP Employee
NXP Employee

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.

0 件の賞賛
返信