Skip to content
Snippets Groups Projects
Commit 8eef83b2 authored by Esben Haabendal's avatar Esben Haabendal
Browse files

Change openharmony override into a distro feature (and override)


Instead of hardcoding an `openharmony` override, this introduce an
`openharmony` distro feature which (when enabled) will add a
`df-openharmony` override.

The `openharmony` distro feature will also gate the `openharmony-3.0`
and `openharmony-3.1` overrides, so they are only active when `openharmony`
is enabled.

Signed-off-by: default avatarEsben Haabendal <esben.haabendal@huawei.com>
parent 27f4df62
No related branches found
No related tags found
1 merge request!36Prepare for integration into meta-oniro-core
...@@ -4,9 +4,20 @@ ...@@ -4,9 +4,20 @@
# OpenHarmony OS version # OpenHarmony OS version
OPENHARMONY_VERSION ?= "3.1" OPENHARMONY_VERSION ?= "3.1"
OPENHARMONY_OVERRIDES = "openharmony-${OPENHARMONY_VERSION}:openharmony"
OPENHARMONY_VERSION_FULL = "${OPENHARMONY_VERSION}" OPENHARMONY_VERSION_FULL = "${OPENHARMONY_VERSION}"
OPENHARMONY_VERSION_FULL:openharmony-3.0 = "3.0.1" OPENHARMONY_VERSION_FULL:openharmony-3.0 = "3.0.1"
OPENHARMONY_VERSION_FULL:openharmony-3.1 = "3.1.1" OPENHARMONY_VERSION_FULL:openharmony-3.1 = "3.1.1"
# Generic and version specific OpenHarmony DISTROOVERRIDES
# Enabling "openharmony" distro feature activates the "df-openharmony"
# override, which can therefore be used for overriding stuff independent of
# OpenHarmony version.
# For overriding for a specific OpenHarmony version, use e.g. "openharmony-3.0"
# OpenHarmony 3.0 specific override, And similar for other supported versions.
INHERIT += "distrooverrides"
DISTRO_FEATURES_OVERRIDES += "openharmony"
OPENHARMONY_OVERRIDES = ""
OPENHARMONY_OVERRIDES:df-openharmony = ":openharmony-${OPENHARMONY_VERSION}"
DISTROOVERRIDES:append = "${OPENHARMONY_OVERRIDES}"
PREFERRED_VERSION_openharmony-standard = "${OPENHARMONY_VERSION}" PREFERRED_VERSION_openharmony-standard = "${OPENHARMONY_VERSION}"
...@@ -8,7 +8,7 @@ DISTRO_VERSION = "1.99.99" ...@@ -8,7 +8,7 @@ DISTRO_VERSION = "1.99.99"
# OpenHarmony OS version # OpenHarmony OS version
require include/openharmony.inc require include/openharmony.inc
DISTROOVERRIDES:append = ":${OPENHARMONY_OVERRIDES}" DISTRO_FEATURES:append = " openharmony"
# LLVM/Clang toolchain # LLVM/Clang toolchain
TOOLCHAIN = "clang" TOOLCHAIN = "clang"
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
BASEVER:openharmony = "1.2.0" BASEVER:df-openharmony = "1.2.0"
SRCREV:openharmony = "040c1d16b468c50c04fc94edff521f1637708328" SRCREV:df-openharmony = "040c1d16b468c50c04fc94edff521f1637708328"
LIC_FILES_CHKSUM:openharmony = "file://COPYRIGHT;md5=f95ee848a08ad253c04723da00cedb01" LIC_FILES_CHKSUM:df-openharmony = "file://COPYRIGHT;md5=f95ee848a08ad253c04723da00cedb01"
FILESEXTRAPATHS:prepend:openharmony := "${THISDIR}/openharmony-${OPENHARMONY_VERSION}:" FILESEXTRAPATHS:prepend:df-openharmony := "${THISDIR}/openharmony-${OPENHARMONY_VERSION}:"
SRC_URI:append:openharmony = " file://openharmony-common.patch" SRC_URI:append:df-openharmony = " file://openharmony-common.patch"
SRC_URI:append:openharmony = " file://openharmony-linux-user.patch" SRC_URI:append:df-openharmony = " file://openharmony-linux-user.patch"
# This conflicts with libcap, so we have to go with libcap instead # This conflicts with libcap, so we have to go with libcap instead
#SRC_URI:append:openharmony = " file://openharmony-linux-user-capability_h.patch" #SRC_URI:append:df-openharmony = " file://openharmony-linux-user-capability_h.patch"
# As musl links with -nostdlib, we need to add linking with # As musl links with -nostdlib, we need to add linking with
# libclang_rt.builtins.a manually as needed # libclang_rt.builtins.a manually as needed
...@@ -22,9 +22,9 @@ LDFLAGS:append:toolchain-clang = " ${@bb.utils.contains('COMPILER_RT', '-rtlib=c ...@@ -22,9 +22,9 @@ LDFLAGS:append:toolchain-clang = " ${@bb.utils.contains('COMPILER_RT', '-rtlib=c
# with `-nostdinc` argument. # with `-nostdinc` argument.
# Possible fix is to rewrite the hooks implementation to use the musl internal # Possible fix is to rewrite the hooks implementation to use the musl internal
# atomic.h functions instead. # atomic.h functions instead.
#CFLAGS:append:openharmony = "-DHOOK_ENABLE" #CFLAGS:append:df-openharmony = "-DHOOK_ENABLE"
do_install:append:openharmony () { do_install:append:df-openharmony () {
for folder in ${MUSL_LDSO_PATHS}; do for folder in ${MUSL_LDSO_PATHS}; do
echo "${libdir}/${folder}" >> ${D}${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path echo "${libdir}/${folder}" >> ${D}${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path
done done
......
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
# GN function which was recently dropped, therefore downgrading GN to revision # GN function which was recently dropped, therefore downgrading GN to revision
# compatible with OpenHarmony # compatible with OpenHarmony
SRCREV:openharmony = "5da62d5e9d0f10cb8ece7c30563a6a214c78b68d" SRCREV:df-openharmony = "5da62d5e9d0f10cb8ece7c30563a6a214c78b68d"
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
# OpenHarmony relies on Android's ashmem, which is in staging and therefore # OpenHarmony relies on Android's ashmem, which is in staging and therefore
# the header is not installed by default # the header is not installed by default
do_install:append:openharmony() { do_install:append:df-openharmony() {
install ${S}/drivers/staging/android/uapi/ashmem.h ${D}${includedir}/linux install ${S}/drivers/staging/android/uapi/ashmem.h ${D}${includedir}/linux
} }
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto:" FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto:"
SRC_URI:append:openharmony = " file://ashmem.cfg" SRC_URI:append:df-openharmony = " file://ashmem.cfg"
SRC_URI:append:openharmony = " file://driver-add-hilog-and-hievent-buffer-management-drive.patch" SRC_URI:append:df-openharmony = " file://driver-add-hilog-and-hievent-buffer-management-drive.patch"
SRC_URI:append:openharmony = " file://driver-add-hilog-and-hievent-buffer-management-drive.cfg" SRC_URI:append:df-openharmony = " file://driver-add-hilog-and-hievent-buffer-management-drive.cfg"
SRC_URI:append:openharmony = " file://android_binder_ipc.cfg" SRC_URI:append:df-openharmony = " file://android_binder_ipc.cfg"
# #
# QEMU ARM Cortex-A7 # QEMU ARM Cortex-A7
......
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