|
|
|
|
|
|
|
## How to Install hdc tool on the host
|
|
|
|
From the ohoe environment, bitbake hdc-native. Then copy bins and
|
|
|
|
libs from `${OHOE_DIR}/build/tmp-musl/sysroots-components/x86_64/hdc-native/` to your libs
|
|
|
|
and bins directories on your host (e.g. `/usr/local/bin` and `/usr/local/lib`)
|
|
|
|
|
|
|
|
From the ohoe environment, bitbake hdc-native. Then copy bins and libs from `${OHOE_DIR}/build/tmp-musl/sysroots-components/x86_64/hdc-native/` to your libs and bins directories on your host (e.g. `/usr/local/bin` and `/usr/local/lib`).
|
|
|
|
|
|
|
|
Or add `${OHOE_DIR}/build/tmp-musl/work/x86_64-linux/hdc-native/1.1.1l-r0/build/`to your $PATH
|
|
|
|
|
|
|
|
## Building ACTS
|
|
|
|
|
| ... | ... | @@ -21,6 +21,7 @@ ${OHOE_DIR}/build/tmp-musl/work/cortexa7-neon-vfpv4-oe-linux-musleabi/openharmon |
|
|
|
## Running ACTS
|
|
|
|
|
|
|
|
To be able to run ACTS against on the target you need to start the target:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ runqemu publicvnc serialstdio
|
|
|
|
```
|
| ... | ... | @@ -35,9 +36,9 @@ Connect OK |
|
|
|
From this point on you can use `hdc` tool to execute commands on the target, install hap packages, transfer files, etc.
|
|
|
|
|
|
|
|
### Option 1: using XDevice
|
|
|
|
XDevice is a module of the OpenHarmony test framework. It provides a tool to
|
|
|
|
connect to the device target from your host, and run ACTS test suites.
|
|
|
|
It can be installed on the host as follows:
|
|
|
|
|
|
|
|
XDevice is a module of the OpenHarmony test framework. It provides a tool to connect to the device target from your host, and run ACTS test suites. It can be installed on the host as follows:
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ cd ${OHOE_DIR}/build/tmp-musl/work/cortexa7-neon-vfpv4-oe-linux-musleabi/openharmony-standard/3.0-r0/src/test/xdevice
|
|
|
|
$ sudo python3 setup.py install
|
| ... | ... | @@ -45,8 +46,8 @@ $ cd extension |
|
|
|
$ sudo python3 setup.py install # Installing the extension
|
|
|
|
```
|
|
|
|
|
|
|
|
XDevice requires the `hdc_std` tool on the host. If `hdc` is already available,
|
|
|
|
a symlink can be created for `hdc_std`.
|
|
|
|
XDevice requires the `hdc_std` tool on the host. If `hdc` is already available, a symlink can be created for `hdc_std`.
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ sudo ln -s /usr/local/hdc /usr/local/hdc_std
|
|
|
|
```
|
| ... | ... | @@ -87,16 +88,15 @@ total cases:7;failure 0,error 0,pass 7; consuming 4.27S |
|
|
|
```
|
|
|
|
|
|
|
|
## Graphical demo
|
|
|
|
You can connect to the graphical output of oniro-oh using vnc. Make sure to use
|
|
|
|
the `publicvnc` flag when running the image. You will be able to connect to it
|
|
|
|
using a vnc client such as Remmina using the address `127.0.0.1:5900`.
|
|
|
|
|
|
|
|
You can connect to the graphical output of oniro-oh using vnc. Make sure to use the `publicvnc` flag when running the image. You will be able to connect to it using a vnc client such as Remmina using the address `127.0.0.1:5900`.
|
|
|
|
|
|
|
|
### Running some demo HAP applications
|
|
|
|
Some demo HAP applications are generated in the same directory you can find the
|
|
|
|
Launcher and SystemUI haps: `build/tmp-musl/work/cortexa7-neon-vfpv4-oe-linux-musleabi/openharmony-standard/3.0-r0/src/applications/standard/hap`.
|
|
|
|
|
|
|
|
After installing a demo and starting the corresponding ability, you will see
|
|
|
|
the running application shown on your VNC client.
|
|
|
|
Some demo HAP applications are generated in the same directory you can find the Launcher and SystemUI haps: `build/tmp-musl/work/cortexa7-neon-vfpv4-oe-linux-musleabi/openharmony-standard/3.0-r0/src/applications/standard/hap`.
|
|
|
|
|
|
|
|
After installing a demo and starting the corresponding ability, you will see the running application shown on your VNC client.
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ hdc install Clock_Demo.hap
|
|
|
|
[Info]App install path:/home/francesco/ohoe/build/workspace/sources/openharmony-standard/applications/standard/hap/Clock_Demo.hap, queuesize:0, msg:install bundle successfully.
|
| ... | ... | @@ -106,7 +106,6 @@ start ability successfully. |
|
|
|
$ hdc shell bm uninstall -n ohos.samples.clock
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ hdc install Calc_Demo.hap
|
|
|
|
[Info]App install path:/home/francesco/ohoe/build/workspace/sources/openharmony-standard/applications/standard/hap/Calc_Demo.hap, queuesize:0, msg:install bundle successfully.
|
| ... | ... | @@ -117,7 +116,6 @@ $ hdc shell bm uninstall -n com.example.distributedcalc |
|
|
|
uninstall bundle successfully.
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ hdc install Ecg_Demo.hap
|
|
|
|
[Info]App install path:/home/francesco/ohoe/build/workspace/sources/openharmony-standard/applications/standard/hap/Ecg_Demo.hap, queuesize:0, msg:install bundle successfully.
|
| ... | ... | @@ -131,7 +129,7 @@ $ hdc shell bm uninstall -n ohos.samples.ecg |
|
|
|
|
|
|
|
### Handling of users and directories permissions/ownership
|
|
|
|
|
|
|
|
Note: In meta-openharmony we don't use OpenHarmony init system. It is responsible for creation of some directories, handling permissions and running services with appropriate UIDs/GIDs. Currently in meta-openharmony we run everything as root. OpenHarmony init system uses `*.cfg` files that can be used as a reference.
|
|
|
|
Note: In meta-openharmony we don't use OpenHarmony init system. It is responsible for creation of some directories, handling permissions and running services with appropriate UIDs/GIDs. Currently in meta-openharmony we run everything as root. OpenHarmony init system uses `\\\*.cfg` files that can be used as a reference.
|
|
|
|
|
|
|
|
- OpenHarmony uses couple of UIDs/GIDs for running it's services
|
|
|
|
- currently in meta-openharmony we have everything run as root, which causes some issues
|
| ... | ... | @@ -142,36 +140,39 @@ Note: In meta-openharmony we don't use OpenHarmony init system. It is responsibl |
|
|
|
|
|
|
|
Note: In meta-openharmony we settled for systemd units for managing the services. As it turned out the ordering of the services and even time between subsequent services is important.
|
|
|
|
|
|
|
|
Currently we have a workaround for that which is services are started from a single script
|
|
|
|
called `openharmony-preinit` checking if the corresponding service systemd dummy unit is enabled.
|
|
|
|
Currently we have a workaround for that which is services are started from a single script called `openharmony-preinit` checking if the corresponding service systemd dummy unit is enabled.
|
|
|
|
|
|
|
|
- Fix services startup
|
|
|
|
|
|
|
|
### Installation of the Launcher and SystemUI haps
|
|
|
|
|
|
|
|
Note: As a rule, in meta-openharmony we didn't want to include any pre-built stuff. That had to be compromised on couple of occasions. For the ACTS tests to work repeatedly Launcher haps and SystemUI haps, which are not included in the openharmony-standard recipe. Those can be found either in the OpenHarmony code-v3.0.1-LTS release package, on [gitee](https://gitee.com/openharmony/applications_hap), and also generated after a build in the
|
|
|
|
directory:
|
|
|
|
Note: As a rule, in meta-openharmony we didn't want to include any pre-built stuff. That had to be compromised on couple of occasions. For the ACTS tests to work repeatedly Launcher haps and SystemUI haps, which are not included in the openharmony-standard recipe. Those can be found either in the OpenHarmony code-v3.0.1-LTS release package, on [gitee](https://gitee.com/openharmony/applications_hap), and also generated after a build in the directory:
|
|
|
|
|
|
|
|
```
|
|
|
|
build/tmp-musl/work/cortexa7-neon-vfpv4-oe-linux-musleabi/openharmony-standard/3.0-r0/src/applications/standard/hap
|
|
|
|
```
|
|
|
|
|
|
|
|
- Make the Launcher and SystemUI hap packages built in openharmony-standard from sources and included in the image
|
|
|
|
|
|
|
|
## Tips and tricks
|
|
|
|
|
|
|
|
### How to make devtool work
|
|
|
|
|
|
|
|
- checkout the `wip/devtool` branch
|
|
|
|
- `devtool modify openharmony-standard`
|
|
|
|
- copy `recipe-sysroot-native` directory into `build/workspace/sources`
|
|
|
|
- Add the following line to /home/francesco/ohoe/build/workspace/appends/openharmony-standard_3.0.bbappend:
|
|
|
|
|
|
|
|
```
|
|
|
|
EXTERNALSRC_BUILD:pn-openharmony-standard = "${OHOE_DIR}/build/workspace/sources/openharmony-standard/out/ohos-arm-release"
|
|
|
|
```
|
|
|
|
|
|
|
|
- `bitbake openharmony-standard-image`
|
|
|
|
- cherry_pick_sources is resetting some patched files in ${S}/device/hihope/hardware/, discard changes from the workspace:
|
|
|
|
|
|
|
|
```
|
|
|
|
git checkout HEAD -- device/hihope/hardware/display/BUILD.gn
|
|
|
|
git checkout HEAD -- device/hihope/hardware/display/src/display_gralloc/display_gralloc_gbm.c
|
|
|
|
```
|
|
|
|
Now you can modify the sources in `build/workspace/sources/openharmony-standard`.
|
|
|
|
When you build `bitbake openharmony-standard-image` it will recompile using the
|
|
|
|
modified sources from the workspace. |
|
|
|
|
|
|
|
Now you can modify the sources in `build/workspace/sources/openharmony-standard`. When you build `bitbake openharmony-standard-image` it will recompile using the modified sources from the workspace. |
|
|
\ No newline at end of file |