Template:Yocto Toolchain installation IMX: Difference between revisions

From Variscite Wiki
(Created page with "{{#varexists:DEFAULT_IMAGE_BB_NAME | | {{ #vardefine:DEFAULT_IMAGE_BB_NAME | fsl-image-gui }} }} <!-- --> {{#vardefine:TOOLCHAIN_INSTALL_NAME | {{#switch: {{#var:SOC_SERIES|im...")
 
No edit summary
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#varexists:DEFAULT_IMAGE_BB_NAME | | {{ #vardefine:DEFAULT_IMAGE_BB_NAME | fsl-image-gui }} }} <!--
<includeonly>{{#varexists:DEFAULT_IMAGE_BB_NAME | | {{ #vardefine:DEFAULT_IMAGE_BB_NAME | fsl-image-gui }} }} <!--
--> {{#vardefine:TOOLCHAIN_INSTALL_NAME | {{#switch: {{#var:SOC_SERIES|imx6}}
--> {{#vardefine:TOOLCHAIN_INSTALL_NAME | {{#switch: {{#var:SOC_SERIES|imx6}}
         |imx9|
         |imx9|
Line 7: Line 7:
--> {{#vardefine:TOOLCHAIN_INSTALL_NAME |  {{#var:TOOLCHAIN_INSTALL_B2QT_NAME | {{#var:TOOLCHAIN_INSTALL_NAME}}}}}} <!-- Override YOCTO_INSTALL_NAME if TOOLCHAIN_INSTALL_B2QT_NAME exists
--> {{#vardefine:TOOLCHAIN_INSTALL_NAME |  {{#var:TOOLCHAIN_INSTALL_B2QT_NAME | {{#var:TOOLCHAIN_INSTALL_NAME}}}}}} <!-- Override YOCTO_INSTALL_NAME if TOOLCHAIN_INSTALL_B2QT_NAME exists
--> {{#vardefine:BB_ENV | {{#var:BB_ENV|{{#varexists: B2QT_GIT | MACHINE={{#var:MACHINE_NAME}} | }} }} }} <!--
--> {{#vardefine:BB_ENV | {{#var:BB_ENV|{{#varexists: B2QT_GIT | MACHINE={{#var:MACHINE_NAME}} | }} }} }} <!--
--> {{#vardefine:B2QT_OR_YOCTO | {{#varexists: B2QT_GIT | B2QT | Yocto }} }} <!--
--> {{#vardefine:PLATFORM_OS | {{#varexists: B2QT_GIT | B2QT | {{#varexists: DEBIAN_NAME | Debian | Yocto }} }} }} <!--
--> {{#vardefine:RELEASE_GUIDE | {{#varexists:DEBIAN_NAME | Yocto_Debian_Build_Release | {{#var:PLATFORM_OS}}_Build_Release }} }} <!--
--> {{PageHeader|Yocto toolchain installation for out of Yocto builds}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__
--> {{PageHeader|Yocto toolchain installation for out of Yocto builds}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__


== Prerequisites==
== Prerequisites==
A full {{#var:B2QT_OR_YOCTO}} build environment is required for the toolchain generation.<br>
A full {{#var:PLATFORM_OS}} build environment is required for the toolchain generation.<br>
To setup a {{#var:B2QT_OR_YOCTO}} build environment follow steps 1 & 3 of the {{Varlink|{{#var:B2QT_OR_YOCTO}}_Build_Release|{{#var:RELEASE_LINK}}|Build {{#var:B2QT_OR_YOCTO}} from source code}} guide and then proceed to either the toolchain or complete SDK steps below:
To setup a {{#var:PLATFORM_OS}} build environment follow steps 1 & 3 of the {{Varlink|{{#var:RELEASE_GUIDE}}|{{#var:RELEASE_LINK}}|Build {{#var:PLATFORM_OS}} from source code}} guide and then proceed to either the toolchain or complete SDK steps below:


== Build a toolchain ==
== Build a toolchain ==
Setup the environment:
Setup the environment:
{{#lst:Yocto_Platform_Customization|YOCTO_ENV_SETUP_X}}
{{#lst:Yocto_Platform_Customization|YOCTO_ENV_SETUP_X}}
{{#vardefine:SHELL_PROMPT|{{#if:{{#var:BUILD_YOCTO_IN_DOCKER_CONTAINER}}|vari@yocto-{{#var:DOCKER_CONTAINER_INFO}}:/workdir/{{#var:BUILD_FOLDER_ENV}}$|$}}}}
Build the toolchain:
Build the toolchain:
  $ {{#var:BB_ENV}} bitbake {{#varexists: DEFAULT_TOOLCHAIN_BB_NAME | {{#var:DEFAULT_TOOLCHAIN_BB_NAME}} | {{#varexists: B2QT_BSP_VERSION | meta-toolchain-b2qt-embedded-qt5-sdk | meta-toolchain}} }}
  {{#var:SHELL_PROMPT}} {{#var:BB_ENV}} bitbake {{#varexists: DEFAULT_TOOLCHAIN_BB_NAME | {{#var:DEFAULT_TOOLCHAIN_BB_NAME}} | {{#varexists: B2QT_BSP_VERSION | meta-toolchain-b2qt-embedded-qt5-sdk | meta-toolchain}} }}
 
<!-- Debian build with Yocto does currently not support building the SDK -->
{{#switch:{{#var:PLATFORM_OS}}|Debian=|
== Build a complete SDK ==
== Build a complete SDK ==


Line 26: Line 30:


E.g. when using the {{#var:DEFAULT_IMAGE_BB_NAME}} image:
E.g. when using the {{#var:DEFAULT_IMAGE_BB_NAME}} image:
  $ {{#var:BB_ENV}} bitbake -c populate_sdk {{#var:DEFAULT_IMAGE_BB_NAME}}
  {{#var:SHELL_PROMPT}} {{#var:BB_ENV}} bitbake -c populate_sdk {{#var:DEFAULT_IMAGE_BB_NAME}}
{{Note|The SDK should match the rootfs image on the target, otherwise you may experience difficulties when trying to debug application failures.}}
{{Note|The SDK should match the rootfs image on the target, otherwise you may experience difficulties when trying to debug application failures.}}
 
}}
== Install the toolchain/SDK ==
== Install the toolchain/SDK ==
Install the tools by running the resulted script in tmp/deploy/sdk/.
Install the tools by running the resulted script in tmp/deploy/sdk/.


E.g.
E.g.
  $ tmp/deploy/sdk/{{#var:TOOLCHAIN_INSTALL_NAME}}
  {{#var:SHELL_PROMPT}} tmp/deploy/sdk/{{#var:TOOLCHAIN_INSTALL_NAME}}
Note: The toolchain/script name depends on your build machine and the bitbaked image/recipe, and may change.<br>
Note: The toolchain/script name depends on your build machine and the bitbaked image/recipe, and may change.<br>
<br>
<br>
Line 44: Line 48:
Each time you wish to use the toolchain in a new shell session, you need to source the environment setup script:
Each time you wish to use the toolchain in a new shell session, you need to source the environment setup script:
  $ source {{#var:TOOLCHAIN_LOCATION}}{{#ifeq: {{#var:SOC_SERIES}}|imx8|<br>$ export LDFLAGS=|}}
  $ source {{#var:TOOLCHAIN_LOCATION}}{{#ifeq: {{#var:SOC_SERIES}}|imx8|<br>$ export LDFLAGS=|}}
</includeonly>

Latest revision as of 16:52, 23 October 2024