GCC in Linux on i.MX8M Nano EVK

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

GCC in Linux on i.MX8M Nano EVK

Jump to solution
880 Views
jaredwheeler
Contributor III

Attempting to stand up a GCC toolchain within a Yocto build running on the 8M Nano Eval Kit.  

Specifically running the Console-only 'core-image-base' image from the Poky layer.

Currently have a high-functioning 8M Nano Eval Kit with the 'core-image-base' Linux build, which outputs a terminal display to an HDMI monitor and accepts USB keyboard input, plus functioning WiFi connectivity.

 

The problem space:

  1. Seeking empirical performance comparison of Raspberry Pi BCM core (quad A72) vs. i.MX 8M core (quad A53+CM7).
  2. Currently have known-good C codebase running on R.Pi.

 

My assumptions -- Can anyone please challenge these...:

  1. Best approach is to:
    1. git pull my performance test application source code to the 8M Nano Eval Kit
    2. compile my performance test application natively on the 8M Nano Eval Kit
  2. It's possible to install a GCC toolchain into the Linux build on the 8M Nano Eval Kit

 

Attempted so far:

  1. use apt-get on 8M Nano EVK to install the build-essential package 
    1. fails due to multiple dependency issues (perl!?!)
  2. add imx-yocto-bsp/sources/poky/meta/recipes-devtools recipes to the Linux build
    1. seriously lost on how to structure recipes vs. layers here
    2. struggling to understand how to add the required recipes to the core-image-base setup

 

If anyone in the community is able to clarify, well any of this, really, I'd really appreciate it.  If my assumptions seem off, please let me know.  Also if there are other ways to approach the problem, I'm all ears.

Thanks!

0 Kudos
Reply
1 Solution
865 Views
jaredwheeler
Contributor III

First, thanks for the speedy response.  Certainly makes me glad I picked an i.MX board for this performance evaluation.

Second, the full-image (imx-image-full?) does seem to contain a C toolchain, but it's not GCC, is it?  Or am I mis-reading the binaries?

Finally, with a bit of digging, I have been able to stand up the following:

  • i.MX M8 Nano Eval Kit
  • console-only Yocto Linux build (core-image-base)
  • direct monitor/usb keyboard i/o (via connection hardware provided in EVK)
  • GCC toolchain
  • cURL (libcurl specifically -- required by git)
  • git

 

In general, it seems best to:

  1. use the existing Yocto recipes for GCC/toolchains, incorporating everything into the Linux image
    1. (See note below)
  2. copy the source code for cURL and git to the rootfs partition after you've flashed the SD card image.
  3. get the Eval Kit board booted on the Linux image
  4. build cURL from source
  5. build git from source

Heads up: there is a circular dependency between git and cURL.  git clone requires cURL. The cURL source is only available via a git clone call.  

To avoid this madness, copy both cURL's source code and git's source code directly to the SD card's rootfs partition from whatever machine you use to flash the SD card image.

Then once you're booted on the EVK, do the cURL build (taking note of the special instructions in the GIT-INFO readme), THEN do the git build.

 

Note that this setup uses only the core-image-base Image.  I had trouble building the imx-image-full on my ancient build machine.

Yocto edits for the GCC toolchains follow...

Add the following lines to the end of <build dir>/conf/local.conf:

EXTRA_IMAGE_FEATURES +="dbg-pkgs"

EXTRA_IMAGE_FEATURES +="tools-debug"

EXTRA_IMAGE_FEATURES +="tools-sdk"

EXTRA_IMAGE_FEATURES +="dev-pkgs"

 

You may not need all those.  I just stopped trimming once I found a working GCC install.

View solution in original post

0 Kudos
Reply
2 Replies
866 Views
jaredwheeler
Contributor III

First, thanks for the speedy response.  Certainly makes me glad I picked an i.MX board for this performance evaluation.

Second, the full-image (imx-image-full?) does seem to contain a C toolchain, but it's not GCC, is it?  Or am I mis-reading the binaries?

Finally, with a bit of digging, I have been able to stand up the following:

  • i.MX M8 Nano Eval Kit
  • console-only Yocto Linux build (core-image-base)
  • direct monitor/usb keyboard i/o (via connection hardware provided in EVK)
  • GCC toolchain
  • cURL (libcurl specifically -- required by git)
  • git

 

In general, it seems best to:

  1. use the existing Yocto recipes for GCC/toolchains, incorporating everything into the Linux image
    1. (See note below)
  2. copy the source code for cURL and git to the rootfs partition after you've flashed the SD card image.
  3. get the Eval Kit board booted on the Linux image
  4. build cURL from source
  5. build git from source

Heads up: there is a circular dependency between git and cURL.  git clone requires cURL. The cURL source is only available via a git clone call.  

To avoid this madness, copy both cURL's source code and git's source code directly to the SD card's rootfs partition from whatever machine you use to flash the SD card image.

Then once you're booted on the EVK, do the cURL build (taking note of the special instructions in the GIT-INFO readme), THEN do the git build.

 

Note that this setup uses only the core-image-base Image.  I had trouble building the imx-image-full on my ancient build machine.

Yocto edits for the GCC toolchains follow...

Add the following lines to the end of <build dir>/conf/local.conf:

EXTRA_IMAGE_FEATURES +="dbg-pkgs"

EXTRA_IMAGE_FEATURES +="tools-debug"

EXTRA_IMAGE_FEATURES +="tools-sdk"

EXTRA_IMAGE_FEATURES +="dev-pkgs"

 

You may not need all those.  I just stopped trimming once I found a working GCC install.

0 Kudos
Reply
874 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You need use full-image,then you can use gcc and git

 

use apt-get on 8M Nano EVK to install the build-essential package

-->Can't realize this in official image, you need port ubuntu/debain rootfs by yourself.

0 Kudos
Reply