Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, November 25, 2007

ZeroBUGS on PowerPC


Happy Thanksgiving! (Yes, we do celebrate Thanksgiving in Seattle in spite of what the Liberal Turkeys want you to believe).

And what a great long weekend this was. We took advantage of the great weather and hiked in the Lincoln and Discovery Parks and walked around Alki Beach, with our son in the backpack.

I have been looking for a solid block of free time from my daytime job in order to look into porting ZeroBUGS to the PowerPC.

I have an old PowerMac that I bought used from a company in Oregon this past summer, for this specific purpose (and promptly installed Ubuntu on it).

But I did not have the time to look into it seriously until now. The main motivation was to see how far I can push the envelope, with the existing design holding up. In other words, I wanted to see how portable my overall design of ZeroBUGS was. And porting prompts one to revisit, re-test and refactor old code.

Of course, I did not expect the outcome of three or four nights of hacking to be perfect.

But the result, while very rough, is quite usable (at least usable enough for me to bootstrap the debugging of the debugger with itself) and I am quite happy with it.

So what's so hard about porting the debugger to the Power architecture? you may ask. Shouldn't it be quite a straightforward task, given it is written in portable C++?

A debugger interacts with the target program (and the OS) at a low level, and hence parts of it depend on the low-level architecture details. Take stack unwinding for example. The layout of stack frames (or links, in PPC parlance) is different than on the Intel chips. And so is the mapping of DWARF register numbers onto the CPU general purpose registers.

Linux runs on PowerPC in big endian mode (as opposed to Intel chips which are little-endian systems) and thus the binary representation of C and C++ bit fields differs.

The hardware support for debugging (special debug CPU registers) also varies across processors.

Well-thought abstractions should isolate these idiosyncrasies. I found out that I have done a good job designing the stack unwinding mechanism (a "driver", template method that delegates to platform-specific bits) but totally blew the model for hardware debug registers.

Oh well. Back to the drawing board. Luckily it is not a heavily-used feature...

Sunday, November 18, 2007

The Pros and Cons of Hitch Hacking... Ubuntu 7.10


After fubar-ing one of my systems last week with Fedora Core 8, I switched to Ubuntu 7.10 Ballsy Baboon as my main development system and I just love it.

I cannot care less about the over-hyped desktop effects, I am interested in software development, and in this context the eye candy is irrelevant.

Ubuntu 7.10 allows you to install all major GCC/G++ versions from 2.95 to 4.2 which is so cool! I can test with older GCC versions without having to boot up an older distro! Excellent.

So that is the Good. Now for The Bad and The Ugly: the PowerPC is not officially supported.

This is hardly any news, 7.4 is not supported either but it worked great on my second-hand G4. Upgrading from 7.4 to 7.10 on the other hand is a terrible mistake. I repeat: if running on PowerPC, do not upgrade from Ubuntu 7.4 to 7.10!

If you do, your machine may not reboot properly. It is very likely that you will find yourself stuck at BusyBox, and then you will have to type:

modprobe ide_core
exit

to bring the system up.

Then you may also see an error box popping up, about HAL not starting. You will have to start it manually:

sudo /etc/init.d/hal start

The network interface may not start either, and there is no sound. But then again, I am only using the G4 for porting ZeroBUGS to PowerPC (which I devote very very little time to, so not a biggie).

As a bonus point: on the AMD64 (my main system) nspluginwrapper and flash are installed auto-magically.

So overall this Manly Monkey distro is great! Oh wait. I got the name wrong again... I think they call it Goofy Gorilla. Or Ghastly Gnome.

Sunday, November 11, 2007

Fedora 8 Headaches

I should have known better: if it ain't broken, don't fix it. My main system is a 64 bit machine which, until yesterday, ran Fedora Core 5. On top of that I ran several 32-bit distros in VMWare.

The system was just fine, yet I decided to get adventurous and upgrade to the new Fedora 8. Big friggin' mistake. First of all, the installation DVD got consistently stuck at about 30% of Checking dependencies in packages selected for installation...

So I grabbed a Fedora 7 DVD which I burnt a while back and never got around to play with, and tried it out. The upgrade worked (I could not afford a fresh install, since I needed to keep my data). And I should have stopped here. But no, I got greedy and retried the FC8 DVD. No more hanging at checking dependencies... hurray! But wait.

After rebooting the system, pirut (the front end to YUM) does not work anymore (crashes every time), the Gnome desktop forgets to repaint after a while and looks like a Windows 3.1 desktop back when an application leaking GDI resources messed up the entire machine.

Oh, and because of the new 2.6.23 kernel, I had to recompile VMWare's kernel module, which would have been ok, had it worked. But in the good old tradition of kernel developers who don't give fudge about backwards compatibility the kernel source is now incompatible with VMWare Server 1.0.4.

I always thought that it would be easier to test my software if I limited myself to fewer distributions. So thank you RedHat, you are out.

Wednesday, October 24, 2007

Linurix: Linux Limericks

I like to improve my English as a second language every chance I get. For example, when I am stuck in traffic I practice making limericks.

Today I came up with something new: linurix (plural linurix). Limericks about Linux. They go something like this:

There is a man from Stellenbosch
Who's never seen a Macintosh,
Because Winnie Mandela
Once told the poor fella
That Ubuntu Linux was posh.

There is a guy in Tennessee
Who owns two Macs but no PC.
He thinks RedHat from Raleigh
And the Pope are unholy.
And this is religion, you see.

Charles Simony circled the Earth.
On his way back he came forth
And called his attorney
"Hey man, this journey
Confirms: Ubuntu is shuttle-worth!"


Monday, October 08, 2007

OpenSUSE 10.3 First Impressions

This past weekend I have installed OpenSUSE 10.3

My first impressions: it looks very polished, albeit a bit slow (but then again, I installed it on a virtual machine, on a USB external drive). It installed some services that I do not care about such as SMB and power management. The Beagle thing seems to have an initial crawl phase (I guess that it indexes a whole bunch of stuff) and I had to kill and remove it.

And I was annoyed that there is no gtkhtml3-devel package (but I found what I needed here, so no biggie).

On the nice side, OpenSUSE 10.3 comes in the box with GCC 4.2, unlike Ubuntu 7.10 that ships with 4.1.3 (at least in the tribe pre releases, we still have to see what the official release contains).

Overall, a nice system, packed with apps and looking slick and crisp.

Speaking of Ubuntu, it is not a bad distribution either, but it is getting credit and hype for work that the upstream distro (Debian) is doing, and everybody knows that the heavy lifting in kernel development happens at RedHat, Novell, and IBM.

Friday, September 28, 2007

Ubuntu: Sex Sells

I cannot believe this. Shocking! How low is Ubuntu going to stoop? Edit: More tragically, I cannot believe some people flamed me for using this picture that "objectifies women"... Gee, wow!

Convinced that these stories of shameless sexploitation are but a dream of FSJ, I went and conducted my own independent investigation.

What I have dug out is unbelievable. (Get more offended by other outrageous stuff here and here).

Solid products should not rely on sex to sell... Oh wait. Ubuntu is free, there's nothing to sell to begin with. So what are they saying then? That Linux is for boobs, Apple is for asses?

As The Monty Python would put it, my nipples explode with delight!