Build Failing for TLK for Jetson Tx2

Hi,

Build is failing while building tlk, referring following doc - http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/ote_partner/tlk.git;a=blob;f=documentation/Tegra_BSP_for_Android_TLK_FOSS_Reference.pdf;h=87edd17518e5c957aff1728a5e2ea3afbeb7d2b1;hb=master

Using following toolchain - https://android.googlesource.com/platform/prebuilts/gcc/linux-
x86/aarch64/aarch64-linux-android-4.8

README mentioned platform can be either “t124” or “t132”, but observed that makefile is expecting TARGET_ARCH not TARGET, Also tried with giving TARGET_ARCH but not worked.

Tried following commands :
~/Downloads/Jetson-Tx2/tlk(master) [b]TARGET=t132 make -e[/b] makefile:39: *** No project specified. Use "make projectname" or put "PROJECT := projectname" in local.mk. Stop. ~/Downloads/Jetson-Tx2/tlk(master)
~/Downloads/Jetson-Tx2/tlk(master) [b]TARGET_ARCH=t124 make -e[/b] makefile:39: *** No project specified. Use "make projectname" or put "PROJECT := projectname" in local.mk. Stop. ~/Downloads/Jetson-Tx2/tlk(master)
~/Downloads/Jetson-Tx2/tlk(master) ~/Downloads/Jetson-Tx2/tlk(master) TARGET_ARCH=arm64 make -e
makefile:39: *** No project specified. Use “make projectname” or put “PROJECT := projectname” in local.mk. Stop.
~/Downloads/Jetson-Tx2/tlk(master) ~/Downloads/Jetson-Tx2/tlk(master)
~/Downloads/Jetson-Tx2/tlk(master) PROJECT=tegra TARGET=tegra1 TARGET_ARCH=arch_64 MONITOR_LIBRARY=false STANDALONE_MONITOR=false nice make -j4 -e makefile:121: target/tegra1/rules.mk: No such file or directory make/module.mk:60: arch//compile.mk: No such file or directory PROJECT = tegra PLATFORM = TARGET = tegra1 MONLIB = TARGET_ARCH = arch_64 makefile:130: arch//rules.mk: No such file or directory make/module.mk:60: arch//compile.mk: No such file or directory make/module.mk:60: arch//compile.mk: No such file or directory make/module.mk:60: arch//compile.mk: No such file or directory make/module.mk:60: arch//compile.mk: No such file or directory make/module.mk:60: arch//compile.mk: No such file or directory including lib/debug lib/heap lib/libc make/module.mk:60: arch//compile.mk: No such file or directory make/module.mk:60: arch//compile.mk: No such file or directory lib/libc/string/rules.mk:38: lib/libc/string/arch//rules.mk: No such file or directory make/module.mk:60: arch//compile.mk: No such file or directory make: *** No rule to make target `arch//compile.mk'. Stop. ~/Downloads/Jetson-Tx2/tlk(master)
~/Downloads/Jetson-Tx2/tlk(master)$

Can someone provide proper command to build tlk and corresponding flash command.

I don’t know about that software, but the t12x series (such as the t124 JTK1 instance) is a TK1, the t18x series (such as the t186 JTX2 instance) is a TX2, and the t21x series (such as the t210 JTX1 instance) is TX1. So for the TX2 module you need t186 as the SoC identifier. ARCH is arm64.

Can you point to any doc/tutorial to build TEE for Tx2

Sorry, I have not built this before. I see it as compatible with a TX1, but not necessarily a TX2 (boot environments do differ between these two). I also see it listed under Android, but I don’t know if TLK is compatible with L4T/Ubuntu. Someone with experience in this will know if this is compatible on L4T/TX2 or not, but I am going to guess the “projectname” implies there is something more you need to set in the environment. The target SoC for a JTX2 is t186, the ARCH is arm64.

Thanks for reply,

As you can see, I tried by providing PROJECT also, which internally used as projectname.

Last command which I tried :
PROJECT=tegra TARGET=tegra1 TARGET_ARCH=arch_64 MONITOR_LIBRARY=false STANDALONE_MONITOR=false nice make -j4 -e

This one fails with different error, unable to get file but not with projectname error.

I’m adding TEE support for Tx2, for which using TLK.

Is there any other way I can add/build support for TEE, other then TLK. Now I’m doubting whether Tx2 support TLK or not.

I have no knowledge of this particular software, but usually it is a case of asking the vendor of the software, e.g., gstreamer people may know more about it. There are plenty of people here who use gstreamer, but it may be that when asking about ports to various hardware and environments there may be a different site specifically supporting this which can answer the question. It is possible someone here knows more about TEE, but I cannot personally answer this.

mca.ashu4,
You might want to look into our software features doc inside Development Guide before diving into compiling the code with feature that is not yet support in our BSP. As mentioned in other thread, there is no public release for secure OS support yet. Our secure OS is based on Trusty rather than TLK. The implementation is based on following link but removing any Android-dependent area.
https://source.android.com/security/trusty/

Hi Guys,

Is there any progress for TLK build?

I have follow this document to try to build TLK kernel.
https://www.w3.org/2012/webcrypto/webcrypto-next-workshop/papers/webcrypto2014_submission_25.pdf

We need to fix those two items before build.

  1. download all 4.8/4.7 version. (just ref PDF file and change version number at the end of git address)
$tlk/tools$ ls
aarch64-linux-android-4.8  arm-eabi-4.7  arm-eabi-4.8  arm-linux-androideabi-4.8
cd tlk
./build t132

Unfortunately I got error message below:

Tools found
for dir in external/libc client common ext_nv service; do \
	make -C $dir; \
done
make[1]: Entering directory '/home/zxp/TrustZone/tlk/lib/external/libc'
MODULE_CC  ../../../tools/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
LIBGCC = /home/zxp/TrustZone/tlk/tools/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/libgcc.a
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/zxp/TrustZone/tlk/lib/external/libc'
make[1]: Entering directory '/home/zxp/TrustZone/tlk/lib/client'
MODULE_CC  ../../tools/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
LIBGCC = /home/zxp/TrustZone/tlk/tools/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/libgcc.a
compiling ./ote_command.c
./ote_command.c:27:23: fatal error: sys/ioctl.h: No such file or directory
 #include <sys/ioctl.h>
                       ^
compilation terminated.
../../lib/make/compile.mk:43: recipe for target '../../out/libs/libtlk_client/./ote_command.o' failed
make[1]: *** [../../out/libs/libtlk_client/./ote_command.o] Error 1
make[1]: Leaving directory '/home/zxp/TrustZone/tlk/lib/client'
make[1]: Entering directory '/home/zxp/TrustZone/tlk/lib/common'
MODULE_CC  ../../tools/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
LIBGCC = /home/zxp/TrustZone/tlk/tools/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/libgcc.a
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/zxp/TrustZone/tlk/lib/common'
make[1]: Entering directory '/home/zxp/TrustZone/tlk/lib/ext_nv'
MODULE_CC  ../../tools/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
LIBGCC = /home/zxp/TrustZone/tlk/tools/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/libgcc.a
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/zxp/TrustZone/tlk/lib/ext_nv'
make[1]: Entering directory '/home/zxp/TrustZone/tlk/lib/service'
MODULE_CC  ../../tools/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
LIBGCC = /home/zxp/TrustZone/tlk/tools/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/libgcc.a
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/zxp/TrustZone/tlk/lib/service'
make: *** No targets specified and no makefile found.  Stop.
./build: 23: cd: can't cd to ../secure_monitor
PROJECT=tegra TARGET=t132 TARGET_ARCH=arm64 MONITOR_LIBRARY=false STANDALONE_MONITOR=false nice make -j4 -e
make: *** No targets specified and no makefile found.  Stop.
TOOLCHAIN_PREFIX=../tools/arm-eabi-4.8/bin/arm-eabi- PROJECT=tegra TARGET=t132 TARGET_ARCH=arm64 nice make -j4 -e
PROJECT = tegra
PLATFORM = tegra
TARGET = t132
MONLIB = 
TARGET_ARCH = arm64
LIBGCC = /home/zxp/TrustZone/tlk/tools/arm-eabi-4.8/bin/../lib/gcc/arm-eabi/4.8/libgcc.a
ARCH_COMPILEFLAGS = 
including arch/arm/arm/neon lib/debug lib/heap lib/libc lib/libfdt lib/version
make: *** No rule to make target '../build-t132/secure_monitor/monitor.bin', needed by '../build-t132/img.bin'.  Stop.

some projects have failed to build:
t132 t132 t132

Another question is I see all tlk git project only update on Mon Oct 26 14:50:45 2015. Does that mean TLK is not maintain any more?

Peter,
Thanks.