IMX8M error building uboot for emmc with Yocto

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

IMX8M error building uboot for emmc with Yocto

Jump to solution
7,972 Views
clement22
Contributor II

Hello,

I'm working with the IMX8M Mini EVK.

I followed the manual "i.MX Yocto Project User's Guide, Rev. L4.14.98-2.0.0_ga" to download and build the Yocto distribution for the board and I was able to get a Linux image working when booting from SDCard.

Now I want to boot from the eMMC. I followed the manual to rebuild uboot for eMMC and I edited local.conf by adding this line at the end : "UBOOT_CONFIG = "emmc"".

When I launch a build with that new config I end up with an error message:

Log data follows:
| DEBUG: Executing shell function do_compile
| 8MQ/8MM boot binary build
[...]
| cp: cannot stat '/space/home/username/projects/imx8evk_build/tmp/deploy/images/imx8mmevk/u-boot-spl.bin-imx8mmevk-emmc': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /space/home/username/projects/imx8evk_build/tmp/work/imx8mmevk-poky-linux/imx-boot/0.2-r0/temp/log.do_compile.6240)
ERROR: Task (/space/home/username/projects/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/imx-mkimage/imx-boot_0.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3056 tasks of which 5 didn't need to be rerun and 1 failed.

Do you know what could be causing this issue ?

For infos I'm using this config:

DISTRO=fsl-imx-wayland MACHINE=imx8mmevk source fsl-setup-release.sh -b imx8evk_build

And for building I'm using:

bitbake core-image-base

Thank you

Labels (1)
0 Kudos
Reply
1 Solution
6,538 Views
shivanipatel
Senior Contributor II

Hi, Clement Name

Please add below lines in respective files to build U-boot for eMMC:

  • UBOOT_CONFIG = "emmc"   in "conf/local.conf" file
  • UBOOT_CONFIG[emmc] = "imx8mm_evk_config,sdcard"   in "sources/meta-fsl-bsp-release/imx/meta-bsp/conf/machine/imx8mmevk.conf" file

And then after follow below commands to build an image,

  • bitbake -c cleansstate core-image-base
  • bitbake core-image-base

--------------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
--------------------------------------------------------------------------------------------------------------------------

Regards,

Shivani

View solution in original post

7 Replies
6,539 Views
shivanipatel
Senior Contributor II

Hi, Clement Name

Please add below lines in respective files to build U-boot for eMMC:

  • UBOOT_CONFIG = "emmc"   in "conf/local.conf" file
  • UBOOT_CONFIG[emmc] = "imx8mm_evk_config,sdcard"   in "sources/meta-fsl-bsp-release/imx/meta-bsp/conf/machine/imx8mmevk.conf" file

And then after follow below commands to build an image,

  • bitbake -c cleansstate core-image-base
  • bitbake core-image-base

--------------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
--------------------------------------------------------------------------------------------------------------------------

Regards,

Shivani

6,464 Views
fei_4_xu
Contributor III

In this case, emmc will be same as sdcard for u-boot, then what's the point to use UBOOT_CONFIG = "emmc" ?

0 Kudos
Reply
6,538 Views
clement22
Contributor II

Thank you, it worked. I can see emmc images in my deploy folder.

One last question, do you know if yocto provides a packaged image for the emmc (an image containing everything bootloader+kernel+rootfs) ?

For infos I'm trying to flash the eMMC with UUU tool. By looking at the tutorial for the tool I can't find how to flash the kernel.

I tried this command, but it seems to flash bootloader only:

$ sudo ./uuu -b emmc_all imx-boot-imx8mmevk-emmc.bin core-image-base-imx8mmevk.sdcard.bz2

Regards

Clement

0 Kudos
Reply
6,538 Views
clement22
Contributor II

Already tried, it doesn't work either.

I deleted the entire BSP and remade a repo init +repo sync + setup with the emmc enabled, the error is still here.

0 Kudos
Reply
6,538 Views
clement22
Contributor II

I tried that but it doesn't work.

It looks like some tasks are run but nothing happens. The uboot file is not updated in the deploy folder..

The only message I have is a warning telling me:

WARNING: /space/home/username/projects/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2018.03.bb.do_compile is tainted from a forced run

0 Kudos
Reply
6,538 Views
joanxie
NXP TechSupport
NXP TechSupport

maybe you can try clean first then build again

0 Kudos
Reply
6,538 Views
joanxie
NXP TechSupport
NXP TechSupport

since you built for uboot, I think you should use the comomand as below:

"

bitbake -f -c compile u-boot-imx

bitbake u-boot-imx.

"

0 Kudos
Reply