MTK方案下tee.img的打包方式的详细拆解
生活随笔
收集整理的這篇文章主要介紹了
MTK方案下tee.img的打包方式的详细拆解
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
快速鏈接:
.
👉👉👉 個人博客筆記導讀目錄(全部) 👈👈👈
在MTK手機方案中,有一個tee分區,對應的tee.img,它是由ATF Image和TEE Image拼在一起而來的.
那么它是怎么拼的呢?步驟:
- 制作tee.img,需要ATF image 和 mt6761_microtrust_release_pad.img
- 制作mt6761_microtrust_release_pad.img, 需要mt6761_microtrust_release_pad.txt 和 mt6761_microtrust.img
- mt6761_microtrust_release_pad.txt,是根據tee image以及幾個宏變量的配置而生成的一個頭部信息
- mt6761_microtrust.img,由teei.raw重命名而來
下列精簡了MTK代碼,是一個簡易的makefile,詮釋了tee.img的制作過程
atfimage=~/code/r0-truck/out_vnd/target/product/PROJECT/obj/ETC/atf_teeid.img_intermediates/ATF/bin/mt6761_atf.img teeiraw=~/code/r0-truck/vendor/mediatek/proprietary/trustzone/microtrust/source/common/300/teei/launched_with_q/teei.raw.PHONY:tee.img tee.img:$(atfimage) mt6761_microtrust_release_pad.img@echo "Trustzone build: $@ <= $^"$(hide) cat $^ > $@mt6761_microtrust_release_pad.img:mt6761_microtrust_release_pad.txt mt6761_microtrust.img@echo Microtrust build: $@$(hide) cat $^ > $@ALIGNMENT := 512 MKIMAGE_HDR_SIZE := 512 RSA_SIGN_HDR_SIZE := 576 mt6761_microtrust_release_pad.txt:teei.raw$(hide) FILE_SIZE=$$(($$(wc -c < "$<")+$(MKIMAGE_HDR_SIZE)+$(RSA_SIGN_HDR_SIZE)));\REMAINDER=$$(($${FILE_SIZE} % $(ALIGNMENT)));\if [ $${REMAINDER} -ne 0 ]; then dd if=/dev/zero of=$@ bs=$$(($(ALIGNMENT)-$${REMAINDER})) count=1; else touch $@; fimt6761_microtrust.img:teei.rawcp $(teeiraw) mt6761_microtrust.img總結
以上是生活随笔為你收集整理的MTK方案下tee.img的打包方式的详细拆解的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux内核设计与实现学习笔记目录
- 下一篇: Linux kernel crypto的