| /**************************************************************************** |
| ** |
| ** Copyright (C) 2017 The Qt Company Ltd. |
| ** Contact: https://www.qt.io/licensing/ |
| ** |
| ** This file is part of the documentation of the Qt Toolkit. |
| ** |
| ** $QT_BEGIN_LICENSE:FDL$ |
| ** Commercial License Usage |
| ** Licensees holding valid commercial Qt licenses may use this file in |
| ** accordance with the commercial license agreement provided with the |
| ** Software or, alternatively, in accordance with the terms contained in |
| ** a written agreement between you and The Qt Company. For licensing terms |
| ** and conditions see https://www.qt.io/terms-conditions. For further |
| ** information use the contact form at https://www.qt.io/contact-us. |
| ** |
| ** GNU Free Documentation License Usage |
| ** Alternatively, this file may be used under the terms of the GNU Free |
| ** Documentation License version 1.3 as published by the Free Software |
| ** Foundation and appearing in the file included in the packaging of |
| ** this file. Please review the following information to ensure |
| ** the GNU Free Documentation License version 1.3 requirements |
| ** will be met: https://www.gnu.org/licenses/fdl-1.3.html. |
| ** $QT_END_LICENSE$ |
| ** |
| ****************************************************************************/ |
| |
| |
| /*! |
| \page integrity-monolith-project-tutorial.html |
| \title Qt for INTEGRITY: Monolith Project Tutorial |
| \previouspage integrity.html |
| \nextpage integrity-installing-dependencies.html |
| |
| The INTEGRITY applications can be monolith application projects, |
| dynamic download application projects, or kernelspace projects. The monolith |
| application is a stand-alone executable that you can run directly on a |
| target device. |
| |
| In this tutorial, we build an INTEGRITY monolith project of |
| the Qt application. We also create a bootable SD card, so you can run |
| your application in the i.MX6 Quad board. After following the steps in this |
| tutorial, you will have the Qt for INTEGRITY development environment up and running. |
| |
| The tutorial assumes you have the |
| \l {https://boundarydevices.com/product/sabre-lite-imx6-sbc/} |
| {i.MX6 Quad board} with a micro SD card. |
| |
| Tutorial content: |
| \list 1 |
| \li \l {Installing Platform Dependencies} |
| \li \l {Preparing BSP for i.MX6 Quad Board} |
| \li \l {Building Qt for i.MX6 Quad Board} |
| \li \l {Building Monolith Project} |
| \li \l {Building U-Boot Image} |
| \li \l {Creating Bootable SD card} |
| \li \l {Preparing U-Boot} |
| \endlist |
| |
| */ |
| |
| /*! |
| \page integrity-installing-dependencies.html |
| \title Installing Platform Dependencies |
| \previouspage integrity-monolith-project-tutorial.html |
| \nextpage integrity-preparing-bsp-for-imx6quad-board.html |
| |
| Before you can build the applications with Qt for INTEGRITY, |
| you must have the correct build tools and other dependencies installed |
| in the 64-bit Linux development host: |
| |
| \table 80% |
| \header \li Requirement \li Description |
| \row \li An INTEGRITY 11.4.4 installation |
| \li Installation must contain the patches for C++11 support. |
| Contact \l {https://support.ghs.com/contact/request-support/} |
| {Green Hills Software}. |
| \row \li MULTI IDE and Green Hills Software Compiler (version 2016.5.4 or newer) |
| \li The Green Hills Software development tools. See |
| \l {http://www.ghs.com/products/MULTI_IDE.html} {MULTI IDE}. |
| For licenses, contact \l {https://support.ghs.com/licensing/request-license/} |
| {Green Hills Software}. |
| \note You need to get an additional patch from Green Hills Software. |
| \row |
| \li An ELF (Executable and Linkable Format) loader compatible with a device tree |
| \li Part of the Green Hills Software development tools. |
| \row |
| \li The U-Boot tools |
| \li Universal Boot Loader (U-Boot) is used in the embedded devices to |
| package the instructions to boot the device's operating system kernel. |
| \note Especially \c mkimage is required. |
| \row |
| \li Perl programming language |
| \li Required if you are getting the Qt 5 sources via the Git version control system. |
| See \l {https://www.perl.org/get.html}. |
| \note Perl is not required if you download the Qt sources via |
| your Qt Account. |
| \endtable |
| */ |
| |
| /*! |
| \page integrity-preparing-bsp-for-imx6quad-board.html |
| \title Preparing BSP for i.MX6 Quad Board |
| \previouspage integrity-installing-dependencies.html |
| \nextpage integrity-building-qt-for-imx6quad-board.html |
| |
| With MULTI Launcher, you can prepare the board support package (BSP) |
| for i.MX6 Quad board: |
| |
| \list 1 |
| \li Start MULTI Launcher. |
| \li Start Project Manager by selecting \uicontrol {Components} > |
| \uicontrol {Open Project Manager}. |
| \li In your INTEGRITY installation, select the project file \e {default.gpj} |
| under the \e {platform-cortex-a9} folder: |
| |
| \image open-project |
| |
| \li Select \uicontrol {Open}. |
| \endlist |
| |
| In the MULTI Project Manager view, you see a tree structure of the opened |
| project. |
| |
| Clean \e {default.gpj} and build the projects: |
| |
| \list 1 |
| \li Select \uicontrol {Build} > \uicontrol {Clean default.gpj}. |
| \li Select the files \e {system_libs.gpj}, \e {bsp_libs.gpj}, and |
| \e {kernel.gpj} one by one, and select \uicontrol {Build} > |
| \uicontrol {Build Project <file name>} for each selected file. |
| \endlist |
| |
| Preparation for the board support package is now done. |
| */ |
| |
| /*! |
| \page integrity-building-qt-for-imx6quad-board.html |
| \title Building Qt for i.MX6 Quad Board |
| \previouspage integrity-preparing-bsp-for-imx6quad-board.html |
| \nextpage integrity-building-monolith.html |
| |
| \include integrity-building-qt-imx6.qdocinc building qt for imx6quad |
| */ |
| |
| /*! |
| \page integrity-building-monolith.html |
| \title Building Monolith Project |
| \previouspage integrity-building-qt-for-imx6quad-board.html |
| \nextpage integrity-building-u-boot-image.html |
| |
| \include integrity-building-monolith.qdocinc building monolith |
| */ |
| |
| /*! |
| \page integrity-building-u-boot-image.html |
| \title Building U-Boot Image |
| \previouspage integrity-building-monolith.html |
| \nextpage integrity-creating-bootable-sd-card.html |
| |
| To build a U-Boot image, open a terminal and navigate to the project |
| directory created in \l {Building Monolith Project}. In our example the |
| project directory is \e {mymonolith}. |
| |
| Under the project directory, you will find an executable with the same name |
| you gave to your monolith in \l {Project Manager Settings}. |
| In our example the executable name is \e {myproject}. |
| |
| Run the \c elfloader command for the executable. You will find the \c elfloader |
| command under your compiler directory: |
| |
| \badcode |
| john@doe: /usr/ghs/comp_201654/elfloader -l /usr/ghs/int1144/util/elfloader/cortexa9_elfloader.bin -o myproject.elf myproject |
| \endcode |
| |
| The example \c elfloader command above assumes your Green Hills Software (GHS) |
| compiler is version 2016.5.4, and your INTEGRITY and GHS compiler |
| installations are found from their default locations. However, you can |
| modify the paths in the example according to your configuration. |
| |
| Finally, build the U-Boot image with the \c mkimage tool. |
| The last argument in the \c mkimage command specifies the U-Boot image name. |
| In the example below, we use the name \e {demo.image}. |
| To invoke \c mkimage, run the following command in a terminal: |
| |
| \badcode |
| john@doe: mkimage -A arm -O linux -T kernel -C none -a 20000000 -e 20000000 -n INTEGRITY+Qt -d myproject.elf demo.image |
| \endcode |
| */ |
| |
| /*! |
| \page integrity-creating-bootable-sd-card.html |
| \title Creating Bootable SD Card |
| \previouspage integrity-building-u-boot-image.html |
| \nextpage integrity-preparing-u-boot.html |
| |
| With a bootable micro SD card your i.MX6 Quad board can run the INTEGRITY |
| monolith application on the board. To create the bootable SD card: |
| |
| \list 1 |
| \li Format the SD card with a FAT32 filesystem. |
| \li Save the \e {demo.image} file (built with \c mkimage in |
| \l {Building U-Boot Image}) and the device tree blob file |
| \e {imx6q-sabrelite.dtb} for the i.MX6 Quad board under your SD card root. |
| \note You will find the device tree blob file in your INTEGRITY installation, |
| under the path |
| /usr/ghs/int1144/platform-cortex-a9/imx6-sabrelite/imx6q-sabrelite.dtb. |
| \li Set the SD card into your i.MX6 Quad board. |
| \endlist |
| |
| */ |
| |
| /*! |
| \page integrity-preparing-u-boot.html |
| \title Preparing U-Boot |
| \previouspage integrity-creating-bootable-sd-card.html |
| \nextpage integrity-monolith-project-tutorial.html |
| |
| Finally, prepare the i.MX6 Quad board for U-Boot: |
| |
| \list 1 |
| \li Connect to your i.MX6 Quad board with a serial connection at a baud rate of |
| 115200. |
| \li Set the following environment variables in the U-Boot terminal: |
| |
| \badcode |
| setenv bootcmd_demo_dt 'mmc dev 1; |
| fatload mmc 1:1 20000000 demo.image; |
| fatload mmc 1:1 4FFE0000 imx6q-sabrelite.dtb; |
| bootm 20000000 - 4FFE0000' |
| |
| setenv bootcmd 'run bootcmd_demo_dt' |
| saveenv |
| \endcode |
| |
| \note The file \e {demo.image} was built with the mkimage tool in |
| \l {Building U-Boot Image}. |
| |
| \li Reset the i.MX6 Quad board. |
| \endlist |
| |
| Now your i.MX6 Quad board is ready to run your application. |
| */ |