Dual Core swUpdate - IMX8ULP9EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dual Core swUpdate - IMX8ULP9EVK

375 Views
dhruvinrajpura
Contributor II

I am performing OTA(swupdate) in IMX8ULP-EVk9 and I followed docment 
https://docs.nxp.com/bundle/AN13872/page/topics/introduction.html 
and with this I am able to perform swupdate for A core(Linux) For that sw-description file I am using that I attched here.

Now I am updating A core image in /dev/mmcblk0p2 now I also want to update M core(MCU) side image as well (IMx8ULP is hetrogenius dual core MPU) what I need to add in sw-description file so I can update M core image and specificaly in which partition, 

Here is my current partition that I have with minimal core image

 

 

root@imx8ulp-9x9-lpddr4-evk:~# lsblk 
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mtdblock0     31:0    0    64M  0 disk 
mmcblk0      179:0    0  29.1G  0 disk 
|-mmcblk0p1  179:1    0  83.2M  0 part 
-mmcblk0p2  179:2    0 318.8M  0 part /
mmcblk0boot0 179:32   0     4M  1 disk 
mmcblk0boot1 179:64   0     4M  1 disk 

 

 

 

Can anyone explain that to update image on M core side in which partition I need to add and what needs to be update in sw-description file?

 

0 Kudos
Reply
15 Replies

330 Views
dhruvinrajpura
Contributor II

@Zhiming_Liu 
Thanks for response,

when I try to upload M core in the bootloader with dtb file and kernel image on 

mmcblk0boot0

 

while booting I am getting dtb file not avilable error, so It is not able to boot further.

How can I ensure that am I flashing in the correct partition or not and do I need to update dtb, kernel and M core image on the same partition or in different partition in sw-description file.

How sw-description file will look like in this case and what will be partition scheme for imx8ulp-evk9 that's main thing I want to know.

0 Kudos
Reply

308 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

The file you need to update is not in /dev/mmcblk0boot0. Please refer the templates in https://github.com/NXP/swupdate-scripts/tree/main/boards.

You can copy config files from i.MX93, the step is replacing file names in these configs.

https://github.com/NXP/swupdate-scripts/blob/main/boards/cfg_imx93_base.cfg

https://github.com/NXP/swupdate-scripts/blob/main/boards/cfg_imx93_update_image.cfg

Zhiming_Liu_1-1725416259158.png

 

https://github.com/NXP/swupdate-scripts/blob/main/boards/sw-description-imx93-emmc-dualcopy-image.te...

These names are different, and the offset is same as i.MX93(32K) on i.MX8ULP.

Zhiming_Liu_0-1725416074987.png

 

0 Kudos
Reply

232 Views
dhruvinrajpura
Contributor II

Thanks @Zhiming_Liu 

I created sw-description file as given in reference and attched here as well, with that when I perform swupdate only A core image is updating on the M core image is still previous one after rebooting.

Can you please check my sw-description and script to generate swu file for that?

0 Kudos
Reply

217 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

I will try that on EVK board.

Best Regards
Zhiming

0 Kudos
Reply

159 Views
dhruvinrajpura
Contributor II

@Zhiming_Liu 

Hi,

If you have tried swupdate on IMX8ULP-EVK9 on both cores(M core & A core), Please let me know so I can reproduce same thing on my side.

0 Kudos
Reply

142 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

89 Views
dhruvinrajpura
Contributor II

Hello @Zhiming_Liu 

Thank you so much for help,

Having one issue while performing https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Add-imx8ulp-support-in-swupdate-scripts/...

when I created 

./assemble_base_image.sh -b imx8ulp -e emmc -d doublecopy -m


and I created swu_doublecopy_rescue_imx8ulp_emmc_20240916.sdcard and I updated image with

uuu -b emmc_all .\imx-boot-imx8ulp-lpddr4-evk-sd.bin-flash_singleboot_m33 .\swu_doublecopy_rescue_imx8ulp_emmc_20240914.sdcard

 
getting error while botting board

DHCP client bound to address 192.168.68.138 (26 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
BOOTP broadcast 1
DHCP client bound to address 192.168.68.138 (33 ms)
*** ERROR: `serverip' not set
Cannot autoload with TFTPGET
WARN: Cannot load the DT
=> 

 

what I changed in your patch is name of dtb as i am using Imx8ULP-EVK9 so first I tried with exact changes you given I got error than I modified dtb name and again tried but still getting same issue

I checked env and got

fdt_addr=0x83000000
fdt_addr_r=0x83000000
fdt_high=0xffffffffffffffff
fdtcontroladdr=a3e04210
fdtfile=imx8ulp-9x9-evk.dtb


I tried with imx8ulp-evk.dtb and imx8ulp-9x9-evk.dtb both having same error on boot.

0 Kudos
Reply

68 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

Need to patch configs/imx8ulp_9x9_evk_defconfig. not configs/imx8ulp_evk_defconfig.Please check

Best Regards
Zhiming

0 Kudos
Reply

65 Views
dhruvinrajpura
Contributor II

@Zhiming_Liu 

Tried that also, but when I try to flash

uuu -b emmc_all .\imx-boot-imx8ulp-lpddr4-evk-sd.bin-flash_singleboot_m33 .\swu_doublecopy_rescue_imx8ulp_emmc_20240914.sdcard

 

After flashing when I boot up board getting Error to load dt file.

0 Kudos
Reply

43 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

Please check that MBR file has been regenerated, the error relate to partition.

Best Regards
Zhiming

0 Kudos
Reply

4 Views
dhruvinrajpura
Contributor II

Attching logs for reference

dhruvin-desktop-1@dhruvindesktop1:~/ota_patch_test/swupdate-scripts/base_image_assembling$ sudo ./assemble_base_image.sh -b imx8ulp -e emmc -d doublecopy -m
[sudo] password for dhruvin-desktop-1: 
No output image name specified! Use default name!
Output image name is: swu_doublecopy_rescue_imx8ulp_emmc_20240918.wic
>>>> Check partition table file...DONE
>>>> Check slota boot partition mirror...DONE
>>>> Check slotb boot partition mirror...DONE
>>>> Check slota link...DONE
>>>> Check slotb link...DONE
>>>> Making header...
pad_base: 0
pad_filename: /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/common/swu_dualslot_7.5G.pt
pad_size: 32K
output_pad_file: ./tmp.bin
32256 need to add to pad to 32768
pad_base: 32K
pad_filename: /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/slota/imx-boot-imx8ulp-9x9-lpddr4-evk-sd.bin-flash_singleboot_m33
pad_size: 8M
output_pad_file: ./tmp.bin
6514688 need to add to pad to 8388608
DONE
>>>> Making swupdate...
pad_base: 8M
pad_filename: /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/slota/Image
pad_size: 50M
output_pad_file: ./tmp.bin
11777536 need to add to pad to 52428800
pad_base: 50M
pad_filename: /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/slota/imx8ulp-9x9-evk.dtb
pad_size: 54M
output_pad_file: ./tmp.bin
4158025 need to add to pad to 56623104
pad_base: 54M
pad_filename: /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/slota/swupdate-image-imx8ulp-9x9-lpddr4-evk.cpio.gz.u-boot
pad_size: 120M
output_pad_file: ./tmp.bin
27318509 need to add to pad to 125829120
DONE
>>>> Making slota...
boot_pt: /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/common/slota_boot_pt_120M.mirror
slot: slota
mkfs.fat 4.1 (2017-01-24)
 Volume in drive : has no label
 Volume Serial Number is FF5E-FD2D
Directory for ::/

No files
                        125 564 928 bytes free

 Volume in drive : has no label
 Volume Serial Number is FF5E-FD2D
Directory for ::/

IMX8UL~1 DTB     36279 2024-09-18  15:10  imx8ulp-9x9-evk.dtb
IMAGE         32262656 2024-09-18  15:10  Image
        2 files          32 298 935 bytes
                         93 263 872 bytes free

pt_size_num: 3145728000
Calculated partition size: 3145728000
e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/slota/core-image-minimal-imx8ulp-9x9-lpddr4-evk.ext4: 4177/57536 files (0.9% non-contiguous), 165566/229956 blocks
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/slota/core-image-minimal-imx8ulp-9x9-lpddr4-evk.ext4 to 3072000 (1k) blocks.
The filesystem on /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/slota/core-image-minimal-imx8ulp-9x9-lpddr4-evk.ext4 is now 3072000 (1k) blocks long.

DONE
>>>> Making slotb...
boot_pt: /home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/common/slotb_boot_pt_120M.mirror
slot: slotb
mkfs.fat 4.1 (2017-01-24)
 Volume in drive : has no label
 Volume Serial Number is 02E3-9B0B
Directory for ::/

No files
                        125 564 928 bytes free

 Volume in drive : has no label
 Volume Serial Number is 02E3-9B0B
Directory for ::/

IMX8UL~1 DTB     36279 2024-09-18  15:11  imx8ulp-9x9-evk.dtb
IMAGE         32262656 2024-09-18  15:11  Image
        2 files          32 298 935 bytes
                         93 263 872 bytes free

pt_size_num: 3145728000
Calculated partition size: 3145728000
e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/home/dhruvin-desktop-1/ota_patch_test/swupdate-scripts/base_image_assembling/slotb/core-image-minimal-imx8ulp-9x9-lpddr4-evk.ext4: 4177/744000 files (0.9% non-contiguous), 339169/3072000 blocks
resize2fs 1.47.0 (5-Feb-2023)
The filesystem is already 3072000 (1k) blocks long.  Nothing to do!

DONE
Checking partition image ...
No extra image map found, ignored!
DONE
Checking image tail for GPT...
Not using GPT, ignored!
DONE
===========================================================================
Create base image swu_doublecopy_rescue_imx8ulp_emmc_20240918.wic successfully
===========================================================================
dhruvin-desktop-1@dhruvindesktop1:~/ota_patch_test/swupdate-scripts/base_image_assembling$ 
0 Kudos
Reply

24 Views
dhruvinrajpura
Contributor II

@Zhiming_Liu 

I am hittimg command with -m option so MBR will regenerate as written in script

echo "-m Only regenerate or overwrite MBR. This option can be used to generate MBR individually."
echo " Suppose that we don't need to generate MBR every time. Normally we only need to generate it once."
0 Kudos
Reply

191 Views
dhruvinrajpura
Contributor II

Thanks @Zhiming_Liu 

If you are performing it on evk board please do that with dual copy, because I am performing it as dualcopy swupdate.

If you completes it successfully on evk please share me zip file of that setup, I will re do it on my side as well.

0 Kudos
Reply

229 Views
dhruvinrajpura
Contributor II

@Zhiming_Liu 

Attaching cfg.txt file as well...

 

#!/usr/bin/bash

# Name of the SoC.
# This name will be used to source this board specific cfg file.
SOC_NAME=imx93

#############################################
# Used to generate update image.
#############################################
# Updated BSP version. This string will be added to default output file.
UPDATE_BSP_VER="LF_v6.1.36_2.1.0"

# Updated container version. This string will be added to default output file.
UPDATE_CONTAINER_VER="1.0"

# Supported SSL modes are RSA-PKCS-1.5, RSA-PSS and DGST.
SSL_MODE=RSA-PKCS-1.5

# Those images will be copied from slot_update to work directory and generate the update image.
# Format: [<image_name>:<truncate_size>]
# If truncate is not required, use ":" with no size.
UPDATE_IMAGES="
core-image-minimal-imx8ulp-9x9-lpddr4-evk.ext4:3000M
imx-boot-imx8ulp-9x9-lpddr4-evk-sd.bin-flash_singleboot_m33:
"

UPDATE_SCRIPTS="
"

# Template file that will be used to generate a sw-description file.
SW_DESCRIPTION_TEMPLATE="${WRK_DIR}/../boards/sw-description-imx93-emmc-dualcopy-image.template"
Tags (1)
0 Kudos
Reply

337 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

If you are using dual boot bootloader image,  the m core image is installed into imx-boot-xxxx bootloader, please refer the AN to update bootloader.

Best Regards
Zhiming

0 Kudos
Reply