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

openharmony-standard: adjust versions and model names for correct GetVerionId()


The GetVersionId() API allows ACTS and applications to find out about
details of the device and platform they run on. So far we adjusted only
a few parts of it, and not all of them have been correct.

The basic information is distributed on various code and config files.

With the updates below I can see the following output in the ACTS log
for Qemu:

the value of the deviceinfo versionId is :devboard/Eclipse Oniro Project/Eclipse Oniro/QEMU Arm Cortex-A7/OpenHarmony-3.0.1.0(LTS)/OHOS/Oniro OH/7/****/****

This translates to the following:
device type: devboard
company short name: Eclipse Oniro Project
brand name: Eclipse Oniro
product series name: Raspberry Pi 4
operating system and version number: OpenHarmony-3.0.1.0(LTS)
model: OHOS
internal software submodel: Oniro OH
system software API level: 7
difference version: ****
build type: ****

For Pi 4 it is the same, besides the different product series name.

Signed-off-by: default avatarStefan Schmidt <stefan.schmidt@huawei.com>
parent 338573ba
No related branches found
No related tags found
No related merge requests found
Pipeline #31668 failed
...@@ -25,7 +25,7 @@ ro.secure=1 ...@@ -25,7 +25,7 @@ ro.secure=1
security.perf_harden=1 security.perf_harden=1
ro.allow.mock.location=0 ro.allow.mock.location=0
ro.debuggable=1 ro.debuggable=1
ro.build.characteristics=default ro.build.characteristics=devboard
# There is some kind of special handling if this is "OHOS" # There is some kind of special handling if this is "OHOS"
ro.product.model=OHOS ro.product.model=OHOS
......
...@@ -171,21 +171,29 @@ GN_ARGS += 'host_toolchain="//oniro:host_toolchain"' ...@@ -171,21 +171,29 @@ GN_ARGS += 'host_toolchain="//oniro:host_toolchain"'
GN_ARGS += 'install_oniro_third_party=false' GN_ARGS += 'install_oniro_third_party=false'
# Configure HAL system parameters # Configure HAL system parameters
OHOS_MANUFACTURE = "Oniro Project" OHOS_MANUFACTURE = "Eclipse Oniro Project"
OHOS_BRAND = "Eclipse Oniro"
OHOS_SOFTWARE_MODEL = "Oniro OH" OHOS_SOFTWARE_MODEL = "Oniro OH"
OHOS_HARDWARE_MODEL = "${MACHINE}" OHOS_PRODUCT_SERIES = "${MACHINE}"
OHOS_HARDWARE_MODEL:qemuarma7 = "QEMU Arm Cortex-A7" OHOS_PRODUCT_SERIES:qemuarma7 = "QEMU Arm Cortex-A7"
OHOS_HARDWARE_MODEL:raspberrypi4-64 = "Raspberry Pi 4" OHOS_PRODUCT_SERIES:raspberrypi4-64 = "Raspberry Pi 4"
OHOS_HARDWARE_PROFILE = "aout:true,display:true" OHOS_HARDWARE_PROFILE = "aout:true,display:true"
OHOS_HARDWARE_PROFILE:qemuarma7 = "aout:false,display:true,camera:false,radio:false,bluetooth:false,WIFI:false,usbhost:false" OHOS_HARDWARE_PROFILE:qemuarma7 = "aout:false,display:true,camera:false,radio:false,bluetooth:false,WIFI:false,usbhost:false"
OHOS_HARDWARE_PROFILE:raspberrypi4-64 = "aout:false,display:false,camera:false,radio:false,bluetooth:false,WIFI:true,usbhost:false" OHOS_HARDWARE_PROFILE:raspberrypi4-64 = "aout:false,display:false,camera:false,radio:false,bluetooth:false,WIFI:true,usbhost:false"
OHOS_SDK_API_LEVEL = "7"
OHOS_FEATURE_VERSION = "1"
do_configure[prefuncs] += "do_configure_sysparam_hal" do_configure[prefuncs] += "do_configure_sysparam_hal"
do_configure_sysparam_hal() { do_configure_sysparam_hal() {
sed -i ${S}/base/startup/syspara_lite/hals/parameter/src/parameter_hal.cpp \ sed -i ${S}/base/startup/syspara_lite/hals/parameter/src/parameter_hal.cpp \
-e 's/\(static const char OHOS_MANUFACTURE\[\]\) =.*/\1 = {"${OHOS_MANUFACTURE}"};/' \ -e 's/\(static const char OHOS_MANUFACTURE\[\]\) =.*/\1 = {"${OHOS_MANUFACTURE}"};/' \
-e 's/\(static const char OHOS_BRAND\[\]\) =.*/\1 = {"${OHOS_BRAND}"};/' \
-e 's/\(static const char OHOS_PRODUCT_SERIES\[\]\) =.*/\1 = {"${OHOS_PRODUCT_SERIES}"};/' \
-e 's/\(static const char OHOS_SOFTWARE_MODEL\[\]\) =.*/\1 = {"${OHOS_SOFTWARE_MODEL}"};/' \ -e 's/\(static const char OHOS_SOFTWARE_MODEL\[\]\) =.*/\1 = {"${OHOS_SOFTWARE_MODEL}"};/' \
-e 's/\(static const char OHOS_HARDWARE_MODEL\[\]\) =.*/\1 = {"${OHOS_HARDWARE_MODEL}"};/' \
-e 's/\(static const char OHOS_HARDWARE_PROFILE\[\]\) =.*/\1 = {"${OHOS_HARDWARE_PROFILE}"};/' -e 's/\(static const char OHOS_HARDWARE_PROFILE\[\]\) =.*/\1 = {"${OHOS_HARDWARE_PROFILE}"};/'
sed -i ${S}/base/startup/syspara_lite/interfaces/innerkits/native/syspara/src/parameter.c \
-e 's/\(static const int OHOS_SDK_API_LEVEL\) =.*/\1 = ${OHOS_SDK_API_LEVEL};/'
sed -i ${S}/base/startup/syspara_lite/interfaces/innerkits/native/syspara/src/sysversion.c \
-e 's/\(static int g_featureVersion\) =.*/\1 = ${OHOS_FEATURE_VERSION};/'
} }
# OpenHarmony build system needs a bit of help to be able to find the right # OpenHarmony build system needs a bit of help to be able to find the right
......
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