Skip to content

Commit

Permalink
[TIZEN] Support for installing Tizen SDK without docker (#21346)
Browse files Browse the repository at this point in the history
* [TIZEN] Support for installing Tizen SDK without docker

* Style fixes

* Update integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh

Co-authored-by: Arkadiusz Bokowy <[email protected]>

* Update integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh

Co-authored-by: Arkadiusz Bokowy <[email protected]>

* Update integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh

Co-authored-by: Arkadiusz Bokowy <[email protected]>

* Download changes

* Update Docker file version and add lost one PATH for echo export

Co-authored-by: Arkadiusz Bokowy <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Oct 10, 2023
1 parent 5961144 commit 1085232
Show file tree
Hide file tree
Showing 6 changed files with 346 additions and 201 deletions.
88 changes: 0 additions & 88 deletions config/tizen/scripts/install_sdk.sh

This file was deleted.

126 changes: 14 additions & 112 deletions integrations/docker/images/chip-build-tizen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,132 +21,34 @@ RUN set -x \
cpio \
obs-build \
openjdk-8-jre-headless \
wget \
zip \
# Cleanup
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/apt/lists \
&& : # last line

# ------------------------------------------------------------------------------
# Install tizen SDK
ENV TIZEN_SDK_ROOT /opt/tizen-sdk
# Install tizen
ENV TIZEN_VERSION 6.0
ENV TIZEN_SDK_ROOT /opt/tizen-sdk

WORKDIR /tmp/workdir

# ------------------------------------------------------------------------------
# Get tizen studio CLI
COPY tizen-sdk-installer /tmp/tizen-sdk-installer
RUN set -x \
&& mkdir -p $TIZEN_SDK_ROOT \
# Download
&& wget --progress=dot:giga \
http://download.tizen.org/sdk/tizenstudio/official/binary/certificate-encryptor_1.0.7_ubuntu-64.zip \
http://download.tizen.org/sdk/tizenstudio/official/binary/certificate-generator_0.1.3_ubuntu-64.zip \
http://download.tizen.org/sdk/tizenstudio/official/binary/new-common-cli_2.5.7_ubuntu-64.zip \
http://download.tizen.org/sdk/tizenstudio/official/binary/new-native-cli_2.5.7_ubuntu-64.zip \
http://download.tizen.org/sdk/tizenstudio/official/binary/sdb_4.2.23_ubuntu-64.zip \
# Install tizen studio CLI
&& unzip -o '*.zip' \
&& cp -rf data/* $TIZEN_SDK_ROOT \
&& echo "TIZEN_SDK_INSTALLED_PATH=$TIZEN_SDK_ROOT" > $TIZEN_SDK_ROOT/sdk.info \
&& echo "TIZEN_SDK_DATA_PATH=$USER_HOME/tizen-sdk-data" >> $TIZEN_SDK_ROOT/sdk.info \
&& ln -sf $USER_HOME/.tizen-cli-config $TIZEN_SDK_ROOT/tools/.tizen-cli-config \
&& bash /tmp/tizen-sdk-installer/install.sh \
--tizen-sdk-path $TIZEN_SDK_ROOT \
--tizen-sdk-data-path $USER_HOME/tizen-sdk-data \
--tizen-version $TIZEN_VERSION \
--override-secret-tool \
# Cleanup
&& rm -rf /tmp/workdir \
&& rm -rf /tmp/tizen-sdk-installer \
&& : # last line

COPY secret-tool.py $TIZEN_SDK_ROOT/tools/certificate-encryptor/secret-tool
RUN chmod 0755 $TIZEN_SDK_ROOT/tools/certificate-encryptor/secret-tool
ENV PATH="$TIZEN_SDK_ROOT/tools/ide/bin:$TIZEN_SDK_ROOT/tools:$PATH"

# ------------------------------------------------------------------------------
# Get toolchain
RUN set -x \
&& mkdir -p $TIZEN_SDK_ROOT \
# Download
&& wget --progress=dot:giga \
http://download.tizen.org/sdk/tizenstudio/official/binary/cross-arm-gcc-9.2_0.1.9_ubuntu-64.zip \
http://download.tizen.org/sdk/tizenstudio/official/binary/sbi-toolchain-gcc-9.2.cpp.app_2.2.16_ubuntu-64.zip \
# Install toolchain
&& unzip -o '*.zip' \
&& cp -rf data/* $TIZEN_SDK_ROOT \
# Cleanup
&& rm -rf /tmp/workdir \
&& : # last line

# Set environment
ENV TIZEN_SDK_TOOLCHAIN $TIZEN_SDK_ROOT/tools/arm-linux-gnueabi-gcc-9.2
ENV PATH="$TIZEN_SDK_TOOLCHAIN/bin:$PATH"

# ------------------------------------------------------------------------------
# Get tizen sysroot
ENV TIZEN_SDK_SYSROOT \
$TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/mobile/rootstraps/mobile-$TIZEN_VERSION-device.core
RUN set -x \
# Base sysroot
&& wget --progress=dot:giga \
http://download.tizen.org/sdk/tizenstudio/official/binary/mobile-$TIZEN_VERSION-core-add-ons_0.0.262_ubuntu-64.zip \
http://download.tizen.org/sdk/tizenstudio/official/binary/mobile-$TIZEN_VERSION-rs-device.core_0.0.123_ubuntu-64.zip \
# Base packages
&& wget --progress=dot:mega -r -nd --no-parent \
http://download.tizen.org/releases/milestone/tizen/base/latest/repos/standard/packages/armv7l/ \
-A 'iniparser-*.armv7l.rpm' \
-A 'libblkid-devel-*.armv7l.rpm' \
-A 'libcap-*.armv7l.rpm' \
-A 'libffi-devel-*.armv7l.rpm' \
-A 'liblzma-*.armv7l.rpm' \
-A 'libmount-devel-*.armv7l.rpm' \
-A 'libncurses6-*.armv7l.rpm' \
-A 'libreadline-*.armv7l.rpm' \
-A 'libuuid-*.armv7l.rpm' \
-A 'pcre-devel-*.armv7l.rpm' \
-A 'readline-devel-*.armv7l.rpm' \
-A 'xdgmime-*.armv7l.rpm' \
# Unified packages
&& wget --progress=dot:mega -r -nd --no-parent \
http://download.tizen.org/releases/milestone/tizen/unified/latest/repos/standard/packages/armv7l/ \
-A 'aul-0*.armv7l.rpm' \
-A 'aul-devel-*.armv7l.rpm' \
-A 'bundle-0*.armv7l.rpm' \
-A 'bundle-devel-*.armv7l.rpm' \
-A 'buxton2-*.armv7l.rpm' \
-A 'cynara-devel-*.armv7l.rpm' \
-A 'dbus-1*.armv7l.rpm' \
-A 'dbus-devel-*.armv7l.rpm' \
-A 'dbus-libs-1*.armv7l.rpm' \
-A 'glib2-devel-2*.armv7l.rpm' \
-A 'json-glib-devel-*.armv7l.rpm' \
-A 'libcynara-client-*.armv7l.rpm' \
-A 'libcynara-commons-*.armv7l.rpm' \
-A 'libdns_sd-*.armv7l.rpm' \
-A 'libjson-glib-*.armv7l.rpm' \
-A 'libsessiond-0*.armv7l.rpm' \
-A 'libsystemd-*.armv7l.rpm' \
-A 'libtzplatform-config-*.armv7l.rpm' \
-A 'parcel-0*.armv7l.rpm' \
-A 'parcel-devel-*.armv7l.rpm' \
-A 'pkgmgr-info-*.armv7l.rpm' \
-A 'vconf-compat-*.armv7l.rpm' \
-A 'vconf-internal-keys-devel-*.armv7l.rpm' \
# Unified packages (snapshots)
&& wget --progress=dot:mega -r -nd --no-parent \
http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/armv7l/ \
-A 'capi-network-nsd-*.armv7l.rpm' \
-A 'capi-network-thread-*.armv7l.rpm' \
-A 'libnsd-dns-sd-*.armv7l.rpm' \
# Install base sysroot
&& unzip -o '*.zip' \
&& cp -rf data/* $TIZEN_SDK_ROOT \
# Install packages
&& unrpm *.rpm \
&& cp -rf lib usr $TIZEN_SDK_SYSROOT \
# Make symbolic links relative
&& for LNK in $(find $TIZEN_SDK_SYSROOT/usr/lib -maxdepth 1 -type l); \
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 \
# Cleanup
&& rm -rf /tmp/workdir \
&& : # last line
ENV TIZEN_SDK_SYSROOT $TIZEN_SDK_ROOT/platforms/tizen-$TIZEN_VERSION/mobile/rootstraps/mobile-$TIZEN_VERSION-device.core
ENV PATH="$TIZEN_SDK_TOOLCHAIN/bin:$TIZEN_SDK_ROOT/tools/ide/bin:$TIZEN_SDK_ROOT/tools:$PATH"

# ------------------------------------------------------------------------------
# Switch to the non-root user
Expand Down
Loading

0 comments on commit 1085232

Please sign in to comment.