Skip to content

Commit

Permalink
opentee_linuxdriver: introduce new package
Browse files Browse the repository at this point in the history
  • Loading branch information
Portisch committed May 23, 2022
1 parent e993ea5 commit 80dbcf2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-present Team CoreELEC (https://coreelec.org)

PKG_NAME="opentee_linuxdriver"
PKG_VERSION="423100e389fafd31da16530594c1b6171857d58c"
PKG_SHA256="bf382a4e698215458ec1dfb5a44eea2ce2644552772c1c0efb1b716639c1d7e2"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/CoreELEC/opentee_linuxdriver"
PKG_URL="https://github.com/CoreELEC/opentee_linuxdriver/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux"
PKG_LONGDESC="OP-TEE Linux Driver"
PKG_IS_KERNEL_PKG="yes"

make_target() {
kernel_make -C $(kernel_path) M=${PKG_BUILD}
}

makeinstall_target() {
mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}
find ${PKG_BUILD}/ -name \*.ko -not -path '*/\.*' -exec cp {} ${INSTALL}/$(get_full_module_dir)/${PKG_NAME} \;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
# load optee_linuxdriver if SoC is minimum SC2 (0x32) architecture
Description=Optee TEE-Supplicant

ConditionPathExists=/usr/sbin/tee-supplicant

[Service]
ExecCondition=/bin/sh -c '[ $(awk \'/^Serial/ {printf "%%d", "0x" substr($3,0,2)}\' /proc/cpuinfo) -ge $(printf "%%d" "0x32") ] && exit 0 || echo 1 > /sys/module/tee/parameters/disable_flag; exit 1'
ExecStartPre=/sbin/modprobe -q optee_armtz
ExecStart=/usr/sbin/tee-supplicant
ExecStop=/bin/kill -KILL $MAINPID
ExecStopPost=/sbin/modprobe -r optee_armtz

0 comments on commit 80dbcf2

Please sign in to comment.