summaryrefslogtreecommitdiffstats
path: root/src/doc/src/b2qt.qdoc
blob: d7fafb561dc55010f330a65bf787ce2b059ff4ac (plain)
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
/****************************************************************************
**
** Copyright (c) 2013 Digia Plc and/or its subsidiary(-ies).
**
** Qt and Qt logos are trademarks of of Digia Corporation in Finland and/or
** other countries worldwide. All other trademarks are property of their
** respective owners.
**
**
** Licensees holding valid Qt Commercial licenses may use this document in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in a
** written agreement between you and Digia.
**
**
****************************************************************************/

/*!
    \contentspage{index.html}{Boot to Qt}
    \page index.html
    \nextpage b2qt-installation-guide.html
    \title Boot to Qt Introduction

    \e{\b{IMPORTANT:} Make sure to follow the \l{Installation Guide}
    closely!}

    \section1 Contents

    \list
        \li \b {\l{Installation Guide}}
        \li \b {\l{Preparing Hardware}}
        \list
            \li \l{Preparing Nexus 7}{Nexus 7 (embedded Android)}
            \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android)}
            \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Android and Linux)}
            \li \l{Preparing Raspberry Pi}{Raspberry Pi (embedded Linux)}
        \endlist
        \li \b {\l{Building and Running an Example}}
        \li \b {\l{Customization}}
        \li \b {\l{Supported Platforms}}
        \li \b {\l{Troubleshooting}}
    \endlist


    \section1 What is \B2Q?

    \b{\B2Q} is a light-weight UI stack for embedded systems, based on the
    \l{http://qt.digia.com/}{Qt Framework} by Digia, offering an elegant
    means of developing beautiful and performant embedded devices. It supports
    two different operating systems:

    \list
        \li \b{\B2QA} places Qt on top of an Android (version 4.1 or higher)
            kernel/baselayer.

        \li \b{\B2QL} places Qt on top of an Linux kernel/baselayer, built
            using Yocto 1.4 'Dylan' release.
    \endlist

    Both versions have been tested and verified on a number of different
    hardware configurations. \B2Q support is not limited to the devices used
    as reference platforms, it can be made to run on a variety of hardware.

    \B2Q SDK provides a complete software development package for
    creating applications on embedded devices. It comes with
    the Qt Creator IDE with preconfigured build targets for hardware
    platforms as well as an \l{Emulator}{emulator}.


    \section1 About Qt

    \l{http://qt.digia.com/}{Qt} is a full development framework with tools
    designed to streamline the creation of applications and user interfaces
    for desktop, embedded and mobile platforms.

    \list
        \li \b{Qt Framework} - intuitive APIs for C++
            and CSS/JavaScript-like programming with
            \b{Qt Quick} for rapid UI
            creation
        \li \b{Qt Creator IDE} - powerful cross-platform integrated development
            environment, including UI designer tools and on-device debugging
        \li \b{Tools and toolchains} - internationalization support, embedded
            toolchains and more.
    \endlist

    With Qt, you can reuse code efficiently to target multiple platforms
    with one code base. The modular C++ class library and developer tools
    enables developers to create applications for one platform and easily
    build and run to deploy also on other platforms.


    \section1 \B2Q vs Qt for Android

    \image b2qt-vs-qt-for-android.png

    \b{Qt for Android} is a port of the Qt Framework to be used for application
    development on the Android platform. Its purpose is to enable development
    of applications that can run on Android devices. For developers writing
    applications for the Android ecosystem, Qt for Android is the right choice.

    \b{\B2QA} tries to strip down the Android
    stack to the bare minimum, relying only on basic Linux
    features. The majority of the Android stack, such as
    \e{Dalvik virtual machine} is not running in \B2Q,
    resulting in faster startup times, lower memory consumption and
    overall better performance.

    \b{\B2QL} is build from scratch using Yocto 1.4 tools
    to contain only components required in the embedded device, resulting
    in smaller image sizes while keeping valuable development tools available.
*/

/*!
    \page b2qt-installation-guide.html
    \title Installation Guide
    \previouspage index.html
    \nextpage b2qt-preparing-hardware.html

    \e{IMPORTANT: The \B2Q SDK requires the following installation steps to be followed closely.}

    In case of problems, see the \l{Troubleshooting} information and the
    \l{http://qt.digia.com/en/Product/Boot-to-Qt/Boot-to-Qt-Known-Issues/}
    {Boot to Qt Known Issues} page.

    \target Requirements for Development Host
    \section1 0. Requirements for Development Host

    A 64-bit Linux system is required to install and use \B2Q
    SDK. Instructions in this documentation assume Ubuntu Linux 64-bit
    12.04 LTS or later. Other Linux distributions may work, but have
    not been tested. C/C++ build essentials must be installed.

    \target Installing 32-bit Support Libraries
    \section1 1. Installing 32-bit Support Libraries

    Some of the build tools in \B2Q are 32-bit programs, and on 64-bit
    systems they require that support libraries for running 32-bit
    code are present in the system. To install the required packages
    in Ubuntu, use the following command in a terminal:

    \code
        sudo apt-get install g++-multilib ia32-libs
    \endcode

    \target Installing VirtualBox
    \section1 2. Installing VirtualBox

    The emulator in \B2Q relies on VirtualBox virtualization software. You can
    download it from \l{https://www.virtualbox.org/wiki/Linux_Downloads} or
    install it from the command line with the following command:

    \code
        sudo apt-get install virtualbox
    \endcode

    \b{Configuring VirtualBox}

    Open VirtualBox network settings: Select \b{File > Preferences...}
    and click on the \b{Network} tab. Create a new network named
    \e{vboxnet0} and edit its properties:

    \list
        \li Change IPv4 address to 192.168.56.1 and IPv4 network mask to 255.255.255.0.
        \li Check \b{Enable Server} in \b{DCHP Server} tab.
        \li Change server address to 192.168.56.1.
        \li Change both the lower and upper address bounds to 192.168.56.101.
    \endlist

    \section1 3. Installing the \B2Q SDK

    If you have not already installed the \B2Q SDK, do it as follows.

    After downloading the \B2Q SDK binary installer (the file named
    something like \c{Boot2QtSDK-evaluation-64bit-2013xxxxxx}),
    make sure it is executable either by

    \list
        \li Using \c{chmod +x <filename>} command, or
        \li Right-clicking on the file, selecting \b{Properties}, and checking
            \b{Allow executing file as program} on the \b{Permissions} tab.
    \endlist

    Run the installer and follow its instructions.

    The installer will let you select a directory where the entire,
    self-contained \B2Q SDK will be installed. In the rest of this
    documentation, that directory is referred to as
    \c{<SDK_INSTALL_DIR>}. By default, it is
    \tt{/home/\e{yourusername}/Boot2QtSDK}.

    \target Installing Boot to Qt on Target Devices
    \section1 4. Install \B2Q on Target Devices

    \e{If targeting only the emulator, this step may be skipped}

    Before deploying and testing your Qt application on hardware, the
    target device needs to be flashed with an image that contains the
    \B2Q stack. These steps vary from device to device. See the
    following chapter and follow the instructions specific to
    your device.

    \list
        \li \l {Preparing Hardware}
    \endlist

    \section1 5. Setting up USB Access to Embedded Devices

    \e{If targeting only the emulator, this step may be skipped}

    \include b2qt-post-install-setup.qdocinc setting up usb access

    \section1 6. Configuring a Device Kit in Qt Creator

    \include b2qt-post-install-setup.qdocinc configuring device kit

    \b {You are now ready to start developing for your device!}

    See \l{Building and Running an Example}
*/

/*!
    \page b2qt-preparing-hardware.html
    \title Preparing Hardware
    \previouspage b2qt-installation-guide.html
    \nextpage b2qt-building-and-running.html

    Before deploying and testing your Qt application on hardware, the
    target device needs to be flashed with an image that contains the
    \B2Q stack. These steps vary from device to device:

    \list
        \li \l{Nexus 7 (embedded Android)}
        \li \l{Sabre Lite i.MX 6 (embedded Android)}
        \li \l{BeagleBoard-xM (embedded Android and Linux)}
        \li \l{Raspberry Pi (embedded Linux)}
    \endlist

    If you are only using the emulator, you can skip this step
    and continue straight to \l {Building and Running an Example}.
*/

/*!
    \target Nexus 7 (embedded Android)
    \page b2qt-preparing-hardware-nexus-7.html
    \title Preparing Nexus 7
    \previouspage b2qt-installation-guide.html
    \nextpage b2qt-building-and-running.html

    When using a \l{http://www.google.com/nexus/7/specs/}{Nexus 7} as a
    development device, following steps are required to prepare it for
    \B2Q.

    \section1 Unlocking Nexus 7 Bootloader

    The Nexus 7 Bootloader has to be unlocked to allow custom software
    to be installed. This has to be done only once.

    \list 1
        \li Power down the device.
        \li Connect it to the development host with a USB cable.
        \li Start the Nexus up in \e{fastboot} mode: Press the power button for a second, and then keep the Volume Down key pressed, until you see a screen with a green robot with its front panel open. Note: If you get the ordinary startup screen instead, just power it down and try again.
        \li On the development host, give the command
        \code
            sudo <SDK_INSTALL_DIR>/Tools/b2qt/fastboot oem unlock
        \endcode
        The Nexus screen will ask if you want to unlock the bootloader. Press power button to confirm.
        \li Wait a few seconds, and check that the text line stating the \c{LOCK STATE} now says \c{UNLOCKED}.
    \endlist

    \section1 Updating a Nexus 7 with \B2Q Images

    \note \b{It is important that the steps in this section are repeated
    every time after updating the \B2Q SDK.}

    An unlocked Nexus 7 device can now be updated with a \B2Q image.

    To do so, first make sure that the device is in \e{fastboot} mode
    (see above), and connected to the development host via USB.

    Then, re-flash the \e{boot}, \e{system}, and \e{userdata} partitions on the
    device, using the following commands in the order they are listed:

    \code
        cd <SDK_INSTALL_DIR>
        sudo ./Tools/b2qt/fastboot flash boot Boot2Qt-1.0/nexus7-eAndroid/images/boot.img
        sudo ./Tools/b2qt/fastboot flash system Boot2Qt-1.0/nexus7-eAndroid/images/system.img
        sudo ./Tools/b2qt/fastboot flash userdata Boot2Qt-1.0/nexus7-eAndroid/images/data.img
    \endcode

    Once the flashing is completed successfully, reboot the device:

    \code
        sudo ./Tools/b2qt/fastboot reboot
    \endcode

    \note Until the next step is performed, the Nexus 7 will not
    boot correctly (the screen will only show the "Google" logo).

    \section1 Installing Proprietary Drivers

    Download the proprietary drivers for your Nexus 7
    \l{https://developers.google.com/android/nexus/drivers#grouperjdq39}{here}.

    \note Make sure you have read the license terms at the beginning of the
    driver download page.

    Select the links in the \b{Graphics}, \b{Camera, Sensors, DRM} and \b{Orientation Sensor} rows from the table
    \e{"Nexus 7 (Wi-Fi) binaries for Android 4.2.2"}, download and save the files
    to the installation directory of the \B2Q SDK.

    \note Only the version "Android 4.2.2 (JDQ39 to JDQ39E)" will work with the current Boot to Qt image.

    Make sure your Nexus 7 is powered up, is \e{not} in fastboot mode,
    and is connected to the computer via USB.

    Then, follow these steps to update the Nexus 7:

    \list 1
        \li Extract the downloaded files, and run the extracted installers. For example,
        \code
            cd <SDK_INSTALL_DIR>
            tar xf nvidia-grouper-jdq39-738059f9.tgz
            ./extract-nvidia-grouper.sh
            tar xf asus-grouper-jdq39-b6907aa5.tgz
            ./extract-asus-grouper.sh
            tar xf invensense-grouper-jdq39-28df082f.tgz
            ./extract-invensense-grouper.sh
        \endcode
        \li Find out the serial number of the connected Nexus 7 device:
        \code
            <SDK_INSTALL_DIR>/Tools/b2qt/adb devices
        \endcode
        \li Deploy the drivers to your device using the following command:
        \code
            <SDK_INSTALL_DIR>/Boot2Qt-1.0/nexus7-eAndroid/images/deploy.sh <serial_number>
        \endcode
    \endlist

    After the installation is complete, power up the device and confirm that it shows
    a \B2Q welcome screen and/or demo.

    \section1 Setting up USB Access

    \include b2qt-post-install-setup.qdocinc setting up usb access

    \section1 Configuring a Device Kit in Qt Creator

    \include b2qt-post-install-setup.qdocinc configuring device kit

    \b {You are now ready to start developing for your device!}

    See \l{Building and Running an Example}
*/

/*!
    \target BeagleBoard-xM (embedded Android and Linux)
    \page b2qt-preparing-hardware-beagleboard.html
    \title Preparing BeagleBoard-xM
    \previouspage b2qt-installation-guide.html
    \nextpage b2qt-building-and-running.html

    When using a \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM} as a
    development device, following steps are required to prepare it for
    \B2Q.

    \note \b{It is important that the steps in this section are repeated
    every time after updating the \B2Q SDK.}

    The images containing \B2Q stack for BeagleBoard-xM is included in the SDK,
    ready to be copied to a micro-SD card.

    \section1 Preparing a Micro-SD Card

    For \B2QA, a micro-SD card of at least 2GB capacity is needed. For \B2QL,
    a card of at least 512MB capacity is sufficient.

    Plug the micro-SD card/reader into the development host PC and use
    the following command to find out its device path
    (i.e. \c{/dev/XXX}, where \c{XXX} typically is \c{sdb}):

    \code
        df -h
    \endcode

    Alternatively, if the micro-SD card is unformatted, run the following
    command immediately after inserting the card to see its device
    path:

    \code
        dmesg | tail
    \endcode

    Now make sure the micro-SD card is not mounted:

    \code
        umount /dev/XXX
    \endcode

    \section1 Installing the \B2Q Image

    The commands used in this step vary depending on whether you are developing
    for \B2QA or embedded Linux.

    Write the image to the micro-SD card:

    \list
        \li \b{\B2QA}
        \code
            cd <SDK_INSTALL_DIR>
            sudo dd if=Boot2Qt-1.0/beagleboard-eAndroid/images/sdcard.img of=/dev/XXX bs=1M
        \endcode
        \li \b{\B2QL}
        \code
            cd <SDK_INSTALL_DIR>
            sudo Boot2Qt-1.0/beagleboard-eLinux/images/deploy.sh /dev/XXX
        \endcode
    \endlist

    \warning \b{Make very sure you select the right device. Selecting the wrong
    one can result in a wiped hard drive}.

    After the image has been deployed, power up the device and confirm that it shows
    a \B2Q welcome screen and/or demo.

    \section1 Setting up USB Access

    \include b2qt-post-install-setup.qdocinc setting up usb access

    \section1 Configuring a Device Kit in Qt Creator

    \include b2qt-post-install-setup.qdocinc configuring device kit

    \b {You are now ready to start developing for your device!}

    See \l{Building and Running an Example}
*/

/*!
    \target Sabre Lite i.MX 6 (embedded Android)
    \page b2qt-preparing-hardware-imx6.html
    \title Preparing Sabre Lite i.MX 6
    \previouspage b2qt-installation-guide.html

    When using a
    \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Sabre
    Lite i.MX 6} as a development device, following steps are required
    to prepare it for \B2QA.

    \note \b{It is important that the steps in this section are repeated
    every time after updating the \B2Q SDK.}

    The images containing \B2Q stack for Sabre Lite i.MX 6 is included in the SDK,
    ready to be copied to a micro-SD card.

    \section1 Preparing a Micro-SD Card

    For \B2QA, a micro-SD card of at least 4GB capacity is needed.

    Plug the micro-SD card/reader into the development host PC and use
    the following command to find out its device path
    (i.e. \c{/dev/XXX}, where \c{XXX} typically is \c{sdb}):

    \code
        df -h
    \endcode

    Alternatively, if the micro-SD card is unformatted, run the following
    command immediately after inserting the card to see its device
    path:

    \code
        dmesg | tail
    \endcode

    Next, make sure the micro-SD card is not mounted:

    \code
        umount /dev/XXX
    \endcode

    \section1 Installing the Android image

    Download the package \e{imx6-jb-20130628.tar.gz} from
    \l{http://boundarydevices.com/android-jellybean-on-i-mx6-with-no-disclaimers/}{Boundary
    Devices Android Jellybean i.MX6 images} (registration required).

    Use the following commands to create a micro-SD card containing the
    dowloaded image:

    \list
        \li Extract the downloaded package
        \code
        ~/$ mkdir bd-android
        ~/$ cd bd-android
        ~/bd-android$ sudo tar zxvf ~/Downloads/imx6-jb-20130628.tar.gz
        \endcode
        \li Run device/boundary/mksdcard.sh:
        \code
        ~/bd-android$ sudo umount /media/* /media/$USER/*
        ~/bd-android$ sudo device/boundary/mksdcard.sh /dev/XXX
        ~/bd-android$ sync
        \endcode
    \endlist

    Make sure to replace the device path (\c{"/dev/XXX"}) with your micro-SD
    card's device path that was found in the previous step.

    \warning \b{Make very sure you select the right device. Selecting the wrong
    one can result in a wiped hard drive.}

    \section1 Installing the \B2QA Image

    Make sure you have the required tools installed in your development machine:

    \code
        sudo apt-get install u-boot-tools
    \endcode

    Then, upgrade the micro-SD Card with \B2QA:

    \code
        chmod +x <SDK_INSTALL_DIR>/Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh
        <SDK_INSTALL_DIR>/Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX
    \endcode

    \warning \b{Make very sure you select the right device. Selecting the wrong
    one can result in a wiped hard drive}.

    After the installation is complete, power up the device and confirm that it shows
    a \B2Q welcome screen and/or demo.

    \section1 Setting up USB Access

    \include b2qt-post-install-setup.qdocinc setting up usb access

    \section1 Configuring a Device Kit in Qt Creator

    \include b2qt-post-install-setup.qdocinc configuring device kit

    \b {You are now ready to start developing for your device!}

    See \l{Building and Running an Example}
*/

/*!
    \target Raspberry Pi (embedded Linux)
    \page b2qt-preparing-hardware-rasberrypi.html
    \title Preparing Raspberry Pi
    \previouspage b2qt-installation-guide.html
    \nextpage b2qt-building-and-running.html

    When using a \l{http://www.raspberrypi.org/}{Raspberry Pi} as a
    development device, following steps are required to prepare it for
    \B2Q.

    \note \b{It is important that the steps in this section are repeated
    every time after updating the \B2Q SDK.}

    The images containing \B2Q stack for Raspberry Pi is included in the SDK,
    ready to be copied to a micro-SD card.

    \section1 Preparing a Micro-SD Card

    For \B2QL, a card of at least 512MB capacity is sufficient.

    Plug the micro-SD card/reader into the development host PC and use
    the following command to find out its device path
    (i.e. \c{/dev/XXX}, where \c{XXX} typically is \c{sdb}):

    \code
        df -h
    \endcode

    Alternatively, if the micro-SD card is unformatted, run the following
    command immediately after inserting the card to see its device
    path:

    \code
        dmesg | tail
    \endcode

    Now make sure the micro-SD card is not mounted:

    \code
        umount /dev/XXX
    \endcode

    \section1 Installing the \B2Q Image

    Write the image to the micro-SD card:

    \code
        cd <SDK_INSTALL_DIR>
        sudo Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/XXX
    \endcode

    \warning \b{Make very sure you select the right device. Selecting the wrong
    one can result in a wiped hard drive}.

    After the image has been deployed, power up the device and confirm that it shows
    a \B2Q welcome screen and/or demo.

    \section1 Configuring a Device Kit in Qt Creator

    \include b2qt-post-install-setup.qdocinc configuring network device

    \b {You are now ready to start developing for your device!}

    See \l{Building and Running an Example}
*/

/*!
    \page b2qt-building-and-running.html
    \title Building and Running an Example
    \previouspage b2qt-installation-guide.html
    \nextpage b2qt-customization.html

    Once the installation and configuration steps for the SDK and the
    target device(s) are completed, it's time to test the setup.

    First, make sure your device is powered up and connected to the
    development host via USB.

    Then, follow these steps to create and run a simple \l{Qt Quick}
    application on the device:

    \list 1
        \li Open \b{File > New File or Project}, select
            \b{Qt Quick 2 Application (Built-in Types)} and click \b{Next}.
        \li In \b{Kit Selection} dialog, select the kit(s) for your
            devices. You can also select the emulator kit to test running the
            project in the emulator.
        \li Click \b{Next} and finish the wizard.
        \li In \b{Projects > Build & Run}, select the correct kit for your
            connected device.
        \li To build and run the project, click \inlineimage qtcreator-run.png
    \endlist

    \section1 Setting up an already existing project for deployment

    The projects generated by Qt Creator will always have the correct settings
    for deployment on the device or emulator. Existing projects may need some
    changes however.

    As a general rule, application binaries and content (like QML files) are
    deployed under /data/user/qt/<APPLICATION_NAME>. This means that deployment
    settings in .pro files like the following:

    \code
        target.path = ...
        INSTALLS += target
    \endcode

    should be migrated to

    \code
        target.path = /data/user/qt/<APPLICATION_NAME>
        INSTALLS += target
    \endcode
*/

/*!
    \page b2qt-customization.html
    \title Customization
    \previouspage b2qt-building-and-running.html
    \nextpage b2qt-supported-platforms.html

    \section1 Environment and Input

    By default, the basic environment variables and startup options of
    \B2Q applications are set in the file \c
    {/system/bin/appcontroller.conf} in embedded Android devices and
    in \c{/etc/appcontroller.conf} in embedded Linux devices.

    This file can be customized if targeting a hardware device that
    has different input devices than what the \B2Q stack is configured
    for by default.

    Note that on some devices, the root file system (where this file
    resides) is mounted read-only at boot time. It needs to be
    remounted read-write to allow modification. The following command
    does that:
    \code
        <SDK_INSTALL_DIR>/Tools/b2qt/adb remount
    \endcode

    In the \c{appcontroller.conf} file the input devices are
    specified by the lines similar to these:
    \code
        env=QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event0
    \endcode

    Usually there is no need to change this setting. USB input devices like
    keyboards and mice are automatically recognized. The mouse pointer is shown
    automatically if a mouse is connected.

    Note however that hotplugging may not work, meaning that the input
    devices, like keyboard and mouse, have to be connected at boot
    time.

    On some devices, for example the i.MX6 Sabre Lite, the touchscreen device is
    specified explicitly in QT_QPA_GENERIC_PLUGINS. This is necessary because
    the automatic device discovery would fail to find the touchscreen.

    \section1 Booting to a Custom Application

    After you have deployed your own application to the device it will be launched instead
    of the \B2Q demo launcher on boot. To prevent this behavior you have to remove
    this step from the build steps of your project's run configuration.

    To remove your application from the default startup use the following command:
    \code
        <SDK_INSTALL_DIR>/Tools/b2qt/adb shell appcontroller --remove-default
    \endcode

    \section1 Switching Between Portrait and Landscape Views

    Depending on a device screen dimensions and application requirements it might be desirable
    to change the default view orientation. The following example shows how to rotate your
    application in QML.

    \code
    import QtQuick 2.0

    Item {
        id: root
        width: 800
        height: 1280
        // Container element for rotating
        Rectangle {
            id: main
            // Swap the width and height of the root item
            width: root.height
            height: root.width
            anchors.centerIn: parent
            // Rotate 90 degrees clockwise around transformOrigin
            rotation: 90
            // The rotated content
            Text {
                text: qsTr("Hello World")
                anchors.centerIn: parent
            }
            MouseArea {
                anchors.fill: parent
                onClicked: {
                    Qt.quit();
                }
            }
        }
    }
    \endcode
*/

/*!
    \page b2qt-supported-platforms.html
    \title Supported Platforms
    \previouspage b2qt-customization.html
    \nextpage b2qt-troubleshooting.html

    \section1 Supported Target Devices

    \B2Q can be made to run on hardware that has support for
    the Android operating system, version 4.0 or later.

    Approximate minimal hardware requirements for running \B2Q are:
    \list
        \li 256Mb of RAM
        \li 500Mhz CPU, 1Ghz preferred for 60 FPS velvet-smooth UI
        \li OpenGL ES 2.0 support
        \li Android 4.0+ compatible hardware
    \endlist

    For the technology preview release, the following devices have
    been used as reference and are tested to work:
    \list
        \li \l{http://www.google.com/nexus/7/specs/}{Google/Asus Nexus 7}
        \li \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM}
        \li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Freescale i.MX6 Sabre Lite board (Boundary Devices)}
    \endlist

    \section1 Supported Development Environment

    The development environment supported in \B2Q Technology Preview
    release is Ubuntu Linux 64-bit (12.04 LTS or 12.10). See the
    \l{Requirements for Development Host}.

*/

/*!
    \page b2qt-troubleshooting.html
    \title Troubleshooting
    \previouspage b2qt-supported-platforms.html

    \note An updated version of this information may be available in the Digia customer portal.

    See also \b{\l{http://qt.digia.com/en/Product/Boot-to-Qt/Boot-to-Qt-Known-Issues/}{Boot to Qt Known Issues}.}

    \section1 General Issues

    \section2 I have a problem deploying/launching the application in Qt Creator

    Check if the device is properly connected to the PC via USB.
    See \l{Connectivity Issues}.

    If using the emulator, see \l{Installing VirtualBox}{Configuring VirtualBox}.

    \section2 I have a problem deploying/launching a Qt or Qt Declarative example application

    Because of a technical peculiarity in \c{qmake}, it is not
    possible to get correct deployment setup for any application that
    is placed inside a Qt source code tree.

    The workaround is to copy the example sources to a location
    outside the Qt source tree, and open this copy of the example
    application instead.

    \section2 I have a problem launching or running applications on hardware after updating \B2Q SDK

    Remember to repeat the process of updating also your device with the latest
    version of \B2Q. See \l{Installing Boot to Qt on Target Devices}.

    \section2 Booting Sabre Lite i.MX 6 stops with \e {6x_bootscript not found} error

    Check the U-Boot version number. It should start with either \c{2012} or \c{2013}.
    If it is \c{2009.xx}, an upgrade of the bootloader is required. See information and
    instructions here:

    \list
        \li \l http://boundarydevices.com/6q_bootscript/
        \li \l http://boundarydevices.com/switching-u-boot-versions-on-i-mx6/
    \endlist

    \section2 How do I restore my Nexus 7 to factory settings?

    Goto \l{https://developers.google.com/android/nexus/images} and
    download the correct file for your device. Unpack it, and then

    \code
        <SDK_INSTALL_DIR>/Tools/b2qt/adb reboot bootloader
        <SDK_INSTALL_DIR>/Tools/b2qt/fastboot -w update <image-file>.zip
    \endcode

    \section2 How do I shut down the Nexus 7?

    If the \B2Q demo launcher is running, start the "Launcher
    Settings" app, and press the "Power Off" button.

    Otherwise, make sure the Nexus 7 is connected to your PC with USB, and run
    the following command in a terminal:
    \code
        <SDK_INSTALL_DIR>/Tools/b2qt/adb shell reboot -p
    \endcode

    Alternatively, press and hold the power button for 10
    seconds. This will force a reboot.

    \section2 Trying to build for the emulator target fails with error message \e{make: i686-android-linux-g++: Command not found}

    You need to install proper libraries in order to run 32-bit programs in 64-bit Linux operating system.

    See \l{Installing 32-bit Support Libraries}.

    \section2 Something crashed!

    The following command shows the system log:
    \code
        <SDK_INSTALL_DIR>/Tools/b2qt/adb logcat
    \endcode

    \section2 Mouse or touch input does not work

    See \l{Customization}.

    Note that hotplugging does not currently work; any input device
    must be present at boot time to be recognized.

    \section2 Application stops with \e{EGLFS: OpenGL windows cannot be mixed with others.}

    In OpenGL and Qt Quick 2 applications there can only be one
    fullscreen window existing at a time. Trying to create another
    OpenGL window or trying to mix an OpenGL window with raster ones
    will abort the application with the message shown above.

    For raster (software rendered, e.g. QtWidget or QPainter-based
    content) windows there is no such limitation.

    \section2 I cannot edit the contents of appcontroller.conf on the device

    The file system where this file is located may be mounted as read-only.

    See \l{Customization}.

    \section1 Connectivity Issues
    \section2 I cannot connect to my hardware device via USB

    See \l{5. Setting up USB Access to Embedded Devices}.

    \section2 adb fails with "error: more than one device and emulator"

    You have to specify which android device you want \c{adb} to talk
    to, using adb's \c{-s <serial-number>} option. Use the following
    command to find to see the serial number of the connected
    devices:

    \code
        <SDK_INSTALL_DIR>/Tools/b2qt/adb devices
    \endcode

    \section2 What is the user and password to access my embedded Linux device

    Embedded Linux devices can be accessed using user \c{root} and an empty password.


*/