Coder Social home page Coder Social logo

lcu14_optee_hello_world's People

Contributors

jbech-linaro avatar jenswi-linaro avatar oliviermartin avatar sunyanbang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lcu14_optee_hello_world's Issues

Incompatible libteec.so

Hi everyone, I was trying to run the hello_world code, but I fail to "make" due to incompatible libteec.so. (at least it seems to be the case).
I have the latest OP-TEE projects (obtained by the android repo sync).
In Makefile in /host/ I have noticed that $(TEEC_EXPORT) returned nothing, (i got the same error as bellow, but without "skipping incomatible" line) so I replaced this variable with path to optee_client/out/export. Now I get


root@debian:/devel/optee/lcu14_optee_hello_world# make
make[1]: Entering directory '/root/devel/optee/lcu14_optee_hello_world'
make -C host CROSS_COMPILE=
make[2]: Entering directory '/root/devel/optee/lcu14_optee_hello_world/host'
gcc -lteec -L/root/devel/optee/optee_client/out/export/lib -o hello_world hello_world.o
/usr/bin/ld: skipping incompatible /root/devel/optee/optee_client/out/export/lib/libteec.so when searching for -lteec
/usr/bin/ld: cannot find -lteec
collect2: error: ld returned 1 exit status
Makefile:25: recipe for target 'hello_world' failed
make[2]: *** [hello_world] Error 1
make[2]: Leaving directory '/root/devel/optee/lcu14_optee_hello_world/host'
Makefile:6: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/devel/optee/lcu14_optee_hello_world'
root@debian:
/devel/optee/lcu14_optee_hello_world#

screenshot from 2015-08-04 11 36 21
_world#


I know this is a year old code, did anything change since then?
Thanks for your help
Crispy

TA compilation problems

Hello,

When building TA I got the following error " cannot find -lteec":

~/devel/optee/optee_hello_world$ make
make -C host CROSS_COMPILE=/home/devel/optee/optee_hello_world/../toolchains/aarch64/bin/aarch64-linux-gnu-
make[1]: Entering directory /home/devel/optee/optee_hello_world/host' /home/devel/optee/optee_hello_world/../toolchains/aarch64/bin/aarch64-linux-gnu-gcc -lteec -L/home/devel/optee/optee_hello_world/../optee_client/out/export/lib -o hello_world hello_world.o /home/devel/optee/toolchains/aarch64/bin/../lib/gcc/aarch64-linux-gnu/5.3.1/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /home/devel/optee/optee_hello_world/../optee_client/out/export/lib/libteec.so when searching for -lteec /home/devel/optee/toolchains/aarch64/bin/../lib/gcc/aarch64-linux-gnu/5.3.1/../../../../aarch64-linux-gnu/bin/ld: cannot find -lteec collect2: error: ld returned 1 exit status make[1]: *** [hello_world] Error 1 make[1]: Leaving directory/home/devel/optee/optee_hello_world/host'
make: *** [all] Error 2

I am trying to build it for Hikey platform. I have build both optee_os (for Hikey) and optee_client. Inside optee_client, "libteec.so" is present in the following folders: ./optee_client/out/libteec/libteec.so and ./optee_client/out/export/lib/libteec.so.

Could you please explain how can I fix it?
Thanks!

How to execute this example on QEMU

Hi,
I run OP-TEE using QEMU where the host machine is Ubuntu 14.10 (I followed the tutorial at https://github.com/OP-TEE/optee_os).
So, I have to launch 3 shells: serial_0 (Rich Os), serial_1 (Secure OS), and run_qemu.sh (the monitor if I am not wrong).
Where to do the compiling? in Rich OS shell? or another shell on the host ?
I would like to know what are the configuration of cross compiler/ env. variables to do?

Thanks,
MALATTAR

Some Questions About Kernel Module

Hi, I want to write a kernel module and I will call the functions in "tee_kernel_api.c", but there is something wrong : "kernel panic - not syncing : BUG!" It makes me confused, why the TEE_TZ_DEVICE_NAME is defined "opteearm3200"? it may be "opteearmtz00". And if the functions can work on the 64-bit platform?

how to print "double" or "float" value in TA side?

I have a naive question, when I try to print a double value using "printf", like
printf("double a == %f", a);
In the TA side, it returns "f" instead of the correct value.

My questions are:
1, How should I do to print double or float value in TA side?
2. Why does it returns "f" for my "printf" code?

Thanks in advance!

Qemu and TA

Hello,
I want to run this hello word in Qemu. Please help me out.
I followed the steps to build OTEE with Qemu
https://github.com/OP-TEE/optee_os#44-qemu
And
https://github.com/OP-TEE/optee_client
but when I run "make"
it appears this error:"
~/devel/optee_client# make
Building libteec.so
Building tee-supplicant
make --directory=tee-supplicant --no-print-directory
make[1]: Nothing to be done for `all'.
mkdir -p out/export/lib out/export/include out/export/bin
cp out/libteec/libteec.so* out/export/lib
cp out/tee-supplicant/tee-supplicant out/export/bin
cp public/*.h out/export/include
Rootfs copy cannot be done because ROOTFS_DIR is not defined
"
please help me to make the enviroment parameter correctly, maybe I get stuck with it

TA log

Hi,
I just tried this example and when analysing the source code of the trusted application I saw the following:

    /*
     * The IMSG() macro is non-standard, TEE Internal API doesn't
     * specify any means to logging from a TA.
     */
    IMSG("Hello World!\n");

I was wondering where does this macro (IMSG) logs to. Where is the file that IMSG prints "Hello World" located?

Thanks in advance.

How to develop a useful TA?

Hi Jens,
I have compiled your Hello_world TA and it worked well on FVP. Now I want to develop some useful TAs such as critical IO control and syscall hook, the problem is that these things seem to have nothing to do with TEE or TrustZone, it can be done in normal Linux system without communication with Trusted OS.

Could you pleaze give me some suggestions on how to develop a useful TA? I think the most important issue is to define what kind of service should be regarded as a secure service and thus be put in the secure world. There is currently not much documents to describe it.
Thanks in advance.

'/bin/sh: hello_world: not found'

Hello, after checking all the isues in this thread I'm not able to execute the hello world program in the normal world.

I built the program, copied 8aaaf200-2450-11e4-abe20002a5d5c51b.ta to /lib/teetz , copied the executable hello world to /bin on the host and changed its permission to 755. Also edited the filelist-tee.txt file in gen_rootfs.

After that it keeps telling me not found.

Can someone help me please?

Thank you so much.

cannot find -lteec

I follow the instructions and compiles the helloworld example. Following is the compile error I get. Any idea how to address this issue? I saw similar issue reports in #8, but there is no solution to this issue.
Thanks for any suggestion.

make -C host CROSS_COMPILE=/home/kying/Develop/optee/optee_hello_world/../toolchains/aarch64/bin/aarch64-linux-gnu-
make[1]: Entering directory /home/kying/Develop/optee/optee_hello_world/host' /home/kying/Develop/optee/optee_hello_world/../toolchains/aarch64/bin/aarch64-linux-gnu-gcc -lteec -L/home/kying/Develop/optee/optee_hello_world/../optee_client/out/export/lib -o hello_world hello_world.o /home/kying/Develop/optee/toolchains/aarch64/bin/../lib/gcc/aarch64-linux-gnu/4.9.1/../../../../aarch64-linux-gnu/bin/ld: skipping incompatible /home/kying/Develop/optee/optee_hello_world/../optee_client/out/export/lib/libteec.so when searching for -lteec /home/kying/Develop/optee/toolchains/aarch64/bin/../lib/gcc/aarch64-linux-gnu/4.9.1/../../../../aarch64-linux-gnu/bin/ld: cannot find -lteec collect2: error: ld returned 1 exit status make[1]: *** [hello_world] Error 1 make[1]: Leaving directory/home/kying/Develop/optee/optee_hello_world/host'
make: *** [all] Error 2

How to compile TA Hello word

I try to compile TA helloword, but I can not make it, it appears this error:

:~/devel/fvp_optee/lcu14_optee_hello_world# make
make -C host CROSS_COMPILE=
make[1]: Entering directory /home/thinh/devel/fvp_optee/lcu14_optee_hello_world/host' gcc -Wall -I../ta/include -I/home/thinh/devel/fvp_optee/optee_client/out-client-aarch64/export/include -c -o hello_world.o hello_world.c hello_world.c:30:28: fatal error: tee_client_api.h: No such file or directory #include <tee_client_api.h> ^ compilation terminated. make[1]: *** [hello_world.o] Error 1 make[1]: Leaving directory/home/thinh/devel/fvp_optee/lcu14_optee_hello_world/host'
make: *** [all] Error 2

how to make .bin target

I am having a trouble compiling .bin target required by .ta target:

make -C host CROSS_COMPILE=/opt/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.08_linux/bin/arm-linux-gnueabihf-
make[1]: Entering directory /local/optee_hello_world/host' make[1]: Nothing to be done forall'.
make[1]: Leaving directory /local/optee_hello_world/host' make -C ta CROSS_COMPILE=/opt/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.08_linux/bin/arm-linux-gnueabihf- make[1]: Entering directory/local/optee_hello_world/ta'
Makefile:10: warning: overriding commands for target 8aaaf200-2450-11e4-abe20002a5d5c51b.ta' /local/optee_os/out/arm-plat-bcm/export-user_ta/mk/link.mk:60: warning: ignoring old commands for target8aaaf200-2450-11e4-abe20002a5d5c51b.ta'
make[1]: *** No rule to make target 8aaaf200-2450-11e4-abe20002a5d5c51b.bin', needed by8aaaf200-2450-11e4-abe20002a5d5c51b.ta'. Stop.
make[1]: Leaving directory `/local/optee_hello_world/ta'
make: *** [all] Error 2

Commenting out .ta target (three lines below) from ta/Makefile works. Is this intended?

$(BINARY).ta: $(BINARY).bin
rm -f $@
cat faked_armv7_uta_signed_header.bin $&lt; &gt; $@

Undefined reference to `TEEC_InitializeContext'

In the new GCC the order of the libraries matters, otherwise it will throw these Undefined reference errors. At host's hello_world Makefile:

$(BINARY): $(OBJS)
-        $(CC) $(LDADD) -o $@ $<
+        $(CC) -o $@ $< $(LDADD)

Something wrong in build this ta.

Hi,
I got something wrong when I was try to build this TA. It shows that
"No rule to make target 8aaaf200-2450-11e4-abe20002a5d5c51b.bin', needed by8aaaf200-2450-11e4-abe20002a5d5c51b.ta'. Stop."
I don't know what happened. Please tell me how can I fixed it. Thank you very much.
Regard,

--gc-section Destroys TA

Hillo,

I use this HelloWorld as a starting point for my own project.
(Thanks for sharing.)

My project needs to set the following flags in ta/sub.mk
CFLAGS += -ffunction-sections -fdata-sections
LDFLAGS += --gc-section
Unfortunately, this totally destroys the TA HelloWorld.
The TA is build but, the optee_os cannot load it. It throws Errors.

This flag seems to strip off just way to much code.
HelloWorld TA size with --gc-section set is 68K (elf: 8K).
HelloWorld TA size without flag is 116K (elf: 240K).

Is there any chance to set these flags within this build process?

edit:
Actually, this is a quite common problem with --gc-sections flag, that section which are not in the call-tree of the main() program are removed, although they shouldn't. This may happen to start-up code or interrupt-vectors.
To prevent this, one can use a linker-script and set ENTRY(...), e.g. ENTRY(_reset_code).

Is this possible here?
What may the ENTRY points be here?

About the file user_ta_header_defines.h

I'm kind of confuse about the file - user_ta_header_defines.h.
It looks like a configure file for the op-tee, however, it seems that nobody include it.
Also, in that file, it says "do not modify the file name".

I'm curious about what this file is used for? whether we can get rid of it?

Thanks in advance!

'/usr/bin/ld: cannot find -lteec'

Hello, I'm trying to build the 'Hello world' example and I'm getting this error:

issue

I tried to change the makefile, move the lib path and many many more but nothing worked.

I've checked all the Issues board (and OP-TEE too) but nothing worked for me :(

Can anyone help me please?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.