Retrofit same example in AOSP10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I wanted to understand the concept of retrofit update. And I found that NXP supported retrofit in AOSP_10.0.0_1.0.0 to AOSP_10.0.0_2.0.0 and above.
I have IMX8QXP MEK hardware(revB)
1. Have flashed 10.0.0_1.0.0 demo image (https://www.nxp.com/webapp/Download?colCode=Q10.0.0_1.0.0_DEMO_8Q&appType=license) which doesnt have dynamic partition enabled: Boot successful
2. Also tried flashing 10.0.0_2.0.0 demo image (https://www.nxp.com/webapp/Download?colCode=Q10.0.0_2.0.0_DEMO_8Q&appType=license) which has dynamic partition: Boot successful
Checking the sorurce code, found this sample demo
Generated an image with this flag enabled. But facing issue in booting the device with local image. Is there anything missed?
* Complete flashed unit not booting (using uuu method), fails to boot android
[ 7.164160] Run /init as init process
[ 7.217886] init: init first stage started!
[ 7.222569] init: Switching root to '/first_stage_ramdisk'
[ 7.231936] init: Using Android DT directory /proc/device-tree/firmware/android/
[ 7.435558] init: bool android::init::FirstStageMount::InitRequiredDevices(): partition(s) not found in /sys, waiting for their uevent(s): system_a
[ 17.459357] init: Wait for partitions returned after 10010ms
[ 17.465098] init: bool android::init::FirstStageMount::InitRequiredDevices(): partition(s) not found after polling timeout: system_a
[ 17.477960] init: Failed to mount required partitions early ...
[ 17.489860] init: #00 pc 00000000000675cc /system/bin/init
[ 17.495506] init: #01 pc 0000000000093094 /system/bin/init
[ 17.501145] init: #02 pc 000000000000c650 /system/lib64/libbase.so
[ 17.507456] init: #03 pc 000000000003ef6c /system/bin/init
[ 17.513112] init: #04 pc 00000000000230f4 /system/bin/init
[ 17.518731] init: #05 pc 000000000007d844 /system/lib64/libc.so
[ 17.524796] init: Reboot ending, jumping to kernel
[ 17.529778] cfg80211: failed to load regulatory.db
* If I try to do OTA retrofit update from demo_imag_10.0.0_1.0.0 to locally built retrofit.zip, device fails to boot kernel, stops at this log
Starting kernel ...
Any pointers will be helpful.
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Nishal
I hope you are doing well.
->As the link you provided describes If the device is retrofitted to have a dynamic partition feature, set this variable to true to build the images and OTA package. Here is a demo to update 10.0.0_1.0.0 to 10.0.0_2.0.0 or higher.
It means 10.0.0._1.0.0 which does support the dynamic partition feature so one has to use the 10.0.0._2.0.0 version where one has to enable the macro
TARGET_USE_DYNAMIC_PARTITIONS ?= true
TARGET_USE_RETROFIT_DYNAMIC_
Please refer to this link to get more details on SWUpdate OTA i.MX8QXP MEK
https://community.nxp.com/t5/
Thanks & Regards,
Sanket Parekh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Sanket_Parekh ,
Thanks for your reply.
As mentioned in your reply, I already have these enabled
TARGET_USE_DYNAMIC_PARTITIONS ?= true
TARGET_USE_RETROFIT_DYNAMIC_PARTITION ?= true
Initially, even this was failing. The reason for this difference in boot partition size. So I had to additionally make these changes on AOSP10.0.0_2.0.0
In device/fsl/common/partition/device-partitions-28GB-ab_super.bpt, (for boot partition, reduce size to 48M)
{
"ab": true,
"label": "boot",
- "size": "64 MiB",
+ "size": "48 MiB",
"guid": "auto",
"type_guid": "bb499290-b57e-49f6-bf41-190386693794"
},
In device/fsl/imx8q/BoardConfigCommon.mk
@@ -143,7 +143,7 @@ BOARD_USES_RECOVERY_AS_BOOT := true
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
BOARD_DTBOIMG_PARTITION_SIZE := 4194304
-BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
+BOARD_BOOTIMAGE_PARTITION_SIZE := 50331648 #48M
But after this change, device is not booting android with logs as shared earlier.
If there any prebuilt retrofit OTA image tested earlier/or demos, please share with us so that we can check with the same image as well.
Any pointers will be very helpful.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Nishal
I hope you are doing well.
->I have shared a Document provided by the NXP link below Down.
->Please refer to Section 4 System Upgrade (OTA) Customization
https://community.nxp.com/
It will be helpful!
Thanks & Regards,
Sanket Parekh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Sanket_Parekh ,
Thanks for your reply.
I have checked the documents. Seems like it is specific for AOSP13, and also it doesnt have any details related to retrofit update.
While I am still trying to get the details for retrofit demo details AOSP10_2.0.0, we have tried few experiments and want to update on that
1. Device boots successfully when we flash using uuu, but with retrofit disabled
TARGET_USE_DYNAMIC_PARTITIONS ?= true
TARGET_USE_RETROFIT_DYNAMIC_PARTITION ?= false
2. Device stops to boot android (at firststagemount if we have following options enabled
TARGET_USE_DYNAMIC_PARTITIONS ?= true
TARGET_USE_RETROFIT_DYNAMIC_PARTITION ?= true
3. Now we have generated the OTA package with enabled TARGET_USE_RETROFIT_DYNAMIC_PARTITION := true
$ ./imx-make.sh bootloader kernel -j4
$ make target-files-package -j4
$ make otapackage -j4
With time device fails to load kernel.
4. Since bootloader/u-boot was not getting updated, we suspected uboot issue and used fastboot to update the bootloader as well. So kernel started booting but get stuck at this log
[ 0.032633] SELinux: Initializing.
[ 0.036154] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.043477] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.075382] ASID allocator initialised with 32768 entries
[ 0.088481] rcu: Hierarchical SRCU implementation.
[ 0.103637] EFI services will not be available.
[ 0.115897] smp: Bringing up secondary CPUs ...
Any pointers will be helpful,
Thanks & Regards,
Nishal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Nishal
I hope you are doing well.
I checked the steps, Thanks for the details.
Can you share more dmesg logs to debug it further?
Thanks & Regards,
Sanket Parekh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Sanket_Parekh ,
Please find attached logfile.
In this logfile
- we have flashed demo_image aosp10_1.0.0
- updated the bootloader using fastboot (bootloader is locally built from aosp10_2.0.0 source code)
- Then did OTA retrofit update (retrofit-eng-ota.zip file)
- Then reboot the system, system stops at kernel
Thanks in advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Nishal
I hope you are doing well.
I have shared a link, This doc explains the OTA procedure in detail.
Please refer to Section 7 OTA updates.
It will help you!
https://www.nxp.com/docs/en/
Thanks & Regards,
Sanket Parekh
