diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-02-01 10:27:11 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-12 22:51:39 -0400 |
commit | 6e60e8b2b2bab889379b380a28a167a0edd9d1d3 (patch) | |
tree | f12f54d5ba8e74e67e5fad3651a1e125bb8f4191 /import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb | |
parent | 509842add85b53e13164c1569a1fd43d5b8d91c5 (diff) | |
download | talos-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.tar.gz talos-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.zip |
Yocto 2.3
Move OpenBMC to Yocto 2.3(pyro).
Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb new file mode 100644 index 000000000..345b58969 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb @@ -0,0 +1,69 @@ +SUMMARY = "Simple Xserver Init Script (no dm)" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +SECTION = "x11" +PR = "r31" + +SRC_URI = "file://xserver-nodm \ + file://Xserver \ + file://X11 \ + file://gplv2-license.patch \ + file://xserver-nodm.service.in \ + file://xserver-nodm.conf.in \ +" + +S = "${WORKDIR}" + +# Since we refer to ROOTLESS_X which is normally enabled per-machine +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit update-rc.d systemd distro_features_check + +REQUIRED_DISTRO_FEATURES = "x11" + +PACKAGECONFIG ??= "blank" +# dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG +PACKAGECONFIG[blank] = "" +PACKAGECONFIG[nocursor] = "" + +do_install() { + install -d ${D}${sysconfdir}/default + install xserver-nodm.conf.in ${D}${sysconfdir}/default/xserver-nodm + install -d ${D}${sysconfdir}/xserver-nodm + install Xserver ${D}${sysconfdir}/xserver-nodm/Xserver + install -d ${D}${sysconfdir}/X11/Xsession.d + install X11/Xsession.d/* ${D}${sysconfdir}/X11/Xsession.d/ + install X11/Xsession ${D}${sysconfdir}/X11/ + + BLANK_ARGS="${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}" + NO_CURSOR_ARG="${@bb.utils.contains('PACKAGECONFIG', 'nocursor', '-nocursor', '', d)}" + if [ "${ROOTLESS_X}" = "1" ] ; then + XUSER_HOME="/home/xuser" + XUSER="xuser" + else + XUSER_HOME=${ROOT_HOME} + XUSER="root" + fi + sed -i "s:@HOME@:${XUSER_HOME}:; s:@USER@:${XUSER}:; s:@BLANK_ARGS@:${BLANK_ARGS}:" \ + ${D}${sysconfdir}/default/xserver-nodm + sed -i "s:@NO_CURSOR_ARG@:${NO_CURSOR_ARG}:" ${D}${sysconfdir}/default/xserver-nodm + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/xserver-nodm.service.in ${D}${systemd_unitdir}/system/xserver-nodm.service + sed -i "s:@USER@:${XUSER}:" ${D}${systemd_unitdir}/system/xserver-nodm.service + fi + + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + install -d ${D}${sysconfdir}/init.d + install xserver-nodm ${D}${sysconfdir}/init.d + fi +} + +RDEPENDS_${PN} = "xinit ${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}" + +INITSCRIPT_NAME = "xserver-nodm" +INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ." +SYSTEMD_SERVICE_${PN} = "xserver-nodm.service" + +RCONFLICTS_${PN} = "xserver-common (< 1.34-r9) x11-common" |