Qt-RaspberryPiBavery: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
(Decode HTML entity names)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Poorly Worded and Poorly Thought Out Instructions==
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}


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.
== 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.
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 ~/bin is in your path. Links to the
<code>
appropriate binaries and shell scripts will be placed in~/bin.
In Fedora, this usually happens in your ~/.bash_profile script
</code>


2. Install the core developer tools and links
2. Install the core developer tools and links
<code>$ {path-to-mt-cross-tools}/home/bin/setupDeveloper.sh {absolute path-to-mt-cross-tools}<code>


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


There are five scripts used for accessing the new sysroot:
There are five scripts used for accessing the new sysroot:
Line 17: Line 29:
1. rpm-armv5tel
1. rpm-armv5tel


Use as the normal rpm command, but executes in the sysroot. For example,
Use as the normal rpm command, but executes in the sysroot. For example,
</code>
$ rpm-armv5tel -qa —> Lists all installed packages
$ rpm-armv5tel -i FOO.rpm —> Installs FOO.rpm in the sysroot
$ rpm-armv5tel -i FOO.src.rpm —> Installs FOO.src.rpm in the~/rpmbuild-armv5tel/SOURCES dir
<code>


2. rpmbuild-armv5tel<br />
2. rpmbuild-armv5tel
</code>
Use as the rpmbuild script, but executes in the sysroot. The RPM build
commands execute in ~/rpmbuild-armv5tel. For example:
<code>
</code>
$ rpm-armv5tel -i rsync.src.rpm —> Installs rsync source
$ cd~/rpmbuild-armv5tel
$ rpmbuild-armv5tel -ba SOURCES/rsync-3.0.8/rsync.spec —> Build rsync
<code>
</code>
The results of the rpmbuild will be in ~/rpmbuild-armv5tel/RPMS & SRPMS
<code>


3. zypper-armv5tel<br />
3. zypper-armv5tel
</code>
The zypper tool is used for package management in the sysroot. It is
configured to pull from the mt-fedora.nrcc.noklab.com repositories.
<code>
</code>
$ zypper-armv5tel packages —> List available packages
$ zypper-armv5tel repos —> List current repositories
$ zypper-armv5tel refresh —> Updates the metadata, not done til you ask it to
$ zypper-armv5tel install rsync —> Install a package
<code>


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 />
4. zypper-download-armv5tel
</code>
[[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/<reponame> 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:]]
<code>
The zypper-download script downloads RPM and SRPM 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
RPM files.
</code>
$ zypper-download-armv5tel rsync —> Download the current rsync RPM
$ zypper-download-armv5tel -s rsync —> Download the rsync SRPM
$ zypper-download -s rsync —> Download the SRPM for rsync on
<code> your main machine.


5. zypper-build-dep-armv5tel<br />
5. zypper-build-dep-armv5tel
</code>
The zypper-build-dep script downloads and installs RPM build dependencies into the
sysroot. It takes a list of spec files as arguments.
<code>
</code>
$ zypper-build-dep-armv5tel rsync —> asks for confirmation to install the dependencies
$ zypper-download-armv5tel -n rsync —> installs the dependencies, no questions asked
<code>


As an example, let’s download and build the source code for rsync.
As an example, let's download and build the source code for rsync.


First, we grab the source code:<br />
First, we grab the source code:
</code>
$ zypper-download-armv5tel -s rsync
<code>


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 />
Next, we install the source code in the sysroot:
</code>
$ rpm-armv5tel -i rsync-3.0.8-1.fc14.src.rpm
<code>
The code is now in the rpmbuild-armv5tel directory.
We try to build it.
</code>
$ cd~/rpmbuild-armv5tel/SOURCES
$ rpmbuild-armv5tel -ba rsync-3.0.8/rsync.spec
<code>


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>.
The build fails because we're missing some dependencies. We use zypper-build-dep
to pull those dependencies in and install them.
</code>
$ zypper-build-dep-armv5tel -n rsync-3.0.8/rsync.spec
<code>
Now the build should work:
</code>
$ rpmbuild-armv5tel -ba rsync-3.0.8/rsync.spec
<code>
And the results are in ~/rpmbuild-armv5tel/RPMS and SRPMS.


Directories:
Directories:
</code>
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.
<code>
</code>
sysroot/
etc/
zypp/ Zypper configuration scripts used in the sysroots.

Latest revision as of 17:42, 12 March 2015

This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

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

appropriate binaries and shell scripts will be placed in~/bin.
In Fedora, this usually happens in your ~/.bash_profile script

2. Install the core developer tools and links

$ {path-to-mt-cross-tools}/home/bin/setupDeveloper.sh {absolute path-to-mt-cross-tools}<code>

3. Install the sysroot in /usr/ARCH-redhat-linux-gnueabi/sys-root

$ {path-to-mt-cross-tools}home/bin/setupBaseSYSROOT_armv5tel.sh {absolute path-to-mt-cross-tools}

There are five scripts used for accessing the new sysroot:

1. rpm-armv5tel

 Use as the normal rpm command, but executes in the sysroot. For example,

$ rpm-armv5tel -qa —> Lists all installed packages $ rpm-armv5tel -i FOO.rpm —> Installs FOO.rpm in the sysroot $ rpm-armv5tel -i FOO.src.rpm —> Installs FOO.src.rpm in the~/rpmbuild-armv5tel/SOURCES dir

2. rpmbuild-armv5tel
Use as the rpmbuild script, but executes in the sysroot. The RPM build
commands execute in ~/rpmbuild-armv5tel. For example:

$ rpm-armv5tel -i rsync.src.rpm —> Installs rsync source $ cd~/rpmbuild-armv5tel $ rpmbuild-armv5tel -ba SOURCES/rsync-3.0.8/rsync.spec —> Build rsync

The results of the rpmbuild will be in ~/rpmbuild-armv5tel/RPMS & SRPMS
3. zypper-armv5tel
The zypper tool is used for package management in the sysroot. It is
configured to pull from the mt-fedora.nrcc.noklab.com repositories.

$ zypper-armv5tel packages —> List available packages $ zypper-armv5tel repos —> List current repositories $ zypper-armv5tel refresh —> Updates the metadata, not done til you ask it to $ zypper-armv5tel install rsync —> Install a package

4. zypper-download-armv5tel
[[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/<reponame> 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:]]
 The zypper-download script downloads RPM and SRPM 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
 RPM files.

$ zypper-download-armv5tel rsync —> Download the current rsync RPM $ zypper-download-armv5tel -s rsync —> Download the rsync SRPM $ zypper-download -s rsync —> Download the SRPM for rsync on

 your main machine.

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

$ zypper-build-dep-armv5tel rsync —> asks for confirmation to install the dependencies $ zypper-download-armv5tel -n rsync —> installs the dependencies, no questions asked

As an example, let's download and build the source code for rsync.

First, we grab the source code:

$ zypper-download-armv5tel -s rsync

Next, we install the source code in the sysroot:

$ rpm-armv5tel -i rsync-3.0.8-1.fc14.src.rpm

The code is now in the rpmbuild-armv5tel directory.
We try to build it.

$ 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
to pull those dependencies in and install them.

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

Now the build should work:

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

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.