Adding Chromium To i.MX6ULL-EVK Image Based On Linux 4.1.15_2.0.0 For Yocto Project 2.1 (Krogoth)

Document created by Wigros Sun Employee on Apr 30, 2020
Version 1Show Document
  • View in full screen mode

In recent months, some i.MX6ULL users try to add google chromium to Linux BSP L4.1.15 managed by yocto project 2.1 (krogoth), but failed.  One of A customers project also encoutered the same issues, their engineers submitted case to us asking for help. Then a compilation test for the customer was done,  there really exist some errors during compilation. The follwing contents show how to compile it and handle issues.

---System Configurations

Hardware: notebook, i7 4-cores, 16GB DDR4

Software: windows 7/10, VMware Player 14.0, USB3.1 SSD

Step1:

# cd ~/fsl-release-bsp

# DISTRO=fsl-imx-x11 MACHINE=imx6ull14x14evk source fsl-setup-release.sh -b build-x11

# gedit ./conf/local.conf

         Add lines below, just like descriptions of chromium in i.MX_Yocto_User’s_Guide.pdf

……

CORE_IMAGE_EXTRA_INSTALL += "chromium libexif"

LICENSE_FLAGS_WHITELIST="commercial"

……

[Comment]

Above methord has been described in i.MX_Yocto_User's_Guide.pdf.

# bitbake chromium -c fetch    

      Begin to download chromium package

         

         If you feel it’s the speed of download is too slow, you can copy the following link to explorer, and download the file directly:

http://gsdview.appspot.com/chromium-browser-official/chromium-48.0.2548.0.tar.xz

Then copy the file to ~/fsl-release-bsp/downloads. And create a.done file by touch command in the directory.

# cd ~/fsl-release-bsp/downloads

# touch chromium-48.0.2548.0.tar.xz.done

         Empty file is OK, not need any contents in the file.

Step 2
         Begin to compile chromium:

# cd ~/fsl-release-bsp/downloads/build-x11

# bitbake chromium -c compile

         From the following picture, total tasks are 1636

Errors 1 during compilation

Error :

ERROR: cups-2.1.3-r0 do_fetch: Fetcher failure: Fetch command failed with exit code 4, output:

failed: Connection timed out.

Read error (Connection timed out) in headers.

 

ERROR: cups-2.1.3-r0 do_fetch: Function failed: Fetcher failure for URL: 'https://www.cups.org/software/2.1.3/cups-2.1.3-source.tar.bz2'. Unable to fetch URL from any source.

ERROR: Logfile of failure stored in: /home/weidong/fsl-release-bsp-415-200/build-x11/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/cups/2.1.3-r0/temp/log.do_fetch.33362

ERROR: Task 111 (/home/weidong/fsl-release-bsp-415-200/sources/poky/meta/recipes-extended/cups/cups_2.1.3.bb, do_fetch) failed with exit code '1'

Handle it:

Download the file through explorer:

https://www.cups.org/software/2.1.3/cups-2.1.3-source.tar.bz2

Then copy it to ~/fsl-release-bsp/downloads, and create cups-2.1.3-source.tar.bz2.done

Continue:

# bitbake chromium -c compile

 

Errors 2 during compilation

Handle it :

  1. copy the fsimx6ul-chromium.patch to your main yocto directory (same directory were you can find yocto-download).
  2. Switch to this directory and apply the patch with the following command: patch -p1 < fsimx6ul-chromium.patch
  3. Compile your yocto rootfs again

[Comment]

The solution is from the link:

https://forum.fs-net.de/index.php?thread/4352-yocto-build-chromium-browser/

fsimx6ul-chromium.patchis provided by F&S Support Team

Continue:

# bitbake chromium -c compile

 

Successfully.

Step 3 Compiling full image

# bitbake fsl-image-gui

         When chromium compilation is done, we can begin to comipile rootfs(fsl-image-gui)

         Then no errors occurred. Compiled BSP successfully.

 

Then we check if chromium has been included in rootfs.

# cd ~/fsl-release-bsp/build-x11/tmp/deploy/images/imx6ull14x14evk

[Comment]

(1) fsl-image-gui-imx6ull14x14evk-20200425220751.rootfs.tar.bz2

         The file is rootfs without u-boot/device tree/linux kernel.

(2) fsl-image-gui-imx6ull14x14evk-20200425220751.rootfs.sdcard

         The file is full image including u-boot/device tree/kernel/rootfs

Here is the links among files:

         Now we check if rootfs have included chromium, create a temp directory in ~/ and copy rootffs to the temp directory

# mkdir ~/temp

# cp ./fsl-image-gui-imx6ull14x14evk-20200425220751.rootfs.tar.bz2 ~/temp

         Then decompress it.

# cd ~/temp

# tar -jxvf fsl-image-gui-imx6ull14x14evk-20200425220751.rootfs.tar.bz2

# cd usr/bin/chromium/

# ls

Successfully.

 

NXP TIC team

Weidog Sun

2020/05/01

Attachments

    Outcomes