Qt-RaspberryPiBavery: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
h2. 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.
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.
Line 7: Line 8:
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 /><code><br />appropriate binaries and shell scripts will be placed in~/bin.<br />In Fedora, this usually happens in your ~/.bash_profile script<br /></code>
1. Make sure that ~/bin is in your path. Links to the
<br />2. Install the core developer tools and links
<code>
<br /><code>$ {path-to-mt-cross-tools}/home/bin/setupDeveloper.sh {absolute path-to-mt-cross-tools}<code>
appropriate binaries and shell scripts will be placed in~/bin.
<br />3. Install the sysroot in /usr/ARCH-redhat-linux-gnueabi/sys-root
In Fedora, this usually happens in your ~/.bash_profile script
<br /></code><br />$ {path-to-mt-cross-tools}home/bin/setupBaseSYSROOT_armv5tel.sh {absolute path-to-mt-cross-tools}<br /><code>
</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 —> Lists all installed packages<br />$ rpm-armv5tel -i FOO.rpm —> Installs FOO.rpm in the sysroot<br />$ rpm-armv5tel -i FOO.src.rpm —> Installs FOO.src.rpm in the~/rpmbuild-armv5tel/SOURCES dir<br /><code>


2. rpmbuild-armv5tel<br /></code><br /> Use as the rpmbuild script, but executes in the sysroot. The RPM build<br /> commands execute in ~/rpmbuild-armv5tel. For example:<br /><code><br /></code><br />$ rpm-armv5tel -i rsync.src.rpm —> Installs rsync source<br />$ cd~/rpmbuild-armv5tel<br />$ rpmbuild-armv5tel -ba SOURCES/rsync-3.0.8/rsync.spec —> Build rsync<br /><code><br /></code><br /> The results of the rpmbuild will be in ~/rpmbuild-armv5tel/RPMS &amp; SRPMS<br /><code>
2. Install the core developer tools and links
<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 —> List available packages<br />$ zypper-armv5tel repos —> List current repositories<br />$ zypper-armv5tel refresh —> Updates the metadata, not done til you ask it to<br />$ zypper-armv5tel install rsync —> 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/<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<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 —> Download the current rsync RPM<br />$ zypper-download-armv5tel -s rsync —> Download the rsync SRPM<br />$ zypper-download -s rsync —> 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 —> asks for confirmation to install the dependencies<br />$ zypper-download-armv5tel -n rsync —> 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~/rpmbuild-armv5tel/SOURCES<br />$ rpmbuild-armv5tel -ba rsync-3.0.8/rsync.spec<br /><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 /></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.
<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
 
</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:
 
1. rpm-armv5tel
 
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
</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 &amp; SRPMS
<code>
 
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
</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
</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.
 
First, we grab the source code:
</code>
$ zypper-download-armv5tel -s rsync
<code>
 
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
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><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
</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.<br /><code>
bin/ Various build scripts and setup scripts.
<code>


</code><br />sysroot/<br /> etc/<br /> zypp/ Zypper configuration scripts used in the sysroots.
</code>
sysroot/
etc/
zypp/ Zypper configuration scripts used in the sysroots.

Revision as of 12:16, 25 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

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.