Porting swupdate based on AN13872

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Porting swupdate based on AN13872

Porting swupdate based on AN13872

Environment

BSP: L6.1.22_2.0.0​

Platform: i.MX93

Links: 

https://github.com/NXP/swupdate-scripts

https://github.com/nxp-imx-support/meta-swupdate-imx

 

The AN13872 provides us the swupdate yocto layer, swupdate-scripts and test steps, but there is still much to add. The purpose of this knowledge base is to provide customized advice.

1.How to port meta-swupdate-imx to any yocto version you want?

As meta-swupdate-imx only provide kirkstone version, we can upgrade or degrade it based on this version. We will take L6.1.22_2.0.0​ porting steps as an example.

1.1 Download Yocto layer 

cd imx-yocto-bsp/sources
git clone https://github.com/sbabic/meta-swupdate.git -b mickledore
git clone https://github.com/nxp-imx-support/meta-swupdate-imx.git

1.2 Modify  Yocto layer 

imx-yocto-bsp/sources/meta-swupdate-imx/conf/layer.conf

Zhiming_Liu_0-1691565490091.png

 

You can find swupdate version in imx-yocto-bsp/sources/meta-swupdate/recipes-support/swupdate/

Zhiming_Liu_1-1691565520029.png

1.3 Handle patches in meta-swupdate-imx/recipes-bsp/u-boot/files/

About patchs in sources/meta-swupdate-imx/recipes-bsp/u-boot/files/ and imx-yocto-bsp/sources/meta-swupdate-imx/recipes-support/swupdate/files/, you need use devtool to unpack uboot and swupdate into workspace and add changes manunally for development.

CONFIG_ENV_OFFSET_REDUND=CONFIG_ENV_OFFSET+CONFIG_ENV_SIZE

Zhiming_Liu_2-1691565664319.png

 

sources/meta-swupdate-imx/recipes-bsp/u-boot/u-boot-imx_%.bbappend

Zhiming_Liu_3-1691565694894.png

2.How to flash base image?

Use uuu or dd command, just like common imx-image-xxx

3.swupdate-scripts porting suggestions

3.1 Partition table

You can modify partition table refer the size of images. For different soc, the first offset is different. If you are porting i.MX8MP based on iMX8MM, the offset should be 32K.

Zhiming_Liu_4-1691565894626.png

 

3.2 Some errors

3.2.1 This error indicates that you need enlarge size of rootfs.

e2fsck 1.45.5 (07-Jan-2020)
The filesystem size (according to the superblock) is 887599 blocks
The physical size of the device is 768000 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>?

 

 3.2.2 You need upgrade e2fsck verison.

e2fsck 1.46.5 (30-Dec-2021)
/home/nxf65025/imx-yocto-bsp/swupdate-scripts/base_image_assembling/slota/core-image-base-imx93-11x11-lpddr4x-                                                                                                evk.ext4 has unsupported feature(s): FEATURE_C12
e2fsck: Get a newer version of e2fsck!

/home/nxf65025/imx-yocto-bsp/swupdate-scripts/base_image_assembling/slota/core-image-base-imx93-11x11-lpddr4x-                                                                                                evk.ext4: ********** WARNING: Filesystem still has errors **********

resize2fs 1.46.5 (30-Dec-2021)
resize2fs: Filesystem has unsupported feature(s) (/home/nxf65025/imx-yocto-bsp/swupdate-scripts/base_image_ass

 solution:

wget https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.47.0/e2fsprogs-1.47.0.tar.xz
tar -xf e2fsprogs-1.47.0.tar.xz
cd e2fsprogs-1.47.0/
./configure
make -j16
sudo make install

 

3.2.3 mtools

/home/nxf65025/imx-yocto-bsp/swupdate-scripts/base_image_assembling/../utils/utils.sh: line 58: mdir: command not found
/home/nxf65025/imx-yocto-bsp/swupdate-scripts/base_image_assembling/../utils/utils.sh: line 66: mcopy: command not found
/home/nxf65025/imx-yocto-bsp/swupdate-scripts/base_image_assembling/../utils/utils.sh: line 66: mcopy: command not found
/home/nxf65025/imx-yocto-bsp/swupdate-scripts/base_image_assembling/../utils/utils.sh: line 68: mdir: command not found

solution: sudo apt-get install mtools

评论

Hello,

 

I am trying to integrate meta-swupdate to Yocto Linux BSP Linux 6.1.22_2.0.0​ for a custom board based on i.MX6ULL processor. I followed this document for porting. I am using the meta-swupdate layer from here

When I build and run the generated image on the custom board, I have observed that the kernel booting hangs after swupdate.service starts. I have raised a ticket in NXP community for the same, https://community.nxp.com/t5/i-MX-Processors/Kernel-booting-hangs-after-swupdate-service/td-p/172042.... I have attached the booting logs and the defconfig file used for swupdate in the ticket. I am not able to attach them here, so referenced the link here.

Any help would be appreciated

Thanks in advance.

 

Regards

Meetali Patel

 

Hello, well I am running in circles trying to add swupdate to a imx8mp based yocto system. The documentation is nonexistent for this processor, and there is no explanation in how to adapt this AN13872 for imx8mp. Plus, in AN13872 there is no mention of patches to be applied, while here mention swupdate and uboot patches. So what is the procedure?

无评分
版本历史
最后更新:
‎08-09-2023 12:35 AM
更新人: