高通的编译烧写流程

脚本来自:pds/sh/turbox/tools/build_script/common/turbox_build.sh at master · sghong/pds · GitHub

唉,最后还是来看这个,这次就好好总结一下吧。。以最常用的QFIL的FLAT包为例。

从脚本可以看出模块的划分

build_all(){

build_bl

build_uefi

build_rpm

build_aop

build_tz

build_adsp

build_cdsp

build_mpss

build_slpi

build_hlos

update_common_info

}

1 HLOS

source build/envsetup.sh

lunch qssi-userdebug

bash build.sh -j32 dist --qssi_only EXPERIMENTAL_USE_OPENJDK9=1.8

source build/envsetup.sh

lunch <target>-userdebug

bash build.sh -j8 dist --target_only EXPERIMENTAL_USE_OPENJDK9=1.8

这一步可以生成boot.img, system.img, userdata.img

如果是安装好的设备,可以使用fastboot刷写。

复制代码
# 烧录 boot.img
fastboot flash boot out/target/product/DEVICE/boot.img

# 烧录 system.img
fastboot flash system out/target/product/DEVICE/system.img

# 烧录 userdata.img
fastboot flash userdata out/target/product/DEVICE/userdata.img

# 烧录 recovery.img (可选)
fastboot flash recovery out/target/product/DEVICE/recovery.img

2 非HLOS

MPSS

Build images -- ./build_variant.py divar.gen.prod bparams=-k

Clean the build -- ./build_variant.py divar.gen.prod --clean

烧写

复制代码
fastboot flash modem modem.mbn

Bootloader

Trustzone

RPM

aDSP

cDSP

WLAN

video

3 分区

这个要单独制作一个partition.xml,这个好像是专供高通平台用的。

复制代码
<?xml version="1.0" encoding="UTF-8" ?>
<data>
    <partition>
        <label>boot</label>
        <filename>boot.img</filename>
        <physical_partition_number>0</physical_partition_number>
        <start_sector>32768</start_sector>
        <size_in_KB>8192</size_in_KB>
    </partition>
    <partition>
        <label>modem</label>
        <filename>modem.mbn</filename>
        <physical_partition_number>0</physical_partition_number>
        <start_sector>65536</start_sector>
        <size_in_KB>16384</size_in_KB>
    </partition>
    <!-- 更多分区定义 -->
</data>

4 打包

将所有文件放在一个文件夹,如下:

复制代码
/flat_install_package/
  ├── boot.img
  ├── emmc_appsboot.mbn
  ├── modem.mbn
  ├── rpm.mbn
  ├── tz.mbn
  ├── sbl1.mbn
  ├── system.img
  ├── userdata.img
  ├── partition.xml   # 分区表描述文件 (QFIL 等工具需要的文件)

之后直接使用zip压缩即可。

5 烧写

烧写的时候选中分区xml文件。

相关推荐
鑫宇吖2 天前
IAR编辑器如何让左侧的工具栏显示出来?
编辑器·嵌入式·c·iar
飞凌嵌入式2 天前
飞凌嵌入式亮相第九届瑞芯微开发者大会:AIoT模型创新重做产品
人工智能·嵌入式硬件·嵌入式·飞凌嵌入式
凉、介2 天前
ARM 学习笔记(四)
c语言·arm开发·笔记·学习·嵌入式
Logcater3 天前
Linux和Windows基于V4L2和TCP的QT监控
linux·c++·qt·嵌入式·camera·v4l2
WKJay3 天前
深入理解 Cortex-M3 的内核寄存器组
嵌入式
凉、介3 天前
ARM 学习笔记(三)
arm开发·笔记·学习·嵌入式
DIY机器人工房4 天前
关于针对 DT_REG 出现红色波浪线的问题(编译错误/IDE警告),以下是 精准解决方案,保持你的代码功能完全不变:
ide·vscode·stm32·嵌入式硬件·嵌入式·diy机器人工房
linux开发之路5 天前
rk平台(rv1126/rk3588)音视频-交叉编译FFmpeg7.1
c++·ffmpeg·音视频·嵌入式·rv1126/rk358
楚潸潸5 天前
交叉编译opencv(Cpp)于arm64架构开发板上
人工智能·opencv·计算机视觉·嵌入式
gyggzg5 天前
一个适合MCU的分级菜单框架
单片机·ui·嵌入式