当前位置: 首页 > news >正文

(Repost) Getting Genode with TrustZone on the i.MX

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

转自:https://tthtlc.wordpress.com/2015/02/21/getting-genode-with-trustzone-on-the-i-mx53-quick-start-board/


Getting Genode with TrustZone on the i.MX53 Quick Start Board

Posted February 21, 2015 by Peter Teoh in genode, i.MX53SQB. 5 Comments

DSC_0124

First download the toolchain for ARM compilation, and then the Genode OS itself, all listed here:

http://sourceforge.net/projects/genode/files/

Details description of Genode and its installation are found here:

http://genode.org/documentation/developer-resources/getting_started

http://genode.org/documentation/release-notes/14.11

https://github.com/genodelabs/genode/blob/master/doc/getting_started.txt

Install all the necessary packages for Ubuntu 14.04 (present host):

apt-get install libSDL-dev
apt-get install libsdl1.2-dev -> shows it is already newest version
apt-get install tk8.5 tcl8.5
apt-get install expect
apt-get install byacc
apt-get install qemu
apt-get install genisoimage
sudo apt-get install expect
sudo apt-get install udisks

After untarring the genode toolchain /usr/local/genode-gcc directory, next is to untar the Genode OS download to “genode-14.11″.

With some assistance as documented here:

http://sourceforge.net/p/genode/mailman/message/33465225/

cd genode-14.11/
cd tool/

Listing all the hardware:

./create_builddir

‘linux_x86′
‘linux_arm’
‘fiasco_x86′
‘pistachio_x86′
‘okl4_x86′
‘nova_x86_32′
‘nova_x86_64′
‘codezero_vpb926′
‘hw_panda’
‘hw_vea9x4′
‘hw_vea9x4_tz’
‘hw_pbxa9′
‘hw_imx31′
‘hw_imx53′
‘hw_imx53_tz’
‘hw_arndale’
‘hw_odroid_xu’
‘hw_rpi’
‘foc_x86_32′
‘foc_x86_64′
‘foc_pbxa9′
‘foc_imx53′
‘foc_vea9x4′
‘foc_panda’
‘foc_arndale’
‘lx_hybrid_x86′

Now we set the hardware to be imx53:

./create_builddir hw_imx53_tz BUILD_DIR=build_imx53
cd build_imx53/

Setting up it for uboot as the bootloader:

echo "SPECS += trustzone" >> etc/specs.confecho "RUN_OPT = --target uboot" >> etc/build.confmake run/tz_vmm

After this “uImage” is generated in the build_imx53/var/run.

Now, to download u-boot bootloader (and its ARM gcc compiler):

git clone https://github.com/m-stein/uboot uboot_stein

cd uboot_stein/

wget http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.9-2014.09_linux.tar.xz

Extract out the config file:

make ARCH=arm CROSS_COMPILE=/opt/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi- usbarmory_config

Now start the make process:

make ARCH=arm CROSS_COMPILE=/opt/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi- V=1

Notice a “u-boot.imx” is created. But first we need to format the sdcard.

(from hence onwards my sdcard is detected as /dev/sdg???):

Aim: make a sdcard from uImage, which will require uboot bootloader:

sudo parted /dev/sdg –script mklabel msdos

sudo parted /dev/sdg –script mkpart primary ext4 5M 100%

Upon completion, “dd” the u-boot.imx (which is meant for imx53 as the target) to the sdcard’s 3rd 512-block:

sudo dd if=./u-boot.imx of=/dev/sdg seek=2 bs=512 conv=fsync

Take a look at the partition:

sudo fdisk -l /dev/sdg

sudo mkfs.ext4 /dev/sdg1

Now /dev/sdg1 is ext4-formatted, mount it:

udisks –mount /dev/sdg1

Copy the uImage there to the rootfs:

cp uImage /media/371a8dd7-58c1-4beb-aed3-cb18fb40f7eb/

And umount it:

sudo udisks –umount /dev/sdg1

Now insert the sdcard into i.MX53QSB and connect via serial port, bootup message as follows:

U-Boot 2014.07-g0ca0b0f (Feb 20 2015 – 09:14:08)

Board: USB armory
I2C: ready
DRAM: 256 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning – bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: CPU Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot: 0

=> ext2ls
ext2ls – list files in a directory (default /)

Usage:
ext2ls <interface> <dev[:part]> [directory]
– list files from ‘dev’ on ‘interface’ in a ‘directory’

=> ext2ls mmc 0:1
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
7860111 uImage

=> ext2load mmc 0:1 0x70200000 uImage
7860111 bytes read in 583 ms (12.9 MiB/s)

=> bootm 0x70200000
## Booting kernel from Legacy Image at 70200000 …
Image Name:
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 7860047 Bytes = 7.5 MiB
Load Address: 70010000
Entry Point: 70010000
Verifying Checksum … OK
Uncompressing Kernel Image … OK

Starting kernel …

kernel initialized
Genode 14.11
int main(): — create local services —
int main(): — start init —
int main(): transferred 246 MB to init
int main(): — init created, waiting for exit condition —
[init] Could not open file “ld.lib.so”
[init] parent provides
[init] service “ROM”
[init] service “RAM”
[init] service “IRQ”
[init] service “IO_MEM”
[init] service “CAP”
[init] service “PD”
[init] service “RM”
[init] service “CPU”
[init] service “LOG”
[init] service “SIGNAL”
[init] service “VM”
[init] child “tz_vmm”
[init] RAM quota: 3932160
[init] ELF binary: tz_vmm
[init] priority: 0
[init -> tz_vmm] Start virtual machine …
undefined instruction

More debugging needed……


转载于:https://my.oschina.net/finallyjustice/blog/397623

相关文章:

  • [数分提高]2014-2015-2第5教学周第1次课
  • 【每天进步一点】毒药和老鼠的研究
  • linux下安装Python-2.7.9
  • 一条简单的sql在11g和12c中的不同
  • 关于mongodb在mac下的手动安装,非homwbrew安装(小白请进)
  • EcShop二次开发学习方法
  • 国庆后的特训
  • 梦游记-梦中游记
  • PHP-内核学习(一、变量)
  • 【cs229-Lecture18】线性二次型调节控制
  • 转:windows 下 netsh 实现 端口映射(端口转发)
  • assign, retain, weak, strong, copy,unsafe_unretain
  • java 反射
  • MSF溢出实战教程
  • 虚拟机的使用和Linux的一些基础
  • angular组件开发
  • centos安装java运行环境jdk+tomcat
  • CNN 在图像分割中的简史:从 R-CNN 到 Mask R-CNN
  • Laravel 中的一个后期静态绑定
  • magento 货币换算
  • MyEclipse 8.0 GA 搭建 Struts2 + Spring2 + Hibernate3 (测试)
  • SpingCloudBus整合RabbitMQ
  • spring boot下thymeleaf全局静态变量配置
  • Unix命令
  • 程序员最讨厌的9句话,你可有补充?
  • 关于springcloud Gateway中的限流
  • 后端_MYSQL
  • 基于axios的vue插件,让http请求更简单
  • 区块链分支循环
  • 山寨一个 Promise
  • 深度学习入门:10门免费线上课程推荐
  • 使用 5W1H 写出高可读的 Git Commit Message
  • 通过npm或yarn自动生成vue组件
  • ​草莓熊python turtle绘图代码(玫瑰花版)附源代码
  • # C++之functional库用法整理
  • # include “ “ 和 # include < >两者的区别
  • #pragma once与条件编译
  • (13)Latex:基于ΤΕΧ的自动排版系统——写论文必备
  • (14)Hive调优——合并小文件
  • (第61天)多租户架构(CDB/PDB)
  • (附源码)ssm户外用品商城 毕业设计 112346
  • (六) ES6 新特性 —— 迭代器(iterator)
  • (欧拉)openEuler系统添加网卡文件配置流程、(欧拉)openEuler系统手动配置ipv6地址流程、(欧拉)openEuler系统网络管理说明
  • (七)Java对象在Hibernate持久化层的状态
  • .NET I/O 学习笔记:对文件和目录进行解压缩操作
  • .Net IE10 _doPostBack 未定义
  • .NET 回调、接口回调、 委托
  • .NET处理HTTP请求
  • .net实现客户区延伸至至非客户区
  • .NET项目中存在多个web.config文件时的加载顺序
  • [AIGC] 使用Curl进行网络请求的常见用法
  • [Android Studio] 开发Java 程序
  • [AutoSAR系列] 1.3 AutoSar 架构
  • [Geek Challenge 2023] web题解
  • [git]git命令如何取消先前的配置