Git Product home page Git Product logo

tiagolb / liboot-tz Goto Github PK

View Code? Open in Web Editor NEW

This project forked from finallyjustice/liboot-tz

0.0 2.0 0.0 126.29 MB

TrustZone project with Linux 2.6.35 and U-Boot (i.MX53QSB)

Makefile 0.62% C 94.95% Assembly 2.35% C++ 1.60% Objective-C 0.10% Shell 0.05% Clojure 0.01% Awk 0.01% SourcePawn 0.01% Python 0.09% Perl 0.12% UnrealScript 0.01% Yacc 0.02% Lex 0.01% Groff 0.04% Scilab 0.01% ASP 0.01% XS 0.01% Perl 6 0.01% PHP 0.02%

liboot-tz's Introduction

This is the TrustZone project. 
U-Boot is in Secure World. Linux 2.6.35 is in Normal World.

Setup Environment:
    export CROSS_COMPILE=arm-none-linux-gnueabi-
    export ARCH=arm


1. To compile U-Boot:
(1) make mx53loco_defconfig
(2) sudo dd if=u-boot.imx of=/dev/mmcblk0 bs=512 seek=2

2. To Compile Linux-2.6.35:
(1) make imx5_defconfig
(2) make 
(3) make uImage
(4) sudo dd if=arch/arm/boot/uImage of=/dev/mmcblk0 bs=512 seek=2048

Change U-Boot parameters:
(1) setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
(2) setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=192.168.10.1 root=/dev/mmcblk0p1 rootwait rw' 
(3) setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc dev 0;mmc read ${loadaddr} 0x800 0x4000;bootm'
(4) setenv bootcmd 'run bootcmd_mmc'
(5) saveenv
(6) run bootcmd

3. File System

Create and format rootfs partition (/dev/mmcblk0p1) on SD card.

Run sudo fdisk /dev/mmcblk0

u [switch the unit to sectors instead of cylinders]
d [repeat this until no partition is reported by the โ€˜pโ€™ command ]
n [create a new partition]
p [create a primary partition]
1 [the first partition]
8192 [starting at offset sector #8192, i.e. 4MB, which leaves enough space
for the kernel, the boot loader and its configuration data]
[using the default value will create a partition that spans to the
 last sector of the medium]
w [ this writes the partition table to the medium and fdisk exits]
 
sudo mkfs.ext4 /dev/mmcblk0p1

Go to the downloaded rootfs.
sudo cp -rpa [A-z]* /media/844b21c5-9e3b-4b5c-907d-afa9e582f39a/

sync

liboot-tz's People

Contributors

finallyjustice avatar

Watchers

James Cloos avatar Tiago Brito avatar

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.