Archive for May, 2007

Endianess conversion thru C++ templates

Sunday, May 20th, 2007

I wanted to review the historically cumbersome endianess conversion for our ExactImage for some time now. Thanks that the good old C macros (and the various variants of it) annoyed me enough to finally do so. What we now have in our “exact-base” repository is a C++ template setup that can be used to either define variables that have a specifc endianess in memory - probably because the composed structures are read and written as part of a externally defined format (such as BMP :-) - or to explicitly convert as in former times, just with the syntactic sugar of C++.

Using the template in packed structures is as easy as:

/* Size in bytes of the bitmap file */
Exact::EndianessConverter < uint32_t, LittleEndianTraits > iSize;

This defines iSize as ‘unsigned 32 bit’ with little-endian representation in-memory.

The next handy thing this Plain Old Data template avoids, is accidently messing with the data. As the type is incompatible with the usual ‘uint32_t’ it can not mangled. hWile the assignment operator is overloaded to store the data in the indended order, the cast to type passed to the template yield the swapped value, so straight-forward code just works:

#include < iostream >
#include “utility/Endianess.hh”

int main() {
Exact::EndianessConverter < int16_t, Exact::BigEndianTraits > test;
test = 0×1234;
std::cerr << "sizeof: " << sizeof (test) << std::endl
<< "value: " << std::hex << (int32_t)test << std::endl
<< "in-memory: " << test.value << std::endl;

Prints out:

sizeof: 2
value: 1234
in-memory: 3412

Checking the actual native endianess is as easy as:

if (Exact::NativeEndianTraits::IsBigendian)

And explicit conversion done like this:

Exact::ByteSwap < BigEndianTraits, NativeEndianTraits, uint16_t > ::Swap (some_data)

The whole source is available under the terms of the GPL!

The T2 SDE Free and Open Source reference map?

Saturday, May 19th, 2007

With the ongoing T2 System Development Environment efford, I wonder if we do not only build up an awesome tool to create customized systems and appliances, but also a more and more complete, generic Free and Open Source reference map.

The nearly 3000 (still increasing quickly) packages of T2 generically describe where the software comes from and includes meta-data like: verbose overview, author, license, supported architectures, kernels among others and the packages are not cluttered with branding or other unnecessary patching. The packages are left vanilla as the up-stream author intended it to be and only patched where needed to get the source code actually build.

The term “generic Free and Open Source reference map” mostly came into my mind when I noticed that we more often get packages that are not even listed on nor part of other major Linux distrubitions. And the T2 packages are just soo clean and lean, just take a look into one yourself, the just added ipmiutil for example :-)

To get a complete list just take a look at the T2 package matrix listing.

I think putting some efford to setup a search and browse engine around this meta data might really worth the effort, promoting it as uncluttered “Free software map”.

A last note: Don’t let other’s distributions high package numbers confuse you, in T2 the 3000 package number refer to one package for a single piece of software, and not like 4 or more in other Linux flavours, such as -devel, -doc, … So one would have to strip this split packages from the published numbers of other distributions such as Ubuntu, Fedora, SuSE or Debian when comparing raw-numbers.

Microsoft Says Free Software Violates 235 Patents - NY Stock Exchange Moves To Linux

Thursday, May 17th, 2007

Microsoft Says Free Software Violates 235 Patents, probably as famous ones as the “FAT” - file-system - patent.

The free software world remains unimpressed, and elsewhere the NY Stock Exchange Moves To Linux, while Linus Torvalds estimates:

It’s certainly a lot more likely that Microsoft violates patents than Linux does.

Intel recomments: “Use a recent (Linux) distribution”

Sunday, May 13th, 2007

Intel released a new, tiny tool named “powertop” that can help to find possibilites to save more power on Linux systems. On the homepage they recommend:

Use a recent distribution
Linux is a fast moving project, with very fast evolving components. If you’re using an older distribution, older than 4 to 6 months (and anything with “Enterprise” in the name is by definition old), please consider going to a newer distribution. Reporting issues on older distributions is going to be frustrating to a lot of people, since the issue is likely to have been fixed more than 6 months ago… Please be considerate of the developers of projects and use a recent codebase and avoid bugging them about issues they solved long ago.

As I could not agree more, here we go: T2 SDE

… with powertop already included.

Dell joins Novell Microsoft Linux alliance

Tuesday, May 8th, 2007

Not only that the Novell Microsoft patent exchange and cooperation deal was bizzare enough, now Dell event joined this wanna-be Linux alliance after their customers most often asked for Linux in the Dell Idea Storm.
AND IT IS NOT EVEN April the 1st! :-(