Coder Social home page Coder Social logo

msm8916-mainline / tfalkstub Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 15 KB

Stub layer to use 32-bit LK with Trusted Firmware-ARM (TF-A) on MSM8916

License: GNU General Public License v2.0

Makefile 9.62% Assembly 90.38%
arm aarch64 arm64 firmware msm8916 qcom qualcomm

tfalkstub's Introduction

tfalkstub

tfalkstub is a simple stub firmware that allows using the 32-bit "Little Kernel" (LK) bootloader from Qualcomm on top of 64-bit Trusted Firmware-A (TF-A). It switches the CPU to 32-bit mode and emulates required Secure Monitor Calls (SMC) to make LK work properly.

The following Qualcomm SoCs are supported by tfalkstub (and TF-A) so far:

tfalkstub is loaded at address 0x86400000, while LK should be loaded at 0x8f600000. All control is handed over to the actual operating system after LK has finished running. A 64-bit kernel should be loaded from LK; the emulation layer for 32-bit kernels in tfalkstub is not designed to be used for anything except LK. Booting e.g. 32-bit Linux (instead of 64-bit) may produce unexpected results.

Installation

Build and install TF-A for msm8916 with the following configuration (this will make it jump to tfalkstub instead of directly to the aboot firmware):

$ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=msm8916 PRELOADED_BL33_BASE=0x86400000

Build tfalkstub:

$ make CROSS_COMPILE=aarch64-linux-gnu-

The resulting ELF file must be "signed" before flashing it, even if the board has secure boot disabled. In this case the signature does not provide any security, but it provides the firmware with required metadata.

On boards without secure board you can use qtestsign to sign the firmware with automatically generated test keys:

$ ./qtestsign.py hyp tfalkstub.elf

Tip: If you clone qtestsign directly into your tfalkstub clone, running make will also automatically sign the binary!

Install the resulting tfalkstub-test-signed.mbn to the hyp partition.

WARNING: Do not flash incorrectly signed firmware on devices that have secure boot enabled! Make sure that you have a way to recover the board in case of problems (e.g. using EDL).

License

tfalkstub is based on qhypstub and is also licensed under the GNU General Public License, version 2.

tfalkstub's People

Contributors

stephan-gh avatar

Watchers

 avatar

Forkers

hansen6878

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.