Qt-RaspberryPiBavery: Difference between revisions

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


== Poorly Worded and Poorly Thought Out Instructions ==
This has only been tested on a Fedora Core 14 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.
It should work from a Fedora Core 14 chroot on an Ubuntu host.
Line 46: Line 47:
<code>
<code>
</code>
</code>
  The results of the rpmbuild will be in ~/rpmbuild-armv5tel/RPMS &amp; SRPMS
  The results of the rpmbuild will be in ~/rpmbuild-armv5tel/RPMS & SRPMS
<code>
<code>



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.