How to build Yocto Image to be flashed to eMMC for i.MX8 nano evk

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

How to build Yocto Image to be flashed to eMMC for i.MX8 nano evk

5,150 Views
nissim
Contributor II

Dear all,

I am using the evaluation kit of the i.MX8 nano ( 8MNANOOD4-EVK).

I have managed to build a Yocto image that boots from SD CARD.

Now i am trying to build a Yocto image that could be flashed into the evaluation kit eMMC memory.

I read both i.MX Linux® User's Guide and i.MX Yocto Project User's Guide documentations.

I updated the local.conf file as follows: echo "UBOOT_CONFIG = \"emmc\"" >> conf/local.conf

Use the following commands to build an image from scratch:

1. DISTRO=fsl-imx-xwayland MACHINE=imx8mnevk source imx-setup-release.sh -b xwayland_build

2. bitbake imx-image-full

Got the following errors:

ERROR: imx-boot-0.2-r0 do_compile: Execution of '/usr/nissim/imx-yocto-bsp/xwayland_build/tmp/work/imx8mnevk-poky-linux/imx-boot/0.2-r0/temp/run.do_compile.27741' failed with exit code 1:
cp: cannot stat '/usr/nissim/imx-yocto-bsp/xwayland_build/tmp/deploy/images/imx8mnevk/u-boot-spl.bin-imx8mnevk-emmc': No such file or directory
WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/work/imx8mnevk-poky-linux/imx-boot/0.2-r0/temp/log.do_compile.27741
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: 8MQ/8MM boot binary build
| NOTE: Copy ddr_firmware: ddr4_imem_1d_201810.bin from /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/deploy/images/imx8mnevk -> /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/work/imx8mnevk-poky-linux/imx-boot/0.2-r0/git/iMX8M
| NOTE: Copy ddr_firmware: ddr4_dmem_1d_201810.bin from /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/deploy/images/imx8mnevk -> /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/work/imx8mnevk-poky-linux/imx-boot/0.2-r0/git/iMX8M
| NOTE: Copy ddr_firmware: ddr4_imem_2d_201810.bin from /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/deploy/images/imx8mnevk -> /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/work/imx8mnevk-poky-linux/imx-boot/0.2-r0/git/iMX8M
| NOTE: Copy ddr_firmware: ddr4_dmem_2d_201810.bin from /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/deploy/images/imx8mnevk -> /usr/nissim/imx-yocto-bsp/xwayland_build/tmp/work/imx8mnevk-poky-linux/imx-boot/0.2-r0/git/iMX8M
| cp: cannot stat '/usr/nissim/imx-yocto-bsp/xwayland_build/tmp/deploy/images/imx8mnevk/u-boot-spl.bin-imx8mnevk-emmc': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/usr/nissim/imx-yocto-bsp/xwayland_build/tmp/work/imx8mnevk-poky-linux/imx-boot/0.2-r0/temp/run.do_compile.27741' failed with exit code 1:
| cp: cannot stat '/usr/nissim/imx-yocto-bsp/xwayland_build/tmp/deploy/images/imx8mnevk/u-boot-spl.bin-imx8mnevk-emmc': No such file or directory
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/usr/nissim/imx-yocto-bsp/sources/meta-imx/meta-bsp/recipes-bsp/imx-mkimage/imx-boot_0.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5129 tasks of which 2881 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/usr/nissim/imx-yocto-bsp/sources/meta-imx/meta-bsp/recipes-bsp/imx-mkimage/imx-boot_0.2.bb:do_compile

 

Please advice,

Nissim

Labels (1)
0 Kudos
6 Replies

5,046 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Nissim Beja,

Would you please confirm which BSP release you are using so I can try to replicate this issue? Also, would you please let me know which Host OS you are using? Ubuntu 16.04 and 18.04 are the recommended and supported Host OS for our BSP Releases.


From your description it looks like you are initializing the environment using the imx-setup-release.sh script every time you want to initialize bitbake in the terminal. You may run this script only when creating the build directory as to avoid overwriting the build configuration. If you already have created a build directory you may initialize bitbake running from the BSP directory:


$ source setup-environment <your_build_directory>


This will initialize bitbake and it will confirm that the local.conf file has not been touched. This leads me to another question, have you confirmed before running bitbake that the local.conf file still has the following line?


UBOOT_CONFIG = "emmc"


This should be enough to switch to emmc configuration for the bootloader. However, if you have already baked the bootloader (trough the u-boot-imx or an image) you may need to run a clean al least on the bootloader recipe to be sure that the bootloader gets recompiled with the new configuration. You can do this with the following command:


$ bitbake -c cleanall u-boot-imx


And then bake the bootloader again:


$ bitbake u-boot-imx

I hope this helps!

Regards,

0 Kudos

5,046 Views
nissim
Contributor II

Dear Gusarambula,

1. The BSP release i am using is as follows:

         DISTRO_VERSION = "3.0"

         DISTRO_CODENAME = "zeus"   

2. I am not initializing the environment using the imx-setup-release.sh script every time. I just made it from scratch just to be sure that it is not related to any other issues. 

3. I confirmed before running the build that UBOOT_CONFIG = "emmc" is located at the end of the local.conf file.

Waiting for your advises

Regards, 

Nissim

0 Kudos

5,046 Views
gusarambula
NXP TechSupport
NXP TechSupport


The problem with the emmc configuration for the bootloader is that it is not defined on the MACHINE configuration for the imx8mnevk. You can add it to the machine configuration file located on the following path:


<BSP_DIR>/sources/meta-imx/meta-bsp/conf/machine/imx8mnddr4evk.conf

(You would need to change this file as it is imported by the imx8mnevk.conf file)

You will see that there are a couple of UBOOT_CONFIG variables. You would need to add:
UBOOT_CONFIG[emmc] = “imx8mn_ddr4_evk_config,sdcard”


After this please do a cleanall of the bootloader files, just to be safe, and then bake the bootloader again.
$ bitbake -c cleanall u-boot-imx
$ bitbake u-boot-imx

I hope this helps!

Regards,

0 Kudos

341 Views
Lowry
Contributor I

Hi!

   I have the same question about here, based on imx8mplpddrevk changes, which.conf should I change?

imx8mpevk.conf imx8mp-lpddr4-ndm.conf imx8mpul-lpddr4-evk.conf

0 Kudos

5,046 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Nissim,

Thank you for the additional information. I was able to reproduce the problem. When baking just the u-boot-imx recipe it compiles the bootloader but won’t place it on the deploy/images folder and just leaves the temporary files on the other temporary folders. Thus, when baking any image it won’t be able to find the bootloader.


I will review the recipe files but depending on the complexity of the problem I may need to escalate to the BSP team, which may take some time. I will let you know as soon as I have more information.


Regards,

2,170 Views
arrivederccimamasita
Contributor III
Hello!

Is there any news on this issue?

I am in same conditions, some workaround was faunded?

best regards!
0 Kudos