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?
@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.
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
These names are different, and the offset is same as i.MX93(32K) on i.MX8ULP.
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?
Hi
I will try that on EVK board.
Best Regards
Zhiming
@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.
Hi
Please refer this:
https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Add-imx8ulp-support-in-swupdate-scripts/...
Best Regards
Zhiming
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.
Hi
Need to patch configs/imx8ulp_9x9_evk_defconfig. not configs/imx8ulp_evk_defconfig.Please check
Best Regards
Zhiming
@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.
Hi
Please check that MBR file has been regenerated, the error relate to partition.
Best Regards
Zhiming
@Zhiming_Liu
IMPORTANT
Apart from dual copy If I just want to update M core image
I applied patch you given for u-boot and generated core-image-minimal.wic file in yocto and flashed it on board.
Than I generated .swu file with
sw-description-imx8ulp-emmc-dualcopy-image.template
where we are including m33 image and bootscript when I update it on web-ui of swupdate,
It is compliting successfully and A core got rebooted but M core is still with previous loaded image it is not updating
Am I missing any step on above?
Hi
Need to modify here, then bootloader will be replaced. Then you need make sure you are using new M33 firmware.
Best Regards
Zhiming
Hello @Zhiming_Liu
For Update M core (Singlecopy) I am able to perform swupdate, but after swupdate is completes, I need to do hard reboot, also If I just reboot A core not observing any moment on M core to start updated code on M core currently hard reboot is only option for me, Can you tell me anything I can perform (by command or else) that can reboot M core and load newly updated firmware in it?
Thanks @Zhiming_Liu
It's working fine to update M core image,
For dual copy purpose in the cfg_imx8ulp_base.cfg currently looks like below
#!/usr/bin/bash
# Name of the SoC.
# This name will be used to source this board specific cfg file.
SOC_NAME=imx8ulp
#############################################
# Used to generate base image.
#############################################
# Partition table format, MBR or GPT.
IMAGE_PT_TBL_FMT="MBR"
# Path of MBR file. If -m is specified in command option, this file will be regenerated.
IMAGE_PT_TBL_PATH="${WRK_DIR}/common/swu_dualslot_7.5G.pt"
# Information of MBR file. Format is [FILENAME:<OFFSET_START>:<OFFSET_END>]
IMAGE_PT_TBL="${IMAGE_PT_TBL_PATH}:0:7500M"
# MBR header length. For MBR, this is always 512.
IMAGE_PT_TBL_LENGTH=512
# MBR partition information. When the MBR need to be regenerated, this struct will be used to generate a new MBR.
# Format: [PARTITION_NAME:<OFFSET_START>:<OFFSET_END>:<Filesystem Type>]
# Numbers and fs type in this struct will be passed to command directly.
# sudo parted <PARTITION_NAME> unit MiB mkpart primary <Filesystem Type> <OFFSET_START> <OFFSET_END>
IMAGE_PT_TABLE_STRUCT="
1:SLOTA_BOOT_PT:120:240:fat32
2:SLOTA_ROOTFS:240:3240:ext4
3:SLOTB_BOOT_PT:3240:3360:fat32
4:SLOTB_ROOTFS:3360:6360:ext4
"
# Header of a image.
# Contains MBR, bootloader and padding.
# Format: [FILEPATH:<OFFSET_START>:<OFFSET_END>]
IMAGES_HEADER="
${IMAGE_PT_TBL_PATH}:0:32K
${WRK_DIR}/slota/imx-boot-imx8ulp-9x9-lpddr4-evk-sd.bin-flash_singleboot_m33:32K:8M
"
# SWUpdate image.
# Contains Image, dtb and ramfs for SWUpdate.
# Format: [FILEPATH:<OFFSET_START>:<OFFSET_END>]
IMAGES_SWUPDATE="
${WRK_DIR}/slota/Image:8M:50M
${WRK_DIR}/slota/imx8ulp-9x9-evk.dtb:50M:54M
${WRK_DIR}/slota/swupdate-image-imx8ulp-9x9-lpddr4-evk.cpio.gz.u-boot:54M:120M
"
# SlotA boot partion files list, which will be copied into slotb boot partition.
SLOTA_BOOT_PT_FILES="
${WRK_DIR}/slota/imx8ulp-9x9-evk.dtb
${WRK_DIR}/slota/Image
"
# SLOTA images
# Contains boot partition and rootfs.
# Format: [FILEPATH:<OFFSET_START>:<OFFSET_END>]
SLOTA_BOOT_PT="${WRK_DIR}/common/slota_boot_pt_120M.mirror:100M:220M"
SLOTA_ROOTFS="${WRK_DIR}/slota/core-image-minimal-imx8ulp-9x9-lpddr4-evk.ext4:220M:3220M"
SLOTA_IMAGES="
${SLOTA_BOOT_PT}
${SLOTA_ROOTFS}
"
# SlotB boot partion files list, which will be copied into slotb boot partition.
SLOTB_BOOT_PT_FILES="
${WRK_DIR}/slotb/imx8ulp-9x9-evk.dtb
${WRK_DIR}/slotb/Image
"
# SLOTB images
# Contains boot partition and rootfs.
# Format: [FILEPATH:<OFFSET_START>:<OFFSET_END>]
SLOTB_BOOT_PT="${WRK_DIR}/common/slotb_boot_pt_120M.mirror:3220M:3340M"
SLOTB_ROOTFS="${WRK_DIR}/slotb/core-image-minimal-imx8ulp-9x9-lpddr4-evk.ext4:3340M:6340M"
SLOTB_IMAGES="
${SLOTB_BOOT_PT}
${SLOTB_ROOTFS}
"
Do we require any modification in this, because we are putting image of M core from 32K should we go from 0:32K for M core image, May be that's why I am getting error to load dt?
Hi
Do not modify base config.
Best Regards
Zhiming
@Zhiming_Liu
If possible can you check it on IMX8ULP-EVK9, whethere you are able to flash that (.sdcard) image or not?
I don't have an EVK9 around at the moment, you can check the mmc device port difference in the EVK9 uboot
@Zhiming_Liu
If you had performed dualcopy on imx8ulp-evk than can you share that zip of that setup so I can try it out on my side,
You can share zip and steps I will follow that.
The images on my side are for imx8ulp-lpddr4-evk. Do you have imx8ulp-evk? not IMX8ULP9EVK
@Zhiming_Liu Yes,
you can share dualcopy image setup for imx8ulp-lpddr4-evk as zip with steps, I will perform it.