Op-tee compilation, running, and testing on QEMU and FVP platforms

Source: Internet
Author: User

The main steps are completed according to the https://github.com/OP-TEE/build of Optee in GitHub's build description, mainly for reference to http://blog.csdn.net/u010071291/article/ DETAILS/50774082 's blog has been supplemented with some faulty solutions. If you and I are the same beginner, I highly recommend the above Blogger's article, you can learn a lot of things.

A Prepare the development environment.

Install the Linux operating system for development. I am installing the Ubuntu 14.04 LTS 64-bit VMware virtual machine on the WIN10 64-bit. Recommend that you want to put the memory and hard drive to recommend at least 2G memory, 80G hard disk bar.

Because the compilation environment is relatively large, followed by Fastmodel and DS-5 and other development kits also occupy a place, if the hard drive is suddenly occupied by the start of the root user can not login to the graphics page can not open the error.

Workaround: The command line logs on to other users to delete some useless large files, and then restart and repair the graphical pages based on errors. And then according to the specific error Baidu on the line.

Of course, can also expand the hard disk later specific methods can refer to my blog below.

Two Install dependent tools

Install Repo

(1) Repo is based on git based development, can understand git as a Linux command and repo equivalent to the pace of the collection git command, which can help you git all the necessary files, no longer need to download.

(2) So we first install git command: sudo apt-get install git

(3) Then create a new folder named. bin in the user's home directory. Command: Sudomkdir ~/.bin

(4) Download repo

sudo curlhttps://gerrit.googlesource.com/git-repo/repo > ~/.bin/repo

Note: This download is generally not successful, so we recommend that you refer to the blog below the solution to the two of their own download Bo repo.

http://blog.csdn.net/xiaokeweng/article/details/46743409

Then, under the Repo folder, copy the repo to the. Bin folder with the following command

Command: sudo cprepo ~/.bin/repo

(5) Add executable permissions to Repo

Sudochmod a+x ~/.bin/repo

(6) Configure the repo to the environment variable

Sudogedit ~/.BASHRC

(7) Add the following content at the end of the file save exit

# repo aliasrepo= "~/.bin/repo"

(8) Sync file changes

Source.bashrc

By the end of this repo installation, we can now sync the source code with repo in any directory.

Three Install dependent other library files.

If you do not want to read English can directly copy my command below, this is op-tee the latest need to rely on the library file,

If one of the library files is not installed, it will report an error that the library file cannot be found.

$ sudo apt-get install android-tools-adbandroid-tools-fastboot autoconf \

Automake BC Bison build-essential cscope Curl Flex ftp-upload gdisk \

Libattr1-dev libc6:i386 libcap-dev Libfdt-dev libftdi-dev \

Libglib2.0-dev Libhidapi-dev Libncurses5-dev libpixman-1-dev \

Libssl-dev libstdc++6:i386 libtool libz1:i386 make Mtools netcat \

Python-crypto python-serial python-wand unzip Uuid-dev xdg-utils \

Xterm xz-utils Zlib1g-dev

Four download and compile run Op-tee source code

The way to download the source code is simple, execute the following command.

(1) Establishing the engineering catalogue

Mkdir-p $HOME/devel/optee

CD $HOME/devel/optee

(2) Download the corresponding XML to the success directory

Note that to download the corresponding XML to see the following figure, and some also need to install other dependent files, I here to the FVP and QEMU platform for specific description:

Note: It is best to download the corresponding stable version, otherwise prone to error, especially for small white.


QEMU Platform Direct Download

Repo init-uhttps://github.com/op-tee/manifest.git-m Default_stable.xml-b Master

If the report unable toaccess ' https://github.com/pythonsoft/test.git:Failed to connect to Github.comport 443 errors can be referred to the following two blog to resolve.

http://blog.csdn.net/tingyuanss/article/details/43559979

http://blog.csdn.net/lyc_stronger/article/details/51954852

FVP platform needs to download the corresponding library files of arm FVP to build

Download Address https://developer.arm.com/products/system-design/fixed-virtual-platforms

Note here to download the Linux host version, as shown in the following illustration:


That is, fm000-kt-00035-r10p2-20rel0.tgz file, and then pay special attention to the location of the folder Foundation_platformpkg after decompression in your engineering directory, that is, the current devel/optee/directory.

And then, like QEMU.

Repo init-u https://github.com/OP-TEE/manifest.git-m Fvp_stable.xml-b Master

Then run repo sync. Downloading the download process may be slow.

(3) Compile the cross tool chain, that is, the cross compiler,

CD Build

Make-f toolchain.mk Toolchains

(4) Compiling the source code and starting the simulator to run Op-tee

Make all Run

If the error is less than the library to install the corresponding library. Other errors can also be a basic Baidu can be solved.

Then use the Makeall-clean command to clean up the compiled file and recompile.

Success will start normal world and secure world two shell


At the QEMU command line interface, enter C and then enter to start Richos (Linux OS) and Optee_os, as shown below:


The FVP effect is shown in the following figure


Five Test

Run tee-supplicant & load optee required drive module in normal first

Then execute xtest after running all tests successfully, as shown in the following illustration:


Test completed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.