summaryrefslogtreecommitdiffstats
path: root/meta-agl/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl/recipes-graphics')
-rw-r--r--meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb2
-rw-r--r--meta-agl/recipes-graphics/wayland/Readme.weston-ini-conf36
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-ini-conf.bb57
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-ini-conf/screen.inc4
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_DSI.inc2
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_GeChic.inc4
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_dell.inc2
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_qemu.inc16
-rw-r--r--meta-agl/recipes-graphics/wayland/weston/weston.ini7
-rw-r--r--meta-agl/recipes-graphics/wayland/weston_%.bbappend9
10 files changed, 122 insertions, 17 deletions
diff --git a/meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb b/meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb
index c92c60f90..c3863cb43 100644
--- a/meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb
+++ b/meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb
@@ -9,7 +9,7 @@ PACKAGES = "\
ALLOW_EMPTY_${PN} = "1"
-RDEPENDS_${PN} += "weston weston-examples"
+RDEPENDS_${PN} += "weston weston-ini-conf weston-examples"
RDEPENDS_${PN} += "\
packagegroup-agl-image-minimal \
diff --git a/meta-agl/recipes-graphics/wayland/Readme.weston-ini-conf b/meta-agl/recipes-graphics/wayland/Readme.weston-ini-conf
new file mode 100644
index 000000000..740ac56d1
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/Readme.weston-ini-conf
@@ -0,0 +1,36 @@
+#Generate a weston.ini file:
+
+To generate the weston.ini file:
+
+'''
+[core]
+backend=desktop-shell.so
+shell=ivi-shell.so
+'''
+
+Just create a Variable Flag:
+
+'''
+WESTONCORE[backend]??="drm-backend.so"
+WESTONCORE[shell]??="desktop-shell.so"
+'''
+
+And add it to the Variable Flag WESTONSECTION, with the name of the section:
+'''
+WESTONSECTION[WESTONCORE]?="core"
+'''
+
+#You can custumize weston.ini by create a weston-ini-conf.bbappend:
+
+'''
+WESTONCORE[repaint-window] ??= "34"
+'''
+
+This will generate weston.ini file:
+
+'''
+[core]
+backend=desktop-shell.so
+shell=ivi-shell.so
+repaint-window=34
+'''
diff --git a/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb
new file mode 100644
index 000000000..01f2c6534
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+
+S = "${WORKDIR}"
+
+require weston-ini-conf/screen.inc
+
+DEFAULT_SCREEN[transform]?="90"
+DEFAULT_SCREEN[name]?="HDMI-A-1"
+
+WESTONCORE[shell]??="desktop-shell.so"
+WESTONCORE[backend]??="drm-backend.so"
+
+WESTONSHELL[locking]="true"
+# Uncomment below to hide panel
+#WESTONSHELL[panel-location]="none"
+
+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")
+
+ weston_ini.writelines( "\n")
+}
+
+#ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True)
+
+addtask do_generate_weston_init after do_compile before do_install
+
+do_install_append() {
+ WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
+ install -d ${D}${WESTON_INI_CONFIG}
+ install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini
+}
diff --git a/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen.inc b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen.inc
new file mode 100644
index 000000000..1c7718c70
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen.inc
@@ -0,0 +1,4 @@
+require screen_dell.inc
+require screen_qemu.inc
+require screen_GeChic.inc
+require screen_DSI.inc
diff --git a/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_DSI.inc b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_DSI.inc
new file mode 100644
index 000000000..d5d91bf68
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_DSI.inc
@@ -0,0 +1,2 @@
+SCREEN_DSI[name] ?= "DSI-1"
+SCREEN_DSI[transform] ?= "270"
diff --git a/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_GeChic.inc b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_GeChic.inc
new file mode 100644
index 000000000..d82b18027
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_GeChic.inc
@@ -0,0 +1,4 @@
+SCREEN_GECHIC[name] ?= "HDMI-A-1"
+SCREEN_GECHIC[transform] ?= "270"
+# for 1080p on GeChic 1502i:
+SCREEN_GECHIC[mode] = "173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync"
diff --git a/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_dell.inc b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_dell.inc
new file mode 100644
index 000000000..051e2ee0d
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_dell.inc
@@ -0,0 +1,2 @@
+SCREEN_DELL[name]?="HDMI-A-1"
+SCREEN_DELL[transform]?="180"
diff --git a/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_qemu.inc b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_qemu.inc
new file mode 100644
index 000000000..76dd8b81f
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston-ini-conf/screen_qemu.inc
@@ -0,0 +1,16 @@
+SCREEN_QEMU[name]?="Virtual-1"
+#mode=1920x1080
+#mode=1600x1200
+#mode=1680x1050
+#mode=1400x1050
+SCREEN_QEMU[mode]?="1600x900"
+#mode=1280x1024
+#mode=1440x900
+#mode=1280x960
+#mode=1360x768
+#mode=1280x800
+#mode=1280x768
+#mode=1280x720
+#mode=800x600
+#mode=848x480
+#mode=640x480
diff --git a/meta-agl/recipes-graphics/wayland/weston/weston.ini b/meta-agl/recipes-graphics/wayland/weston/weston.ini
deleted file mode 100644
index b533d8908..000000000
--- a/meta-agl/recipes-graphics/wayland/weston/weston.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[core]
-shell=desktop-shell.so
-
-[shell]
-locking=true
-# Uncomment below to hide panel
-#panel-location=none
diff --git a/meta-agl/recipes-graphics/wayland/weston_%.bbappend b/meta-agl/recipes-graphics/wayland/weston_%.bbappend
index 95b886c6e..217c4fc0b 100644
--- a/meta-agl/recipes-graphics/wayland/weston_%.bbappend
+++ b/meta-agl/recipes-graphics/wayland/weston_%.bbappend
@@ -3,7 +3,6 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
SRC_URI_append = "\
file://0001-compositor-drm.c-Launch-without-input-devices.patch \
file://weston.service \
- file://weston.ini \
"
inherit systemd
@@ -16,12 +15,4 @@ do_install_append() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -m 644 -p -D ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service
fi
-
- WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
- install -d ${D}${WESTON_INI_CONFIG}
- install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini
}
-
-FILES_${PN} += " \
- ${sysconfdir}/xdg/weston/weston.ini \
- "