User: Password:
Subscribe / Log in / New account


T2 SDE 8.0: a universal distribution build kit

July 28, 2010

This article was contributed by Koen Vervloesem

There are not a lot of source-based Linux distributions, so when one of them announces a new release, it's always a good opportunity to take a look. We're not talking about Gentoo Linux or Linux From Scratch now, but about a relatively unknown but nonetheless interesting distribution: T2 SDE. After years of development, the project published a new stable release, version 8.0 ("Phoenix").

Distribution build kit

As the project's home page hastens to stress, T2 SDE (which stands for "System Development Environment") is not just a Linux distribution, it's an open source distribution build kit. At the core of T2 lies an automated build system that manages the whole compilation process from fetching the sources of packages to creating a CD image for a desktop system or a ROM image for embedded use. After initial creation of the tool chain, all packages are built inside a sandbox environment.

When configuring the build system, users can choose from various pre-defined target definitions or create their own target definition. A target handles the selection of packages, C library (Glibc, dietlibc, uClibc), compiler (GCC or LLVM), and so on, and it even supports cross-compilation. Depending on the chosen target, the user can build a Linux distribution for an embedded system, a desktop system or a server. There is even an experimental target to build a T2 system to run on a wireless router (wrt2), but it is not yet fully done. If someone picks up development of this target, the result should be an OpenWRT-like embedded Linux system.

The principal developer of T2 SDE is René Rebe, CTO of the German software development company ExactCODE. They use T2 in commercial embedded systems, industrial computers and appliances. Hence, the real target audience of the distribution are developers of appliances and embedded systems. According to René, ExactCODE's clients are using T2 to power firewall products, greenhouse controllers, IPTVs, and a lot of other embedded devices. But T2 is also used as the base of general-purpose Linux distributions, such as Puppy Linux.

The Phoenix has landed

T2 SDE 8.0 is based on Linux kernel 2.6.34, GCC 4.5, Glibc 2.11 and X.Org 7.5. In total there are around 3200 packages in the repository. Users can download minimal ISO images for i486, x86_64, powerpc and powerpc64 (PowerMac G5) or download the source and build their own ISO image. The advantage of the latter is that it allows you to build an ISO file for another architecture (ARM, Blackfin, MIPS, Sparc and many others are supported) or optimized for a specific processor instruction set, and that other package sets are supported. By the way, these ISO images can be fully cross-compiled, as has been done with the minimal ISO images.

The website has extensive but a little out-of-date documentation, with the T2 Handbook as an excellent in-depth reference, and two short step-by-step guides for the impatient: one for building and one for installing T2.

In short, after checking out the T2 sources with Subversion, the user starts the configuration of the build system as root with the command ./scripts/Config, which shows an ncurses interface. Then the user chooses a target (generic, t2 sde embedded, and so on) and a package selection, as well as distribution media, the CPU architecture and optionally some optimizations. There a lot of advanced configuration options, for example for choosing another C library, compiler, and so on. When the configuration is done, the build is started with a ./scripts/Build-Target command. Multiple targets can be built from the same T2 build system by specifying a configuration file with the -cfg argument. Building T2 is obviously optimally done on a T2 system, but with the right prerequisites it's also possible on other Linux distributions.

Working with T2

T2 is obviously an excellent framework for building embedded Linux systems. But is it also suitable as a desktop system? It depends on what the user is looking for. The target users are not the ones that want to have a completely preconfigured operating system such as Ubuntu. In contrast, T2 is the ultimate do-it-yourself distribution: users install the base system from the minimal ISO image and install the packages they need. The operating system installation and configuration tool stone is really bare-bones, but it does the job. Just be sure to select "Full install" when asked about the package set.

In contrast to many other distributions, T2 only applies patches to the original source files when absolutely necessary, and it follows the latest version of all packages. This means that users have a cutting-edge Linux distribution, but they have to configure a lot themselves. Moreover, all services are disabled by default. All this makes T2's philosophy closer to the BSD world than to most Linux distributions.

Building and installing a package on a T2 system is simply done with the Emerge-Pkg script (after checking out the T2 source with Subversion). This script not only builds and installs the named package, but also its dependencies. The same command can be used to update an already installed package. Removing a package is done with:

    mine -r packagename

Where mine is T2's binary package manager. By the way, T2 uses human-readable text files (found in /var/adm) for package management. For example a list of all installed files belonging to packages can be found in /var/adm/flists/packagename. This makes it possible to query package information with normal UNIX tools. For example, grepping for the name of a header file in /var/adm/flists will give you the package which offers this file.

However, dependencies are currently a big hurdle for desktop use of T2. Emerge-Pkg only installs direct dependencies, so a lot of the builds fail. The user then has to Emerge-Pkg the failed dependencies to try to build them directly, and if that doesn't work out the error log files in /var/adm/logs can give some information about which dependencies are missing. Then you should install these first before trying to build the original package again. Emerge-Pkg has an option to build all indirect dependencies, but this often builds way too much, so it isn't advisable to use this. With the current approach, the build system is not user-friendly enough to use T2 as a desktop system without annoyances, but René is aware that the problem has been neglected for too long and he is working on improving the experience.

T2 uses its own non-standard framework for network configuration, which can be somewhat confusing at first, although it looks somewhat like Debian's /etc/network/interfaces. The network configuration is stored in /etc/conf/network and allows setups from very simple to complex, even with multiple profiles and basic firewall rules. The T2 handbook is an invaluable resource to get a network running on a T2 system, although the system configuration tool stone ("Setup Tool ONE") can handle simple network configurations.


There will always come a moment when a user wants to install a package that T2 doesn't have. Luckily the package format (with the .desc file extension) is quite easy to grasp: it's a simple text file with some metainformation such as a description and a URL where the source of the program can be downloaded. T2 understands a lot of build systems (among others GNU autoconf, Makefiles, cmake, Python and Perl Makefile.PL) and automatically fetches and extracts the source, modifies the package build and compiles and installs the software. So in most cases you only have to fill in some basic information to create a new T2 package. In case this doesn't work, you have to add a separate .conf file that modifies the build process or .patch files with patches to the source. More information about the process can be found in the T2 handbook, and there is also a simple package creation tutorial.

When you have created a new package, contributing it to the T2 mailing list guarantees that it will be added to the repository. There is also the IRC channel #t2 on Freenode, where a small but helpful community is available. All in all, the process of writing your own packages is really straightforward: last year, your author contributed a handful of packages to T2 while evaluating the distribution, and it struck him how extremely readable and self-documenting the package format is.

The future

T2 SDE is not only a cross-architecture distribution, it also wants to become cross-platform. While currently the only platform it uses is the Linux kernel, a long-term goal is support for other open source kernels like MINIX, GNU Hurd, *BSD, Haiku, OpenDarwin or OpenSolaris. At the moment no work is being done in this domain, but the build system should make the task doable. According to René, who is especially interested in having a microkernel to run T2 on, it is not so difficult besides patching some of the packages:

If GCC can produce working executables for the platform, it's an easy game: you just have to package the kernel header and C library and you're already halfway. Most packages should already build, and then you just have to collect the kernel sources into a kernel package and maybe package some system control tools.

A first step into the direction of other kernels has already been made, and it is, surprisingly, support for Windows. More specifically, T2 added support for MinGW in August of last year. MinGW (Minimalist GNU for Windows) is a port of GCC and GNU Binutils for use in the development of Windows applications. This means that T2 can be used to cross-compile 32-bit Windows binaries on a Linux system. The work has been done by ExactCODE for a client who wanted to compile a Windows executable from a more automated (read: UNIX-like) environment.

Another important mid-term project is improved LLVM/Clang support, René says:

It is already pretty usable. I have one virtual machine that has most executables compiled by LLVM. However, there is still some work needed on cross-compiling and bootstrapping the base system, as well as compiling the Linux kernel, because LLVM has issues with some advanced inline assembly and 16-bit boot code.


If you want to use T2 SDE as a desktop system, expect to invest a lot of time chasing dependencies and configuring a lot of details yourself. Because T2 SDE doesn't have extensive documentation about the daily use of the system, like Gentoo and Arch Linux have, it's no trivial task. However, its source-based nature and its clean BSD-like philosophy will surely appeal to do-it-yourself users.

These issues notwithstanding, T2 SDE is a powerful and flexible Linux distribution for all sorts of purposes. What's interesting is that it offers just one distribution build kit that can be used to create various targets, from embedded to desktop, while many other distributions have different versions for different targets. Moreover, T2's handbook covers extensively how to create packages and how to build your own distribution. If you want to build a special-purpose Linux distribution, T2 SDE should be one of the first places to look.

Comments (4 posted)

New Releases

Debian Live squeeze alpha2

The Debian Live team has announced the second alpha of Debian Squeeze Live images. These images were built using the archive state of squeeze from 2010-07-17, plus some additional components from sid.

Full Story (comments: none)

Debian Policy released

Debian Policy has been released. Lintian has been updated to v2.4.3 for this release of Policy. Click below to see the primary changes in this version.

Full Story (comments: none)

FreeBSD 8.1-RELEASE Available

The FreeBSD Release Engineering Team has announced the availability of FreeBSD 8.1-RELEASE. "This is the second release from the 8-STABLE branch which improves on the functionality of FreeBSD 8.0 and introduces some new features."

Full Story (comments: none)

SchilliX-0.7.0 ready for testing

SchilliX-0.7.0 is available for testing. This version uses OpenSolaris Nevada Build 130.

Full Story (comments: none)

Debian Edu/Skolelinux 6.0.0 alpha0 test release

Debian Edu/Skolelinux 6.0.0 alpha0 is available for testing. "This is the first test release based on Squeeze. The focus of this release is to test the user application selection."

Full Story (comments: none)

Distribution News

Quote of the week

Be bold. The developers aren't a cabal cult worshiping the Dark God of Ubuntu, they're friendly people willing to help. If you have questions and a web search doesn't answer them, come to IRC and ask! Along the way, you can learn something new from the conversations that go there all the time.
-- Maia Kozheva

Comments (none posted)


Report: An Exploration of Fedora's Online Open Source Development Community

Diana Harrelson, an anthropology graduate student, spent several months surveying the Fedora community; a draft version of her report is now available. It looks at contributors' motivations and problems they have encountered, and makes a number of recommendations on how to make the project easier to contribute to. "The key here, and the large difference between FLOSS development processes and traditional ones, is that it's not the act of doing something that needs approval; instead it's the result of the action and quality of the work that must be approved. Again, this is where not only having a mentor program for new contributors is useful, but also making such a program highly visible, transparent, and accessible is important."

Comments (2 posted)

Rawhide changes: systemd and Fedora 14 branch

There are some interesting changes coming for Rawhide users, starting with the fact that systemd is now the default init system. The early reports are mostly about dependency issues; it's not clear that all that many users have gotten as far as running the new system yet. "I have tested all this quite extensibly on my machines, but of course, I am not sure how this will break on other people's machines. I sincerely hope I didn't break anything major with this transition. So please report bugs and don't rip off my head because I might have broken your boot... I didn't do it on purpose, promised!"

Meanwhile, the Fedora 14 branch is coming on July 27, with the added twist that the project is switching its CVS-based system over to git at the same time. For now, they will be mostly focused on just making it work, but there's some interesting ideas for the future: "Later on we will start to explore more interesting advancements such as automatic patch management with exploded sources, linking to upstream source repositories, automatic %changelog generation from git changelogs, or things I haven't even thought about."

Comments (4 posted)

SUSE Linux and openSUSE

openSUSE 11.0 has reached End Of Life

openSUSE 11.0 has been officially discontinued and is no longer supported. "openSUSE 11.0 was released on June 17 2008, making it 2 years and 1 month of security and bugfix support."

Full Story (comments: none)

Jos Poortvliet named openSUSE Community Manager

The openSUSE project has announced that Jos Poortvliet will be its new community manager. "Jos commented, 'The opportunity to become part of the international openSUSE community is very exciting. There are a great number of interesting developments going on in the free software world, and openSUSE plays a major role in many of them. I look forward to working with the community on these, helping it grow, finding new directions and ways of developing, and delivering its innovative technologies to users and developers around the world.'"

Full Story (comments: 1)

Newsletters and articles of interest

Distribution newsletters

Comments (none posted)

Hands on: Jolicloud 1.0, a Linux distro in progress (ComputerWorld)

ComputerWorld has a review of Jolicloud 1.0. "Does Jolicloud live up to its promises? Somewhat. Its biggest problem is that it feels more like a second beta, not a 1.0 release; it needs more work before it's truly useful instead of one step above a curiosity."

Comments (none posted)

Page editor: Rebecca Sobol
Next page: Development>>

Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds