Escolar Documentos
Profissional Documentos
Cultura Documentos
SierraOS Build andmodels Boot Guide - for ARM Fast - for ARM Fast models
Page 1
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 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. 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. 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. Steps for installing other packages: ................................................................................................. 24 Components description .................................................................................................................. 26 Configuration Flags ......................................................................................................................... 27 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.
5 6 7 8
Page 2
Page 3
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.
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9
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.
Page 10
Next the Select Targets window will appear. Use the pre-populated default values.
Page 11
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.
Page 12
Login as root.
Page 13
Page 14
Page 15
Page 16
iv.
Page 17
2 Android as a Guest
2.1.1 Steps to build Android SDK:
Download the script to build android from this link http://snapshots.linaro.org/android/~linaro-android/vexpressrtsm-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 (i)
Page 18
Uncomment the last two lines in the android build script. . build/envsetup.sh make -j${CPUS} boottarball systemtarball userdatatarball Run the script #linaro_android_build_cmds.sh
(v)
Page 19
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/armnone- linux-gnueabi2. 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-eabi3. Enable the CONFIG_ANDROID_GUEST variable in tzone_sdk/Makefile Modify the ANDROID_PATH variable to the corresponding Android install directory. Run make command from SDK path. #make 6. 7. Binary files are available in tzone_sdk/bin. Linux sierra client driver (otz_client.ko) is copied to the android root file system.
4.
5.
Page 20
2. Create mmc.bin by running this command. #bzr branch lp:linaro-image-tools #./linaro-image-tools/linaro-android-media-create --image_file mc.bin --image_size 2000M --dev vexpress-a9 --system system.tar.bz2 --userdata userdata.tar.bz2 --boot boot.tar.bz2
Page 21
Page 22
Page 23
(ii)
(iii)
#otzapp.elf
Page 24
Experimental support for ffmpeg has been added. To enable ffmpeg support , the following changes need to be made. (i) Download ffmpeg-git-26th-April-2012.tar.bz2 and place it in /sierra/package/storage folder. Set CONFIG_LIBSDL, CONFIG_FFMPEG and CONFIG_NEWLIB to "y" in packages/config.package The variable CROSS_COMPILE_NEWLIB should be made to point to the appropriate path. #export CROSS_COMPILE_NEWLIB=<supplied toolchain installed directory>/bin/arm-none-eabi-
(ii)
(iii)
2.
Load the image SierraTEE.elf, which would be available in the bin directory. The app can be tested by launching otz_play_media.elf as discussed previously.
3.
#otz_play_media.elf
Page 25
4 Components description
Path /sierra/otz_linux /sierra/otz_linux/patches /sierra/otz_linux/patches /sierra/otz_linux/patches /sierra/package/patches /sierra/sierra_sdk/sierraos/src Component ov_android.patch otz_hyp_linux1.patch otz_hyp_linux2.patch otz_linux_async.patc h openssl.patch apps apps/test_suite /sierra/sierra_sdk/sierraos/src arch Description Patch to support the android with open virtualization Patch for linux kernel guest 1 Patch for linux kernel guest 2 Patch to support the asynchronous Patch to support the openssl Sample secure OS applications Sample test application for secure OS tasks and Global platform API Architecture dependent codes Core modules of the secure OS like memory management, task handler Supported driver code Library routines for memory, string, etc.. Library routines for kernel Library routines for user Routines common for both
Page 26
5 Configuration Flags
Flag TIMER_NOT_DEFINED Description Disables the secure timer support Enables support for booting SMP kernels in non secure world, Number of CONFIG_SW_MULTICORE cores to be enabled is selected by MAX_CORES macro Enables support for directly running CONFIG_SW_NOBOOTLOADER the secure world OS on target without running a bootloader Enables the L2 cache controller support CONFIG_CACHE_L2x0 in Secure OS. Enables the PL310 L2 Cache controller CONFIG_CACHE_PL310 support CONFIG_NEON_SUPPORT Enables the Neon co-processor support Enables the asynchronous support in OTZONE_ASYNC_NOTIFY_SUPPORT secure world CONFIG_ANDROID_GUEST Enables to boot Android guest Enables the boot wrapper support for NON_SECURE_BOOTWRAPPER_SUPPORT non-secure kernel (e.g ARM Fastmodel) CONFIG_SHELL Enables shell support. CONFIG_CRYPTO Enables the crypto to build CONFIG_FFMPEG Enables the ffmpeg to build
6 Additional Features:
6.1 Neon Support:
Enable the CONFIG_NEON_SUPPORT in sierra_sdk/Makefile CONFIG_NEON_SUPPORT :=y
Enable the Target flags in sierra_sdk/sierraos/config/config.<board> Uncomment the line -DCONFIG_NEON_SUPPORT=1 in both ASMFLAGS and CCFLAGS.
Page 27
6.3 MMC:
eMMC driver support is added. This feature is not currently supported in Fastmodel VE platform.
6.4 Shell:
Enable the flag CONFIG_SHELL in sierra_sdk/sierraos/config/config.<board> CONFIG_SHELL := y Enable the Target flags in sierra_sdk/sierraos/config/config.<board> Uncomment the line -D CONFIG_SHELL = 1 in both ASMFLAGS and CCFLAGS.
Page 28
Page 29