/usr/share/qt5/doc/qtdoc/integrity-building-monolith.html is in qt5-doc-html 5.9.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- integrity-build-monolith-app-tutorial.qdoc -->
<title>Building Monolith Project | Qt 5.9</title>
<link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
<script type="text/javascript">
document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
// loading style sheet breaks anchors that were jumped to before
// so force jumping to anchor again
setTimeout(function() {
var anchor = location.hash;
// need to jump to different anchor first (e.g. none)
location.hash = "#";
setTimeout(function() {
location.hash = anchor;
}, 0);
}, 0);
</script>
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<table><tr>
<td ><a href="index.html">Qt 5.9</a></td><td >Building Monolith Project</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.5 Reference Documentation</td>
</tr></table>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<link rel="prev" href="integrity-building-qt-for-imx6quad-board.html" />
<link rel="next" href="integrity-building-u-boot-image.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="integrity-building-qt-for-imx6quad-board.html">Building Qt for i.MX6 Quad Board</a>
<span class="naviSeparator"> ◦ </span>
<a class="nextPage" href="integrity-building-u-boot-image.html">Building U-Boot Image</a>
</p><p/>
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#building-monolith-project">Building Monolith Project</a></li>
<li class="level2"><a href="#defining-project-with-project-wizard">Defining Project with Project Wizard</a></li>
<li class="level2"><a href="#project-manager-settings">Project Manager Settings</a></li>
<li class="level2"><a href="#adding-file-system-mount-point">Adding File System Mount Point</a></li>
<li class="level2"><a href="#galcore-vas-settings">Galcore VAS Settings</a></li>
<li class="level2"><a href="#editing-galcore-project">Editing Galcore Project</a></li>
<li class="level2"><a href="#building-monolith-gpj">Building monolith.gpj</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Building Monolith Project</h1>
<span class="subtitle"></span>
<!-- $$$integrity-building-monolith.html-description -->
<div class="descr"> <a name="details"></a>
<p>In this tutorial, we build a monolith INTEGRITY project for a Qt example application. You can select any Qt example application that uses the <a href="platform-notes-integrity.html#supported-qt-modules">supported Qt modules</a>.</p>
<p>Before you can build a monolith INTEGRITY project, you need to prepare your build environment for the <code>qmake</code> build tool. You can do this by running the script <i>~/setEnvironment.sh</i> that you created in <a href="integrity-building-qt-for-imx6quad-board.html#creating-script-for-running-exports">Creating Script for Running Exports</a>.</p>
<p>Run the following commands in a terminal:</p>
<pre class="cpp plain">
source ~/setEnvironment.sh
<Qt installation path>/qtbase/bin/qmake <Qt example application path>/<projectname>.pro
make
</pre>
<p>The <code>qmake</code> tool must be called under the Qt installation path (<Qt installation path>), where you installed the Qt sources in <a href="integrity-building-qt-for-imx6quad-board.html#getting-qt-source-code">Getting Qt Source Code</a>.</p>
<p><Qt example application path>/<projectname>.pro is the installation path of the Qt example application project file that the monolith INTEGRITY project will be built for.</p>
<a name="building-monolith-project"></a>
<h2 id="building-monolith-project">Building Monolith Project</h2>
<p>To build a monolith INTEGRITY project, create an empty directory for your project in your home folder. In the steps below, we use the directory name <i>mymonolith</i>.</p>
<a name="defining-project-with-project-wizard"></a>
<h3 >Defining Project with Project Wizard</h3>
<p>Launch MULTI Launcher and select <b>File</b> > <b>Create New Project</b>. Define your monolith project with Project Wizard:</p>
<ol class="1" type="1"><li>In the <b>Project name</b> tab, fill in the <b>Directory</b> field with the directory you just created.</li>
<li>Select <b>Next</b>.</li>
<li>In the <b>Operating System</b> tab, select <i>INTEGRITY</i> from the <b>Operating System</b> list.<p><b>Note: </b>The <b>OS Distribution Directory</b> field must contain your INTEGRITY installation directory (in our example, <i>mymonolith</i>).</p></li>
<li>Select <b>Next</b>.</li>
<li>In the <b>Processor Family</b> tab, select <b>ARM</b>.</li>
<li>Select <b>Next</b>.</li>
<li>In the <b>Target Board</b> tab, select <b>ARM Cortex-A9 Platform </b> from the target board list.</li>
<li>Select <b>Finish</b>.</li>
</ol>
<p class="centerAlign"><img src="images/project-wizard.png" alt="" /></p><p>After selecting <b>Finish</b> in Project Wizard, Project Manager is opened.</p>
<a name="project-manager-settings"></a>
<h3 >Project Manager Settings</h3>
<p>With Project Manager you can define the settings for the monolith project:</p>
<ol class="1" type="1"><li>In the <b>Select Item to Add</b> dialog page, select <b>Monolith</b> from the <b>Create New</b> list.<p class="centerAlign"><img src="images/select-item-to-add.png" alt="" /></p></li>
<li>Select <b>Next</b>.</li>
<li>In the <b>Settings for Monolith</b> dialog, define the settings:<ul>
<li><b>Source Code Directory</b> is your project directory (in our example, <i>mymonolith</i>).</li>
<li><b>Project Name</b> is the name of your project. In our example, we use the name <i>myproject</i>.</li>
<li><b>Language</b> must be <b>C</b>. The Qt projects are C++ projects, but this will be configured later.</li>
<li>Select <b>Next</b>.</li>
<li><b>Use Shared Libraries</b> should not be selected.</li>
<li>Select <b>Next</b>.</li>
</ul>
</li>
<li>In the <b>Configure number of Virtual AddressSpaces</b> dialog page, select the checkbox <b>Names of Virtual Address Spaces</b> and type <i>galcore</i>.</li>
<li>Select <b>Next</b>.</li>
<li>In the <b>Settings for Kernel</b> dialog page, type the name of your kernel.</li>
<li>Select <b>Debugging</b>, <b>Dynamic Load</b> and <b>ResourceManager</b> from the <b>Kernel Libraries</b> list.<p class="centerAlign"><img src="images/kernel-settings.png" alt="" /></p></li>
<li>Select <b>Next</b>.</li>
<li>In the <b>Settings for OS Module Selection</b> dialog page, select <b>File System (User Configured)</b> and <b>GHnet IPv4 Stack (Virtual)</b> from the <b>OS Module</b> list.</li>
<li>Select <b>Next</b>.</li>
<li>In the <b>Settings for File System (User Configured)</b> dialog page, select a filesystem that your monolith project supports.<p>In our example, we have selected <b>MSDOS FAT</b> from the <b>Libraries</b> list.</p>
</li>
<li>Select <b>Finish</b>.</li>
<li>In the <b>Settings for Add File System Clients</b> dialog page, select <b>Finish</b>.</li>
</ol>
<a name="adding-file-system-mount-point"></a>
<h3 >Adding File System Mount Point</h3>
<p>You need to configure the file system to use the first partition of the micro SD card. In the MULTI Project Manager view, you see a tree structure of your monolith project:</p>
<ol class="1" type="1"><li>Right-click the file <i>mounttable.c</i> to open the context menu.</li>
<li>Select <b>Modify Project</b> > <b>Add INTEGRITY File System Mount Point</b>.</li>
<li>In the <b>Settings for FS MountPoint</b> dialog, define the settings:<ul>
<li>Type <i>/</i> to <b>Mount Directory</b>.</li>
<li>Select <b>Next</b>.</li>
<li><b>File System Type</b> is <i>MSDOS FAT</i>.</li>
<li>Select <b>Next</b>.</li>
<li>Select the <b>Use Physical Device</b> radio button.</li>
<li>Type <i>SDCardDev1</i> to the <b>Device</b> field.</li>
<li><b>Slice</b> is <i>a</i>.</li>
<li>Select <b>Finish</b>.</li>
</ul>
</li>
</ol>
<a name="galcore-vas-settings"></a>
<h3 >Galcore VAS Settings</h3>
<p>Next, define the virtual address space (VAS) settings for your project.</p>
<p>In the MULTI Project Manager view, you see a tree structure of your monolith project:</p>
<ol class="1" type="1"><li>Double-click the .int file in your project (1) (in the steps below, <i>myproject.int</i>).</li>
<li>In the opened window, double-click the galcore virtual address space (VAS) area (2).<p class="centerAlign"><img src="images/project-view.png" alt="" /></p></li>
<li><b>VirtualAddressSpace Options</b> dialog is opened.</li>
<li>In the <b>Attributes</b> tab, select the values defined in <a href="integrity-building-monolith.html#values-in-attributes-tab">Values in Attributes Tab</a>.</li>
<li>Select <b>OK</b>.</li>
<li>In the galcore virtual address space area, double-click the <b>Task Initial</b> area (3).<p class="centerAlign"><img src="images/project-view-2.png" alt="" /></p></li>
<li>Select the <b>Start Automatically</b> check box.</li>
<li>Select <b>OK</b>.</li>
</ol>
<a name="values-in-attributes-tab"></a>
<h4 >Values in Attributes Tab</h4>
<p>Add the following attribute values for the virtual address space:</p>
<div class="table"><table class="generic" width="80%">
<thead><tr class="qt-style"><th >Attribute</th><th >Value</th></tr></thead>
<tr valign="top" class="odd"><td >Maximum Priority</td><td >255</td></tr>
<tr valign="top" class="even"><td >Maximum Weight</td><td >255</td></tr>
<tr valign="top" class="odd"><td >Memory Pool Size</td><td >2000P</td></tr>
<tr valign="top" class="even"><td >Heap Size</td><td >0X2000000</td></tr>
<tr valign="top" class="odd"><td >Heap Extension Reserved Size</td><td >0x20000</td></tr>
<tr valign="top" class="even"><td >Arguments</td><td >Leave blank.</td></tr>
<thead><tr class="qt-style"><th >Checkbox</th><th >Value</th></tr></thead>
<tr valign="top" class="odd"><td >Create Extra Virtual Memory Regions</td><td >Select the checkbox.</td></tr>
</table></div>
<a name="editing-galcore-project"></a>
<h3 >Editing Galcore Project</h3>
<p>You need to edit a number of files in the monolith project.</p>
<a name="file-galcore-c"></a>
<h4 >File galcore.c</h4>
<ol class="1" type="1"><li>Select <i>galcore.c</i> from the tree structure in the MULTI Project Manager view.</li>
<li>Double-click the file to open it for editing.</li>
<li>Add the following code to <i>galcore.c</i>:<pre class="cpp plain">
#include <INTEGRITY.h>
#include <stdlib.h>
#include <stdio.h>
extern Error GalCore_TaskInit(void);
int main(void) {
Error E;
E = GalCore_TaskInit();
if (E != Success) {
printf("Failed to start GalCore tasks\n");
}
Exit(0);
}
</pre>
</li>
</ol>
<a name="file-galcore-gpj"></a>
<h4 >File galcore.gpj</h4>
<ol class="1" type="1"><li>Select <i>galcore.gpj</i> from the tree structure in the MULTI Project Manager view.</li>
<li>Right-click the file to open the context menu.</li>
<li>Select <b>Edit</b>.</li>
<li>Add the file <i>libgalcore.a</i> to <i>galcore.gpj</i>.</li>
</ol>
<p>Contents of <i>galcore.gpj</i> should be as follows:</p>
<pre class="cpp plain">
#!gbuild
#component integrity_virtual_address_space
[Program]
-lgalcore
tgt/INTEGRITY.ld
galcore.c
</pre>
<a name="file-kernel-gpj"></a>
<h4 >File kernel.gpj</h4>
<ol class="1" type="1"><li>Select <i>kernel.gpj</i> from the tree structure in the MULTI Project Manager view.</li>
<li>Right-click the file to open the context menu.</li>
<li>Select <b>Edit</b>.</li>
<li>Add the file <i>libgalcore-iod.a</i> to <i>kernel.gpj</i>.</li>
</ol>
<p>Contents of <i>kernel.gpj</i> should be as follows:</p>
<pre class="cpp plain">
#!gbuild
#component integrity_kernel_monolith
[Program]
-kernel
-ldebug
-lload
-lres
-lgalcore-iod
tgt/default.ld
myproject_kernel.c
global_table.c
</pre>
<a name="file-monolith-gpj"></a>
<h4 >File monolith.gpj</h4>
<ol class="1" type="1"><li>Select <i>monolith.gpj</i> from the tree structure in the MULTI Project Manager view.</li>
<li>Righ-click the file to open the context menu.</li>
<li>Select <b>Edit</b>.</li>
<li>Add the additional library directory <i>$(__LIBS_DIR_BASE)/Vivante</i>.</li>
</ol>
<p>Contents of <i>monolith.gpj</i> should be as follows:</p>
<pre class="cpp plain">
#!gbuild
#component integrity_monolith
[INTEGRITY Application]
-non_shared
-I$__OS_DIR/modules/ghs/ghnet2/source/kernel/integrity/ip4server :sourceDir=$__OS_DIR/modules/ghs/ghnet2/source/kernel/integrity/ip4server
-L$(__LIBS_DIR_BASE)/Vivante
tgt/default.bsp
myproject.int
galcore.gpj [Program]
myproject_kernel.gpj [Program]
my_ivfsserver_module.gpj [Program]
ip4server_module.gpj [Program]
</pre>
<a name="int-file"></a>
<h4 >.int File</h4>
<ol class="1" type="1"><li>Select the <i>.int</i> file of your project from the tree structure in the MULTI Project Manager view.</li>
<li>Right-click the file to open the context menu.</li>
<li>Select <b>Edit</b>.</li>
<li>Add the following lines at the end of the file.<p><b>Note: </b>Replace </path/to/your/app/executable> with a path to your application executable.</p><pre class="cpp plain">
AddressSpace
Name myappname
Filename /path/to/your/app/executable
MemoryPoolSize 0x2000000
Language C++
HeapSize 0x6000000
Task Initial
StackSize 0x30000
StartIt true
EndTask
HeapExtensionReservedSize 0x2000000
EndAddressSpace
</pre>
</li>
</ol>
<a name="building-monolith-gpj"></a>
<h3 >Building monolith.gpj</h3>
<p>Open <i>monolith.gpj</i> from the tree structure in the MULTI Project Manager view. To build the project:</p>
<ol class="1" type="1"><li>Right-click <i>monolith.gpj</i> to open the context menu.</li>
<li>Select <b>Build</b>.</li>
</ol>
<p>Your monolith project is now ready to be packaged for U-Boot.</p>
</div>
<!-- @@@integrity-building-monolith.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="integrity-building-qt-for-imx6quad-board.html">Building Qt for i.MX6 Quad Board</a>
<span class="naviSeparator"> ◦ </span>
<a class="nextPage" href="integrity-building-u-boot-image.html">Building U-Boot Image</a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|