Qt on Pi Contribute: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Qt on Pi – Contribute=
[[Category:QtonPi]]


==QtonPi Platform==
[toc align_right="yes" depth="2"]


With QtonPi platform we aim to provide our community with the tools needed to create awesome Qt 5 Apps on Raspberry Pi hardware. We intend to take a minimalistic approach towards what’s included in the platform and let our App Developers drive the evolution of the platform with real world App use cases.
= Qt on Pi - Contribute =
 
== QtonPi Platform ==
 
With QtonPi platform we aim to provide our community with the tools needed to create awesome Qt 5 Apps on Raspberry Pi hardware. We intend to take a minimalistic approach towards what's included in the platform and let our App Developers drive the evolution of the platform with real world App use cases.


QtonPi platform is not intended to be another full fledged Linux distribution. While we plan to use packages and tools from other distributions, our goal really is to provide an easy-to-use flexible innovation environment for Qt and Qt related technologies.
QtonPi platform is not intended to be another full fledged Linux distribution. While we plan to use packages and tools from other distributions, our goal really is to provide an easy-to-use flexible innovation environment for Qt and Qt related technologies.
Line 20: Line 24:
* SD Card Image
* SD Card Image
* Toolchain and Sysroot
* Toolchain and Sysroot
* Qt Creator based App <span class="caps">SDK</span>
* Qt Creator based App SDK
* Cross-build tools
* Cross-build tools


==QtonPi Roadmap==
== QtonPi Roadmap ==


QtonPi software stack can be broken down into three layers. These layers exits so that folks in the QtonPi community can organize themselves in areas that they’re most passionate about. The layers are,
QtonPi software stack can be broken down into three layers. These layers exits so that folks in the QtonPi community can organize themselves in areas that they're most passionate about. The layers are,


# Base Layer
# Base Layer
Line 31: Line 35:
# Apps
# Apps


===Base Layer===
=== Base Layer ===


Base Layer essentially consists of everything above the hardware providing all the enablers to run our middleware. This includes boot loader, codecs, kernel, root filesystem, <span class="caps">RPM</span> packages, compiler, build environment, etc.,
Base Layer essentially consists of everything above the hardware providing all the enablers to run our middleware. This includes - boot loader, codecs, kernel, root filesystem, RPM packages, compiler, build environment, etc.,


===Middleware===
=== Middleware ===


Our middleware consists of Qt 5 (plus additional optional modules where it makes sense) and a Qt Creator based QtonPi <span class="caps">SDK</span> for App Creation along with all the community documentation we can put together.
Our middleware consists of Qt 5 (plus additional optional modules where it makes sense) and a Qt Creator based QtonPi SDK for App Creation along with all the community documentation we can put together.


That’s it! Nothing more, nothing less.
That's it! Nothing more, nothing less.


The programming models that we will support would be,
The programming models that we will support would be,
Line 48: Line 52:
For UI, you can use,
For UI, you can use,


* <span class="caps">QML</span> (or)
* QML (or)
* <span class="caps">HTML</span> (though QtWebKit)
* HTML (though QtWebKit)


===Apps===
=== Apps ===


Interesting Apps is something that we hope our community will create, so that we can build a better Middleware and Base Layer.
Interesting Apps is something that we hope our community will create, so that we can build a better Middleware and Base Layer.


We might have scenarios where we might not be able to provide all the <span class="caps">API</span>s needed for folks trying to do some really cool Apps with QtonPi.
We might have scenarios where we might not be able to provide all the APIs needed for folks trying to do some really cool Apps with QtonPi.


We should however make it easy both at the Base Layer and Middleware for folks to be able to add their own <span class="caps">API</span>s where necessary and provide all the freedom for App Developers innovate.
We should however make it easy both at the Base Layer and Middleware for folks to be able to add their own APIs where necessary and provide all the freedom for App Developers innovate.


===Releases===
=== Releases ===


QtonPi is a community project. Following is a general direction on where we would like to go.
QtonPi is a community project. Following is a general direction on where we would like to go.


====Release-0====
==== Release-0 ====


* Base Layer
* Base Layer
** Fedora <span class="caps">RPM</span> Packages plus some additional Raspberry Pi Specific packages
** Fedora RPM Packages plus some additional Raspberry Pi Specific packages
** Linaro <span class="caps">GCC</span> 4.5.4 toolchain
** Linaro GCC 4.5.4 toolchain
** QtonPi image creator and sysroot tools
** QtonPi image creator and sysroot tools


* Middleware
* Middleware
** Documentation on how to get toolchain + sysroot + Qt Creator working to Develop Apps
** Documentation on how to get toolchain + sysroot + Qt Creator working to Develop Apps
** Qt 5 running on full-screen <span class="caps">EGLFS</span> mode
** Qt 5 running on full-screen EGLFS mode


====Release-1====
==== Release-1 ====


Target Spring 2012
Target - Spring 2012


* Base Layer
* Base Layer
** OpenSuse QtonPi Packages (without GPLv3 packages)
** OpenSuse QtonPi Packages (without GPLv3 packages)
** Build Envrionment
** Build Envrionment
** Updated Compiler (<span class="caps">GCC</span> 4.6)
** Updated Compiler (GCC 4.6)
** QtProcessManager
** QtProcessManager
** QtJsonDB (App Development)
** QtJsonDB (App Development)


* Middleware
* Middleware
** QtonPi <span class="caps">SDK</span> delivered as an installer with integrated toolchain + community documentation
** QtonPi SDK delivered as an installer with integrated toolchain + community documentation
** Auto configuration/discovery of Raspberry Pis from QtonPi <span class="caps">SDK</span>
** Auto configuration/discovery of Raspberry Pis from QtonPi SDK
** Qt 5 running on Full Screen <span class="caps">EGLFS</span> mode
** Qt 5 running on Full Screen EGLFS mode


====Release-2====
==== Release-2 ====


Target Summer 2012
Target - Summer 2012


* Base Layer
* Base Layer
** Migrate to a kernel version that supports <span class="caps">CMA</span>
** Migrate to a kernel version that supports CMA
** Update or add packages to support Multimedia and Multi-process Qt/Qt Quick Apps
** Update or add packages to support Multimedia and Multi-process Qt/Qt Quick Apps
** Provide an example compositor environment based on qt-compositor and process manager
** Provide an example compositor environment based on qt-compositor and process manager


* Middleware
* Middleware
** Update QtonPi <span class="caps">SDK</span> to include the release version of Qt 5
** Update QtonPi SDK to include the release version of Qt 5
** Improve community documentation
** Improve community documentation


==QtonPi Image Creator and Sysroot==
== QtonPi Image Creator and Sysroot ==


QtonPi releases comes with a default SD Card Image and Sysroot. Following instructions are for you to be able to build your custom SD Card Image and Sysroot.
QtonPi releases comes with a default SD Card Image and Sysroot. Following instructions are for you to be able to build your custom SD Card Image and Sysroot.


===Download and Installation Requirements===
=== Download and Installation Requirements ===
 
In order to build your custom QtonPi SD Card Image/Sysroot, you'll need Fedora 14 (as it is the distro most contributors are working on). We hope in subsequent release we can take this dependency away.
 
==== Setting up Fedora 14 ====
 
First please ensure that you've all the necessary development tools on your host. You can do this by installing the &lt;code&amp;gt;Development Tools&amp;lt;/code&amp;gt; meta-package.
 
<code><br />$ sudo yum groupinstall 'Development Tools'<br /></code>
 
Once this is done, next step would be to install &lt;code&amp;gt;augeas-libs&amp;lt;/code&amp;gt;, which is needed to install &lt;code&amp;gt;zypper&amp;lt;/code&amp;gt; package.
 
<code><br />$ sudo yum install augeas-libs<br /></code>
 
==== Installing &lt;code&amp;gt;host-rpms&amp;lt;/code&amp;gt; ====
 
You will find &lt;code&amp;gt;host-rpms&amp;lt;/code&amp;gt; in the following directory.
 
<code><br />qtonpi-X.Y/<br />├── platform-sdk/<br />│ ├── host-rpms/<br /></code>
 
To install, just go into that directory and do an &lt;code&amp;gt;sudo rpm -ivh * &lt;/code&amp;gt;
 
<code><br />$ pwd<br />/home/rajiv/qtonpi-0.2/platform-sdk/host-rpms<br />$ sudo rpm -ivh *rpm<br /></code>
 
==== Getting Image Creator and Sysroot scripts ====
 
Image Creator and Sysroot tools are shipped as a part of the QtonPi software release in the &lt;code&amp;gt;mt-cross-tools&amp;lt;/code&amp;gt; directory which you should find here,
 
<code><br />qtonpi-X.Y/<br />├── platform-sdk/<br />│ └── mt-cross-tools/<br /></code>
 
=== Creating custom Sysroot ===


In order to build your custom QtonPi SD Card Image/Sysroot, you’ll need Fedora 14 (as it is the distro most contributors are working on). We hope in subsequent release we can take this dependency away.
&lt;code&amp;gt;mksysroot-rasp-pi&amp;lt;/code&amp;gt; script present in &lt;code&amp;gt;mt-cross-tools&amp;lt;/code&amp;gt; directory can be used to build custom sysroot. This script must be run as &lt;code&amp;gt;root&amp;lt;/code&amp;gt; user and it needs a file containing a list of RPM packages that you would like to be installed in your sysroot. Default sysroot packages are provided in the file &lt;code&amp;gt;rasp-pi-sysroot-list.default&amp;lt;/code&amp;gt;.


====Setting up Fedora 14====
<code><br />$ ./mksysroot-rasp-pi<br />This script must be run as root<br />usage: sudo ./mksysroot-rasp-pi RPM_LIST<br /></code>


First please ensure that you’ve all the necessary development tools on your host. You can do this by installing the <code>Development Tools</code> meta-package.
'''Note -''' &lt;code&amp;gt;mksysroot-rasp-pi&amp;lt;/code&amp;gt; generates the sysroot at &lt;code&amp;gt;/opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root&amp;lt;/code&amp;gt;. Please make sure that this directory does '''not''' exist before running the script.


Once this is done, next step would be to install <code>augeas-libs</code>, which is needed to install <code>zypper</code> package.
<code><br />$ pwd<br />/home/rajiv/qtonpi-0.2/platform-sdk/mt-cross-tools<br />$ sudo ./mksysroot-rasp-pi rasp-pi-sysroot-list.default<br />[sudo] password for rajiv:<br />./<br />./zypp/<br />./zypp/zypp.conf<br />./zypp/systemCheck<br />./zypp/zypper.conf<br />./zypp/repos.d/<br />./zypp/repos.d/f14.repo<br />using the following repos:<br /># | Alias | Name | Enabled | Refresh<br />—''———''———————————''———''———<br />1 | f14-arm | ARM RPM Repository for Fedora14 | Yes | No<br />refreshing the repos, this will take awhile (~ 5min)


====Installing <code>host-rpms</code>====
[…]


You will find <code>host-rpms</code> in the following directory.
$ ls /opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root<br />./ bin/ dev/ home/ media/ opt/ root/ selinux/ sys/ usr/<br />../ boot/ etc/ lib/ mnt/ proc/ sbin/ srv/ tmp/ var/<br />$<br /></code>


To install, just go into that directory and do an <code>sudo rpm -ivh * </code>
Your newly minted sysroot is now available at &lt;code&amp;gt;/opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root&amp;lt;/code&amp;gt;


====Getting Image Creator and Sysroot scripts====
=== Creating custom SD Card Image h3. ===


Image Creator and Sysroot tools are shipped as a part of the QtonPi software release in the <code>mt-cross-tools</code> directory which you should find here,
==== Partition Layout h4. ====


===Creating custom Sysroot===
For QtonPi Release 0.x, we've organized the SD Card as follows. Assuming your SD Card is on &lt;code&amp;gt;/dev/sdb&amp;lt;/code&amp;gt; device.


<code>mksysroot-rasp-pi</code> script present in <code>mt-cross-tools</code> directory can be used to build custom sysroot. This script must be run as <code>root</code> user and it needs a file containing a list of <span class="caps">RPM</span> packages that you would like to be installed in your sysroot. Default sysroot packages are provided in the file <code>rasp-pi-sysroot-list.default</code>.
<code><br /># fdisk /dev/sdb


'''Note –''' <code>mksysroot-rasp-pi</code> generates the sysroot at <code>/opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root</code>. Please make sure that this directory does '''not''' exist before running the script.
Command (m for help): p


Your newly minted sysroot is now available at <code>/opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root</code>
Disk /dev/sdb: 1977 MB, 1977614336 bytes<br />61 heads, 62 sectors/track, 1021 cylinders, total 3862528 sectors<br />Units = sectors of 1 * 512 = 512 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x0000cded


===Creating custom SD Card Image h3.===
Device Boot Start End Blocks Id System<br />/dev/sdb1 62 249611 124775 c W95 FAT32 (LBA)<br />/dev/sdb2 249612 2250289 1000339 83 Linux<br />/dev/sdb3 2250290 3248737 499224 82 Linux swap / Solaris


====Partition Layout h4.====
Command (m for help): q


For QtonPi Release 0.x, we’ve organized the SD Card as follows. Assuming your SD Card is on <code>/dev/sdb</code> device.
#<br /></code>


All partitions are primary partitions.
All partitions are primary partitions.


* The first partition is a Fat32 partition which consists of the secondary bootloader, kernel, and other files needed to be initalize the <span class="caps">GPU</span>.
* The first partition is a Fat32 partition which consists of the secondary bootloader, kernel, and other files needed to be initalize the GPU.
* The second paritition is a Ext4 partition, where the root filesystem resides
* The second paritition is a Ext4 partition, where the root filesystem resides
* The third partition is a swap partition that we’ve thrown in for a good measure. This might be removed in the subsequent releases.
* The third partition is a swap partition that we've thrown in for a good measure. This might be removed in the subsequent releases.
 
Feel free to resize the partitions depending on the space available on your SD Card. However, we do urge you preserve this layout. You can use Apps such as &lt;code&amp;gt;Disk Utility&amp;lt;/code&amp;gt;, &lt;code&amp;gt;fdisk&amp;lt;/code&amp;gt;, &lt;code&amp;gt;parted&amp;lt;/code&amp;gt; and &lt;code&amp;gt;mkfs&amp;lt;/code&amp;gt; to manipulate the partition layout to fit your needs.


Feel free to resize the partitions depending on the space available on your SD Card. However, we do urge you preserve this layout. You can use Apps such as <code>Disk Utility</code>, <code>fdisk</code>, <code>parted</code> and <code>mkfs</code> to manipulate the partition layout to fit your needs.
==== Boot Partition h4. ====


====Boot Partition h4.====
The boot partition must be a FAT32 partition. The contents of this partition is shipped in the file &lt;code&amp;gt;rasp-pi-kernel-3.1-partition.tar.bz2&amp;lt;/code&amp;gt;, which is located here,


The boot partition must be a FAT32 partition. The contents of this partition is shipped in the file <code>rasp-pi-kernel-3.1-partition.tar.bz2</code>, which is located here,
<code><br />qtonpi-0.2<br />├── platform-sdk<br />│ ├── image-creator-binaries<br />│ │ ├── rasp-pi-kernel-3.1-modules.tar.bz2<br /></code>


So, to build your boot partition, all you need to do is to extract the contents of this file onto that partition.
So, to build your boot partition, all you need to do is to extract the contents of this file onto that partition.


Assuming your boot partition is mounted at <code>/media/boot</code>, you could do something like,
Assuming your boot partition is mounted at &lt;code&amp;gt;/media/boot&amp;lt;/code&amp;gt;, you could do something like,
 
<code><br />$ cd /media/boot<br />$ sudo tar jxvf /home/rajiv/qtonpi-0.2/platform-sdk/image-creator-binaries/rasp-pi-kernel-3.1-partition.tar.bz2<br />[sudo] password for rajiv:<br />./<br />./arm224_start.elf<br />./cmdline.txt
 
[…]<br />$<br /></code>


====Root Filesystem h4.====
==== Root Filesystem h4. ====


The root partition must be an Ext4 partition.
The root partition must be an Ext4 partition.


<code>mkrootfs-rasp-pi</code> script present in <code>mt-cross-tools</code> directory can be used to build custom rootfs. This script must be run as <code>root</code> user and it needs a two things.
&lt;code&amp;gt;mkrootfs-rasp-pi&amp;lt;/code&amp;gt; script present in &lt;code&amp;gt;mt-cross-tools&amp;lt;/code&amp;gt; directory can be used to build custom rootfs. This script must be run as &lt;code&amp;gt;root&amp;lt;/code&amp;gt; user and it needs a two things.


# Pointer to directory where you would like your rootfs to be built
# Pointer to directory where you would like your rootfs to be built
# File containing a list of <span class="caps">RPM</span> packages that you would like to be installed in your sysroot
# File containing a list of RPM packages that you would like to be installed in your sysroot
 
Default rootfs packages are provided in the file &lt;code&amp;gt;rasp-pi-rootfs-list.default&amp;lt;/code&amp;gt;
 
<code><br />$ ./mkrootfs-rasp-pi<br />This script must be run as root<br />usage: sudo ./mkrootfs-rasp-pi ROOTFS_DIR RPM_LIST<br /></code>


Default rootfs packages are provided in the file <code>rasp-pi-rootfs-list.default</code>
Now, to build your new rootfs at &lt;code&amp;gt;/tmp/rootfs&amp;lt;/code&amp;gt;,


Now, to build your new rootfs at <code>/tmp/rootfs</code>,
<code><br />$ pwd<br />/home/rajiv/qtonpi-0.2/platform-sdk/mt-cross-tools<br />$ sudo ./mkrootfs-rasp-pi /tmp/rootfs rasp-pi-rootfs-list.default<br />[sudo] password for rajiv:<br />using the following repos:<br /># | Alias | Name | Enabled | Refresh<br />—''———''———————————''———''———<br />1 | f14-arm | ARM RPM Repository for Fedora14 | Yes | No<br />refreshing the repos, this will take awhile (~ 5min)


Your newly minted rootfs is now available at <code>/tmp/rootfs</code>. You can now copy over this directory over to the rootfs partition on the SD Card. Assuming your rootfs partition is mounted at <code>/media/root</code>, you can do the following,
[…]
 
unpacking the etc files<br />unpacking the kernel modules<br />unpacking the gles libs<br />unpacking qt5<br />$ ls /tmp/rootfs<br />./ bin/ dev/ home/ media/ opt/ root/ selinux/ sys/ usr/<br />../ boot/ etc/ lib/ mnt/ proc/ sbin/ srv/ tmp/ var/<br />$<br /></code>
 
Your newly minted rootfs is now available at &lt;code&amp;gt;/tmp/rootfs&amp;lt;/code&amp;gt;. You can now copy over this directory over to the rootfs partition on the SD Card. Assuming your rootfs partition is mounted at &lt;code&amp;gt;/media/root&amp;lt;/code&amp;gt;, you can do the following,
 
<code><br />$ sudo rsync -av /tmp/rootfs/* /media/root/<br />[sudo] password for rajiv:
 
[…]
 
var/tmp/<br />var/yp/
 
sent 503804268 bytes received 250274 bytes 9082063.82 bytes/sec<br />total size is 502887293 speedup is 1.00<br />$ ls /media/root<br />./ bin/ dev/ home/ lost+found/ mnt/ proc/ sbin/ srv/ tmp/ var/<br />../ boot/ etc/ lib/ media/ opt/ root/ selinux/ sys/ usr/<br />$<br /></code>


Your SD card is now ready with custom QtonPi image for use on Raspberry Pi.
Your SD card is now ready with custom QtonPi image for use on Raspberry Pi.


===Updating <code>mt-cross-tools</code> h3.===
=== Updating &lt;code&amp;gt;mt-cross-tools&amp;lt;/code&amp;gt; h3. ===


<code>mt-cross-tools</code> repository which is available on [http://qt.gitorious.org/qtonpi/mt-cross-tools Gitorious] ''[qt.gitorious.org]'' or [http://codereview.qt.io/#admin,project,qtonpi/mt-cross-tools,info Gerrit] ''[codereview.qt.io]''.
&lt;code&amp;gt;mt-cross-tools&amp;lt;/code&amp;gt; repository which is available on &quot;Gitorious&amp;quot;:http://qt.gitorious.org/qtonpi/mt-cross-tools or &quot;Gerrit&amp;quot;:http://codereview.qt.io/#admin,project,qtonpi/mt-cross-tools,info.


'''Note ''' You will need to clone <code>mt-cross-tools</code> into the <code>platform-sdk/</code> subdirectory of your QtonPi release.
'''Note -''' You will need to clone &lt;code&amp;gt;mt-cross-tools&amp;lt;/code&amp;gt; into the &lt;code&amp;gt;platform-sdk/&amp;lt;/code&amp;gt; subdirectory of your QtonPi release.
 
<code><br />$ pwd<br />/home/rajiv/qtonpi-0.2/platform-sdk<br />$ git clone git://gitorious.org/qtonpi/mt-cross-tools.git<br />Cloning into mt-cross-tools…<br />remote: Counting objects: 64, done.<br />remote: Compressing objects: 100% (56/56), done.<br />remote: Total 64 (delta 20), reused 0 (delta 0)<br />Receiving objects: 100% (64/64), 34.68 KiB, done.<br />Resolving deltas: 100% (20/20), done.<br /></code>


After cloning, your relative directory structure should look as follows,
After cloning, your relative directory structure should look as follows,


===Categories:===
<code><br />qtonpi-X.Y/<br />├── platform-sdk/<br />│ └── mt-cross-tools/<br /></code>
 
* [[:Category:QtonPi|QtonPi]]

Revision as of 10:29, 24 February 2015


[toc align_right="yes&quot; depth="2&quot;]

Qt on Pi - Contribute

QtonPi Platform

With QtonPi platform we aim to provide our community with the tools needed to create awesome Qt 5 Apps on Raspberry Pi hardware. We intend to take a minimalistic approach towards what's included in the platform and let our App Developers drive the evolution of the platform with real world App use cases.

QtonPi platform is not intended to be another full fledged Linux distribution. While we plan to use packages and tools from other distributions, our goal really is to provide an easy-to-use flexible innovation environment for Qt and Qt related technologies.

We really welcome your contributions to QtonPi platform.

Following are some general principles on which we hope to build QtonPi platform

  • Full cross-build environment for QtonPi stack
  • No GPLv3 packages
  • Clean separation (to the extent possible without excessive over-engineering) of QtonPi packages and Raspberry Pi specific packages
  • Upstream as much as possible and aim to maintain minimal set of necessary changes in QtonPi project

QtonPi Platform consists of the following,

  • SD Card Image
  • Toolchain and Sysroot
  • Qt Creator based App SDK
  • Cross-build tools

QtonPi Roadmap

QtonPi software stack can be broken down into three layers. These layers exits so that folks in the QtonPi community can organize themselves in areas that they're most passionate about. The layers are,

  1. Base Layer
  2. Middleware
  3. Apps

Base Layer

Base Layer essentially consists of everything above the hardware providing all the enablers to run our middleware. This includes - boot loader, codecs, kernel, root filesystem, RPM packages, compiler, build environment, etc.,

Middleware

Our middleware consists of Qt 5 (plus additional optional modules where it makes sense) and a Qt Creator based QtonPi SDK for App Creation along with all the community documentation we can put together.

That's it! Nothing more, nothing less.

The programming models that we will support would be,

  • Qt C++
  • JavaScript

For UI, you can use,

  • QML (or)
  • HTML (though QtWebKit)

Apps

Interesting Apps is something that we hope our community will create, so that we can build a better Middleware and Base Layer.

We might have scenarios where we might not be able to provide all the APIs needed for folks trying to do some really cool Apps with QtonPi.

We should however make it easy both at the Base Layer and Middleware for folks to be able to add their own APIs where necessary and provide all the freedom for App Developers innovate.

Releases

QtonPi is a community project. Following is a general direction on where we would like to go.

Release-0

  • Base Layer
    • Fedora RPM Packages plus some additional Raspberry Pi Specific packages
    • Linaro GCC 4.5.4 toolchain
    • QtonPi image creator and sysroot tools
  • Middleware
    • Documentation on how to get toolchain + sysroot + Qt Creator working to Develop Apps
    • Qt 5 running on full-screen EGLFS mode

Release-1

Target - Spring 2012

  • Base Layer
    • OpenSuse QtonPi Packages (without GPLv3 packages)
    • Build Envrionment
    • Updated Compiler (GCC 4.6)
    • QtProcessManager
    • QtJsonDB (App Development)
  • Middleware
    • QtonPi SDK delivered as an installer with integrated toolchain + community documentation
    • Auto configuration/discovery of Raspberry Pis from QtonPi SDK
    • Qt 5 running on Full Screen EGLFS mode

Release-2

Target - Summer 2012

  • Base Layer
    • Migrate to a kernel version that supports CMA
    • Update or add packages to support Multimedia and Multi-process Qt/Qt Quick Apps
    • Provide an example compositor environment based on qt-compositor and process manager
  • Middleware
    • Update QtonPi SDK to include the release version of Qt 5
    • Improve community documentation

QtonPi Image Creator and Sysroot

QtonPi releases comes with a default SD Card Image and Sysroot. Following instructions are for you to be able to build your custom SD Card Image and Sysroot.

Download and Installation Requirements

In order to build your custom QtonPi SD Card Image/Sysroot, you'll need Fedora 14 (as it is the distro most contributors are working on). We hope in subsequent release we can take this dependency away.

Setting up Fedora 14

First please ensure that you've all the necessary development tools on your host. You can do this by installing the <code&gt;Development Tools&lt;/code&gt; meta-package.

<br />$ sudo yum groupinstall 'Development Tools'<br />

Once this is done, next step would be to install <code&gt;augeas-libs&lt;/code&gt;, which is needed to install <code&gt;zypper&lt;/code&gt; package.

<br />$ sudo yum install augeas-libs<br />

Installing <code&gt;host-rpms&lt;/code&gt;

You will find <code&gt;host-rpms&lt;/code&gt; in the following directory.

<br />qtonpi-X.Y/<br />├── platform-sdk/<br /> ├── host-rpms/<br />

To install, just go into that directory and do an <code&gt;sudo rpm -ivh * </code&gt;

<br />$ pwd<br />/home/rajiv/qtonpi-0.2/platform-sdk/host-rpms<br />$ sudo rpm -ivh *rpm<br />

Getting Image Creator and Sysroot scripts

Image Creator and Sysroot tools are shipped as a part of the QtonPi software release in the <code&gt;mt-cross-tools&lt;/code&gt; directory which you should find here,

<br />qtonpi-X.Y/<br />├── platform-sdk/<br /> └── mt-cross-tools/<br />

Creating custom Sysroot

<code&gt;mksysroot-rasp-pi&lt;/code&gt; script present in <code&gt;mt-cross-tools&lt;/code&gt; directory can be used to build custom sysroot. This script must be run as <code&gt;root&lt;/code&gt; user and it needs a file containing a list of RPM packages that you would like to be installed in your sysroot. Default sysroot packages are provided in the file <code&gt;rasp-pi-sysroot-list.default&lt;/code&gt;.

<br />$ ./mksysroot-rasp-pi<br />This script must be run as root<br />usage: sudo ./mksysroot-rasp-pi RPM_LIST<br />

Note - <code&gt;mksysroot-rasp-pi&lt;/code&gt; generates the sysroot at <code&gt;/opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root&lt;/code&gt;. Please make sure that this directory does not exist before running the script.

<br />$ pwd<br />/home/rajiv/qtonpi-0.2/platform-sdk/mt-cross-tools<br />$ sudo ./mksysroot-rasp-pi rasp-pi-sysroot-list.default<br />[sudo] password for rajiv:<br />./<br />./zypp/<br />./zypp/zypp.conf<br />./zypp/systemCheck<br />./zypp/zypper.conf<br />./zypp/repos.d/<br />./zypp/repos.d/f14.repo<br />using the following repos:<br /># | Alias | Name | Enabled | Refresh<br />—''———''———————————''———''———<br />1 | f14-arm | ARM RPM Repository for Fedora14 | Yes | No<br />refreshing the repos, this will take awhile (~ 5min)

[]

$ ls /opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root<br />./ bin/ dev/ home/ media/ opt/ root/ selinux/ sys/ usr/<br />../ boot/ etc/ lib/ mnt/ proc/ sbin/ srv/ tmp/ var/<br />$<br />

Your newly minted sysroot is now available at <code&gt;/opt/qtonpi/armv5tel-qtonpi-linux-gnueabi/sys-root&lt;/code&gt;

Creating custom SD Card Image h3.

Partition Layout h4.

For QtonPi Release 0.x, we've organized the SD Card as follows. Assuming your SD Card is on <code&gt;/dev/sdb&lt;/code&gt; device.

<br /># fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 1977 MB, 1977614336 bytes<br />61 heads, 62 sectors/track, 1021 cylinders, total 3862528 sectors<br />Units = sectors of 1 * 512 = 512 bytes<br />Sector size (logical/physical): 512 bytes / 512 bytes<br />I/O size (minimum/optimal): 512 bytes / 512 bytes<br />Disk identifier: 0x0000cded

Device Boot Start End Blocks Id System<br />/dev/sdb1 62 249611 124775 c W95 FAT32 (LBA)<br />/dev/sdb2 249612 2250289 1000339 83 Linux<br />/dev/sdb3 2250290 3248737 499224 82 Linux swap / Solaris

Command (m for help): q

#<br />

All partitions are primary partitions.

  • The first partition is a Fat32 partition which consists of the secondary bootloader, kernel, and other files needed to be initalize the GPU.
  • The second paritition is a Ext4 partition, where the root filesystem resides
  • The third partition is a swap partition that we've thrown in for a good measure. This might be removed in the subsequent releases.

Feel free to resize the partitions depending on the space available on your SD Card. However, we do urge you preserve this layout. You can use Apps such as <code&gt;Disk Utility&lt;/code&gt;, <code&gt;fdisk&lt;/code&gt;, <code&gt;parted&lt;/code&gt; and <code&gt;mkfs&lt;/code&gt; to manipulate the partition layout to fit your needs.

Boot Partition h4.

The boot partition must be a FAT32 partition. The contents of this partition is shipped in the file <code&gt;rasp-pi-kernel-3.1-partition.tar.bz2&lt;/code&gt;, which is located here,

<br />qtonpi-0.2<br />├── platform-sdk<br /> ├── image-creator-binaries<br />  ├── rasp-pi-kernel-3.1-modules.tar.bz2<br />

So, to build your boot partition, all you need to do is to extract the contents of this file onto that partition.

Assuming your boot partition is mounted at <code&gt;/media/boot&lt;/code&gt;, you could do something like,

<br />$ cd /media/boot<br />$ sudo tar jxvf /home/rajiv/qtonpi-0.2/platform-sdk/image-creator-binaries/rasp-pi-kernel-3.1-partition.tar.bz2<br />[sudo] password for rajiv:<br />./<br />./arm224_start.elf<br />./cmdline.txt

[]<br />$<br />

Root Filesystem h4.

The root partition must be an Ext4 partition.

<code&gt;mkrootfs-rasp-pi&lt;/code&gt; script present in <code&gt;mt-cross-tools&lt;/code&gt; directory can be used to build custom rootfs. This script must be run as <code&gt;root&lt;/code&gt; user and it needs a two things.

  1. Pointer to directory where you would like your rootfs to be built
  2. File containing a list of RPM packages that you would like to be installed in your sysroot

Default rootfs packages are provided in the file <code&gt;rasp-pi-rootfs-list.default&lt;/code&gt;

<br />$ ./mkrootfs-rasp-pi<br />This script must be run as root<br />usage: sudo ./mkrootfs-rasp-pi ROOTFS_DIR RPM_LIST<br />

Now, to build your new rootfs at <code&gt;/tmp/rootfs&lt;/code&gt;,

<br />$ pwd<br />/home/rajiv/qtonpi-0.2/platform-sdk/mt-cross-tools<br />$ sudo ./mkrootfs-rasp-pi /tmp/rootfs rasp-pi-rootfs-list.default<br />[sudo] password for rajiv:<br />using the following repos:<br /># | Alias | Name | Enabled | Refresh<br />—''———''———————————''———''———<br />1 | f14-arm | ARM RPM Repository for Fedora14 | Yes | No<br />refreshing the repos, this will take awhile (~ 5min)

[]

unpacking the etc files<br />unpacking the kernel modules<br />unpacking the gles libs<br />unpacking qt5<br />$ ls /tmp/rootfs<br />./ bin/ dev/ home/ media/ opt/ root/ selinux/ sys/ usr/<br />../ boot/ etc/ lib/ mnt/ proc/ sbin/ srv/ tmp/ var/<br />$<br />

Your newly minted rootfs is now available at <code&gt;/tmp/rootfs&lt;/code&gt;. You can now copy over this directory over to the rootfs partition on the SD Card. Assuming your rootfs partition is mounted at <code&gt;/media/root&lt;/code&gt;, you can do the following,

<br />$ sudo rsync -av /tmp/rootfs/* /media/root/<br />[sudo] password for rajiv:

[…]

var/tmp/<br />var/yp/

sent 503804268 bytes received 250274 bytes 9082063.82 bytes/sec<br />total size is 502887293 speedup is 1.00<br />$ ls /media/root<br />./ bin/ dev/ home/ lost+found/ mnt/ proc/ sbin/ srv/ tmp/ var/<br />../ boot/ etc/ lib/ media/ opt/ root/ selinux/ sys/ usr/<br />$<br />

Your SD card is now ready with custom QtonPi image for use on Raspberry Pi.

Updating <code&gt;mt-cross-tools&lt;/code&gt; h3.

<code&gt;mt-cross-tools&lt;/code&gt; repository which is available on "Gitorious&quot;:http://qt.gitorious.org/qtonpi/mt-cross-tools or "Gerrit&quot;:http://codereview.qt.io/#admin,project,qtonpi/mt-cross-tools,info.

Note - You will need to clone <code&gt;mt-cross-tools&lt;/code&gt; into the <code&gt;platform-sdk/&lt;/code&gt; subdirectory of your QtonPi release.

<br />$ pwd<br />/home/rajiv/qtonpi-0.2/platform-sdk<br />$ git clone git://gitorious.org/qtonpi/mt-cross-tools.git<br />Cloning into mt-cross-tools…<br />remote: Counting objects: 64, done.<br />remote: Compressing objects: 100% (56/56), done.<br />remote: Total 64 (delta 20), reused 0 (delta 0)<br />Receiving objects: 100% (64/64), 34.68 KiB, done.<br />Resolving deltas: 100% (20/20), done.<br />

After cloning, your relative directory structure should look as follows,

<br />qtonpi-X.Y/<br />├── platform-sdk/<br /> └── mt-cross-tools/<br />