nxp-imx-support / meta-swupdate-imx

Yocto recipes to support SWUpdate on i.MX series SoC.
Other
0 stars 6 forks source link

iMX8MM-EVK : Failed to bitbake core-image-base #1

Open l4es opened 1 year ago

l4es commented 1 year ago

Dear @TerryLv,

I am following the AN13872 Enabling SWUpdate on i.MX 6ULL document and trying the instruction in 5.3 Steps to build SWUpdate inside rootfs from Yocto in the aforementioned document with the only difference: replacing the imx6ull(14x14evk) with imx8mmevk which seems to be supported in the repository as well. Steps : $ mkdir imx-yocto-bsp-5_15_32-2_0_x-swupdate/ $ cd imx-yocto-bsp-5_15_32-2_0_x-swupdate/ $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-kirkstone -m imx-5.15.32-2.0.0.xml $ repo sync $ cd sources/ $ git clone https://github.com/sbabic/meta-swupdate.git -b kirkstone $ git clone https://github.com/nxp-imx-support/meta-swupdate-imx.git -b kirkstone_5.15.32_2.0.0 Continue steps 4 to steps 6 in 5.3 Steps to build SWUpdate inside rootfs from Yocto of AN13872 Enabling SWUpdate on i.MX 6ULL

then,

$ DISTRO=fsl-imx-wayland MACHINE=imx8mmevk source imx-setup-release.sh -b build-xwayland-swupdate-imx8mmevk $ bitbake core-image-base Error : ... Initialising tasks: 100% |############################################################| Time: 0:00:03 Sstate summary: Wanted 856 Local 0 Mirrors 0 Missed 856 Current 861 (0% match, 50% complete) NOTE: Executing Tasks ERROR: u-boot-imx-2022.04-r0 do_deploy: ExecutionError('/workdir/imx-yocto-bsp-5_15_32-2_0_x-swupdate/build-xwayland-swupdate-imx8mmevk/tmp/work/imx8mmevk-poky-linux/u-boot-imx/2022.04-r0/temp/run.do_deploy.24577', 1, None, None) ERROR: Logfile of failure stored in: /workdir/imx-yocto-bsp-5_15_32-2_0_x-swupdate/build-xwayland-swupdate-imx8mmevk/tmp/work/imx8mmevk-poky-linux/u-boot-imx/2022.04-r0/temp/log.do_deploy.24577 Log data follows: | DEBUG: Executing python function sstate_task_prefunc | DEBUG: Python function sstate_task_prefunc finished | DEBUG: Executing shell function do_deploy | install: cannot stat '/workdir/imx-yocto-bsp-5_15_32-2_0_x-swupdate/build-xwayland-swupdate-imx8mmevk/tmp/work/imx8mmevk-poky-linux/u-boot-imx/2022.04-r0/image//etc/fw_env.config': No such file or directory | WARNING: exit code 1 from a shell command. ERROR: Task (/workdir/imx-yocto-bsp-5_15_32-2_0_x-swupdate/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2022.04.bb:do_deploy) failed with exit code '1' NOTE: Tasks Summary: Attempted 3235 tasks of which 3231 didn't need to be rerun and 1 failed.

Summary: 1 task failed: /workdir/imx-yocto-bsp-5_15_32-2_0_x-swupdate/sources/meta-imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2022.04.bb:do_deploy Summary: There was 1 ERROR message, returning a non-zero exit code.

Could you help to point out what is missing, please ? Thanks and best regards, Pascal Le Truong

TerryLv commented 1 year ago

Hi Pascal,

From log, it seems the reason is missing of /etc/fw_env.config. " | install: cannot stat '/workdir/imx-yocto-bsp-5_15_32-2_0_x-swupdate/build-xwayland-swupdate-imx8mmevk/tmp/work/imx8mmevk-poky-linux/u-boot-imx/2022.04-r0/image//etc/fw_env.config': No such file or directory " Please make sure that /etc/fw_env.config has been created in the rootfs (see 10.1 and pay attention to the Note when using 5.15.32 Yocto). Thanks! Regards Terry

l4es commented 1 year ago

Hi @TerryLv ,

I compared the step #7 of 5.3 Steps to build SWUpdate inside rootfs from Yocto in the AN13872 Enabling SWUpdate on i.MX 6ULL :

  1. Build SWUpdate inside images from Yocto. Command: cd fsl-release-bsp-imx6ull-5.15.32/ DISTRO=fsl-imx-wayland MACHINE=imx6ull14x14evk source imx-setup-release.sh -b build-xwayland-swupdate-imx6ull14x14evk bitbake core-image-base bitbake swupdate-image

and the Build section (pages 71, 72) of SWUpdate OTA i.MX8MM EVK_rev3.pdf from https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/SWUpdate-OTA-i-MX8MM-EVK-i-MX8QXP-MEK/ta-p/1307416, I saw that bitbaking of swupdate-image should inversely be done prior the expected image :

Build The same as build i.MX Yocto to apply build configurations and create a build DISTRO=fsl-imx-xwayland MACHINE=imx8mmevk source imx-setup-release.sh -b build-xwayland-swupdate-imx8mmevk For the SWUpade image(ram disk) build: bitbake swupdate-image After build, you will find swupdate-image-imx8mmevk.cpio.gz.u-boot. swupdate-image-imx8mmevk.cpio.gz.u-boot ram disk will be used as single copy update and recovery.

For the double copy, you just run command as i.MX Yocto documents tells you. Here is the command used for this demo: bitbake imx-image-multimedia After build, the SWUpdate has been integrated inside the images.

I think inverting the bitbaking orders (swupdate image then the expected image) could be the trick. Do you think so ?

Best Regards, Khang

TerryLv commented 1 year ago

Hi Khang, Yes, you're right. Thank you for pointing out the error. I'll update the AN on this. Thank you very much! Regards Terry