# Root device
ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02"
-# runqemu tweaks
-QB_OPT_APPEND_append = " -show-cursor"
+# Force the virtio video device as 'vmware' doesn't always work
+QB_OPT_APPEND_append = " -vga virtio"
# Currently only works with fbdev backend
# and only one default output
-WESTONCORE[backend] = "fbdev-backend.so"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-SCREEN_fbdev[name] = "fbdev"
-SCREEN_fbdev[transform] = "270"
-WESTONOUTPUT1[agl_screen] = "SCREEN_fbdev"
+SRC_URI_remove = "file://hdmi-a-1-270.cfg"
+SRC_URI += "file://fbdev.cfg"
-do_generate_weston_init[vardeps] += "SCREEN_fbdev"
+do_configure() {
+ sed -i -e 's/drm-backend/fbdev-backend/' ${WORKDIR}/core.cfg
+}
--- /dev/null
+[output]
+name=fbdev
+transform=270
-# Select default screen type and orientation
-# and only one default output
-
-WESTONOUTPUT1[agl_screen] = "SCREEN_eGalax"
+# Select a different rotation for our default panel.
+SRC_URI_remove = "file://hdmi-a-1-270.cfg"
+SRC_URI += "file://hdmi-a-1-90.cfg"
-# Disable LVDS
-WESTONOUTPUT2[agl_screen] ??= "SCREEN_DSI"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-WESTONSECTION[WESTONOUTPUT2] = "output"
-
-do_generate_weston_init[vardeps] += "WESTONOUTPUT2"
+SRC_URI += "file://dsi.cfg"
--- /dev/null
+# Support the Raspberry Pi Foundation 7" tablet which uses the DSI connector
+# rather than HDMI.
+[output]
+name=DSI-1
+transform=270
-WESTONCORE[repaint-window] ??= "34"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-WESTONIVISHELL[transition-duration] ??= "300"
-WESTONIVISHELL[cursor-theme] ??= "default"
+SRC_URI += "${@bb.utils.contains("MACHINE_FEATURES", "multimedia", "file://v4l2-renderer.cfg", "",d)}"
-WESTONV4L2RENDERER[device] ??= "/dev/media0"
-WESTONV4L2RENDERER[device-module] ??= "vsp2"
+do_configure() {
+ echo repaint-window=34 >> ${WORKDIR}/core.cfg
-python() {
- if "multimedia" in d.getVar("MACHINE_FEATURES", True).split(" "):
- d.setVarFlag("WESTONSECTION", "WESTONV4L2RENDERER", "v4l2-renderer")
+ echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg
+ echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg
}
-
-do_generate_weston_init[vardeps] += "WESTONIVISHELL WESTONV4L2RENDERER"
--- /dev/null
+[v4l2-renderer]
+device=/dev/media0
+device-module=vsp2
-# Disable LVDS
-WESTONOUTPUT2[name] = "LVDS-1"
-WESTONOUTPUT2[mode] = "off"
-
-WESTONSECTION[WESTONOUTPUT2] = "output"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-do_generate_weston_init[vardeps] += "WESTONOUTPUT2"
+# Disable LVDS
+SRC_URI += "file://lvds-off.cfg"
--- /dev/null
+[output]
+name=LVDS-1
+mode=off
-DEFAULT_SCREEN[name] = "UNNAMED-1"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+# While we could have a panel attached to HDMI, we only use the default
+# panel isntead.
+SRC_URI_remove = "file://hdmi-a-1-270.cfg"
+# Our DPI panel shows up as "UNNAMED-1"
+SRC_URI += "file://unnamed.cfg"
--- /dev/null
+[output]
+name=UNNAMED-1
+transform=270
-# OVERRIDES save us some c'n'p below ...
-OVERRIDES_prepend_qemux86 = "customwestonini:"
-OVERRIDES_prepend_qemux86-64 = "customwestonini:"
-# intel-corei7-64 ??
-
-python() {
- if "customwestonini" in d.getVar("OVERRIDES", True).split(":"):
- # DRM backend disabled for now to allow compatibility with VirtualBox
- # and VMWare Player. It may be re-enabled if running on QEMU for
- # potentially increased performance.
- #backend=drm-backend.so
- d.delVarFlag("WESTONCORE", "backend")
-
- d.setVarFlag("WESTONOUTPUT1","agl_screen", "SCREEN_QEMU")
-}
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+# OVERRIDES save us some c'n'p below ...
+OVERRIDES_prepend_qemux86 = "virtualmachine:"
+OVERRIDES_prepend_qemux86-64 = "virtualmachine:"
+# Switch to the Virtual section that we have when a valid DRM device is found
+SRC_URI_remove_virtualmachine = "file://hdmi-a-1-270.cfg"
+SRC_URI_append_virtualmachine = " file://virtual.cfg"
-SCREEN_QEMU[name]?="Virtual-1"
+[output]
+name=Virtual-1
#mode=1920x1080
#mode=1600x1200
#mode=1680x1050
#mode=1400x1050
-SCREEN_QEMU[mode]?="1600x900"
+mode=1600x900
#mode=1280x1024
#mode=1440x900
#mode=1280x960
#mode=800x600
#mode=848x480
#mode=640x480
-
-do_generate_weston_init[vardeps] += "SCREEN_QEMU"
+++ /dev/null
-[core]
-shell=ivi-shell.so
-# DRM backend disabled for now to allow compatibility with VirtualBox
-# and VMWare Player. It may be re-enabled if running on QEMU for
-# potentially increased performance.
-#backend=drm-backend.so
-
-[ivi-shell]
-ivi-module=ivi-controller.so
-ivi-input-module=ivi-input-controller.so
-
-[output]
-name=Virtual-1
-#mode=1920x1080
-#mode=1600x1200
-#mode=1680x1050
-#mode=1400x1050
-mode=1600x900
-#mode=1280x1024
-#mode=1440x900
-#mode=1280x960
-#mode=1360x768
-#mode=1280x800
-#mode=1280x768
-#mode=1280x720
-#mode=800x600
-#mode=848x480
-#mode=640x480
-#Generate a weston.ini file:
+##Generate a weston.ini file:
-To generate the weston.ini file:
+To modify any of the default sections (core, shell, ivi-shell), add a
+do_configure() function to your bbappend:
'''
-[core]
-backend=drm-backend.so
-shell=desktop-shell.so
-'''
-
-Just create a Variable Flag:
+do_configure() {
+ echo repaint-window=34 >> ${WORKDIR}/core.cfg
+ echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg
+ echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg
+}
'''
-WESTONCORE[backend]??="drm-backend.so"
-WESTONCORE[shell]??="desktop-shell.so"
-'''
-
-And add it to the Variable Flag WESTONSECTION, with the name of the section:
+or:
'''
-WESTONSECTION[WESTONCORE]?="core"
+do_configure() {
+ sed -i -e 's/drm-backend/fbdev-backend/' ${WORKDIR}/core.cfg
+}
'''
-#You can custumize weston.ini by create a weston-ini-conf.bbappend:
+To change the display from the default assumption of an HDMI-1-A connected
+screen that needs to be rotated 270 degrees:
'''
-WESTONCORE[repaint-window] ??= "34"
+SRC_URI_remove = "file://hdmi-a-1-270.cfg"
+SRC_URI += "file://hdmi-a-1-90.cfg"
'''
-This will generate weston.ini file:
-
+To add new sections just list them in SRC_URI:
'''
-[core]
-backend=drm-backend.so
-shell=ivi-shell.so
-repaint-window=34
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://dsi.cfg"
'''
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}
--- /dev/null
+[core]
+shell=ivi-shell.so
+backend=drm-backend.so
+require-input=false
--- /dev/null
+# A display is connected to HDMI-A-1 and needs to be rotated 270 degrees
+# to have a proper orientation of the homescreen. For example the various sizes
+# of the GeChic display or the Dell display.
+[output]
+name=HDMI-A-1
+transform=270
--- /dev/null
+# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees
+# to have a proper orientation of the homescreen. For example, the 'eGalax'
+# display used in some instances.
+[output]
+name=HDMI-A-1
+transform=90
--- /dev/null
+[ivi-shell]
+ivi-input-module=ivi-input-controller.so
+ivi-module=ivi-controller.so
+++ /dev/null
-require screen_dell.inc
-require screen_qemu.inc
-require screen_GeChic.inc
-require screen_DSI.inc
-require screen_eGalax.inc
+++ /dev/null
-SCREEN_DSI[name] ?= "DSI-1"
-SCREEN_DSI[transform] ?= "270"
-
-do_generate_weston_init[vardeps] += "SCREEN_DSI"
+++ /dev/null
-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"
-
-do_generate_weston_init[vardeps] += "SCREEN_GECHIC"
+++ /dev/null
-SCREEN_DELL[name]?="HDMI-A-1"
-SCREEN_DELL[transform]?="180"
-
-do_generate_weston_init[vardeps] += "SCREEN_DELL"
+++ /dev/null
-SCREEN_eGalax[name] ?= "HDMI-A-1"
-SCREEN_eGalax[transform] ?= "90"
-
-do_generate_weston_init[vardeps] += "SCREEN_eGalax"
--- /dev/null
+[shell]
+locking=true
+panel-location=none