About tsrpm
tsrpm is a cross-development environment that makes it easy to port source code distributed in the RPM Package Manager (RPM) format to new architectures and targets. The tsrpm cross-development environment is layered on top of RPM package manipulation and build tools. Besides being cross-development aware, tsrpm also provides several useful utilities for simplifying common tasks encountered in the process of building and maintaining an RPM-based distribution for an embedded Linux target.
For more information about RPM, refer to the RPM Package Manager site, http://www.rpm.org.
Advantages of tsrpm
There are several open source projects that simplify Linux cross-development. The notable ones are as follows:
- The crosstool project, led by Dan Kegel – http://kegel.com/crosstool/ – The crosstool project primarily addresses needs related to building new toolchains for a non-x86 target.
- The uclibc buildroot project – http://buildroot.uclibc.org – The uclibc buildroot project mainly focuses on building uclibc toolchains and busybox root filesystems.
- The scratchbox project – http://www.scratchbox.org – The scratchbox project attempts to provide a set of tools for building a full Linux distribution, but relies either on the availability of an actual target or on an emulator (QEMU) for executing cross-compiled binaries during a build.
Each of these projects addresses a real need in the Linux development community. However, both the crosstool and the buildroot projects solve only part of the problem. Although the scratchbox project attempts to solve the full distribution build problem, its reliance on a target or an emulation makes it difficult to scale across large development teams and makes it somewhat unsuitable for production builds, since the builds will probably run slowly.
In contrast, tsrpm provides an environment that enables building multiple different types of toolchains and full distribution build support, performs all builds natively on either Windows or Linux hosts, and provides additional tools for constructing ready-to-deploy root file systems for embedded targets.
The power of tsrpm is derived from its ability to cross-compile packages without requiring patches to the package sources. The following is a short list of cross-compilation problems that tsrpm can successfully handle without requiring package source or build script/makefile changes:
- Many configure scripts are cross-compile unaware.
- Packages often use incorrect headers and libraries, leading to problems that are difficult to troubleshoot.
- Normal package builds often fail to detect incomplete build environments without giving hints about how the build failed, or without providing clues about how to assemble a more complete environment.
- Many packages assume that the build is performed natively and as root, leading to tests and access of devices, expectation of particular user IDs, and read/write privileges in /proc and other areas of the file system.
- Sometimes hard coded tool names and paths need to be mapped to the correct cross-tools.
- Some packages attempt to execute code during the build process.
Downloading and Installing tsrpm
To download and install tsrpm:
- Click on the Repository link in your My Subscriptions box in the left column of any LinuxLink web site page.
- In the Repository, click on the Developer Tools tab.
- If you are installing tsrpm on Cygwin/Windows:
- Click on TimeSys Cross Development Tools for Cygwin Hosts.
- Download tsrpm.<version>.cygwin.rpm.
- On a command line, give the following command:
rpm -i --nodeps tsrpm.<version>.cygwin.rpm
- If you are installing tsrpm on Linux:
- Click onTimeSys Cross Development Tools for Linux Hosts.
- Download tsrpm.<version>.i686.rpm.
- On a command line, give the following command:
rpm -i tsrpm.<version>.i686.rpm
- If you are installing tsrpm on Cygwin/Windows:
tsrpm will be installed automatically in /opt/timesys/bin if you elect to install the embedded development utilities when installing a TimeSys reference distribution.
tsrpm can also be found in an unpacked Linux distribution from TimeSys, located in the tarball /TARS/tools-host-linux.tgz or /TARS/tools-host-cygwin.tgz. After you unpack the appropriate file, installation is a simple copy and PATH export:
# cp -r <unpacked directory>/lib/tsrpm /opt/timesys/bin/ # export PATH=/opt/timesys/bin/tsrpm/bin:$PATH: