当前位置:   article > 正文

RK3588 A/B(无缝)系统OTA_rk3588 ab分区

rk3588 ab分区

编译rk3588无缝系统OTA,遇到得编译错误

1、错误1

打开 device/rockchip/rk3588/*****/BoardConfig.mk中得BOARD_USES_AB_IMAGE

 24 # AB image definition
 23 BOARD_USES_AB_IMAGE := true
 22 BOARD_ROCKCHIP_VIRTUAL_AB_ENABLE := false
  • 1
  • 2
  • 3

编译报如下错误

In file included from build/make/core/main.mk:1454:
build/make/core/Makefile:4744: error: AB_OTA_PARTITIONS must be defined when using AB_OTA_UPDATER.
14:51:53 ckati failed with: exit status 1

#### failed to build some targets (02:56 (mm:ss)) ####

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

在device/rockchip/common/device.mk中有配置AB_OTA_PARTITIONS宏,不知道为啥没有生效,没细研究;
修改 在device/rockchip/rk3588/*****/BoardConfig.mk文件下面增加宏AB_OTA_PARTITIONS

AB_OTA_PARTITIONS := system
  • 1

make -j18 编译通过

不要打开BOARD_ROCKCHIP_VIRTUAL_AB_ENABLE配置,打开以后编译也会报错;

make dist报错

make dist -j18
报错内容如下:

[ 98% 360/364] Package OTA: out/target/product/****/****-ota-eng.my_pc.zip
FAILED: out/target/product/****/****-ota-eng.my_pc.zip out/target/product/****/ota_metadata
/bin/bash -c "PATH=out/host/linux-x86/bin/:system/extras/ext4_utils/:out/soong/host/linux-x86/bin/:\$PATH out/host/linux-x86/bin/ota_from_target_files --verbose --extracted_input_target_files out/target/product/****/obj/PACKAGING/target_files_intermediates/****-target_files-eng.my_pc --path out/host/linux-x86  -k build/make/target/product/security/testkey --output_metadata_path out/target/product/****/ota_metadata out/target/product/****/obj/PACKAGING/target_files_intermediates/****-target_files-eng.my_pc.zip out/target/product/****/****-ota-eng.my_pc.zip"
........
Extracting images for full update.
Detected .zip file, extracting Brillo image.
Archive:  out/target/product/****/obj/PACKAGING/target_files_intermediates/****-target_files-eng.my_pc.zip
 extracting: /home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/TEMP.VH6NUl/META/ab_partitions.txt  
List of A/B partitions for DST_PARTITIONS: system
Archive:  out/target/product/****/obj/PACKAGING/target_files_intermediates/****-target_files-eng.my_pc.zip
  inflating: /home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/TEMP.l9yESo/META/dynamic_partitions_info.txt  
Archive:  out/target/product/****/obj/PACKAGING/target_files_intermediates/****-target_files-eng.my_pc.zip
 extracting: /home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/TEMP.g1wXAp/META/apex_info.pb  
Archive:  out/target/product/****/obj/PACKAGING/target_files_intermediates/****-target_files-eng.my_pc.zip
  inflating: /home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/TEMP.EIyjYs/IMAGES/system.img  
Converting Android sparse image system.img to RAW.
Archive:  out/target/product/****/obj/PACKAGING/target_files_intermediates/****-target_files-eng.my_pc.zip
  inflating: /home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/TEMP.mTZid3/IMAGES/system.map  
Extracted DST_PARTITIONS[system]: 1144291328 bytes
Generating full update.
Running delta_generator with args: --out_file=/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/payload-yp5ic7.bin --partition_names=system --new_partitions=/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/system.img.J5ihvt --new_mapfiles=/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/system.map.lt9VCt --major_version=2 --max_timestamp=1685513381 --partition_timestamps=system:1685513381 --dynamic_partition_info_file=/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/dynamic_partitions_info.RVH5xo --apex_info_file=/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/apex_info.OqeYep
[0531/151414.194524:ERROR:payload_generation_config.cc(211)] Cannot find partition system_ext which is in rockchip_dynamic_partitions_partition_list
[0531/151414.194667:FATAL:generate_delta_main.cc(628)] Check failed: payload_config.target.ValidateDynamicPartitionMetadata(). 
/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/../lib64/libchrome.so(base::debug::StackTrace::StackTrace(unsigned long)+0x17) [0x7f757581af37]
/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/../lib64/libchrome.so(logging::LogMessage::~LogMessage()+0x8a) [0x7f75757a3baa]
out/host/linux-x86/bin/delta_generator(+0xc5595) [0x55ce94485595]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f75745e9c87]
out/host/linux-x86/bin/delta_generator(+0xc18e9) [0x55ce944818e9]

/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/brillo_update_payload: line 650:  1910 Aborted                 (core dumped) "${GENERATOR}" "${GENERATOR_ARGS[@]}"
2023-05-31 15:14:14 - ota_from_target_files.py - ERROR   : 
   ERROR:
Traceback (most recent call last):
  File "/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1496, in <module>
  File "/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1470, in main
  File "/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1130, in GenerateAbOtaPackage
  File "/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 422, in Generate
  File "/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 394, in _Run
  File "/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/host/linux-x86/bin/ota_from_target_files/common.py", line 312, in RunAndCheckOutput
    args, proc.returncode, output))
ExternalError: Failed to run command '['brillo_update_payload', 'generate', '--payload', '/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/payload-yp5ic7.bin', '--target_image', 'out/target/product/****/obj/PACKAGING/target_files_intermediates/****-target_files-eng.my_pc.zip', '--max_timestamp', '1685513381', '--partition_timestamps', u'system:1685513381']' (exit code 134):

[ 99% 361/364] Target super fs image from target files: out/target/product/****/obj/PACKAGING/super.img
2023-05-31 15:13:22 - build_super_image.py - INFO    : Building super image from extracted target files...
2023-05-31 15:13:22 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop
2023-05-31 15:13:22 - common.py - WARNING : Failed to read VENDOR/etc/build.prop
2023-05-31 15:13:30 - sparse_img.py - INFO    : Total of 279368 4096-byte output blocks in 20 input chunks.
2023-05-31 15:13:30 - sparse_img.py - INFO    : Total of 38063 4096-byte output blocks in 4 input chunks.
2023-05-31 15:13:30 - sparse_img.py - INFO    : Total of 68969 4096-byte output blocks in 8 input chunks.
2023-05-31 15:13:30 - sparse_img.py - INFO    : Total of 1655 4096-byte output blocks in 2 input chunks.
2023-05-31 15:13:30 - sparse_img.py - INFO    : Total of 170 4096-byte output blocks in 2 input chunks.
2023-05-31 15:13:30 - sparse_img.py - INFO    : Total of 64 4096-byte output blocks in 4 input chunks.
2023-05-31 15:13:30 - sparse_img.py - INFO    : Total of 56880 4096-byte output blocks in 5 input chunks.
2023-05-31 15:14:33 - build_super_image.py - INFO    : Done writing image out/target/product/****/obj/PACKAGING/super.img_intermediates/super.img
15:14:34 ninja failed with: exit status 1

#### failed to build some targets (13:56 (mm:ss)) ####
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57

通过打印得信息我们可以按看到 提示 :
Cannot find partition system_ext which is in rockchip_dynamic_partitions_partition_list
在rockchip_dynamic_partitions_partition_list中找不到分区system_ext;
我们查看 /home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/TEMP.VH6NUl/META/ab_partitions.txt
内容为我们配置system;

system
  • 1


/home/my_pc/disk1/rk/3588/RK3588_Android12.0/out/soong/.temp/TEMP.l9yESo/META/dynamic_partitions_info.txt
内容如下:

use_dynamic_partitions=true
lpmake=lpmake
build_super_partition=true
build_super_empty_partition=true
super_metadata_device=super
super_block_devices=super
super_super_device_size=5372903424
dynamic_partition_list=   system system_ext vendor vendor_dlkm odm odm_dlkm product
super_partition_groups=rockchip_dynamic_partitions
super_rockchip_dynamic_partitions_group_size=2682257408
super_rockchip_dynamic_partitions_partition_list=   system system_ext vendor vendor_dlkm odm odm_dlkm product
super_partition_size=5372903424
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

在项目中查找 super_rockchip_dynamic_partitions_partition_list
查看配置在 :
device/rockchip/common/build/rockchip/DynamicPartitions.mk
rockchip_dynamic_partitions配置如下

BOARD_ROCKCHIP_DYNAMIC_PARTITIONS_PARTITION_LIST := system system_ext vendor vendor_dlkm odm odm_dlkm product
  • 1

我们修改AB_OTA_PARTITIONS和BOARD_ROCKCHIP_DYNAMIC_PARTITIONS_PARTITION_LIST 相同进行测试;

  2 AB_OTA_PARTITIONS := \
  1     system \
45      system_ext \                                                                                             
  1     vendor \
  2     vendor_dlkm \
  3     odm \
  4     odm_dlkm \
  5     product

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

make dist -j18 编译通过
测试 oat 升级

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号