Skip to content
Snippets Groups Projects
Commit 37983a0a authored by Stefan Schmidt's avatar Stefan Schmidt
Browse files

Merge branch 'esben/systemd-integration' into 'kirkstone'

Systemd service integration and stability improvements

See merge request eclipse/oniro-oh/meta-openharmony!109
parents 90846bea 7d2916b1
No related branches found
No related tags found
1 merge request!109Systemd service integration and stability improvements
Pipeline #16369 passed
Showing
with 229 additions and 53 deletions
......@@ -195,7 +195,7 @@ eca:
- echo "RM_WORK_EXCLUDE += \"${RECIPE}\"" >> conf/auto.conf
- echo "OPENHARMONY_VERSION = \"${OPENHARMONY_VERSION}\"" >> conf/auto.conf
script:
- time bitbake "${RECIPE}"
- time bitbake ${RECIPE}
after_script:
# Update sstate-cache mirror
- if [ -n "$CI_ONIRO_RUNNER_PERSISTENT_STORAGE" -a -d build/sstate-cache ] ; then
......@@ -309,12 +309,9 @@ mirror_ch:
fi ;
done
# Build OpenHarmony images using normal CI runners
build:
# Build using normal CI runners
.build:
stage: build
needs:
- job: fetch
artifacts: false
rules:
- if: $CHINA_CI != null
# Don't use CI resources on normal builds when doing China builds
......@@ -323,15 +320,42 @@ build:
extends: .bitbake
after_script:
- !reference [.bitbake, after_script]
- time repo/oe-core/scripts/pybootchartgui/pybootchartgui.py build/tmp-*/buildstats/* -o build/tmp-*/buildstats
- repo/oe-core/scripts/pybootchartgui/pybootchartgui.py build/tmp-*/buildstats/* -o build/tmp-*/buildstats
tags:
- cpu.heavy
# Build OpenHarmony toolchain recipes
toolchain:
extends: .build
needs:
- job: fetch
artifacts: false
variables:
DISTRO: oniro-openharmony-linux
OPENHARMONY_VERSION: "3.0"
RECIPE: oniro-openharmony-toolchain oniro-openharmony-bundle
parallel:
matrix:
- DISTRO: [oniro-openharmony-linux]
OPENHARMONY_VERSION: ["3.0"]
MACHINE: [qemuarma7, raspberrypi4-64]
RECIPE: [oniro-openharmony-toolchain, oniro-openharmony-bundle, openharmony-standard-image, openharmony-tools]
- MACHINE: [qemuarma7, raspberrypi4-64]
artifacts:
paths:
- build/tmp-*/deploy/sdk
- build/tmp-*/buildstats*
expire_in: 1 month
# Build OpenHarmony images
build:
extends: .build
needs:
- job: toolchain
artifacts: false
variables:
DISTRO: oniro-openharmony-linux
OPENHARMONY_VERSION: "3.0"
RECIPE: openharmony-standard-image openharmony-tools
parallel:
matrix:
- MACHINE: [qemuarma7, raspberrypi4-64]
artifacts:
paths:
- build/tmp-*/deploy/images/${MACHINE}
......@@ -355,12 +379,13 @@ ptest:
extends: .bitbake
tags:
- cpu.heavy
variables:
DISTRO: oniro-openharmony-linux
OPENHARMONY_VERSION: "3.0"
RECIPE: openharmony-standard-image-tests
parallel:
matrix:
- DISTRO: [oniro-openharmony-linux]
OPENHARMONY_VERSION: ["3.0"]
MACHINE: [qemuarma7]
RECIPE: [openharmony-standard-image-tests]
- MACHINE: [qemuarma7]
artifacts:
paths:
- build/tmp-*/work/*/*/*/testimage
......@@ -510,7 +535,7 @@ ohos:
optional: true
- job: ohos_fetch
artifacts: true
- job: build
- job: toolchain
artifacts: true
parallel:
matrix:
......
KERNEL=="ashmem", MODE="0666"
KERNEL=="binder*", MODE="0666"
ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", MODE="0666"
[Unit]
Description=OpenHarmony Account Manager service
Description=OpenHarmony Account Manager service (SA: 200)
Requires=samgr.service
After=samgr.service
#Wants=param.service
#After=param.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony SystemAbilityFramework Service"
RemainAfterExit=yes
Type=notify
User=system
Group=system
SupplementaryGroups=shell
LimitNICE=40
ExecStart=/usr/bin/sa_main /system/profile/accountmgr.xml
[Install]
WantedBy=multi-user.target
[Unit]
Description=OpenHarmony Appspawn service
Description=OpenHarmony Appspawn service (SA: 1401 180 3703 3008)
Requires=samgr.service
After=samgr.service
Wants=param.service
After=param.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
Requires=dev-dri-card0.device
After=dev-dri-card0.device
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony Appspawn Service"
RemainAfterExit=yes
Type=notify
Environment="XDG_RUNTIME_DIR=/data/weston"
Environment="XKB_CONFIG_ROOT=/etc/openharmony/xkb"
Environment="XKB_CONFIG_EXTRA_PATH=/etc/openharmony/xkb"
ExecStartPre=install -m 0755 -d /run/openharmony/appspawn
LimitNICE=40
ExecStart=/usr/bin/appspawn
[Install]
WantedBy=multi-user.target
[Unit]
Description=OpenHarmony Device Authentication daemon
Description=OpenHarmony Device Authentication daemon (SA: 4701)
Requires=samgr.service
After=samgr.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
# Requires SA: 3510
Wants=huks.service
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony Device Authentication Service"
RemainAfterExit=yes
Type=notify
User=system
Group=system
SupplementaryGroups=shell
LimitNICE=40
ExecStart=/usr/bin/deviceauth_service
[Install]
WantedBy=multi-user.target
[Unit]
Description=OpenHarmony Distributed Data service
Description=OpenHarmony Distributed Data service (SA: 1301)
Requires=samgr.service
After=samgr.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
# Requires SA: 4700
Wants=dsoftbus.service
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony Distributed Data Service"
RemainAfterExit=yes
Type=notify
User=system
Group=system
SupplementaryGroups=shell readproc
CapabilityBoundingSet=CAP_DAC_READ_SEARCH
LimitNICE=40
ExecStart=/usr/bin/sa_main /system/profile/distributeddata.xml
[Install]
WantedBy=multi-user.target
[Unit]
Description=OpenHarmony Distributed Schedule service
Description=OpenHarmony Distributed Schedule service (SA: 1401)
Requires=samgr.service
After=samgr.service
#Wants=param.service
#After=param.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
# Requires SA: 4700
Wants=dsoftbus.service
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony Distributed Schedule Service"
RemainAfterExit=yes
Type=notify
User=system
Group=system
SupplementaryGroups=shell
LimitNICE=40
ExecStart=/usr/bin/sa_main /system/profile/distributedsched.xml
[Install]
WantedBy=multi-user.target
[Unit]
Description=OpenHarmony DSoftBus services
Description=OpenHarmony DSoftBus services (SA: 1401 4700)
Requires=samgr.service
After=samgr.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
# Requires SA: 3299
Wants=foundation.service
# Requires SA: 3510
Wants=huks.service
# Requires SA: 4701
Wants=deviceauth.service
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony DSoftBus Service"
RemainAfterExit=yes
Type=notify
User=system
Group=system
SupplementaryGroups=shell
LimitNICE=40
ExecStart=/usr/bin/sa_main /system/profile/softbus_server.xml
[Install]
WantedBy=multi-user.target
......@@ -2,9 +2,15 @@
Description=OpenHarmony FaultLogger daemon
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony FaultLogger Service"
RemainAfterExit=yes
Type=notify
ExecStartPre=!install -o root -g system -m 0755 -d /run/openharmony/faultlogger
ExecStartPre=!install -o system -g log -m 0770 -d /data/log
ExecStartPre=!install -o system -g system -m 0770 -d /data/log/faultlog
ExecStartPre=!install -o system -g system -m 0770 -d /data/log/faultlog/temp
User=root
Group=system
SupplementaryGroups=log
ExecStart=/usr/bin/faultloggerd
[Install]
WantedBy=multi-user.target
[Unit]
Description=OpenHarmony foundation service
Description=OpenHarmony foundation service (SA: 180 182 401 403 501 3203 3299 3301 3302 3308 3501 3702 4010 4802)
Requires=samgr.service
After=samgr.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
# Requires SA: 4700
Wants=dsoftbus.service
# Requires SA: 4701
Wants=deviceauth.service
# Requires SA: 511
Wants=installs.service
# Requires SA: 3510
Wants=huks.service
# Requires SA: 1301
Wants=distributed_data.service
# Requires SA: 3202 5001 -- but from where?
Requires=dev-dri-card0.device
After=dev-dri-card0.device
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony foundation Service"
RemainAfterExit=yes
Type=notify
Environment="XDG_RUNTIME_DIR=/data/weston"
Environment="XKB_CONFIG_ROOT=/etc/openharmony/xkb"
Environment="XKB_CONFIG_EXTRA_PATH=/etc/openharmony/xkb"
User=system
Group=system
CapabilityBoundingSet=CAP_SYS_PTRACE CAP_KILL
LimitNICE=40
ExecStart=/usr/bin/sa_main /system/profile/foundation.xml
[Install]
WantedBy=multi-user.target
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
[Unit]
Description=OpenHarmony Device Connector Daemon service
Wants=hdcd.socket
After=hdcd.socket
Wants=param.service
After=param.service
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony Device Connector Daemon Service"
RemainAfterExit=yes
Type=exec
ExecStart=/usr/bin/hdcd -t -l 3
[Install]
WantedBy=multi-user.target
[Unit]
Description=OpenHarmony Device Connector Daemon socket
[Socket]
ExecStartPre=install -o system -g system -m 775 -d /run/openharmony/hdc
ListenSequentialPacket=/run/openharmony/hdc/FOOBAR
SocketUser=system
SocketGroup=system
SocketMode=0660
[Unit]
Description=OpenHarmony hilog control socket
[Socket]
ExecStartPre=install -o logd -g logd -m 775 -d /run/openharmony/hilog
ListenSequentialPacket=/run/openharmony/hilog/control
SocketUser=logd
SocketGroup=logd
# This mimics OHOS init config, although hilogd changes it to 0666 on startup
SocketMode=0600
Service=hilogd.service
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
[Unit]
Description=OpenHarmony hilog input socket
[Socket]
ExecStartPre=install -o logd -g logd -m 775 -d /run/openharmony/hilog
ListenDatagram=/run/openharmony/hilog/input
SocketUser=logd
SocketGroup=logd
SocketMode=0666
Service=hilogd.service
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
[Unit]
Description=OpenHarmony hilog daemon
Requires=hilogd-input.socket hilogd-control.socket
After=hilogd-input.socket hilogd-control.socket
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony hilog Service"
RemainAfterExit=yes
Type=notify
ExecStartPre=!install -o system -g log -m 0770 -d /data/log
ExecStartPre=!install -o logd -g log -m 0750 -d /data/log/hilog
User=logd
Group=log
ExecStart=/usr/bin/hilogd
ExecStartPost=hilog -G 16M
[Install]
WantedBy=multi-user.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment