Skip to content

01 2. Build Yocto Image

AdlinkCCoE edited this page May 22, 2023 · 3 revisions

1. Set up a build host environment:

  1.1 Recommended Hardware for the host

  • Intel Core-i7 Processor (>= 4 cores)
  • at least 8GB Memory
  • at least 500GB Disk sapce
  • Ubuntu 18.04 LTS 64bit for Yocto Project Build
  • High speed network connectivity

 1.2 Essential host Packages are required to be installed on your host :

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ 
  	                 build-essential chrpath socat libsdl1.2-dev xterm sed cvs subversion \ 
  	                 coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc \ 
  	                 g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial \ 
  	                 autoconf automake groff curl lzop asciidoc u-boot-tools

Note:

Please Don't use the root account to build Yocto. it might cause unpredictable errors.


  1.3 "Google repo" packages is required to be installed on your host :

$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=${PATH}:~/bin

2. Fetch the source from various git location and checkout the specific commit as below:

2.1 Before fetch the source, please make sure that git is set up properly with the commands below:

$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list

2.2 please create the working directory. we're creating "imx-yocto-bsp" .

$ mkdir imx-yocto-bsp 
$ cd imx-yocto-bsp

2.3 Start to download the source with the command below. Please choose the SMARC module & branch you would like to build.

  • LEC-iMX6R2 / LEC-iMX6 with Zeus

    $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-zeus -m imx-5.4.3-1.0.0.xml
    $ repo sync
    

    To clone the mete-adlink-nxp layer for our SMARC module with the configuration:

    $ cd sources
    $ git clone https://github.com/ADLINK/meta-adlink-nxp.git -b zeus
    $ cd meta-adlink-nxp
    $ git checkout aedb4d02269e28b82cc6e89cb103846001c13b9a
    $ cd ..
    $ cd ..
    

    image-20210219105625707

    To clone the meta-adlink-sema layer (What is SEMA?): (Only support LEC-iMX6R2/LEC-iMX6)

    $ cd sources
    $ git clone https://github.com/ADLINK/meta-adlink-sema.git -b master
    $ cd ..
    

    image-20210219105956592

    To set up the building environment:

    ​ Please choose the SMARC module you would like to build:

    • LEC-iMX6R2 SMARC Module

      $ cd imx-yocto-bsp // it is your working directory
      $ DISTRO=fsl-imx-xwayland MACHINE=lec-imx6-2 source imx-setup-release.sh -b build
      $ cp ../sources/meta-adlink-nxp/conf/adlink-conf/lec-imx6-2/bblayers.conf.sample conf/bblayers.conf
      $ cp ../sources/meta-adlink-nxp/conf/adlink-conf/lec-imx6-2/local.conf.sample conf/local.conf
      
    • LEC-iMX6 SMARC Module

      $ cd imx-yocto-bsp // it is your working directory
      $ DISTRO=fsl-imx-xwayland MACHINE=lec-imx6-1 source imx-setup-release.sh -b build
      $ cp ../sources/meta-adlink-nxp/conf/adlink-conf/lec-imx6-1/bblayers.conf.sample conf/bblayers.conf
      $ cp ../sources/meta-adlink-nxp/conf/adlink-conf/lec-imx6-1/local.conf.sample conf/local.conf
      

    NOTE: Please Accept the EULA agreement by pressing ‘q’ and then ‘y’ when it prompts.


3. To Start to build

​ Choose the image with the supported hardware:

SMARC module Name Yocto branch bitbake command
LEC-iMX6R2 with the core + wayland weston desktop (GUI) + SEMA zeus bitbake core-image-weston-imx6r2
LEC-iMX6 with the core + wayland weston desktop (GUI) + SEMA zeus bitbake core-image-weston-imx6

4. Next action to deploy the image