From 7f8b394a694491ffd94874c26fa83057efaa0dfc Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 18 Oct 2017 09:38:05 -0400 Subject: weston-ini-conf: Rework to use fragments to construct weston.ini MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch to constructing the weston.ini from fragments of files instead of variables and variable flags. This allows for much easier tracking of signatures by leveraging existing mechanisms. Update the Readme to explain how to do the various operations with fragments as well. Note that for QEMU we do not need to pass -show-cursor as it's already provided and we do want to change the VGA driver to one that reliably provides DRM support. For the HDMI connected screens, rather than name them by vendor name them first for connection and then required transformation for correct orientation. For board-specific options, move them to the board directories. When we need to change existing cfg options, rather than replace them the proper location to do this in is the do_configure function. Bug-AGL: SPEC-964 Change-Id: I2cceb4fd64f51eb2ab1d47419b77153cf02d7c12 Signed-off-by: Tom Rini Reviewed-on: https://gerrit.automotivelinux.org/gerrit/11375 Reviewed-by: Stéphane Desneux Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller --- .../recipes-graphics/wayland/weston-ini-conf.bb | 61 ++++++---------------- 1 file changed, 15 insertions(+), 46 deletions(-) (limited to 'meta-agl/recipes-graphics/wayland/weston-ini-conf.bb') diff --git a/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb index 0edc05d24..9ba49bf2e 100644 --- a/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb +++ b/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb @@ -2,57 +2,26 @@ SUMMARY = "Startup script and systemd unit file for the Weston Wayland composito LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" -S = "${WORKDIR}" - -require weston-ini-conf/screen.inc - -DEFAULT_SCREEN[transform]?="270" -DEFAULT_SCREEN[name]?="HDMI-A-1" - -WESTONCORE[shell]??="desktop-shell.so" -WESTONCORE[backend]??="drm-backend.so" -WESTONCORE[require-input]??="false" - -WESTONSHELL[locking]="true" -# hide panel -WESTONSHELL[panel-location]="none" +SRC_URI = "file://core.cfg \ + file://ivishell.cfg \ + file://shell.cfg \ + file://hdmi-a-1-270.cfg \ + " +S = "${WORKDIR}" -WESTONOUTPUT1[agl_screen]??="DEFAULT_SCREEN" - -WESTONSECTION[WESTONCORE]?="core" -WESTONSECTION[WESTONSHELL]?="shell" -WESTONSECTION[WESTONOUTPUT1]?="output" - -python do_generate_weston_init() { - with open(d.getVar('WORKDIR', True)+"/weston.ini" ,'w') as weston_ini: - dicoSection=d.getVarFlags('WESTONSECTION') - keysSection=list(dicoSection.keys()) - keysSection.sort() - for section in keysSection: - weston_ini.writelines( "["+dicoSection[section]+"]\n") - dicoSectionValues=d.getVarFlags(section) - keysSectionValues=list(dicoSectionValues.keys()) - keysSectionValues.sort() - for sectionValue in keysSectionValues: - if (dicoSection[section] == "output" and sectionValue == "agl_screen"): - screen=dicoSectionValues[sectionValue] - dicoScreenConfig=d.getVarFlags(screen) - keysScreenConfig=list(dicoScreenConfig.keys()) - keysScreenConfig.sort() - for screenConfig in keysScreenConfig: - weston_ini.writelines( screenConfig+"="+dicoScreenConfig[screenConfig]+"\n") - else: - weston_ini.writelines( str(sectionValue)+"="+str(dicoSectionValues[sectionValue])+"\n") +PACKAGE_ARCH = "${MACHINE_ARCH}" - weston_ini.writelines( "\n") +do_compile() { + # Put all of our cfg files together. + rm -f ${WORKDIR}/weston.ini + for F in ${WORKDIR}/*.cfg; do + cat $F >> ${WORKDIR}/weston.ini + echo >> ${WORKDIR}/weston.ini + done + sed -i -e '$ d' ${WORKDIR}/weston.ini } -#ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True) - -addtask do_generate_weston_init after do_compile before do_install -do_generate_weston_init[vardeps] = "DEFAULT_SCREEN WESTONCORE WESTONSHELL WESTONOUTPUT1 WESTONSECTION" - do_install_append() { WESTON_INI_CONFIG=${sysconfdir}/xdg/weston install -d ${D}${WESTON_INI_CONFIG} -- cgit 1.2.3-korg