mtk平台ATF介绍

1、链接地址

uboot
ATF

2、工具链

ARM 64位平台需要aarch64工具链,可以在staging_dir/toolchain- aarch64_xxxxx中找到。另外dtc工具来为ATF编译.dts文件,一般在
Ubuntu中的device-tree-compiler包,编译后的u-boot/kernel源代码树中的脚本/dtc。

3、配置 u-boot

make XXXXX_defconfig

4. Compile u-boot

make CROSS_COMPILE=<toolchain-prefix>

工具链位置一般位于
~/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0-musl下的aarch64-openwrt-linux

~/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0-musl/bin/aarch64-openwrt-linux-

5,编译ATF

make -f Makefile PLAT=<plat> BOOT_DEVICE=<bootdevice> BL33=<path-to-u-boot.bin> <optional-options> all fip

目标文件为bl2.img和fip.bin位于

<atf-src-dir>/build/<plat>/release

参数说明:

  • PLAT=
    mt7622/mt7981/mt7986/mt7988
  • BOOT_DEVICE
    在这里插入图片描述
  • NMBM=

This option is valid only when BOOT_DEVICE= is set to snand or spim-nand.
This option is incompatible with UBI=1
Value Description
0 Disable NMBM (default)
1 Enable NMBM

  • UBI=

Enable this option if FIP is located in a volume of UBI.
This option is valid only when BOOT_DEVICE= is set to snand or spim-nand.
This option is incompatible with NMBM=1
Value Description
0 Disable Full-UBI layout (default)
1 Enable Full-UBI layout

  • DRAM_USE_DDR4=

This option is valid only for mt7981/mt7986/mt7988.
MT7988: this is used for single DDR4 chip.
Value Description
0 The DRAM chip is DDR3 (default)
1 The DRAM chip is DDR4

  • DRAM_USE_COMB=

When this option suppresses DRAM_USE_DDR4.
This option is valid only for mt7988.
Value Description
0 No effect (default)
1 The MT7988 CPU uses KGD DDR die, or the board is using two DDR chips

  • DDR4_4BG_MODE=

This option must be used with DRAM_USE_COMB=1.
This option is valid only for mt7988.
Value Description
0 No effect (default)
1 Enable DDR4 32-bit 8GBytes mode

  • DDR3_FLYBY=

This option is valid only for mt7622.
Value Description
0 The board uses only one DRAM chip (default)
1 The board uses two dram chips (For BPI-R64)

  • BOARD_BGA=

This option is valid only for mt7981.
Value Description
0 The chip package is QFN (MT7981C) (default)
1 The chip package is BGA (MT7981A/MT7981B)

  • RAM_BOOT_DEBUGGER_HOOK=

This option is valid only when BOOT_DEVICE= is set to ram.
By using this option, the bl2.bin can be load by OpenOCD for debricking.
Please refer to: https://github.com/mtk-openwrt/openocd-scripts/tree/main/mt7622 16
Value Description
0 Disable debugger hook (default)
1 Enable debugger hook

  • DEVICE_HEADER_OFFSET=

This option is valid only when PLAT is mt7622 and BOOT_DEVICE= is set to sdmmc.
This option specify the absolute address of the BL2 in the SD card.
This value must match the real address of the BL2 in the SD card otherwise the device will not boot.
The default value is 0x80000.

  • ENABLE_JTAG=

This option is valid only when PLAT is mt7981/mt7988.
By default JTAG will be disabled in BL2.
Value Description
0 Disable JTAG (default)
1 Enable JTAG

  • USE_MKIMAGE= and MKIMAGE=

If you don’t want to use the closed-source program bromimage to generate bl2.img, you can use the open-source replacement —— The mkimage from u-boot.

To enable using mkimage, these two parameters must be used together:

USE_MKIMAGE=1 MKIMAGE= <path-to-mkimage>
  • OVERRIDE_FIP_BASE= and OVERRIDE_FIP_SIZE=

If both specified, they will override the default FIP base & size provided by each platform.
These options have no effect if UBI=1.

  • OVERRIDE_UBI_START_ADDR=

These options is only valid for UBI=1.
If specified, it will override the default UBI partition start address, which is 0x200000.

  • OVERRIDE_UBI_END_ADDR=

These options is only valid for UBI=1 and OVERRIDE_UBI_START_ADDR is set.
If specified, it will override the default UBI partition end address, which is 0, meaning the end of NAND.

  1. 例子
    Build for BPI-R64 booting from SPI-NAND:
make -f Makefile PLAT=mt7622 BOOT_DEVICE=snand DDR3_FLYBY=1 all fip

Build for MT7986 booting from SD using DDR4:

make -f Makefile PLAT=mt7986 BOOT_DEVICE=sdmmc DRAM_USE_DDR4=1 all fip

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/525087.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【MySQL】MySQL 的 SSL 连接以及连接信息查看

MySQL 的 SSL 连接以及连接信息查看 在上篇文章中&#xff0c;我们学习过 MySQL 的两种连接方式&#xff0c;回忆一下&#xff0c;使用 -h 会走 TCP 连接&#xff0c;不使用 -h 可以使用另两种方式来走 UnixSocket 连接。我们就接着这个话题再聊点别的&#xff0c;首先要纠正一…

springMVC自定义异常处理器

目录 &#x1f331;使用原因 &#x1f333;优点 &#x1f331;实现 &#x1f333;自定义一个异常 &#x1f333;异常处理 &#x1f333;测试 使用原因 系统中会有各种各样的&#xff0c;意料之中和意料之外的结果&#xff0c;我们并不能做到完全针对每个异常时刻做出针对…

图像处理ASIC设计方法 笔记7 图像存储SPRAM控制

(一)图像存储SPRAM控制 P83 模块三 图像存储SPRAM控制 输入的图像要存放在这个模块中。这个SPRAM的数据组织和读/写控制是设计的重点之一。 SPRAM是多个块的形式。用的是单端口RAM,采用分时读或者写(读写不同时),起到双端口的效果。应该用的是单端口RAM(Single-por…

【鸿蒙开发】第十七章 Web组件(一)

1 Web概述 Web组件用于在应用程序中显示Web页面内容&#xff0c;为开发者提供页面加载、页面交互、页面调试等能力。 页面加载&#xff1a;Web组件提供基础的前端页面加载的能力&#xff0c;包括&#xff1a;加载网络页面、本地页面、html格式文本数据。 页面交互&#xff1a…

WebSocket:实现客户端与服务器实时通信的技术

&#x1f90d; 前端开发工程师、技术日更博主、已过CET6 &#x1f368; 阿珊和她的猫_CSDN博客专家、23年度博客之星前端领域TOP1 &#x1f560; 牛客高级专题作者、打造专栏《前端面试必备》 、《2024面试高频手撕题》 &#x1f35a; 蓝桥云课签约作者、上架课程《Vue.js 和 E…

RHCE——二、时间管理器与远程登陆服务

RHCE——二、时间管理器与远程登陆服务 一、chrony服务器1、简介重要性Linux的两个时钟设置日期时间timedatectl命令设置date命令设置 NTPChrony介绍 2、安装与配置安装&#xff1a;Chrony配置文件分析实验1实验2重启报错解决方法 二、远程登录服务 一、chrony服务器 1、简介 …

方法的使用

1.什么是方法(method) 在java中方法就是一个代码片段.。几乎相当于c语言的函数。 2.方法定义 方法跟函数是几乎一样的。所以语法是大差不差的。就多了一点东西。之前我们在c语言里已经很详细讲过了函数。这里就简便的讲一下。 相比c语言函数多了个修饰符 。 现在看下其注意…

浅述字典攻击

一、前言 字典攻击是一种常见的密码破解方法&#xff0c;它使用预先编制的字典文件作为攻击字典&#xff0c;通过尝试猜测密码的方式来破解密码。下面是一个关于字典攻击的博客&#xff0c;希望能够为您了解字典攻击提供帮助。 二、字典攻击概述 字典攻击是一种密码破解方法&…

义乌等保测评公司有哪些?用哪款堡垒机好?

对于义乌&#xff0c;相信大家都听过&#xff0c;也都知道&#xff0c;耳熟能详。这不有义乌小伙伴在问&#xff0c;义乌等保测评公司有哪些&#xff1f;用哪款堡垒机好&#xff1f;今天我们就来简单聊聊。 义乌等保测评公司有哪些&#xff1f; 目前浙江义乌本地暂未有正规等保…

Zynq—AD9238数据采集DDR3缓存千兆以太网发送实验(三)

Zynq—AD9238数据采集DDR3缓存千兆以太网发送实验&#xff08;前导&#xff09; Zynq—AD9238数据采集DDR3缓存千兆以太网发送实验&#xff08;一&#xff09; Zynq—AD9238数据采集DDR3缓存千兆以太网发送实验&#xff08;二&#xff09; 八、板级验证 1.验证内容 通过电脑…

套接字的地址结构,IP地址转换函数,网络编程的接口

目录 一、套接字的地址结构 1.1 通用socket地址结构 1.2 专用socket地址结构 1.2.1 tcp协议族 1.2.3 IP协议族 二、IP地址转换函数 三、网络编程接口 3.1 socket() 3.2 bind() 3.3 listen() 3.4 accept() 3.5 connect() 3.6 close() 3.7 recv()、send() 3.8 recv…

云原生构建 微服务、容器化与容器编排

第1章 何为云原生&#xff0c;云原生为何而生 SOA也就是面向服务的架构 软件架构的发展主要经历了集中式架构、分布式架构以及云原生架构这几代架构的发展。 微服务架构&#xff0c;其实是SOA的另外一种实现方式&#xff0c;属于SOA的子集。 在微服务架构下&#xff0c;系统…