Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In order to compile an i.MX8M Plus image with chromium, please follow these steps:. Please notice that building Yocto takes around 300GByte of disk storage and requires 64GByte system memory or 32GByte with a tweak to build first rust-native as described below.

Info

These steps were tested on a Ubuntu 22.04 build machine.

...

Code Block
languagebash
sudo apt install flex bison gperf build-essential zlib1g-dev lib32ncurses5-dev \
x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev tofrodos libxml2-utils \
openssh-server openssh-client uuid uuid-dev zlib1g-dev liblz-dev lzop liblzo2-2 \
liblzo2-dev git-core curl python3 python3-pip python3-pexpect python3-git \
python3-jinja2 u-boot-tools mtd-utils openjdk-8-jdk device-tree-compiler aptitude \
libcurl4-openssl-dev nss-updatedb chrpath texinfo gawk cpio diffstat \
libncursesw5-dev libssl-dev libegl1-mesa net-tools libsdl1.2-dev xterm socat \
icedtea-netx-common icedtea-netx python3-markdown android-sdk-libsparse-utils \
xsltproc gcc-multilib g++-multilib subversion libc++-dev libstdc++6 \
libstdc++-12-dev python-is-python3 lz4;

pip3 install pylint

Clone and build the meta-solidrun-arm-imx8 repository

...

...

Building from sources

  • Make sure your git username and email is configured; and then clone the ‘repo’ tool and initialize the sources tree -

Code Block
mkdir imx-yocto
cd imx-yocto
wget https://storage.googleapis.com/git-repo-downloads/repo
chmod +x repo
./repo init -u https://github.com/SolidRun/meta-solidrun-arm-imx8.git -b kirkstone-imx8m

Now, follow the steps in the README file up to step 5, including.

Append the following line to conf/local.conf

Code Block
CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland"

run the following command

Code Block
bitbake chromium-ozone-wayland -c fetch

Continue with the README steps.

Please make sure to build the full image, not the minimal one.

Important notes:

  1. The repo command mentioned in the README file may fail, in this case, please download and use the following repo binary: https://storage.googleapis.com/git-repo-downloads/repo

  2. If you get the following errors during compilation:

Note

WARNING: nnshark-2021.10.imx-r0 do_fetch: Failed to fetch URL gitsm://source.codeaurora.org/external/imx/nnshark.git;protocol=https;branch=2021.10.imx, attempting MIRRORS if available ..

Please add the following mirrors to conf/local.conf

Code Block
 -m sr-imx-5.15.71-2.2.0.xml
./repo sync
DISTRO=fsl-imx-xwayland MACHINE=imx8mpsolidrun EULA=1 source imx-setup-release.sh -b build-xwayland-imx8mpsolidrun
  • Accept the EULA license agreement by

  • Now edit the file conf/bblayers.conf and append the following to the end -

Code Block
BBLAYERS += "${BSPDIR}/sources/meta-solidrun-arm-imx8"
  • edit the file conf/local.conf and append to it Chromium sources and NXP new github repo sources -

Code Block
CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland"
MIRRORS += " \
    git://source.codeaurora.org/external/imx/ git://github.com/nxp-imx/;protocol=https \n \
    https://source.codeaurora.org/external/imx/ https://github.com/nxp-imx/ \n \
    http://source.codeaurora.org/external/imx/ http://github.com/nxp-imx/ \n \
    gitsm://source.codeaurora.org/external/imx/ gitsm://github.com/nxp-imx/;protocol=https \n \
"
BB_NUMBER_THREADS = "4"

First build rust-native and then imx-image-full. The reason that rust-native is built first since it might fail on systems with less than 64GByte system memory.

If your machine does have available 64GByte system memory you can skip building rust-native and go ahead built imx-image-full directly.

Code Block
bitbake -C compile rust-native
bitbake imx-image-full

Using Chromium

Once the image was compiled and deployed, you can start the browser simply by running:

...