diff --git a/exagear-desktop-rpi3/Eltechs_ExaGear_Desktop_user_guide.pdf b/exagear-desktop-rpi3/Eltechs_ExaGear_Desktop_user_guide.pdf new file mode 100755 index 000000000..0292d28ac Binary files /dev/null and b/exagear-desktop-rpi3/Eltechs_ExaGear_Desktop_user_guide.pdf differ diff --git a/exagear-desktop-rpi3/README b/exagear-desktop-rpi3/README new file mode 100755 index 000000000..039640a30 --- /dev/null +++ b/exagear-desktop-rpi3/README @@ -0,0 +1,56 @@ +################################################################################### +# Eltechs ExaGear Desktop 2.0. # +# # +# Copyright (c) 2017 "Elbrus Technologies" LLC. All rights reserved. # +################################################################################### +# +# Descripton: +# ExaGear Desktop is a virtual machine that implements virtual x86 Linux +# container on ARM and allows you to run Intel x86 applications directly on +# ARM. For more information please see http://eltechs.com/product/exagear-desktop/ +# +# On Raspberry Pi 2 and Raspberry Pi 3 ExaGear supports hardware graphics +# acceleration. This feature significantly increases performance of x86 +# applications that use OpenGL up to version 2.1. +# +# Configure hardware graphics acceleration on Raspberry Pi 2 and Raspberry Pi 3: +# To to enable hardware graphics acceleration on the host system run the following +# command from the command line terminal: +# $ sudo raspi-config +# You should see a blue screen with options in a gray box in the centre. Select +# 'Update this tool to the latest version' and wait until the update is performed. +# When blue screen with options will pop-up again select 'Advanced Options', then +# select 'GL Driver' and then 'GL (Full KMS) OpenGL desktop driver with full KMS'. +# When configuration is finished you will see the following message: +# "Full KMS GL driver is enabled". +# Select and then and the raspi-config tool will ask you if you +# would like to reboot. Select to reboot the system and apply configuration +# changes. +# +# Installation: +# Run installation script in a directory with deb packages and one license key: +# $ sudo ./install-exagear.sh +# This script installs guest x86 image that better fits your host operating system. +# Sometimes you might need to install guest x86 Ubuntu image, for example Spotify +# can run with the guest Ubuntu only. To force install the guest x86 Ubuntu run +# installation script with following option: +# $ sudo ./install-exagear.sh ubuntu-1404 +# +# Running: +# $ exagear +# Starting the shell in the guest image /opt/exagear/images/ +# $ arch +# i686 +# +# You are now inside the x86 world. You can use this guest shell as if it were +# running on an x86 machine. Inside the guest session you can install Wine from +# apt-get repositories: +# $ sudo apt-get install wine +# To exit from the guest session use 'exit' command. +# +# For more details read Eltechs_ExaGear_Desktop_user_guide.pdf. +# +# Support: +# Please send e-mail on support@eltechs.com +# +# diff --git a/exagear-desktop-rpi3/exagear-armv8_2996-1_arm64.deb b/exagear-desktop-rpi3/exagear-armv8_2996-1_arm64.deb new file mode 100644 index 000000000..093bdb5d2 --- /dev/null +++ b/exagear-desktop-rpi3/exagear-armv8_2996-1_arm64.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d5e88a3d503d6a16ee018e4a8642c7e6751ac86c63670b0f1da63eecc132825 +size 3273790 diff --git a/exagear-desktop-rpi3/exagear-dsound-server_003_armhf.deb b/exagear-desktop-rpi3/exagear-dsound-server_003_armhf.deb new file mode 100644 index 000000000..84fc11015 --- /dev/null +++ b/exagear-desktop-rpi3/exagear-dsound-server_003_armhf.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee77e88694333b57d61c7450f9406f908281701f02dbca68ffe874486418f307 +size 36636 diff --git a/exagear-desktop-rpi3/exagear-guest-debian-8_5_all.deb b/exagear-desktop-rpi3/exagear-guest-debian-8_5_all.deb new file mode 100644 index 000000000..a090d17ac --- /dev/null +++ b/exagear-desktop-rpi3/exagear-guest-debian-8_5_all.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9048cdc01a39bb221725e827797bb1b42fdcd69d3bd46331664765b04eda6135 +size 105523434 diff --git a/exagear-desktop-rpi3/exagear-guest-ubuntu-1404lts_4_all.deb b/exagear-desktop-rpi3/exagear-guest-ubuntu-1404lts_4_all.deb new file mode 100644 index 000000000..bb9b501fe --- /dev/null +++ b/exagear-desktop-rpi3/exagear-guest-ubuntu-1404lts_4_all.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3eb909072bad9f71ab4f41cc72662f57cfd4ac11bf02f62ef743c465dd5aafa1 +size 216189450 diff --git a/exagear-desktop-rpi3/exagear-mem2g_2996-1_armhf.deb b/exagear-desktop-rpi3/exagear-mem2g_2996-1_armhf.deb new file mode 100644 index 000000000..7403e0c35 --- /dev/null +++ b/exagear-desktop-rpi3/exagear-mem2g_2996-1_armhf.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d321bf47141f433b0567b77d2a831cc584ecd6549cee940cd433dde20da78455 +size 3255676 diff --git a/exagear-desktop-rpi3/exagear_2996-1_armhf.deb b/exagear-desktop-rpi3/exagear_2996-1_armhf.deb new file mode 100644 index 000000000..efb0aa822 --- /dev/null +++ b/exagear-desktop-rpi3/exagear_2996-1_armhf.deb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fce26594d18f4d612d2473662c3e039e090f87878652cb25104311f825abd59 +size 3255400 diff --git a/exagear-desktop-rpi3/install-exagear.sh b/exagear-desktop-rpi3/install-exagear.sh new file mode 100755 index 000000000..80306608a --- /dev/null +++ b/exagear-desktop-rpi3/install-exagear.sh @@ -0,0 +1,258 @@ +#!/bin/bash + +function retback { + popd > /dev/null +} +trap retback EXIT + +pushd `dirname $0` > /dev/null + + +UBT_PACKAGE_NAME_2G="exagear-mem2g_*-1_armhf.deb" +UBT_PACKAGE_NAME_3G="exagear_*-1_armhf.deb" +UBT_PACKAGE_NAME_LEGACY_2G="exagear-legacy-mem2g_*-1_armhf.deb" +UBT_PACKAGE_NAME_LEGACY_3G="exagear-legacy_*-1_armhf.deb" +UBT_PACKAGE_NAME_ARM7_8="exagear-armv8_*-1_arm64.deb" + +GUEST_IMAGE_PACKAGE_NAME_DEBIAN_7="exagear-guest-debian-7_*_all.deb" +GUEST_IMAGE_PACKAGE_NAME_DEBIAN_7_WINE2G="exagear-guest-debian-7-wine2g_*_all.deb" +GUEST_IMAGE_PACKAGE_NAME_DEBIAN_8="exagear-guest-debian-8_*_all.deb" +GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1204="exagear-guest-ubuntu-1204lts_*_all.deb" +GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1404="exagear-guest-ubuntu-1404lts_*_all.deb" +GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1504="exagear-guest-ubuntu-1504_*_all.deb" +GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1604="exagear-guest-ubuntu-1604_*_all.deb" + +PK_FILE_NAME="pk-*.key" + +function file_exists { + stat $1 &> /dev/null +} + +function get_host_system_type { + + HOST_OS=`cat /etc/lsb-release 2>/dev/null | egrep "^DISTRIB_ID\=" | awk -F= '{print $2}' | tr '[:upper:]' '[:lower:]'` + if [ -n "$HOST_OS" ] ; then + return + fi + + HOST_OS=`cat /etc/os-release | egrep "^ID\=" | awk -F= '{print $2}' | tr '[:upper:]' '[:lower:]'` + if [ -n "$HOST_OS" ] ; then + if [ "$HOST_OS" == "debian" -o "$HOST_OS" == "ubuntu" ] ; then + return + fi + fi + + HOST_OS=`cat /etc/os-release | egrep "^ID_LIKE\=" | awk -F= '{print $2}' | tr '[:upper:]' '[:lower:]'` + if [ -n "$HOST_OS" ] ; then + return + fi + + HOST_OS="default" +} + +function check_if_raspbian_23 { + RASPBIAN=`cat /etc/issue | tr '[:upper:]' '[:lower:]' | grep 'raspbian'` + if ! [ -z "$RASPBIAN" ] && [ "$ARCH" == 'armv7l' ]; then + RASPBIAN23='y' + fi +} + +function get_host_system_version { + if [ "$HOST_OS" == "debian" ] ; then + HOST_OS_VERSION=`cat /etc/*-release | egrep "^VERSION_ID\=" | awk -F= '{print $2}' | tr '[:upper:]' '[:lower:]' | tr -d "\"" ` + if [ -z "$HOST_OS_VERSION" ] ; then + if grep "jessie" /etc/*-release; then + HOST_OS_VERSION="8" + fi + fi + + elif [ "$HOST_OS" == "ubuntu" ] ; then + HOST_OS_VERSION=`cat /etc/*-release | egrep "^DISTRIB_RELEASE\=" | awk -F= '{print $2}' | awk -F. '{print $1}' | tr '[:upper:]' '[:lower:]'` + fi + + if [ -z "$HOST_OS_VERSION" ] ; then + HOST_OS_VERSION="default" + fi +} + +function get_arch { + ARCH=`arch` + echo "ARCH=$ARCH" +} + +function check_guest_image_already_installed { + INSTALLED_GUEST_IMAGE=`ls /opt/exagear/images/ 2>/dev/null | head -n 1` + + if [ ! -z "$INSTALLED_GUEST_IMAGE" ]; then + echo "It is not possible to install guest image package as you already have guest image package installed." + echo "Installed guest image package name is exagear-guest-$INSTALLED_GUEST_IMAGE. " + echo "To uninstall current guest image package use ' sudo apt-get purge exagear-guest-$INSTALLED_GUEST_IMAGE '" + echo "Note that all x86 applications installed inside the current guest image will be also deleted." + exit 1 + fi +} + +function check_free_space { + FREE_SPACE_MB=`df -m /opt/ | awk 'NR==2 {print $4}'` + INSTALL_BLOCKDEV=`df -m /opt/ | awk 'NR==2 {print $1}'` + if [ $FREE_SPACE_MB -lt 1500 ]; then + echo "No enough space on your $INSTALL_BLOCKDEV file system. 1500M is required for exagear. You got only ${FREE_SPACE_MB}M. Please perform some cleanup or resize partition and try again." + exit 1 + fi +} + +while test ${#} -gt 0 +do + if [ "$1" == "ubuntu-1404" ] + then + UBUNTU_14_FORCED='y' + elif [ "$1" == "--without-opengl" ] + then + WITHOUT_GL_FORCED='y' + else + echo "Invalid arument: $1" + exit 1 + fi + shift +done + +uid=$(id -u) +if [ "$uid" != "0" ] ; then + echo "Must be root" + exit 1 +fi + +test_binary=$(mktemp) +echo f0VMRgEBAQAAAAAAAAAAAAIAKAABAAAAVIAAADQAAADIAAAAAAIABTQAIAABACgABgADAAEAAAAAAAAAAIAAAACAAACAAAAAgAAAAAUAAAAAgAAACgKg4wEaoOMAIKDjMjCg48BwoOMAAADvCgJQ4wAAoAMBAKATAXCg4wAAAO9BEwAAAGFlYWJpAAEJAAAABgEIAQAuc3ltdGFiAC5zdHJ0YWIALnNoc3RydGFiAC50ZXh0AC5BUk0uYXR0cmlidXRlcwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGwAAAAEAAAAGAAAAVIAAAFQAAAAsAAAAAAAAAAAAAAAEAAAAAAAAACEAAAADAABwAAAAAAAAAACAAAAAFAAAAAAAAAAAAAAAAQAAAAAAAAARAAAAAwAAAAAAAAAAAAAAlAAAADEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAALgBAADgAAAABQAAAAYAAAAEAAAAEAAAAAkAAAADAAAAAAAAAAAAAACYAgAAWwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFSAAAAAAAAAAwABAAAAAAAAAAAAAAAAAAMAAgABAAAAAAAAAAAAAAAEAPH/DAAAAFSAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAQA8f8PAAAAgAABAAAAAAAQAAEAGgAAAIAAAQAAAAAAEAABACgAAACAAAEAAAAAABAAAQA0AAAAVIAAAAAAAAAQAAEAOwAAAIAAAQAAAAAAEAABAEcAAACAAAEAAAAAABAAAQBPAAAAgAABAAAAAAAQAAEAVgAAAIAAAQAAAAAAEAABAABtZW1fdGVzdC5vACRhAF9ic3NfZW5kX18AX19ic3Nfc3RhcnRfXwBfX2Jzc19lbmRfXwBfc3RhcnQAX19ic3Nfc3RhcnQAX19lbmRfXwBfZWRhdGEAX2VuZAA= | base64 --decode > $test_binary +chmod +x $test_binary +$test_binary +test_bin_ret=$? +rm -f $test_binary + +if [ "$test_bin_ret" -eq '0' ]; then + is_3g="1" + echo "System memory configuration is determined as 3g/1g" +else + is_3g="0" + echo "System memory configuration is determined as 2g/2g" +fi + +get_host_system_type +get_host_system_version +get_arch +check_guest_image_already_installed +check_free_space +check_if_raspbian_23 + +if [ "$ARCH" == "armv7l" ]; then + export USE_DSOUND_SERVER='y' +fi + +if [ "$RASPBIAN23" == 'y' ] +then + if ! [ "$WITHOUT_GL_FORCED" == 'y' ] + then + export USE_GL='y' + fi +fi + +if [ "$is_3g" == "1" ]; then + if [ "$ARCH" == "armv6l" ] ; then + UBT_PACKAGE_NAME=$UBT_PACKAGE_NAME_LEGACY_3G + elif [ "$ARCH" == "armv7l" ] ; then + UBT_PACKAGE_NAME=$UBT_PACKAGE_NAME_3G + elif [ "$ARCH" == "aarch64" ] ; then + UBT_PACKAGE_NAME=$UBT_PACKAGE_NAME_ARM7_8 + elif [ "$ARCH" == "armv8l" ] ; then + UBT_PACKAGE_NAME=$UBT_PACKAGE_NAME_ARM7_8 + else + echo "Only armv7, aarch64 and armv6 host arch are supported for 3g/1g memory split" + exit 1 + fi +else + if [ "$ARCH" == "armv6l" ] ; then + UBT_PACKAGE_NAME=$UBT_PACKAGE_NAME_LEGACY_2G + elif [ "$ARCH" == "armv7l" ] ; then + UBT_PACKAGE_NAME=$UBT_PACKAGE_NAME_2G + else + echo "Only armv7 and armv6 arch are supported for 2g/2g memory split" + exit 1 + fi +fi + +if [ "$UBUNTU_14_FORCED" == 'y' ] ; then + # ubuntu-1404 is able to be forced to install via './install-exagear.sh ubuntu-1404' + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1404 +else + if [ "$HOST_OS" == "debian" ] ; then + if [ "$HOST_OS_VERSION" == "7" ] ; then + if [ "$is_3g" == "1" ]; then + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_DEBIAN_7 + else + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_DEBIAN_7_WINE2G + fi + else + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_DEBIAN_8 + fi + elif [ "$HOST_OS" == "ubuntu" ] ; then + if [ "$HOST_OS_VERSION" == "12" ] ; then + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1204 + elif [ "$HOST_OS_VERSION" == "14" ] ; then + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1404 + elif [ "$HOST_OS_VERSION" == "15" ] ; then + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1504 + else + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1604 + fi + else + GUEST_IMAGE_PACKAGE_NAME=$GUEST_IMAGE_PACKAGE_NAME_UBUNTU_1404 + fi +fi + +echo "HOST OS: $HOST_OS" +echo "HOST OS VERSION: $HOST_OS_VERSION" +echo "EXAGEAR package: $UBT_PACKAGE_NAME" +echo "EXAGEAR guest image package: '$GUEST_IMAGE_PACKAGE_NAME'" + +if ! file_exists "$UBT_PACKAGE_NAME" ; then + echo "Put the translator package to the current directory." + echo "The package is named ${UBT_PACKAGE_NAME/\*/NNNN}." + exit 1 +fi + +if ! file_exists "$GUEST_IMAGE_PACKAGE_NAME" ; then + echo "Put the guest image package to the current directory." + echo "The package is named ${GUEST_IMAGE_PACKAGE_NAME/\*/N}." + exit 1 +fi + +if ! file_exists "$PK_FILE_NAME" ; then + echo "Put a primary key file to the current directory." + echo "Primary key files are named ${PK_FILE_NAME/\*/NNNNNN}" + exit 1 +fi + +echo "Installing prerequisites..." +apt-get update +for prereq in bash coreutils findutils realpath curl binfmt-support cron; do + apt-get -y install $prereq || exit 1 +done + +echo "Installing the binary translator..." +dpkg -i $UBT_PACKAGE_NAME || exit 1 + +echo "Installing the guest image..." +dpkg -i $GUEST_IMAGE_PACKAGE_NAME || exit 1 + +if [ "$USE_DSOUND_SERVER" == "y" ] +then + dpkg -i exagear-dsound-server_*_armhf.deb +fi + +echo "Installing the primary key..." +mv $PK_FILE_NAME /opt/exagear/lic/ || exit 1 + +echo "Activating the copy of ExaGear..." +/opt/exagear/bin/actool || exit 1 + +echo "Done!" diff --git a/exagear-desktop-rpi3/pk-000000013078.key b/exagear-desktop-rpi3/pk-000000013078.key new file mode 100644 index 000000000..c05b6f5a0 --- /dev/null +++ b/exagear-desktop-rpi3/pk-000000013078.key @@ -0,0 +1,6 @@ +VUJUTAAAAAAWMwAAAAAAAOmCfeUa6u83UuexNpFnwvROYZdMZ+aP4EZ9jac5gzzfkWlIzOAIa4jeZYNsZ9Kn3sIF/XKBq+8rRUJDXzkuKqQH3f9yudtufS/D5o3TjFRmjDx6d5cSIorcNv0szF3ZSY0VkgcVw8ylDPoXibQGsfz4NN20tULN6bbgGbfS71in + +-------------------- Key info -------------------- +Distributor: eltechs-ext +Enabled features: v1 f_x86-32_v1 f_x86-64_v1 b_arm32_v1 b_arm64_v1 +Valid through: 32503680000