Template:Yocto Build Release IMX: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
 
(51 intermediate revisions by 4 users not shown)
Line 11: Line 11:
-->{{#vardefine:UBUNTU_COMPAT|{{#ifeq:{{#var:YOCTO_NAME}}|Zeus|18.04|{{#var:UBUNTU_COMPAT}}}}}}<!--
-->{{#vardefine:UBUNTU_COMPAT|{{#ifeq:{{#var:YOCTO_NAME}}|Zeus|18.04|{{#var:UBUNTU_COMPAT}}}}}}<!--
-->{{#vardefine:UBUNTU_COMPAT|{{#ifexpr: {{#var:YOCTO_VERSION}} >= 3.1|18.04/20.04|{{#var:UBUNTU_COMPAT}}}}}}<!--
-->{{#vardefine:UBUNTU_COMPAT|{{#ifexpr: {{#var:YOCTO_VERSION}} >= 3.1|18.04/20.04|{{#var:UBUNTU_COMPAT}}}}}}<!--
-->{{#vardefine:UBUNTU_COMPAT|{{#ifexpr: {{#var:YOCTO_VERSION}} >= 4.0|18.04/20.04/22.04|{{#var:UBUNTU_COMPAT}}}}}}
-->{{#vardefine:UBUNTU_COMPAT|{{#ifexpr: {{#var:YOCTO_VERSION}} >= 4.0|18.04/20.04/22.04|{{#var:UBUNTU_COMPAT}}}}}}<!--
-->{{#vardefine:UBUNTU_COMPAT|{{#ifexpr: {{#var:YOCTO_VERSION}} >= 4.2|20.04/22.04|{{#var:UBUNTU_COMPAT}}}}}}<!--
-->{{#vardefine:UBUNTU_COMPAT|{{#if:{{#var:BUILD_YOCTO_IN_DOCKER_CONTAINER}}|18.04/20.04/22.04/24.04|{{#var:UBUNTU_COMPAT}}}}}}
 
= Installing required packages =
= Installing required packages =
Please make sure your host PC is running Ubuntu {{#var:UBUNTU_COMPAT}} 64-bit and is up to date:
Please make sure your host PC is running Ubuntu {{#var:UBUNTU_COMPAT}} 64-bit and is up to date:
Line 17: Line 20:


Then, install the following packages:
Then, install the following packages:
  {{#if:{{#var:BUILD_YOCTO_IN_DOCKER_CONTAINER}}|
  $ sudo apt-get install python3 python3-pip python3-pexpect \
  python3-git python3-jinja2 python3-subunit python3-git liblz4-tool \
  python3-jinja2 python3-subunit curl zstd
 
For Ubuntu 20.04 and earlier, install python2:
$ sudo apt-get install python python-pysqlite2
{{#ifexpr:{{#rpos:{{#var:UBUNTU_COMPAT}}|16.04}} >= 0|{{Ubuntu16_Python}}|}}<!--
-->{{#ifexpr:{{#rpos:{{#var:UBUNTU_COMPAT}}|22.04}} >= 0|{{Ubuntu22_Python}}|}}<!--
-->{{#ifexpr:{{#rpos:{{#var:UBUNTU_COMPAT}}|24.04}} >= 0|{{Ubuntu24_Docker}}|}}
Install Docker:
$ sudo apt update && sudo apt install docker.io qemu-user-static
Give permissions to run Docker without sudo:
$ sudo usermod -aG docker ${USER}
# Logout and login again for the permissions to take effect.
|


   $ sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib \
   $ sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib \
Line 30: Line 53:
    
    
   {{#ifexpr: {{#var:YOCTO_VERSION}} >= 3.1|
   {{#ifexpr: {{#var:YOCTO_VERSION}} >= 3.1|
   $ sudo apt-get install python3-git zstd liblz4-tool
   $ sudo apt-get install python3-git liblz4-tool python3-jinja2 python3-subunit locales libacl1
   |
   |
   $ sudo apt-get install python-git
   $ sudo apt-get install python-git
Line 43: Line 66:
{{Note|'''Note:''' Variscite provides Docker containers that can be used for a development environment as an alternative to using a virtual machine or a dedicated computer.
{{Note|'''Note:''' Variscite provides Docker containers that can be used for a development environment as an alternative to using a virtual machine or a dedicated computer.
To learn more, please see Variscite's [[Docker_Build_Environment | Docker Build Environment]] guide.}}
To learn more, please see Variscite's [[Docker_Build_Environment | Docker Build Environment]] guide.}}
}}


= Reference documentation =
= Reference documentation =
Line 50: Line 74:


= Download Yocto {{#var:YOCTO_NAME}} based on {{#varexists:FSLC_BSP_VERSION|Freescale Community BSP {{#var:FSLC_BSP_VERSION}}|NXP BSP {{#var:FSL_BSP_VERSION}}}} =
= Download Yocto {{#var:YOCTO_NAME}} based on {{#varexists:FSLC_BSP_VERSION|Freescale Community BSP {{#var:FSLC_BSP_VERSION}}|NXP BSP {{#var:FSL_BSP_VERSION}}}} =
<pre>
$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"


$ mkdir -p ~/bin
Configure git user and email:
$ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
 
$ chmod a+x ~/bin/repo
$ git config --global user.name "Your Name"
$ export PATH=~/bin:$PATH
$ git config --global user.email "Your Email"
</pre>
 
Fetch and install the Google [https://gerrit.googlesource.com/git-repo/ git-repo] tool:
 
$ mkdir -p ~/bin
# For Ubuntu 20.04 and older, install repo 2.32 according to https://gerrit.googlesource.com/git-repo/+/HEAD/docs/python-support.md:
$ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo-2.32 > ~/bin/repo
# For Ubuntu 22.04 and newer, install the latest repo tool:
$ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
# Give repo execute permissions and add it to the path:
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH


Create a build directory:
  $ mkdir {{#var:BUILD_FOLDER}}
  $ mkdir {{#var:BUILD_FOLDER}}
  $ cd {{#var:BUILD_FOLDER}}
  $ cd {{#var:BUILD_FOLDER}}
Line 76: Line 111:
or<br>
or<br>
<br>
<br>
* '''Download a release tag'''<br>
* Download a release tag<br>
Each release in https://github.com/varigit/variscite-bsp-platform/releases corresponds to a tag.<br>
Each release in https://github.com/varigit/variscite-bsp-platform/releases corresponds to a tag.<br>
The tags are also listed in https://github.com/varigit/variscite-bsp-platform/tags<br>
The tags are also listed in https://github.com/varigit/variscite-bsp-platform/tags<br>
Line 89: Line 124:
  $ repo init -u https://github.com/varigit/variscite-bsp-platform.git -b refs/tags/{{#var:RELEASE_NAME}}
  $ repo init -u https://github.com/varigit/variscite-bsp-platform.git -b refs/tags/{{#var:RELEASE_NAME}}
  $ repo sync -j$(nproc)
  $ repo sync -j$(nproc)
}}
{{#if:{{#var:BUILD_YOCTO_IN_DOCKER_CONTAINER}}|
Start a Ubuntu Docker container:
$ ./var-start-container.sh {{Note|'''Note:''' After Ubuntu Docker container is started you can see the shell prompt similar to: '''vari@yocto-{{#var:DOCKER_CONTAINER_INFO}}:/workdir$'''
All references to commands without this prompt should be executed in a native terminal (outside Docker).
}}
}}
}}


Line 116: Line 159:
|}}
|}}
}}
}}
See the list of Yocto Project’s reference images in [http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-images Yocto Project Reference Manual]
See the list of Yocto Project’s reference images in [https://www.yoctoproject.org/docs/{{#var:YOCTO_VERSION}}/ref-manual/ref-manual.html#ref-images Yocto Project Reference Manual]


== Supported distros ==
== Supported distros ==
Line 160: Line 203:
{{#lst:Yocto_Platform_Customization|YOCTO_ENV_SETUP_X}}
{{#lst:Yocto_Platform_Customization|YOCTO_ENV_SETUP_X}}
{{#lst:Yocto_Platform_Customization|YOCTO_ENV_SETUP_X_SHORT}}
{{#lst:Yocto_Platform_Customization|YOCTO_ENV_SETUP_X_SHORT}}
{{#vardefine:SHELL_PROMPT|{{#if:{{#var:BUILD_YOCTO_IN_DOCKER_CONTAINER}}|vari@yocto-{{#var:DOCKER_CONTAINER_INFO}}:/workdir/{{#var:BUILD_FOLDER_ENV}}$|$}}}}
{{#var:GITHUB_WARNING}}
{{#var:GITHUB_WARNING}}
<br>
<br>
Line 167: Line 211:


  Without Qt content:
  Without Qt content:
  $ bitbake fsl-image-gui
  {{#var:SHELL_PROMPT}} bitbake fsl-image-gui
  {{#if:{{#var:YOCTO_SUPPORT_CHROMIUM}}|
  {{#if:{{#var:YOCTO_SUPPORT_CHROMIUM}}|
  Or with Chromium:
  Or with Chromium:
  $ bitbake fsl-image-gui-chromium
  {{#var:SHELL_PROMPT}} bitbake fsl-image-gui-chromium
   
   
|}}
|}}
  Or with Qt content:
  Or with Qt content:
  $ bitbake fsl-image-qt{{#var:QT_VER}}
  {{#var:SHELL_PROMPT}} bitbake fsl-image-qt{{#var:QT_VER}}


{{#switch: {{#var:SOC_SERIES}} | imx8 | imx9=
{{#switch: {{#var:SOC_SERIES}} | imx8 | imx9=
Line 206: Line 250:


Create a /opt/yocto_downloads directory and set its permissions:
Create a /opt/yocto_downloads directory and set its permissions:
<pre>
{{#var:SHELL_PROMPT}} sudo mkdir /opt/yocto_downloads
$ sudo mkdir /opt/yocto_downloads
{{#var:SHELL_PROMPT}} sudo chmod 777 /opt/yocto_downloads/
$ sudo chmod 777 /opt/yocto_downloads/
</pre>


Direct downloads to it, by replacing 'DL_DIR ?= "${BSPDIR}/downloads/"' with 'DL_DIR = "/opt/yocto_downloads/"' in conf/local.conf under your build directory:
Direct downloads to it, by replacing 'DL_DIR ?= "${BSPDIR}/downloads/"' with 'DL_DIR = "/opt/yocto_downloads/"' in conf/local.conf under your build directory:
<pre>
{{#var:SHELL_PROMPT}} sed -i 's/DL_DIR ?= "${BSPDIR}\/downloads/DL_DIR = "\/opt\/yocto_downloads/g' conf/local.conf
$ sed -i 's/DL_DIR ?= "${BSPDIR}\/downloads/DL_DIR = "\/opt\/yocto_downloads/g' conf/local.conf
</pre>


=== Add Qt creator and Eclipse debug support to your images ===
=== Add Qt creator and Eclipse debug support to your images ===
Line 351: Line 391:


  In order to update the kernel, U-Boot and rootfs:
  In order to update the kernel, U-Boot and rootfs:
  $ bitbake -c cleanall u-boot-variscite linux-variscite kernel-module-imx-gpu-viv ti-compat-wireless-wl18xx wl18xx-firmware cryptodev-module
  {{#var:SHELL_PROMPT}} bitbake -c cleanall u-boot-variscite linux-variscite kernel-module-imx-gpu-viv ti-compat-wireless-wl18xx wl18xx-firmware cryptodev-module
   
   
  for GUI image
  for GUI image
  $ bitbake -c clean fsl-image-gui
  {{#var:SHELL_PROMPT}} bitbake -c clean fsl-image-gui
  for Qt{{#var:QT_VER}} image
  for Qt{{#var:QT_VER}} image
  $ bitbake -c clean fsl-image-qt{{#var:QT_VER}}
  {{#var:SHELL_PROMPT}} bitbake -c clean fsl-image-qt{{#var:QT_VER}}


{{#switch: {{#var:SOC_SERIES}} | imx8 | imx9=
{{#switch: {{#var:SOC_SERIES}} | imx8 | imx9=

Latest revision as of 22:08, 18 November 2024