SierraOS: Build and Boot Guide - ARM fast models Page 1 SierraOS Build and Boot
SierraOS: Build and Boot Guide - ARM fast models Page 1 SierraOS Build and Boot Guide - for ARM Fast models SierraOS Build and Boot Guide - for ARM Fast models SierraOS: Build and Boot Guide - ARM fast models Page 2 Table of Contents 1 Booting SierraOS in Fastmodel (Single Guest) ................................................................................. 4 1.1 ARM Fastmodel Platform: ........................................................................................................ 4 1.1.1 Fastmodel Installation ......................................................................................................... 4 1.1.2 Starting the Fastmodel ....................................................................................................... 4 1.1.3 Loading a pre-existing project and debugging .................................................................... 6 1.1.4 Booting the image and debugging using Fastmodel ........................................................... 9 1.1.5 Testing SierraOS Stack ..................................................................................................... 14 1.2 Steps to build SierraOS SDK: ................................................................................................. 17 1.2.1 Steps to build the linux kernel: ......................................................................................... 17 1.2.2 Steps to build the secure kernel : ...................................................................................... 17 1.2.3 Steps to resolve the toolchain error in Ubuntu 12.x .......................................................... 18 2 SierraOS in Fastmodel (Dedicated TEE) .......................................... Error! Bookmark not defined. 2.1 Steps to boot SierraOS in Fastmodel(Dedicated TEE): ........... Error! Bookmark not defined. 2.2 Steps to build SierraOS SDK(Dedicated TEE): ....................... Error! Bookmark not defined. 2.2.1 Steps to build the linux kernel for dedicated tee: .............. Error! Bookmark not defined. 2.2.2 Steps to build the secure kernel : ....................................... Error! Bookmark not defined. 3 SierraVisor in Fastmodel (Hypervisor) ............................................. Error! Bookmark not defined. 3.1 Steps to boot SierraVisor in Fastmodel(Multiple guests) ........ Error! Bookmark not defined. 3.2 Steps to Build SierraOS SDK(Multiple guests): ...................... Error! Bookmark not defined. 3.2.1 Steps to build the secure kernel : ....................................... Error! Bookmark not defined. 3.2.2 Steps to build multiple linux guests: .................................. Error! Bookmark not defined. 4 Android as a Guest ........................................................................................................................... 18 4.1.1 Steps to build Android SDK: ............................................................................................ 18 4.1.2 Steps to Build SierraOS SDK (Android supported kernel): ............................................. 20 4.1.3 Steps to build the secure kernel : ...................................................................................... 20 4.2 Steps to boot Android based kernel: ....................................................................................... 21 4.2.1 Create an SD card image:.................................................................................................. 21 4.2.2 Steps to boot SierraOS in Fastmodel (Single Android guest) ........................................... 21 4.2.3 Steps to boot SierraVisor in Fastmodel (Android guest and Vanilla kernel) ............. Error! Bookmark not defined. 5 Steps for installing other packages: ................................................................................................. 24 6 Components description .................................................................................................................. 26 7 Configuration Flags ......................................................................................................................... 27 8 Additional Features: ......................................................................................................................... 27 8.1 Neon Support: ......................................................................................................................... 27 8.2 Dynamic Modules Support: ..................................................... Error! Bookmark not defined. 8.2.1 Steps to enable the Dynamic modules support .................. Error! Bookmark not defined. 8.2.2 Steps to create task based on dynamic modules................. Error! Bookmark not defined. 8.2.3 Testing dynamic modules ................................................... Error! Bookmark not defined. SierraOS: Build and Boot Guide - ARM fast models Page 3 8.3 DRM Plugin: ........................................................................................................................... 28 8.4 MMC: ...................................................................................................................................... 28 8.5 Shell: ....................................................................................................................................... 28 SierraOS: Build and Boot Guide - ARM fast models Page 4 1 Booting SierraOS in Fastmodel (Single Guest) 1.1 ARM Fast model Platform: ARM Fast models provide a platform comparable to actual hardware in Performance and accuracy. It is an easy to use platform for application, firmware as well as early driver development. It can be used boot any high level OSes such as Linux, Android. It supports various ARM technologies such as caches, MMU, LPAE, virtualization, TrustZone and VFP. It also provides virtualized I/O components like Ethernet, LCD, keyboard and mouse. Fast model is the most versatile platform that is widely available, and easy to acquire without any need for complicated legal agreements and licenses. 1.1.1 Fastmodel Installation Fast Model can be downloaded from the following link by. A valid ARM user account is required. (First time users need a registration). http://www.arm.com/products/tools/models/fast-models.php - From the DOWNLOAD NOW section, navigate to - Select Development Tools-> Fast Models - from the products and download Fast Models Evaluation, Fast Models Third Party IP and the license. Install the Fast Model and the third party IP. 1.1.2 Starting the Fastmodel Run the following commands in order to launch the fast model. #source <FastModelInstalled-Dir>/FastModelTools_7.1/source_all.sh #sgcanvas SierraOS: Build and Boot Guide - ARM fast models Page 5 Screen Shot: SGCANVAS UI SierraOS: Build and Boot Guide - ARM fast models Page 6 1.1.3 Loading a pre-existing project and debugging Load the required project by selecting File -> Load Project For example, Project for Realview Eval board with cortex A15 is available in the following location. <FastModel install dir>/ FastModelsPortfolio_7.1/examples/RTSM_VE/Build_Cortex-A15x1/ RTSM_VE_Cortex- A15x1.sgproj SierraOS: Build and Boot Guide - ARM fast models Page 7 Screen Shot: RTSM_VE_CortexA15 Project components Note about GCC Compatibility: RTSM_VE_CortexA15 project may fail to build properly with GCC 4.7.2. Few .so files may fail to build, which will result in the Model Debugger to throw an error similar to the following. Cannot load model library '<Fastmodel-install dir>/FastModelsPortfolio_7.1/examples/RTSM_EB/Build_Cortex-A8/Linux- Release-GCC-4.7/cadi_system_Linux-Release-GCC-4.7.so': Error while loading lib: <Fastmodel-install dir>/FastModelsPortfolio_7.1/examples/RTSM_EB/Build_Cortex-A8/Linux-Release-GCC- 4.7/cadi_system_Linux-Release-GCC-4.7.so: undefined symbol: _ZN2sg13ConnectorBase5emptyEv This error can be avoided by using GCC 4.6.3(or earlier versions) to carry out the build. The GCC version for building the project can be changed by selecting the Settings option and then by adding a new configuration. SierraOS: Build and Boot Guide - ARM fast models Page 8 Screen Shot: GCC Cross compiler for a project SierraOS: Build and Boot Guide - ARM fast models Page 9 1.1.4 Booting the image and debugging using Fastmodel Click Debug From the Debug Simulation window load the required application Select SierraOS.elf and click ok. SierraOS: Build and Boot Guide - ARM fast models Page 10 From the Configure Model Parameters window change the motherboard.mmc to point to the following root system image. <FastModelInstalldir>/FastModelsPortfolio_7.1/images/RTSM_EB_Linux/files ystems/armv5t_min_EB_V6_V7.image. SierraOS: Build and Boot Guide - ARM fast models Page 11 Next the “Select Targets window” will appear. Use the pre-populated default values. SierraOS: Build and Boot Guide - ARM fast models Page 12 After all the configuration has been done and proceeding forward by clicking final “OK” The Model Debugger window will be appear. From this window, choose “run” option to boot the system, reset will make the system to boot from the starting point. SierraOS: Build and Boot Guide - ARM fast models Page 13 Login as root. SierraOS: Build and Boot Guide - ARM fast models Page 14 1.1.5 Testing SierraOS Stack Load the Trust-Zone kernel driver by executing the following instruction. #insmod /otz_client.ko Application 1: sierra test application. #otzapp.elf SierraOS: Build and Boot Guide - ARM fast models Page 15 Application 2: TEE compliant app: #otz_tee_app.elf SierraOS: Build and Boot Guide - ARM fast models Page 16 Application 3: Secure Neon/VFP Application # otz_neon_app.elf SierraOS: Build and Boot Guide - ARM fast models Page 17 1.2 Steps to build SierraOS SDK: 1.2.1 Steps to build the linux kernel: i. Download linux-2.6.38.7 from linux kernel source. ii. Copy the downloaded file to sierra/otz_linux as linux-2.6.38.7.tar.bz2 iii. Create a soft link or copy the image <FastModelInstalldir>/FastModelsPortfolio_7.1/images/RTSM_EB_Linux/files ystems/armv5t_min_EB_V6_V7.image to sierra/otz_linux. iv. Run make command from otz_linux path. 1.2.2 Steps to build the secure kernel : i. Export the CROSS_COMPILE variable to point to the codesourcery toolchain. #export CROSS_COMPILE=<toolchain installed directory>/bin/arm-none- linux-gnueabi- ii. Export the CROSS_COMPILE_NEWLIB variable to point to the supplied toolchain in case of building crypto application. In case of building crypto application, #export CROSS_COMPILE_NEWLIB=<supplied toolchain installed directory>/bin/arm-none-eabi- Otherwise, #export CROSS_COMPILE_NEWLIB=<toolchain installed directory>/bin/arm-none-linux-gnueabi iii. Run make command from SDK path. iv. Binaries and library files are available in tzone_sdk/bin and tzone_sdk/lib respectively. v. Linux sierra api client application (otzapp.elf), Linux sierra client driver (otz_client.ko) and sierra api shared library (libtzapi.so) are copied to the root file system. SierraOS: Build and Boot Guide - ARM fast models Page 18 1.2.3 Steps to resolve the toolchain error in Ubuntu 12.x While building the secure kernel with crypto enabled in ubuntu 12.04, the tool chain might give some errors due to the missing of the required libraries. Run the following in order to fix this issue. apt-get install libmpc2:i386 apt-get install libmpfr4:i386 ln -s /usr/lib/i386-linux-gnu/libmpfr.so.4 /usr/lib/i386-linux- gnu/libmpfr.so.1 apt-get install libgmp10:i386 ln -s /usr/lib/i386-linux-gnu/libgmp.so.10 /usr/lib/i386-linux- gnu/libgmp.so.3 apt-get install libelf1:i386 ln -s /usr/lib/i386-linux-gnu/libelf.so.1 /usr/lib/i386-linux- gnu/libelf.so.0 Note: Supported toolchain version is arm-2010q1. 2 Android as a Guest 2.1.1 Steps to build Android SDK: (i) Download the script to build android from this link http://snapshots.linaro.org/android/~linaro-android/vexpress- rtsm-ics-gcc46-armlt-stable-open-12.04-release/5/linaro_android_build_cmds.sh (ii) Comment out the last two lines in the script corresponding to the building of android #. build/envsetup.sh #make -j${CPUS} boottarball systemtarball userdatatarball (iii) Run the following script #android_install.sh SierraOS: Build and Boot Guide - ARM fast models Page 19 (iv) Uncomment the last two lines in the android build script. . build/envsetup.sh make -j${CPUS} boottarball systemtarball userdatatarball (v) Run the script #linaro_android_build_cmds.sh SierraOS: Build and Boot Guide - ARM fast models Page 20 2.1.2 Steps to Build SierraOS SDK (Android supported kernel): 2.1.3 Steps to build the secure kernel : 1. Export the CROSS_COMPILE variable to point to the codesourcery toolchain that would be used. #export CROSS_COMPILE=<toolchain installed directory>/bin/arm- none- linux-gnueabi- 2. Export the CROSS_COMPILE_NEWLIB variable to point to the supplied toolchain that would be used. This toolchain is used while building crypto application. #export CROSS_COMPILE_NEWLIB=<toolchain installed directory>/bin/arm-none-eabi- 3. Enable the CONFIG_ANDROID_GUEST variable in tzone_sdk/Makefile 4. Modify the ANDROID_PATH variable to the corresponding Android install directory. 5. Run make command uploads/s3/ boot-build-guide.pdf
Documents similaires
-
47
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Jan 23, 2021
- Catégorie Creative Arts / Ar...
- Langue French
- Taille du fichier 1.8660MB