[Yocto] WIC Image Creation Error for Yocto … mmcblk0.direct set 1 boot on returned ‘1’ instead of 0

On some hosts, we can get errors in phase do_image_wic with “mmcblk.direct set 1 boot on returned ‘1’ instead of 0” and wic file can not be created. Some log like below:
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_wic
| INFO: Creating image(s)…
|
| ERROR: _exec_cmd: export PATH=/home/minhth5/Yoctos/Linux-5.4.70_2.3.5/build-imx8qm/tmp/work/imx8qmmek-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/sbin:/home/minhth5/Yoctos/Linux-5.4.70_2.3.5/build-imx8qm/tmp/work/imx8qmmek-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/sbin:/home/minhth5/Yoctos/Linux-5.4.70_2.3.5/build-imx8qm/tmp/work/imx8qmmek-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin:$PATH;parted -s /home/minhth5/Yoctos/Linux-5.4.70_2.3.5/build-imx8qm/tmp/work/imx8qmmek-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8qmmek-20211220092034/tmp.wic.ln9ymulz/imx-imx-boot-bootpart-202112200920-mmcblk.direct set 1 boot on returned ‘1’ instead of 0
| output: Error: Error opening /home/minhth5/Yoctos/Linux-5.4.70_2.3.5/build-imx8qm/tmp/work/imx8qmmek-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx8qmmek-20211220092034/tmp.wic.ln9ymulz/imx-imx-boot-bootpart-202112200920-mmcblk.direct: Operation not permitted
I have tried many solutions before but can not resolve them. Suddenly, I found that when I stop and disable McAfee antivirus the problem has resolved :v So you can fix this problem by stop and disable McAfee follow commands:
# sudo /opt/McAfee/ens/tp/init/mfetpd-control.sh stop
# sudo /opt/McAfee/ens/esp/init/mfeespd-control.sh stop
# sudo /opt/McAfee/ens/tp/init/mfetpd-control.sh disable
# sudo /opt/McAfee/ens/esp/init/mfeespd-control.sh disable

I hope it will helpful for you!

5 Comments

Leave a Reply

Your email address will not be published.