Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Qt-RaspberryPiBavery: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
==Poorly Worded and Poorly Thought Out Instructions==
h2. Poorly Worded and Poorly Thought Out Instructions


This has only been tested on a Fedora Core 14 host.<br /> It should work from a Fedora Core 14 chroot on an Ubuntu host.
This has only been tested on a Fedora Core 14 host.<br />It should work from a Fedora Core 14 chroot on an Ubuntu host.


If you are on a large shared machine, you may want to make a fedora chroot first so you don’t conflict with your neighbors. There is a mkFedoraChroot script and readme to do this.
If you are on a large shared machine, you may want to make a fedora chroot first so you don't conflict with your neighbors. There is a mkFedoraChroot script and readme to do this.


0) git clone ssh://leda.nrcc.noklab.com/git/mt-cross-tools
0) git clone ssh://leda.nrcc.noklab.com/git/mt-cross-tools


1. Make sure that ~/bin is in your path. Links to the <br />
1. Make sure that <sub>/bin is in your path. Links to the<br /><code><br />appropriate binaries and shell scripts will be placed in</sub>/bin.<br />In Fedora, this usually happens in your <sub>/.bash_profile script<br /></code>
<br />2. Install the core developer tools and links
<br /><code>$ {path-to-mt-cross-tools}/home/bin/setupDeveloper.sh {absolute path-to-mt-cross-tools}<code>
<br />3. Install the sysroot in /usr/ARCH-redhat-linux-gnueabi/sys-root
<br /></code><br />$ {path-to-mt-cross-tools}home/bin/setupBaseSYSROOT_armv5tel.sh {absolute path-to-mt-cross-tools}<br /><code>
<br />There are five scripts used for accessing the new sysroot:
<br />1. rpm-armv5tel
<br /> Use as the normal rpm command, but executes in the sysroot. For example,<br /></code><br />$ rpm-armv5tel -qa —&amp;gt; Lists all installed packages<br />$ rpm-armv5tel -i FOO.rpm —&amp;gt; Installs FOO.rpm in the sysroot<br />$ rpm-armv5tel -i FOO.src.rpm —&amp;gt; Installs FOO.src.rpm in the</sub>/rpmbuild-armv5tel/SOURCES dir<br /><code>


2. Install the core developer tools and links
2. rpmbuild-armv5tel<br /></code><br /> Use as the rpmbuild script, but executes in the sysroot. The RPM build<br /> commands execute in <sub>/rpmbuild-armv5tel. For example:<br /><code><br /></code><br />$ rpm-armv5tel -i rsync.src.rpm —&amp;gt; Installs rsync source<br />$ cd</sub>/rpmbuild-armv5tel<br />$ rpmbuild-armv5tel -ba SOURCES/rsync-3.0.8/rsync.spec —&amp;gt; Build rsync<br /><code><br /></code><br /> The results of the rpmbuild will be in <sub>/rpmbuild-armv5tel/RPMS &amp; SRPMS<br /><code>
<br />3. zypper-armv5tel<br /></code><br /> The zypper tool is used for package management in the sysroot. It is<br /> configured to pull from the mt-fedora.nrcc.noklab.com repositories.<br /><code><br /></code><br />$ zypper-armv5tel packages —&amp;gt; List available packages<br />$ zypper-armv5tel repos —&amp;gt; List current repositories<br />$ zypper-armv5tel refresh —&amp;gt; Updates the metadata, not done til you ask it to<br />$ zypper-armv5tel install rsync —&amp;gt; Install a package<br /><code>
<br />4. zypper-download-armv5tel<br /></code><br /> [[Image:|Image:]][[Image:|Image:]]<br /> currently the -s option is broken for the nrcc srpm repos. It '''does''' download the source to /usr/armv5tel-redhat-linux-gnueabi/sys-root/var/cache/zypp/packages/&amp;lt;reponame&amp;gt; but the way it is figuring out how to copy them locally is broken. you can get it by hand from there at the moment. We are working on this. (We arent doing the obvious workaround as this implies some kinda metadata problem in the repos and we are looking for it<br /> [[Image:|Image:]][[Image:|Image:]]<br /><code><br /> The zypper-download script downloads RPM and SRPM packages from the<br /> sysroot repositories and copies them to your current directory. This<br /> script is a convenience to make it easy to grab the binary and source<br /> RPM files.<br /></code><br />$ zypper-download-armv5tel rsync —&amp;gt; Download the current rsync RPM<br />$ zypper-download-armv5tel -s rsync —&amp;gt; Download the rsync SRPM<br />$ zypper-download -s rsync —&amp;gt; Download the SRPM for rsync on<br /><code> your main machine.
<br />5. zypper-build-dep-armv5tel<br /></code><br /> The zypper-build-dep script downloads and installs RPM build dependencies into the<br /> sysroot. It takes a list of spec files as arguments.<br /><code><br /></code><br />$ zypper-build-dep-armv5tel rsync —&amp;gt; asks for confirmation to install the dependencies<br />$ zypper-download-armv5tel -n rsync —&amp;gt; installs the dependencies, no questions asked<br /><code>
<br />As an example, let's download and build the source code for rsync.
<br />First, we grab the source code:<br /></code><br />$ zypper-download-armv5tel -s rsync<br /><code>
<br />Next, we install the source code in the sysroot:<br /></code><br />$ rpm-armv5tel -i rsync-3.0.8-1.fc14.src.rpm<br /><code><br />The code is now in the rpmbuild-armv5tel directory.<br />We try to build it.<br /></code><br />$ cd</sub>/rpmbuild-armv5tel/SOURCES<br />$ rpmbuild-armv5tel -ba rsync-3.0.8/rsync.spec<br /><code>


3. Install the sysroot in /usr/ARCH-redhat-linux-gnueabi/sys-root
The build fails because we're missing some dependencies. We use zypper-build-dep<br />to pull those dependencies in and install them.<br /></code><br />$ zypper-build-dep-armv5tel -n rsync-3.0.8/rsync.spec<br /><code><br />Now the build should work:<br /></code><br />$ rpmbuild-armv5tel -ba rsync-3.0.8/rsync.spec<br /><code><br />And the results are in ~/rpmbuild-armv5tel/RPMS and SRPMS.


There are five scripts used for accessing the new sysroot:
Directories:
 
1. rpm-armv5tel
 
Use as the normal rpm command, but executes in the sysroot. For example,
 
2. rpmbuild-armv5tel<br />
 
3. zypper-armv5tel<br />
 
4. zypper-download-armv5tel <br /> The zypper-download script downloads <span class="caps">RPM</span> and <span class="caps">SRPM</span> packages from the sysroot repositories and copies them to your current directory. This script is a convenience to make it easy to grab the binary and source <span class="caps">RPM</span> files.<br />


5. zypper-build-dep-armv5tel<br />
</code><br />home/ Things that go in your home directory<br /> .rpm/ Macros used by our modified rpm commands to set the architecture correctly<br /> .rpmmacros Sets basic rpm directories to use for building


As an example, let’s download and build the source code for rsync.
bin/ Various build scripts and setup scripts.<br /><code>


First, we grab the source code:<br />
</code><br />sysroot/<br /> etc/<br /> zypp/ Zypper configuration scripts used in the sysroots.
 
Next, we install the source code in the sysroot:<br /> The code is now in the rpmbuild-armv5tel directory.<br /> We try to build it.<br />
 
The build fails because we’re missing some dependencies. We use zypper-build-dep<br /> to pull those dependencies in and install them.<br /> Now the build should work:<br /> And the results are in ~/rpmbuild-armv5tel/RPMS and <span class="caps">SRPMS</span>.
 
Directories:

Revision as of 06:24, 24 February 2015

h2. Poorly Worded and Poorly Thought Out Instructions

This has only been tested on a Fedora Core 14 host.
It should work from a Fedora Core 14 chroot on an Ubuntu host.

If you are on a large shared machine, you may want to make a fedora chroot first so you don't conflict with your neighbors. There is a mkFedoraChroot script and readme to do this.

0) git clone ssh://leda.nrcc.noklab.com/git/mt-cross-tools

1. Make sure that

/bin is in your path. Links to the
<br />appropriate binaries and shell scripts will be placed in</sub>/bin.<br />In Fedora, this usually happens in your <sub>/.bash_profile script<br />


2. Install the core developer tools and links


$ {path-to-mt-cross-tools}/home/bin/setupDeveloper.sh {absolute path-to-mt-cross-tools}<code>
<br />3. Install the sysroot in /usr/ARCH-redhat-linux-gnueabi/sys-root
<br />

$ {path-to-mt-cross-tools}home/bin/setupBaseSYSROOT_armv5tel.sh {absolute path-to-mt-cross-tools}
<br />There are five scripts used for accessing the new sysroot:
<br />1. rpm-armv5tel
<br /> Use as the normal rpm command, but executes in the sysroot. For example,<br />

$ rpm-armv5tel -qa —&gt; Lists all installed packages
$ rpm-armv5tel -i FOO.rpm —&gt; Installs FOO.rpm in the sysroot
$ rpm-armv5tel -i FOO.src.rpm —&gt; Installs FOO.src.rpm in the

/rpmbuild-armv5tel/SOURCES dir

2. rpmbuild-armv5tel<br />


Use as the rpmbuild script, but executes in the sysroot. The RPM build
commands execute in

/rpmbuild-armv5tel. For example:
<br />

$ rpm-armv5tel -i rsync.src.rpm —&gt; Installs rsync source
$ cd

/rpmbuild-armv5tel
$ rpmbuild-armv5tel -ba SOURCES/rsync-3.0.8/rsync.spec —&gt; Build rsync

<br />


The results of the rpmbuild will be in

/rpmbuild-armv5tel/RPMS & SRPMS
<br />3. zypper-armv5tel<br />

The zypper tool is used for package management in the sysroot. It is
configured to pull from the mt-fedora.nrcc.noklab.com repositories.
<br />

$ zypper-armv5tel packages —&gt; List available packages
$ zypper-armv5tel repos —&gt; List current repositories
$ zypper-armv5tel refresh —&gt; Updates the metadata, not done til you ask it to
$ zypper-armv5tel install rsync —&gt; Install a package
<br />4. zypper-download-armv5tel<br />

[[Image:|Image:]][[Image:|Image:]]
currently the -s option is broken for the nrcc srpm repos. It does download the source to /usr/armv5tel-redhat-linux-gnueabi/sys-root/var/cache/zypp/packages/&lt;reponame&gt; but the way it is figuring out how to copy them locally is broken. you can get it by hand from there at the moment. We are working on this. (We arent doing the obvious workaround as this implies some kinda metadata problem in the repos and we are looking for it
[[Image:|Image:]][[Image:|Image:]]
<br /> The zypper-download script downloads RPM and SRPM packages from the<br /> sysroot repositories and copies them to your current directory. This<br /> script is a convenience to make it easy to grab the binary and source<br /> RPM files.<br />

$ zypper-download-armv5tel rsync —&gt; Download the current rsync RPM
$ zypper-download-armv5tel -s rsync —&gt; Download the rsync SRPM
$ zypper-download -s rsync —&gt; Download the SRPM for rsync on
 your main machine.
<br />5. zypper-build-dep-armv5tel<br />

The zypper-build-dep script downloads and installs RPM build dependencies into the
sysroot. It takes a list of spec files as arguments.
<br />

$ zypper-build-dep-armv5tel rsync —&gt; asks for confirmation to install the dependencies
$ zypper-download-armv5tel -n rsync —&gt; installs the dependencies, no questions asked
<br />As an example, let's download and build the source code for rsync.
<br />First, we grab the source code:<br />

$ zypper-download-armv5tel -s rsync
<br />Next, we install the source code in the sysroot:<br />

$ rpm-armv5tel -i rsync-3.0.8-1.fc14.src.rpm
<br />The code is now in the rpmbuild-armv5tel directory.<br />We try to build it.<br />

$ cd

/rpmbuild-armv5tel/SOURCES
$ rpmbuild-armv5tel -ba rsync-3.0.8/rsync.spec

The build fails because we're missing some dependencies. We use zypper-build-dep<br />to pull those dependencies in and install them.<br />


$ zypper-build-dep-armv5tel -n rsync-3.0.8/rsync.spec

<br />Now the build should work:<br />


$ rpmbuild-armv5tel -ba rsync-3.0.8/rsync.spec

<br />And the results are in ~/rpmbuild-armv5tel/RPMS and SRPMS.

Directories:


home/ Things that go in your home directory
.rpm/ Macros used by our modified rpm commands to set the architecture correctly
.rpmmacros Sets basic rpm directories to use for building bin/ Various build scripts and setup scripts.


sysroot/
etc/
zypp/ Zypper configuration scripts used in the sysroots.