https://source.android.google.cn/devices/bootloader
本文主要记录aosp官网关于bootloader的相关资料

Bootloader

A bootloader is a vendor-proprietary image responsible for bringing up the kernel on a device. It guards the device state and is responsible for initializing the Trusted Execution Environment (TEE) and binding >its root of trust.

The bootloader is comprised of many things including splash screen. To start boot, the bootloader may directly flash a new image into an appropriate partition or optionally use recovery to start the reflashing >process that will match how it is done for OTA. Some device manufacturers create multi-part bootloaders and then combine them into a single bootloader.img file. At flash time, the bootloader extracts the >individual bootloaders and flashes them all.

Most importantly, the bootloader verifies the integrity of the boot and recovery partitions before moving execution to the kernel and displays the warnings specified in the section Boot state.

我们目前ATV9是非A/B分区,到 ATV10的时候需要分区调整,应为system-as-root必须要求为A/B分区。
Android10会支持动态分区,即通过支持OTA升级的方式重新分区。

Partition Layout

In Android 10, the root file system is no longer included in ramdisk.img and is instead merged into system.img (that is, system.img is always created as if BOARD_BUILD_SYSTEM_ROOT_IMAGE was set). Devices >launching with Android 10:

Use a system-as-root partition layout (automatically enforced by the build with no options to change the behavior).
Must use a ramdisk, which is required for dm-linear.
Must set BOARD_BUILD_SYSTEM_ROOT_IMAGE to false. This setting is used only to differentiate between devices that use a ramdisk and devices that don't use a ramdisk (and instead mount system.img >directly).

The meaning of a system-as-root configuration differs between Android 9 and Android 10. In an Android 9 system-as-root configuration, BOARD_BUILD_SYSTEM_ROOT_IMAGE is set to true, which forces the build to >merge the root file system into system.img then mount system.img as the root file system (rootfs). This configuration is mandatory for devices launching with Android 9 but is optional for devices upgrading >to Android 9 and for devices running lower versions of Android. In an Android 10 system-as-root configuration, the build always merges $TARGET_SYSTEM_OUT and $TARGET_ROOT_OUT into system.img; this config is >the default behavior for all devices running Android 10.

Android 10 makes further changes to support dynamic partitions, a userspace partitioning system that enables over-the-air (OTA) updates to create, resize, or destroy partitions. As part of this change, the >Linux kernel can no longer mount the logical system partition on devices running Android 10, so this operation is handled by the first stage init.

在Android10中fastboot将从bootloader移动到用户空间,bootloader与recovery可合二为一

Moving Fastboot to User Space

Android 10 adds support for resizable partitions by relocating the fastboot implementation from bootloader to user space. This relocation enables moving the flashing code into a maintainable and testable >common location with only the vendor-specific parts of fastboot implemented by a Hardware Abstraction Layer (HAL).
Unified fastboot and recovery

Because userspace fastboot and recovery are similar, you can merge them into one partition/binary. Advantages include less space use and fewer partitions overall, as well as the ability for fastboot and >recovery to share their kernel and libraries.

To support fastbootd, the bootloader must implement a new boot control block (BCB) command of boot-fastboot. To enter fastbootd mode, bootloader should write boot-fastboot into the command field of the BCB >message and leave the recovery field of BCB unchanged (to enable restart of interrupted recovery tasks). The status, stage, and reserved fields remain unchanged as well. The bootloader is expected to load >and boot into the recovery image upon seeing boot-fastboot in the BCB command. Recovery then parses the BCB message and switches to fastbootd mode.

最新文章

  1. tsne官方论文代码解读和使用
  2. centos6.4下面安装postgresql以及客户端远程连接
  3. App创业者必看:如何选择免费数据分析平台
  4. mysql插入数据后返回自增ID的方法
  5. 中文编码、字符集,GBK, UTF-8的概念
  6. jQuery实现隔行变色
  7. 【转】MyEclipse第一个Servlet程序
  8. Spark RDD/Core 编程 API入门系列 之rdd实战(rdd基本操作实战及transformation和action流程图)(源码)(三)
  9. Java生成CSV文件
  10. Java DB loadBalance 设计
  11. js全选与反选
  12. 手机文件夹的emulated什么意思
  13. Ext.Net 1.x_Ext.Net.GridPanel嵌套Checkbox
  14. Mint-UI组件 MessageBox为prompt 添加判断条件
  15. [py][mx]django添加后台课程机构页数据-图片上传设置
  16. Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
  17. SoapUI 测试接口演示
  18. 如何禁止审查元素扒代码(F12)
  19. java基础---->多线程之interrupt(九)
  20. 怎样在 Azure 应用服务中生成和部署 Java API 应用

热门文章

  1. vue3的打包及打包的坑
  2. vsphere部署说明
  3. python接口自动化测试 - 数据驱动DDT模块的简单使用
  4. Ubuntu解决 MariaDB无密码就可以登录的问题
  5. MQTT协议的学习
  6. 9. HanLP《自然语言处理入门》笔记--9.关键词、关键句和短语提取
  7. Codeforces_731_C
  8. eclipse新下载,安装和配置
  9. Virus:病毒查杀
  10. 对c语言中static函数的理解