cancel
Showing results for 
Search instead for 
Did you mean: 

how to correctly apply weston.ini changes via Yocto

Sharan
Senior II

I created a layer using bitbake-layers create-layer --priority 7 ../layers/meta-st/meta-my-custo-layer and created 

mkdir recipes-graphics/wayland/weston-init/ and created folder called  files and  append file weston-init_%.bbappend and in files i added my weston.ini where i disabled the panel=none and in bb append i added this code 

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = " file://weston.ini"

do_install:append() {
install -d ${D}${sysconfdir}/xdg/weston
install -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
}

And added the layer using this bitbake-layers add-layer ../layers/meta-st/meta-my-custo-layer/

After that i built the image using bitbake st-image-weston but still it is taking the old weston.ini and the panel is visible 

Can Someone help me on how to do it?

3 REPLIES 3
Gregory PLANCHON
ST Employee

Hi @Sharan ,

 

Have you tried clearing your build folder before running the bitbake command again?
Next, you also need to check that there isn't another recipe that is built after the one you created , as these might overwrite your version of weston.ini

 

Regards,

Grégory

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

yes i used this command to clean  bitbake -c clean weston-init and then used bitbake st-image-qt and then checked my appends using 

sohum@sohum-aero:~/STM32MPU-Ecosystem1/Distribution-Package/build-openstlinuxweston-stm32mp15-disco$ bitbake-layers show-appends | grep weston-init
weston-init.bb:
/home/sohum/STM32MPU-Ecosystem1/Distribution-Package/layers/meta-st/meta-st-openstlinux/recipes-graphics/wayland/weston-init.bbappend

 

It is not showing my custom layer  and i think its taking the default weston.ini file.Please give me the steps if i am wrong

It is showing my custom layer when i used bitbake-layers show-appends | grep weston

sohum@sohum-aero:~/STM32MPU-Ecosystem1/Distribution-Package/build-openstlinuxweston-stm32mp15-disco$ bitbake-layers show-appends | grep weston
NOTE: Started PRServer with DBfile: /home/sohum/STM32MPU-Ecosystem1/Distribution-Package/build-openstlinuxweston-stm32mp15-disco/cache/prserv.sqlite3, Address: 127.0.0.1:45383, PID: 416231
weston_11.0.1.bb:
  /home/sohum/STM32MPU-Ecosystem1/Distribution-Package/layers/meta-st/meta-st-openstlinux/recipes-graphics/wayland/weston_11.0.1.bbappend
  /home/sohum/STM32MPU-Ecosystem1/Distribution-Package/layers/meta-st/meta-my-custo-layer/recipes-graphics/weston/weston_11.0.1.bbappend
weston-init.bb:
  /home/sohum/STM32MPU-Ecosystem1/Distribution-Package/layers/meta-st/meta-st-openstlinux/recipes-graphics/wayland/weston-init.bbappend

I am able to store the image in /usr/share/weston/backgrounds but unable to change the Background image through bbappend file 

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

# Background assets
DEFAULT_WESTON_BACKGROUND = "Sohum-Bg.png"
WESTON_HDMI_MODE ??= "1280x720"

SRC_URI:append = " \
    file://weston.ini \
    file://Sohum-Bg.png \
"

do_install:append() {
    # Make sure weston config path exists
    install -d ${D}${sysconfdir}/xdg/weston
    install -d ${D}${datadir}/weston/backgrounds

     rm -f ${D}${datadir}/weston/weston.ini

    # Install your weston.ini
    install -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston

    # Replace placeholders
    sed -i -e "s:##DEFAULT_BACKGROUND##:${DEFAULT_WESTON_BACKGROUND}:g" \
           -e "s:##HDMI_MODE##:${WESTON_HDMI_MODE}:g" \
           ${D}${sysconfdir}/xdg/weston/weston.ini

          rm -f ${D}${datadir}/weston/backgrounds/ST*.png

    # Install your background PNG
    install -m 0644 ${WORKDIR}/${DEFAULT_WESTON_BACKGROUND} \
        ${D}${datadir}/weston/backgrounds/${DEFAULT_WESTON_BACKGROUND}
}

CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini"
FILES:${PN} += " \
    ${sysconfdir}/xdg/weston/weston.ini \
    ${datadir}/weston/backgrounds/* \
"

Please help me on how to do the changes as it is not reflecting and it is taking the weston.ini and tried replacing also like it done for uboot its not working