Search Results: "Simon Richter"

14 August 2007

Simon Richter: Stable APIs

The API for asynchronous device communication under Linux is totally on crack. The only notification for completed requests is a realtime signal (for which there seems to be no allocation method -- let's hope that everyone else in the process checks whether a signal is set to "default" before using it); however these are difficult to get synchronised into your event loop. It appears as if people are supposed to write kernel modules instead of talking to USB devices from userspace. I wonder if that is desired, since having a stable userspace API would make writing closed-source drivers easier; however I see a kernel driver as overkill in most cases -- all it ever does is copy data around. Maybe it would make sense to have a simple template driver that can be set up with a request from userspace and some udev trick.

13 August 2007

Simon Richter: Design choices, buttocks and bite marks

There are three more or less important file formats binutils does not support yet: bFLT, OMF and the Amiga's "0x3f3" format. The latter is the easiest to implement, as the other two only specify either the relocatable or the executable form, but not both, and binutils' ld does not handle format conversion of the output very well.

Simon Richter: Curiosity

How much of the traffic on the various machines that make up www.google.com are ICMP ping requests from various machines trying to find out if "the Internet is up"? And, related, is this the reason that most web servers for Microsoft do not answer pings?

10 August 2007

Simon Richter: Why mISDN is not done yet

Life would be so awesome if there was a language to describe function calling conventions. I'd so use that to write my AmigaDOS startup code in C. In other news, I'm hacking on a replacement for amiboot; ideally it should work both as a stand-alone loader and as a filesystem driver that makes /boot accessible to AmigaDOS, so you can go without an auxiliary FastFileSystem partition.

9 August 2007

Simon Richter: Meh.

My writer's block is not related to Debian.

Simon Richter: Bwahahahaha

I'm writing an USB wrapper for C++, integrated into ASIO. I somehow like this language. It is perfectly fine to write unreadable code as long as you document what type your return types are convertible to.

31 July 2007

Simon Richter: Night hacking

Another night of evil code. The mighty gdb now talks to me. Have successfully resisted the urge to reimplement everything, so far.

28 July 2007

Simon Richter: Productivity

The key to productivity is avoiding other work. The weekend has just started, and I've successfully hooked up a JTAG probe to a Linux box and implemented half of debian/xcontrol stuff. xcontrol is a preprocessor for control files that accepts an extended syntax and compiles that into a policy compliant debian/control file, losing bits of information on the way (but whoever cares can just look into the xcontrol file). For now, I am planning to support the following extensions:
Build-Depends-Tool:
An additional build dependency line useful in cross compiling packages. The normal “Build-Depends” is reinterpreted as packages required for the target architecture, while this line specifies packages required on the host during the build.
Build-Depends[release]:
This overrides the build dependencies for a certain release, and comes in handy when backporting. Of course, this is orthogonal, so -Indep and -Tool fields exist too.
Optional: yes
This package is not normally built; if you need it, you have to invoke the “build-package” and “binary-package” targets.
per-package Build-Depends*:
This allows specifying the build dependencies for “Optional: yes” packages without adding them to the main list.
The syntax is still debateable at this point. The non-orthogonality of Build-Depends-Tool is intended, by the way. :-) The transformations done to make this policy compliant should be obvious: Build-Depends-Tool is folded into Build-Depends, the release-specific Build-Depends are omitted (or selected if xcontrol is told to target a specific release), Optional is stripped out and the per-package build dependencies for all non-Optional packages are accumulated. I don't know whether I'm going to do templates yet, this will probably wait until the second release. More on the JTAG adapter when I have the gdb stub working. Now I'm going to go back to what I should really be doing.

26 July 2007

Simon Richter: Debian Maintainers

Marco, if you do not want to rebuild the package you were asked to sponsor, you can just upload the binary they built. After all, it's not more of a security issue than allowing them to upload in the first place.

Simon Richter: Compiling compilers

I've spent a few days with the gcc package now, trying to get them to a point where cross compilers will be sanely autobuildable. I'm going to let the dust settle for a few days (and give my script time to catch up) now, and then send patches if they work. The stack smashing protection (and the fact it is enabled by default on Ubuntu) sure make things interesting.

23 July 2007

Simon Richter: Package management and components (aka "our users and free software")

Ian, I am not sure that “good package management” is a real selling point for anyone but system administrators. Home users do not care, as there is not that much difference between double-clicking an executable (that pops up a window, asks a few questions and then installs the software) and selecting a check-box in a list and clicking “apply” (followed by window, questions, etc.). In a business setting the users usually do not have permission to install software anyway, so they could not care less how it was installed, the only thing important is that it is there. In my opinion, the single technology that has had the most impact would be COM, the “Component Object Model”, because this is what the ISVs want: an easy way to define a (binary) interface that will allow components from different vendors to work together, ideally in the same virtual address space for maximum efficiency. The registry provides the necessary lookup functionality, so that you can construct an object of a given type by giving its class name or GUID to CoCreateInstance, and you get something back that provides the interfaces that this class implements, which is either the object directly or an RPC proxy. The latter happens, for example, when a multithreaded application wants to call methods in an object that is not threadsafe (COM will then serialize the calls) or when the object is provided by a system service (where we have dbus). The fact that the only thing you can rely on is the defined interface (a set of methods and data objects that map to getter/setter methods) makes it necessary to define the interface first and invest lots of Interfaces become immutable as soon as they are published, incompatible changes need a new interface name (that's where all the interface names ending in …2 or …3 come from). Under Linux, the closest thing is GNOME and their use of CORBA. If you were to write an application that runs within the GNOME framework, and if you wanted third party vendors to be able to plug into it, then you would probably publish an IDL file for it. Lots of “if”s there. Licensing is also an issue here. One thing the GPL fails to address, even in version 3, is the integration of components without linking into the same address space (which ORBit never does IIRC). Technically, the component provider and the component user communicate via sockets using a well-known protocol, so the component user is not bound by the GPL; the only thing that could be argued is that the IDL file defining the interface would be GPLd (although most jurisdictions consider interfaces as not copyrightable and/or permit “reengineering” for interoperability purposes). Some people might consider this “cheating” around the GPL, as any GPL'd program or library providing components could be used freely by any closed source application as long as the source code to the GPL'd portions was made available. Last (but not least) it is a matter of developer motivation. Third party vendors are, for most of us, not our target audience, and properly supporting them is going to be quite a bit of work. I've written about mixing different C libraries in the same executable image before, as a “nice to have” item. For components that should share the same image, like COM does, it is an absolute must, and COM goes to great lengths to make sure this actually works. For example, allocating memory that is to be passed to a COM method must be allocated using midl_user_alloc() from the RTC DLL and freed using midl_user_free() from the same; as this is a system library and compiler vendors are forbidden from bringing their own, everyone uses the same allocator pair (that internally just calls malloc() and free() from the Microsoft C library, but that is an implementation detail you are not supposed to know). On the Linux side, people do not care much about matching allocator functions, because in essence it all ends up in glibc's malloc()/free() anyway. When glib introduced their own allocators and started using them for their own structures, a number of applications started crashing unless you set a certain environment variable that told glib to pass everything through to glibc. Personally, I've spent the last days compiling toolchains in order to provide compiler packages that work “out of the box” on at least Debian etch, lenny and sid, and Ubuntu dapper, edgy, feisty and gutsy. Right now, I feel a lot like shipping statically linked binaries. Where Windows has mostly gotten out of the “DLL hell”, Linux has built its own variant of it:
The Windows DLL hell
is a hot place. Everyone is bringing their own grill lighter they believe does not cause cancer, starts a small fire and begins to roast marshmallows. The problem there is that the floor is covered with a sticky mixture of lighter fluid and everything is burning.
The Linux DLL hell
on the contrary is freezing cold. It has small isolated fires where a few friends are sitting, and they suddenly decide to move on and pour water over the fire and your marshmallows without asking first. Getting into a group is difficult, and if you manage it, all it means is that you are told to pick up your marshmallows before they extinguish the fire.
At this point, I'm going to be comment- and trackback-whoring; instead of answering the obvious question, I'm going to leave it open: Would a COM-style componentization model work in the Linux world, and attract software vendors, provided we can put out stable APIs and support them properly, or is that a red herring?

22 July 2007

Simon Richter: I like cartesian crosses

The first compile run is almost finished; for now, it's only binutils but you can see the general direction here.

Simon Richter: Why, yes, I am bouncy and full of life

It is not a good party unless the police shows up (twice), it all ends in the kitchen and people have headaches the next day. Yesterday's was good.

18 July 2007

Simon Richter: Random embedded Debian rambling

Currently, there are two kinds of "special" source packages in use in the embedded world:
the toolchain package
needs a third system type and builds differently for each. We currently handle that with a script with intrinsic knowledge about the package being built
the target runtime
is target, but not host specific, and is built from a regular package with dpkg-cross
The plan for tonight is to work towards autobuildability.

17 July 2007

Simon Richter: Now it shouldn't restart from the beginning on errors :-[

I should really compile my toolchains in winter... Well, a few hours later and a few watts warmer, I now have cross binutils for all relevant releases of the two major distributions using the .deb format. The rest of the build is now going to run over night. In other news, binutils can not be built inside testing, as dejagnu is currently RC buggy.

Simon Richter: Back

Yay, I have finally managed to restore the database on this machine after the harddisk crash. Which means my blog is back.

19 June 2007

Andrew McMillan: X.Organ?

Is there anything Keith Packard can't do? Tore, Simon Richter, Keith and others have had great fun restoring the pipe organ that was oh-so-conveniently located in the night venue. I don't think that the landlord would have expected this. Apparently we were instructed not to break or fix anything but this was just too tempting for a bunch of geeks. I particularly like the fact that there is no sheet music - that's what laptops are for, surely! More pictures of the night venue.

6 June 2007

Simon Richter: The Internet is really, really great...

Quite often I wonder whether not having Internet access would make me work more effectively. So I tried it out, resisting the urge to go on IRC, not reading email during a compile run, just focusing on the task at hand. Surely enough, after 10 minutes, I needed a piece of documentation I didn't have handy, and the whole project failed. This is probably the single advantage an IDE has over the "traditional" model: an integrated browser that only shows documentation and does not play flash games. Documentation is distracting enough as it is.

Simon Richter: The joys of proprietary software

I get to reinvent the wheel, this time in C++, and thanks to templates, with as many corners as I want. Increasing the instantiation depth shall make it round.

Simon Richter: b33r

It appears that the general idea of having a geek-in in Munich during this year's Oktoberfest is catching on.

Next.

Previous.