diff --git a/recipes-openharmony/openharmony/files/openharmony-preinit b/recipes-openharmony/openharmony/files/openharmony-preinit index 85478abb8f27264cfaacbc7058db1b161d939d84..c5cb947a473fb4aaa91818d29f096d1bbfbdcfa8 100644 --- a/recipes-openharmony/openharmony/files/openharmony-preinit +++ b/recipes-openharmony/openharmony/files/openharmony-preinit @@ -116,6 +116,27 @@ fi # - "trigger early-boot", # - "trigger boot" +# trigger: post-fs +# "start udevd_service", +# "sleep 1", +# "start multimodalinputservice", +# "start mmi_uinput_service", +# "sleep 2", +# "export XDG_RUNTIME_DIR /data/weston", +# "export XKB_CONFIG_ROOT /etc/xkb", +# "export XKB_CONFIG_EXTRA_PATH /etc/xkb", +# "mkdir /data/weston", +# "chmod 777 /data/weston", +# "start weston", +# "trigger weston_start", +# "sleep 2", +# "exec /system/bin/udevadm trigger", +# "exec /system/bin/udevadm settle --timeout=30" +if systemctl -q is-enabled weston.service; then + /system/bin/weston -c /system/etc/weston.ini -B drm-backend.so --tty=1 --use-pixman & + sleep "$STARTUP_CMD_SLEEP" +fi + # trigger: late-fs # "name" : "installs", # "path" : ["/system/bin/installs"], diff --git a/recipes-openharmony/openharmony/files/weston.service b/recipes-openharmony/openharmony/files/weston.service new file mode 100644 index 0000000000000000000000000000000000000000..5c82db22de35e34b92b846025d9ba91c4a3beaf9 --- /dev/null +++ b/recipes-openharmony/openharmony/files/weston.service @@ -0,0 +1,10 @@ +[Unit] +Description=OpenHarmony Weston window manager service + +[Service] +Type=oneshot +ExecStart=/bin/echo "OpenHarmony Weston Service" +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index 6c53f53fb7399ac56f9883311aee2e5c700906f3..231d9b25c3a27599ae5ded423ea8e8bec4ed9b02 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb @@ -1299,7 +1299,15 @@ FILES:${PN}-graphic = " \ ${libdir}/module/libdisplay*${SOLIBS} \ ${libdir}/module/libwindow*${SOLIBS} \ ${bindir}/bootanimation \ + ${systemd_unitdir}/weston.service \ " +SYSTEMD_PACKAGES += "${PN}-graphic" +SYSTEMD_SERVICE:${PN}-graphic = "weston.service" +SRC_URI += "file://weston.service" +do_install:append() { + install -d ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/weston.service ${D}${systemd_unitdir}/system/ +} RDEPENDS:${PN}-graphic += "musl libcxx" RDEPENDS:${PN}-graphic += "${PN}-multimodalinput ${PN}-hilog ${PN}-libutils ${PN}-thirdparty-weston ${PN}-thirdparty-wayland ${PN}-thirdparty-libffi ${PN}-thirdparty-libinput" RDEPENDS:${PN}-graphic += "${PN}-graphic ${PN}-multimedia-media ${PN}-ipc ${PN}-display-gralloc ${PN}-samgr ${PN}-thirdparty-libdrm ${PN}-thirdparty-libevdev"