Welcome Rob,

sorry for the slightly delayed reply - I was just abroad.

On Friday 08 June 2007 21:51:17 Rob McBob wrote:

> I downloaded T2 v6.0.2, and I have some questions.
> 
> I see that the package definitions are in the "package" directory, and was
> wondering if there is a way to update package definitions without downloading
> the entire toolkit?

Yes, by using Subversion to keep your sources up-to-date:

  http://www.t2-project.org/download/

Just checkout the 6.0 or 7.0 -stable branches as you demand.

If you have a SVN checkout you can either update the whole tree by
running:

  svn up

in the top-level dir, or just update the packages by running:

  svn up package/

In any case only the changs are transferred (as delta to your current
working copy).

> There are a number of architectures listed as supported.  I am wondering how
> you do this.  Since not all combinations of binutils-gcc-glibc work for
> every architecture, how do you define a working configuration for each arch?

In the past we had to do a lot of engineering to indeed make the latest
version of gcc+ the C library work for all architectures. Since T2 7.0
we support re-defining packages by architecture or target, and thus right
now AVR32 and Blackfin alter the gcc, binutils, uclibc packages and
sometimes a few more to use other, patched up version of those
package with the proper support for those architectures.

> Does T2 provide any tools for capturing run-time configuration?  For example,
> when I boot my machine into T2, and I change /etc/resolv.conf (or any of the
> files in /etc) is there some way to capture that?  Can that information be
> folded back into package definitions?

Well, T2 uses whatever the single packages use.

You can use management tools around to adminstrate your system. Cfengine
is one of those, directly using some version system like SVN for /etc and co is
another "solution".

> I see you've also made a comparison to Gentoo, and I am familiar with Gentoo.
> When you say that T2 does "automated package build" compared to the Gentoo
> ebuilds, what does that mean?  Can I just specify a name somewhere and T2 will
> figure out how to download and build that package just based on the name?

Every Gentoo ebuild contains code. In the past even applying every patch
file and running configure was hard-coded in every ebuild. These days
Gentoo got a little more automated, so that the ebuilds mostly only
list epatch and ebin or so  on. But you _HAVE_ to write even a little
code for every package.

In contrast T2's packages are defined by a simple key/value text file format.
The T2 system will apply patches automatically as well as figure out itself
what kind of ./configure, classic Makefile, perl / python et al. build system
to use. Most of the T2 packages do not contain a single code-line at all.

> And how does T2 configuration compare to portage USE flags?  Suppose I want to
> turn on IPV6 for my system, with Gentoo I would simply add 'ipv6' to my USE
> flags and rebuild the system.  Does T2 provide this sort of high-level
> configurability that cascades down to the package level?

Packages can define CONFIG options, that show up in the Config tool.
Additionally features of many packages are wired to the selection of
other packages. Like if you have libusb selected many packages
will contionally enable USB support and so on.

> Likewise, I tried building a basic embedded system, but it seems to want to
> build perl and X, and I want neither.  Again, Gentoo USE flags would make it
> easy to turn this off, but I don't see how to do that with T2.

Just alter the package selection and deselect those stuff.

In T2 you can even define your own target, specifically defining
what to build, and how:

  http://www.t2-project.org/handbook/html/t2.target.html

> What are the "sophisticated wrappers" in T2 that are better than the 
> "hardcoded
> CFLAGS" in Gentoo?  In Gentoo the make.conf file allows you to set system-wide
> CFLGAS which can be over-ridden on the command line for any package.  And
> package ebuilds also allow you to set specific flags for a given package to
> override system or user choices (if they're known to be bad, for example).

Doing it the CFLAG way like Gentoo is error prone and cumbersome. This is
because many package do not even honor CFLAGS at all, or name it differently.
Some packages, e.g. openssl, do not even build when you set CFLAGS from
the command line of make, because the Makefiles rely on beeing able to
add additional flags for the compiler to this variable - which make will not
evaluate if a CFLAGS is already specified on the command line.

This is why even more code or patches are added in Gentoo to make sure
these CFLAGS in somehow make it into the build of a package.

In T2 on the other hand we do not care at all what the Makefiles do with
the CFLAGS or not. We just let the individual packages call the compiler
with whatever options the individual upstream author though they like
most.  This "sophisticated" sandbox environment of T2 then intercepts
each compiler invocation and removes all the optimization options
supplied by the package and generically injects what the user or target
selected for the optimization settings.

This not only 100% garuantee that the selected options from the Config
are used in a package build, it also saved us hundreds of hours of
developer time to go thru all the Makefiles and build logs to make sure
the packages actually where build with what Gentoo supplied as CFLAGS.

> On one final note, in trying to build with T2 for a basic embedded system, the
> build fails on building base/gmp with the following error, perhaps there is
> some way to recover from this (sorry, the config system is new to me):
> Due to previous errors, no 1-gmp.log file!
> (Try enabling xtrace in the config to track an error inside the build system.)
> --- BUILD ERROR ---
> Creating file list and doing final adaptions ...
> Processing static lib corrections ...
> Verifing the .la files ...
> Searching for orphaned files ...
> Found 7 files for this package.
> Found 1 orphaned files for this package.
> Clear (old) md5sums and cksums ...
> Creating md5sum and cksum files ... done.
> Creating package description ...
> Making post-install adaptions.
> -> $root/var/adm/logs/1-gmp.out -> 1-gmp.err
> == 06/07/07 16:30:48 =[1]=> Aborted building package gmp.

This was fixed some time ago. You should use the HEAD of the 6.0
stable branch to build.

Btw. you only posted the truncated on-screen log, the full log is
in build/$config-.../var/adm/log/1-gmp.err

I suppost the C++ cross compiler did not find the STL headers, this
is fixed in the top of the 6.0 branch:

  svn co https://svn.exactcode.de/t2/branches/6.0 t2-6.0

-- 
  René Rebe - ExactCODE GmbH - Europe, Germany, Berlin
  Geschäftsführer: Susanne Klaus, René Rebe
  Sitz: Berlin, Amtsgericht Charlottenburg HRB 105 123 B
  USt-IdNr.: DE251602478
  http://exactcode.de | http://t2-project.org | http://rene.rebe.name

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of: unsubscribe t2

Reply via email to