[LS104x] Starting with Yocto

Yocto with LSDK Components

Yocto with LSDK components provides recipes for the last Yocto release to use the latest and greatest components from LSDK as they get released. This eventually makes its way into the next community Yocto release at yoctoproject.org. The NXP holds the Github pages on the https://www.nxp.com/design/software/embedded-software/nxp-github:NXP-GITHUB or https://github.com/nxp-imx/meta-nxp-desktop#readme

Prepare build environment

To make sure the build host is prepared for Yocto running and build, please follow this guide to prepare the build environment.

Install 'repo' tool

To use this manifest repo, the 'repo' tool must be installed first:

$: mkdir ~/bin
$: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo  > ~/bin/repo
$: chmod a+x ~/bin/repo
$: PATH=${PATH}:~/bin

Download Yocto Layers

The following is the step of how to use the repo utility to download all Yocto layers according to the repo manifest. Replace with the real name (see Yocto branch and version below).

$: mkdir yocto-sdk
$: cd yocto-sdk
$: $ repo init -u https://github.com/nxp-qoriq/yocto-sdk.git -b kirkstone -m ls-5.15.71-2.2.0_distro.xml
$: repo sync --force-sync -j16

Yocto branch and version:

BranchVersion

mickledore

YP 4.2–lf-6.1.22

langdale

YP 4.1–lf-6.1.1

kirkstone

YP 4.0–lf-5.15.71

honister

YP 3.4–lf-5.15.5

hardknott

YP 3.3–lf-5.10.72

gatesgarth

YP 3.2–lf-5.10.9

dunfell

YP 3.1–LSDK 2004

zeus

YP 3.0–LSDK 1909

warrior

YP 2.7–LSDK 1906

thud

YP 2.6–LSDK 1809

sumo

YP 2.5–LSDK 1806

Building images

We should be mindful of the Linux shell usage, the bash should be applied to the setup-env rather than zsh. Take ls1046ardb as an example:

$: . ./setup-env -m ls1046ardb
$: bitbake fsl-image-networking

or:

$: bitbake fsl-image-networking-full

Images will be found under tmp/deploy/images/ls1046ardb/.

Some Pits

Q1: BitBake error if it can't find www.example.com?

BitBake fails for me because it can't find https://www.example.com.

This is the response I get when I run BitBake:

$ bitbake -k core-image-sato
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:

Fetcher failure for URL: 'https://www.example.com/'. URL https://www.example.com/ doesn't work.
Please ensure your host's network is configured correctly,
or set BB_NO_NETWORK = "1" to disable network access if
all required sources are on local disk.


Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Solution:

Modifying /conf/local.conf was the only solution that worked for me. Simply add one of the two options:

#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"

#skip connectivity checks
CONNECTIVITY_CHECK_URIS = ""

Q2: DISTRO 'fsl-qoriq' not found.

I have tried to pull yocto project repo according to the NXP Layerscape latest user guide from https://www.nxp.com/docs/en/user-guide/LLDPUG_RevL6.1.22_2.0.0.pdf

(Refer to the section 4.5.2 Download Yocto bitbake)

The bitbake returns the error outlined below:

DISTRO 'fsl-qoriq' not found. Please set a valid DISTRO in your local.conf
MACHINE=ls1046ardb is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file.

Solution:

Before you executed, bitbake ls-image-main did you execute DISTRO=fsl-qoriq-distro MACHINE= source distro-setup-env for the specific board.

The root cause is that the oh-my-bash is used in my Ubuntu console. it worked when I changed to raw bash.

Q3: QEMU or other libs cannot be downloaded

The prompted error is caused by network, you can solve the problem by ma

最后更新于