From c5bb46976065da6b3c1113823494ee10a0ecf441 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 1 Jul 2024 22:39:29 +0200 Subject: [PATCH 1/5] Update tizen to 8.0 --- .../stage-2/chip-build-tizen/Dockerfile | 4 +- .../tizen-sdk-installer/install.sh | 77 ++++++++----------- 2 files changed, 36 insertions(+), 45 deletions(-) diff --git a/integrations/docker/images/stage-2/chip-build-tizen/Dockerfile b/integrations/docker/images/stage-2/chip-build-tizen/Dockerfile index 4d907b1d6e48f4..c127296bac04f3 100644 --- a/integrations/docker/images/stage-2/chip-build-tizen/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-tizen/Dockerfile @@ -20,7 +20,7 @@ RUN set -x \ # ------------------------------------------------------------------------------ # Install tizen -ENV TIZEN_VERSION 7.0 +ENV TIZEN_VERSION 8.0 ENV TIZEN_SDK_ROOT /opt/tizen-sdk COPY tizen-sdk-installer $TIZEN_SDK_ROOT/files/installer @@ -35,7 +35,7 @@ RUN set -x \ # ------------------------------------------------------------------------------ # Set environment ENV TIZEN_SDK_TOOLCHAIN $TIZEN_SDK_ROOT/tools/arm-linux-gnueabi-gcc-9.2 -ENV TIZEN_SDK_SYSROOT $TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/mobile/rootstraps/mobile-$TIZEN_VERSION-device.core +ENV TIZEN_SDK_SYSROOT $TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/tizen/rootstraps/tizen-$TIZEN_VERSION-device.core ENV PATH="$TIZEN_SDK_TOOLCHAIN/bin:$TIZEN_SDK_ROOT/tools/ide/bin:$TIZEN_SDK_ROOT/tools:$PATH" # ------------------------------------------------------------------------------ diff --git a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh index e206e71c19a3a6..36165ee4dd6e11 100755 --- a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh +++ b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh @@ -21,7 +21,7 @@ set -e # Default settings options TIZEN_SDK_ROOT=/opt/tizen-sdk TIZEN_SDK_DATA_PATH=$HOME/tizen-sdk-data -TIZEN_VERSION=7.0 +TIZEN_VERSION=8.0 SECRET_TOOL=false SCRIPT_NAME=$(basename -- "$(readlink -f "${BASH_SOURCE:?}")") @@ -133,7 +133,7 @@ function install_tizen_sdk() { info "Tizen SDK installation directory: $TIZEN_SDK_ROOT" - TIZEN_SDK_SYSROOT="$TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/mobile/rootstraps/mobile-$TIZEN_VERSION-device.core" + TIZEN_SDK_SYSROOT="$TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/tizen/rootstraps/tizen-$TIZEN_VERSION-device.core" cd "$TMP_DIR" || return @@ -167,8 +167,8 @@ function install_tizen_sdk() { # Different versions of Tizen have different rootstrap versions URL="http://download.tizen.org/sdk/tizenstudio/official/binary/" PKG_ARR=( - "mobile-$TIZEN_VERSION-core-add-ons_*_ubuntu-64.zip" - "mobile-$TIZEN_VERSION-rs-device.core_*_ubuntu-64.zip") + "tizen-$TIZEN_VERSION-core-add-ons_*_ubuntu-64.zip" + "tizen-$TIZEN_VERSION-rs-device.core_*_ubuntu-64.zip") download "$URL" "${PKG_ARR[@]}" # Base packages @@ -232,13 +232,8 @@ function install_tizen_sdk() { 'capi-system-peripheral-io-*.armv7l.rpm' 'capi-system-peripheral-io-devel-*.armv7l.rpm' 'capi-system-resource-1*.armv7l.rpm' - 'libnsd-dns-sd-*.armv7l.rpm') - download "$URL" "${PKG_ARR[@]}" - - # Tizen Developer Platform Certificate - URL="http://download.tizen.org/sdk/extensions/Tizen_IoT_Headless/binary/" - PKG_ARR=( - "$TIZEN_VERSION-iot-things-add-ons_*_ubuntu-64.zip") + 'libnsd-dns-sd-*.armv7l.rpm' + 'sensord-*.armv7l.rpm') download "$URL" "${PKG_ARR[@]}" # Install all @@ -262,16 +257,12 @@ function install_tizen_sdk() { echo "TIZEN_SDK_DATA_PATH=$TIZEN_SDK_DATA_PATH" >>"$TIZEN_SDK_ROOT/sdk.info" ln -sf "$TIZEN_SDK_DATA_PATH/.tizen-cli-config" "$TIZEN_SDK_ROOT/tools/.tizen-cli-config" - # Use Tizen developer platform certificate as default - cp "$TIZEN_SDK_ROOT"/tools/certificate-generator/certificates/distributor/sdk-platform/* \ - "$TIZEN_SDK_ROOT"/tools/certificate-generator/certificates/distributor/ - # Make symbolic links relative find "$TIZEN_SDK_SYSROOT/usr/lib" -maxdepth 1 -type l | while IFS= read -r LNK; do ln -sf "$(basename "$(readlink "$LNK")")" "$LNK" done ln -sf ../../lib/libcap.so.2 "$TIZEN_SDK_SYSROOT/usr/lib/libcap.so" - ln -sf openssl1.1.pc "$TIZEN_SDK_SYSROOT/usr/lib/pkgconfig/openssl.pc" + ln -sf openssl3.pc "$TIZEN_SDK_SYSROOT/usr/lib/pkgconfig/openssl.pc" info "Done." echo @@ -282,39 +273,39 @@ function install_tizen_sdk() { echo "export TIZEN_VERSION=\"$TIZEN_VERSION\"" echo "export TIZEN_SDK_ROOT=\"$(realpath "$TIZEN_SDK_ROOT")\"" echo "export TIZEN_SDK_TOOLCHAIN=\"\$TIZEN_SDK_ROOT/tools/arm-linux-gnueabi-gcc-9.2\"" - echo "export TIZEN_SDK_SYSROOT=\"\$TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/mobile/rootstraps/mobile-$TIZEN_VERSION-device.core\"" + echo "export TIZEN_SDK_SYSROOT=\"\$TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/tizen/rootstraps/tizen-$TIZEN_VERSION-device.core\"" echo "export PATH=\"\$TIZEN_SDK_TOOLCHAIN/bin:\$TIZEN_SDK_ROOT/tools/ide/bin:\$TIZEN_SDK_ROOT/tools:\$PATH\"" echo -n "$COLOR_NONE" } while (($#)); do case $1 in - -h | --help) - show_help - exit 0 - ;; - --tizen-sdk-path) - TIZEN_SDK_ROOT="$2" - shift - ;; - --tizen-sdk-data-path) - TIZEN_SDK_DATA_PATH="$2" - shift - ;; - --tizen-version) - TIZEN_VERSION=$2 - shift - ;; - --install-dependencies) - INSTALL_DEPENDENCIES=true - ;; - --override-secret-tool) - SECRET_TOOL=true - ;; - *) - error "Wrong options usage!" - exit 1 - ;; + -h | --help) + show_help + exit 0 + ;; + --tizen-sdk-path) + TIZEN_SDK_ROOT="$2" + shift + ;; + --tizen-sdk-data-path) + TIZEN_SDK_DATA_PATH="$2" + shift + ;; + --tizen-version) + TIZEN_VERSION=$2 + shift + ;; + --install-dependencies) + INSTALL_DEPENDENCIES=true + ;; + --override-secret-tool) + SECRET_TOOL=true + ;; + *) + error "Wrong options usage!" + exit 1 + ;; esac shift done From 583778014f50fc4b28762394804540258d24dd1b Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 2 Jul 2024 13:40:47 +0200 Subject: [PATCH 2/5] Install platform certificate --- .../chip-build-tizen/tizen-sdk-installer/install.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh index 36165ee4dd6e11..a8e86dc33fcb11 100755 --- a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh +++ b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh @@ -144,7 +144,7 @@ function install_tizen_sdk() { URL="http://download.tizen.org/sdk/tizenstudio/official/binary/" PKG_ARR=( 'certificate-encryptor_1.0.10_ubuntu-64.zip' - 'certificate-generator_0.1.3_ubuntu-64.zip' + 'certificate-generator_0.1.4_ubuntu-64.zip' 'new-common-cli_2.5.64_ubuntu-64.zip' 'new-native-cli_2.5.64_ubuntu-64.zip' 'sdb_4.2.23_ubuntu-64.zip') @@ -236,6 +236,12 @@ function install_tizen_sdk() { 'sensord-*.armv7l.rpm') download "$URL" "${PKG_ARR[@]}" + # Tizen Developer Platform Certificate + URL="http://download.tizen.org/sdk/extensions/Tizen_IoT_Headless/binary/" + PKG_ARR=( + "7.0-iot-things-add-ons_*_ubuntu-64.zip") + download "$URL" "${PKG_ARR[@]}" + # Install all info "Installing Tizen SDK..." @@ -257,6 +263,10 @@ function install_tizen_sdk() { echo "TIZEN_SDK_DATA_PATH=$TIZEN_SDK_DATA_PATH" >>"$TIZEN_SDK_ROOT/sdk.info" ln -sf "$TIZEN_SDK_DATA_PATH/.tizen-cli-config" "$TIZEN_SDK_ROOT/tools/.tizen-cli-config" + # Use Tizen developer platform certificate as default + cp "$TIZEN_SDK_ROOT"/tools/certificate-generator/certificates/distributor/sdk-platform/* \ + "$TIZEN_SDK_ROOT"/tools/certificate-generator/certificates/distributor/ + # Make symbolic links relative find "$TIZEN_SDK_SYSROOT/usr/lib" -maxdepth 1 -type l | while IFS= read -r LNK; do ln -sf "$(basename "$(readlink "$LNK")")" "$LNK" From b0b6108e991306b2fa742bc90c9f63daa58266d7 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 3 Jul 2024 09:39:33 +0200 Subject: [PATCH 3/5] Reverse restyle diff --- .../tizen-sdk-installer/install.sh | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh index a8e86dc33fcb11..031d43be120455 100755 --- a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh +++ b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh @@ -290,32 +290,32 @@ function install_tizen_sdk() { while (($#)); do case $1 in - -h | --help) - show_help - exit 0 - ;; - --tizen-sdk-path) - TIZEN_SDK_ROOT="$2" - shift - ;; - --tizen-sdk-data-path) - TIZEN_SDK_DATA_PATH="$2" - shift - ;; - --tizen-version) - TIZEN_VERSION=$2 - shift - ;; - --install-dependencies) - INSTALL_DEPENDENCIES=true - ;; - --override-secret-tool) - SECRET_TOOL=true - ;; - *) - error "Wrong options usage!" - exit 1 - ;; + -h | --help) + show_help + exit 0 + ;; + --tizen-sdk-path) + TIZEN_SDK_ROOT="$2" + shift + ;; + --tizen-sdk-data-path) + TIZEN_SDK_DATA_PATH="$2" + shift + ;; + --tizen-version) + TIZEN_VERSION=$2 + shift + ;; + --install-dependencies) + INSTALL_DEPENDENCIES=true + ;; + --override-secret-tool) + SECRET_TOOL=true + ;; + *) + error "Wrong options usage!" + exit 1 + ;; esac shift done From d2032e80ced479242144330e9e5e36703cb0b9b2 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 3 Jul 2024 10:29:00 +0200 Subject: [PATCH 4/5] Review fix - version update --- integrations/docker/images/base/chip-build/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index d9a04eb8c7a142..9a35a624c58bac 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -62 : Fix ESP32 qemu build +63 : Update Tizen version to 8.0 From df6251d9b9def26136dbd375d2b7f8341e026781 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 3 Jul 2024 10:30:00 +0200 Subject: [PATCH 5/5] Add information about used 7.0 tizen package --- .../stage-2/chip-build-tizen/tizen-sdk-installer/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh index 031d43be120455..59843f99ba9573 100755 --- a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh +++ b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/install.sh @@ -238,6 +238,7 @@ function install_tizen_sdk() { # Tizen Developer Platform Certificate URL="http://download.tizen.org/sdk/extensions/Tizen_IoT_Headless/binary/" + # Tizen site do not has this package available in version 8.0. Certificates are the same for 7.0 and 8.0. PKG_ARR=( "7.0-iot-things-add-ons_*_ubuntu-64.zip") download "$URL" "${PKG_ARR[@]}"