-
Notifications
You must be signed in to change notification settings - Fork 862
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opentee_linuxdriver: introduce new package
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
projects/Amlogic-ce/packages/linux-drivers/amlogic/opentee_linuxdriver/package.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} \; | ||
} |
12 changes: 12 additions & 0 deletions
12
...e/packages/linux-drivers/amlogic/opentee_linuxdriver/system.d/opentee_linuxdriver.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |