Skip to content

Commit

Permalink
Generate author certificate and security profile manually.
Browse files Browse the repository at this point in the history
* Remove automatic certificate generation and security profiles with hardcoded passwords from docker images.
* Describe building the Tizen lighting-app app with the author certificate and security profile generation process.
  • Loading branch information
Jakub Latusek authored and jlatusek committed May 31, 2022
1 parent 5d28fe1 commit 5244626
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 22 deletions.
12 changes: 0 additions & 12 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,3 @@ RUN sed -i '/^TIZEN_SDK_DATA_PATH/d' $TIZEN_SDK_ROOT/sdk.info \
&& echo TIZEN_SDK_DATA_PATH=/home/$USERNAME/tizen-sdk-data >> $TIZEN_SDK_ROOT/sdk.info \
&& ln -sf /home/$USERNAME/.tizen-cli-config $TIZEN_SDK_ROOT/tools/.tizen-cli-config \
&& : # last line

USER $USERNAME
WORKDIR /home/$USERNAME

# Setup tizen studio CLI
RUN set -x \
# Generate authr certificate
&& $TIZEN_SDK_ROOT/tools/ide/bin/tizen certificate --alias=CHIP --name=CHIP [email protected] --password=chiptizen \
# Add new security profile
&& $TIZEN_SDK_ROOT/tools/ide/bin/tizen security-profiles add --active --name=CHIP --author=$HOME/tizen-sdk-data/keystore/author/author.p12 --password=chiptizen \
# Cleanup
&& : # last line
43 changes: 43 additions & 0 deletions examples/lighting-app/tizen/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# CHIP Tizen Lighting Example

## Building binary

Activating environment

```sh
source ./scripts/activate.sh
```

Generating tizen-arm-light

```sh
gn gen --check \
--fail-on-unused-args \
--export-compile-commands \
--root=$PW_PROJECT_ROOT/examples/lighting-app/tizen \
"--args=target_os=\"tizen\" target_cpu=\"arm\" tizen_sdk_root=\"$TIZEN_SDK_ROOT\" sysroot=\"$TIZEN_SDK_SYSROOT\"" \
$PW_PROJECT_ROOT/out/tizen-arm-light
```

Building tizen-arm-light

```sh
ninja -C $PW_PROJECT_ROOT/out/tizen-arm-light
```

## Preparing Tizen SDK certificate

For packaging the Tizen APP, there is a need to generate an author certificate
and security profile using the commands described below. Change password and
author data as needed.

```sh
tizen certificate --alias=CHIP --name=CHIP [email protected] --password=chiptizen

tizen security-profiles add --active --name=CHIP --author=$HOME/tizen-sdk-data/keystore/author/author.p12 --password=chiptizen
```

## Packaging APP

```sh
ninja -C $PW_PROJECT_ROOT/out/tizen-arm-light chip-lighting-app:tpk
```

## Installing TPK

Upload TPK package to device under test (DUT). Install it with `pkgcmd` as
Expand Down
10 changes: 0 additions & 10 deletions integrations/docker/images/chip-build-tizen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,3 @@ RUN set -x \
# Switch to the non-root user
USER $USER_NAME
WORKDIR $USER_HOME

# ------------------------------------------------------------------------------
# Setup tizen studio CLI
RUN set -x \
# Generate author certificate
&& tizen certificate --alias=CHIP --name=CHIP [email protected] --password=chiptizen \
# Add new security profile
&& tizen security-profiles add --active --name=CHIP --author=$HOME/tizen-sdk-data/keystore/author/author.p12 --password=chiptizen \
# Cleanup
&& : # last line

0 comments on commit 5244626

Please sign in to comment.