rss feed

December 31, 2008

Happy new year!

Today I close out notes-2008.html, and tomorrow I open notes-2009.html. The notes.html file is a symlink to the appropriate year file, so linking to notes.html#31-12-2008 won't do what you think for much longer, you should always link to notes-2008.html#31-12-2008 instead. (A bit regrettable to have the year in there twice, but it's entrenched now.) Just FYI.

The last few years I've copied december's entries to the end of the new file and left it there until Februaryish, so the rss feed generator script has something to work with. (I stopped reading Melonpool when the guy blanked his archives. I checked in two or three days before the switch, and then checked in after and I'd missed a couple days of comics... which were now gone. Never looked back. This isn't particularly relevant, it just annoyed me.)

This year I've typed just under 900,000 characters in this file, all by hand, in vi. That's a lot. It also means checking my blog involves downloading most of a megabyte, which is silly. I should split it up into months or something, which will make permanent URLs even stranger to do. Hmmm...

I should probably find some real blogging software, but not many of those are particularly happy with updating offline by text editing the source files and rsyncing the result up to the website.

Mostly offline today. Went to a nice party at Elze's house (Fade and Mark weren't up for it so I went by myself), and may have wound up on the Armadillocon concom as a result. That would be a nice alternative to Stu and myself launching a new con: find an existing con that's well established but a bit tired, and inflict much new programming upon it. I don't have to meddle with hotel contract negotiation and such that way. Besides, we'd just be competing with them otherwise (this year's Armadillocon con chair ran the art show at Linucon) and that's counterproductive.

Happy holidays.

December 30, 2008

So yesterday, I told paychex the exact amount of money that was in Impact account, and the portion of that Mark and I each earned, and that my main concern was not bouncing a check. Today, they want to deduct $253.50 more from the account than I told them was in it. Â This did not seem to raise any red flags on their end.

If somebody could have said to me yesterday "Employer payroll taxes get added to the amount devoted to payroll, so you need to reserve X percent for that", then I could have just done the math for them. Â Somehow, my desire to have this happen was not apparent to the lady I talked to, nor to her manager, despite the various ways I tried to ask the question.

Luckily it turns out there was more money in the account than just the amount my invoices to Cisco added up to, so it still shouldn't bounce, but I didn't know that when I was talking to them.

So very, very not impressed with paychex right now. Mark thinks we should go look at somebody else.

Busy all day. The phone just would not stop ringing. Mark called several times (some of them about Paychex), Stu called (oops, late to meet him for lunch), my sister called (wants me to buy her a house, but in a good way), I called my grandparents to thank them for the Red Lobster gift card Fade and I used for dinner, the series of phone calls from Eric was because he had to debug a problem with the gpsd test suite hanging on Ubuntu 8.10, which eventually turned out to be that gcc 4.3 is miscompiling Python 2.5... Eventually my cell phone battery died from all the calls.

At home. Tired. Meant to go over to Mark's tonight, but I just haven't got the energy right now.

So the busybox "dc" command was broken when I tried it, but Denys fixed it last night, so I can do the next perl removal patch now. (I need to get this done before the merge window closes.)

Three hours later, I've learned how to implement the greatest common denominator algorithm in shell script using Eucilid's algorithm, and I'm only about halfway through. (This would be easier if I either had any idea what the kernel used these numbers for, or if the perl generating them didn't suck quite so badly.)

Tired. Bedtime. Tackle it in the morning.

December 29, 2008

I love the summary of the work Microsoft is doing on Windows 7: "They've got Gluttony, Greed, and Sloth down, now they're working on Envy, Wrath, Pride, and Lust." (From Roughly Drafted Magazine.)

Mark and I went down to Paychex during his lunch break and set up payroll service for the new company. I think we did it right, but there's some legal thing where they're not allowed to tell us how much to pay ourselves, but isn't having them do all this funky math and witholding most of the reason to go with them in the first place?

This wasn't helped by the fact the nice lady who walked me through it (after Mark had to go back to work, his last day at his old job isn't until Wednesday) clearly didn't understand the math either. I was worried that the amount paychex charges to do a payroll (a little over $50 per set of paychecks, not bad) had to come from somewhere, so how did I set aside money for it without either A) leaving so much money in the corporate bank account that it stops being a pass-through and corporate taxes kick in, B) bouncing a check. I can't just go "we billed $1000 to the client, the check cleared, now devote $1000 to payroll", because the company has to pay _paychex_.

The tricky bit is that in addition to needing to reserve some money for non-payroll expenses (like paychex's fee), there's a whole set of payroll-ish taxes that the feds decided employees shouldn't see, so they feel like they're paying less tax. For example, social security tax is actually 12%: 6% from the employee and 6% from the employer. It's apparently some kind of zen thing: "this tax is money it costs your employer to pay you, and it's a percentage of your pay, but it's not a tax witheld from your pay because we say it isn't". Right. My objection is it makes it hard for me to do the math to figure out what goes where.

So if I say "devote $1000 to payroll", does that mean the employer-side taxes get deducted from that first, and then what's left gets the normal witholding? Or does that mean "actually devote $1060 to payroll, because those employer side taxes are on _top_ of what you've budgeted for payroll, due to the way the feds want to pretend that this is somehow different from any other income tax". If I say "devote all the money, minux paychex' fee, to payroll", do we wind up needing _more_ money?

The point of signing up with somebody like paychex is to NOT HAVE TO CARE about this. We tell them how much money we have, they do the witholding and cut paychecks. This "we can't tell you how much to pay yourselves" legal thing kind of throws a wrench in that.

About the third time through this I still didn't feel like I understood the nice lady's numbers, and on closer examination I noticed she had subtracted our personal income tax witholding from the amount of money I'd billed the client, but never added it back to the amount that was going to be debited from the Impact bank account. (I think she'd added the special magic "employers pay this on your behalf with money they somehow wouldn't otherwise give to you, so it somehow doesn't cost you anything" tax back, but not Mark's and my individual witholding amounts.) So I got _really_ confused: the amount they were taking for taxes in the pay period was less than my personal federal income tax liability, according to her own numbers. Yeah, that's not going to work.

I recognize that their office is understaffed for the holidays, and we walked in without an appointment, and I think I got a saleslady trying to walk me through numbers someone else had given her, because the normal people weren't there. Also, she wasn't doing the final numbers, this was just to answer the "how much do we pay ourselves" question so she could submit that number to the accountants in the morning. But in order to answer that question, I had to understand how this differed from "we each earned $X dollars, please do the witholding and cut us checks for what's left".

Pointing out that her total tax witholding was less than I personally owed got her to call in her manager, who pointed out that our first mistake was thinking that the amount we decided to devote to payroll and the amount we billed upstream had anything to do with each other. I was worried about filling in hourly rate times hours worked on a timecard, and he went nah, you just say how much you want to devote to payroll. So I gave him numbers that paid Mark his full amount and left enough of the money I'd earned in there to cover Paychex fees for the next few months.

And now I'm wondering if the "magic employer taxes" will be taken out of those numbers, or added _to_ them. Because I didn't leave enough to cover those taxes, just paychex fees. (If the corporation makes more than $1000 profit at the end of the year, it gets hit with its own taxes. So I can't just leave spare money in the company and give it to myself later, or it gets taxed twice. Paychex is actually being nice trying to cut us checks on two days notice, and no appointment, with most of their people still on holiday.)

Probably going back there to be confused at them again tomorrow. (At least they don't charge me extra for asking questions.)

Darn it. My first perl removal patch is not a complete solution. Back when I wrote it, I was pretty sure there was no way to enter an arbitrary HZ value in any of the config files, so pregenerating all the used values was sufficient. But it turns out that the arm OMAP and AT91 architectures allow you to enter an arbitrary range. (The help text warns that lots of values won't _work_, and never says _why_ you want to set HZ to these strange values in an age of tickless kernels, but nevertheless... It offers config options that my patch would turn into a build break if you set them stupidly.)

I posted a message to the FWL mailing list about this with more analysis and detail, but I can't link to the archive because it's asking for a login to view the archives. I poked mark to fix it, but he was up all night last night and is unlikely to be conscious again before morning, whe he has to go to work.

Actually, if I can log in as administrator maybe I can fix this... Ah, there it is, under archiving options. And here's the message.

Ok, so if my first perl removal patch isn't good enough, then I need to come up with a better one. Probably something using dc. Off to go do that...

December 28, 2008

Perl is back in the 2.6.28 kernel, once again due to H. Peter Anvin. Sigh.

The 2.6.28 merge window is open, and I'm coming up with a third perl removal patch. Tomorrow, I post the series to linux-kernel and linux-embedded. And it'll probably get ignored by the embedded community yet again.

Historically, the kernel developers have been sensitive to environmental dependencies. The kernel developers ship prebuilt lex and yacc output files so "make oldconfig" doesn't require those to be installed. The need for ncurses was trimmed out of kconfig variants other than menuconfig, so you don't need ncurses to "make oldconfig" either. The "make headers_install" functionality doesn't require an external unifdef, they merged the tool into the kernel and build their own version as part of the process.

Perl wasn't needed to build the 2.6.24 kernel, it showed up this year, and I've already submitted a patch to remove it from 2.6.25 and another for 2.6.26.

I need better noise cancelling headphones. I'm hanging out in the dobie mall food court, where all the food places are closed for the holidays. When I arrived, the only person here was a girl working the movie theatre counter at the far end. After I sat down, some guy came and sat on the wall next to me and started talking on his cell phone. After he went away (because the small child with him repeated "I'm hungry" over and over for several minutes until he gave up on the call), some guy sat down next to me, and two other people came up to talk to him. Ok, fine. This place has about 200 chairs, and is maybe 100 yards across, and is otherwise entirely empty. So I go over to the other end, and before I even manage to sit down, the movie theatre girl's boyfriend comes up and they start talking. (And now a third guy's shown up.)

If I go home, I'll be endlessly pestered by cats. If I go into a room and close the door, they'll claw at it, the whole time.

Ok, perl removal patch #3 is now checked in.

Mark's poking at linksys router firmware. Apparently my script isn't getting the CRC right (which 99% likely means it's calculating the CRC over the wrong range of the file). Unfortunately, when he uses the C version (from openwrt) to package the FWL mipsel output, that doesn't boot either. Something about it needing the length of each partition encoded somewhere? He's poking away at it, and I'll try to go over there monday evening to help frown at the code. (The bootloader's open source, so we can read through that to see what it's doing.)

I need to get a 2.6.28 powerpc kernel booting under qemu so I can move the stable version from .25 to .28. (Actually I might just _do_ that and fix powerpc later. Having stable 9 months out of date is a bit silly.)

December 27, 2008

It's sad how sucky busybox ash is: it doesn't even understand {curly,bracket,syntax} for file lists. Come on guys, this has been around for over a decade. (This came up because if you switch off USE_TOOLCHAIN, runs under ash, and it does a mkdir with a big long curly bracket list that creates a file with curly brackets and commas in its name. Bravo, ash. Admittedly this doesn't hurt anything if you've also switched off USE_TOOLSDIR, but it's ugly.)

I should really go back and poke at toysh again. (Expecting a decent shell to spontaneously emerge from busybox after 10 years... not holding my breath.) Too many things to do.

Compromised and implemented cksum for toybox. (It took half an hour, between bunzip and cat I already had most of the infrastructure, it was just a question of genericizing it. I still suspect that cksum and cat could share more code, but it's getting into one of those "size vs complexity" tradeoffs... Worry when I get more commands doing similar things.)

I should implement mkswap and swapon too, they're small and simple and I've done them before. That might be enough to justify a new toybox release, which would be nice because sources/ depends on the netcat server stuff to pass data between qemu and the host, which you need to USE_UNSTABLE=toybox to get at the moment.

One of the things I want to use Vladimir Dronnokov's dvv for is to test the build of lots of packages under toybox, so I can switch it on by default. There's several convenience things in toybox that busybox hasn't got, from "oneit" to a patch command that works with offsets. This would give me more of an _incentive_ to finish gene2fs and bang on toysh again and so on.

Probably the correct thing to do is have always install the full toybox, and then have USE_TOYBOX determine whether it's in mini-native or not. This "just toybox patch and oneit" thing is ugly. Yes, it would mean that if you don't USE_TOYBOX the resulting environment couldn't necessarily rebuild itself under itself, due to deficiencies in busybox. This is not my problem, and hacking around it just hides problems from busybox developers who might be interested in fixing them otherwise.

Ah, the 2.6.28 kernel is out. (I hadn't noticed, but I just checked why my first hg pull in 2 days didn't find any new changesets, and it turns out Linus released 2.6.28 christmas day. Merge window's open, so presumably I should push my perl removal patches on monday.

I need to update the stable version to 2.6.28. The reason it's still on 2.6.25 is powerpc, but qemu svn has added -kernel device tree support for bamboo. I should get back to poking at that.

And it doesn't work. Building for armv4l, busybox died with:

  CC      networking/libiproute/iptunnel.o
In file included from /home/landley/firmware/firmware/build/cross-compiler-armv4l/bin/../include/linux/if_tunnel.h:5,
                 from networking/libiproute/iptunnel.c:24:
/home/landley/firmware/firmware/build/cross-compiler-armv4l/bin/../include/linux/ip.h:85: error: redefinition of 'struct iphdr'
make[1]: *** [networking/libiproute/iptunnel.o] Error 1
make: *** [networking/libiproute] Error 2
make: *** Waiting for unfinished jobs....

Except that on x86 and x86-64, building uClibc dies before it even gets there. Wheee.Ok, the x86/x86-64 one was because the ongoing architecture unification renamed the #include guards for posix_types_32.h and posix_types_64.h, and uClibc's include/bits/kernel_types.h depends on that. Why? What's kernel_types.h for? (The kernel has a file #defining these already, why have a second #include duplicating these and possibly getting them wrong?)

December 26, 2008

At Starbucks, which means no internet. I really need to set my cell phone back up one of these days.

Twitter continues to be strange. Where else can you read one line posts from famous people and realize how very little they normally have to say? Just read three consecutive posts from uberlawyer Lawrence Lessig about his air travel arrangements ("@lessig second hour delay SFO2BOS just announced"), Howard Tayler of Schlock Mercenary ("@howardtayler just finished a two-hour nap. Ahhh."), and Jeph Jacques of Questionable Content ("@jephjaques Also these new chicken mcnugget commercials are utterly revolting.") Penn Jilette also posted about taking his kids out for hamburgers and a movie. Warren Ellis posting anything, really. Somehow, all this makes me proud of the internet.

Wrote a shell script to package a firmware file for linksys routers. Dunno if it works yet, I need to test it when I go home from Starbucks.

I need to write an initramfs packaging script, although it's a bit tricky. You have to compile the kernel to build in an initramfs. (You can pass in an initrd but where's the fun in that?) Right now the kernel image is build from, so I'd have to move that to the packaging script. Building the kernel twice is a bit annoying. Possibly I should just move the kernel build to the packaging step, which means it gets rebuilt every time you package but it also means I can rip out this ugly hack...

Ok, moved the kernel build to I need to rename that script. Now is building a root filesystem, and is building a kernel and creating image files. (Going by the name of the tarball it creates, it should probably be

Probably ./ and ./ would be better names for those two stages...

Watching the "cranky geeks" podcasts again. It's like watching your grandparents argue about the internet. (I'm guessing they know it too; otherwise they probably wouldn't use polka as their intro music.)

Episode 11 right now, (Current topic, is myspace dangerous for "young people"? Yes, it's literally a "kids these days" topic.) They have a woman on as a guest ("Karen Chu"), who seems quite clueful (especially in comparison to most of the rest of them), but they talk over her, and the way the microphones are set up you literally can't hear what she's saying when they do. People directly ask her questions, she starts to answer, and dvorak talks over her to answer the question. It's sad.

I remember why I stopped for a month. Still, if you want to keep tabs on what the Windows world is doing, you have to wade through a certain amount of cluelessness to get any actual information. (And some of the content of this podcast, such as the word definitions before each commercial, is hilariously bad.)

December 25, 2008

Merry christmas.

Fade and I went to see the non-sparkly vampire movie at the Drafthouse ("let the right one in"), which was better than I expected.

Poking at sh4 some more. (I'm only doing a few minutes a day, but I can't stop picking at it. It's just so broken.) I note that binutils supports sh4-nofpu just fine, it's gcc that's A) uses the name -m4-nofpu for this functionality, B) doesn't want to support it for the same sh4-unknown-linux tuple that binutils got. Sigh.

The problem with feeding --with-cpu m4-nofpu to gcc's ./configure is it makes it the default, meaning attempts to use floating point (ala uClibc's libm) try to use soft float, but --with-float=soft isn't supported in gcc for sh4. (Yes, parts of gcc are not talking to other parts of gcc properly.)

Checked the kernel revision history and it's been using -m4-nofpu for sh4 since the git repository was introduced (2.6.12-rc2). So that's not it...

Grepping through the gcc ./configure infrastructure, it turns out that sh4-unknown-linux is a fairly useless tuple, and the tuple you need is "sh-superh-linux". This is an exception to the "middle section not being parsed" rule, because consistency is anathema to the FSF.


Ok, it built through to the end, run it, and...

qemu: fatal: Trying to execute code outside RAM or ROM at 0xa0000000

Well that's nice. And it does it for both zImage and vmlinux. Right, out of ideas for the moment.

Forgot to mention that I went over to Mark's on tuesday where we spent several hours getting his debug adapter for the router to work. (Those suckers are _way_ too fiddly.) Finally bent the pins into the proper configuration, after a binary search for the dead component that had us going to Fry's and buying a new USB->serial adapter along the way. Plus he needed to break a new ethernet connector in the correct way...

December 24, 2008

Much cooking today. I bought a turkey last night, which I am attempting to perpetrate today. Full of stuffing, of course. I bought eggs too and we had milk, so that suggested custard. More mini-pumpkin pies (with splenda instead of sugar so Fade can eat 'em), and the leftover pumpkin pie mix makes a good base layer for a chocolate pudding pie (again sugar free).

Possibly I'm overcompensating for the culinary disaster a few days ago where I A) learned that flour we've been carrying around since Pittsburgh tastes kinda mouldy after a year and a half of Texas heat (especially since one of those years Austin suffered Houston levels of humidity), B) spreading a layer of cookie dough uniformly across the entire sheet and baking it does not necessarily produce "cookie", but may in fact attempt to make bread out of cookie dough (which does not work at all).

We forgot to update the Netflix queue so it sent us another disk of heroes. We haven't watched the disk we already had because there's too much chance of some character I like getting their brain eaten again for it to be casual viewing, so it sits there. Maybe we'll watch the movie disk ("The Transporter") instead.

Trying to get a little programming in today, I left off halfway through poking at sh4. The build target the kernel wants from the compiler is nofpu, but I'm building libm in uClibc, and that needs at least soft float, but gcc 4.1 doesn't support --with-float=soft for sh4. Fun.

However, the kernel configuring the compiler to disable floating point doesn't necessarily mean that userspace doesn't get floating point? Except that the process scheduler has to be floating point aware to save and restore the FPU registers on a context switch? Hmmm...

Unfortunately, whether I tell uClibc to use an fpu or not, it dies with:

libc/libc_so.a(hcreate_r.os): In function `hcreate_r': hcreate_r.c:(.text+0x9c): undefined reference to `__udivsi3_i4' libc/libc_so.a(strftime.os): In function `strftime': strftime.c:(.text+0x534): undefined reference to `__sdivsi3_i4'

Which is weird. libgcc.a has __udivsi3 but not the _i4 suffix. More soft float/hard float conflict? Sigh.

I'm looking at the kernel .config, and CONFIG_SH_FPU is enabled, but the kernel build is selecting -m4-nofpu. How does that work?

December 23, 2008

Yesterday Fade wanted to know why Reuters and the Associated Press don't let their content stay on the web long. It's because they're old newspaper service organizations that want to charge for access to their archives. Places like Yahoo news subscribe to their content, then have to take it down after a couple weeks.

It's funny that most of what future generations are going to know about 1995 onwards will be from and similar. If it's not electronically searchable, it won't matter, plus I can already fit more information on my USB key than all the books in every library in Austin combined.

But old archives decay due to lack of interest. I remember when Bill Clinton got elected, CNN tried to dig up the tape of the speech he gave at the democratic convention in 1980 (when Carter won the nomination), and the tape had degraded badly in storage. Digital storage generally doesn't literally bit-rot that badly, but we've lost the ability to read some old digital storage media already (no more of some kinds of old tape drives), and lots of stuff like the original PC hard drive (not an ISA controller card) or 8 inch floppies are nontrivial to read anymore. (I myself found some amiga disks with interesting files a few years ago, but I haven't had an amiga in years. I keep meaning to go through the old floppies and zip disks I've dug up unpacking boxes. I even still have the drives, and Linux should still support them... but they won't fit in my laptop, so I procrastinate.) And even if you can get the data out, imagine trying to read news entries stored in a Foxpro database. (It was really big back in the 80's, on DOS.)

Project Gutenberg will scan in and OCR the public domain books, but in 100 years will anybody remember that UPI (a competitor to AP that went belly up a few years ago) even existed? Neither Reuters nor AP is likely to outlive the newspapers that were their bread and butter by too long, but we'll probably have the Wikipedia edit history for the forseeable future. Scary thought, isn't it?

So, according to -dumpspecs the option the sh4 compiler wants is -m2a-nofpu, and the one Linux is feeding it is -m4a-nofpu. There's no way the compiler should be that fiddly. (Also, gnu's own standard is that single dash options means that -blah == -b -l -a -h (or sometimes -b -l ah if -l takes an argument), and that double dashes means an option gets parsed as a word instead of individual characters. Yet --dumpspecs isn't recognized, but -strip and --strip both are. Good programmers avoid unnecessary special cases. The FSF encourages them.)

Hmmm, now I'm looking at the link order in the compiler wrapper (recently renamed to ccwrap.c), calling "gcc -v" out of the ubuntu version to see what it's doing on the linker line, and regrettably assuming that behavior is probably correct. Without --static, the startup code is crt1.o, crti.o, crtbegin.o and the end code is crtend.o, crtn.o. With --static crtbegin.o becomes crtbeginT.o, but crtend.o doesn't change. With -shared they become crtbeginS.o and crtendS.o. If I feed in both -shared and --static the compiler throws a wobbly. And despite what the wrapper I inherited thinks neither -fPIC nor -fpic changes anything, and those _are_ compatable with --static. (So -fpic --static uses crtbeginT.o and crtend.o.)

Needless to say, this is not what ccwrap is doing. But I can fix that!

Hmmm, is this a gcc 4.1.2 vs 4.3 issue? As far as I can tell, this version supports -m2a, -m2a-single, -m2a-single-only, -m2a-nofpu, -m5-compact, -m5-32media, -m5-64media, and -m4al... Ah, grepping through the gcc source I find m4-nofpu in gcc/config/sh/sh.h, guarded by STRICT_NOFPU. Ok, what sets that? Um... Nothing? (Grepped the whole source tree, the only occurrence of STRICT_NOFPU is in that #if statement.) That's kind of sad.

Ok, try building the toolchain --with-cpu m4-nofpu... And uClibc dies because it wants floating point. Of course. (Did I mention I had an sh4 system image building already, I just didn't have a uClibc instance that would run it?)

Ok, tell the uClibc .config it hasn't got an FPU. And it's dying because I told it to build the math library and that needs soft float. Ok, fire up soft float...

December 22, 2008

It's too bad there's no permanent links to Reuters or AP news articles. There's a good one on peak production that'll probably be gone in a week. (Hopefully Reuters and AP will be gone not much later, so their reporters move on to places that DO allow their content to be archived.)

Yes, my interest in this topic continues.

This article's about OPEC cutting supply more, in response to lower oil prices. It explicitly says that peak production is still in play, the drop in prices is due to a big drop in demand worldwide. The interesting bits are:

After slashing a combined two million barrels daily, 7.3 percent of its output at two previous meetings, OPEC was on course to chop production by at least another five percent.


Equally gloomy is the U.S. government which expects global oil consumption to shrink this year and next -- the first time since the 1980s demand had contracted for two years running.

Oil use has now fallen in the world's top three oil consuming nations -- the United States, China and Japan. About 86 million barrels of oil are burned worldwide each day.


In the past, any collaboration has been unconvincing. Non-OPEC output is stagnating because of aging fields and underinvestment, and any declared cuts could merely mask the decline.


In 2001 OPEC cut by 5 million bpd in four stages, 19 percent of its supply, laying the foundation for a six-year boom in oil prices that culminated this summer in a record $147.27 a barrel.

OPEC's biggest cut by volume was in April 1999 when it reduced production by 1.716 million bpd, according to Reuters data.

So as prices were going up, they cut production. As prices are coming down, they cut production. Spot a trend here, anyone?

And the word "underinvestment" is amusing. Spending lots more money (more than the total spent "developing" the field so far) to slow the rate of decline after the field's natural production has peaked merely extracts the same total amount of oil slightly sooner. Spending more money without getting more actual oil in return makes zero economic sense, which is why they didn't do it. Cutting production is a way of avoiding that; they're getting near the point where they'd have to cut production _anyway_ unless they want to upgrade their pumps and injectors and maybe sink additional wells into the same fields the existing pumps can already suck dry given enough time. Now they're in a situationo where cutting production makes economic sense to match cuts in consumption. Makes their job much, much easier.

All along, their big worry was the price of oil would rise to the point where alternative energy sources became _cheaper_, and people started funding research into them not out of altruistic or environmental motives but because there was money to be made in the near term. The massive price decline in oil is a mixed blessing for OPEC; it shrinks their paycheck but diverts even more money away from the competition. (Unless Obama's smart enough to talk congress into investing in the future _before_ it becomes an imminent crisis.)

Not much programming today. Holidays. A truly disastrous attempt at cookie baking, but not much else of note.

Ooh, strike that, my Neuros box arrived. Now I just need an HDTV to hook it up to. (Can we say "after christmas sale trip to Fry's"?)

December 21, 2008

Fade and I hit the mall and did our christmas shopping, and now I have a PSP again! (Yay Disgaea.) Definitely with the protection plan this time since it's our _third_. Sheesh.

My sound cancelling headphone make excellent earmuffs while walking to The Donald's (admittedly with the sound cancelling part switched off because walking near traffic while deaf would be bad). And they plug into the PSP. (Etna is now level 5.) Unfortunately, it means when I get there my fingers are a bit stiff and it's hard to type, because it's COLD out there. (We have reached the yo-yo portion of the season, where the weather wanders between the 80's and the 30's twice in the same week. This is normal for Austin.)

Poking at making an open source version of the Cisco toolchain again, from publicly available sources. (No, Cisco isn't paying me to do this, most of those engineers are off for the holidays and not even answering their work email. I'm doing it because I'm disgusted with the FSF and would love to undermine Mepis II any way I can.)

The interesting thing here is that OpenWRT has had no problem building Linux for this hardware, so either A) Broadcom's patches weren't needed, B) they went upstream already some time over the last 5 years.

Last time, my attempt stopped because gcc 4 won't build gcc 3:

../../gcc-3.2.3/gcc/read-rtl.c: In function "read_rtx":
../../gcc-3.2.3/gcc/read-rtl.c:662: error: lvalue required as increment operand
make[1]: *** [read-rtl.o] Error 1

Of course I consider this an obvious, glaring flaw in gcc 4, and this sort of thing is why you can't just use a _current_ gcc toolchain to build linux 2.4.20 and such. So this time I've installed the oldest toolchain Ubuntu's got (gcc 3.4) and set CC=gcc-3.4 before trying to build it.

For the record, the versions (and URLs to existing public source locations) seem to be:

glibc 2.2.5 GNU ld version Kernel headers 2.4.20 mipsel-linux-gcc (GCC) 3.2.3 with Broadcom modifications

That's based on looking at the symlink for glibc, running ld --version and gcc --version, and looking at "include/linux/version.h". Yes, gcc --version announces itself "with Broadcom modifications", which is apparently why the FSF is suing Cisco.

According to gcc --verbose, the broadcom gcc was configured with:

configure -v --with-bcm4710a0 --target=mipsel-linux --prefix=/opt/brcm/hndtools-mipsel-linux-3.2.3 --with-headers=/opt/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux/include --enable-languages=c,c++

Ok, I've built a compiler with no threading and no C++ support, and I think I need to build glibc with it and then re-build the compiler with threading and C++. (Trying to build a full-featured compiler before glibc died because both threading support and libstdc++ try to include libc headers.) I should download an older Linux From Scratch that uses gcc 3.2 to see if there's any magic I've forgotten. (Again, I'm messing with stock sources. The fact this is fiddly and difficult is the FSF's fault, not Cisco's.)

Meanwhile this toolchain mangling got me poking at sh4 again. QEMU has a 3po r2d target for sh4 which claims to have a network card and a hard drive, and there's even an arch/sh/configs/rts7751r2dplus_qemu_defconfig in the Linux source. But when I grabbed that, squashed it to a miniconfig, switched off a couple of the dumber options (do not call git to append version info), and built it, the kernel build died with:

  CC      scripts/mod/empty.o
cc1: error: command line option '-m4-nofpu' is not supported by this configuration
cc1: error: command line option '-m4-nofpu' is not supported by this configuration

I think feeding gcc "sh4-unknown-linux" is actually building an sh2 compiler. Need to poke at this some more over the holidays. (I could downgrade the kernel config's cpu version to something more generic, but where's the fun in that?)

I also need to go bang at sparc again. And qemu svn 6070 is really interesting on the powerpc front:

r6070 | aurel32 | 2008-12-16 18:03:01 -0600 (Tue, 16 Dec 2008) | 3 lines
Changed paths:
   A /trunk/pc-bios/bamboo.dtb

Add bamboo.dtb compiled from bamboo.dts

Signed-off-by: Aurelien Jarno 

That's a binary device tree file, fed in bypassing open hackware, in order to use -kernel with a powerpc 440 board. YES! That's exactly what I've been doing using Milton Miller's patch, maybe I can use that infrastructure to boot various other boards more cleanly...

December 20, 2008

Met with mark today, deposited the first check for Impact Linux. Woot! The company exists! Now we need to find an accounting company to cut paychecks for us from the corporate account with the right witholding and payroll taxes and such.

Started a world domination todo list for FWL. Mostly a question of looking at other build systems, figuring out what they can do that we can't (targets supported, packages they can build) and working on the appropriate correct way to do that under the new build system.

Mark's poking at gentoo until new years, and also packaging the result to boot on a linksys router, so I can hold off on those two focus on remaining build system items and maybe the LFS build script.

I'm told GCC 4.3 requires two more environmental dependency packages (gmp and mpfr) in order to compile. That's sad. Binutils will happily merge libbfd, but gcc wants to split itself up into dozens of separate packages even though you need more than one of 'em to build "hello world". Somebody needs to fork gcc at the last GPLv2 release (4.2.2 I think, need to check) and maintain that, because the FSF has gone totally around the bend and the community shouldn't depend on it anymore.

PCC and llvm/clang are interesting, and even tinycc is starting to show signs of life. (Although until they cut a release from something other than the CVS repository the project is still dead to me. (Even uClibc and BusyBox are looking to move from svn to git; they haven't moved TO svn yet. In 2008. Yes, really.)

But Linus chose to use gcc instead of the Minix compiler back in 1991 and that's what Linux has used ever since. It's not _hard_ to write a new compiler. (Not only did Fabrice write otcc as almost a joke, but Linus himself wrote the parser half of one in "sparse". It might be interesting to see if qemu's new TCG and sparse could be glued together into a Linux compiler.)

Until a viable alternative is ready, it would be nice to take the last sane version of gcc and binutils and add various new architecture support and bugfixes to it until such time as a new compiler with an active developer community is ready. It wouldn't be the first time (EGCS) that the gnu version was deemed unusable and the community decided to go a different direction.

This would also solve problems for the qemu guys, who are stuck between wanting to take code from the GPLv2 only Linux kernel (for device drivers) and from the GPLv3 only binutils for target architecture instruction sets to emulate...

December 19, 2008

I am deeply amused that the December 12th episode of Countdown, story #5 about the Republicans killing the auto industry bailout, is quietly entitled "EPIC BAIL" in the footer below the picture. (I wonder if Alexander Hamilton's "1791 report to congress on manufactures" is on the net anywhere. I'm offline at the moment. I REALLY need to reconfigure my cell phone internet...)

I've leared that discussing the FSF makes me swear. Ordinarily I don't use _any_ profanity in my language, but to me Bruce Perens' middle name begins with an F, and what I want to tell the FSF to do ends with "off". It's pretty much the only use I have for George Carlin's favorite word so far.

Poking at the gcc wrapper, cleaning it up to prepare for adding distcc-like functionality to it. Found out that "gcc hello.c -l pthread" won't work through the wrapper, only "gcc hello.c -lpthread". Yeah, that needs fixing.

Trying to make a gcc toolchain with the old package versions in the cisco toolchain for wrt. Hampered a bit by the fact that gcc 4.3 won't compile gcc 3.2. (For the same reason I need an old toolchain to build the public wrt source release: new versions of gcc are not a drop-in replacement for old versions because the FSF broke stuff.) Need to install gcc 3.4 and see if that'll compile it.

December 18, 2008

Work on Firmware Linux often seems it's crawling along at a snail's pace, and the reason is that I don't want to just produce yet another build system. We've already got buildroot, openwrt, gentoo embedded, tuxbuilder, and a dozen others. Cross Linux From Scratch describes how to create your own.

What I'm trying to do is produce clean, minimal infrastructure to do exactly one thing and do it well. And this means that a lot of the time I get something to work, and then decide I shouldn't be doing it, and rip it back out.

For example, I implemented a .config option to add uClibc++ support to, kept it in my working directory without checking it in for a week, and then ripped it back out again. Because I'm following the Python mantra rather than the Perl mantra: there should be one obvious way to do it. I want one code path I can support and test, not a bunch that may or may not work because I last tested that particular variant a year ago.

If you want to build C++ programs with FWL, building under emulation with the native compiler is supported, and that provides uClibc++. The cross compiler provides just enough support to 1) build the mini-native stage, and 2) act as a distcc accelerator. Adding uClibc++ to the cross compiler adds another code path which A) I wouldn't regularly regression test, B) I don't want to field bug reports about.

The VAST majority of the the FWL design consists of Not Going There. Figuring out where not to go, why not, how to avoid going, and so on. Making a big complicated build system is trivial. Making a small simple one is HARD.

The current issue I'm poking at is that distcc really shouldn't be cross compiled. You can build it under the target system; it's not _needed_ for the target system to rebuild itself, or to arbitrary packages (such as distcc). This means the build is not currently creating a truly minimal target filesystem, and not doing the smallest possible amount of cross compiling. That's a divergence from the primary design goal of the project.

But it's _convenient_ to build distcc during mini-native, and it's working fine at the moment. (I broke it recently, but fixed it again.) From a user interface perspective, being able to download a prebuilt system image that already contains distcc is nice. The run script needs distcc support to invoke it properly from the host (running distcc hooked up to the cross compiler), and removing it at this point would be a feature regression from the 0.9.5 release.

Building distcc in mini-native is convenient, but there's a lot more that could be done to fluff up the target filesystem into a richly featured development environment, adding zlib and perl and python and dropbear and mksquahfs and so on. But all that can be built under the target filesystem. This implies another build stage is needed, some kind of "". The distcc build can move into it, and then zlib and such can be added on top to produce a full-featured build environment.

The reason I haven't done this is it's a can of worms. Assume we start simple and have a single script build a preselected list of packages: how do you say what packages should _not_ be built here? What's the bright line beyond which we can say "no"? (In this case, one size is unlikely to fit all.) So the package list is likely to grow, and once the list of packages the script is building gets long enough, do you stick if statements in there to let packages be selected? Doesn't that introduce the need for dependencies (X needs Y to build, if you disable Y some combinations won't build). Wouldn't it be cleaner at that point to break it up into individual build scripts, each of which can check for the prerequisites it needs?

At which point, we've fallen into the trap buildroot fell into: we're in the distro business. Not going there, and not setting foot on any path that logically leads there. The native bootsrap strips should get us building an existing distro, so package management is somebody else's problem.

Unfortunately, punting distcc support into LFS or Gentoo isn't really an option either; there's nontrivial configuration involved, which would need to be replicated in each distro bootstrapping script, and potentially lots of stuff to build (slowly, without distcc) before those systems can supply distcc. And note how "one obvious way to do it" and "one size does not fit all" come into conflict here: should I remain agnostic about which distro you want to build, or should I focus on supporting one or two I think are good fits? Ideally, documenting/scripting how to bootstrap each distro from a minimal build environment is a whole separate project, so doing doing that is even more of a layering violation. If distcc is an attribute of the native toolchain, then retrofitting it into the native toolchain from a distro bootstrapping script is wrong too.

This is the time consuming type of connundrum: what I'm doing now is wrong, but the obvious alternative is also wrong. The speedup from the distcc trick is significant enough that _not_ offering it isn't really an option, and removing it in the name of a conceptually "cleaner" design is unacceptable.

Of course the cheesy way past this would be to redefine the problem space by adding distcc and distccd to toybox. A slightly less disgusting option is to add distcc functionality to the existing compiler wrapper...


December 17, 2008

I've been reading Gentoo documentation for the past few days. It's kind of hard to tell where to start. I've got the Gentoo Embedded Handbook, the base Gentoo Handbook for x86, the Networkless installation Handbook, the Quick Install Guide, the alternative installation method HOWTO, Installation Tips & Tricks, Frequently Asked Questions, and the Ebuild HOWTO. I've downloaded the install CD and the livecd, and the stage 1 and stage 3 tarballs.

The Gentoo Embedded Handbook seems primarily about cross compiling, and the quick install guide basically boils down to chrooting into the stage 3 tarball and running an install command in there, so I'm rereading the gentoo base handbook. (It's been about 3 years since I last looked at it).

December 16, 2008

I have a cold. Long naps today to try to shake it off.

Fixed a bug in the perl removal patch, and another bug with distcc. Moved the FWL mailing list from to (I should do the same with toybox when I'm feeling better.)

Went to bed early. By my definition of early, anyway.

December 15, 2008

Heh, there turns out to be experimental evidence that the "invisible hand of the market will fix everything without regulation" people are provably wrong. Human nature repeatably causes stock market bubbles and crashes in laboratory environments, as everybody tries to corner the market, beat the system, and win the lottery.

It turns out that markets efficiently regulate themselves when individual participants only have to care how much they themselves would pay for something, so they can decide whether to buy it or not. But when they start having to care how much somebody _else_ would pay for it, they start playing poker, bluffing and raising, trying to find a sucker, then cashing out.

Working on summary of my gripes to the FSF and the SFLC about the Cisco lawsuit. Dunno if I'll publish it as an open letter or just send it to 'em directly. Leaning towards the first.

It _is_ kind of annoying to read comments on from people who got pointed at my blog but are _sure_ that I'm only mad at the SFLC because Cisco gave me money. Leaving aside the amount of money the SFLC gave me The number of _other_ companies that have offered me work so far this month increased to four today, and we're only halfway through the month. (Apparently, an economic downturn is a good time for tech companies to invest in Linux.)

So the Governor of Illionis tried to shake down Obama for money to determine who to appoint to replace his senate seat. As far as anyone can tell, Obama's Chief of Staff Rahm Emanuel responded to this by:

As political maneuvering goes, dropping a nuke while maintaining plausible deniability is about as kickass as it gets. It's refreshing to see a presidential administration that can make the _other_ guy look stupid. (Ok, maybe this one was easy, but still.)

Yeah, I'm behind on my podcasts. (Rachel is having waaaay too much fun with the dramatic readings of the wiretap transcripts.)

So it turns out that the is just a debugging thing, so all I needed to replace was, which is basically a call to sed piped to unifdef for each file. There's NO WAY they needed perl for that.

Checking the results, there are a couple of whitespace differences I don't really care about, and this hunk:

--- walrus/include/linux/reiserfs_fs.h  2008-12-16 00:16:26.000000000 -0600
+++ ../walrus/include/linux/reiserfs_fs.h       2008-12-15 23:29:22.000000000 -0
@@ -84,7 +84,8 @@
 #define RFALSE( cond, format, args... ) do {;} while( 0 )
-#define CONSTF /*
+#define CONSTF 
  * Disk Data Structures

The old perl script moves the start quote on to the #define line, the new shell script I did has it on the next line. I'm pretty sure mine is right and Peter's perl is broken, but it's reiserfs so I can't say I strongly care either way.

Uncovered a bug in my toybox patch program while I was at it. Brown paper bag time, but also a trivial fix. (When deleting a file, use the variable name that's been adjusted for -p, not the one with the original full length path.)

I need to do another toybox release soon. This is a "can't apply this patch without that fix" thing, so until I get a release out if you build "USE_UNSTABLE=linux" you actually need to do "USE_UNSTABLE=linux,toybox". So I need to upgrade toybox before upgrading the kernel.

December 14, 2008

3 am, and Whataburger is full again. It's been packed for an hour now. I like the 24-hourness of Austin. Up north everything shuts down at 10pm, unless you're someplace like NYC where it's too expensive to relax.

The acoustics in here make it a bit difficult to catch up on my podcasts with this many nearby tables full, especially since the batteries in my noise cancelling heaphones are running low. But if I was at home, the horde of cats would prevent me from getting any work done. (Too bad I can't get The Daily Show via podcast.)

Of course yesterday, hanging out at not-Metro during its brief stint of 24-hourness (for finals), the only couch in the place near an electrical outlet had a homeless woman sleeping on it for 4 hours, taking up the whole thing. (Back before the start of the Bush administration, this simply wasn't an issue. I still miss the Austin of 10 years ago. Uphill, both ways apparently. Oh well.)

Mark has the weekend free in California, planning to go to Disneyland today. (Or is it Disneyworld? I can never keep that straight. I grew up near the one in Florida. My mother apparently got to go to it before it officially opened, while she was pregnant with my older sister, because she knew one of the people who helped build it and got in on the special pre-opening weekend. I sort of took it for granted, growing up. I vaguely recall the one in california seemed small and cramped the one time I was there, and things like Six Flags Over Easy are only interesting for the roller coasters. I still like the teacups.)

Nostalgic mood, for some reason.

Alas, perl has metasticized further through the Linux kernel build. Now "make headers_install" has got it, scripts/ and scripts/ Because nothing says "maintainability" like Perl.

I'm starting to see the appeal of BSD. Too bad their license will never let them amount to anything. Every time a BSD licensed project gets significant momentum, their developers are hired away to work on a proprietary fork. Sun hired Bill Joy away to work on SunOS in 1982, and it took the open version a decade to recover. When they did, BSDI hired Bill Jolitz and the remains of the Berkeley Computer Science Research Group back around 1990 and then made life hard for Bill's open source version. A decade later FreeBSD had managed to become interesting so Apple hired Jordan Hubbard to start MacOS X.

With a BSD licensed project, for-profit companies can fork the codebase and offer to pay developers for their hobby, inviting them to make a lot of money working on exactly the same code they already play with. Perhaps the companies promise 'em they can still work on the open version in the evenings (and then work 'em 90 hours a week so there's no time), or perhaps they say portions of it will be open sourced tomorrow, and the definition of "portions" changes and tomorrow never comes. You don't need to hire away _all_ the developers, just enough to disrupt the project and kill its momentum.

This is why BSD unixes have historically never amounted to much: every time they get momentum, it attracts proprietary interests to strip-mine its developer base. With a GPL codebase, if you try to hire away the developers you either start over from scratch (much harder to engage developers' enthusiasm and leverage their expertise that way), or you keep the code open as a condition of having permission to distribute it at all, to anyone. Linux won not because it had superior technology or even superior technical decisions, but because the GPL (version 2) acts as an immune system for the project.

December 13, 2008

For another fun "what is wrong with these people" detail about the FSF's lawsuit against Cisco, read my September 19th meeting with Brett Smith, the single person who is the entirety of the FSF's current license enforcement devision. Notice how when I met him back in September, he didn't really know _anything_ about the Mepis lawsuit, because he was new on the job and it had been done by his predecessor.

So when the the Cisco complaint says they've been in talks with Linksys for five years, who is "they"? The SFLC hasn't existed that long. The current guy in charge of FSF licensing hasn't even been around as long as the SFLC; the Mepis thing was only two years ago and it predated him by so much he wasn't even familiar with it. If you carefully read the complaint detailing the exchange between the companies, the first time the plaintiff did anything "through its counsel" (the SFLC) was step 38 on February 15 of this year (page 11).

The Mepis thing is an area of personal interest for me, because I think the FSF was a bully. When Erik and I signed up with the FSF SFLC in the first place, I wanted to make VERY CERTAIN that we wouldn't be bullies and launch that kind of abusive, counterproductive lawsuit.

What the SFLC has made very clear to me in the past couple days is they do not exercise any kind of judgement over the suits they file. They act entirely at the behest of open source project copyright holders, and that includes the Free Software Foundation. They are a mindless tool, like a knife, and it's one I don't want my fingerprints on anymore.

Still trying to take the weekend to cool down, though.

Poked at vladimir's build again today. The cmake website is back up, but this time it died with a 403 Forbidden error trying to wget udev from No comment.

Grinding away at the last third of the FWL documentation. I need to clean it up and integrate my old "why cross compiling sucks" document, and my OLS presentation on beating reasonable behavior out of gcc, and I need to untangle _that_ from the "what's in the root filesystem" bits.

*boggle* Why on earth is genext2fs allocating 3.3 megabytes for the lost+found directory when the entire filesystem is 67 megabytes? (And it hasn't got an --exclude option to skip any files from its source directory.)

I really need to go back and finish the toybox gene2fs command.

December 12, 2008

Still fighting fires caused by the SFLC and the FSF doing the "bull in a china shop" thing. I don't think I'm signing off on the FSF SFLC doing any more busybox lawsuits. Ever. (Erik might, up to him.)

Does this mean that the busybox license would no longer be enforced at all? Up to Denys, really. I now think the existence of the SFLC does more harm than good, and don't want to be associated with them anymore. Whether I'll feel the same on Monday, I dunno, I'm taking the weekend to cool off.

However, allow me to quote a clause of my contract with Cisco:

Consultant agrees to perform, during and after the term of this Agreement, all acts deemed necessary and desirable by Cisco to permit and assist it, at Consultant's hourly rate, in obtaining, maintaining, defending, and enforcing Rights with respect to such Inventions and improvements in any and all countries. Such acts may include, but are not limited to, execution of documents and assistance or cooperation in legal proceeding...

So there's a small but nonzero chance that if the suit over the Linksys build system goes to trial that I would be on Cisco's defense team working against the SFLC. Maybe even testifying in court against them. Considering I still think the SFLC is in the wrong here, I'm pretty happy with this.

No, obviously there was no conflict of interest here and the fact I learned about this from _Slashdot_ rather than from them (not even a courtesy call when they put out the press release)... Well, that's just peachy.

On the bright side, the uClibc utils are building properly now. (The makefile dependencies are still screwed up and -j doesn't work with both install targets on the command line at once, but I gave up trying to untangle them and just made a for loop that invokes make twice with all the big complicated arguments.

I poked at Vladimir's dvv some more. Removed his mirror (which doesn't work anymore), and did a "make" but it died because the sources weren't downloaded yet. Did a "make sources" and it died because the cmake website is down. (This is why the ./ infrastructure I implemented in FWL has fallback mirrors. You can insert a PREFERRED_MIRROR in front, but that's not the default behavior and it's not all or nothing either.)

Way, way too much wheel reinventing this week. Things that I thought I already had a good solution for, which other people don't want to reuse and instead reinvent badly. (At least Vladimir has a good excuse; he's doing this as a learning experience.)

December 11, 2008

Oh no.

Darn it. Everything I talked about last week is now "under review". And lots more cool stuff I didn't talk about because I'm not sure how much is public yet, and I didn't want to steal their thunder if they had their own press releases pending, and I didn't want to interrupt negotiations with vendors, and because I'm not an official Cisco spokesbeing, and because I honestly didn't remember the details of hallway conversations.

For example, an engineer told me about Cisco changing their procurement policy so hardware vendors need to provide open source drivers in order for Cisco to buy their components. Was this "they might", or "they will" or "they already did"? Did it mean they merely require the vendor to provide open source patches, or did that mean the vendor needed to make a commitment to merge it upstream into the appropriate project? (And if so, would that mean it already need to be merged when the signed the contract, or did it need to be merged before Cisco's device using it shipped?) I have no idea. I vaguely suspect they were formulating a policy and asking me for advice. So I had a _reason_ for not talking about it before they put out a press release, but it was a Good Thing and I very much wanted to see them follow through on it because it would make life easier for the entire embedded Linux community.

But now thanks to the FSF and the SFLC, Cisco's entire across the board push into Linux is "under review". I have no idea what that means, other than that it's blown up in my personal face and I am pissed.

I'm not sure I want the SFLC to enforce my busybox copyrights anymore if they cause this much collateral damage doing so. I thought they were doing good. Half the reason I went with them in the first palace is that they were NOT the FSF, that had distanced themselves from the FSF and their suits _weren't_ like the one against Mepis. (I remember agonizing about signing on with Harald Welte's suit in Europe because FSF Europe was involved. But I met the FSF's license enforcement guy back when we were together on that HP panel in september, and he seemed perfectly reasonable, and decided to try to be less harsh on them...

And this happens.

I wrote a big long "what the hell is going on" at Dan Ravicher (since the SFLC's press release on the issue quoted him), and he replied:

> I'm sorry to hear you are upset with a matter we've undertaken on behalf
> of another client, Rob.  I'm happy to speak with you about your concerns
> any time you'd like.

Thanks, that really helps with my massive loss of confidence in the SFLC's judgement and my visceral reaction to them getting back in bed with the FSF and filing a Mepis-style lawsuit. That makes it all better.

Did _all_ the lawsuits do more harm than good? I just wanted people to respect the GPL. I didn't want to go back and re-sue the same people five years later after the busybox web page held them up as an example of how to do license compliance right...

I'm going away from the computer to calm down now.

December 10, 2008

Cafe Medici, "That which hath replaced Metro", is open 24 hours through finals week. I'm here at 2am, the internet is working, I have hot chocolate and a quite reasonably priced day-old cinnamon roll... Life is good.

So, I've got readelf, ldd, and ldconfig installing both in the native system and the cross compiler. As a side effect, I noticed that the mipsel busybox is statically linked, which is sad. Not sure _why_ this is the case yet, though.

Yay, QEMU svn 5914 removed dyngen! (Later commits like 5922 and 5936 continue to cleanup now unused remnants, but it's _gone_ now.) And this means that qemu now builds with gcc 4.x!) Ok, now I _really_ need to catch up on the qemu weekly news summaries.

Pondering adding uClibc++ support to (I can never remember if it's cross compile or cross compiler. Both in that script name and in the environment variable you feed to the Linux kernel.) It's easy enough to do, but I really don't want to have to _support_ it. (Trying to cross compile C++ is just a bad idea on so many levels...)

New versions of gcc continue to suck even worse than older versions. For example, gcc 4.3 spits out pages of these errors:

/home/landley/firmware/firmware/sources/toys/gcc-uClibc.c:177: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result

And another screen full of repeats of the above. Let's go through what's wrong with that, shall we?

If you were wondering what motivates the pcc and llvm/clang developers, it's because each new version of gcc gets _worse_ in many important respects. (The "may have been used uninitialized" warnings were bad enough. This is on top of that.)

A sad day; the McDonald's double cheeseburger is no longer a dollar menu item. They now have the "McDouble" (which is the same thing but only one slice of cheese), but it's a sign that the whole thing is likely to drop off soon. Apparently, just because the economy has imploded doesn't mean we haven't still got galloping inflation.

December 9, 2008

The Bush administration started with the dot-com crash and the domino-like collapse of Enron, Worldcom, and a couple dozen other major companies. It's ending with the collapse of the banking and automobile industries. In between he ran up more debt than any other president in history, replayed Nixon's vietnam and domestic spying, Carter's oil crisis and stagflation, Ulysses S. Grant's corruption, Herbert Hoover's economy, and Andrew Jackson's ignorance.

But the thing about the Bush administration is that it's _over_. Yeah FDR had his hands full cleaning up after Hoover, and Obama has his work cut out for him. But the boil has been lanced.

Fade and I went to see Quantum of Shoelace today. (I remain annoyed at the "disposable girlfriend" trope; yes I know it's a staple of bond films, this time they were even doing an homage to goldfinger, and it actually made sense in terms of the plot, but still.) Other than that, the movie was pretty darn kickass. I'm still curious about Leo's take on it...

December 8, 2008

Spent most of today chasing the paper trail for Impact Linux LLC. I need to file a DBA so I can stop saying "LLC", for one thing. Found the EID, went to my credit union to resurrect the company bank account (it's earned 15 cents interest, woo!) but the credit union isn't licensed to help me with tax paperwork. Ok, went to H&R block and talked to them a bit, then made an appointment to talk to a small business specialist on Wednesday. Still need to find some paychex/administaff style "corporate maid service" accounting company that can deal with tax witholding and health insurance and so on. (Basically I want to be a W2 employee of my own company; there are services out there that do this, I just need to pick one.)

I still suspect that if Mark had been the one doing this instead of me it wouldn't have taken all day. :)

Caught up on email while doing laundry, and now I finally can sit down and get some actual programming done. It's 7pm, I've been carrying my laptop around with me all day, and I've gotten maybe 2 hours to actually use it so far. Oh well...

So readelf and ldd aren't cross compiling because the gcc wrapper isn't parsing the -M options properly. -M and -MM imply -E, but -MD explicitly does _not_. So it is possible to have -M options on the command line and still be compiling and linking output. And in fact, that's what the uClibc readelf compile is doing, supplying "-MT utils/readelf -MD -MP -MF utils/.readelf.dep" is just producing a dependencies file as a side effect. (I don't know why it's doing this, but oh well.)

The reason the wrapper needs to know whether or not it's linking is it needs to know whether ot add crtbegin.o and such to the command line. There's some ugly "sawdotoa" crap in the wrapper that tries to figure out retroactively when the -M it saw didn't mean it's _not_ linking, but that's just a heuristic based on detecting .o and .a files, which doesn't help the uClibc build. So really, I need to rip all the sawdotoa stuff out and just properly parse the -M flags in the first place.

According to the gcc man page in Ubuntu 8.10, the full set of -M flags are -M, -MM, -MD, -MT, -MMD, -MQ, -MP, -MF, and -MG. Only the first two imply -E and thus no linking, so I guess those are really the only ones we have to care about...? Hmmm... I think I can rip about just about all the existing infrastructure for this, the only important thing is the linking flag.

December 7, 2008

Back in Austin. Plane got in yesterday, petted many cats, jumped Fade, slept for 15 hours. Still somewhat groggy.

This afternoon I met Mark and went over the Cisco thing. They seem interested in hiring him, to work with me, through that "Impact Linux" company we've been trying to start forever. I'm all for this.

Mark was kind of tired because he's been on call all weekend. I called him from the Las Vegas airport yesterday and tried to get him to meet Stu and me for dinner, but he wound up cancelling because somebody at work unplugged a rack of routers they _thought_ had dual power supplies but which weren't set up right, and this took down the transaction database for four states and transactions timed out before they could reboot the servers, and it turns out they didn't roll back properly (due to Visa sending different messages than Mark's company's reading of the spec says it should in this situation), and then they had to figure out where the money went and where it _should_ be... Yeah. So we wound up going to Fuddrucker's today instead.

I now have copies of all the Impact Linux paperwork. (I used to have copies but Mark knew where his _were_, so I borrowed those, went to kinko's, and then stuck the originals in the mail to go back to him.) Tomorrow I need to find an accountant to bring it all up to date, and look at paychex or administaff or some such. (We filed the original paperwork in mid-december 2007 and didn't do anything with it before the end of the year; do we need to file tax paperwork for 2007? Probably.) Cisco contracts with the consulting company Everest (hi Kam!), and Everest wants to consult with Impact Linux. (Need to file a DBA "Doing Business As" form so I can say "Impact Linux" instead of "Impact Linux LLC". Mark and David both said LLC was better than S-corp these days, and I'm happy to take their word for it. Mark wants me to get a PO Box for the company's mail if he winds up getting paychecks through it.)

Tried to ask Mark to re-set-up the bluetooth for my internet through cell phone setup, but he was still tired and on call. I guess I'll buckle down and read the relevant web pages to learn about the bluetooth subsystem...

I need to fiddle with Vladimir Dronnikov's "dvv" build system, and make a serious push at getting Gentoo Embedded bootstrapping from mini-native. (I hope to poke Mark for this, but his on-callness extends through Friday.) I should also try to see if Milton Miller has some time to consult on getting PowerPC u to 2.6.27 (although to be honest, I could do that myself. As with Mark and bluetooth, I find a domain expert and make puppy eyes at them rather than wield my own ignorance at new areas of expertise, but that's a luxury I can't always afford.)

December 6, 2008

On planes all day.

December 5, 2008

So a large company is interested in putting into practice the "build under emulation" ideas I've been working on for the past couple years. This is really cool.

I can't speak for Cisco, and wouldn't try, but when I was in California my impression was they're moving back into Linux in a big way; not just Linksys, but across the board at Cisco. (Apparently this doesn't necessarily mean IOS is going away, though. It's about new products being Linux based, I think.) I encouraged everybody to arrange to be interviewed by Jonathan Corbet at LWN and Henry of to get the word out, and they all seemed to think that's a good idea. They also might also show up in force at and CELF and maybe next year's Linux Plumber's conference. (So don't take my word for any of this; wait for them to tell you themselves. :)

A major new commitment to Linux means they need a build system they can support, which is where I come in. They already have a number of clueful Linux developers, some have been on staff for years and some they got by acquiring a scandanavian Linux company that did NAS stuff, which is also where Martin the CTO came from: he is a Linux guy. He has clue. This is cool.

I could write two dozen paragraphs on what "can support" should mean here, and possibly will at some point. Why using the most recent release of each package is a good thing, why you need to patch them as little as possible, why to use "real open source drivers" as part of your purchasing criteria for hardware vendors. Stuff that we in the open source community take for granted but which has real concrete benefits that can be explained. (Maybe Eric and I need to do another paper...) In any case, the Cisco guys already grok this, and are working towards it.

In practical terms, this means Cisco wants me to work with them on a new build system to replace the ancient stack Linksys routers are currently based on, which has a 2.4.20 kernel and userspace packages from the same era. (Yeah, the public GPL tarball up on the website really _is_ what the routers are running, and it's sad and they know it, and they're working on it. The Linux ones, anyway; the non-Linux ones were done by a low-bidding vendor and aren't being followed up on.)

The old Linux build system is something broadcom came up with that was then supported by a lowest bidder taiwanese vendor, and was brittle even before it had five years to compost. This is a "throw it out and start over" situation. (They need to do some forensics to get data out of the old setup first.)

One nice concrete thing to come out of all this is that Cisco actually has debug adapters for its routers; little things you plug in that give you a serial port without having to solder anything. They didn't offer them for sale outside the company, and I asked them nicely if they could start, and they said yes. They may even offer a few as schwag at those upcoming Linux conferences. (Nothing official yet, but here's hoping. Part of the problem is that they were only ordering them in such low volumes that they're actually pretty darn expensive and they don't have a lot on hand, but that can be fixed.)

This is all cool. I'm looking forward to it.

December 4, 2008

I'm trying to build a 2.4 kernel with gcc 4.1.2. (Because.) I don't intend to run the result, I'm just trying to get it to build an image. And I'm fixing things. It #includes having done --nostdinc and not adding back the gcc internal header file directory... apparently that was ok back in 3.x. It does (thing, thing)++ which doesn't even _mean_ anything in C, and apparently gcc 3.x accepted that too...? How did this EVER work?

In California through saturday, poking at many routers. Kinda swamped right now, with intermittent email access. (The hotel at night is one of those high end ones that still think internet access is something you pay extra for, while your average Motel 6 has been offering this for free for 5 years now. One of us still doesn't get it.)

Mostly working on other people's computers during the day. (Just pulled out my own to check email when a password reset request got sent to my home address, off to go work on other machines again. Need to read the rest of the email I just downloaded this evening at the hotel.)

Milton Miller emailed me to point out several things wrong with the "Why do things this way" section of documentation.html. I'm both glad and chagrined, because I thought I'd put enough of a disclaimer at the start that I hadn't gotten a chance to revise that section. But I guess not. (I'm really mad at myself for wasting good developer review: I'm _happy_ Milton's looking at my stuff and pointing out where it needs to be fixed, I'm just annoyed I didn't get the things I knew about fixed before he looked at it so he could point out things I _didn't_ know about. Sigh. Only so many hours in the day. I need a Tardis.)

I tweaked some of the issues Milton pointed out, but what I really need is another day or two free to rewrite everything from the start of that section to the end of the file. Possibly with a flamethrower.

Meanwhile, I poke at openwrt for the California guys. Wow, openwrt is kind of complicated.

The openwrt website had no obvious "here is the most recent version, download it". An old news entry pointed to a release candidate, but the news entries have no date so I have no idea how old that is. The download link pointed me to a bunch of subdirectories, with no top level README or anything, and no obvious "here is what you should download" thing. The docs say I should do an svn checkout of the random version du jour, so I reluctantly did that. (Buildroot all over again.)

Its readme says it requires me to install flex, bison, unzip, libz-dev, and pkg-config. (It also wanted gettext, but there's no way it actually needs that.) Installed 'em, then its "make install" did its own prerequisite test and insisted I add autoconf and gawk. Gawk? I've got an awk, but now it needs the _gnu_ awk, which neither Ubuntu nor Debian provides by default. (That's just _sad_. Not that debian doesn't provide it, that openwrt needs it. Moving from bash to dash was stupid; Ubuntu still installs bash unconditionally on every system so there's no _reason_ to point /bin/sh at something else when bash is _right_there_. Moving from gawk to awk wasn't; they actually got away with not _installing_ gawk, historical Linux distros like Red Hat 6 _used_ to use non-gawk awks, awk isn't nearly as pervasive a tool as your command shell so it doesn't do random things like change the behavior of "make" files that never called it, and the non-gnu implementation of awk wasn't significantly broken to the point where you couldn't easily use it.)

Resisted my normal urge to go "no, you don't need gawk" and try to fix openwrt before I'd actually made it work in the first place. I'm on somebody else's time, make the vanilla version work and complicate it later. Besides, openwrt isn't my build system, I'm not really interested in pushing patches into it. (The design isn't worth spending effort on.)

Ok, it's building. They're building gnu sed instead of using the busybox one. Their build isn't smp aware, so it's using only one of my laptop's processors. I told it not to build LUA and it's building it anyway. (And quilt?) The README said to install bison, then it compiled it as part of the tools before the toolchain. (I'm guessing this is the host tools, it hasn't built the cross compiler toolchain yet. Ah, here it starts doing that.) More granularity would be nice, initially it hung because the network went down and there was no way to tell other than it taking too long to go from "tools/sed compile" to "tools/sed install". (They forced me to install gawk before it would deign to run "make menuconfig", but they compiled "staging_dir/host/sed" from source. Right.)

It's weird, dealing with OpenWRT reminds me of my earlier efforts. I pestered everyone who would listen at Atlanta Linux Showcase in 1999 about "building Linux from source code installing it with a pair of tweezers", looking for documentation on how to do this, but nobody knew how. Then when I found Linux From Scratch I first built it back around 2000, and turned the whole process into a big shell script that ran as root.

A few months later I started scripting automated builds for WebOffice, this time using a series of different scripts to segregate the build process into coherent stages, and extending them to build all sorts of extra stuff (apache and samba and postfix and so on), and turn the result into a zisofs image that would format and install a hard drive.

Then in 2003, I started over from scratch, both because I'd left WebOffice and because I wanted to relaunch based on uClibc and busybox, and made extensive use of User Mode Linux. I dropped about half the complexity, the install CD, most of the "optional" packages you didn't need for the system to rebuild itself under itself... Focused instead on getting the underlying build right and figuring out what I could _remove_ by beating busybox and uClibc into shape or simply figuring out how to do without it. The goal of this version wasn't to make a bigger system with more features, but to make a _smaller_ system with the best ratio of size to functionality. That entire system I was constantly tearing stuff out and re-implementing it.

Then in 2006 I did another from scratch relaunch, based this time on cross compiling and QEMU. That's the one I'm still working on, and from the start I had a fairly clear idea what I wanted the result to look like, and where I wanted to _stop_. This time, I knew where the edges of the project were, the importance of separating the lot into independent layers, reducing environmental dependencies and cross-references, documenting everything I did, clear goals, revision history, reproducibility... The previous iteration had been about figuring out what I could avoid doing, this one was about actually getting away with not doing it.

If you consider Linux From Scratch to be my first build system, the weboffice one to be my second, the 2003 releaunch to be my third, then the current Firmware Linux incarnation is my fourth Linux build system. Each time I started over from scratch, it was because I'd learned enough to question my original assumptions, and now I thought I could do a better job by throwing away what I had and taking a completely different (usually simpler) approach.

If I'd never questioned my assumptions, and continued to develop on the original instead of starting over with fresh ideas, my original script might have incrementally evolved into something like OpenWRT. I recognize a lot of the ideas, and I also know why I either stopped doing that or never went there in the first place. I suppose I should add some of my reasons to documentation.html.

(From the length of this entry, you may hae gathered that the openwrt build is slow.)

Now it's evening, and I'm trying to build a 2.4 kernel with gcc 4.1.2. (Long story.) I don't intend to run the result, I'm just trying to get it to build an image. And I'm fixing things just enough to make the build breaking errors stop. It #includes having done --nostdinc and not adding back the gcc internal header file directory... apparently that was ok back in 3.x. It does (thing, thing)++ which doesn't even _mean_ anything in C, and apparently gcc 3.x accepted that too...? How did this EVER work?

December 2, 2008

Shortly after midnight, I found the bloat on mips. You know how the gcc man page insists that gcc-min-heapsize has no effect on code generation? When cross compiling from x86-64 to mips using gcc 4.1.2, this is not the case.

Right, rebuilding all the targets now, should be ready for a release in the morning. (I'd better be, my plane to Orange County leaves at 3:40 in the afternoon.)

And of course testing found more bugs, but mostly easy fixes. Fixed Tobias Poschwatta's bug while I was there. Binaries building, it's now 4:30am, I need to get up at 10am to get on enough of a day schedule for the west coast, so I should really go to bed now...

Got together a release I'm reasonably happy with, cut 0.9.5, and rsynced it up to my website. Alas, 2 hours wasn't enough to rsync all the prebuilt binaries (12 megabytes each, 50k/second upload rate, 4 directories full... yeah.) And that's just sending 'em to, it's a whole second rsync to upload 'em to

Now continuing the rsync from the airport in Phoenix. Half hour until the connecting flight leaves ("with that tongue? No way"...) you never know, depends what speed the connection here is... Best described as "variable", I suppose.

Oh well, the source release is updated anyway. The prebuilt binaries, check the date on 'em before downloading. If it says they're four months old, it could be because they're four months old. (I removed the m68k/sh4/sparc system images that don't boot under qemu. The mini-native tarballs are there, but if the system image won't boot under qemu there's not much point in having it until I fix that.)

All things considered, it's probably for the best that when I wrote up the news entry shortly after midnight I added a day thinking it wasn't midnight yet, and thus have the website announcing tomorrow as the release date. Hopefully it'll all be rsynced by then... :)

December 1, 2008

Yeah, ok, I missed the deadline. I'm aware of that.

The documentation is finished enough for now, but the script decided to be stroppy again. The handoff between the host system and qemu is funky, and it's hanging and it's having short reads, and I have no idea why this is the case. I thought I'd fixed it, but no...

For the moment I'm just building the version that doesn't involve static toolchains, and I'll worry about the static toolchains afterwards. I'm pretty happy to call this a 0.9.6 problem except I _need_ the static toolchains in order to cut a release. The previous toolchains were static, so these should be too. (I suppose I can build them by hand again...)

Mark showed me "pavucontrol", which can beat the "pulse audio" daemon into shape by killing leaked audio channels that are preventing anything else from producing sound output.

If you use this tool to yank Pidgin's audio output, Pidgin goes into a memory-eating loop driving the system swap-crazy until the out of memory killer takes it out. By the time you realize this, "killall pidgin" has no discernable effect because the process is stuck in D state.

For some reason, the mips version of gcc got even more bloated. (Now the "strip" binary is 1.8 megabytes instead of 1.1 megabytes, and yes that's the dynamically linked, stripped size. I didn't upgrade gcc or binutils, it's some kind of config thing, or uClibc, or...)

For the moment, I'm just increasing the image size from 64 megs (which it's just over) to 128 megs. For the next release, I'd like to get the size back down, but here's proof that FSF code will bloat if you just let it sit there. It's like yeast.

I'm going back to the 0.9.0 code to build that and confirm that the bloat isn't some strange side effect of moving to 8.10. (It shouldn't be, this is the native build and not the cross compiler build, but there's always the possiblity that despite all my paranoia I missed isolating something. I am still using the host toolchain, after all.)

The 0.9.0 source doesn't want to build under Ubuntu 8.10 for several reasons. 1) the User Mode Linux build breaks; not a surprise, stubbed it out for the moment, 2) binutils ships with -Werror and gcc 4.3 produces all sorts of random new errors. This is stupid of binutils, but you can --disable-werror in the config to make it stop.

(I thought maybe it was the xgcc symlinks, but removing 'em didn't revert the size.)

I've talked before about how the book Liar's Poker described the start of the current funancial meltdown. Well, its author Michael Lewis just chronicled the end of it.

I also found old podcasts Rachel Maddow did before she got her own show.

November 30, 2008

So today's the last day in November. Gotta ship FWL 0.9.5 now.

Pretty much all the work I've done for the past week has been documentation and user interface stuff. I know it seems strange to hold the release up for this, it's easy to see this as optional stuff that could be deferred indefinitely. The thing is, for people other than _me_, effort put into improving user interface and documentation has a bigger payoff than most of the infrastructure work I'm so proud of. Most people will never notice the distcc port auto-selection stuff (so you can run accelerated builds for two different architectures simultaneously), but moving into the sources directory so all the files at the top level are ones the user is expected to be able to interact with directly? Well, if I do my job right they won't notice that either... :)

I'm watching John Dvorak's "Cranky Geeks" podcast, starting with the first ones from years ago, because I'm vaguely curious about what the Windows zombies think. (Half an hour a week, 52 weeks a year, means 26 hours of video per year. The countdown/maddow podcasts I follow on MSNBC do that much video every 2-3 weeks.)

Wow this Dvorak guy is consistently wrong. It's impressive. Wondering why Red Hat didn't bail out the OpenBSD guys when they alienated Darpa as a funding source ("those open source guys") was merely clueless, but the constant insistence Apple was about to switch to Windows for its Intel boxes was hilariously myopic.

He's a total microsoft fanboy, this could be entertaining when they get up to the Vista release... And they think RFIDs are the greatest things since sliced bread.

Oh wow, now they're having a clueless discussion of nanotechnology, and did the whole "grey goo" thing. Except that evolution's already spent several billion years creating self-reproducing microrganisms that try to eat everything in sight and would be happy to turn the rest of the world into copies of themselves. The problem is, A) there's not a whole lot of energy to be had by digesting rock, or water, so the process stops when it runs out of power, B) if your goo is silicon based water won't provide it silicon, if it's carbon based granite won't provide it carbon, and water provides it with neither, so eating "everything" runs into the problem that it _matters_ what your source material is, C) there are a bunch of existing things out there that are better at eating it than it is at eating them. We have yet to design a microorganism that an amoeba wouldn't tear apart without breaking stride.

Sigh. This is the whole "radiation gives you superpowers, a lightning strike can make any computer superintelligent" thing. Anything you don't understand is magic, and can do anything, even by accident. Once you _do_ understand how it works, you realize that most of the stuff that doesn't happen on a regular basis turns out to be _hard_.

I suppose I shouldn't be surprised. This podcast uses polka music for its intro. Unironically. (I'm up to episode 4, and six minutes in they're doing a "kids these days" riff.) Oh well, at least they admit it (same episode, 10 minute mark). Oooh, wow, panicing about bird flu. Yeah, that's a podcast about technology. Now it's "video games bad". For episode 5 they're acting shocked about cyber-porn. (This is actually so bad it's kind of funny. Right before each commercial break it defines obsolete high-tech terms, such as the compression mechanism "ZOO" which was a compression mechanism that died back in the 1980's and "lobe length" which had to do with Token Ring networks.)

Oh wow, episode 7 they're discussing HDTV and plasma vs LCD... and Dvorak's producers just put up a screen shot of an HDTV screen, showing one of the high resolution pictures. In a podcast. UNCLEAR ON THE CONCEPT. Otherwise finally a decent episode, though. His guests know their stuff this time. Well, until they got to the HD-DVD vs Blue-Ray war and some obvious holes opened up.

It's actually kind of impressive: every time one of his guests says something that history has proved right, Dvorak mocks them. (In episode 8, the guy with the black shirt saying that HD vs blu-ray doesn't matter much because we'll be downloading video instead.) It's uncanny, this Dvorak idiot is so _consistently_ wrong that in itself is almost an accurate predictor of the future. I guess that's why people watch him...

Ooh, episode 9 he's found a guest who's even more clueless than he is. (So _that's_ what Rob Enderle looks like. I've never actually cared.)

Up to line 800 of 1600 total. Halfway.

Huh, I notice that there's a logging wrapper and a compiler wrapper, both referred to as "the wrapper". (And I also describe as a wrapper.) I probably need to distingush those more clearly...

Once again, it's 3:30 am and Whataburger is busy. Austin's remaining 24 hour places are as busy as ever, if not more so (since there are fewer of them). It's too bad so many of them closed after the dot-com crash.

It could have something to do with the arrival of homeless people. Austin didn't have a noticeable number of them back under the Clinton administration; it was a boom town, every other store had a "now hiring" sign, and would hire _anybody_ sight unseen because they just couldn't get people. I remember how weird it was when I saw the first person holding a sign at a street corner at the start of the Bush administration; that was something I'd seen in New Jersey, but hadn't seen once during my fist four years in Austin.)

But that wasn't why Metro or Mojo's died, nor is it why the Starbucks on 24th street closes at 2am (and earlier over the past two weeks; today it closed at 9pm).

November 29, 2008

I've tried for a week to be _nice_ about reconfiguring the darn sleep button to _not_ lock the screen and prompt me for my password on resume. I actively do not want it to do this. I disabled this in the "screensaver" options of the configure GUI, which didn't fix it. I looked at the suspend and power management options, but there was nothing for this. I went under /etc/acpi and read through the scripts, finding and removing the LOCK_SCREEN variable from the config, which didn't fix it, and then commenting out anything in the scripts that tested it, which didn't fix it either. So I uninstalled gnome-screensaver, which DIDN'T FIX IT. (I can't uninstall xscreensaver without uninstalling gnome-desktop. Can we say brittle?) Turns out it left a "gnome-screensaver" process running after it was uninstalled, and once I killed it _then_ it suspended without prompting me for my password on resume.

I'm confused about something: the people arguing that you should say #!/bin/sh rather than #!/bin/bash, in the name of "portability", seldom say that perl is an abomination that must be avoided at all costs. And yet there is only one implementation of perl. It's not a standard, it's a program. Just as there's no spec for "Microsoft Word" files other than what Microsoft Word reads and writes, there's no real definition for perl prebuilt binaries to start out... Darn incoherent.

Oh wow boldface sucks on Firefox. Throwing boldface into text to highlight a few phrases makes the result significantly _less_ easy to read. (How do you manage to screw up that badly?) Alas, underlining in HTML means "hotlink", so can't be used merely for emphasis, and italics don't stand out at all. (This is almost certainly a font choice issue, but this is the default font on Ubuntu.)

It occurs to me that I haven't particulary added to my mp3 collection since Napster went away. (The gnutella networks never scaled properly, and I never really got into bittorrent. It's a file transfer protocol, not a search/indexing service. Yeah, ok, I know about a few like that let you search for specific things (although by the time I know what series are worth watching they're long gone from there).)

I even have CDs I haven't ripped. I've got piles of old CDs I bought years ago, plus everybody knows they can get me any new Weird Al release for my birthday, and I even have a few new ones I got at conventions. (I've been carrying around "I can has FUMP" for weeks _meaning_ to rip it, because That Calls for a Wilhelm Scream is inspired despite being a musical genre I don't normally like. But it remains unripped.)

Not quite sure what to do about it. There are lots of songs I like, but dealing with CDs for music seems kind of silly these days, and buying them from the RIAA holds no appeal. I suppose Itunes is the standard here, but I haven't got a Linux client for it and it wouldn't convert the result to a file normal players could use without burning it to CD.

Speaking of "normal players", I notice that Rockbox doesn't move the progress slider as the song plays. There's no way to advance or back up within a song. Another thing I took for granted under KDE for _years_ that the standard Gnome tools apparently just can't do.

Wow whataburger's packed tonight. It's 3:12 am (yes, I've already written this much blog; side effect of documenting stuff), and it's... not full, but maybe half full.

My blog tends to get really really long when I'm writing documentation. I've spent almost five hours wrestling with the introduction, which is currently five paragraphs. I've probably rewritten every part of it a dozen times now, and thrown out the vast majority of what I've produced. The point is to be _concise_, to say each thing exactly once but in an order that doesn't assume they already know something before I mention it, and to flow logically from point to point in a coherent order. This is _hard_, and it's an _editing_ job, and it involves reordering several sentences so I can remove three words, over and over again. Being able to splat out huge stream of consciousness blobs of text in my blog is VENTING. (The verbosity's gotta go somewhere. Letting off steam, sort of. (And then I delete half of it anyway because I'm in editing mode, and realize I'm nesting parentheses...))

If you thought the "may be used uninitialized" debacle of gcc 4.1 was bad, I think gcc 4.3 may officially have made -Wall useless. The output of all sorts of programs is now full of sheer noise:

editors/sed.c:839: warning: format not a string literal and no format arguments src/mon-text.c:74: warning: conversion to 'float' from 'double' may alter its value src/trace.c:239: warning: conversion to 'int' from 'size_t' may alter its value popt/popthelp.c:386: warning: conversion to 'long unsigned int' from 'int' may change the sign of the result src/netutil.c:209: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result

The likelihood of any of that sort of thing finding an actual bug is vanishingly small, and the effort and _bloat_ to shut the compiler up makes the result larger and more brittle. You have to engage in defensive programming just to get GCC to keep quiet about your code.

Letting the FSF continue to maintain such an important tool is punishing the open source community greatly. Dear pcc and llvm developers: hurry up please. :)

November 25, 2008

It occurs to me that El Shrubbo can't pardon himself for violations of _international_ law, only of US law. If he and Cheney really get egregious about self-pardons, the US can always decide to hand them over to the criminal court in the Hague, where he can be tried for war crimes. (This doesn't have to set a precedent if we don't want it to; the decision to extradite is always made on a case by case basis.)

Writing documentation gives one lots of ideas for user interface improvements. For example, it occurs to me that and would probably be better collapsed together into as command line options. If hdb.img exists, it gets mounted on /home inside the image. Use "--make-hdb" to create one, use "--with-hdb" to specify a different name, failing if it can't find it and if --make-hdb wasn't specified. An extra argument is treated as a path to the cross compiler for the distcc trick, with the standard check to make sure it's actually there.

Ok, that's cool.

Fade and I went to see Bolt, which was entertaining. How they managed to actually cast Nybbas as the agent is a mystery for the ages. (Putting the head of Pixar in charge of Disney's existing animation department has been very, very good for them. Of course the guy who _used_ to run it is now the K in Dreamworks SKG. Spielberg, Katzenberg, Geffen. Disney's fault for driving him away in the first place, he's now their main competition.)

The trailer for The Pink Panther 2 also managed to do the impossible, convince Fade and Myself that the movie may actually be worth seeing. (It just _looks_ like a tape recorder, it's actually... a pen!) I never would have expected Steve Martin to find his own interpretation of Clouseau that A) isn't trying to be Peter Sellers and B) actually works.

Late in the day, finally getting down to working on the new documentation again but feeling distinctly under the weather. Biked to whataburger and had a fatigue/nausea attack halfway through. I feel fairly normal when I'm well rested and not exerting myself, but I am _not_ recovered from saturday's food poisoning. I forgot that last time (2002?) it took me weeks to properly recover. On the downside, I'm out of tea at home, and out of water jugs to make it from. (Tap water doesn't work right; I should get one of them reverse osmosis filter thingies.) So I head out to a place that has caffeine with refills...

November 24, 2008

Shortly after midnight, I accidentally deleted half the download directory. My week continues. (I wasn't even logged in as root, I did an rsync --delete into the wrong directory as a normal user, but morris puts all normal users in the same group.) Luckily the osuosl guys had backups and could restore the missing files. (Also luckily I _noticed_ quickly and kept the "deleting" messages so I could tell 'em what files to restore. And Ramereth was online late on a Sunday, although he's two time zones west of here so it's not _that_ late, his time.)

I guess this week's theme is "disasters that could have been worse".

Gnome is turning out to be one of those disasters. The sound mixer dies after a day or so of uptime, so that no program can produce sound output anymore. I'd seen this on the desktop system I installed Ubuntu 7.10 on, but thought it might be something to do with the driver for whatever ancient sound card it's using. Not so: my laptop's now done it, and intel sound chip in this thing worked fine under Kubuntus 6.06-7.04.

I'm trying hard to put up with this thing until Xubuntu 9.04 comes out, but so _much_ is broken. (And much of the breakage is "designed wrong" rather than simple bugs.)

Oh well, at least Rockbox actually _closes_ when you hit the little X in the upper right corner, instead of minimizing itself unless you do file->quit from the menu like the KDE one. (Oh no, you don't want to quit _my_ app. My app is _special_. Yahoo Messenger's web page thinks this too. It is also wrong.)


Anyway, I've now got current binaries of the FWL output up on, and I should have a 0.9.5 release out later today.

Heh: I figured out how to kill those stupid "mouse over a link to see where it leads and it does an unwanted pop-up window displaying the entire page, and covering most of the rest of the text you were trying to read". Block "". (I added it to my /etc/hosts file as an alias for I hope they go out of business soon...

Why does firefox mysteriously freeze for 30 seconds at a time? It doesn't even redraw during this if you drag another window over it.

I've figured out what's wrong with the FWL about.html and design.html pages. Both of them answer "how" guestions (how do you use it, how is it implemented), but there's what and why material mixed in there as well. I need to untangle all that, and figure out what should go where. Possibly I need three pages, although the "what is it" is a logical introduction to "how do you use it", and the "why did I do it that way" goes with the other one...

The downside of filling out ten paragraphs of blog entry shortly after midnight is you start the next day with a blog entry that's already too long, and don't really want to add to it. (Daily granularity has its downsides. I throw span tags into the thing, but have yet to update my rss feed generator to take them into account and generate topic-specific feeds. Started on that once, but got distracted...)

Next year's file I'll probably break up, perhaps by month or maybe even giving each day its own URL. (Probably still edit the same one-big-text file in vi, but have my python script generate the other stuff from that in a subdirectory.) I could even do one of those feed things to a real blog site (I've still got that old livejournal account) so interested parties could comment instead of just emailing me.

The tricky bit is that I often rsync multiple times during the day, meaning a given day's entry can grow after it goes up. (I always try to just append to the end of the suckers, and minimize editing earlier days. And all I fix in previous days' entries are typoes. Still, if somebody's read today's entry already I don't expect them to re-check it for additional content.)

I haven't bothered because this is notes-to-self. It's primarily for me to check in the future to remember what I was doing. But I don't want to make it unreasonably hard for people like Fade and Cathy (and various open source programmers) who actually do follow it...

*Shrug.* I'll think of something.

Spent most of the day reading the archive of a webcomic (surprisingly entertaining given the premise), which led to another webcomic (which, strangely, is actually well-drawn, although it produced more pages in its first year than the five years since so I'm not sure the story will ever be resolved, which is sad).

I get upset when Linux developers do actively stupid things. For example, the whole "tell dbus/hal there is no network" thing. That's stupid.

I have a webserver running on loopback, with a copy of my website so I can see how pages render (including server side includes for header and footer, and cgi stuff like the mercurial website browser, which you don't get from just going "file:/" to a directory and which won't give you a URL you can trivially translate into a live website URL either. I'm not currently connected to any network (in this case because my wvdial .config for the cell phone got lost in the hard drive crash and I haven't gotten around to reassembling it yet; hey, I only backed up /home, not /etc). Because I'm not connected to an external network, pointing firefox at the internal loopback interface ( gives an error message that "firefox is not currently online", rather than showing the web page.

In the case of Konqueror, I couldn't fix this without killing knetworkmanager. With firefox I can go to file->work_offline and deselect the check box. But the point is, I SHOULDN'T HAVE TO. What it's doing is STUPID. The failure mode for trying to access the network without any active network cards is an immediate "no route to host" error, which translates to an immediate "failed to connect" error message, which is correct for the situation. This entire layer of infrastructure isn't trying to change the behavior, it's trying to change the _error_message_, and the old one is just fine.

So inserting an extra layer of infrastructure here, which I have to manually disable, adds _nothing_. It serves no useful purpose. This is infrastructure that, when working as designed, is a NOP. The only time it makes any difference is when it breaks and screws things up.

I know Debian is in the pocket of the FSF, but it shouldn't adopt the Gnu project's more blatant stupidities. Libtool failing to do nothing correctly was bad enough, but now they're adding more of it. In layers.

And you wonder why I'm an embedded developer, focusing on removing unnecessary complexity and doing more with less?

Gnome continues to suck. The battery indicator has turned orange and has about 1/4 of its pixels left at the bottom, but when I mouse over it the text says it has 44.2% of the battery life left. Does anybody else think those indicators even _remotely_ match up?

Also, splitting the toolbar into one at the top and one at the bottom seems like a nice idea at first, but it eats just as much screen space and it means that icons like the battery wind up being _tiny_. Although the vertical layout of that wastes a lot of the space it does have by drawing the top and the bottom of the battery, which is space it can't use for the bar graph its purpose is to display. That one's just plain badly designed.

Each bar has vital things in it (one has the main launcher menu and the other the taskbar), so hiding just one serves less purpose than you'd think.

Ah, at least I can move them both to the bottom. I can't drag one above the other, but I can abuse the hide buttons to reverse their order (which may actually be a bug, it's hard to tell, but I'll take it). Can't get a hide button on just _one_ side, but oh well. I think I could actually combine the functionality of both panels into one with judicious use of add/remove. Not sure if I'll be using gnome long enough to bother, though. I'm giving it until April, I suppose it might grow on me...

November 23, 2008

When I unplug my laptop, the processor switches down to 800mhz automatically. In Kubuntu I could right click on the battery icon and select performance, powersave, or dynamic. The battery icon does not control this in Gnome. System->preferences->power management doesn't control it either. System->administration->system monitor isn't it either.

Plugging it back in left it at 800 mhz, with both processors maxed. Sigh. Ok, dig around on the command line, it's:

echo -n "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

After doing "killall hald-addon-cpufreq" because that was setting it back to powersave even though the processors are maxed and it's plugged into wall current. Idiots.

That's how you control that, and it should be trivial to write a little widget to do that. But no, they had to invoke hal and dbus and bonobo and 8 gazillion unnecessary glue layers to write 11 bytes to a known location. What is _wrong_ with the Gnome developers?

There is a command line utility to control this: cpufreq-selector. It A) doesn't say what the options to -g are (even the man page doesn't mention dynamic), B) takes upwards of 30 seconds to run, C) launches hald-addon-cpufreq (sometimes, but not always).

November 22, 2008

Today I had about 10 hours worth of food poisoning. It's been that kind of week.

For future reference, if a frozen pot pie has leaked gravy inside the cardboard box, it froze and rethawed at the store before you bought it. Yeah, I should have spotted that, but after my laptop hard drive dying and needing to be reinstalled from a 5 month old "full backup" and buckets of incrementals, emergency cat trips to the vet, finding out my car needed more than its blue book value in repairs to make it up to my sister's in minnesota for thanksgiving, and having a general stress attack on friday due to what had _already_ happened so far this week... Not fun.

Continuing to try to make Gnome work. Not sure who's winning yet.

Pidgin is really stupid. It doesn't automatically launch a freenode window when I launch the program, instead you have to disable the freenode account and then re-enable it. And you can't cut and paste multiple "join" commands because it concatenates them into one line. Who wrote this?

Gnome-terminal is really stupid. There's no way to set the background color to "dark" with an ansi escape sequence. \e[40m gives me black in konqeror, xfce, and an actual xterm, but gnome terminal makes it grey. My program literally _can't_ request a black background via portable ansi escape sequences.

Asked some of my questions on the ##gnome channel on freenode, and now I remember why I hate gnome. Every time, their answer was "oh, you don't really want to do that, you want to do this other unrelated thing". I mentioned I was still using kmail, and that immediately hijacked the "how do I make your term program do X" to "why aren't you using pop"? Apparently, nobody should ever want to fetch their email through a precommand, they should demand root access on their mail server to install pop. So I explained that I tried imap but lots of clients won't delete messages from the server unless I delete them locally, and I used to _use_ pop and I hated it (downloading 2000 messages through a connection with 1/3 of a second latency, such as my cell phone, sucks). Then they started saying my cell phone "sucks", because it only does 45 kilobytes per second and has 1/3 of a second latency. That's NOT THE ISSUE, it's WHAT I'VE GOT TO WORK WITH. I have a working solution, today. Your software cannot interoperate with that existing solution, because your software is brittle, inflexible, dare we say defective?

But that's gnome for you. Never fix anything, just attack all new use cases you don't already handle. Never admit "we can't do X", instead insist "you shouldn't want what you asked for". Idiots.

I'll probably limp along with Ubuntu until 9.04 comes out, and then try Xubuntu. I'm not going to wipe gnome off my system in a fit of pique, because I have _work_ to do, but I'm not really looking for a future with it either. I left KDE because I lost faith in the developer community. I didn't install pygmy as an email client because I couldn't _find_ a developer community. The gnome developer community is like Debian, and the Ubuntu equivalent in that space (Ximian) trying to make things work for mere mortals turns out to be crazier than the Gnome guys are.

November 21, 2008

Wow, what a mess.

Ok, new 320 gig drive purchased and installed. Ubuntu 7.10 installed on top of it (and the 64-bit version on the second attempt; the ubuntu download page is kind of silly compared to the kubuntu one, with the checkbox for 32/64 bit after the "do it" button). Bye bye KDE: you did it to yourself. KDE 4 has been out for a year, and it remains unusable.

Many backups scraped together and dumped into a huge largely duplicative heap. Still poking at the mess. (Complete backups are time consuming. Restoring from incremental backups when your last complete backup was 5 months ago is also time consuming.)

For a longish time I've meant to write a tool that scans the filesystem, makes sparse files out of long ranges of zeroes, and hard links together the identical files. Now I've started one (in python).

Installed kmail so I could look at my old email, but I haven't downloaded any new email into it yet. It's the kde 4 variant of kmail, and it got even more annoying. (I don't need a most often visited folders tab taking up screen space. I know what my email folders are!) I might wind up still using it just out of sheer inertia, but it would also be nice to make a clean break.

Installed thunderbird. It doesn't have the concept of getting mail from a local mbox file rather than going out to a pop or imap server. For an imap server, there's no way to delete the messages off the server without deleting them locally. (Even making local _copies_ is something you have to dig into the options to check a box in a sub-tab for.)

Found a page of mail clients. Attracted to pygmy but the last release was in 2002, there's no mailing list, and it's gtk 1... Ah, Sylpheed I've heard of. Looks good... And it has no concept of the "get mail" button running a prefetch script. (How hard a concept is this? I do not want to use pop or imap, I want you to run a user-defined command when I click "get mail", and then look in an mbox file. Fetchmail's had this mode _forever_.) Nope, all those mail clients are stale. So are all the ones listed on's mail clients page. Sigh.

Pidgin (messenger) is vaguely tolerable, but not exactly fun. IRC (ala freenode) seems to be an afterthought with it: no way to specify a list of channels to open on startup, no way to tell it to filter "X entered the room, X left the room" from the actual useful comments. It takes up two spaces in the task bar, and neither task bar entry flashes to let you know somebody's used your name in vain. (Ah, there is an icon up in the _top_ task bar... Ooh, and if I right click on that I get a menu that lets me switch off "show buddy list". Maybe _this_ one flashes? Ah, "blink on new message". Ok, I can configure it to do what I want, which is good enough. Ooh, it has plugins. Join/part hiding looks like what I want. I suppose I can cut and paste:

/join #firmware
/join #uclibc
/join #gentoo-embedded
/join #edev

And so on...

November 20, 2008

Things I already miss about KDE 3:

November 19, 2008

My laptop hard drive has crashed, badly. During one of my normal "wow the drive is busy" moments, the ext3 journal aborted. Attempting to fsck the thing after a hard boot attempted to read past the end of the disk. The filesystem's toast anyway. Salvaging what I can, then it's time to hunt for backups.

November 18, 2008

I need a "projects it would be nice if somebody would _do_ page. Will I ever have time to extend dropbear to act like openssl or stunnel? The "hello world" kernel thing is another one; might get to that, but not this week. Mark gave me a patch to get FWL to build under MacOS X once, but I haven't got a MacOS X build environment yet.

Finally ground my way through the rest of "Ella Enchanted". Now I have a strong urge to watch the commentary version to see if they _apologize_. (Or at least how they attempt to rationalize doing that to a fairly nice book.) They had an _amazing_ cast, and totally wasted it.

(Oh dear. They're recycling "true to your heart" from the ending credits of Mulan. I can see why Disney thinks they're the same movie, but this is not actually the case.)

It wouldn't have been so bad if they'd tried to have a "princess bride" vibe, which was a movie that clearly never took itself seriously. (Heck, the had Cary Elwes, he could have shown 'em how.) But where princess bride was self-aware and cheerfully ironic, this one merely had source material it couldn't hide and a checklist of fairy tale conventions to go down.

Interesting phone call with some guys from Cisco.

Fighting with the build. The bug is somewhere in toybox netcat, sending to itself. Found an uninitialized variable, but I think it's an unused structure member. (Memset it anyway.) Eventually figured out that reading 4k from stdin doesn't guarantee it's empty, so handling POLLHUP needs to be an _else_ case on POLLIN. With that, netcat seems to be working properly now.

November 17, 2008

Yay, Fade is back from Maryland.

Firmware Linux no longer uses User Mode Linux for packaging, I dug up James Davidson's patch (from last year) and adapted it to the current code, so we're using genext2fs now instead. This should make literally 2/3 of my bug reports GO AWAY.

I've been using UML since I first got it to work (back around the 2.6.11 kernel, something like five years ago), and it's just as brittle today as it was back then. It only seems to build under a system running the same kernel version as you're trying to build UML for. (A host with a _newer_ kernel breaks it.) QEMU has mostly stolen its thunder, the only reason I was still using it at all is I can't easily get an equivalent of hostfs out of qemu. But I can use gene2fs instead, and bit UML adieu. The allure of running linux as a normal user mode program is cool, but it was also a lie. Normal user mode programs aren't that picky about their build environment, aren't limited to x86 hosts only, might have some eventual chance of being ported to run on things like MacOS X... UML is not and never has been a "normal" user mode program, instead it's now less interesting (and less generally applicable) than the rustyvisor, aka lguest, and shares with xen the status of "technology that once showed promise, but just isn't interesting anymore".

Today's other lesson: "hardened gentoo" makes top useless. It only shows you your user's processes (understandable but limiting), and every process says it's using 0% of the available CPU (inexplicable), so you can't even see which of your _own_ processes are currently active and which are just sitting there. Which is kind of what top had over ps in the first place.

Still, it's a fast quad processor machine the gentoo guys are letting me use, and I'm trying to get "USE_STATIC_HOST=i686 sources/" to create shippable images so I can cut a release without having to do it by hand again. (It was also one of the machines where User Mode Linux wouldn't compile.)


tar: short read

It's baaaaaaack. Why is it doing that? If I run it a second time it doesn't do that. It's an intermittent race conditiony thing, which might be a bug in netcat (if so, I can't reproduce it) or might be a bug in busybox tar (likely, since "short read" is not a fatal condition when reading from a _pipe_).

November 16, 2008

I rsynced the fwl and toybox repositories up to because the server in Eric's basement is amazingly slow right now. Not quite sure what's up with it, but Mark was reporting 200 bytes/second. The impact site is on a fast server, and I've been meaning to at least mirror stuff there forever, so for the moment it's mirrored (and I added the site to my resync script so it gets updated whenever my website or this blog does). Might point to that as the primary site after the next release.

I'm having a really _annoying_ bug I can't reproduce reliably. When I netcat the output of hg archive into qemu, the tar extracting it inside qemu sometimes complains about a "short read". When it happens it's always at the same place, which is right before the www/index.html symlink, but it doesn't always do it. I tried having netcat -l and netcat pass the data to each other on the server in a loop, and the bug wouldn't manifest. I tried running netcat -L (repeated server) and inside qemu fetching the data in a loop (piping it to "tar tvz" each time), and the bug wouldn't manifest there either.

Darn it. Ubuntu 8.04 added some horrible "security" feature that's preventing gcc-arm from executing anything unless I run it as root. (It's trying to do an mmap() that's denied.) That's just brilliant. Way to go, Ubuntu. Break the BINARIES YOU SHIP.

I succumbed to the temptation to just "ln -s `which gcc` gcc/xgcc", in yet another attempt to make the gcc build _behave_. I wonder if there's some equivalent of the obfuscated C code contest for makefiles? Some kind of "convoluted unintelligble build award". Win it, and your project automatically gets added to the GNU project.

I'm glad I have my little USB cord for the cell phone now. I still can't figure out how to get data through it (have to use bluetooth even while the sucker's plugged in), but my cell phone battery doesn't even manage two hours of data transfer without it.

Sigh. McDonalds closes at 11, Jimmy Johns is uncomfortably loud, and even the starbucks down the street that was open until 2am switched back to Midnight for the thanksgiving break. I continue to miss Metro.

I'm really starting to hate User Mode Linux. The one in (presumably fairly recent kernel) won't build under Ubuntu 7.10, and won't build under Gentoo. How do you MAKE a piece of software that brittle?

November 15, 2008

Got a server mode into toybox netcat. Need to figure out why -t (allocate a pty) doesn't seem to be working, but other than that it's in. Pondering giving the daemonize thing an expicit command line argument; right now it forks and exits from the parent if you feed it -l and command line arguments, so that if it has to print out the port number you can use it from a script.

The use I have in mind is to feed the source tarballs from the host system into the qemu instance that's building static cross compilers automatically, ala "netcat $(netcat -l tar c sources/packages) | tar xv sources/packages". (Re-downloading tarballs from a nightly cron job is both brittle and impolite.) If the $(blah) part doesn't _exit_, the outer command line never executes. I thought maybe I could do $(blah | head -n 1), but even putting an explicit fflush(stdio) after the printf (the need to do that is kind of evil, by the way; the pipe or socket infrastructure should optimize packing issues like that, not the stdio layer) the pipeline doesn't exit until all processes in it have exited. (I guess this is so you get the stderr stuff?)

I've been meaning to watch "Ella Enchanted" ever since I read the book, but five minutes in I'm already thinking of sending the DVD back. The setup they're doing is just painful to watch. I can't blame Anne Hathaway, she hasn't actually shown up yet... Ah, there she is. And here's Patsy from "Absolutely Fabulous". (I know Joanna Lumley can play other characters, even in little bit parts like the Rowan Atkinson doctor who comedy relief thing, but here she's recycling Patsy.) Actually, this whole thing screams recycling. In the book was "inspired by" ciderella, but the movie adaptation has nothing else in it so far.

Ok, it has one other thing: since the baby was cursed they haven't let a full minute of screen time go by without triggering it (with sound effect).

I'm pausing it every few seconds, because I can only take so much.

Now the evil stepsister's figured out the curse, which the Ella of the book managed to successfully conceal through the first 2/3 of the thing. And now the plot's gone completely off on its own tangent with a transparently evil (hint: the beard was too much) scheming reagent with a talking snake, the prince elevated to secondary protagonist level (because you can't have a movie about a _girl_, now can you?) and some kind of subplot about race relations. Cary Elwes (Wesley from the Princess Brice) as a bad guy is kind of interesting, and he's managing to play enough different of a character it took me almost a full minute to realize who it was, but the sheer unnecessariness of that character detracts from it a bit.

I wonder if there's any way I can watch this thing on fast forward?

Getting netcat to behave properly is kind of annoying, from a sequencing perspective. Removed yesterday's attempt and hit it with a hammer instead, might actually work now.

It occurs to me that with netcat running a shell on the host I could export arbitrary cpu-intensive commands, such as bunzip2 during the decompression phase. Alas, the latency of the network transaction limits this a bit. (Is the sha1sum during ./ slow enough that passing the data over the emulated network would be faster?)

Darn it, either short reads or short writes are happening over netcat. I thought it was this old problem because it's happening at the same place, but it turns out to be intermittent. Either tar's having an uninitialized variable or some such, or it really _is_ a short read which implicates netcat. Or maybe mercurial isn't quite generating the same tarball every time? Too many variables...

November 14, 2008

Today's question, why don't I do the packaging with fakeroot? Answer: 1) show me how to do a loopback mount with fakeroot, 2) if I'm downloading an extra source package to do packaging, it should be gene2fs.

So I added server mode to toybox netcat so I can run "netcat -s -p 12345 -l tar cz sources/build" and then have qemu do "netcat 12345 | tar xvz". I.E. pass in the source tarballs through the network as a normal user, without needing to run a web server on the host.

Ideally I'd like to let it pick a random port, output it to stdout and detach afterwards. Then I can have the here document go "netcat $(netcat -s -l tar cz sources/build) | tar xvz", but for some reason feeding in socket 0 into bind() doesn't seem to work to randomize the local port...? (Possibly it was connect() doing this, and accept() doesn't. I need to frown at it more...)

Still tracking down the sparc thing.

It is hot chocolate weather. Pondered going down to sixth street, on the theory I haven't been there at night (when it's Doing Its' Thing) in a couple years. Meant to go halloween weekend, but didn't. Didn't this time either.

Mark phoned and invited me to see Mr. Sinus tomorrow. They're doing Forest Gump. Looking forward to that. Might try to hijack him to Boomerang's for pie first, depending on how much time we have.

I threw a pair of DVDs into the netflix queue that Fade wouldn't want to watch. "Herbie Fully Loaded" was decent popcorn. It's mindless fun, but that's about what I expected from Howard Tayler's review. Nothing about the movie is particularly inspired, but it was put together with decent workmanship, the actors and director do their things well. Too bad the writing screams "committee, workshopped half to death", but that's Disney for you.

November 13, 2008

The Jimmy John's on Red River has the same problem as the one down south; the background music is loud enough that my sound cancelling headphones can't block it out, so I can't comfortably listen to podcasts while hanging out there. Pity, I really like the food, and it's way healthier than I normally eat. (It's fairly decent indie rock, but I'm trying to listen to Rachael Maddow, and then I've got several years of "Cranky Geeks", a few months of "Writing Excuses", Joel Spolsky's "Stack Overflow"...)

Also my cellular internet doesn't work here. (I have two bars of signal, but apparently that's not enough to use the internet. Sigh.)

Ok, time to make sparc work.

Last night I patched the uClibc headers so sparc recognized the "extended" 32 bit binaries the compiler was creating. It had the correct number, but was checking an #ifdef non-solaris compilers apparently don't set. Even though there was a config entry for this, it checked the #ifdef anyway. And it has infrastructure to check _two_ magic numbers, but was instead setting only one, based on an #ifdef. Yeah, big hammer: set both numbers, move on.

Which brought the behavior back to the _previous_ bug, from 0.9.29, where static binaries work but dynamically linked binaries hang trying to resolve the shared libraries. Much fruitless debugging of the library loader ensued, and many printfs (ok _dl_printf()s) were inserted. But it's getting to the end, and seems to work.

So why is the static "hello world" working, but the dynamic one not working? It's not some kind of stdio problem, because write(2,"blah\n",5); at the start of hello world doesn't work either, and that boils down to a syscall. Something about the handoff doesn't seem to be working...

November 12, 2008

The weekly lunch thing at Monglian Grille didn't happen, because Stu, Mark, Kandy, and Linus all independenty cancelled for different reasons. Went to Chick-fil-a instead.

The 0.9.30 uClibc release is out! Woot! And busybox 1.13.0 shipped yesterday. Migrated FWL to use the stable versions of both, and checked in a half-dozen small pending things.

I'm trying to decide how much more work to do before I cut a release. Spend a day fighting with powerpc to move Linux to 2.6.27? Cut a new toybox release? Actually, a new toybox release is overdue... Ok, cut 0.0.7. (Cue theme music.)

Solar was nice enough to give me a login on a fast (quad processor, 16 gigs of ram) gentoo server to run builds on, and the first thing I notice is that their filesystem is this re-i-serfs thing I've heard so much about. (Didn't think anybody was still using that.) And of course never got around to adding a workaround in toybox cp -r for the reiserfs bug, because who still uses reiserfs? Sigh... worked around and checked in now.

Grrr... uClibc is modifying its source files. I'm not quite sure how or where, but when I did multiple parallel builds one of 'em died, and doing linear builds it keeps re-extracting uClibc meaning the source directory is failing its checksums after it gets built. (Note, modifying the files don't cause problems if you break hard links, but this is opening the existing file and writing to it, which is generally a nono when building source code.)

Oh dear.


You've been summoned back to Azeroth! Your World of Warcraft account has been selected to receive 10 FREE days of game time and a FREE trial of The Burning Crusade expansion pack.

Fade's away for a week, and this comes in my email. How do they know? (No, it's not spam...)

November 11, 2008

Amused at political lolcatting. There are plenty of good ones. The most amusing part of this one is it was from back in September.

Dropped Fade off at the airport this morning, then went home and slept until 5. Very tired still, but I have lots to do today...

Ok, I need to go back to work on Toybox. Earlier today I was getting worked up about things like "Why does busybox mount -f has its own config option, is that really worth the complexity?" But I think I'm just writing busybox off as bloated into a GNU project, and going back to work on toybox.

Some idiot bombed the bug generator with a couple dozen differences between coreutils and busybox behavior, entering them all as "standards compliance". (Coreutils isn't a standard, SUSv3 is a standard.) One of the ones I looked at was the guy complaining that busybox didn't implement a bug in gnu env (which conflicts with gnu env's own man page's version of what behavior to expect). What does Denys do? Impelement the bug.

It's not the size that bothers me. These days memory and CPU time are cheaper than ever (although I still look forward to disposable computers with 18 month battery life). It's the _complexity_. I want simple and understandable. Here's a behavior that's not just completely unnecessary _and_ undocumented, but conflicts with what the gnu version's own man page says the behavior should be, and which was _explicitly_ implemented in busybox.

At our local McDonald's, the television above the table with the convenient electrical outlet is now tuned to "CNN Headline News". Wow it sucks. It's relentlessly shallow, vapid... obnoxious, really. (It's also louder than my sound cancelling headphones can quite keep up with.) It was like the television equivalent of supermarket tabloids _before_ "Showbiz tonight" came on.

I've decided that yes, I would pay money to get these people to shut up. How much money? Enough to buy a hot chocolate at Starbuck's. (I can't go home and work, four cats and Fade's not there to run interference.)

November 10, 2008

There are a few countries I wouldn't mind the US preemptively invading. Alas, El Shrubbo's poisoned that well, so I blame him for this continuing.

Catching up on the last few days of the Rachel Maddow podcasts, watching the day after the election and the argument about whether or not he should "spend his political capital". It doesn't seem to occur to any of them that he should _invest_ his political capital. It's ok to do controversial things as long as you get good returns that give you future permission to do more controversial things.

Poking at the Linux From Scratch build under system-image-i686 with qemu faking a Pentium II, and perl just went "boing":

./miniperl -Ilib configpm --heavy=lib/ lib/
make: *** [lib/Config.pod] Illegal instruction
make: *** Deleting file `lib/Config.pod'

The bug appears to be that the toolchain spit out a Pentium III instruction when it built mini-perl. The question is, was this a toolchain misconfiguration, or is it inappropriate inline assembly in the perl build?

So, checking the server for reinfection until we agree on what to reinstall it with: "netstat -tunlp" and "ls /proc/*/exe" are useful, and busybox has lsof.

There's a new how to survive poisonous people video. (The old one is still up, of course.)

November 9, 2008

And Morris got cracked. Great. Both and may be compromised.

Back in August Solar from Gentoo noted how _ancient_ the software was on Morris, and started an off-list thread about fixing it. Erik Andersen used to maintain the server, but he got busy managing his company and handed off maintainership of the projects years ago. Server administration pretty much fell through the cracks, and the occasional Debian package update got run on it. Solar suggested reinstalling Morris with something that Lance Albertson of OSUOSL (where the server is physically hosted; it's a xen share on one of their rackmount machines) could admin, or possibly Gentoo Embedded so Solar could admin it and we'd be dogfooding uClibc. (Albeit a fork of uClibc, but with the release schedule uClibc's had recently that's to be expected.)

Mike Frysinger piped up to say he didn't see anything wrong with the status quo. He specifically objected to dogfooding uClibc bcause he maintained his own hand-rolled uClibc system on one of his servers, and in his experience "there just isn't enough man power to keep packages building." I pointed out that was why we wanted to use gentoo embedded rather than something hand-rolled, to which he replied:

i'm not sure i follow.  we dont have the man power today.  changing morris 
over to embedded gentoo wont make the man power materialize.  so what am i 
not understanding ?

At which point the thread petered out because I stopped trying to argue with him. (He was, nominally, the uClibc maintainer at this point. The one who never cut a release.)

Fast forward to today. Between now and then I essentially staged a coup against Mike (albeit in absentia) to make Bernhard maintainer, but we hadn't gotten back around to the server administration issues when the server got cracked and the httpd replaced with a script kiddie bot binary. Denys noticed the following day and emailed me and Erik about it, and I forwarded it to solar and to support at (which is essentially Lance, but it gets tracked better than emailing him directly). They've been dissecting the server for a couple hours now, comparing old backups to see when the crack happened, confirming that it was just a script kiddie and that no important files got tampered with, and discussing how to properly secure the server.

November 8, 2008

It'd be really nice to have a chroot and looback mount that work as a normal user. User Mode Linux is verging on useless. QEMU is really slow (I'm not noticing any speed increase from kqemu at _all_) and ether limited (application emulation, doesn't play well with fork()) or too isolated from the host (system emulation) to copy stuff out of the host filesystem. And performing an actual chroot requires root access.

I'm trying to upgrade the cron script to build static toolchains. The easy way to do this is to chroot into an i686 or x86_64 system image and build each in there. And on my laptop, that's no problem. But on the slow spare server I have lying around (which already takes 12 hours just to natively build all targets), this is a problem.

So I plugged in my cell phone via the shiny new USB cable, and it's charging but doesn't seem to be presenting a serial device I can use the modem through. According to dmesg, it loaded:

[ 4448.583450] /build/buildd/linux-2.6.24/drivers/usb/serial/visor.c: USB HandSpring Visor / Palm OS driver

Which is nice, and seems to be a serial driver, but it doesn't tell me what _device_ it wanted to create. I don't see a /dev/ttyUSB0. /dev/rfcomm0 is still there (that's what bluetooth called it, although I yanked the bluetooth key out of the USB port to plug in the cable) but it says no route to host. There's a /dev/ttyAMA0 that's got today's date on it (most of the /dev entries are from October 30, the last time I rebooted the laptop instead of suspending it). But pointing wvdial at that doesn't work, it never responds to ATZ and similar. Poking around in /sys has yet to prove particularly helpful.

Eventually unplugged USB, plugged in bluetooth, associated with bluetooth, plugged in USB again _afterwards_ (and told the now worried phone that it shouldn't disconnect the bluetooth in favor of USB when it asked), did the network transaction I wanted, and yanked the whole thing again.

Now btdelconn is spinning eating CPU, as usual. I should really move my laptop to Ubuntu 6.10 and see if it fixes anything. I'll miss Konqueror...

November 7, 2008

Cell phone internet continues to be wonky. It's back to giving me and as nameservers (which don't work), and then when I fix that it routes packets for 3 minutes, then stops routing packets. Called tech support; they said they couldn't help me unless I called them from something other than the phone I was calling to get support on. (Previous tech support people at least _tried_ to help, but I point out that this problem is almost certainly in their _network_, not in the phone. This idiot wouldn't route me to level 3 tech support, this was a level 1 guy who refused to help once his script found a problem. Up until this, T-mobile's tech support was always amazingly nice, if not always entirely useful. Oh well, I could probably call back and get somebody other than that guy, but I checked dmesg, saw that the binary only firmware blob in the ipl3945 driver had thrown a wobbly, unloaded and reloaded the module, and now chick-fil-a's wireless is working again. Worry abou the cellular internet later, it's slower anyway.

(Why that module used to be called ipw3945 and is now ipl3945, I have no idea.)

I also have no idea why the "Dynamic" CPU policy on Ubuntu 8.04 keeps setting the frequency to 800 mhz when I'm running builds. I have to manually set it to "performance" to reliably get the full 1733 mhz out of my laptop. (Maybe it's trying to keep the heat down enough that the fan stays off? It's plugged into AC power, although the battery's charging...)

I'm going to miss Konqueror when I upgrade my laptop to Ubuntu 8.10. Firefox sucks much less than it used to, but it's still not the browser _I'm_ used to, and konqueror is still much lighter weight. I suppose the Google browser thingy will eventually be released for Linux, that might be worth poking at...

So looking at the build on Ubuntu 8.10 gives me more todo items. There's a zillion new warnings in gcc 4.3, I need some kind of -Wshutup to get it to stop doing that. Gnome terminals default to a white background (how can you stare at that for hours on end without dying from eyestrain?) and the orange of ./ is close to illegible on that. So I need to put the colors in config. The User Mode Linux build breaks with the new glibc, I need to ditch uClibc once and for all, it's just too brittle to use.

November 6, 2008

Fought with Gnome on the server a bit. It's buggy as a bait store (three major bugs in the network settings GUI alone, but at least I managed to _find_ that GUI, and work around two of them.

But I'm used to bugs, and can cope with that. This at least isn't pathologically misdesigned so that I fundamentally disagree with what they're _trying_ to do.

Went back to the T-mobile store to take another stab at getting the internet-through-cell-phone thing working again. Apparently my phone caches the last access point it talks to, and traveling blanked the cache somewhow. The magic incantation to set the access point is the init string:


And it's fixed! My laptop has an actual battery, my cellular internet is working again, my bike is in good shape, I have bottles of tea... Life is good.

And Lennart Sorensen sent me an updated ppcqemu patch for 2.6.26, which is highly cool except that Bartlomiej Zolierkiewicz hadn't deleted the entire PREP platform back in July. Maybe I can put together a new patch that replaces the deleted stuff (like ide.h) and have this working soon. (That's my main big evil pending TODO item and I think Lennart's patch got me over the hump, so I am excited, just cautious.)

Still need to figure out why the x86-64 uClibc++ build is breaking. (All the other targets work, this one can't find -lgcc_s... Because it got installed in "lib64" rather than lib. Why on _earth_ did that happen? Argh. Yet another pathological corner case of the gcc makefiles...)

November 5, 2008

I know everybody said "the world had changed" after September 11 2001, and I just didn't see it. (Oklahoma city bombing, anyone? Hadn't we done this already? Psychotic nutball killing people at random over many years, that would be the Unibomber, right? Hadn't these same idiots tried to blow up the same world trade center a few years earlier with a bomb in the basement parking garage? Clinton sent cruise missiles against this same guy and the Republicans accused him of making it up as an excuse to distract from the all-important Monica Lewinsky scandal? It was all new to _Bush_, and he obviously couldn't cope with it and so told us all to panic, but compared to the cold war where the other side had nuclear (not "nukular", an atom does not have a "nukulus") missiles pointed at us 24/7? Not in the same _class_, guys.)

Today, it does feel like the world has changed, but in a good way. It's a bit like finals are over and the stress is gone, and now it's summer vacation. Somebody is in charge who actually thinks understanding problems might help solve them. No more paniced flailing from somebody totally out of their depth, using increasingly shrill rhetoric and draconian measures to mask incompetence.

I feel the urge to get Obama a hat.

And on that note, off to get angry at something else.

Upgraded my server to Kubuntu 8.10. This was a mistake. I'm not sure words can express quite how much I hate Kubuntu 8.10. Wow, this release sucks.

All the old brokenness (such as /bin/sh->dash and vimrc.tiny) is still there, with fun new driver breakage such as every time I type a key, the screen flickers. (This is a bug I last saw with a Western Digital video card in 1998, but they've managed to reintroduce it. This is of course a regression from the Kubuntu 7.04 previously on this machine, which did not have this problem.)

But mostly, it's because KDE 4.1 is a _disaster_.

It starts by launching two apps, a post-it note thing and something labeled "desktop" that gives you a transparent window. Making them go away was non-obvious (hover over them and they make toolbars on the right, making you think that _every_ window will now have moved its title bar to the right edge and making me hunt for system settings first thing. But no, those two windows are "special"). You click the red X to dismiss 'em, but try it about 3 times, the first two didn't close 'em.

It went to a Vista style launch window menu thing (whatever KDE calls the start button), rather than the traditional menu type. Figuring out how to switch it back took me 15 minutes. (I was looking under system settings rather than right clicking on it.)

After ten minutes of fiddling, I still haven't figured out how to add a terminal window launcher to the task bar. Drag and drop ignores the taskbar and puts it on the desktop background, which I always have covered with dozens of windows so that's useless to me. I want it in the _task_bar_. This should not be this hard.

Konsole's terminal window default size is no longer 80x25. The "new terminal window" icon in the lower left is gone, now you have to create a new one from the pulldown menu.

When I hover over the "konsole" icon I accidentally dropped on my desktop it gives me the same darn sidebar with the red X has three other icons. There doesn't seem to be any way to make it stop doing this. None of the icons in this sidebar have tooltips when you hover over them, so I don't know what they do.

Right clicking on the taskbar to add stuff is painful, I can get a bunch of preprepared crap (ala gnome), none of which is the Konsole icon that's already in the start menu. I can make an "applet launcher" which seems identical to the KDE menu icon. Trying to drag and drop the konsole icon (from the menu or from the desktop), onto the taskbar doesn't work. (That was the way to do it in KDE 3.) I think I've dropped about three konsole launching windows _behind_ the task bar, but I can't check because I haven't figured out how to hide the task bar yet. What used to be the minimize arrow at the right edge now pops up an inexplicable second task bar expansion thing with icons to left justify, center, or right justify my text. What? It's a word processor? I don't want this.

There's a "show dashboard" icon (no tooltip, but if you right click on it that's the name of the thing it says it would remove), and if you click on that it does indeed hide your toolbar, and all windows. And if you click on _anyuthing_ it brings it all back. It shows you a _picture_ of your desktop background, apparently so you can admire the background bitmap.

The new Konqueror hangs while doing a DNS lookup. The whole thing, you can't even switch tabs until the DNS lookup finishes or times out.

I thought "maybe there are known bugs and I need to install updates", so I fished out the light bulb icon from the nest of junk in the toolbar. (If that makes no sense to you, the network icon shows a green globe of the earth. Some serious drugs were deployed selecting these icons, and several of them no longer have tooltips when you hover over them to tell you what it _is_.) It starts by telling me my language support is incomplete (don't care), and that there are no HP devices found (I think it's talking about printers, of which none are connected to this machine). This is _crazy_ bad. Close both of those, and the lightbulb icon is gone, without actually having updated anything. Brilliant.

So I fire up Adept, and it's showing me big icons of what it can install, because we can't handle text and must be confronted with big cartoon pictures. Ok, click on the "view" pulldown... and nothing, that's an empty menu. There's a pulldown menu with NOTHING IN IT. I can't get an reasonable text view, and I can't get it to _stop_ sorting packages into categories and give me one big view of all packages like 8.04 did.

In general, the way most things worked in kde 3 is no longer available, and the new ways were created by a collaboration between Jean-Paul Sartre and a mime, with suggestions from the avant-garde and dadaist movements. WHAT WERE THESE IDIOTS SMOKING?????

I seem to have accidentally installed the Vista version of Linux. The UI is inexplicably different and DARN non-obvious. Do Not Want.

Sigh. I may have to break down and install Gnome. I despise that, but I can at least _cope_ with it. This is just GARBAGE. I've been a loyal KDE user for many years now, but KDE 4 is so saturate with OBVIOUSLY STUPID design decisions aimed at ripping off _VISTA_ of all things, it's simply not worth learning.

If Mark Shuttleworth knew that this was the direction KDE development was taking back when he founded Ubuntu, no _wonder_ he decided to make Gnome the primary desktop.

Luckily, this machine's intended to be a server, not a desktop, so I can mostly ignore KDE being crazy. I can talk to it via ssh once I set a static IP for the thing, so right click on the crazy globe icon and "edit connections"... And there are no connections. Where's eth0? What?

Ok, kill that, go to the start menu, settings... and all that has is QT 4 settings and the kwallet management tool. (There's no way to delete kwallet that I've found, that's another thing I despise. It prompts me for a password to open it... so it can store passwords. IDIOTS.) Ah, system settings is under the "system" menu (same icon as the settings menu, don't ask why both exist). Click network and... Proxy? Socks? What? This is 2008. Ah, connection preferences... and that just configures timeout values for socket read, server connect, server response, and PROXY CONNECT. Service discovery? Blank menu, no entries... The only other network icon is "sharing" which is about windows shares. No. Ah, there's an advanced tab... with nothing useful in it.

What, it it under the internet menu? Nope. System->hardware drivers? Nope, that says "No proprietary drivers are in use on this system". Because no non-proprietary drivers could ever be interesting to see or configure. Running ifconfig from the command line shows I have eth0 up and it got a dhcp address, I want to give it a STATIC address... And apparently, the only way to do so is with vi.

So how do I do it with vi? find /etc -name "*eth0*" produces no hits. There are over 200 entries in /etc, not counting subdirectories. /etc/network/interfaces only lists loopback. It's getting configured from SOMEWHERE, but I have no idea where. Between hal and dbus and udev and upstart and who knows what else is in here, I have no IDEA how my system is being configured, and it's one big tangled mess: I start to rip pieces out everything just _collapses_...

This is not Linux. Time to wipe it and install the real Ubuntu 8.10.

November 4, 2008

The existence of a Google Maps polling place finder is pretty darn cool, if you ask me.

I really really really hope that Bush Fatigue actually has motivated people to the 90% voter turnout they're expecting in some places. I know that when Sarah Palin complains that her first amendment rights are being infringed upon by other people's criticism of what she says... that kind of Complete Failure To Get It is just not noteworthy anymore. We've had eight years of Refuge in Audacity. We forget about old scandals because they're constantly buried by new scandals.

Outing Valerie Plame for political gain was _treason_, a crime they execute people for, and enough of her contacts got killed after she was outed to justify doing so as manslaughter anyway. The whole Alberto Gonzales thing wasn't related to that, nor was the brouhaha about waterboarding, which this administration did _after_ Abu Ghraib caused such an international scandal; how tone deaf can you _be_? I'm still mad at Obama about FISA, but he wasn't the guy who demanded the warantless wiretapping in the first place. And that's all just _recent_ stuff, the no-bid contracts for Haliburton are mere embezzlement and having oil lobbyists draft your first energy policy seems like a rounding error in comparison, but coming up with _bigger_ scandals to distract from the existing ones should not be a successful survival strategy for 8 consecutive years.

These idiots never finish _anything_. Iraq didn't mean Afghanistan was over. The cleanup from Katrina is ongoing; did Hurricane Andrew in Florida back in the 90's still have this kind of lingering damage 3 years later? This banking thing isn't even our first massive economic crisis on this moron's watch; doesn't anybody even remember Worldcom or Enron anymore? (California brownouts? Anyone?) Anybody remember Treasury secretary Paul O'Neil resigning back in 2002 and becoming the first in a long line of ex-insiders publicly lambasting the administration for malignant incompetence, and being proven right?

McCain abandoned his principles during the primary to court the "base" of right-wing religious extremists, and got himself stuck there somehow. (It's like he's a horror movie where he's a hostage, and Palin's his keeper or something.) There's a guy with an actual brain hidden under that campaign, which you can see in old Daily Show appearances, or the speech he gave at that roast thingy a couple weeks back, or his recent Saturday Night Live appearance. Not great, but not run-away-screaming creepy like the guy we've seen campaigning this year. But no matter who McCain himself is, his campaign brings with it the same group of cronies that the first two Bush adminsitrations had, Karl Rove's progeny. And if McCain's a doormat to them all through the campaign, he'd be a doormat to them in office too.

The definition of insanity is endlessly repeating the same actions and expecting different results. The fact that there are still over a dozen states solidly voting for McCain, and _any_ chance he might still win, implies that this country has some seriously hard-core idiots. I mean really. I'm boggling. HOW CAN YOU NOT GET IT? After the past 8 years, what does it take to convince you that there is some seriously bad juju at the heart of the current republican party? Whether or not you agree with the ideals intermittently (and conflictingly) espoused, that the implementation is an unmitigated disaster should be obvious to small children, pets, even some of your more active house plants by now.

They're "conservative", right. What exactly are they conserving? It's obviously not money, our national debt is now over $10 trillion, and the deficit's never been higher (even at the height of the cold war). They're not conserving energy, or water, or any other environmental thing. So what is it then?

(Speaking of money, the whole "tax cuts for the wealthy" thing is rationalized because we can't punish hard-earned success. Didn't John McCain marry a rich wife rather than earning his own millions, and didn't she inherit her money? And these are the spokesbeings put forth to promote this philosophy?)

They're "socially conservative", they believe new social developments are immoral and to counter it the government should control public morals. Legislate morality. And they do so while crying for less government and wiretapping us without a warrant. Send people to the other side of the planet so women can't be forced to wear Burkas, then impose crippling FCC fines when a clearly accidental "wardrobe malfunction" happens at a superbowl halftime for under a second. Federal regulations should specify how long miniskirt lengths can be, with inspectors? (And of course people can't have sex out of wedlock but if they want to get married you throw Proposition 8 at them, but that's state level lunacy.)

And they keep getting _indicted_. The moral crusaders are the people caught having covert homosexual relations with pages or random strangers in airport bathrooms. John McCain keeps going on about this Ayers guy when McCain was a member of the Keating 5. They scream about Acorn but live with Diebold. McCain is of course on his second marriage (having divorced his first wife to marry a younger rich blond woman), just like Bob Dole and Newt Gingrich before him. (Remember the big "Family Values" campaign in 1996, the last election pre-Bush jr?) If you take them at their word and judge them by their own standards, that's when they fail worst of all.

As far as I can tell, rather a lot of religious nuts either fervently avoid thinking (because God works in mysterious ways so it never has to make sense) or are actively trying to hasten The Rapture. They believe God is omniscient and all-powerful and therefore it's vital they take action to micromanage the world around them or else it'll all fall apart. The hypocrisy is built-in at every level.

I'm starting to believe that Sturgeon's Law applies to the population at large. Alas, I believe most of the Republican party would agree with me, which is a strong counter-argument. But it's clear there are determined, dedicated, self-destructive idiots out there who want to take the rest of us with them. And not all of 'em are on Zoloft.

The only way the system has _ever_ worked is if the rest of us work even harder to counter them.

To quote John Adams in the marvelous movie 1776, "Now _vote_, damn you."

November 3, 2008

You can't make this stuff up. When they say truth is stranger than fiction, this is what they're talking about. (Especially the picture that goes with the story.)

Humans. Weird lot.

On the arm target, gcc had an internal compiler error attempting to build... itself. (The segfault was in the native dwarf2 threading stuff built with the cross compiler.) That's just sad. Ok, try the setjmp longjmp stuff. (I could make this a per-target thing in GCCFLAGS, but that's kind of silly.)

So according to Christian Michon (who says it's a tip he "found somewhere in a Gentoo forum"), I should blank the LDFLAGS in uClibc++'s Rules.mak if my link is failing. The line in question is:

LDFLAGS:=-Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,defs

The first two chunks enable warnings (harmless). According to "man ld", the last two mean:

    Combines multiple reloc sections and sorts them to make dynamic
    symbol lookup caching possible.

    Disallows undefined symbols in object files.  Undefined symbols
    in shared libraries are still allowed.

The second of those definitely sounds like what's breaking. I don't know why it's there...

And removing it was the last chunk, and uClibc++ built! Yay! And it's installing wrong. (It insists on inserting a usr/ directory under wherever I tell it to install. Great. Kill that...)

Adjust the wrapper to look where I actually installed the header files. There's no symlink; fix that. The libraries are installing where the uClibc dynamic linker isn't looking for them at runtime; fix that.

Ha! Ran out of things wrong with it, at least when it comes to building a "hello world" c++ file. C++ support is in the native toolchain.

And WOW is g++ slow. Under qemu, running three times and taking the fastest time, building hello.c takes gcc half a second and hello.cpp takes g++ eight seconds. The difference is a factor of 16! For comparison, doing the same thing under a chroot g++ hello.cpp takes 0.62 seconds and gcc hello.c 0.07 seconds. (Only a factor of 8, but I suspect the time for the C compiler has some timer granularity issues measuring anything that small.)

After the uClibc++ release and the next FWL release, I have to get back to the C++ paper with Eric...

November 2, 2008

Cross compiling gcc's c++ support doesn't work because even though I'm saying --enable-threads=posix the various subdirectories are trying to run the compiler it built to grep out the "Thread model: " line to set the config entry target_thread_file (which gets used to set glibcxx_thread_h, which is breaking) and you CAN'T RUN IT WHEN WE'RE CROSS COMPILING YOU TWIT!

Yes, ./configure is probing for information I fed it on the command line. I hate autoconf. (Basically anything the FSF ever thought was a good design decision is probably a bad idea when you learn more about it.)

Part of the problem is that libstdc++-v3 doesn't want to build at quite the same location as the other packages, it wants to live in an $ARCH-unknown-linux subdirectory under build-gcc, from which location it apparently can't grab things like the top level "config.cache". (Or if it can, it's not paying _any_ attention to it, because it just tried to build with i686-unknown-linux-c++... Hang on, I'm not overriding that in the environment variables the way I am with the other host toolchain components. And the reason I'm doing that is I'm not building an i686-c++. (But it's got i686-c++filt, whatever that is...)

Right. In order to cross compile libstdc++, the cross compiler needs to support C++. That makes sense. (Ok, back up and attack an earlier layer of plumbing!)

Adding C++ support to the cross compiler means I can teach distcc to farm that stuff out from QEMU to the host system as well, which is nice. It won't have C++ headers and libraries on the host system, so you can't actually use the cross compiler by itself to build C++, and I wonder if I should deal with that. (The idea of attempting to cross-compile C++ is not something I should ponder closely this soon after lunch, not that cross-compiling a C++ compiler is much of an improvement...)

And I have to wrap i686-g++ so it can find stddef.h because the C++ header cstddef includes that. Great. (Building C++ on C was like building Windows on DOS. The earlier technology made sense in context, and may even have continued to be useful by itself, but attempting to extend it without leaving it behind DID NOT WORK.)

Ok, wrapped the darn compiler and a chunk of libstdc++ built! And then:

/home/landley/firmware/firmware/build/temp-i686/build-gcc/i686-unknown-linux/libstdc++-v3/include/i686-unknown-linux/bits/ctype_noninline.h: In constructor 'std::ctype::ctype(int*, const short unsigned int*, bool, size_t)':
/home/landley/firmware/firmware/build/temp-i686/build-gcc/i686-unknown-linux/libstdc++-v3/include/i686-unknown-linux/bits/ctype_noninline.h:85: error: cannot convert 'const __ctype_touplow_t*' to 'const int*' in assignment

This is a C++ error, in a chunk of the library I'm NOT EVEN INTERESTED IN BUILDING. Did the library I need build? Yes, yes it did. (Cool, victory!) Now, can I figure out how to untangle _that_ build from the parts I don't want to build that are randomly erroring out? Yes, yes I can. (Insert either "Barack Obama" or "Bob the Builder" reference here.)

Now I'm imagining Barack Obama surrounded by talking construction equiment, giving the dump truck a motivational speech and organizing the hydralic shovels to into a subcommittee to debate legislation. Right.

And now I've found a "how did that _ever_ work"? Checkin 390 added this to

+$CC $STATIC_FLAGS -Os -s "${SOURCES}"/toys/gcc-uClibc.c -o "${ARCH}-gcc" \

The problem is the part of the second line in single quotes, which contains a shell variable. Variables within double quotes are expanded, variables within single quotes aren't. I need to #define a string (you may remember me fighting with this last year), so I need the #defined symbol to contain double quotes, so I put them in single quotes. Except that means the shell variable isn't expanded, so when the wrapper tries to call the compiler, it's handing off to the wrong executable name.

Easy enough to fix: -DGCC_UNWRAPPED_NAME='"'"$ARCH-rawgcc"'"'

But the part that makes no sense is that the checkin that broke this was in AUGUST. How's it been working all this time? It's like finding out that the computer you've been using all day wasn't plugged in, but didn't stop working until you _noticed_. *boggle*

Yes, I've heard about this class of bug before, but it's not one I normally encounter. (Now I want to download a snapshot of an earlier version and figure out exactly what it's been doing all this time. Yup, forensic investigation on my _own_code_, to understand a bug I already fixed. That's pretty normal for me.)

Ah, it's because I was creating a here document ( and executing it, because back when I was first wrapping the toolchain this took a lot of debugging so I encapsulated that step to make it easier to run by hand. I just removed the here document, and outputting the here document is itself a quoting context that resolved all those variables. So getting the quoting context wrong otherwise was irrelevant at the time.

Back to getting c++ to work.

November 1, 2008

Up until 4am getting a cron job I'm happy with to build and upload all the FWL targets. It copies stuff into a staging directory as it builds each thing, and then moves it all to the final directory in one go once it's all there. This keeps the README and the tarballs from getting out of sync.

Afternoon now, banging on the build script some more. Updating the README it generates to get more packages and versions in there, which led to investigating my noversion() script to see how to make a getversion(), and I realize that it's been a couple years since I wrote that horrible sed invocation and I don't really quite understand how it works. (How does "bash-2.04b.tar.gz" get the b stripped off? Yeah, there's a ([0-9][A-Za-z]) search in there so a single letter right after a number should be considered part of the version, but it comes _after_ the ([0-9.]) meaning that should have consumed the digit already so the second one wouldn't trigger. And yet it does. I wrote this, but I'm not understanding it.

This must be what Perl programmers must feel like all the time.

The new toolchains are up in the above staging directory, but I haven't replaced the old ones yet because it occurs to me that they're dynamically linked against the old 32-bit version of Ubuntu 7.04 on that server, which is less useful than it sounds.

I can whip up 32 bit versions statically linked against x86 uClibc no problem; chroot into the i686 system-image directory and re-run with BUILD_STATIC. But coming up with 64 bit versions statically linked against x86_64 uClibc is a bit more trouble, because the server's 32 bit (so I'll have to use qemu to do a native build) and it's already an old slow server (hence why I'm not using it for anything else) that takes something like 10 hours to build all the targets all the way through anyway. Adding in a qemu step in there would bump the cycle time for all targets above 24 hours. (No, I'm not setting up more servers to spread the distcc load more, the other ones I have are even slower and I like my electric bill about where it is, thanks. I haven't bought a new desktop system in years, and that last one I _did_ buy had stability problems and I wound up goodwilling it. This box is maybe 5 years old.)

This is easy to do on my laptop, but the point is not to tie up my laptop. (Also, now that I've got a new battery in my laptop I'm reluctant to leave it on overnight because I know the heat shortens the battery life, especially in Dell's "progeria" batteries, and it's all sparkly and new at the moment...)

Evening now. I guess a statically linked i686 toolchain is reasonable, since you can theoretically use it on x86-64 even without /lib32 installed. I should try it on system-image-x86_64, if it works there it's universal. :)

Ouch. My sister's getting divorced. Not good...

October 31, 2008

I thought software suspend had developed another subtle bug where the volume level the volume level the sound card is at when you suspend becomes the new 100% level upon resume. (The brightness does this, but it fixes itself as soon as you adjust it downwards and then back up.) But it turns out the sound problem was that there's a volume dial on my sound cancelling headphones, which I never remember is there and tends to adjust itself in my backpack. So that's ok.

Mostly to a good stopping point with the wrapper script fiddling, now building uClibc++. I really, really, really hate make.

Ok, after much fiddling I got it to build, but it also needs libsupc++.a and _that_ is part of the libstdc++ build. My current target environment hasn't got one, and in order to get it to build one I seem to need to ./configure libstdc++ to cross compile.

Which is what was breaking earlier.

Ok, so apparently (on i686 anyway), it's _not_ using --enable-sjlj-exceptions. (I vaguely recall that circa 2005 uClibc needed this to work with C++. I think it's no longer the case, but can't point to something specific. In any case, the current configure invocation is _not_ enabling it, although for some reason the ./configure test in the libstdc++-v3 subdirectory isn't figuring this out, but if I explicitly say --disable-sjlj-exceptions on the ./configure line then it does figure it out. (I don't _think_ doing that breaks any non-x86 architecture that would otherwise naturally select sjlj-exceptions, but to be honest I don't know. That's what testing is for, I guess.

Of course the build breaks slightly later in the libstdc++-v3 directory, for no readily apparently reason. I don't actually _want_ to build libstdc++-v3, I want to build uClibc++, but uClibc++ needs to grab libsupc++.a out of the existing glibc libraries, and that only gets built if the libstdc++-v3 directory gets built. I have yet to figure out how to tell the build "just build this one .a file, don't build the whole directory".

I need a bigger hammer...

Once again, nobody came to get candy. Wound up going out and inflicting "happy candy from strangers day" upon my neighbors, just so I don't wind up eating the whole bag. (Got some return fire, of course. There are orange kit kats for the season. Quite tasty.)

October 30, 2008

Ooh, subtle nastiness. The reason uClibc++ isn't building is it needs to suck an object out of libgcc_eh.a. To find it, it calls "i686-gcc -print-file-name libgcc_eh.a", which searches the cross compiler's library directories, not the target's library directories.

Much banging on the wrapper and going "Hmmm...", which leads to much removing of overgrowth in the wrapper code. I'm torn between pushing ahead to just get c++ working (because people are waiting for it) and stepping back and cleaning up this _mess_. Doing a little of each at the moment.

I'm setting UCLIBC_RPATH in, but nothing in the wrapper is actually checking that variable. That's... weird. I know why I did it, and I'm pretty sure it was working at the time...? Hmmm... That was introduced in checkin 66 which was primarily about the uClibc install patch. I should audit the executables again to make sure none of them _have_ an rpath...

Highly disappointed by the last two disks of Full Metal Panic. They decided to forget about the high school plot and do a pointless mecha anime for something like four consecutive episodes. Ship the male protagonist off to Elbonia (giving the female protagonist less screen time in each episode than she gets in the opening credits, and even that's mostly quick jump cuts to remind you she exists), introduce an entire team of people to torture and kill them one by one, for no readily apparent reason. Why? And of course the bad guy is contractually importal so if we just skipped those episodes commpletely it would have zero impact on the plot.)

October 29, 2008

Took Fade to an eye doctor's appointment today so she could get contact lenses for her halloween costume. Lunch at the highland mall food court, then back home.

Much banging on FWL. Finally set up the server to do nightly builds, and now I need to make it easy to do nightly builds. I have a ./ script which populates an "andpie" directory with the toolchains and system images (and bzip2'd logs, and README file), and rsyncs it up to the nightly snapshot site. But that script expects the build to already have happened (via ./ I've also been updating the uClibc and busybox archive tarballs by hand from my local copies of those svn archives, and ./ is running svn info against those (at known locations on the local system) so it can grab the version numbers. That's way more manual than is good for a nightly cron job.

Instead I should update ./ to point to the nightly snapshot urls for busybox and uClibc, then run "USE_UNSTABLE= ./" to clear out the existing alt tarballs (it doesn't cleanup the stable versions of a package when you select a corresponding alt, but it cleans up the alt versions if you aren't currently using them). The ./ should re-download fresh snapshots normally when it gets them in USE_UNSTABLE again. Change to extract those and run svn info against the resulting directory (since the snapshots have all the svn archive info in them, and all I need is the version number; yes busybox and uClibc are currently guaranteed to match, but doing it twice isn't a big deal).

The other bit is making sure the cron job runs at the right time. The uClibc server runs the cronjob to make the nightly snapshots at 20 minutes after midnight (judging by the date stamps on the file), but its midnight is california time and I'm in texas, so I should start mine at around 2:30 am.

The other problem is that g++ isn't being wrapped. Fixed that, adjusted the wrapper itself a bit, tried out the c++ test package from mingw, and it can't find "vector". Huh. So currently the wrapper is doing:

incoming: g++ -DHAVE_CONFIG_H -I. -I. -I../../source/headers -I../../source/headers/geos -I../../source/headers -g -O2 -DGEOS_INLINE -Wall -ansi -pedantic -Wno-long-long -MT CGAlgorithms.lo -MD -MP -MF .deps/CGAlgorithms.Tpo -c CGAlgorithms.cpp -fPIC -DPIC -o .libs/CGAlgorithms.o

outgoing: rawg++ -fno-use-cxa-atexit -nostdinc -nostdinc++ -isystem /usr/bin/../include/c++/4.1.1 -isystem /usr/bin/../include/ -isystem /usr/bin/../gcc/include -U__nptl__ -DHAVE_CONFIG_H -I. -I. -I../../source/headers -I../../source/headers/geos -I../../source/headers -g -O2 -DGEOS_INLINE -Wall -ansi -pedantic -Wno-long-long -MT CGAlgorithms.lo -MD -MP -MF .deps/CGAlgorithms.Tpo -c CGAlgorithms.cpp -fPIC -DPIC -o .libs/CGAlgorithms.o

Ok, it's added the C++ headers to the command line. Not looking for them in a sane place. Where are they installed... They're not?

Ah, make all-gcc doesn't build libstdc++. Well that's kind of silly. And make all is breaking doing a ./configure that can't figure out what kind of exception model to use. It can build g++ but not libstdc++. How does that make sense?

If it's going to be this much trouble to build, and I've already got it cleanly building _without_ libstdc++, I might as well just try to add uClibc++ to the mix. That's what I wan't long term anyway...

October 28, 2008

Fade and I dragged our guest out to lunch at Dead Lobster (where he insisted on paying for his own lunch), then to the Starbucks on 15th street. (Epoch, the 24 hour coffee shop... was closed. How does that work? Dunno.) Bothered the poor man for 4 hours until it was time to drop him off for his flight to LA (where his blog entry says he got in late, about which I feel guilty despite getting him to the airport over an hour before his plane left).

On his way through, he hand delivered our copy of Super Stupor issue 1, which was quite good. I am reminded of my approach to finding the early voting polling place.

Fade and I wandered up to the discount movie theatre afterwards, but they've cycled out just about everything we wanted to see, except Kung Fu Panda which was 2.5 hours to the next showing. Went to Ikea instead (right down the road from there), had some meatballs and got 2 more bookcases.

Note to self: the salted caramel hot chocolate at starbucks remains very tasty, and an "egregious" (the size I normally order) gives me an upset stomach right afterwards, and then Fade and I both sugar crash _hard_ a couple hours later. (And she had a small.)

The third -rc of uClibc is up now.

It's possible this guy may have too much time on his hands.

My laptop battery lasts FOUR HOURS. That's amazing. (Ah, a fresh young battery, as yet perky and unwrinkled. Or some such. Supercapacitors, I'm telling ya...)

October 27, 2008

Most fame these days is what I like to refer to as "conditional rock star". Ordinarily I'm just me, but when I go to certain conventions (mostly embedded Linux things) people want to buy me lunch, which seems a bit odd.

I say this because I'm driving Randal Milholland from the bus station to the airport tomorrow. I have the honor of buying _him_ lunch, and he offered to reimburse me for gas. (Yeah, I know how that goes, but two of our cats are named "Peejee" and "Aubrey" after characters in his strip. I long ago mastered the art of Not Going All Fanboy At People, but I'm not exactly worrying about the gas either.)

Last night I sat down and actually looked at the uClibc svn 23660 checkin that screwed up malloc on arm. Most of it's locking stuff that NOPs out when you disable threading (which doesn't fix the problem), but I had a theory and it turned out to be right. Before the patch, the heap was tracked by structures that included locks and a pointer to the actual chunk of memory. The patch moved the locks out of those structures, and changed the functions to use pointers directly to the chunks of memory, not to the structures.

This sounds great if you don't understand pointers. If you _do_, you immediately go "but what if they have to change what those pointers point to"? And that was the problem. If a function takes "thingy *a" as an argument, and does an assignment "a = newthing;", and then returns... that assignment is lost. Only a local variable got changed. You need to pass in "thingy **a" and then go "*a = newthing;", and _then_ your upstream variable gets changed.

Bernhard whipped up a patch to fix it, and malloc is working again. It would be so nice if more people understood how pointers work.

Yay, the Rachel Maddow Show on is now the full show and not just a clip from it. So I can now get countdown _and_ maddow in their entirety as podcasts.

Ha! I can has laptop battery again!

My laptop battery got so bad a couple days ago that the instant I unpluged it from the wall, the battery indicator turned solid red. Blinking red used to mean "black battery needs food, badly!", and solid red was the next stage "black battery is about to die!". But now it just wasn't holding a charge at all. I was worried just biking to McDonald's or Boomerang's that the suspend-to-ram would run out of juice before I could get there.

Luckily, back when I bought my laptop I bought a spare battery, and yesterday I found the box it was in. This one's only a six cell rather than a nine cell, but it's _not_dead_ and this is important. (An hour later, the little "charging" light is still on. Wow, it's been a while since that was the case. Someday, we get supercapacitors, but in the meantime a fresh laptop battery is exciting. I can go _out_ somewhere again. Such as to the modern secular temple known as Starbucks, where they have salted caramel hot chocolate. Which I am now drinking.)

Hmmm... It turns out that Vladimir's pkg-config thing isn't a C++ program. (I have no idea why his build thought it was.) Doing a find on my hard drive trying to find source packages I've got lying around. (some of them years old, I just bumped into a firmware linux tarball from 2003.) I've got udev, lilo, busybox, squashfs, linux, dropbear, m4, automake, bison, nasm, zisofs, cdrtools, flex, make, binutils, bin86, autoconf, e2fsprogs, libtool, less, gzip, bash, diffutils, zlib, klibc, quilt, gcc-core, patch, mercurial, git, bzr...

Ooh, mysql. That's got c++ in it, apparently. (Well, bits of it does.) Huh. And when I go "./configure --help" it says there's a --target option, but when I go "--target=armv4l" it's ignored. Have I mentioned that autoconf is a bit like the security theatre at airports? It does not actually do what it claims, it's just a huge song and dance to convince you that enormous effort has gone into solving a fairly simple problem. Long lines in front of metal detectors so they can confiscate your soda cans don't substitute for air marshalls and locked reinforced cockpit doors, and ./configure doesn't substitute for being able to specify the target C compiler. Argh.

Ah, I still have mingw source in an old backup directory (from back when I was putting together a windows test environment for tinycc) and that's bound to use C++. Found a package (geos) that I don't even need to worry about configuring to make sure it uses C++, the whole thing's written in it. Just build it at all under a target and it either builds or it doesn't.

Banging away on QEMU weekly news. I'm up to the introduction of the Tiny Code Generator. Coolness...

October 26, 2008

It's always weird for me to come across this sort of thing. Oddly flattering and frightening at the same time that someone would bother to translate anything I'd done into a foreign language, but the strange part is that it's been a matter of course for years. (I just don't normally think about it.)

On the other hand, some random person edited out my tenure as BusyBox maintainer from the wikipedia article on busybox, so I guess I wasn't that important there. (They also have some of the history wrong, but it's Wikipedia so I expect that. Saying Wikipedia is the largest source of anecdotal information on the web is like saying "The sky is blue [citation needed]".)

Upgrading busybox to a more recent svn snapshot seems to have fixed whatever was wrong with the binutils build on arm. I'd feel better if I'd found the problem so I could say _specifically_ what got fixed, but I haven't exactly got a shortage of todo items either.

The uClibc arm malloc thing is weird. There are actually three allocators, the default one I'd been using (MALLOC), an ultra-cheesy slow as molasses one for nommu systems (MALLOC_SIMPLE), and an overcompliated copied-from-glibc bells and whistles one (MALLOC_STANDARD). MALLOC is so screwed up the system doesn't even boot to a command line. MALLOC_SIMPLE boots, but apparently leaks memory (it works fine right up until the OOM killer triggers). MALLOC_STANDARD seems to be working fine, and binutils built to the end with that. I'm guessing the big one is the only malloc variant the guy actually bothered to check.

October 25, 2008

My laptop battery has officially gotten to the point where a 9-volt would do better. When I suspend to ram and unplug, the little orange battery low light comes on the instant the plug comes out. I was worried it wouldn't last (suspended) through the bike ride to McDonald's. (And _this_ is why everybody buys the "extended warantee" from Dell.)

My previous laptop, the keys popped off so you could clean the cat hair out from under them. This one I popped the "page up" key off once and never did get it quite properly re-attached; it needs some kind of special tool I think. Sadness.

My brother now has a linkedin profile. How odd.

Dragon is curled up next to me on the couch, sleep meowing. (Sound asleep, but breathing fast and making little "mereh" noises.)

October 24, 2008

Bernhard asked me to resubmit my old qemu chroot patch, because apparently there's a debian bug requesting the feature. So I did.

I also got the prebuilt binary toolchains and system images built against uClibc-svn updated.

I thought I knew what I'd be doing with the rest of my evening: get the server set up upstairs and teach it to do nightly builds of FWL against the new uClibc and busybox snapshots, look into the bug Jean-Christophe Dubois posted to the FWL list, debug the binutils build issue on arm, look into Vladimir Dronnikov's package wishlist, catch up on qemu weekly news some more, and so on). But instead I got shanghied to work on a thing instead...

And once again, I was offered money and wound up not doing enough work to justify invoicing them. There's a theme here...

So I couldn't reproduce Jean-Christophe's bug, asked for more info.

Ok, now that is juggling.

I can see why the live action Tick series flopped. There's potential there, but it's a bit like the first few episodes of Star Trek where nobody knew their characters yet and everybody's a bit off model. The actor who does The Tick is actually pretty good at it (and Arthur's ok), but the writing is inconsistent and the directing isn't right. But what's really wrong is that the City seems deserted. Each show has maybe three extras in the background. The foley is almost nonexistent, there's usually no background music and when there is it's thin and eminently forgettable. The longest shot they ever do is maybe 20 feet deep, making the whole thing seem claustrophobic. The individual line deliveries are good but the pacing is off, slow and spotty rather than tight and snappy. (Comedy is all about timing, this just doesn't build.)

Sad, really. It _could_ have been great.

Yesterday Fade and I did the early voting thing. She got a sticker. I did not get a sticker. *sniff*

October 23, 2008

Heh. Back in 2000 I wrote an article for The Motley Fool called Why Microsoft's Stock Options Scare Me. In 2001 Gretchen Morgenson wrote an article for the New York Times called Some Suffer Tax Hangovers From Microsoft Option Spree. Her article won the 2002 Pulitzer prize for "best reporting". Mine was intimidated my editor so much he wrote a rebuttal the next day. Yeah.

I don't usually think about microsoft, but I do check in on them every couple months. Right now, it is kind of interesting to ponder how the current economic crisis affects Microsoft. As far as I can tell, they're taking it in the teeth.

For a decade now, Microsoft has been "too big to fail", a phrase which sounds kind of familiar after the past few months. The computer industry couldn't live without Microsoft, but it also couldn't live without floppy disks, dial-up modems, and 32-bit x86 processors. It managed to transition off all of 'em anyway.

Windows has been a "must buy at any price" which people couldn't afford to do without for years, just like gasoline. But here in Austin, gas prices are down to $2.17/gallon (at the 7-11 on south Congress), because demand's gone way down. Companies are failing, credit is nonexistent, people are scared, and consumers just aren't buying as much gas as they used to. They're not replacing it with anything, they're just making do with less.

Now imagine what that sort of thing is likely to do to Microsoft's quarterly sales figures. Now ponder that Microsoft's sales figures, and the partnerships based on their ability to make hardware vendors money, are literally all they've got left.

For context, keep in mind that Microsoft has been technically bankrupt for years. Yes, moreso then back when they perpetrated Windows 3.1 on the world. There are a number of reasons for this:

So now let's get back to the current economic crisis. The entire stock market's in the toilet, even McDonalds franchies can't get credit, the roaring inflation of the past couple years has stopped in its tracks the same way Paul Volcker stopped it at the end of the 70's: with a credit crunch. Nobody can pay more if nobody has any money. If demand for _gasoline_ has gone down so dramatically, what happens to demand for Windows and Office?

Now imagine what the executives at Microsoft are doing. Not Ballmer, he's so deep in denial he's buried without a trace. Think about the layer of executives under him, and the layer under them. What are they doing?

From what I hear, they've decided to take the money and run. The regulators have their hands full with the banks, who's to notice if Microsoft's managers award themselves huge bonuses, squeezing as much money out of their positions as they can, while they still can? They're not worried about the future of the company, they spent years fruitlessly trying to figure a way forward, and now it suddenly doesn't matter anymore. It's a crisis, there's nothing positve they _can_ do.

I don't have specifics. I'm just getting rumors. But rumor is that the panic at Microsoft has given way to a strange combination of denial and greed. Enron (and Worldcom and the other few dozen corporate failures near the start of the Bush administration) led to indictments, but in the current regulatory environment massive bank fraud leads to nearly a trillion dollars worth of bailouts. If Microsoft is too big to fail, ignoring the future and pocketing cash now is the obvious course of action...

I don't know what's coming, but it could be an interesting few months. I suspect they'll find a way to make their numbers look good later today, they've got quite a history of that. (More here, and here.) They always present a smiling face to the outside world, with well-oiled hair.

But inside the company? Dunno. I used to get excellent info about what was going on inside Microsoft from Dell employees, back when those two companies were joined at the hip and the dev teams exchanged daily builds and talked all the time. These days? The Austin rumor mill simply doesn't seem to care what Microsoft's up to anymore. I just get the occasional snippet. This snippet was that management's acting like a beehive that's smelled smoke, ignoring everything but eating all the honey they can out of the stores while there's still time. I have no way to confirm that at present, so make of it what you will...

Mini's noticed a bit of this, but if the rumors are correct that's just the tip of the iceberg. The amount the executives pay themselves isn't very interesting; them haven given up on salvaging Windows 7 is. After the Yahoo thing Ballmer's credibility as a leader is at an all-time low within the company, and they blame him for the flat stock during his entire tenure... But who have they got to replace him with?

People keep telling me Apple won't take over because Steve Jobs doesn't want to own the PC industry. Except that Steve Jobs didn't _want_ to come back and be CEO of Apple again in the first place, an enormous gift-wrapped opportunity landed in his lap repeatedly until he unwrapped it. How is the PC industry not doing the same thing?

Oh well.

October 22, 2008

Much domesticity. Had an air conditioner service guy come out and frown expensively at the air conditioner, since it's been 5 years since anybody looked at it. (He wanted to track down and harm the idiot who installed everything in our attic crawl space, which was the same reaction the last guy had.) The expensive part was actually adding 2 pounds of freon to the outside thingy (at $40/pound), but with five years of osmosis through copper that's actually pretty good. The high end of "normal" is a pound a year.

Went down to the Texas state capitol building, found the secretary of state's office, and asked where I could do early voting. (Yes, this is my normal approach to things, why do you ask?) Apparently, the undergraduate library at UT is doing it. I plan to drag Fade to go look at grad school admissions tomorrow anyway, we can early vote while we're there.

Biked to chick-fil-a. It's much cooler than it was, but still a bit uncomfortable sun-wise to do this at 2 in the afternoon in Texas. Enjoying the air conditioning and free soda refills here.

People keep asking me about tinycc, and nobody reads the mailing list thread I linked to, so I wrote up a summary of why I ended my tinycc fork. I note that PCC and llvm/clang are both non-gcc compilers you can poke at, if you're into that sort of thing.

Chick-fil-a has somebody in a cow suit, walking up and down the aisles. Now they're dancing. Right.

I had not previously noticed that the sizes on the menu in Coffee of Doom were S, M, L, and WTF. I want a local coffee shop like that. (I miss Metro.)

October 21, 2008

It's amazing that The Onion managed to accurately summarize the entire Bush administration the month he was inaugurated.

Wound up with two more disks of Heroes, since we forgot to bump anything up in the netflix queue before it. So we sat down and watched the second DVD of season 1, and it picked up noticeably. (Ok, the series is still extremely slow when the indian professor guy is on the screen, including narration, but the rest of it's started to get actually entertaining.) Hiro is still far and away the best character of the lot, but the various scattered members of the ensemble cast are starting to intersect a bit, and something that could be called plot (in a good light, with a tailwind) is starting to occur. (On the first disk I thought the cheerleader's father was this Sylar guy, but apparently they're two separate characters, and he _isn't_ waiting for her to grow up enough he can sing a Jonathan Coulton song at her. Right.)

The main pending problem with uClibc-svn is that svn 23660 and 23698 broke arm oabi. I put together an alt-uClibc-revert-malloc.patch to revert 23698 and 23660 (they go on top of each other, no the second didn't fix the problems introduced by the first), but toybox patch fails to apply it! The stock ubuntu patch program does, so when I did a ./ --extract without first running ./ it worked fine, but then when I zapped the build directory and did a "./ --nofork" to build all targets, it failed setting up the source code. Some boggling occurred until I figured out what was going on.

Working around the problem to build the toolchains I posted was easy enough, just "rm -rf build; ./ --extract; ./ --nofork" in that order. But that's a workaround, not a fix. Half the point of host-tools is to find exactly this sort of bug, acting as a smoke test for the final build environment. (That's why I make ./ do a ./, build ./, and _then_ do a ./ --extract, so it's using the target tools when extracting most of the source tarballs.

Today I finally got around to debugging it properly, and the bug in toybox patch turns out to be that if you match part of the starting context of a hunk, and then have to flush it partway through due to a mismatch, it won't notice that tne new line that triggered the flush might _also_ be the start of a new match. In theory, any of the intermediate lines seen so far could also be the start of a new match.

October 20, 2008

Ok, the weird bug I was seeing is because toybox patch is broken. If I do a ./download --extract before building the host-tools, alt-uClibc patches fine. If I do a ./ --nofork and it builds before doing the ./download --extract, the patch fails to apply thinking it has a reversed hunk.

Yay, msnbc added Rachel Maddow's show to their podcast page. I need to set up an rss feed reader.

I put current uClibc toolchains and system images up on my uclibc web page (which is the same as my busybox web page since they're the same server.)

Digging up my old patchlist->mercurial converter script. The morris subversion repository is bigtime nonstandard, it has several different projects (busybox, uClibc, buildroot, uClibc++, and several fossils) in the same repository. So the commit numbers of any given repository skip a lot. The subversion server is also really slow (even when it's local, subversion is slow). The roundtrip time on an svn command averages somewhere around 15 seconds, which would be 240 per hour, meaning converting extracting a list of separate patches for the entire busybox or uClibc repository can literally take a full day.

I already have a patchlist script to get those patches, and I already left it running overnight to get the full list. Creating a mercurial archive from that patch list is more interesting than doing so from the live svn repository, for several reasons. (Development and testing of the conversion script goes much faster, I'm not bogging down the server with test runs, if I ever decide I need to tweak something and reconvert from the raw data I don't waste a whole day doing it...)

There are, however, two chunks of data missing from the patchlist. You can't fetch svn commit 1 with "svn diff -r 0:1". It gets confused. So in order to get the very first svn commit as a diff, you have to check the first revision out, delete the .svn subdirectories, and then "diff -ruN" with an empty directory. Subversion just doesn't provide an obvious way to do this. (Luckily, the first revision in busybox is 5, and the first one in uClibc is 540, so this doesn't come up on a project I'm interested in. If I want to use this script to make an hg mirror of the qemu repository, I'd have to care, but there are other conversion programs for that.)

The other one, which I do care about, is the release tags. It's important for the repository to record which versions releases were cut from, and digging these out of subversion is a _pain_, and non-obvious. I wrote a python script to do it, what you do is "svn list" to get a list of directory names. Then you apply some regular expressions to match just the names you're interested in and convert them to release names, so "uClibc_0_9_26/" becomes "uClibc-0.9.26", except you then have to use the _original_ name before the cleanup to do an svn info on that subdirectory ("svn info", and don't worry about that being instead of, they're the same server) in order to get a data dump like this from svn info:

Path: uClibc_0_9_26
URL: svn://
Repository Root: svn://
Repository UUID: 69ca8d6d-28ef-0310-b511-8ec308f3f277
Revision: 23748
Node Kind: directory
Last Changed Rev: 8248
Last Changed Date: 2004-01-03 23:34:35 -0600 (Sat, 03 Jan 2004)

And out of that you search for the "Last Changed" lines to get the commit number and date for the mercurial tag. (Of course I did all this in python, doing that much string manipulation in other languages is painful.)

I note that the URL says "tags" but info is actually showing a data dump for a _branch_. Subversion doesn't seem to distinguish between the two concepts. I also note that fetching the current set of tags for busybox takes just under three minutes. (I mentioned svn is slow?) So I implemented a cache file so we don't call info on tags we've already seen.

So now I have all the _info_ I need to create mercurial archives from the svn. Next to go do it, and work out how to keep them up to date after their initial creation...

October 19, 2008

Darn it, missed my condo owner's association meeting today. (Forgot, and remembered shortly after it ended. Sigh.) Phoned 'em, and they said they're sending out a letter about what happened.

Ok, I'm all for "never attribute to malice what can adequately be explained by stupidity", but when Republicans simultaneously freak out about Obama's pastor (this "Reverend Wright" guy) and at the same time insist he's a Muslim... That achieves levels of stupidity that may be synonymous with malice. Can't have it both ways, guys. The _charitable_ interpretation is you're lying to yourselves at "la la la fingers in my ears can't hear you" levels.

Catching up on the qemu weekly news stuff. Yeah, it's laughably far behind, but the reason I got blocked was I hit a bunch of patches posted to the list, and needed to cover the source control commits in order to do the writeups. Now they've switched to subversion and I have a patchlist extracted from that. Put the commit lists in the existing writeups, and now I'm working on the last week of january.

If I really buckle down, I can do about two weeks worth of summaries per day, meaning I can do a month worth of summaries every 2-3 days. I'm currently 9 months behind, so that's upwards of a month to catch up. Wheee...

October 18, 2008

Oh yeah, Stu told me Linus Torvalds has a blog now. I'd forgotten about that...

Re-reading the misfile archive. Perhaps you have to be in the right mood to properly appreciate a line like "Logic is for the weak. Follow me." But I want it on a button anyway.

Mark and Fade and myself went to Maker Faire today. It was awesome. Also very hot, the food was too expensive, and after four hours of walking I wanted to fall over. But we got to watch robots destroy each other, and a tesla coil concert, and Fade got to see many variations of knitting and soap making. I couldn't tell if Penguicon's tesla coil concert was inherently better (I think they did hook more diverse input sources to their tesla coils rather than just a synthesizer keyboard), or if it was just the fact the indoor venue had horrible acoustics and the speaker the announcer was using for "patter" was so loud you couldn't hear the tesla coils when he was talking. (And those weren't anywhere near quiet.) Downside of using an old Hockey rink, I suppose. I wonder whatever happened to the Ice Bats? Off season?

Got a card for sparkfun. I should fiddle with hardware more than I do. I know the theory, but I break stuff. Software you can restore from a backup, hardware less so.

October 17, 2008

Spent several hours today head-scratching at a bug that turned out to be svn being "helpful" with no warning. (Instead of saying "your local files are modified because you reverted a broken patch", it just dumps lots of <<<<< lines into the thing, which then break the build. I note that mercurial doesn't do this, not only because mercurial is much better at merging, but because it stops and asks for human intervention when it can't do a merge rather than crapping all over your files without telling you.)

Huh, audio of one of the panels I did at Penguicon 5 went up. Specifically, the talk Garrett and I did about embedded software. (And this is why I have the google vanity alert on my name, even if 95% of what it pulls up is ancient or weird.)

I should probably put a page with links to all the OLS/CELF/Penguicon/Linucon recordings, the youtube videos, papers and articles, that one timesys podcast... (Ok, done it.)

October 16, 2008

The battery on my laptop is now down to three minutes. Thank you Dell, for selling such a quality product. Now I know why you push the extended warantee so hard.

A fun issue that comes up on reboot is that the little app that shows you how much CPU and memory your system is currently using (helpfully named "kde system guard" to make sure you can't remember what it's called when you install) has degraded over the past few releases again. It now does "automatic range detection", I.E. "no, we can't look in /proc to see how many processors and how much memory you have, that would be cheating". So instead it uses the highest value for memory usage and for CPU usage that it's seen so far as the max for the scale, meaning when the system first boots up the graph is completely useless, and keeps rescaling itself as more stuff loads. You can go into its properties and switch off "automatic range detection", but then it wants you to specify the range, with no units, and only one range for both displays (CPU and Memory). I'm _guessing_ it's 0-100%, although I remember in previous versions maxing out _one_ CPU was 100%, but apparently not now...

Managed to screw up my busybox patchlist download, so I deleted it and told it to do it all again. (This is the script that creates these.) I forgot how INSANELY SLOW svn is, it's been going for 4 hours and it's only up to the year 2001.

On the bright side, I once wrote a script somewhere to convert such a patch list into a mercurial archive, and that I can mess with offline...

October 15, 2008

So uClibc-0.9.30-rc2 is out, and Bernhard is now uClibc maintainer. (It may not be official yet, but I'm shanghaining the man.) Testing the -rc2 in FWL...

Peter Mazinger tells me that to get arm soft float working on a newer gcc:

[15:24] <psm> landley: modify arm/t-linux according t-arm-elf and t-linux-eabi (LIB1ASMFUNCS) and undef LIBGCC_SPEC in arm/linux-elf.h, you can also default it to sed s/HARD/SOFT/ /mhard/msoft/ in linux-elf.h

[15:28] <psm> the part from t-linux-eabi is to replace a *tls file with one *lnx, see comment about div0 rasing SIGFPE

[15:43] <psm> if you add that file to libgcc.a, you will end up missing __raise in libgcc.a and that will come up, when you make use of div0 (if you revert arm/ldso in uClibc to an older version, you would see that, see changelog about division

I'm sure that'll make sense if I stare hard enough at the source code. Todo item for later.

Wrote up an explanation of what complying with the GPL for BusyBox actually _means_, from the developer point of view instead of the lawyer point of view. (It seems obvious to _me_, but there still seems to be some confusion about this...)

Spent 7 hours at Chick-fil-a today. Highly productive. I keep forgetting how much I get _done_ when I just get out of the hosue and hunker down with my laptop somewhere the cats can't bother me...

Watched the debate feed on NPR and MSNBC. I agree, Joe the Plumber clearly won.

Oh, wow. I downloaded Dwarf Fortress and ran it under Wine, and it... worked? (*BOGGLE*. I even have sound. No idea how to _play_ the game, but wow...)

October 14, 2008

Took the day off to hang out with Fade. Went to Dead Lobster (Cheesy biscuits!) and then to the discount theatre up in Round Rock where we decided to see Wall-E again. (Yes, I am aware I dragged her away from her computer so we could go watch a CGI film about robots.)

Wow that's a good movie. Right from the start, with the CGI disney logo intro, it was like Disney was saying "look, we're relevant again! We have something to be PROUD of!"

Wall-E got a bunch of LITTLE things right. It's got in jokes (the old macintosh startup sound when Wall-E finishes charging, Otto's voice is the mac "speak" command, the mice that wake up Eve in the cargo hold are one-button mice) which you don't need to catch any of to enjoy the movie. The shot where Eve first figures out how to light the zippo and the flame reflects off of Wall-e's eyes is amazingly done. The footage of the president is live action of actor and the blob humans are highly cartoonized to avoid the uncanny valley, but they make it work together by panning past highly realistically rendered machine stuff like the autopilot, so the transition isn't jarring. They do so much without dialog; Wall-E doesn't speak at all until Eve shows up, and then they communicate in single words. The humans speak full sentences to each other (and to Otto) but when Eve says "Directive" to Wall-E and points at her green leaf symbol, or Wall-E says "Earth" and points at his tread and jiggles his eye/camera, you know _exactly_ what they mean.

And the mileage they got out of Wall-E's expressive cameras is still amazing. The bit at the end where he boots the rest of the way back up and his cameras sag down a bit to provide his normal expression is one of those "didn't notice it was wrong until it was fixed" things that's just _masterfully_ done.

I also like the way the movie repeatedly establishes its non-horror, non-drama nature. Right at the start, Wall-E accidentally runs over his cockroach friend with one of his tank treads, the movie pauses for a beat for Wall-E to show dismay, and the cockroach pops right back into shape and continues about its business. This clearly establishes A) it's a _cockroach_, B) the movie could do pathos, but simply doesn't need to. (Leading to the marvelous moment later where the cockroach makes first contact with a trigger-happy Eve, gets blasted point blank by a massive death ray leaving a huge crater, and after a beat crawls right out of the crater to continue to try to make friends. Yup, it's a cockroach. Fed on 700 year old twinkies. It's clearly the most indestructible thing in the film. Wall-E running over it a second time is used to indicate his zombie state. The cockroach is mildly annoyed by this, but more concerned about Wall-E. It establishes this with a _scuttle_ and a _chitter_.)

Fade was happy they didn't anthropomorphize the cockrach. It never breaks character by speaking or anything, it's actually a cockroach. (It's clearly more intelligent than modern cockroaches, but not more than a modern squirrel. That's quite forgiveable considering the context and the amount of time it's had to evolve. Its ancestors spent centuries in a challenging environment, and maybe Wall-E's been breeding them to be good companions.)

I've gushed about this before, so I'll stop now.

When we got home we watched disk 3 of Full Metal Panic, which remains a surprisingly good anime. It's two completely different anime genres colliding, with competing _types_ of plotlines fighting it out. A gritty military type who pilots giant mecha is sent undercover to a high school to protect a 16 year old female student. Each context has its tropes which Cannot Be Denied, except that they directly conflict with each other. It's great.

For example, the last episode of this disk was primarily one genre, being devoted to a Giant Mecha Battle with much property damage, heroes wounded and bleeding, both bad guys actually getting killed (not just defeated; actually dead). This situation evolved (last episode) out of an interrupted romance plot at the high school (really), and in the last couple minutes at the end of the episode two protagonists who were presumed dead turning out to have survived and it ended by establishing a new love triangle involving the two protagonists and the submarine captain. (The characters themselves were sort of going "wait, what?" from sheer whiplash as the other genre bounced back and reasserted itself _hard_.)

There's a sort of Yin/Yang thing going on with the two contexts, (I forget what they're called, it's not Cujo and Shi-tzu, those are dogs. Shinto and Sasquatch? Something. Boy anime and girl anime.) The Giant Mecha Battle anime is based on a submarine that acts as their "whatever an aircraft carrier is called when it carries mecha instead of aircraft, and is actually a submarine". Except the commander of the submarine is a cute 16 year old girl. (Who is a military genious prodigy trained since age 6, of course.) And the 16 year old girl high school student protagonist has similar knowledge of mecha technology (apparently through no fault of her own, it's genetic or something; she didn't even know about it until she was kidnapped by the bad guys so they could exploit her to develop improved mecha, hence the reason the other grenre's protagonist is assigned undercover as a student at her high school, to guard her). In true yin/yang fashion, each genre has a bit of the other genre carefully placed right in the center of it. That's craftsmanship, that is.

October 13, 2008

Decided to bike to the south chick-fil-a location, put a big wooden thorn thorugh my front tire maybe half a mile south of the river, turned around and biked back before the tire could go flat. Made it to about Jimmy John's, from where I type this.

Tested the new busybox/vi.c:readit() on qemu's arm emulation, and although it's better now, it didn't _fix_ it. Cursor around enough and it'll still blank the line you're on. I've also seen it blank while cursoring _right_, which seems to imply a different cause for the bug. (I really don't _want_ to go down this tangent, but it's bothering me.)

The busybox vi command is a mess. It needs a massive crapectomy. (There's code to scan for function keys, but no code to _do_ anything with function keys. It's full of #defines and #ifdefs.) And strangely, my cleaned up version of readit() is about 2/3 as much source code, but the resulting x86_64 machine code is six bytes _larger_ according to bloatcheck. Much head scratching about exactly _why_. (Presumably, the optimizer could do some serious magic with all the repetition there used to be. I could look at the assembly output if I cared.) Eventually made my "shrink it by 17 bytes" roll after a half dozen attempts, but that was weird.

Conceptually the new code is cleaner because it never reads more bytes than it needs to see if this is a known escape sequence. Alas, it still needs a readahead buffer because it might _not_ be an escape sequence, and then the extra characters need to be kept and parsed later.

Sigh: once again while not connected to the internet, and I want so do an "svn annotate". Once you get used to distributed source control, it's hard to go back...

Ok, found it, fixed it, checked in the fix, emailed the list about it. (The problem is actually that escape sequences sent over serial consoles get de-blocked and arrive as individual characters, so depending on read granularity or poll always saying there's another character waiting is _not_ a reliable way to detect escape sequences. I added a 1/3 second timeout to the poll, and can't reproduce the problem anymore. That could probably be trimmed down a bit, maybe to 1/10 second, but for now it's fixed and I can move on...)

Now, back to debugging the binutils thing.

October 12, 2008

So the binutils config problem isn't something config.status is calling, it's that config.status is being generated wrong in the first place. The big "here" document that dumps into $tmp/undefs.sed only has two lines, when it should have a line for each enabled symbol.

The busybox vi command remains deeply screwed up. In raw mode the cursor keys come in as ansi escape sequences (esc, left bracket, and then capital A through D depending on which direction it is), but escape is how vi switches between command mode and insert mode. (Yeah, terminal handling in unix derivatives is horrible, isn't it?)

In theory, the three characters come in as a block. In practice, input can get chopped up, so the capital D of a left arrow gets interpreted as "delete to end of line". Yes, cursoring around in busybox vi can eat your data, at least on a heavily loaded system (or something slow like QEMU's arm emulation).

Wound up rewriting readit() in busybox's editors/vi.c.

I'm having trouble following Bleach episode 17. The protagonist leaves his body behind to battle in astral form. This is a significant plot element in previous episodes. So after a big astral battle, he's lying in bed bandaged and recovering. What? Did they lose track of the context switch, or did I? Or is this one of those Matrix "your mind makes it real, so we don't have to" things occurring for the first time in episode 17 of the series?

I do admire the way Orihime's mystic abilities are all based on the Mythbusters mantra. (Every time she does her power chant, I hear Adam Savage going "I deny your reality, and substitute my own.")

October 11, 2008

Finally got the two international faxes faxed (admittedlly by printing them out, signing them, scanning them both, and emailing the PDFs to England and France respectively), but it's done. (Yay! The SFLC is nice enough to include fedex return envelopes so the three of those in the past two weeks were much easier.)

Mark continues to have a black belt in paperwork, but is now learning corporate politics on top of that. Interesting to watch...

So, the arm building problem works the same on uClibc 0.9.29, so it's not a uClibc-svn issue. Bumping the busybox version to 1.12.1 before trying too hard to debug it...

Nope, that didn't fix it. Sigh. Debugging the hard way. Wheee...

October 10, 2008

Met with Stu and decided we're not up for organizing a con right now. He's worried about the economy, I just haven't got the energy to spearhead it, Mark's still burned out... Maybe we'll try for spring 2010.

Got the latest Busybox settlement paperwork signed and returned (the SFLC is nice enough to include fedex return envelopes, I just have to go drop 'em off). While I was there I tried to send the two international faxes I have pending (one to a french lawyer, the other a release for a british TV show that wants to use the footage of me dumping LN2 into a swimming pool, although Howard Tayler might be able to handle that one).

The daily show website has once again screwed up its javascript so if it doesn't recognize the exact browser version you're running (I.E. no Linux system that isn't configured to lie) it refuses to display a video, instead telling you to download a flash plugin you alread have. But it turns out it's on hulu, and they're competent about this whole "web" thing.

Trying to figure out if I should post FWL notes to the mailing list, here, or both. The thing about putting them here is I can find them again in future, which is the main reason I write this. Posting them there lets other people respond, not that I really expect them to. I suppose I could post in both places, but that seems a bit redundant...

October 9, 2008

Oh wow, that's screwed up.

I've mentioned the current economic crunch before. I talked about Liar's Poker and the invention of mortgage bonds with trenchards. (These days they've been renamed CDOs, "collateralized debt obligations". Fine.) That book talked about having half a dozen slices. The screwed up part is mentioned in this radio program, which talks about having almost 200 slices, the bottom few of which are pretty much guaranteed to be defaulted on and never paid off, just by simple statistics saying that some predictable percentage of mortgages wind up in foreclosure, and these slices get paid off last. Hence when the pool was thinly sliced like this, these bottom slices were nicknamed "toxic waste", and nobody would buy them.

So what they did was chop the "toxic waste" slices off the bottom of each mortgage-based CDO, create new CDO pools entirely out of this "toxic waste", and then split _that_ into trenchards. And now magically, the rating on each of these new slices is based on where they were in the CDO, not what the CDO was made from. So the top slices are rated as good as treasury bonds (roughly equivalent to cash), and the middle's ok... Despite the _entire_pool_ being constructed of junk expected to wind up in default.

Warren Buffett used the word "insane" to describe this.

This economic crisis is a mix of a bunch of things. It's got elements of the 1929 stock market crash, the stagflation of the 1970's, the first Bush administration's savings and loan crisis, and some unique little bits of its own.

But the fundamental problem is that the regulators were STUPID. Nobody with a brain ever _looked_ at this stuff, because the Shrub administration decided to deregulate everything. No reporting requirements, no oversight. Nobody ever HAD to look at it, other than the people who were getting rich off of it and retiring before it all went south.

If "government is evil" is an article of faith, then deregulators don't care that the regulations embody what we learned from previous problems, such as the big less of 1919, "letting people go 90% on margin is a recipe for disaster". It's just like teaching evolution vs his other articles of faith, rational thought and evidence don't enter into it. Obviously no problem we've ever encountered before could possibly ever hit us again, otherwise we'd have seen it by now. It's some weird kind of economic creationism, abject refusal to pay any attention to history at all. Iraq repeats vietnam, while the economy gets a medly of greatest hits. Idiot.

The only reasons I'm not as worried as Naiomi Wolf, despite Bush now having his own private army deployed domestically are:

  • Bush is a moron and the people pulling the strings (his father's posse) are all World War II veterans in their late 70's or early 80's.

  • If they rig this election (shooting somebody, declaring martial law, another round of diebold's "popular vote vs electoral vote" shenanigans) I have an up to date passport, cash to leave the country, highly portable job skills, and a willingness to go rather than suffer through the rest of the frog boiling ritual.

The thing is, the US no longer has much influence over the rest of the world. It's spent the past decade growing, while we've stayed in place or even shrunk. If the US agenda threatens china's interests, they'll cut off loans like a bartender with a belligerent drunk. The federal government is so deeply in debt it can't afford to keep the lights on without massive foreign loans, and we no longer have a manufacturing base worth speakign of either. China's not going to stop us from becoming a police state, but they are going to take the lion's share of the world's oil as the supply dries up over the next decade. Not sure how that'll play out, but it does limit the "foreign wars to distract from domestic problems" card a bit...

The driving force behind all this is that the baby boomers continue to have the same disproportionate impact they've always had. They were teenagers in the 1960's and career yuppies in the 80's, and now they're old and grey and scared and collectively yelling at the world to get off their lawn and awaiting death from the front rows of their churches. The polite way to say "old fogey scared of change" is "conservative". Of _course_ the republicans have been benefitting from the increasing senility of the baby boom.

That said, the baby boom's power has to peak soon. The early retirement benefit of social security kicks in at 62, and 1945+62=2007. (Plus a 9 month gestation period, so really this year for the first batch. Possibly one reason to play up this economic crisis thingy is to discourage boomers from retiring just yet; only three more years until the full benefits kick in, not hard to scare 'em enough to convince them they'll really need it.)

The same math says the leading edge of boomers hits 65 in 2010, and if the average life expectancy in the US is 77 years (and it's only gone up 2 years since 1990), meaning half the first wave of boomers should be dead by 2022.

I'm aware that the baby boom actually lasted around a decade (what with the GI bill and everything), which is probably why Woodstock came at the very _end_ of the 60's rather than the middle of it. If the 90's were the decade of saving for retirement, and this was the decade of "the baby boomers being grumpy old farts yelling at the world to get off their lawn", then the 2010s look like "the decade of baby boomers retiring and moving into nursing homes" and the 2020's the decade of baby boomers dying of en masse.

The real question is how much damage will they do on their way down. I'm not talking about social security sucking the economy dry, I'm talking about people who continue to vote after they've lost the ability to drive. The Baby Boomers' nominee is already the oldest non-incumbent presidential candidate in history. This is not a coincidence.

We'll see.

With the new uClibc, the arm native build is going "boing" during binutils because config.h in the subdirectories isn't getting STDC_HEADERS set (except in the "intl" subdirectory, because consistent behavior is anathema to the FSF, and redundant code is how you make your project grow up nice and big).

Wrote up a post for the FWL mailing list instead of posting today's debugging here. I should use the project's mailing lists more often, people can actually reply there...

October 8, 2008

Ok, getting multiple qemu system-image instances to run in parallel turns out to be slightly more complicated than you'd think.

I want to do this because qemu doesn't take advantage of SMP very well. Emulating multiple processors properly would require the emulator to be multi-threaded internally, plus emulating various IPC things on top of that (memory barriers, anyone?), and the qemu developers just haven't wanted to go there yet.

The FWL compiler toolchain can take advantage of smp on the host via distcc (or even a compute cluster if you want to set it up by hand), but this doesn't help with ./ --extract or the ./configure stage. If I'm running smoke tests on 10 targets, I'd like to be able to do those targets in parallel. (I've got 2 gigs of ram and each emulator's using less than megs, except for x86. It should work.) I fixed up distcc to vary its port numbers based on the PID, so what's left?

Well, for one thing, whatever bash's default terminal type is, it has some newline/linefeed confusion if you redirect the output of /dev/console to a file. I need to set $TERM I suspect. Not a big deal, but annoying and triggering a second problem:

If you kill qemu while it's modifying an ext2 image, it can leave the image in a state that makes the next run _very_ unhappy. (Stale nfs file handle? I didn't build nfs into the thing!)

Oddly, e2fsck refuses to be scripted. It insists it needs a terminal to fix stuff interactively, so 'yes "y" | e2fsck' is gratuitously broken. I'm sure there's a workaround (-a was it?), but at this point I'm too disgusted at the developers' totally artificial limitation to bother, and doubt running e2fsck on the image each time is really a good approach.

What I should probably do is mount hda read only, and have the only writeable space be hdb. This means pregenerating /proc and /sys and /home and all that at the top level, which is a design issue. Right now, I've got a Linux From Scratch style /tools directory and nothing else at the top level, and an _optional_ script that fixes that up into something usable. Unfortunately, that's not amenable to mounting read only.

I could mount a tmpfs in a subdirectory of /tools, --bind mount tools under that, chroot into it, and mount hdb on /home under that. It seems kind of silly and overcomplicated, and also means that without would be far less useful.

Sigh. The tradeoff here is between "provide something simple the user can extend themselves" and "automate everything to provide the user with more prearranged functionality". The second assumes they want to do the same thing I want to do, which I'm never comfortable with.

October 7, 2008

Ok, now I'm confused.

I've been banging on the powerpc FWL build, testing the resulting system-image it by building static under it. And I'm getting random hangs.

If I call the emulator script myself (output not piped through less), and disable distcc, the hangs don't happen. It ran overnight that way building more or less to the end (I got tired of it and killed it near the end). But if I use my wrapper that pipes the output to tee and sets up distcc, it hangs.

I think it's in the 2.6.25 powerpc network stack. The most recent hang was during wget, it hadn't even gotten as far as distcc yet. But is it a driver issue, or a qemu issue? Would it be fixed in 2.6.27 if I could get powerpc to work on a newer kernel? Would trying the svn version of qemu help? Can I declare victory since the root filesystem I'm building seems to be working just fine, and this is really an intermittent kernel problem? (Debugging an intermittent 2.6.25 problem is neither fun nor useful, I need to debug on a current kernel, so that means bumping getting a current kernel working for powerpc back up the list.)

Sigh... In any case, I should check in the kernel alt stuff I did, although I need kernel config files so I can _build_ the alt version first...

Poking at putting binutils 2.18 back as an alt package. I have to set five environment variables in order to work around bugs in the binutils build, and it would be nice if I could do that conditionally without polluting the environment or firing off a subshell. Alas, "THINGY=THIS=that; $THINGY command" isn't the same as "THIS=that command". It tries to run a command "THIS=that" instead. Oh well, it was worth a try. (Once again, something that's easy to do but hard to do _cleanly_.)

I guess setting the extra environment variables won't hurt building the old version. (It's not needed, but shouldn't screw anything up.)

October 6, 2008

Ever want to smack a political campaign?

In response to the second coming of the savings and loan crisis, and John McCain being one of the original "keating five" group of senators caught in that crisis, Obama's campaign produced this unwatachable video. The entire first minute of that video is not just useless, but alienating. Lots of buzzwords flying past the screen at various angles with nothing to back it up sets off everybody's BS detectors. Chop that off, start right at minute one, with the footage from the ethics committee hearing. And then edit out about half the rest, it's INSANELY SLOW... Just give us the facts already.

Contrast with this, which is quick, simple, snappy, comes across with at least a modicum of objectivity, and gets all the info out of the way in the first two minutes with another 3 minutes or so of discussion/analysis. So it's about 1/3 of the length of the official video, but says more, and does it without access to the embarassing historical footage the first one dug up.

What happened to all the hollywood people Obama supposedly has on staff? Why release a video that looks like it was put together by an intern? (No, I haven't forgiven Obama for the FISA thing yet, and it's the reason I'm not giving him a dime, but I'm apparently still capable of being disappointed.)

I don't even want to say "amateur" when condemning Obama's overpolished video. This is totally amateur and yet a huge improvement over what's coming out of the actual campaign.

Poked at FWL a lot. Took advantage of the alt infrastructure to revert the linux kernel to 2.6.25 (with .27 as the alt version), so I can build something I can test PPC with. Tested PPC a lot. Redoing the smoke test infrastructure...

October 5, 2008

Checked on Mark's cats then headed to the Chick-fil-a down the street from him, except I forgot that franchise is broken on sundays. Hit Arby's instead. No outlets or wireless here. Sad.

Kubuntu does _not_ have a pppd upgrade available. Sigh.

Yesterday's uClibc snapshot builds on all the targets I've tried, which is highly cool. Building binutils natively under arm dies with conflicting types for "psignal" between libiberty/strsignal.c line 553 and include/signal.h line 142, but still: progress!

October 4, 2008

The new cable modem box fixed the internet at home, and I managed to download a new snapshot, and _now_ it's dying with:

libc/sysdeps/linux/arm/ioperm.c:221: error: conflicting types for 'outb'
./include/sys/io.h:98: error: previous definition of 'outb' was here

And such. Headed out to The Mug of Unity One Mug's Einstein's with my cell phone and bluetooth thingy. (It was, indeed in my jeans pocket. Along with a quarter.) And guess what: the cell phone internet STILL DOESN'T WORK. Apparently, whatever was wrong with it up in the northeast is still broken now that I'm back in Austin. Which is _weird_ because I didn't change anything in my laptop's settings. Bluetooth is talking to the phone just fine, all the AT commands get the appropriate "OK" or "CONNECT" responses, then it does PPP and insists it's doing chap authentication... and then the modem hangs up. It immedately retries, it can do the cycle about 4 times in a minute. At which point I stop it and call tech support.

Unfortunately, the cell phone's the only phone I have with me to call tech support with. (And calling 611 from a land line isn't likely to get me T-mobile tech support anyway, but let's gloss over that little step in their recommendations, shall we?) This means that every time they try something, it hangs up the phone, but oh well.

Standard hold times for each call apply, most of which is actually the rigamarole to get the voice response system to get me a human (although it sucks much less than it did, apparently "Get me a human." is now a recognized phrase. This is progress).

Got escalated to tier 3 tech support. They confirmed there are no reported outages in my area. Eventually I convinced them that walking me back through the bluetooth association is unlikely to be productive when the AT messages are being acknowledged and I can get pictures off the phone (although I have to walk through the phone's menu to manually set visibility on each picture I take before I can see it, because the user interface on this thing was designed by crazed weasels). The first hang up and call back attempt was to reset the time zone the phone thinks it's in (this doesn't happen automatically, don't ask me why). This involved taking out the battery, which turned out to be "interesting".

Turned it back on, did the dial thing, no improvement. Put the back panel on... phone switched itselff off. Turn it back on, put it down on the table, switches itself off again. Fiddle with battery a bit. Try to call tech support back, the phone switches itself off... It took about five minutes of jiggling and pressing the battery, popping it out and cleaning off the contents, making sure there was no hair in the thing... Finally got the battery back in securely enough that the phone didn't keep spontaneously switching itself off again. After a few false starts, some of which involved hold time. (Oh, and apparently they have a "we call you back when you reach the head of the queue, so you don't wait on hold" service, except there's no option to call me back at this number, and while trying to figure out of "all ten digits of the number" meant I should start with a 1 or not, and then the button not registering the second digit I dialed and there being no "back" button, and of course while trying to figure out what to do about this the phone powered off again and it was back to fiddling with the battery. It occurs to me that this is probably the way to talk to them on another phone, but I still haven't got one with me and the option only comes up if the expected hold time is up around the 3 minute range.)

New level 3 tech support guy. Very polite. Enables the "t-zones" thing my phone has never had set up, so my phone's built in help screens actually work now. (Will wonders never cease. I have no confirmed they're useless and that if I do a "search" for things like "volume" instead of browsing their topic menu, it pulls up pages that don't apply to my model of phone. But oh well.)

Second "this will cause you to hang up" attempt: re-associating the phone with the network. Er, sounds good? This time I could just switch it off, didn't have to fiddle with the battery again. (Thank goodness.) And of course, it didn't fix anything with the ppp session.

The t-mobile people have been unfailingly polite, and quite willing to help me even though Linux isn't one of the Windows or MacOS versions they've been trained on. But they haven't really been very _useful_ so far, and even though the problem seem sot be on their end I want the negotiation to be way more explicit. It keeps printing lines like:

--> pppd: z[7f] --> pppd: z[7f] --> pppd: z[7f]

Which isn't very useful. So now I go in and look at wvdial to try to beat some more debug info out of it. Except wvdial's working fine (it's the child pppd process that's failing), so apparently I want to fiddle with /etc/ppp/options and add "debug", and then give it a "logfile" so it doesn't spit tons of crap out into the system log...

And now it's giving me a bunch more of those lines, except now they look like:

--> pppd: 2[7f] --> pppd: 2[7f] --> pppd: 2[7f

And when I run it again, the "2" is now a "g". Great. THANK YOU UBUNTU. Your main log message for pppd is printing TRASH ON THE STACK. That's just BEAUTIFUL.

Ok, I know I break everything. I expect it. I also know I didn't put these bugs in there, both t-mobile's internet and Ubuntu 8.03's ppp error message fprintf() broke themselves. What I object to is when the bugs I keep running into STACK. They're interfering with each other.

So, I need to go to somewhere that has wireless internet, and see if there's a pppd update I can download. If not, or if it doesn't fix the error message, I have to build the darn thing from source, either lobotomize the copy I've got or else figure out how to get wvdial to call a local version (possibly fun with $PATH will be sufficient here), figure out what the log messages I'm not seeing actually SAY, possibly stick some more printfs() in there to get the information I actually _want_, then call back the t-mobile tech support people so I can diagnose the problem for them and possibly get it _fixed_...

I'd call in Mark for help on this, but he's visiting family in Arkansas this weekend. I need to check on his cats tomorrow.

At this point, I note that I have 30 tabs worth of unread web pages loaded (I was up until 7am reading the world's most addictive website), and United Mug has free soda refills, and pumpkin bagels with pumpkin cream cheese, so I'm unlikely to make much more progress on this issue just now...

October 3, 2008

The cable modem deteriorated to pretty much unusability while I was away, to the point where Fade logged out of work early because the web pages she's supposed to edit were taking 5 minutes each to load. Called time warner tech support and their diagnostic reported 70% packet loss. Yeah. They think we might need a new cable box, so Fade and I drove to their HQ to swap it out, then stopped at Fry's built-in coffee shop on the way back to use the cellular wireless.

Two problems here:

1) it turns out that Fry's is right on the edge of T-mobile's signal range, so the connection here isn't really better than home was. (Sigh. As backup plans go, "drive out of cellular signal range and then use cell phones" isn't one of the all time greats.)

2) I can't find my darn USB bluetooth dongle. Again. It might be in the jeans I was wearing on the plane yesterday (I'm pretty sure I had it then).

I am once again annoyed at Dell for not making the built-in bluetooth actually work on Linux when they sold me a box preinstalled with Linux. I am _at_ Fry's and could drop another $20 on a _third_ dongle, but this is silly. (Also, none of 'em will clip onto my key ring the way my USB memory stick does, so I'm likely to loose this one too.)

I got a phone call from a recruiter this morning who was sending me email with potentially interesting positions in Austin, and I want to reply to my email, but I haven't been able to _check_ it yet.

And of course Fry's's (Fry's'? The first ' is part of their name...) supposed coffee shop wireless doesn't work, but I knew that from the last time I was here. (They have an access point; it doesn't route packets. It also took them three tries to make me a hot chocolate since my first two flavor syrup selections curdled the milk, and although I feel kind of bad about that I'm not the one who should be tracking it. Still, it's a coffee shop IN A FRY'S. That makes up for a lot.)

We managed to avoid buying a 42" plasma TV today, but the sale runs two more days...

I'm trying to figure out if the number of failures from the uClibc-svn build I did wednesday evening is "amusing", "impressive", or "appalling", a word which I'd google for the correct spelling of if I had internet access. My attempts to use aspell to find out ran like this:
$ aspell appalling
Error: Unknown Action: appalling
$ [looks at aspell man page]
$ echo appalling | aspell -c
Error: You must specify a file name.
$ echo appalling | aspell -c /dev/stdin
Error: Could not open the file "/dev/stdin" for writing. File not saved.

I'm sorry, this tool is now in my "too stupid to live" category. I don't care what the engine looks like, the UI is pathological.

Anyway, the uClibc snapshot from the day before yesterday (again, no internet access since the night before I got on the plane; yesterday I was just too tired and today The Cable Modem Faileth) built through to completion for exactly three architectures: i586, x86_64, and m68k (which I spent a chunk of last week getting to work so it'd _better_ still be ok).

The i686 regression is because I'd taken LINUXTHREADS_OLD out of the uClibc miniconfig. I've been complaining for a week that uClibc has two pthreads implementations, and is about to get NPTL on top of that so it has _three_. I'd like to remove one of the two old ones before NPTL shows up, but Bernhard is against it and he's de-facto the new maintainer.

So switching i686 threading back to LINUXTHREADS_OLD, that brings the number of functioning targets back up to 4. Some of the others are dying on sizeof saying user_regs struct is an incomplete type, and I thought that was fixed in svn. Did I accidentally re-download an old version? Lemme download this morning's snapshot and try building again. As soon as I get internet access again, anyway.

October 1, 2008

Head down on the paper for the past few days, and there's no way it'll be ready before I have to catch a plane back to Austin tomorrow. Alas. But we might get enough bits back together to send a draft out to reviewers, maybe post what we've got done so far.

The m68k target in FWL is now building through to the end. Alas, it's in the same position as the sh4 target: I can build it, but I can't get qemu 0.9.1 to run the result. (It seems to be stuck supporting only coldfire.) Hmmm...

Reading Honor Harrington on Basilisk Station, since it's one of those series I'm expected to have read. Seems reasonably good, but I've only made it 2/3 of the way through the book in the past week and a half because I've been so busy with other stuff. (Mostly the paper, a little FWL stuff, socializing with Eric and Cathy and their cat the rest of the time...)

September 28, 2008

And the FWL uClibc svn version build is checked in! And there was much rejoicing.

Built all the targets. Only arm, x86, and x86_64 currently work all the way through smoke test. Mips doesn't build with uClibc-svn, powerpc doesn't work with the 2.6.26 kernel, m68k still has an internal compiler error, sparc still fails to boot (but in a new way that I hope to be able to debug), and last I checked sh4 didn't have a working qemu target that emulated real hardware. But that last one I can fiddle with via teaching BUILD_SHORT to do an initramfs, to make at least some progress.

Very much to do, but now it's time to get back to the paper...

My second stage smoke test builds under a target system-image, and that's dying in binutils while trying to link against, which implies it's due to the change I made to the gcc wrapper back when I was trying to build perl and glibc for Linux From Scratch. If so, it's not a uClibc problem at all. (Strangely, if I add DEBUG_WRAPPER=1 to the build environment so the wrapper writes the command line it generates to stdout before executing it, the binutils build breaks even _earlier_...)

Ah! It's doing a BUILD_STATIC. Of course it can't link against libgcc_s, it needs libgcc.a instead. Yeah, the wrapper's doing the wrong thing there. Must fix.

September 27, 2008

Finishing FWL alt-package handling and giving uClibc-0.9.30-rc1 the real shakedown it reserves remain tangled together, but progress is being made on both. And of course the paper is interrupting both of those, so I'm juggling three projects at once, but that's what makes it fun. :)

September 26, 2008

More banging on the paper last night, until I went to bed after Cathy got up and went to work. I am now almost entirely nocturnal, and have dragged Eric along with me. (This tends to happen to me a lot.)

There's a new list for breaking the API and ABI of both the kernel and glibc in a more organized manner. I suppose this has to be considered an improvement, over the ad-hoc breakage we've had.

Ah, Eric has told the world what the next paper's about, so the hate mail can flow into his comments section and maybe we can get some useful references out of it. (Which are also likely to be opaque and immutable, but oh well.)

September 25, 2008

Hey, twitter's down. "You need to supply a username and a password to access this site: Production-Staging Access - Employees Only at" Both the main page and /home are doing that, although the individual user pages still resolve if you remember what they were.

Kmail ate itself this morning. Apparently somewhere north of 117,000 messages, it decides that the linux-kernel folder's index file has been corrupted, and decides to regenerate it, warning that I'll lose all status info (like read/unread/important). *shrug* Ok. So it goes away for ten minutes and thinks. Comes back:

The mail index for 'linux-kernel' is corrupted and will be regenerated
now, but some information, including status flags, will be lost.

Exact same message, it wants to do it all over again. It's stuck in an endless loop. There's only an "OK" button on this dialog, there's no "forget it you insane malfunctioning *blank*" button. It's halfway through an email download cycle, trying to append mail to the linux-kernel mbox file. If I just kill kmail, I'm likely to lose mail here.

I recall a few years ago having this problem at 32,000 messages. It didn't realize itn eeded to regenerate the index, it just corrupted it and I got pretty colors and _nicely_threaded_ series of messages from "unknown" to "unknown" with no text in the body. Took several confused minutes to guess what exactly had gone wrong.

So I'm opening the mbox file in vi behind Kmail's back and copying about half the messages to another file. (This is just linux-kernel since January, yes traffic is that high. I was hoping to get a whole year in the mbox before splitting the folder, but alas...) I need to break kmail's world into small enough chunks for it to understand (or at least not have a nervous breakdown about). (I note that opening an 800 megabyte file in vi on a system that's already fairly heavily loaded takes some time. My laptop's only got 2 gigabytes of ram, might be getting near time to upgrade.) Let's see, line 20005117 looks like a good place to split...

Always nice to see progress in supercapacitors. The big problem with most alternative energy stuff like stirling engines and windmills is they produce energy in surges, with gaps between 'em, so the result has to be stored and transported to sommewhere useful. It's electricity, so the obvious thing is batteries, but batteries suck. They charge slowly, lose a lot of their input as heat, and worst of all they degrade over time and lose capacity.

Supercapacitors are extremely high density capacitors. They charge almost instantly (and can discharge as fast or slow as necessary), don't heat up much when they do so, and can cycle millions of times without noticing.

Both suck in terms of energy density compared to gasoline, of course. A gallon of gas can still releases several times as much energy as the equivalent weight in batteries. Of course combustible materials are _cheating_ because half the energy they release comes from the oxygen in the atmosphere. (Yes, we live in a highly charged atmosphere that reacts just about anything it comes in contact with, rusting or catching fire. If it wasn't for all the plants constantly pushing the energy potential back uphill the whole atmosphere would react and use up all the oxygen in a few thousand years. You don't find an oxygen atmosphere _without_ life, it's just not stable unless constantly maintained.)

This is the main attraction of hydrogen fuel cells, which react with the oxygen in the atmosphere to produce electricity. You only have to count the hydrogen as fuel, the oxygen is assumed ambiently available wherever you are. Hydrogen's a real pain to store and transport though, it's a tiny molecule that can osmose through all sorts of pipes and tanks, and it's a gas that refuses to turn into a liquid or solid unless you subject it to to outright hazardous temperatures or pressures. Quite possibly still the way of the future, but scientists are still sullenly poking it and hoping they can beat totally different behavior out of it.

But supercapacitors are great for the "recharge" demographic rather than the "refuel" demographic..

September 24, 2008

More work on the paper. I'll post a link when it's done, we've got another week to bang on it and it's looking like it'll take all of the time we've got. (And that's just to get the first draft out, we'll probably be incorporating feedback for a while...)

Finally figured out what I want the FWL unstable package logic to look like, got most of it implemented, and now I'm fighting wget. (-P and -O didn't want to coexist, but -O can take a path...)

And checked in! (Finally!)

Now, why did I go on this tangent in the first place, again...? Ah right, uClibc.

Alas, my description of references as "pointers with the safety catch on" runs into Eric's gun-nutness. He insists that I can only include the phrase if I rephrase it "pointers with the safety on", which non-gun-nut types won't even see as a reference to guns. (What's "safety" mean here? Pointers, now with safety! And a drop of retsin!) Sigh. Yanked the phrase entirely.

We had a similar disagreement over his first attempt to describe references as "opaque and immutable". Having taught this before, I could come up with a list of common ways to misinterpret that, starting with:

It goes on from there...

It's easy to describe references if you're willing to spend three paragraphs doing so, we just don't want that long a digression. I believe we're now on something like our sixth attempt. Getting closer...

September 23, 2008

Trying to make FWL download alternate packages was making my head hurt, so I moved the logic into if statements in (Should FWL try to download alternate packages from mirrors? Keeping in mind the name it's downloading and the actual name of the package don't necessarily match. Yeah.) This isn't too hard to implement, but looking at the result and calling it "simple"? Not quite.

Sigh, the darn dell+ubuntu hard drive eating bug came back when I installed Kubuntu 8.04. (Far be it from them to ever actually _fix_ anything.) Now it's up to 220k cycles of the 600k my disks's rated for. The script to fix it properly is on my backup USB drive, don't have it with me at Eric's. In the meantime, I should remember to run "hdparm -B 255 /dev/sda" after every power cycle or resume from suspend...

September 22, 2008

Eric and I got a couple pages written on the next paper. Poked at FWL a little. Played battle for Wesnoth and watched Mythbusters episodes. (Eric and Cathy have the "just one disk" netflix thing, because they seldom make time to watch them. Kind of a self-fulfilling prophecy if you ask me, but oh well.)

September 21, 2008

Every release, Kubuntu develops new bugs. Every single release. Knetwork manager hangs forever "waiting for key from Kwallet", even though Kwallet is open. (For which I have to provide my password, which is sad. Just save the darn wep key in a .config file, I'm ok with this.)

This means I'll need to use my bluetooth thingy to use my cell phone to get net access until I can get the wep key from Eric again, so I'm risking bluetooth subsystem panics. Wheee... Except that it's not working here. It didn't work in Trenton either, but that's understandable. (It worked ok in NYC...) Does it _require_ 3G in order to function? The guy at the shop didn't think so...

In other Kubuntu bugs, vi is broken in new and exciting ways. This one involves .swp files. When you're editing a file, it writes a .filename.swp file saving every keystroke you do. (This is part of the reason it hangs for upwards of thirty seconds between keystrokes when the disk is busy; every few dozen keys it does a sync(). Not an fsync() on the swap file, it does a _sync_ which waits for _all_ pending commits to hit disk, which can take 10 minutes when you're formatting a terabyte USB disk, as I found out. Anyway...) The problem comes in that it can reliably detect that such a swap file is _there_, which gives you a full screen warning when you try to edit the file (which is obstructive and tends to make me lose the first few keys that I type because I wasn't _expecting_ this). But then when you tell it :recover it goes "can't find .swp file" which is just _dumb_, because it just finished giving me this warning screen about there _being_ a .swp file. (And it doesn't go away after one warning, I have to drop out and delete the file by hand to get it to shut up.)

I suspect this means *.swp file had no useful data in it, you did a :w before suspending to ram, and then wound up rebooting when the battery ran out because this is a Dell and after a year the battery lasts about 9 minutes of normal usage and maybe 5 hours of suspend to ram if you're lucky". But saying that it couldn't _find_ the swap file, and failing to delete it if it confirms it's useless... That's sad.

Inflicted the first David Tenant episode on Eric and Cathy. Eric couldn't stand it (full of cheese and cliches, he thought). He liked Christopher Eccleston but is not, so far, at all impressed with David Tenant. Cathy could at least tolerate the cheese to get through to the good episodes. (I didn't make Eric watch the next one because Cassandra + Technozombies is about at the edge of _my_ tolerance. And "Tooth and Claw" isn't really an improvement, to be honest. But we have School Reunion to look forward to, and that's a darn good episode, I think...)

Tried to exhaust my laptop battery and recharge it a few times on the theory "maybe it has battery memory". I note that memtest86 is good for this, it doesn't do a low battery suspend nor does it leave filesystems unmounted or anything like that. Sadly, it doesn't seem to have a notable positive effect. I'm guessing that in my 9 cell battery, maybe 2 of them are still working. This implies one or more of the rest may be leaking lithium. Note to self: do not get laptop wet. This implies I shouldn't feed it after midnight either...

September 20, 2008

On the train to NYC with Eric and Cathy. We wound up driving to Trenton to pick up the train from there. We learned never to drive to Trenton.

Knetworkmangler remains reliably stupid, with the collusion of things like Konqueror. I'm not on the net right now, but I run a copy of apache on loopback to do things like look at the mercurial archives of my project using the web interface. Trying to talk to was telling me it couldn't connect, so I wasted several minutes restarting the apache server and looking at its config files and man page. The problem is, I used knetworkmanager to log onto Eric's linksys last night (it's got a wep key, easiest to use the GUI to fiddle with that), and I forgot to kill it. So it was going "you're not connected to the internet through me, therefore there can't POSSIBLY be a server running on the loopback interface."

Dear knetworkmanager developers: you do not understand your problem space.

So, back to adding ALT functionality to FWL so I can test build unstable versions of packages without forking the build scripts. There are actually layers of stuff here:

  • Figure out a syntax to say which packages to test build. I'm leaning twoards "TEST_PACKAGES=uClibc,linux,toybox".

  • Teach about "ALT=url://" so it knows where to get test packages from, and when to download them. (Also not to delete them when playing with the stable version, or to delete the stable version if that's already been downloaded.)

  • Teach the extract logic which patches to apply to which version. I thought about labeling each patch with the first version number it applies to, but that doesn't say when to _stop_ applying it. I could have "test-uClibc-blah.patch" and teach extract to look for those when applying patches, and then rename those files when checking them in...

  • Teach the build logic how to handle different build needs for different versions of a package. I'd like to find a less ugly way than a big if statement with a big else case for each package duplicating the entire build logic, but I don't want to get too subtle either...

Good party for Software Freedom Day. Got to stand next to a conversation between Eben Moglen and Eric Raymond, which was about as informative and entertaining as you'd expect. Also met a nice girl from the Wikimedia foundation, who apparently lives in DC and was just up for the party. And some dude who maintains "Electric Sheep", which I really should Google.

We didn't get home until 3am because getting _out_ of New Jersey turned out to be just as difficult as getting into it had been. (The prospect of running out of gas trying to get out of Trenton was not a pleasant one, but we managed to avoid it at some point after the little low gas light came on.) That entire state seems to believe that accurate signage is an admission of weakness. Eventually we found bits of it I was familiar with, which let us get _out_ of it, and there was much rejoicing.

September 19, 2008

The room bill says $479. I'm _very_ glad I'm not the one paying it.

The Panel was fun. (I totally forgot to talk like a pirate, though.) It was me, Jeremy Allison, Eben Moglen, and Brett Smith. Although to be honest, more than half of it was the audience talking, which is fine with me. (I prefer to learn than to spout. I can hear myself talk any time.) There was apparently panelage on Linux on the Desktop on thursday, which I would have loved to see but there's no way I was asking them to pay for another day's hotel room at NYC rates.

Jeremy Allison of Samba is cool, and about what I expected from a major project lead. He lived up to being Jeremy Allison. It's the other two who surprised me.

Brett Smith is the new FSF license compliance guy. He's younger than I expected, nicer that I expected, and (apparently) far more sane than I expected. This damages my worldview. Not only could I work with this guy, I think I actually like him. To be honest, I'm not entirely sure how to respond to that. Still boggling. (The Mepis thing was done by his predecessor. I asked. He didn't apoligize for it, but didn't know the details off the top of his head either.)

Eben Moglen is smarter than I am, and after the panel he took me to see the SFLC offices (and meet all the other lawyers I've only emailed at before), and then I got to bend his ear for something like 4 hours. I feel positively honored about that. He actually managed to convince me that GPLv3 isn't necessarily the end of the world as we know it, which is... also strange. Need to think about that.

It's now 9pm and I'm sitting in a train station in New Jersey awaiting the train to philadelphia. There's an SFLC party thing tomorrow evening. Dunno if the train trip back is too much time and money to drag Eric and/or Cathy back to NYC. (Yay party, but the vaguely affordable way to get there is 2 hours each direction, and the fast train is something like $100/person round trip.)

Ok, my laptop battery is _damaged_. It's saying a full charge is 16 minutes. I suspect it's got some variant of battery memory, the charging circuitry seems confused.

September 18, 2008

I have to catch a plane in 6 hours or so, so I can be in New York City for an open source license enforcement panel being held on "talk like a pirate day".

I'm trying to figure out if this qualifies as irony.

Slept through my alarm, but Aaron from the SFLC called to remind me about priviledge, so I didn't sleep through my flight. Just paniced a bit about getting there.

Got on the plane, which took me to Newark. Caught a train to Penn Station (also known as Madison Squard Garden), which is apparently right under the HP building. Unfortunately, the security people at the front of said building (the entrance is next to a giant Border's) wouldn't let me in because I'm not on "the list" today, and Scott Peterson's cell phone is going straight to voicemail. (He's the HP lawyer who put this together.) Found a Starbuck's and used my internet via cell phone thing there, but nobody was online there either. (In theory there's a dinner tonight. In practice, I dunno where it is. Not that I could find my way around NYC anyway.)

Wandered to the hotel room. It's big, and it overlooks times square. Literally, the glowy billboards are out the window and about 15 floors down. (I'm on floor 37.) I'm not sure I want to _know_ how much per night this room is, but I'm very glad I'm not the one paying for it....

September 17, 2008

Running around doing pre-flight chores. Picked up my charger from mark's. The USB cable isn't in yet so I bought another bluetooth dongle for my phone. (Trying it out now, seems to work. Had to re-associate with my phone, but ok...)

September 16, 2008

Fade and I went to Mark's place today, to see if he could figure out why we couldn't get the internet through cell phone thing to work with her mac. He noticed that it worked with mer mac attached to _my_ cell phone, but not hers. A half hour on hold to get in touch with tech support later, and their guess is that she has a bad sim card.

I totally do not understand this. How does that work? The sim card tells the phone which number it is, but how does it malfunction in such a way that the phone can make calls, but not use internet access? (It _sort_ of knows which phone it is, but not well enough for the internet? Confusing...)

Argh. Left my power cable over at Mark's. Well, this is going to be a short blog entry. :P

The battery monitor now says how many watts the laptop is eating. (Currently 18.) That's pretty cool...

September 15, 2008

Can't swim, there's broken glass all around the pool. Sigh. There's a sign saying it's a $500 fine to have glass near the pool, but I dunno why they bother. How do they expect to find out who to fine? (This isn't "something dropped and smashed", this is "glass spread for a dozen feet along an entire side of the pool, almost certainly intentional". It's the kind of thing that makes rooftop mounted snipers seem like a slightly less unreasonable social policy.)

Launching Kaffiene to play a Dr. Who DVD crashed X11, bringing down my desktop. Great fun. (They keep saying have this stuff in userspace has some kind of benefit. The dmesg dump trace blames updatedb.mlocat, which seems unlikely.

Did my first uClibc checkin in a longish time. Just some menuconfig help entries, but it's a start.

Banging on BUILD_SHORT some more.

September 14, 2008

Hanging out at Zen while doing laundry next door. I have a cold, which combined with my sinus infection means nothing has any taste. Which is sad, I _like_ the food here...

Trying to poke at uClibc from Zen. Their wireless is down, so things like "svn log extra/Configs/" doesn't work. I simultaneously miss A) my bluetooth dongle enabling internet through cellphone, B) projects that use a real (I.E. distributed) source control system.

September 13, 2008

My laptop battery has now deteriorated enough that software suspend doesn't get triggered before the abrupt power off that comes when the battery drops below whatever the threshold voltage is. (Meaning if you plug into an outlet that isn't providing power, and don't notice, you have maybe 20 minutes before you lose your work.) That's Dell for you...

So busybox is not building under FWL. It dies in the linker stage, unable to find -lgcc_s. Which is odd, because it's _there_...

Ah, the problem is the gcc argument "-static-libgcc", which the wrapper doesn't know how to parse. It should enable/disable the new libgcc as_needed stuff.

Ok, before I fiddle with the wrapper I need to finish and check in the pending changes in the BUILD_SHORT logic. Eventually I want to turn BUILD_SHORT into the basis for an initramfs build. (A minimal busybox+uClibc system can run quite happily out of initramfs. Add in a dozen megabytes (compressed) for a toolchain: not so much.

There used to be an evil sequencing issue that we needed to install the linux kernel headers before we could build uClibc, and uClibc gets packaged into the initramfs so we need to build it before we build the kernel. The only remotely clean way to deal with this is to setupfor and cleanup the linux kernel package twice, which was painfully expensive.

Luckily, these days setupfor no longer extracts and patches each tarball before each build. Instead it extracts it the first time it's needed into a common build/sources directory and then uses cp -lR to create a bunch of hardlinks to that common source. This makes a second "setupfor" relatively cheap (I switched from symlinks to hard links so now the source cacheing behavior doesn't even use extra inodes).

September 12, 2008

My itinerary for my trip to the northeast came in, I head out for HP's legal seminar thingy on the 18th and fly back October 2. So I get to see Eric and Cathy (and maybe some family) for a couple weeks, which is nice.

Tried to watch a movie on, but the cable modem's gotten so slow the first 14 seconds of the movie took 3 minutes to display. (And it wasn't even in the "high resolution" option.) So I called time warner tech support and got through to a human after only about twenty minutes on hold (and reciting the gettysburg address into the automated phone system until it gave up trying to "help" me).

Their speed test says we're getting a little under 50k/second each way, which is certainly more than I'm actually seeing although that's to their _local_ server and not trying to go out of their WAN to any actual websites. On the actual web, I'm seeing more like 4k/sec, which is dialup speeds. (My cell phone connection gets about 50k/second to actual websites, but I can't use that until I get a new bluetooth dongle or USB cable. I ordered a USB cable at the tmobile place on the drag, but if it takes the week to come in he estimmates, I'll be in the northeast by then. Sadness...)

I explained to the tech support guy how ever since all the students came back on west campus at the start of the month, the cable modem's connection lights are on solid about 3/4 of the time, and whatever's collating them a hop or two up seems to be totally choking. This was, alas, outside his script. So he's scheduled a technician to physically come out on Friday the 19th to frown at our cable modem and magically fix the problem. (Which is the day after I leave.) Oh well, Fade can let the guy in and at least they'll notice if they can't fix it from here and follow up from where the fix needs to be made. (And maybe they can change which channels the cable modem is using or something, who knows...)

September 11, 2008

My little bluetooth USB dongle seems to oops the kernel a lot. Not a full blown panic, just a stack dump to dmesg and then the bluetooth subsystem is frozen and won't work until I reboot. This makes me sad.

Sometimes it can be fixed by yanking and reinserting the bluetooth dongle. It seems to be software suspend that drives it into an easily confused state. (Specifically, suspend to ram without remembering to yank the bluetooth dongle first. It _really_ doesn't like that.)

I note that suspend to ram now drains the battery a lot faster than it used to, and leaves the USB ports powered during suspend (which seems to eat battery even when nothing's plugged into them). I vaguely recall people talking about trying to leave usb devices mounted across suspends, but that's not a good way to go about it if you ask me...

Still, internet via cell phone otherwise remains highly cool. Fade remains addicted to Spore to the point I've had to go watch her play spore if I want to see her ever since she bought it. (And she estimates another couple weeks of this.)

And now my little bluetooth USB dongle seems to have wandered off. This is sad. I had it around 5am, and I put it in my pocket, went home, slept, biked back to campus... and I don't have it anymore.

It's too bad that the built-in bluetooth in the "everything works with Linux" laptop Dell sold me doesn't work with Linux. The bios insists there's bluetooth, anyway. The kernel simply can't find it, and all Google brings up for this model is other people complaining it doesn't work for them either, no actual solutions. Oh well, that's Dell for you.

I note that btdelconn is still cycling eating an entire CPU, and kill -9 doesn't take it down even though it claims not to be in D state. Sigh. The entire bluetooth subsystem is _fragile_...

Teaching FWL to build experimental versions of packages, so I can check in the uClibc-svn stuff I've been doing. (Yeah, I could do a mercurial branch but I just don't want to go there.)

Hmmm, decisions, decisions. Design issue time: I'm trying to add the minimum possible additional complication for the new functionality. The best way to do this is non-obvious. (Or all the ways I've come up with so far suck, take your pick.)

My first guess was to have variables like UCLIBC_NEXT and LINUX_NEXT indicating whether or not to download and use the new packages. That requires if[] statements in the build scripts (both and, and also in A tricky bit in is that I want to keep the release version if it's already been downloaded, so I need to "touch -c" the release filename. (There's a cleanup function that deletes everything out of the package directory with a date stamp before the download script started running; this removes old package versions when is updated. The sha1 confirmation bit touches the file to update its date stamp so it doesn't get deleted if it's something we want to retain.)

But doing the "touch -c" in the download script is an ugly implementation detail that shouldn't be duplicated in each caller. The download script was very simple before it knew about experimental versions, and at least the kernel, uClibc, busybox, and toybox all have experimental versions I should try out regularly. (It would be nice if I could try out new git snapshots nightly to find regressions a lot faster. If so, that needs to be more or less automated.)

I don't really want lots of if clauses duplicating chunks of code if I can avoid it. So, is there some way I can add an extra argument to the existing download calls that says "here's the experimental version", and have download know when to call it? The download function already has all the information it needs to retain the stable version, adding the touch command _inside_ the download function is trivial. The hard part is telling it which of its two behaviors to do this time around.

I don't want to download the experimental version every time, that's a waste of bandwidth and disk space. I don't want to try _every_ experiemental version at once because when several things change at once you don't know which one broke and can't debug it. So it should download the new version only when told. There are both generic and specific experiental URLs (uClibc-snapshot.tar.gz is always the latest, and it's a symlink to uClibc-20080911.tar.gz or some such in the same directory; same for things like The specific ones are best for manual testing trying to track down actual known bugs, and the generic "give me the latest version" ones are best for automated regression testing. Except then you want to re-download versions you've already got, so it would need a cleaning step.

September 10, 2008

Offline for a couple days. No particular reason, it's just not much fun using my laptop on the downstairs couch with neither fan quite pointing at me and four cats competing for my attention, and I didn't work up the initiative to get out much. (Went swimming 5 of the past 6 days, though.) Read several Discworld books (going postal, making money, night watch, now working on Thud!). Watched Fade play a lot of Spore.

Of course the travel arrangements for HP's NYC thing would come in right after the last time I checked my email, with a "please confirm in 24 hours". Oops. My Livejournal and twitter friends lists have scrolled. *shrug*

Ended my tinycc fork. The page explains why.

I realize this is at least my third attempt to end it, but that's not exactly a sign of health in a project, is it? I have too many projects, and I'm focusing in on the ones I actually want to spend time on. (For example, this might free up time to work on uClibc and documentation. If nothing else, I shouldn't feel spread quite so thin.)

September 9, 2008

Cooked bacon a few days ago. I'm not much of a fan, but Fade likes it, and the internet seems to consider it important, at least when taped to cats. This left me with almost as much grease as finished bacon (I'd forgotten it's big strips of about 90% fat, half of which melts during cooking), and I kept it on the theory there's got to be something useful to do with it.

Today, I used the leftover bacon grease to cook potatoes in. The result tasted remarkably like bacon. What a surprise.

September 6, 2008

Mips is broken in uClibc svn. Wheee. And the kernel didn't fix the powerpc linking thing.

September 5, 2008

Yay internet through the cell phone.

The Gates/Seinfeld commercial people keep pointing me to is just confusing. Seinfeld is famously about nothing, BillG is about Vista. Ok, I can see the similarity there. It's a little bit like casting Dick Cheney in a sitcom, but getting past that. If Gates wants to be seen as laughable instead of evil and creepy, ok. Fine.

But the punchline about edible computers? That's a really weird' retread of Licensing 6, isn't it? Getting past the part where the environmental hazards of disposing of something full of heavy metals is a big deal, so they want us to swallow it... (Hint: if you ever let you the magic smoke, DON'T INHALE.) The deeper issue seems to be that Microsoft is _desperate_ for disposable computing.

Microsoft has been trying to force their users to rent software instead buying it since at least 2001, and it just didn't work. The last time their biggest competitor WASN'T their existing installed base of software was about DOS 3. Nobody wanted to move to Windows Millenium, nobody wanted to move from W2K to XP. (Windows 95 was an exception, but that was more about everybody desperately wanting to move OFF of Windows 3.1, which they'd move to as DOS went down with the ship of 16 bit hardware.) And shoving Vista down customers' throats is doing about as well today as shoving Licensing 6 down their throats did seven years ago.

Microsoft would much rather be in the Coca-Cola business where the consumer buys something, destroys it, and then buys another one over and over. Edible computers are _their_ fetish, not ours. This commercial reads as a weird fantasy sequence on the part of Gates, possibly the most extreme part of which being Jerry Seinfeld wanting to hang out with him without being paid $10 million to do so.

Ok, this amuses me. I suppose that the modern definition of "liberal" might be someone who watches Bill Moyers interview Keith Olbermann for fun. Twenty years ago it would have been the definition of "intellectual", of course. These days republicans are trying hard to be the Party of Stupid. I'm still annoyed at Obama, but it's nice to see somebody get nominated with a brain, who isn't trying to hide it. (My Mensa membership expired in 1999...)

September 4, 2008

Sigh. Chromium is written in C++, not C. Much less interested in it now. (Why bother to do a new web browser written in C++? Konqueror/Safari exists.)

I keep running into people who say "sure C++ is bloated beyond what any one person can cope with, but you can pick a sane subset of the language, just like Perl!". Except that no two people ever have an identical subset, so as soon as you have more than one person working on the project your subset expands, and soon you're using Boost libraries and everything. (And if you go with an anal coding style document dictating the language features your project is allowed to use, you A) present new developers with a higher than average brick wall, B) can't share code with other projects without going out of bounds.)

Mark made the cell phone internet work. Yay!

Ah, Chromium is based on webkit, which is Apple's packed up and exported Safari rendering engine, which is a fork of khtml in Konqueror. So the answer to my "why do another" question is "they didn't". Ok, that makes a minimal amount of sense. I'm still disappointed, though.

September 3, 2008

Whoever packaged mercurial for debian/ubuntu made it depend on rcs. Why did they do that? That's so amazingly, deeply stupid that I'm at a loss for words.

I'm aware that mercurial is capable of converting cvs archives to hg. This is NOT an excuse to make rcs a required dependency for installing mercurial. Attempting to convert from a repository format that isn't installed should simply fail. It's that simple.

Hanging out at the chick-fil-a on Ben White, seriously abusing their wireless. Got in 45 minutes of swimming last night (wow is that exhausting, I'd forgotten how much), and today I biked to south Austin (and need to bike back to go home later). Yay exercise. Yay getting lots of missing packages installed on my laptop.

Ok, google broke down and made its own web browser from scratch, and I'm impressed by their comic book about its design. And there are good developer docs too.

September 2, 2008

According to T-mobile customer service, the $20/month internet service thing wasn't enabled for either phone line (is now, but may take 2 days to actually happen). And getting surf-from-the-phone service (which apparently I need to contact samsung's website for the help pages, or upgrade the firmware) is an extra $6/month, although that part was somewhat confused. (There seems to be some disconnect between Samsung and T-mobile. It's a new model of phone, which they haven't sold for very long. Not much selection in the 3G department yet. They gave me Samsung tech support's direct phone number, maybe I'll call it tomorrow.) But in any case, that's a separate issue.

The part about the phone volume only going up to 7 instead of 10, meaning I can hear it ok inside at home, but not outside near a busy street or in a place with loud background music... That I also have to talk to samsung about, apparently. It can ring loud enough, so it's clearly a software problem...

Spent most of today re-reading Discworld books (still going through the watch series, today I finished The Fifth Elephant and moved on to The Truth, since that comes before Night Watch and it's sort of tangentially a watch book). Right now I'm in the mood to hang outsomewhere with free soda refills and good lighting, an optionally an outlet I can charge my laptop from (since I drained the battery making a half-hour stop on a bus bench walking back from Mark's last night). Considering I'm still sore from last night and the humidity's at "incoming hurricane" levels, I only felt up to going as far as The Donald's.

Unfortunately, this means no internet access (well, Wayport branded lack of internet), and my laptop isn't particularly useful without an internet connection at the moment. I have to install apatche before I can get a copy of my website running on loopback again, I have to install mercurial before I can poke at any of my existing software projects...

I wonder how long it's been since I rsynced my website up to the server? Before I reformatted my laptop, anyway. (I can copy _that_ script back now, though...)

I suppose I can set my email back up now, although there's no way to test sending and receiving at the moment. (I use hand-rolled ssh tunnel things in both directions.) Oh well, I can get it to read the old mbox files... Oh yes, Kontact continues to digest Kmail and make it less and less usable. (I forgot how I deleted the korganizer pop-up reminder daemon... But then again, that sort of detail is at least half the reason I keep this blog, so korgac is once again toast. :)

Sigh. I remember when kmail put the number of unread messages each folder had along the right edge of the display box, so they all lined up and were easily readable. Now it appends them to the folder name so they're all jagged, and considers this a UI improvement. This is made worse by the fact that all my interesting kmail folders are nested subfolders of "inbox", so it's indenting them all and leaving lots of whitespace at the left, then truncating the folder names at the right. That's it, preserve the useless whitespace and truncate the actual data. Who designed this? Is there any way to put the _number_ over there in the whitespace? I should look into thunderbird, at least it's nicely standalone and not part of an increasing hairball interfering with the functions I want out of it. Not that I can install _that_ without internet access, either...)

Huh, I took a gamble and copied my old kmailrc file to .kde/share/config/kmailrc and... it seems ot have worked. Wow. (That kind of thing generally doesn't work for me.) Well, there's half an hour of fiddling saved, I hope...

I'm starting to be creeped out by how much of kubuntu 8.10.1 is actually working out of the box. It's somewhere between "refreshing" and "I'm waiting for the other shoe to explode in a nuclear fireball".

On the other hand, I already fixed vi (ln -sf vimrc /etc/vimrc.tiny) because the Ubuntu default won't let you use the cursor keys in insert mode. And /bin/sh still points to the Defective Annoying SHell. So it's got some persistent built-in breakage baked into the distro at this point. But they didn't break anything _new_, and actually seem to have fixed some of the existing problems...

Ok, software suspend is still horked (the keyboard/mouse don't always come back after a suspend, and of course the defaults have changed to lock the screen when it resumes). That's reassuring me a bit. Now, how did I fix that last time? Made the power button re-suspend... Alas, that I _didn't_ mention in my blog, so I have to work out how I did it again from first principles...

Ah, pressing the power button calls /etc/acpi/, and in that directory there's a "" that does the actual suspend to ram, so rename the old script to something innocuous and make a symlink. That bypasses the screen locking logic, too. Exactly what I want. (If they have physical posession of my laptop, there's not a lot I can do about it in software. Well, ok, I could encrypt the home partition and have an initramfs ask for a password to mount it, and if I was really paranoid I could have a USB key with the encryption key for the root filesystem, and have the initramfs asking for the password to decrypt that USB key to get the second key off of it, and in fact the USB key could be something like a nail board programmed to wipe itself if you entered 10 wrong passwords in a row, at which point grabbing my darn terabyte backup drive would be the easy thing... But the point is, I'd still not have my laptop anymore, which would be sad.)

Poking at a python script to go through my /home partition and find runs of zeros it can turn into sparse files. (Several of my filesystem images started out sparse, and got de-sparsed as part of the backup process.) But although a slightly obsolete version of the python documentation was in the backups I dumped into my /home partition, I need to install the man pages before I can look at things like "madvise", which I think is how they finally added the ability to punch holes in existing files. There was a Linux Weekly News article on at one point, anyway...

September 1, 2008

I despise this Sinus infection. Can't get more than two hours of sleep before I wake up with a headache. I despise headaches too.

Incoming calls are finally going to my new phone, so I spent most of the day over at Mark's trying to get internet to work via cell phone. Installing Kubuntu 8.04.1 on my laptop right before doing this didn't help matters. Is bluetooth gone because of 8.10, or did it never work? No idea (it probably never worked, I simply hadn't tried before; the BIOS says it's there and enabled but the Linux kernel is adamantly refusing to find it). After an hour of fiddling with it we drove to Fry's and I spent the $17 to get a USB bluetooth dongle just to get over that part and on to the next bit.

Unfortunately, although we could then associate with the phone, get a serial device pointing at it, and do a lot of ATDT stuff via wvdial (among other things), it point blank refused to actually do a ppp session. Hung up on us instead of connecting each time. Many web pags said this _should_ work, but we tried a couple dozen variants and only managed to get slightly different failures.

Eventually, after more googling on Mark's part than you can possibly imagine (he puts my Google-fu to shame, only have of it actually being Google. The Ubuntu bug tracker has a search engine, who'da thunk?), I noticed that trying to bring up any of the actual phone's help pages says "connection failed". Apparently those are implemented as web pages on the t-mobile website (don't ask me why). So not only is the extra $20/month internet not working, but the phone's built-in internet that you get as part of the basic service isn't working.

Tomorrow: call customer service. (Called 'em today and got a recording about it being labor day, thus tech support is closed. Oh well, at least that means I can expect to talk to humans without having to recite the jabberwocky at a voice response system until it gives up, ala sprint...)

On the "getting 8.10 to work" front, knetworkmangler actually seems to be working again. I'm as surprised as anyone. No obvious way to tell it "rescan for more wireless networks, you missed one I know is there", but other than that... Huh. Cool.

August 31, 2008

New phone works for outgoing calls, but not incoming calls yet. Copied my numbers off the old one to a text file.

Fade and I spent lots of today watching the next round of netflix while I closed more tabs. (Finally finished Veronica Mars season 1, and then made the mistake of watching a highlander disk right afterwards. The difference in acting ability is ENORMOUS. Until Joe and Methos get on the screen, of course. Methos and Joe are great, Duncan's ok, Ritchie's annoying, and their weekly guest redshirts all CANNOT ACT. There's a reason Fade calls Highlander the "Joe and Methos show", they're pretty much what makes it worth watching. (Amanda's somewhere between Duncan and Joe/Methos when she shows up, but she wasn't on this DVD and Methos was only in the third episode.)

Joe had a line in the middle episode of the disk, ala "Sometimes you can't make any sense of it, you just have to see it through" that perfectly summarized the plot of that episode. (His character wasn't _talking_ about the plot, but the actor might have been. Striving mightily to overcome the material...)

Finally finished backing up my files to the terabyte drive, and now to install the new Kubuntu...

August 30, 2008

Bought a new phone. Mark dragged me out to the T-mobile place in the Triangle. I forgot to pick him up from the airport last weekend when my phone switched itself off and the alarm didn't go off, nor could he call me. (Still feel bad about that.) After over a decade as a sprint customer I've now left them, but I don't feel at all bad about that because they _earned_ it.

Sprint's internet plan (for getting internet on my laptop via cell phone) was $70 per person with no discount for having their cell phone service and no family plan. So altogether, with tax, Fade's and my monthly phone bill would have been somewhere over $300 to get our internet through them. That's _actively_ stupid, and they deserve to lose.

T-mobile, meanwhile, offered a two person cell phone plan for less than we were already paying sprint, and then 3G internet at $20/person on top of that.

So I have a phone, and Fade has a phone (a Samsung something-or-other with 3G), and someday they may even work. (Activation was... tricky. Trying to get new phones over a 3 day weekend when the tech support people are mostly away might not have been the best idea, and I break stuff. It's sort of inevitable. This time, their registration computer threw up a weird internal error message, which eventually turned out to be due to signing up for the internet plan while chosing to block their email service to my cell phone. I want to use the internet on my _laptop_ (which Mark made halfway work via bluetooth on his laptop in the store, and I need to buy a cable for to do via USB). I don't want to use their email address, and I don't want to use the cell phone's UI to do anything with the internet, and I don't want to be spammed on my phone. Seemed simple to me, but whoever programmed their computer never thought of this, apparently...

Closing more tabs. I have tabs open from March. This is downright archaeological. (It's a combination of software suspend mostly working now and the KDE desktop saving my open tabs when I shut down. Most of them are "couldn't load blah" because I don't bring the net up until after the desktop has booted, so it's not taking up the gigabytes of ram it would otherwise to _populate_ all these tabs. But each one is a URL I have to either look at or cut and paste to a file to look at later. My file of cut and pasted URLs is 200 entries and growing...

August 29, 2008

Still trying to backup stuff and close tabs so I can format and install Ubuntu 8.10. Boy I have a lot of open Konqueror tabs. (Finding the window full of tabs from didn't help matters, I've lost most of today to that...)

August 28, 2008

Ok, even youtube is slow now. (Not unplayably slow, but noticeable.)

Filling up the terabyte drive, and preparing to install Ubuntu 8.04.1 on my laptop. Wow I have a lot of crud lying around on this laptop, and many many open windows to close...

August 27, 2008

Broke down and bought a 1 terabyte drive at Fry's. (The iomega and the western digital were the same price, so I bought the one that provided more useful information on the box. Admittedly part of this information was that it's NTFS formatted, but the box assures MacOS X users that the instruction book says how to reformat it, so points for trying. FAT's not exactly something you want to put on a terabyte.)

Refomatting it ext3 took something like 10 minutes, and the _entire_time_ all my vim sessions were blocked:

$ time sync

real    4m45.306s
user    0m0.004s
sys     0m2.572s

The sad part is that the SATA drive in my laptop was idle the whole time the USB drive was formatting. Apparently, vim is doing a global sync rather than an fsync on just its file, so it has to wait for entirely the wrong drive. And it was some kind of drive lock thing, not just tons of pinned cache pages, because the USB drive light went off right after the formatty program stopped couting up. There was maybe 10 seconds of syncing at the end after the display stopped updating, if that.

I keep wanting to go in and fix programs I didn't build from source. Yeah, I understand the appeal of gentoo. Unfortunately, that distro committed suicide by intentionally refusing to make a grandma-friendly installer because they wanted to limit their user base to only people who _could_ modify the source code. If I use Ubuntu, several million people are also hitting every bug I see. Gentoo turned their biggest asset into a liability by _forcing_ it on people.

*blink* *blink*. According to my notification email thingy, "Penguicon" is now following me on twitter. I honestly don't understand why...

August 26, 2008

Got x86_64 to build with uClibc-svn. It booted and gave me a shell prompt. Poking at arm now. (Most of the work is getting it working the first time, the next biggest lump is getting it to work on a second platform so it's genericish. The remaining platforms tend to be comparatively simple.

Heard back from the Binutils maintainers (both of whom are full-time Red Hat employees). 2.18 is GPLv3, so I reverted to 2.17. I need to break the linker out of tinycc and see what I can do with it. (Actually the linker's easy, it's fairly portable and mostly complete. The assembler, on the other hand... How many platforms?)

Alas, UT can't schedule the necessary appointments and process the appropriate paperwork in time. (The faster of my two options involves an appointment on September 15th.) In their defense, the state of Texas decided that anyone who graduates in the top 10% of their high school class gets an automatic admission to UT, which is more than their entire incoming class each year. (That's an undergraduate problem rather than a graduate problem, but their entire admissions process is now geared to finding every possible way to keep people _out_.)

The internet is PAINFULLY slow tonight. I'm guessing it's all the students coming back...? Except that youtube seems unaffected, somehow. The daily show's unusable, livejournal's taking 30 seconds to load each page, my webcomics seem swamped, even Google's a touch sluggish (which for them means 5 second page load times)... but not youtube? Weird.

August 25, 2008

Wandering around the University of Texas at Austin, trying to get readmitted to take a class this semester. (If I pass one class per semester, spring and fall, for six years: that's 36 credits and a master's degree. Hopefully I can do it faster, but for right now I'm trying to finish one class without interruption.

Still poking at the uClibc snapshot. The dependencies aren't quite SMP safe if you do a "make all install" in one invocation.

August 24, 2008

Apparently, the US GDP is about $13.8 billion. According to Forbes the richest guy in the world (Warren Buffett) is worth $62 billion. So the richest man in the world essentially owns the entire output of the US for 4 and a half years. Every big mac, every dentist appointment, every new swimming pool... Good to know.

A while back I mentioned that Michael Lewis' book "Liar's Poker" described the roots of the current mortgage crisis, by which I mean the book is about the invention of the mortgage bond back in the 1980's.

Mortgage bonds take thousands of individual mortgages and tie them together into a big pile of money, then sell shares in that pool. In theory this lets statistical averaging even out peculiarities like people who default on their loans, or pay down their debt early. It let things like mutual funds buy shares in mortgages just like they would municipal or treasury bonds, and created a huge demand for more and more mortgages to invest in. Mortgages were now something you could _trade_.

This meant that a mortgage was no longer a 30 year relationship to the lending institution, it was something you could flip. Lendors became much more willing to make loans, it was easy to get out of 'em at any time and Wall Street had billions of dollars looking for good returns.

This meant the people who made the loans were no longer the same people who would collect the checks for the next decade, instead they got a commission for making the sale and sold the mortgage to somebody else within a few months. Make the loans, package them up into big pools, sell them to large institutional investors, cash your commission check, rinse, repeat. The ability of the borrower to pay back the loan faded into the background as a secondary consideration: it would become somebody else's problem before long, the statistical safety of the huge pools of money dampened the sting of individuals defaulting, and wasn't it all insured anyway? Divorced from the reality of individuals, the math would always find a rate at which the loan should (statistically speaking) be profitable, so just tweak the rate until the numbers look good.

Of course Bush came in and deregulated, eliminating the need for pesky things like down payments and equity. When the dot-com bubble burst, investors fleeing from stocks went into bonds for safety. Don't own a percentage of future profits, own debts people are _obligated_ to pay. (Assuming, of course, that they can.) More money than ever flooded into mortgage bonds seeking the safety (yet high returns) of real estate. Two decades had passed since the days of individual savings and loans backing mortgages with the contents of their depositor's savings accounts (ala the Frank Capra movie "It's a Wonderful Life") was the main source of mortgages. Those small lendors were careful, because it was their money. They had to eat the costs of default and foreclosure, and had to be willing to take posession of a property and sell it to maybe eventually get some of their money back. They were careful who they loaned to because the loan was their problems.

But with mortgage bonds, it was all numbers. Every mortgage sold was an instant commission, pack 'em up, flip 'em to large institutional investors, and who cares what happens 5 years down the road. It's all insured, isn't it?

And then the dominoes started falling. Again.

Nothing new...

Poking at building glibc under uClibc again. It's still complaining that it can't possibly exist without TLS support, despite TLS not _existing_ for decades and never being supported under the 2.4 kernel anyway. (Apparently, glibc no longer supports the 2.4 kernel? I told it --enable-kernel 2.4.0 and it's not helping.)

Part of the problem seems to be that I'm building it in a chroot, in an i386 environment on an x86-64 host. The darn ./configure stage is looking in /proc and seeing "oh, you have an x86-64 kernel" and thus trying to build for an 64-bit target even though I'm native compiling in a 32 bit userspace. (The compiler defines an __i386__ macro so you know what target you're building for, but the glibc build doesn't use that. Sigh.) So it's grabbing the wrong headers. I'm not sure if this is the cause of the problem or just a random unrelated symptom.

Hmmm... Booted the system-image-i686 under qemu instead of doing the chroot thing, and the end result was more or less the same. Now it's complaining about an #error in ../nptl/sysdeps/i386/i686/../tls.h (yes, really) instead of having an x86_64 in there. Sigh.

Once again, getting TLS support in there requires linking against, which is the runtime loader but which the TLS guys decided to use at link time for some reason. In uClibc you have instead (which doesn't even support TLS, which I'm pretty sure stands for "Thread Local Storage" by the way). I could tweak the wrapper script to snag the dynamic linker in the as-needed stuff, but there's no _point_ if uClibc 0.9.29 doesn't support TLS. As far as I can tell, current glibc won't build under old versions of glibc, or under libc5, or from Solaris or MacOS, or under uClibc. They just don't support it.

I wonder if the current version of uClibc (the main svn development branch, anyway) supports TLS? (No need for full NPTL, just Thread Local Storage...)

Another advantage of upgrading to the -devel uClibc is it might build with -j. (The 0.9.29 release breaks if you do a parallel build.)

The downside is there hasn't been a release in a year and a half, so I'd be taking a random svn snapshot and trying to stabilize it. I've been meaning to do a new dot release anyway, might as well just grab the -devel version and try to beat it into shape for a release...

Downloaded last night's snapshot of uClibc (which is svn 23134). Came up with a .config it's only mildly upset about (builds with tons of warnings), and shoehorned it into the FWL build. It died trying to build ldd, which isn't surprising. That sucker's never worked right. It's a design problem: the uClibc developers always assumed that their ldd would be linked against their C library, and that's what their build process tries to do. Meaning if you're cross compiling, and want to build an ldd that runs on the host and analyzes target binaries, you need to build a host version of uClibc just so you can create the ldd binary. Which is silly.

August 23, 2008

Hmmm... Looking more closely at binutils 2.18, although the top level directory has both "COPYING" and "COPYING3" files (meaning it's dual licensed under GPLv2 and GPLv3), the subdirectories "bfd" and "gas" has GPLv3 (only) in their COPYING file.

Now since GPLv2 says that if you license any of the code under it, you must license _all_ under it, I'm pretty sure this means that everything in the binutils tarball they're distributing may be used under the terms of GPLv2. On the other hand, they're distributing source rather than binaries. I need to ask the SFLC about this. I may wind up having to revert to binutils 2.17 and working around the powerpc problem another way.

August 22, 2008

I'm reading the SFLC's advice about how to avoid ever using GPL software, and thus be in compliance with the GPL by having it never come up. Did they not have a single geek read this thing before publishing it?

Just as your legal and/or management team negotiates terms for inclusion of any proprietary software, they should be involved in all decisions to bring FOSS into your product.

That's it, require official approval from bosses before using any free software in the project. Make sure that this approvals process is just as long and difficult, with just as much paperwork and delay, as negotiating a multi-million dollar per-unit licensing deal. Make sure there's absolutely zero advantage to using it, ever.

Sigh. There's a big difference between "ask your engineers to document what they did" and "fill out forms and submit them to the bureaucracy for permission to proceed". I don't expect lawyers to understand this difference, but every geek in the world will. Are they totally ignorant of the history of free software and how it spread?

I need to fix PowerPC and I'm not quite sure how to go about it. Easiest way is probably to figure out how to feed a different device tree in for a different platform. Hmmm... The default platform claims to be a power macintosh, maybe arch/powerpc/configs/pmac32_defconfig?

I've gotten sick of this sinus infection, and since 5 rounds of antibiotics haven't knocked it out (including one that lasted for 3 weeks) I'm trying the "spicy foods" approach. I am not a fan of capsasin, but I've ordered ten of the "nuclear teriyaki" wings from the wing place around the corner, in hopes of flushing out my sinuses via a different avenue.

The fumes coming off this stuff are not pleasant.

Ow. Ow ow ow, and ow. Did I mention ow? (Also: OW! It gets worse. Five wings in, I rather want it to stop.)

Dunno if it helped or not. Now I've got a stomachache, though.

August 21, 2008

I'm confused by the dual core atom. What exactly is the objective here? "Let's make it small and simple. Now let's have two of them, doubling the size and complexity!" Ok...?

There's a pendulum in processor design, swinging back and forth between doing more in parallel vs streamlining and simplifying. Both are attempts to increase speed, although 90% of all CPU speed increases ever have come from manufacturing figuring out how to increase photolithographic resolution, allowing the die size to shrink resulting in shorter wires. Signals take less time to travel down shorter wires, and smaller electrical components have less capacitance so they take less time to fill up with electricity before they can do their thing. Thus you can clock 'em faster and get more bang for the watt. That's the big secret, everything else is really details.

Admittedly 2 megabytes of L2 cache with fancy prefetch (to disguise 3000+ clock cycles of latency for signals to travel all the way out to DRAM and back) is a fairly _important_ detail; getting your chip to stay out of its own way as it gets faster is nontrivial, the bottlenecks keep moving around. But the big architectural changes like having 3 execution cores dispatching instructions in parallel is only worth about 4 years of Moore's Law doubling, out of the past 40. The 2-CPU smp of the "core duo" line is worth a year and a half of speed increases; one modern CPU beats a pair of 2 year old ones. Do all of that fancy stuff on the manufacturing processes used for the original 386 in 1985 and you have a deeply uninteresting chip running at 33 mhz and consuming a several hundred watts of power. (It would probably melt even with water cooling.)

August 20, 2008

Many things to do today. Beth asked me to review paper submissions for Ohio LinuxFest (they need them by friday morning if it's to matter). I'm indexing the OLS 2008 papers, along with the videos. I've got some toybox stuff to do. I need to figure out how to get the PowerPC target working under the 2.6.26 kernel. The SFLC finally published their GPL compliance guide and I need to read that (to get their opinions on stuff, anyway) before dealing with three different GPL enforcement todo items. The hotel proposal for Austicon should come in sometime today, I should read that when it does. And finally introduce Beth to Stu this evening, probably at the Mongolian Grill.


August 19, 2008

The pilgrimage to Rudy's has been made! Beth and Fade and Mark were along. (Stu couldn't make it, his back is acting up and he's zoned out on painkillers today.)

Now at Epoch, fighting glibc again. I'm trying to build the thing from the normal Ubuntu command line, to have a baseline to compare against. It's not working. First I hit this bug. (Yes, glibc uses perl _and_ awk to configure itself. Apparently nobody ever asked "is this complexity really needed"?) Now I'm having some variant of this problem. Which is silly.

I note that complaining about symbol "libc_multiple_libcs" being included more than once is ironic enough, but that bug report being EIGHT YEARS OLD gets it well into "silly". I'm trying to build a stock glibc 2.5.1 using Linux From Scratch 6.3 instructions on Ubuntu 7.10. This isn't my hand-rolled custom setup, this is relatively current versions of stock components all the way and you'd think it would work out of the box. It does not. That's kind of sad.

I _really_ don't like glibc.

I suppose I could grab glibc 2.7 and try to build that instead. (That's what the development version of LFS is using.) Or I could try to build a new /tools directory following the chapter 5 instructions. But trying that under mini-native gives '../nptl/sysdeps/x86_64/tls.h:63:3: error: #error "TLS support is required."' which is yet another fun little detail to track down. (It breaks in so many different ways. This is one of the most brittle pieces of software I think I've ever encountered.)

August 18, 2008

Beth is in town. Promised her the sacred pilgrimage to Rudy's but we wound up going to the Texas Land and Cattle company instead, because it was on the other side of her hotel's parking lot and it was rush hour.

Didn't turn my laptop on all day.

August 17, 2008

Breakfast at Einstein's bagels. A little bit of banging on Linux From Scratch. (Building glibc is a flaming pain.) Mostly offline, re-reading the Amber novels and such.

Went back to say hi to the T-mobile guys, but they couldn't get their internet to work with either my or Fade's laptops, and their tech support guy on the phone seemed to be confused by somebody wanting to use their internet through a USB cable. Promised to email me information if he found it. Still using my dying Sprint cell phone for the moment...

Found one of my old wristwatches while unpacking boxes. Battery's not dead yet. The last one I bought gave me a rash, and I've been doing without since. (Using your cell phone to tell time isn't fun at the best of times, and when it switches itself off when hit or squeezed too hard, and then takes 45 seconds to boot back up... Yeah.)

August 16, 2008

A day away from computers. No programming today.

Fade and I had planned to go to Star Ranch, but wound up going to highland mall instead. (We still went to sheep for dinner, though, even though it wasn't on the way back. Took Mark out. A good time was had by all.)

Talked to a T-mobile guy at the mall about new phones. My old sprint phone is dying (if you close it too hard, instant-off. It takes about 45 seconds to boot back up to usability, once I notice). And sprint is just _stupid_, wanting $70/person for internet access with no discount for having their cell phone service. Getting internet for my laptop through one of T-mobile's cell phones is only $20/month on top of a family plan for me and Fade that's cheaper than what Sprint's charging now. Fade and I need to go back tomorrow with our laptops to make sure said internet _works_ on Linux and MacOS X, but it's looking good...

Saw The Plague Dogs, from the people who did Watership Down. Gee, I wonder why this one didn't have the same theatrical success? It's bad goth poetry, filmed. The anvilicious "laboratory testing is evil" stuff was merely clumsy and obvious. The way the authors had it in for the dogs (the one who'd had brain surgery racks up a _body_count_ of accidentally killed owners he blames himself for) crashed my suspension of disbelief about halfway through. Calling out the army with helicopters for animal control was probably deeply symbolic, although of what doesn't matter. The downer ending where everybody dies by having their worst fears come to pass was pretty much predictable by that point. But then going to gospel music as the credits roll?

Fade liked it, and it doesn't displace the worst movie I've ever seen, which was "Seven", and so far the only time I've wanted my money back. (The most incompetently made movie I've ever seen was "Manos, the Hands of Fate", but I saw the MST3K version of that which was outright enjoyable).

Took it out to the mailbox immediately to get it out of the house. The netflix queue is unblocked! (Still need to get two of those set-top boxes. One to play movies with, one to take apart...)

August 15, 2008

Attempting to build Linux From Scratch 6.3 under FWL mini-native images. I've already got a /tools directory, which is enough to rebuilt FWL, so it's pretty powerful.

Unfortunately, Linux From Scratch is based on glibc, and build that needs (shudder) perl. So I'm trying to add perl to the /tools directory according to the LFS chapter 5 instructions... and the perl build is breaking in toke.c:

toke.c: In function 'S_scan_formline':
toke.c:10542: error: invalid operands to binary +
toke.c:10542: error: invalid lvalue in unary '&'
toke.c:10542: error: invalid lvalue in unary '&'

The problem is the preprocessor doesn't seem to be substituting PL_bufend, which is only #defined if the macro MULTIPLICITY is set, which means threading support. So attemps to build perl without threading support break...?

Google time. Somebody who hit this error said that having a file named "test" in the path screws up the perl ./configure step, which is just weak. But removing busybox "test" from /tools/bin didn't fix it... Ah, it's actualy a Linux From Scratch plus uClibc issue, with a patch. (One of the most powerful techniques in a modern system integrator's arsenal is checking to see who else hit this before. I dunno anything about the guts of the perl implementation, and tracing that back to first causes myself could easily have taken a couple days...) Now, do I still need to remove /tools/bin/test or not... Nope, just the uClibc change, which I can do with sed. Ok, that's reassuring.

Hmmm, grinding through LFS chapter 6 and I need to reorganize some stuff. I need a temporary working directory to download/extract/build packages in, meaning I need the second partition mounted under qemu because the root filesystem hasn't got 100+ megs free space (to keep the image sizes down). But the script that mounts that also does lots of setup creating symlinks and such in the root directory, and LFS wants the top level pristine...

Ah, easy fix: chroot! I can assume root access inside qemu, so doing a chroot in there isn't verboten.

Almost reported a toybox bug to the busybox list. (That would have been embarassing, so naturally I blog it! Chroot isn't stopping option parsing at the first non-option argument, it's a one character fix but I hadn't specified that yet.)

ARGH! The busybox vi command ate my script! (Memo to self: hardlinking the script in two places makes the updates automatically show up in the chroot, but the busybox vi command should NEVER BE TRUSTED WITH YOUR DATA. It truncated the file to zero bytes. I have no idea why it did this, but it did it.)

Darn it, that cost me something like three hours' work. Grumble, grumble. Luckily, I remember the annoying parts...

Wow mame is frustrating to play when it decides "shift" is one of the buttons. (Hit shift five times and KDE decides to enable "sticky keys", doing a pop-up dialog. Not in the mood to track that down and rip it out of the system right now.)

When I get around to writing toybox umount, I need to add an option to tell it "unmount everything beneath this mount point". It's annoying trying to play whack-a-mole cleaning up all the proc, sysfs, tmpfs, and bind mounts from an interrupted LFS build script. (Admittedly the kernel guys added per-process mounts to make this suck somewhat less, but allowing umount -a to take an argument would accomplish it more easily.)

Sigh. And the glibc build broke because it says "forced unwind support" is missing and required. What the heck is forced unwind support, and why on earth would a C library need it? I'd google for this, but once again the wireless access point is out. Time to go home where there's no air conditioning and cats pestering me every 30 seconds nonstop... (I am a cat person. We have too many cats.)

Hmmm... Whatever it is, it's in on Kubuntu. But not in libgcc.a. (So if you build your compiler with --disable-shared, you can't build glibc with it. Wheee... Except the mini-native compiler _isn't_ using --disable-shared, because of exactly that kind of gcc insanity...?)

Ok, dig the failing program out of config.log (because of course it deleted the program it compiled after the failure, thanks autoconf) and try to compile it... Yup, failed. Try with DEBUG_WRAPPER=1 and... Huh. I think it's the wrapper script...? Let's see, gcc -v is doing --as-needed -lgcc_s --no-as-needed right after each -lgcc, so I think the wrapper script needs to add that. Except it's arguments to the _linker_, not to the compiler, so I think it actually needs to be "-Wl,--as-needed,-lgcc_s,--no-as-needed" which is an _ugly_ mouthful but maybe it'll be passed through correctly if put in the right position?

Have I mentioned recently how much I hate gcc?

August 14, 2008

There's video online of the Linux Compiler BOF I hosted at OLS. Apparently free-electrons decided it was worth recording, not sure why. It's mostly me talking, which seems a waste of a good BOF if you ask me, but oh well. (I tried to wander away from the front of the room, but people kept asking me questions and the camera followed me...) The directory has lots more interesting videos in it. (Why the ones where I'm exhausted and semi-incoherent always get recorded... Then again it could just be that I'm always like that.)

Re-inserted toybox into the FWL build. (It never quite went away, I've needed the toybox patch command and oneit all along. But now $USE_TOYBOX switches back on all the toybox commands in defconfig. I took a quick look at busybox defconfig to see if I could pare it down a bit, but of the 255 commands (yup, nice round number... from a certain point of view) only a dozen or so actually seem useless (ed, mt, fdflush, everything in the runit directory... that sort of thing). I thought of switching off the toybox applets too, but then I'd need two codepaths in and (One to build defconfig and one to build based on a miniconfig. Or else I'd need two miniconfigs.)

I'm vaguely pondering renaming the prebuilt binary mini-native tarball to "native-root-filesystem.tar.bz2". Except I'd need both a -dev and a non-dev version, for the BUILD_SMALL stuff. Not quite sure the least messy way to do that yet. Right now the build is producing certain names, based on the script that produces them... Although isn't called (although its non-UML successor probably will be...)

August 13, 2008

Slept 15 hours. Woke up feeling terrible. And tired. Sigh.

Stu says that adding decss support to ubuntu dvd playback can be done by running "/usr/share/doc/libdvdread3/" as root. Good to know. (At the laundromat at the moment, I'll have to try one of the netflix DVDs when I get home.)

Every time I hear about Russia attacking Georgia on the news (or even CNN) I try to remember whether Denys Vlasenko is from Georgia or the Ukraine. (Either way, I'm fairly certain he moved out of Russia's sphere of influence. I should just ask him, but one of the side effects of my sinus infection is I don't want to bother anybody. It's just too much work...)

August 12, 2008

Working on FWL documentation. My problem at the moment is that it's repetitive. I've finished updating the README and the new summary page, and now I'm working on about.html and it's all the same stuff. It's the same stuff in more detail, but there's a lot of repetition. When I change things in future, that would make it hard to track down everywhere it needs updating. Huh...

Another page I'm working on (which isn't linked in yet) is the history page. The project's around 7 years old, it's got backstory. I'm not sure how relevant it is to anybody but me, but I might as well right it down. I also need to do a FAQ, especially since the questions I get asked tend to be asked to _me_ (in email, in irc, or in person at places like CELF and OLS) rather than on the mailing list.

I need to update the "why cross compiling sucks" document and link that in to the mess as well. Suck material from my intro to cross compiling tutorial and get it up on the FWL web page...

I keep getting headaches, right where Fade bonked me on the head at sword camp. (Top right part of the head.) I dunno if this is an aftereffect of the bonking, or some strange symptom of my sinus infection reoccuring. I know it makes me really tired when it happens. (Want nap now.).

I should probably go back to the doctor for yet more antibiotics, but I've had _five_courses_ over the past year, and the last one went for three weeks. What exactly do I exect them to do about it? Not much at this point... (I'm starting to lose faith in the medical profession, at least for anything short of surgery to correct this.) I feel much better while I'm _on_ the antibiotics, but they never give me along enough course, and by the time I convinced them I _did_ need a longer course than they were giving me it was resistant to just about everything. Sigh...

Huh, there's a new POSIX spec. But it's not freely available on the web, so it doesn't count yet.

August 11, 2008

Working on a uClibc Cloned the uClibc repository (one of them, anyway) and going through looking for interesting bug fixes. I'll probably break down and make sparc work in FWL while I'm at it, I found some old uClibc/sparc patches to test, but dunno whether or not they're in the repository. (I think I got them off the mailing list, not sure. It's been a while.)

Heh, remember when I said that the biggest competitor to blu-ray was internet video? Looks like it's playing out that way already.

There's a race to replace DVD between youtube and blu-ray. I expect youtube to win. Customers stay with what they've got for a surprisingly long time out of sheer inertia, and they have yet to replace the lowly CD over in the audio world (despite DVD becoming ubiquitious and holding audio just fine).

The move from VHS to DVD paralleled the move from casette to CD in the audio world. The convenience of never having to rewind was a significant factor in that, and the move from analog to digital so the output didn't gradually degrade (it was either perfect or it didn't work and you got it fixed). VHS had issues with "tracking" and similar that could produce surprisingly bad images even when the tape didn't get crinkled or full of dust; the real comparison wasn't between perfect VHS output and perfect DVD output, it was between what users normally saw out of each.

You can now get television through the internet. Not just hulu, but on the cbs/nbc/abc web sites. (Go look, their programs are viewable off the network's own website. Legally.) Netflix has its set-top box for movies, although hulu's got plenty of those too.

Podcasts forced the audio guys to abandon streaming and just give you the darn mp3, video should go the same way eventually. Dunno when. Oh well.

Out at Epoch, doing programming stuff. Having trouble concentrating.

For a while now, I've meant to break up the FWL sources/configs/$ARCH files. Each one contains two "here" documents (for miniconfig-linux and miniconfig-uClibc) which is an awkward way to go about it, and a better approach is to put them in a subdirectory instead.

The three things standing in the way of this were the size of my todo list and two fiddly technical issues about the transition. Well, I've worked down my todo list until this is at the top, but the fiddly technical issues are being outright annoying.

The first is that in convincing mercurial that you want to delete a file, put a directory of the same name where that file was, and add files to that directory... all in one checkin... It got Confused. Decided to just punt and make a sources/targets directory. One down.

The other is that I can't figure out what to call the first file. It's a small issue, but my brain's just not working well right now. (It's been really hot all day, I think I gave myself a mild case of heatstroke cooking dinner. (I recognize the "tired, headachey, listless" aftereffects. I've done this before.) Sigh, I think August in Texas is the time to break down and use the air conditioning no matter how many cats you've got.

It's always the little things I get stuck on. Right now, the name of the file _is_ the name of the architecture. (And unless the file defines CROSS_TARGET, uses it to tell binutils and gcc what architecture to produce code for.) Now the directory does that. Once the two miniconfig files are split out, what's left is mostly a series of variable declarations that get . included to tell the build various things it needs to know...

Ok, I'm calling it "details". Moving on...

August 10, 2008

Spoke to Milton Miller about the linking problem with powerpc on 2.6.26. It turns out the linker script is triggering a bug in binutils 2.17 with gcc 4.1, and the easy fix is to grab arch/powerpc/kernel/ out of 2.6.27-rc2. (The diff actually starts with a big long description of what's actually going wrong, and then #ifdefs to work around it.)

The less easy fix is that there's a binutils 2.18 out, which I can presumably use without upgrading gcc. (Remember, upgrading gcc means I have to figure out a new way to glue the soft-float stuff into libgcc.a, which is a pain.) Except that their ./configure is very brittle, and broken in two ways I've found so far. All of them having to do with its insane autoconf and complicated recursive makefile.

The first failure is that if I force it to always think it's cross compiling (remember, glibc->ulibc, plus I want to use the same code path on every architecture so it behaves as consistently as possible, so I want it to treat _everything_ as if it's cross compiling), then I have to override every utility it uses on the command line. LD=ld AR=ar AS=as and so on. (It autodetects some, like gcc, but for others it wants to add a prefix to the name. Configure it in an unexpected way and the whole brittle edifice comes crashing down.)

The second problem is that I haven't installed the "info" package (an obsolete documentation format from the days of Gopher, but which the FSF invented and won't admit is dead). And the ./configure state detects that I haven't got info. And it records a "/big/long/path/to/missing info" in the config log. Yes, it decides the name of the executable to use is "missing info", and when bfd/doc tries to call it, and dies.

It turns out that "missing" is a shell script binutils contains, which outputs a big warning block about make deciding to update something and maybe you should have specified _bud_ lite used GNU make instead of whatever came with AIX. Except Ubuntu is using gnu make, and it's what's going "boing". Sigh.

The fix: quick patch to comment out a one line test that was returning failure.

Did I mention I hate autoconf?

August 09, 2008

Today's entry is entirely moping, feel free to skip it. I'm working on an rss feed topic filter so you can select an rss feed based on the "span" tags I've been dropping into posts, but that's not ready yet.Need to find a decent place to work from. At home I get mobbed by cats, and it's too hot to want a warm laptop next to me anyway. (We have central air, but 4 indoor cats in a 2 bedroom condo with no place to put the catboxes that isn't near an air intake vent. So the windows are open a lot. Yay ceiling fans.)

Metro is closed now. This is sad. Mojo's is gone, Little city is gone... I think spider house is still there but the last time I visited the couch I sat on had fleas.

The bubble tea place on Guadalupe has wireless but doesn't seem to have air conditioning (or sets it at 85 if they do, indoors in a place where cooking happens and humidity is high), yet does not have free refills on any of its drinks. Schlotzky's also has wireless but and free soda refills, but the food there is "eh" and the wireless is not consistent enough for me to log onto freenode while I'm there.

Epoch's too far to bike until the sun's gone down, so when I'm not on a day schedule I'd have to drive there. With gas at $4/gallon, whether or not I can afford it I'm _disturbed_ by the idea of moving the car unnecessarily. It's not just the gas bill: it's a 13 year old car that's showing its age. If it breaks I have to get a new one, but I don't _want_ another one that runs on gasoline. Biodiesel is nice but just the tiny amounts they're making (diesel is still $5/gallon and most of it's fossil) have driven the price of food up noticeably; that's not likely to scale. No fully electric cars currently seem serious about it. What does that leave, hybrids? Which ones are good? The decent-seeming ones I've seen (which are too new to find a used one, and how well do they age anyway) costs more than the payoff figure on my condo... I don't want to deal with any of that right now, and find it easiest to just avoid the issue altogether and simply not drive when I don't have to.

I need an outlet when I'm out because my laptop battery is down to about half an hour. (Sad, but I use this thing a lot.) There are plenty of places to go with electricity but no internet (the zillion starbucks locations top this list), or places with internet that close at 10pm (I generally get started around 5 and work until 2 or 3 am)...

I should drag the chair from Ikea up into Fade's office and see about using the desk next to her. That room at least has a door that closes...

August 8, 2008

Met Stu at Epoch, we'll probably meet at the Holiday Inn next week and see what kind of deal they're willing to offer.

Saw The Dark Night at the Bob's Bollocks IMAX theatre on MLK. It was ok. WALL-E was better, and I think Iron man was better. (Yeah, Heath Ledger was convincing as the joker but I went to a public high school in New Jersey that had a half dozen people like that. Just without the magic ability to attract an infinite supply of flunkies and never get caught.)

August 7, 2008

Errands. New debit card, catboxes cleaned, brought some stuff in from the cars, tickets to see The Dark Night in Imax ($12/person, and all today's showings and the evening ones for tomorrow were already sold out)...

Did some preliminary location scouting for Austicon. (We might move it back up to October 2009, might not. But up in Michigan, talking to Sal and Garrett and Marcus and John Guest, I found that I really miss SMOFfing.)

I checked in with the renamed Red Lion from Linucon 1 (what's it now, Crown Plaza?), and the "way too small" Holiday Inn at Mopac and 183. At the first Linucon we got somewhere over 300 people. (Penguicon 1.0 had 500, but that's with Terry Pratchett as an anchor guest, plus looting the about 3-year-old corpse of ConTraption for concom and attendee mailing lists. Plus Tracy had chaired ConFusion 19100 in Y2K, and could pull in resources from there too. All that together, plus all the marketing I could do remotely, got us a little over 500 people.)

So 300-500 attendees seems a good range to expect the first year. It's psychologically far better to crowd your space to the gills (jam packed, exciting, everybody wants to be here) than to have your attendees rattling around in too much space and feeling empty and abandoned. (A show floor with 1500 people in it can seem deserted if it's big enough; I've seen this happen.) So get _space_ for 300 people, and be prepared to buy extra con suite materials and attendee baggies at the last minute if more show up.

A good rule of thumb is 1/5 to 1/4 of your attendees get hotel rooms. (Depends on the event, but for SF cons with locals and more than one per room that's the ballpark.) There are two main nights (friday and saturday), so 1/4 of 300 people is 75 rooms, times 2 nights is 150 room nights. (There are a few more on thursday night and a very small number sunday night, but friday and saturday are the big ones. Pretty much any weekend con runs for 2 days straight: from 4pm friday through around 4pm sunday. Scheduling stuff Friday during the day depends on people skipping work for your con, and scheduling Sunday evening cuts into travel arrangements, packing, and cleanup time. A really _nice_ thing to do is negotiate with the hotel for extended checkout time on sunday, but 3pm is about as late as you're likely to get there without them being totally unable to sell the room to someone else for the evening.)

Science Fiction conventions trade off a room block for function space. Instead of paying cash to rent the space, we promise to fill up their hotel rooms and they give us the space for free in exchange. (This is why SF cons are generally at a hotel instead of a convention center; those only take cash. This is _also_ the main reason we can function on a small fraction of the budget of technical conferences, and charge $50 for the weekend instead of several hundred. We're staffed by volunteers, and barter as much as possible to keep the rest of the budget down,)

If our hotel only _had_ 75 rooms we could own the facility, but the Holiday Inn has 194 and the Red Lion has even more. (The Holiday Inn has far more rooms than function space. The Red Lion has three times as much space, but only a few dozen more rooms.) The Red Lion is actually excellently balanced for an SF con of about 1200 people; we'd own the hotel and could pretty much do what we wanted (loud parties at 3am, hall costumes, nerf guns in the halls, skinny dipping in the pool, you name it) without worrying about complaints from other guests.

But with 300 people we'd only be going for about 1/3 of the Red Lion's space this year (both in function space and hotel rooms), so we'd be sharing with somebody. And some groups (evangelical conservatives, straight laced business types, some weddings... it's hard to predict, really) just don't mix well with science fiction conventions. (Note that you never own the _whole_ hotel because you're always sharing with airline people. Most hotels reserve about 10% of their rooms permanently for airlines, as part of a big annual prepaid contracts. This is both for pilots and flight attendants who spend the night away from home, but is also why they can give you a free room if your flight is delayed overnight; it doesn't actually cost them extra to do so. That said, I've never heard of pilots or flight attendants complaining about anything. They'll either sleep through it or join in, especially when alcohol is involved.)

So trading off a room block of 150 nights for function space, we aren't getting the Red Lion's entire function space without forking out a lot of cash. (Linucon 1, which was in the Red Lion and had all their function space, cost me $7000 after everything was settled.) And we aren't expecting enough attendees to make proper use of it if we did.

The main advantage of the Holiday Inn is we can fill up all their function space, and not share with another organized group on that front. We'd still share the upper floors with other hotel guests, but we can have a "quiet floor" (sleeping rooms only, no room parties) separating them from the con. The main disadvantage is no room for growth; above about 500 people we need to move to a bigger hotel, and moving is disruptive to conventions. (Not too bad, but a bit of a pain. Continuity is nice in many small ways, both for the attendees and the convention staff.) A secondary disadvantage is the layout of their space isn't the greatest; they have a ballroom (divisible into thirds) and then two more rooms on another floor, plus an open meeting area in the restaurant. (We could cope with signs. A convention can never have too much signage. But it's not as good as just having a nice compact layout in the first place.)

The main advantage of the Red Lion/Crown Plaza is growth potential. It could handle about 1200 people before we had to look for somewhere bigger. (That's big enough we might just decide to cap attendance instead, but it would be years before it even came up.) Their function space is also well laid out and easily divisible: we could get the 3 longhorn rooms and the 3 rooms on the other side of the hall, and they'd still over half their space (the two big center ballroom sections, and three more rooms on the far side of that) to rent out to other groups.

Crown Plaza's space is also in more demand; the function space is what distinguishes them. Holiday Inn's space was empty when I went to look at it, Red Lion's was 2/3 full (on a Thursday). Red Lion is right up the road from the Airport (183 to 290 to I35, right as you hit the edge of downtown there's the Red Lion) and has what was once (and may still be) the largest ballroom in Austin. Holiday Inn is on the far side of town from the airport, in a fairly residential area (still at a junction of big roads and near the businesses in the Arboretum and that Domain thing, but not quite as centrally located), and the function space seems like a sideline to its main business of overnight stays. When I asked about the last two wekeends in September 2009 and the first three in October, the Crown Plaza wanted to get back to me about availability more than a year in advance. Holiday Inn has all of those still free, their bookings only run about ten months in advance.

This implies we might be able to negotiate a better deal from the Holiday Inn. There are a zillion variables in "what's a good deal", but that's a matter for another day.

At starbucks, banging on FWL. Can't get konversation to stay connected to freenode here, seems like I'd need a keepalive ping of about 45 seconds which is just _rude_.

Found my first Brown Paper Bag bug for the 0.9.0 release: the armv5l distcc directory in the cross compiler needs a link to "as". (Because gcc is calling out to it, that's why.) I built "make" on x86 and x86-64, I don't know if this is an arm thing or because I didn't previously try to build dropbear under mini-native with distcc. Either way, it's easy enough to fix (make the symlink), but I'll need a 0.9.1 release soonish. I think I'll hold off telling the uClibc/busybox/qemu/linux-embedded lists about my new "you can build Linux from scratch with this!" release until 0.9.1, when that may actually be true. (Note to self: try to build Linux from Scratch under each architecture. Yes, with all the crappy gnu packages. It's a great workout.)

Also looking at the 2.6.26 kernel. The UML thing seems to be a known "this fixes gcc 4.3.0 and breaks gcc 4.1.2, and we dunno why" issue. Sigh. Need to stop using UML.

I also need to find a way to set up distccd so it uses different ports for different architectures. I suppose I could break down and add another field to each sources/configs file, but that's darn silly. There should be a way to handle this automatically. (And there is, but distccd isn't giving me the information I need. I need two pieces of info from the daemon: the port it attached to and the PID so I can kill it when the script exits. I'm getting the first by supplying it on the command line, meaning it can't randomly attach to a free port. I'm getting the second by telling it not to daemonize and backgrounding it myself with & so it shows up in the jobs list.

Should I write my own distcc (probably extending the gcc-uClibc wrapper script), or should I try to extend the existing one to the point I'm probably almost rewriting it? Decisions, decisions. I know the big timesink of the second approach would be learning what the existing one does in enough detail my changes don't break it; this is a big enough modification (and what it does is simple enough) that starting over is almost certainly faster. Probably not the right way to go in the "be a good boy and eat your broccoli" sense. Sigh.

August 6, 2008

Tried to run Michael Kerrisk's math_test program under uClibc 0.9.29 so it could be included in the man pages, but it turns out that #include <fenv.h> isn't available under uClibc 0.9.29. Since the uClibc guys seem determined never to have another stable release, I haven't bothered with whatever's in svn. (Or in the nptl fork. Or Peter Mazinger's fork. Or the fork the gentoo guys are using. And I can't even get a copy of the Blackfin one current maintainer Michael Frysinger reportedly maintains as part of his day job.

Huh, then again the uClibc about page still lists Erik Andersen as the maintainer, and his email is still the one at the bottom fo the page...

My talk at OLS spawned enough interest in that I'm being shamed into doing something about the dreadful state of that page...

Also banging on the FWL 0.9.0 release. Added one more patch (to make busybox mdev _shut_up_) and of course this requires a rebuild of all targets...

And it's out. I have released a FWL version that can rebuild itself under itself. Dinner time, I think.

I'm really starting to hate User Mode Linux. Apparently something about the new "./ --fork 3" thing has made UML go all boing, possibly having multiple processes writing out to the same pty. And now I have to re-run the build to get the system-image files to work right. Argh.

August 5, 2008

Home late. Collapsed. Cats are being very clingy. Fade's glued to her iMac, but my laptop holds very little interest for me at the moment. Everything needs to be cleaned.

Step 1: Make tea.

Deal with everything else tomorrow...

August 4, 2008

Checkout time at the hotel came and went, now we're at a McDonald's waiting for the mechanic to call. (They're waiting for the part.)

Obama is giving a speech on Faux News, can't quite hear it over the three old women in the next booth. Eh, it's on youtube. No internet here (choice of Wayport or AT&T branded lack of internet.) Now the speech is over and Faux has various cute blonde women attacking Obama. One of whom is McCain's communications director, according to the writing at the bottom of the screen. Sigh. And now they've cut away because Morgan Freeman has broken his arm. (Really.)

Very conflicted about Obama these days. Voting for retroactive immunity for phone companies that cooperated with warantless wiretaps was a serious betrayal as far as I'm concerned. I'm not sure if he's lost my vote or not, but he's lost my money. Sure he can still win my vote back if he just refrains from doing anything else _that_stupid_, and I'm not voting for McCain no matter how many times he appears on the Daily Show. But I'm not donating a dime to Obama after the immunity thing. That was deeply uncool, and he knew it.

Banging on the rss feed generator, in hoping to eventually get it to parse the span tags I've been sprinkling in over the past few weeks. (I can has topics. With paragraph granularity. Woot.

Step 1 is turning Christian's programming style into something more like mine (if I'm going to be extensively modifying and maintaining the thing...). It's too small to need a class, lots of functions are called only once and could just as easily be inlined, at least one indent used tabs while the rest used spaces... Nice little program in general, though.

August 3, 2008

Breakfast with Sal and the Aegis crew (and Eric and Cathy and Garrett). Then we hit the road back to Austin, and made it as far as northern Kentucky before I discovered that my car has power steering. (Ok, the escort had rack and pinion, the pontiac has a power steering pump that leaks Squinchers and makes a growling noise when offended. Now I know.) So we're at a hotel until morning.

I'm tired. Sword camp was marvelous. FWL release later this week, I'm just not with it today.

I have 50 megabytes of accumulated email. Eek.

Neither of us are inclined to leave the hotel room. (Fade has internet. She says she wants to hug it.)

August 2, 2008


It is the day after sword campp, and I am in pain. I finally completed Basic, after three years of meaning to. (In 2006, sword camp occurred while we were moving from place to place in Pittsburgh, so Fade went but I stayed behind to pack stuff and haul boxes. In 2007, we were moving back to Austin and neither of us got to go, which is why Fade went through Basic again this year since she not only missed a year of training, but didn't have anybody to practice with in between.)

We're hanging out on the Aegis Compound for a day to recover, and then hit the road Monday morning. (We're welcome to stay in an "the only food left is bagels and the camp showers are out of propane" sort of way. The tent we're in was still up from the last event anyway. I'm all for it if it means I don't have to move much right now. Ow.)

Poking at the next Firmware Linux release. I think I'm holding off on the 2.6.26 kernel for now; it seems kind of craptacular. The build produces obvious warnings even on x86, when I was showing Tim Bird how to fire up a 2.6.26 kernel he'd built under qemu it encountered numerous DMA timeout errors (again on x86 with an IDE hard drive), the powerpc patch no longer applying is understandable (same for the perl removal patch) but the 3.2 gigabyte kernel strip produced is just _weird_, and I really shouldn't need to apply a patch to UML just to get it to _boot_... I suppose I'll machette through it all after the release, and hope the 2.6.26 dot-releases can incorporate some patches to get the obvious breakage fixed.

That said, I'm accumulating a largeish number of patches needed for 2.6.26 that don't work with 2.6.25. Currently the .25 stuff works and has lots of build infrastructure changes unrelated to the kernel, and the easiest thing for me to do is push out a release of the .25 stuff so I can break everything by checking in the .26 stuff, and debug it at my leisure.

Speaking of .26 stuff, I've missed another merge window thanks to OLS and sword camp, and Grelber being down between the two. Sigh. At least I have an updated perl removal patch for the linux-embedded list to ignore when I get back to civilization, defined as "some place that has internet".

Sal, the head of Aegis, used to run a software business and is quite clueful, but the compound is over a mile away from the closest town. Running a land line would cost several thousand dollars and involve negotiating right of way with a couple dozen land owners (apparently even along the roads). Yagi antennas to bridge with wireless need a line of sight, which is great if they want to try to get internet from a national park but heading uphill towards civilization (or at least Pickney) involves two hills and a _lot_ of trees. The current plan is to try cellular internet, but unfortunately this is Michigan so even that's nontrivial...)

July 29, 2008

Sword camp. Day four. Ow.

July 28, 2008

Day three of sword camp. No internet access here, not a lot of time to use my laptop. Fun campfires every night, only managed to land a flaming log on my foot once so far and the burn was smaller than you'd think. Stiff. Sore. Yesterday they woke us up by playing fight music on the PA system really loud (and the fight music includes several varieties of dance music, hip-hop, the theme from the movie "Mortal Combat", etc...) Today they woke us up with bagpipes, which didn't work in my case because I had no incentive to move _towards_ the bagpipes...

Got to poke at the 2.6.26 build a bit last night. The sparc and sh4 builds have wandered into the "failed" category due an undefined reference to sched_getaffinity() in busybox "taskset" (I can just yank that). Powerpc broke because even though I updated the patch to apply to 2.6.26 the kernel build is erroring with 'ppc_ide_md' undeclared. Need to track down what that changed to, but right now I haven't got time. I should be stretching...

In the evening, poking at powerpc. Removing the ppc_ide_md stuff (just to get it to build, IDE won't work until I figure out how to fix it but I have no internet right now), then the build did a powerpc-strip to produce the zImage file, and it took a full minute. The _reason_ it did this was it output a 3.2 gigabyte file. This is not a good thing.

I'm told that Eric's sister rebooted Grelber. I can't get online here so I have to take his word for it, but hopefully my website's back up and email is accumulating for me.

July 25, 2008

Grelber still down.

As long as I've got a gap before I can make a release anyway, upgraded to 2.6.26. The -noperl patch broke, of course, but I've been meaning to redo it anyway. Did so in the gap after the cluster migration panel. (It looks like this might finally have addressed most of this, although it's hard to tell because I missed the first half hour and he wrapped up the presentation right as I was coming in.

The powerpc-qemu patch from Milton Miller isn't applying anymore either, but it looks like a fairly simple fixup. I live in dread of that patch breaking, although I attended a nice device tree BOF yesterday where Grant Likely walked me through some of what I need to know to understand that area a bit better and maybe get an _unpatched_ linux kernel to boot under qemu. Maybe. Still supplying my own boot rom and using something other than open hackware to boot QEMU with.

Speaking of other boot thingies, the uboot BOF was interesting. People have gotten uboot for mips to boot under qemu, but not PowerPC yet...

In general the BOFs have been better than the panels this year. Not because the BOFs are better than average, but because the panels seem weak. There have been 2 consecutive panel slots where I wasn't particularly interested in any of the panel options, more than once already. (The hall track is still good, but Linus isn't here anymore, Alan Cox isn't here, Andrew Morton, Thomas Gliexner, Al Viro, Christoph Hellwig, Matt Mackall... I think CELF had more people I recognized, and most the people I _do_ recognize here were at CELF earlier this year anyway.

Ugh, 2.6.26 is totally horked. User Mode Linux doesn't work at all, git bisect tracked it down to this commit which seems completely innocuous, but that's what git bsect pointed to. Huh. (And yes, reverting that fixes it. Weird.)

Got to meet Mark Shuttleworth after his talk. Cool guy. (He still couldn't pick me out of a police lineup, but I got to ask him some questions, mostly about Linux on the desktop and the 64 bit transition and such. In an alternate universe I'm sure I invited him to Penguicon, but in this one that's not my job anymore.)

At the CELF BOF. I need to go grab Fade and hit the road to go to Michigan. I was goign to look uo the driving directions, but the Westin (where the BOF is being held) doesn't seem to have working internet access. Sigh...

July 24, 2008

Grelber is down again. It was down last night. It goes down a lot. And right now I'm in canada where my cell phone doesn't work, at the Rideau Centre where the internet doesn't work for me either...

Yay internet working. Hugh... (um, Hugh. The Power PC guy. Darn it, blanking on his last name.) helped me get it to work. It requires wpa_supplicant, which seems somewhat overcomplicated but works (as long as I re-run dhclient every 2 minutes). Alas, Grelber still down.

It's evening, and I'm totally fried. Had my talk on documentation this morning, and they gave me a much bigger room than I expected. Managed to be only mildly incoherent and only leave out about 80% of the material I'd hoped to cover. (The paper left out around 50%, so that's not as bad as it sounds. Summarizing 7 months of full time work into a 45 minute talk and a dozen page paper is _going_ to leave a lot out, no matter what you do...)

The compiler BOF went pretty well too. I spent more of it talking than I'd meant to, but people kept asking me questions and expecting me to be some kind of authority on the subject. Dunno why. Michael Opendacker of Free Electrons taped said BOF. Might get a URL to that when Grelber goes back online. (I'm told Eric's sister may be able to go over and reboot it on Saturday. Wheee. If you can read this, it happened.)

Got lost for 2 hours wandering home, of course. It turns out the hostel is 2 blocks away from the Ricoh center thingy where OLS occurs, but 2 blocks in _which_direction_ was a bit unclear. Spiraling out from the starting point doesn't work well when there's a river involved. Looking for things I recognize isn't very helpful when 2 years ago I was at a hotel in the opposite direction from the hostel. Stopping to ask directions from someone so drunk he could barely stand didn't really speed matters along either. Eventually got directions from a security guard who suggested getting on a bus "to get back downtown" might be a good idea. (I'm generally in favor of long walks, but in a city I don't know while it's raining in a country where my cell phone doesn't work, less so.)

I fall over now.

July 23, 2008

July 23, 2008

Yay OLS. Long day, very tired. Got to see lots of people and attend panels. Missed the embedded Linux BOF because I was hanging out with David Mandala and a nice guy named Art Cannon at a bar in the mall attached to the convention center thingy.

Back at the hostel. I need to work on my slides but I'm too fried, I'll set my laptop to go off at 7am and do them in the morning...

July 22, 2008

Arrived in Ottawa. Very tired.

Software suspend does something funky to inodes (or perhaps dentries) that are busy during the suspend, which tends to happen when I suspend while compiling something. On resume, any attempt to mess with that file causes the program to segfault, and dmesg shows a non-fatal kernel panic with register dump and everything. And trying to delete the horked file counts as messing with it. The only cure is to reboot. Sigh. (On the brighth side, the _rest_ of the filesystem seems ok. I think.) Yes, this is the same problem I encountered back in January, it's just happened enough times since then to be somewhat predictable now. Hopefully, the upgrade to 8.04 will make it go away, if I ever get around to doing that.

It also means I have to restart my forkbomb build from scratch, so that's another 5 hours before I can do a FWL release. Might leave it running overnight and try for a release tomorrow at OLS...

After weeding out the spam and mailing list posts, I have about 2 dozen actually important looking emails accumulated since I left Austin. Probably about 3 hours of replying, altogether. I don't currently have 3 hours of awake left, so I think I'm going to just punt on the whole pile until morning...

July 20, 2008

Mercurial 1.0 is producing corrupted tarballs. The gnu tar command complains (and eventually exits with an error), but makes it through skipping just the one bad header. The busybox one aborts halfway through. This is why I've spent days not being able to get the thing to rebuild under itself. Sigh.

It also means I can't cut a release until I get mercurial to emit a non-corrupted tarball. (All the _files_ are there, and I could tar them up myself, but the release tarball won't match the tagged version...)

Got a fix from Denys Vlasenko, it turns out mercurial is setting the "length" field nonzero for symlink entries. It souldn't be doing that, but it's easy enough to work around.

Ok, FWL revision 373 is probably what will become the 0.5.0 release, but it takes several hours to build all the targets and I have to hit the road for OLS now. Maybe I'll cut a release from Ottawa...

July 19, 2008

I take it back. It was not a nice mammoth.

So, preparing to go to OLS and then sword camp. Possibly leaving this evening, depends whether we want to make the tuesday mini-summits or not. The virtualization mini-summit looks vaguely interesting, but the only really interesting presentation in that is the mini-VM one (extending KVM towards embedded systems) from 2-3pm. Not quite enough to worry about arriving a whole day early for, and there might be some weird extra registration requirement like they're doing for tutorials this year anyway. *shrug*

I still need to get a Nail board HOWTO to Andrew Morton. He doesn't seem to be speaking at OLS this year, he might not actually be attending, but it's a decent excuse to get something done I should have finished months ago...

Somebody who is scheduled to present is Ubuntu founder and space tourist Mark Shuttleworth, specifically delivering the Friday night keynote. My ex-boss Dave Mandala (who's known Shuttleworth since before he was rich and famous) will also be there, so there's an unlikely but technically nonzero chance Dave might take me out to dinner with him even if I didn't try to say hi. (That's how I met Thomas Gleixner at a previous OLS, Dave knows all the fun people...) Except that I have to leave Friday to go to sword camp (missing saturday entirely), because the two overlap and Google says it's an 8 hour drive. Might be able to stay for the keynote, but not after. Oh well.

Naturally, my first response to noticing Shuttleworth's keynote was "perfect convention guest". There's never any guarantee someone would say yes, but it's the perfect opportunity to invite him, and I think he'd probably really enjoy being a guest of honor at a combination SF convention and Linux expo. I'd have to find out his favorite flavor of LN2 ice cream and who his favorite SF authors are (and whether they're good GoH material too), but that's not to hard to find out. (Among other things, I could just ask...)

Except I'm no longer involved with Penguicon thanks to this year's con chair. (I'm not even attending his year.) Linucon ended when I moved to Pittsburgh, and the new one Stu and I are starting up got bumped back to 2010. So currently, I have no context in which to SMOF. Strange feeling, that. Oh well.

I think the most boggle-worthy OLS panel this year is probably SyngergyFS: A Stackable File System Creating Synergies Between Heterogeneous Storage Devices. In the speaker's defense, I suspect English is not his first language, but still. Nothing aimed at "Creating Synergies" belongs anywhere near the Linux VFS layer, nor should "Quality" initiatives or any other pointy-haired-boss speak straight out of Dilbert.

Oddly for something that pointy-haired, there's no mention of Xen. But the winner of this year's "giving oneself a hernia straining to emit an acronym" award goes to VESPER, which _does_ mention Xen. Again, english not a first language I'd guess. (Can we just let Xen die already? Even Red Hat switched to KVM, which is partially based on qemu. Xen is simultaneously more complicated and less capable, and if you really need to run emulated Windows on a system without the special memory management bits KVM depends on there's always kqemu. Even VMWare is finally rolling to a stop.)

It's somehow reassuring that new horizons in memory management still comes down to competing approaches from Rik van Riel and Andrea Arcangeli. (Not that I could make a saturday panel anyway, or would go to that instead of building a multimedia embedded linux system from scratch. But there's probably a paper in the proceedings...)

July 18, 2008

Went to Epoch in the wee hours of the morning, planning to tackle my svn to hg converter so I could bang on the uClibc bug. Found a fix for it waiting in my email, thanks to Joe Soroka. Tested it and it works. (Yay!)

Found that Roberto Foglietta posted a bunch of messages in the toybox list going back to Tuesday. Tried to catch up a bit there.

I should put out a FWL release tomorrowish...

Also transplanted a gig of ram from the 64 bit desktop that doesn't work into the 32 bit system that does, so I have something I can just leave running when I go out to build all architectures. It's noticeably slower than my laptop, but I feel better about leaving it going overnight.

July 17, 2008

Another day offline. This week I've gotten the car poked at, gone grocery shopping, made a hotel reservation in Ottawa (at the hostel from last year), scheduled the Lethal Chemicals Man to come dissuade the ants so the cat food dishes will be safe while we're gone, confirmed Mark can feed said kiggies, assembled more bookshelves and unpacked more boxes onto them... Still haven't gotten the laundry out of the car.

But mostly, I've spent this week reading Tamora Pierce books. I have now run _out_ of Tamora Pierce books. Bloodhound apparently got bumped to 2009, and there's no sequel to Will of the Empress yet either...

Now re-reading Roger Ebert's "Your Movie Sucks", which is more a bathroom book than anything else...

July 16, 2008

I need to prepare for OLS, so naturally my only use of my computer today was reading the Casey and Andy archives and playing Desktop Tower Defense. (There are youtube videos of people playing the challenge modes.)

I should really upgrade Ubuntu, the flash plugin keeps leaking some kind of resource until flash stops showing up in web pages, and then I have to do "killall nspluginviewer; killall npviewer.bin" in another window. Nope, killing just one isn't always enough, and yes individual pages can have enough flash in 'em to drive the plugin to exhaustion so you sometimes have to do it after _every_page_. Yes, this is the kind of thing desktop Linux users need to know, which is why we're so rare.

July 15, 2008

I remember now why I don't hang out at Jimmy John's much, even though they're open until 3am and have a table next to an outlet. That table is under a very loud speaker, which is sometimes playing absolute crap. (In this case, the C is silent.) Somebody is literally singing about vandalizing mailboxes, for a definition of "singing" that involves monotone chant in front of a drum machine. About every third word is unprintable by newspaper standards. (I don't get it: "I'm bad, let me prove it by singing! Fear my three note range!")

The really _sad_ part is that all three people working behind the counter are "lilly-white". Listening to a recording of somebody screaming about killing whitey. Voluntarily. (With police whistles and vinyl record scratching, neither of which have existed _outside_ of rap for many years.)

Reading "Terrier" by Tamora Pierce, not doing any real programming today.

July 14, 2008

Today's way to crash Konqueror is to tell a tab to load a new page, have the "some piece of javascript is taking too long and we think the page is frozen" window pop up from the old window before it can connect to the new site, have the new page load behind the pop-up, and then dismiss the pop up window telling it _not_ to kill the javascript. Instant segfault.

Sigh, lost a ton of tabs. (Most recently, I was watching a marvelous bbc show (from 2003) called "Posh Nosh", which was hilarious. Top Gear turns out to be surprisingly entertaining too, David Tenant's two appearances on the Friday Night Project... He's such a remarkably good sport.) I also had zero punctuation open, which is probablly the best _actual_ use of multimedia to convey information I've encountered so far. (The audio and video tracks reinforce each other, neither would be complete without the other. Most things don't do that very well. Plus I'm a sucker for well done british sarcastic rage.)

July 13, 2008

Poking around with mini-native-i686 in a chroot, trying to figure out the uClibc static build problem. Decided to use the RECORD_COMMANDS wrapper to snapshot the commands actually being run (to find the ./configure step that's dying). Found 3 bugs in the wrapper so far, and checked 'em in.

Great. Here's the problem:

main(){return 0;}

That program, statically linked against uClibc, segfaults. If you dynamically link it, it works. If you add a function call before the return (such as a printf()), it works.

I have two or three guesses about what might be going wrong, but somehow I foresee single stepping through the assembly to see what it's doing, and that sucks.

Ah yes, this issue. And the recipe from there still mostly works, although "show r" doesn't seem to be recognized. Ah, it's "info r". (Fixed the old blog entry so I have the right recipe recorded somewhere.)

Ok, so it starts in _start, I step through all that and it matches, and then it calls __uClibc_main which is long and complicated. And it's dying somewhere in __uClibc_main, I _think_ near the "Pull stuff from the ELF header when possible" comment. There's a loop right after that which looks promising. It seems to be before the call to __uClibc_init (which got inlined)...

Ok, back up and try a more comfortable debugging approach. Rebuild uClibc (based on what is doing) using the source in build/sources (which is correctly extracted and patched, and won't get rebuild until we re-reun setupfor), reinstall it, and build "../../cross-compiler-i686/bin/i686-gcc -static test.c" to make sure problem is reproducing there. Yup. Ok, now edit libc/misc/internals/__uClibc_main.c and insert write(2,"narf\n",5) just before where I think it's crashing, rebuilt test.c, run a.out, and... It says "narf", then crashes.

This is a debugging approach I can get results with: stick printfs into the source code (or in this case write() because it boils down to a system call and is less likely to screw up early init). I know gdb has its adherents, but it's a tool of last resort around here...

The call to _stdio_init() is failing...? (It's making it to __uClibc_init() almost to the end of that, but the last if() statement with the call to _stdio_init() is unhappy. It's not making it _into_ _stdio_init(). If I take "attribute_hidden" off it at least doesn't segfault there, but it still segfaults somewhere after the return and it's not calling the contents of _stdio_init().


July 12, 2008

Went to see Hellboy. It was very well done in a lot of ways; excellent acting and excellent effects. It managed to include a Barry Manilow song in a _good_ way, which is an Epic Feat right there. But the writing triggered more than one of my pet peeves.

Here's a paragraph break so you can stop reading. (No programming today, just movie spoilers.)

I despise the "disposable girlfriend" trope, am not a fan of the "heroic suicide", and am annoyed at any writer who sets up a Bad Thing early and obviously in the movie and then DOESN'T FIX IT, instead letting it hang over the story for most of the movie and finally playing through to a predictably tragic conclusion. (She was as Obviously Doomed as King Redshirt from the stereo nosebleeds in the throne room; going on to set up a love story between her and one of the protagonists making her _into_ the disposable girlfriend was just torturing the audience.)

I kept hoping they'd subvert such an obvious setup, the way the first movie did with its iteration of the "Disposable Girlfriend" thing, but no. Having a bad guy and a good guy share wounds so the good guy could commit suicide to take out the bad guy at the climax was the plot of the movie "Dragonheart", which despite being voiced by Sean Connery is really not worth copying from. This was a much better movie than that.

That's what really annoyed me, the rest of the movie was substantially better than that. It was both wasted potential and made this particular plot thread look unworthy in comparison. Sure it was a summer action popcorn blockbuster, making it a bit predictable in places, but going "I know, let's ditch the happy ending to break the mold a bit, and yet telegraph this move for an hour and a half" is not an improvement.

There are a dozen other ways it could have ended. If Abe Sapien caught his girlfriend's arm as she tried to stab herself and instead suggested that Hellboy use the crown to order the golden army to imprison her brother while they left, taking the crown with them. (They even commented he was the brains of the outfit earlier, but gave him no real problem to _solve_ during the entire movie. Guessing where a large lump of metal is hidden doesn't count when you have a single room to search, 20 agents to do it with, and a time limit measured in hours. And possibly metal detectors.) Or Liz could have done it, since all the guys were blind and her contribution to the final fight scene was to stand there instead of her usual job of being the cavalry (or at least the team's tactical nuke). Or the german dead guy could have done something, giving him a reason to have actually come along at all and making him a useful part of the team instead of some tangential sidekick along for the ride. (Ok, he fights well, but that's what Red's for, and usually Liz.)

Alas, expressing my disappointment in the movie upset Fade, leading to an argument. Didn't feel like programming afterwards.

July 11, 2008

At the laundromat. Really annoyed by money falling out of my pocket. (For some reason, over the past year, cash does not stay in the pockets of my shorts anymore. I've probably lost $200 that way. I see why people have money clips now.)

Some fat guy is holding forth about how the government's a secret cabal. "It's obvious, that's what's happened. The guy was on the internet. That's totally suspicious. It's a cabalic action of a dark force that's kinda so much of the guy who tried to kill treaty oaks, but..." These are direct quotes. "Skull and bones, or even darker action... That was a ritualistic sacrifice, metaphorically, it's like killing little babies...") Five minutes ago he transitioned seamlessly from the bee crisis (them all dying off, and they pollinate all our food, and how much he respects Jerry Seinfeld for tackling this issue head on in The Bee Movie.) Now he's talking about alternative energy ("unlimited hydrogen") technology existing but being suppressed... now J.P. Morgan is the largest bank and they "killed Tesla"... Out of context quote "It's the watermelon that does it"...

I'm having a hard time keeping a straight face while typing this.

I honestly couldn't make this stuff up. I know sturgeon's law apparently applies everywhere, but wow...

Digging through old computers, figuring out which ones to goodwill, and hoping to find a server I can set up to run overnight builds on.

The most meorable was the one that made a very loud _bang_ noise when I turned it on, and a distinct burned smell. Turned it off again despite the fact it seemed to be booting up just fine. (I think it was just enough dust had collected in the power supply to conduct electricity, and it burned off almost immediately, but still...)

I found the first 64 bit machine I got, an AMD Sempron that that was slow and unstable. No interesting data on it, but several interesting parts (2 gigs fairly fast memory, 250 meg sata hard drive, cd burner). Can't use that as a server because it panics if you try to do anything CPU-intensive with it, probably something to do with the CPU fan but I could never jiggle it to work right. It's also VERY SLOW.

I found another Sempron (a 32 bit one, yeah AMD switched from 32 to 64 bit without renaming the processor line) that was the desktop system I limped along with between my previous (Pentium M) laptop and this one. I'm tempted to set it up as a server and run overnight builds on it, but it only has 384 megs of ram and 70 gigs of hard drive space. (Maybe I can transplant the 2 gigs from the panicky 64 bit system into this one, but I'm not sure it's compatible. Worth a try. Can't move the hard drive over, SATA vs IDE. And I never _could_ stabilize the 64 bit motherboard so it didn't panic after a few hours...)

The ironic part is that the two Semprons are the exact same MHZ and have the same amount of L2 cache (256k), but the 32 bit one runs twice the speed off the 64 bit one. Making a 64 bit processor with only 256k of cache brings back memories of the original cacheless celeron...

So now that the system's building under itself, and I've got the cross compiler building static, I want to build every cross compiler target from every host target. This is harder than it sounds. Just tried it on arm host and not _one_ of the targets built to completion. (Trying i686 now to see if it's something wrong with the environment, or just nobody ever having tested arm as a host...)

Ok, i686 went "boing" the same way. But it built a few days ago. What's going on? Hmmm... (Ah, one thing that's wrong is that distccd isn't getting killed when the script exits. Why is that?) Right, kill the old distccd by hand and re-run to make sure the client and server match, and then inside qemu rerun ./ with CPUS=1 so the error message is actually at the end of the build...

And it reproduces. The problem here is that BUILD_STATIC is producing an unusable binutils, the output of which segfaults immedately. The dynamic build doesn't have that problem. Great.

Ok, killall distccd to eliminate that as a variable, and rerun the build... Which confirms that's not the problem. Single processor, fully native build, and it dies trying to ./configure gcc using the binutils it just built. Why is that?

July 10, 2008

Reading Cory Doctrow's "Little Brother" (via the free creative commons PDF I'd link to if this whataburger had internet access). I like the world "exfiltrate". :)

Teaching the cross compiler to build static binaries if I tell it to. (I've meant to do this for a while, I'm just finally getting around to it.) That should make them a bit more portable, and it means if I rebuild the system under itself (linked against uClibc), I can distribute those versions as the release tarballs for the cross compiler.

The next release may have 100 or so cross compiler tarballs, because I hope to build each target on each host. Currently that's 8 squared (64), but if I get sparc working that becomes 9 squared (81). If I can beat sh4 into working (it builds, but qemu hasn't got a target board that'll run it), or m68k (darn gcc internal compiler error, but maybe I can work arond that?), or armv4b or armv5l-eabi... Anyway, one more and I'd have an even 100.

This isn't necessarily _useful_, but it's cool. :)

I've been trying for two hours to make the binutils build static. (No, I can't look it up, I don't have internet access at this whataburger and the LFS version I cached is new enough that the /tools section isn't tatic anymore.)

I want to find whoever created the stupidly overcomplicated binutls and beat them about the head and shoulders until the apologize. I've set LDFLAGS, BOOT_LDFLAGS, LDFLAGS_FOR_TARGET, LDADD, and CFLAGS equal to "-static". (From reading the Makefiles, the build uses all of those at various points.) I've set them as environment variables, and as make commandline overrides. I modified the top level makefile so that instead of stupidly blanking LDFLAGS it sets it to "-static". And it's STILL creating dynamic executables.

This is why I hate all software ever written by the FSF: it's smug bloated crap written by people who assume everyone knows (or is interested in) what they think, because it's the universal One True Way. (And this whole "libiberty" thing stopped being funny in 1992.) They're a political organization, not programmers.

Time to pull out the chainsaw...

Ok, the flag "-O2" is being passed down to cxxfilt (the last executable built in the build, easiest one to scroll up to). Grepping the top level makefile, five different variables are set to include "-O2": CFLAGS_FOR_BUILD, BOOT_CFLAGS, CFLAGS, CXXFLAGS, and CFLAGS_FOR_TARGET. (Yes, this repetition is just sad. They don't know what they're doing, so they have to repeat themselves. Moving on...) Set each one to a different -O number starting at 3 (everything above -O3 is equivalent to -O3 anyway, so it's an easy way to insert information without breaking the build). And... The build broke.

*Blink* *blink*

"Warnings being treated as errors" (where did that come from?), and "size" is used uninitialized in binutils/wrstabs.c. What the...? Yes, -Werror is being passed in (I didn't touch it, apparently it was already doing that), and the different optimization level throws a warning that breaks the build. Right, so what I need to do is use _lower_ levels, -O1, -O, and -Os. And -O -O should work too. (I want to change -O2 because I want to prove it _is_ one of these, and not somewhere else I've missed.)

P.S. Don't ask me why it's building cxxfilt when I told it "--enable-languages=c" and did _not_ include C++. I believe the british would say "Gnu software is totally pants".

Ok, when I took -j3 out of the build and just did a single non-parallel build, the last executable built isn't cxxfilt anymore, it's "ld-new" (whatever that is). Think I'll stick with looking at cxxfilt, since I'm fairly certain that winds up in the final system and I haven't got a _clue_ what ld-new is).

Ok, cxxfilt.c is being compiled with "-O -O -O", and on the next line being linked with -O -O -O, and that's... CFLAGS. Alright, what happens if I stick -static in CFLAGS?

Well, the build didn't break. It created a 2.4 megabyte binutils/cxxfilt file. And according to ldd, it's _still_ linked against the dynamic How?

Ok, the command line that's creating cxxfilt looks like:

/bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -static -o cxxfilt cxxfilt.o bucomm.o version.o filemode.o ../bfd/ ../libiberty/libiberty.a

Yes, -static is getting passed in. What the heck is...

Sigh. Ok, this command line works to create a static cxxfilt:

gcc -W -g -O2 -static -o cxxfilt cxxfilt.o bucomm.o version.o filemode.o ../bfd/libbfd.a ../libiberty/libiberty.a

The difference? Yanking libtool. Once again, the Gnu project's stupid pointless shell script that should be a NOP on ELF is screwing up something simple. It fails at being a NOP. What the heck is wrong with these people? (And I'm not going to try to debug it because it's over 5000 lines long. It shouldn't _be_ there, but it's built into the binutils source tarball.)

HA! Guess what? Both gcc and ld recognize both "-static" and "--static". On a hunch, I tried the one with two dashes, and it worked. Four hours of debugging, and I wind up fixing it by playing a hunch totally unrelated to all the source I've read and all the tests I've done.

At this point, I want to swear at the FSF for being MIND_BOGGLINGLY_STUPID. None of this was necessary, it was due to a bug in libtool, something that SHOULD NOT EXIST ON LINUX BECAUSE IT DOES NOTHING HERE. They wrapped so many layers of redundant crud on top of each other that you can't figure out what it's doing without a major archaeological expedition, and every one of those layers is brittle and easily broken.

As soon as I find decent replacements for all off their software, I want it off my computer. (I should check llvm and see what kind of progress it's making.) THESE PEOPLE FAIL AT SOFTWARE DEVELOPMENT.


Ok, so that's binutils building static, now to get gcc to do it. Try setting CFLAGS="-O2 --static" as a make command line override and... it didn't work. Of course. The way to make binutils build static does not work for gcc. Never do anything the same thing twice, every single action is a special case. Sigh.

Poring through the binutils code for _four_hours_ didn't really produce much in the way of useful results, so I'm just going to start _guessing_. (And trying to remember how Linux From Scratch 3.0 used to do this, years ago...) Set LDFLAGS=--static as an environment variable... Nope. Set it as a make command line override... Ha! That worked.

I am _loving_ little brother. (Ok, some of the early chapters were hard to get throguh, but "Operation False Positive" is just such a marvelous name...)

[Much later...]

"Here in Germany, we have much experience with what happens with a government that gets out of control." Marvelous line, delivered totally dry...

Good grief, when did it become 8am?

Now 8:43, and I _really_ need to go home. And use the bathroom. But... Book! (Right, I can read book at home, it's only a 20 minute bike ride, suspending laptop now...)

I have now finished reading Little Brother. It's noon. I've been on a night schedule. I fall over now.

July 9, 2008

Went to the pool for another 4am swim, but it's kind of filthy. (Yesterday I noticed it didn't smell that great and didn't put my head underwater. Today it's _cloudy_. I think the power failure a few days ago knocked the pump and filter offline. Hope they fix it soon...)

My laptop's learned a new trick: fail to come back from software suspend with a black screen, not even responding to the power button (which I made re-suspend it when it comes back from software suspend with the keyboard and mouse paralyzed) unless I hold it down for the 10 seconds or so that makes the hardware yank the power out from under it.

Oh yeah, "ready for the desktop". Right.

The Daily Show broke its website again. (They seem to have a full time staff of MCSEs devoted to finding new ways to screw up fairly simple tasks.) They used to use a flash applet to navigate to old videos, which was stupid but at least worked. A month or two back they put all the old episodes of the daily show online (back to John Stewart's first appearance). Now the same navigation page lost the flash applet, and instead they show videos by page going back 25 pages, which just makes it to the end of October. So I _was_ going back to 1999, now I can go back 8 months. Big improvement, guys.

Ran memtest86 for a while after the dozenth crash of the flash plugin (considering the two resume failures when it didn't _used_ to do that, thought it was worth a check). Didn't find anything. Bit of a relief, after spending almost $1000 on medical stuff this week, having to buy a new laptop would make me nervous about burn rate. I'm living off my savings until I get the consulting business started, and I need to get FWL 1.0 out before I expect anybody to want to pay me to support or extend it....

I have a fedex tracking thingy for my 6 cases of Splenda mini-packs. They were last seen in Pennsylvania.

Checking /proc/cpuinfo for the string "qemu" is not a reliable indicator; armv4l doesn't contain it. So I need to have multiple names for the script, which means I want to check a symlink into Mercurial. It didn't used to be able to do that, but I'm told that was one of the things Sun paid Matt to implement, and it was a criteria for the 1.0 release...

The internet remains the internet. Today's installment: The Ukelele Orchestra of Great Britain performing "Smells like Teen Spirit". (British people, performing in suits and ties, playing grunge rock on ukeleles.)

Not nearly as impressive as Jake Shimabukuro's Ukelele rendition of While my Guitar Gently Weeps, but let's face it: not much is. (I'm particularly amused by the way the mpeg encoder just breaks down trying to follow his hands moving. The frame rate simply isn't fast enough...)

Now that I've updated to the current busybox, the only package left that can't do a parallel build is uClibc. (The current stable release intermittently dies during the build if you give it -j 2 or higher.)

July 8, 2008

Went skinny dipping in the pool at 4am, then biked to Epoch for more exercise. (Obviously got dressed between those. Still damp even after the bike ride, despite toweling off fairly thoroughly. when did Austin get so darn humid?) Epoch's internet is down, and the note at the counter A) says it'll be down for a couple of days, B) blames file sharing. How...? (Did they tick off their ISP? This _is_ a coffee shop, I'd think all sorts of weird virus infected laptops come in spewing spam. Ok, currently every laptop I can see in this room other than mine is a macintosh, but still...) Luckily, this being Austin, there's another random wireless access point in a neighboring building somewhere... :)

I'm trying to figure out which is more disgusting, teaching the uClibc header rebuild (for readelf and ldd) to look in /tools/include if /usr/include doesn't exist, or making a /usr symlink to /tools from just for that. (I already checked in the latter, but I'm not happy with it.)

The fundamental problem is hardwiring in the /usr/include path. The uClibc build wants to know where the kernel headers are, and I know where I installed the _target_ kernel headers, but this is the _host_ kernel headers. Yes, /usr/include is a standard location, but our toolchain is relocatable and in the system I'm building it's at a nonstandard location (to conform to what Linux From Scratch does)... I'm relying on a standard in one place and violating it in another, and that's just _icky_.

On a semi-unrelated note, it occurs to me that I can have every target rebuilt itself and test the result via _chroot_, without having the packaging step working. I need to bang up a new variant for this, but that's not too hard. I can probably even use "uname -m" to autodetect the host, and feed it into qemu via the script...

Splitting up so there's a separate turns out to have too many sequencing issues. (Can't mount /dev/hdb until mdev -s gets run, but does an exec so it can't return to to Pretty much I need one script that _detects_ whether it's running under qemu or not. I could grep /proc/cpuinfo to see if it contains the (case insensitive) string "qemu", although I'm not sure if that's going to work for all targets. I could also give the script two different names hard/symlinked together and do a test on $0...

July 7, 2008

Yay doctor's appointment. I'm not happy about spending $700 on a cat scan (although it was a new experience to see the inside of my own head), but I _am_ happy that the doctor confirmed I have a chronic sinus infection (showing me the pictures, I hadn't known I had sinuses near my spine but those were the ones full of grey on one side and black on the other), and prescribed me three weeks of such a high dose of antibiotics that the pharmacist A) had to tell me to take two pills each day rather than just one because they didn't have 500 miligrams in one pill, even the 250 milligram ones are pretty darn big), B) only had 13 days worth on hand rather than the full 21, so I have to come back in a few days once she's ordered more. (Plus a steroid nasal spray despite my nose being fine, but apparently it helps anyway).

This is somewhere between the double-barreled shotgun approach and "I say we take off and nuke the entire site from orbit, only way to be sure". I've been pretty much guaranteed it'll kill all the symbiotic bacteria in my digestive tract so I'll need to eat lots of yogurt. They also warned me about a metallic taste, which I can confirm but am happy to put up with for a few weeks.

I'm already feeling better. My hands have gone back to normal already, and typing is no longer a chore. I think the sinus infection was starting to trigger auto-immune responses. I've had it ever since Pittsburgh, where I thought being miserable was just part of pittsburgh and that I was probably allergic to something making my lungs congested so much. After almost two years, my immune system was getting frustrated and a little trigger happy. (Several other weird random symptoms may be attributable to having a chronic infection right in the middle of my skull, near my spine and brain stem. Bad thing. Very happy to finally get rid of that...)

Banging on the "building FWL under itself" thing some more, this time using the i686 mini-native directory as a chroot, rather than messing with qemu. (It's faster, and once I get it working under i686 the rest should be easier. Plus I don't have to preallocate space in a block device, and I can just copy files into the chroot directory from another window. (Yeah, if I set up a network share on an nfs or smb server I could do that with qemu through the virtual network, but I haven't done that yet...))

Ah! Hmmm... The breakage is that after I build uClibc, I need to build a host version of uClibc's readelf and ldd for the cross compiler toolchain. So I do a make distclean, make allnoconfig, and make headers in the uClibc source. Making headers needs to know where the kernel headers are under, so I tell it /usr/include since this is the host... and the system FWL built doesn't have a /usr directory because everything still lives in /tools. Right.

I'm already creating /bin and /lib symlinks to tools (so things that use absolute paths ala /bin/bash and /lib/ work). This is a third that needs to do before we have a working build environment, I think. (This is a Linux From Scratch issue more than a FWL issue, having a blank root directory with just /tools is great if you want to create a new system from scratch first thing, but if you want to do anything else you have to do lots of fixups to get a working build environment for arbitrary packages. Hence the script...)

But with that fixed up, it's building the stage under itself. Yay!

In theory, the entire FWL build should run under itself up to the packaging stage. That part's been problematic all along, of course. The two main problems with it right now are 1) User Mode Linux only runs on x86 and x86-64 hosts, not arm or mips, so loopback mounts without root access are out. 2) mke2fs and tune2fs aren't in busybox anymore, so creating a filesystem image is missing a tool. Both of these problems can be fixed by putting gene2fs into toybox.

The other short term todo item is to put toybox back as an optional overlay replacing the appropriate busybox tools...

It needs more testing, but I can pretty much do a 0.9.0 release any time now. I want to do the expontential bootstrap thing of building each cross compiler from each host (which is likely to result in about 100 packages), and I should probably bite the bullet and make sparc work...

July 6, 2008

Hmmm, the uClibc breakage turns out not to be while actually building uClibc, but during the "make headers" phase afterwards. Unfortunately debugging it got interrupted because my laptop locked solid and I had to reboot it.

Sigh. Suspend to ram mostly works, but every once in a while it damages some kernel data structure somewhere, some time after which it either gets a null pointer dereference trying to poke at the filesystem (a non-fatal oops which means some file somewhere becomes inaccessable and undeletable until I reboot, which is a real pain no matter where it is), or it just hangs.

Need to upgrade to 8.04 and see what that breaks...

After the reboot I tackled documentation for a couple hours. (Specifically, the FWL project history page, which is pretty much a big blog entry. Link to it when it's finished, I'm up to about 2003...)

Feeling outright terrible. My fingers hurt enough to slightly interfere with typing. My joints seem swollen, and are popping. I would _hate_ to develop arthritis in my 30's. Doctor's appointment in the morning...

July 5, 2008

The FWL build-under-itself seems to be going fairly well so far. Lots of "serial8250: too much work for irq4" messages, which the Linux kernel guys (specifically Peter Anvin) blamed on qemu, even though it's their spurious message getting repeated over and over. But at least their blame came with a patch attached, although I'm using the most recent unmodified qemu release, and judging by the year that elapsed between their last two releases, the next one can be expected around January. Building one from svn to play with right now is a bit questionable due to the ongoing change to a new code generator. I really need to catch up on the list and see how that worked out...

Anyway, that's a cosmetic problem. The build progresses. (I don't care if the right place to fix it _is_ in qemu, as long as I'm stuck using 0.9.1 and my userbase is likely to as well, I should patch the kernel to shut it up.)

I'm really looking forward to my doctor's appointment monday morning. My right hand feels like I pinched a nerve, and has felt that way for two days. Alternates between pins and needles and not-exactly-numbness. Ye Olde Sinus Infection seems to have found fresh nerves to annoy. And the right side of my neck has a muscle that's gone all stiff and hurty. Plus the stuffed up ear, mild headache, and congestion in my throat are all back. And this time it's presumably resistant to _another_ antibiotic they didn't have me on long enough...

Hmmm, building armv4l cross compiler under the i686 mini-native seemed to work until it got to uClibc. At the end of the configure stage of that, it went:

./extra/scripts/ .config > include/bits/uClibc_config.h
:1:24: error: no include path in which to search for asm/unistd.h
distcc[8410] ERROR: compile (NULL) on localhost failed
:1:24: error: no include path in which to search for asm/unistd.h
distcc[8412] ERROR: compile (NULL) on localhost failed

July 5, 2008

Hmmm, FWL command logging missed tee. (Because only needs this, doesn't. Skip it for now...) And it missed the commands run in the packaging stage because the script sets the $PATH for the UML instance by hand. (The biggies there are mke2fs and tune2fs I think, neither of which current busybox provides anyway.)

Bzip2 compression support went in to busybox? Hmmm... Denys broke up Julian Seward's code, not the cleaned up stuff I did. Not surprising. (That said, his version is over 60k of source code.) Oh well, that was one of the blocking commands and it's in now...

What's calling _mercurial_? Rummage, rummage (I have logs!)... It's linux again, on sh4 right after git fails to identify the current repository it calls "hg id". Right, that's similarly useless. (I like mercurial, but doing a "./configure;make;make install" should not invoke source control. That's evil.)

Ok, the only command left after enabling all the busybox stuff and playing whack-a-mole with the other commands (shuffling flex into yesterday's lists and such) is "dnsdomainname". That's called by the Linux build from scripts/mkcompile.h... in a stupid way. If /bin/dnsdomainname exists, it assumes it's in the $PATH. Why not check the _path_? Sigh... Anyway, it shouldn't cause a problem for that to fail in context, it leaves a blank #define LINUX_COMPILE_DOMAIN which is the fallback anyway if it can't find dnsdomainname or domainname. (Oddly, I _can_ put domainname in the $PATH, but it won't fall back to use it because it'll still still dnsdomainname at the absolute path.)

Ok, disable toybox building in host-tools, swap in the new busybox with the new config file... Explicitly add a "make busybox.links" step because apparently I have to do that now... (They sucked in kbuild? Really? Isn't that _massive_ overkill for what they're doing? What exactly does modules_install mean in the context of busybox, anyway?)

Try the build, and... it didn't even make it out of Sigh. The busybox 1.11.0 "patch" command failed trying to setupfor linux:

Applying /home/landley/firmware/firmware/sources/patches/linux-2.6.13-cmdline.patch
patching file init/main.c
patch: hunk #1 FAILED at 286
patch: 1 out of 1 hunk FAILED
Exiting due to errors

That's a command I already implemented in toybox due to the busybox 1.2.2 patch command failing in the same way. However, for the moment let's just borrow the host patch from Kubuntu to see how far the build makes it with the rest of the new busybox...

Next the gcc build died with:

awk: /home/landley/firmware/firmware/build/temp-i686/gcc-core/gcc/optc-gen.awk:45: Call to undefined function

But this is actually a known bug. Busybox's current maintainer Denys Vlasenko has been poking at FWL over the past week, and he found that awk in 1.11.0 doesn't understand multiple -f options. (Which is a regression; in 1.2.2 it did.) He gave me a patch, slot that in and restart the build...

Busybox needs xargs to build itself. Add that to the list. (I edited yesterday's "Busybox needs to provide" list so I have the full list of necessary commands written down somewhere.)

And the busybox build no longer accepts CROSS=, it now wants CROSS_COMPILE (and not CROSS_COMPILER as I initially gave it). And without CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY busybox tar can't unpack the make 3.81 source tarball. (The FSF continues to suck at this whole "development" thing.)

Phoned Eric to see why viewing some of the web pages on was giving me 2k/second. Eric has a 5 megabit FIOS connection through Verizon, there's _no_ excuse for it being that slow. It turns out that when Eric uses bittorrent on any of the machines in his house, Verizon detects this and throttles "the hell out of" his outgoing internet traffic.

That's not just evil and stupid: that's a class action lawsuit waiting to happen. Also, Eric's paying for bulk bandwidth. If Verizon can tell him what he can and can't do with it, at what point do they lose common carrier status and become liable for the things their users transmit and receive?

Sigh. I was pondering getting FIOS, but this has turned me off. I don't even _use_ bittorrent but a company _that_stupid_ is not something I want to entangle myself with.

Doing a "./ --fork" build for the first time in a while. Poor little laptop, churning away, with 30 second latency spikes as I try to catch up on my livejournal friends list or type here. (And when all the genattrtab calls in the gcc build sync up, the laptop gets DEEPLY unhappy. As in "mouse pointer doesn't move for 45 seconds" unhappy. Yeah, still a brilliant idea to have X11 be a normal userspace process, just like a microkernel would do it. Sigh. At least it sucks _less_ these days, after 20 years of figuring out workarounds...)

I _think_ busybox 1.11.0 is now in and working for all architectures. Patch remains broken, and I had to add a half-dozen things to the list of commands to get something _useful_ (wget, mount, mdev, ifconfig, route..). But I might be able to actually use $ARCH to wget and then build that under itself.

Fingers crossed...

July 4, 2008

Happy blowing things up day. (I'm aware that England does this on November 5 instead. They also have a cool mask that goes with it, the incarnation of the God of Smugness. We have barbecue to make up for it.)

Found out that the Splenda Quick Pack thingies (which the stores in Michigan and Texas seem to have stopped carrying) are available online, so I just ordered 5 cases. That should last me a month or so.

Hint to stores: shelving these with the other splenda products, so people could find them, might have been smart. Shelving them next to the kool-aid packs in another aisle entirely, when the splenda packet costs 6 times as much as the corresponding kool-aid packet you shelved it next to, was not smart.

I've been putting span tags into the html source I write for a while now, but have yet to update the python rss converter thingy (which Christian wrote, although I've banged on it a bit since) to be aware of said span tags. Presumably I should be able to do rss feeds for each tag or combination of tags, more or less live. Some kind of ",entertainment,links" that would give you just those sections (and no entry for days without any of that)

Once again, I have biked to Epoch without the power cord for my laptop. (It has a nice battery, but a year in it's lost maybe half its original capacity. It's a Dell.)

I checked in the working command line recording code, and a script to generate a report from it, but the report I actually needed was a simple "echo $(cat build/cmdlines-*/* | awk '{print $1}' | sort -u)" which produced:

ar as awk basename bison bzip2 cat cc chmod chown cmp cp cut date dd diff dirname dnsdomainname echo egrep env expr find flex gcc git grep gzip hg hostname id install install-info ld ldconfig linux ln ls m4 make mawk mkdir mke2fs mktemp msgfmt msgmerge mv nm od patch perl pod2html pod2man pod2text pwd qemu-arm qemu-i386 qemu-mips qemu-mipsel qemu-sparc ranlib readlink rm rmdir sed sha1sum sleep sort strip tail tar touch tr true tune2fs uname uniq wc which whoami xgettext yes

So that's the full list of commands the build used when I gave it access to the full host environment. (It does not include /bin/bash or /bin/sh which are accessed via absolute paths and thus not caught by the $PATH wrapper.) That's our starting point.

That list can be trimmed down a bit. The ./configure scripts notice lots of optional stuff, which the build won't use if it isn't there. Yanking perl zaps pod2*. The results of bison and flex are usually cached, m4 and mawk are optional, along with internationalization stuff like msg* and xgettext. The "info" file format is obsolete (html won over gopher) so install-info can go. The qemu* files are used as an optional smoke test at the end of each build, pretty much for development when I'm trying to make sure the cross-compiler I'm building will generate code qemu can run. I'm guessing the linux kernel build is calling "git", which is stupid and _clearly_ optional.

I addition, some stuff is provided by packages other than toybox/busybox. The toolchain stuff from binutils/gcc is ar, as, cc, gcc, nm, and ld. (Plus ranlib and strip, which are apparently optional in the host toolchain.) User Mode Linux provides linux, uClibc provides ldconfig, make is its own package...

That leaves us with busybox having to provide:

awk basename bzip2 cat chmod chown cmp cp cut date dd diff dirname echo egrep env expr find grep gzip hostname id install ln ls mkdir mktemp mv od patch pwd readlink rm rmdir sed sha1sum sleep sort tail tar touch tr true uname uniq wc which whoami xargs yes

Configuring busybox: tar compression type autodetect and after needs to be indented...

Can't do anything cpu-intensive without draining the battery quickly, so banging on the perl removal patch. Alas, it no longer applies to current hg, so the first step is examining the perl to see what changed. (I hate trying to read perl...)

Fade and I went and saw Wall-E today, along with Mark. I think it's the best movie Pixar's made so far. _WOW_ was that a good movie. Half the movie had no dialog (neither of the robot leads speaks more than a few individual words), and it was _brilliant_. You don't miss it. The storytelling was superb, the characterization and "acting" were flawless. They made a _roach_ sympathetic, without being anthropomorphic. (The roach never broke character, except for a few squeaks and a bit more intelligence, it was a _roach_.) The captain got to be sufficiently heroic to warrant the position. They had conflict without needing an actual villain to be actually evil, and without any "Moment of Stupidity" to drive the plot at any point. Everybody's motives _made_sense_, all the way through.

I don't remember a single glitch in the movie where I had to just gloss over some flaw and keep watching, and I can't even remember the last movie that was true for. For the entire movie, they didn't noticeably screw up once. They even managed to do foreshadowing without it being even slightly obvious. (Not the fire extinguisher thing, that was spoiled for me by the trailers, but the reason to go back to earth _now_. It just... flowed. Well of course. Brilliant.)

The bit at the end where so much personality is expresed just by tilting the little eye lens thingies... (Nice interview with the director where he talks about those lenses, by the way.)

It's got layers of doing stuff right. Yes the characters were great, yes the visuals were great, yes the plot was tight and seamless, but there's more. They managed to have a fairly hard science fiction plot and setting without a single instance of technobabble _or_ an obvious scientific lapse. (The worst was probably the plant being in hard vacuum for a few seconds and surviving. I dunno what species of plant it is.) Mostly they just didn't explain things, but set it up so it's explicable in context if you care to try. (The robots being able to hear each other in space could be radio, the liner dumps garbage and hasn't run out of mass after 700 years but they _are_ in an asteroid belt the service robots could be mining for raw materials... Stuff like that.)

An example of how good this movie is: 1) They integrated live actors with the CGI ones and it _didn't_look_obvious_. 2) That's _not_ the most impressive or memorable thing about the movie, it's just something they nailed _in_passing_. Really.

Steve Jobs' fingerprints are all over this movie, by the way. I don't know if it's direct or an homage from people who work for him, but Wall-E makes the classic macintosh startup sound when he finishes charging, Eva was designed by the guy who designed the iPod and current macs (and it shows), the autopilot's voice is the macintosh "speak" command...

I need to go see it again. Yes, in the theater. (Fade's already decided to buy the DVD, not just netflix it.)

Good movie.

July 3, 2008

And now I'm remembering why replacing the command line utilities out of Ubuntu is so vital to getting a reliable build:

tee: standard output: Resource temporarily unavailable
tee: write error

The forkbomb script pipes the output of the build through "tee". If the xterm it's writing to ever gets scheduled slowly enough for the output pipe to fill up and cause a short write, tee _exits_. The busybox version of tee IS NOT THAT STUPID.


Also, User Mode Linux has developed strange new bugs circa 2.6.25, and if you run it from a shell script and it gets a kernel panic, it sends a kill signal to every process in it session, which takes down the shell script running it. Meaning without toybox's oneit (to shut it down cleanly), I have to run UML under setsid (and then reset the tty afterwards) or else the shell script aborts when UML exits. (Even if I run it in a subshell.)

Implemented tee in toybox and added that to the start of my $PATH while doing the RECORD_COMMANDS forkbomb. (Yeah, I could have just used the busybox version, but it was an excuse to add a small simple command to toybox. I still need to add a test suite for tee.)

July 2, 2008

Sigh. The cats have acquired fleas. (And thus Fade and I have acquired, and deployed, Very Expensive Cat Annoyance Drops.) Also got a new doctor's appointment (the third round of antibiotics didn't knock out the sinus infection either, 2 days after the last pill symptoms started up again), although the earliest appointment they could get me is monday morning, by which time the thing will probably have reestablished itself as strongly as if I hadn't had this last round of antibiotics at all. (Look, I need _twice_ the normal length of antibiotics to make this thing go away. I've always needed two consecutive rounds of antibiotics to make sinus infections go away, that's just the way my body works. I know you're trying to avoid overmedicating, but what you've managed to do is make the infection I've currently got antibiotic resistant. Congratulations. But no, don't listen to me, I'm just a patient, what do I know? It's not like I'm at all familiar with my own responses to medication...)

And I got an appointment to have the car professionally frowned at in preparation for the big long drive to OLS and sword camp.

The FWL command line logging is working, although I'm still tweaking before checking it in. When you set RECORD_COMMANDS=1 the build creates files in the build directory named "cmdlines.$STAGE.$PACKAGE" (with commands run by the script itself outside a package build being attributed to "setupfor").

So if you want to know exactly which commands a given package needs in order to build, you go:

echo $(awk '{print $1}' build/ | sort -u)

(Which is one of those command lines that has non-shell people going "well of course, obviously, I should have guessed". The awk chops out just the command name from each line, the sort -u removes duplicate entries, and the echo $(blah) takes the output that's got each entry on a separate line and puts it all on one line. Now you know. Insert GI Joe joke here.)

If you want to know _every_ command needed (which I need to know to configure busybox 1.11.0, which is how I got on this tangent in the first place), cat all the cmdlines.* files together once the build's done. Hopefully other variants are obvious. :)

What this shows is what the build is using given a full distro environment. That doesn't mean it needs all that stuff. Lots of things like pod2man, mawk, and all the internationalization stuff are probed for by ./configure, and won't be used if they're not available. You can trim commands out of this and the build will still work, this just gives you the starting point.

And it's checked in. Currently running a forkbomb to record the logs for all architectures, because I'd like to compare them and see if any require commands that the others don't. I may also need to move the log writing into a subdirectory, so "./ --fork" works with RECORD_COMMANDS. (Right now the logs would commingle if multiple builds happened in parallel. I need to bump my laptop up to 4 gigs so I can do a proper fork bomb again; there are now enough architectures that building them all in parallel in 2 gigs goes swap-crazy. Of course having six desktops full of multi-tab windows doesn't help there.)

My next major upcoming todo item is to enable all the commands the build uses that busybox 1.11.0 can provide, and seeing where it breaks. (And it will, I've already gotten one patch from Denis. Apparently awk lost the ability to understand multiple -f, it's fixed in svn.) I should try it first without toybox, I expect. And document what's wrong...

I should re-clone the busybox svn repository to mercurial and keep that up to date. I have a python script to do the clone, but I never did finish teaching it how to keep an existing cloned repository up to date when more stuff gets added to svn. I suppose I could try mercurial's built-in svn->hg converter, but the uClibc and busybox repositories live in the same svn and thus each one's commit numbers are intermittent, and that drives most clone scripts I've tried _bonkers_...

I still want to complete toybox, but commingling toybox and FWL slows down both projects. I need to complete FWL and then move _on_ to other projects like toybox and tinycc. If I focus on getting FWL implemented around busybox, then there's only a few more months of work before FWL gets to a 1.0 state. (And then it's the perfect test environment for toybox. The same "one command at a time" approach, but based on something that's known working...)

Hmmm. Pondering the distcc trick, I wonder what it would take to make tinycc provide the native compiler distcc needs? Distcc calls the native compiler with -E to preprocess header files, then calls the native compiler again to do linking. (Right now it's also calling it to create .o files in situations it doesn't understand, but I can teach it about that and probably _always_ make it marshall source across the network to be compiled into object code.) It would certainly make the host environment smaller, and faster, although by how much is an open question and what you lose by using tinycc as the linker is another unfinished question. (I'm thinking of the -gc-sections stuff, I wonder how hard that is to implement in tinycc's linker?)

But first, make it work...

Heh. _Slight_ problem, uses "oneit", which is in toybox, which doesn't get built in RECORD_COMMANDS mode. Uh-huh. Ok, yank that for now. (It does mean you can't interrupt the copy stage with ctrl-c, but oh well...)

Another fun little detail is that the logger doesn't show calls to the cross compiler when logging mini-native package builds. That's because the script takes a snapshot of the host environment, but the cross compiler gets built _after_ that, and added to $PATH. For the moment, I don't mind, but at some point I should probably add that just for the sake of completeness. (Probably just have and re-run after but before That way it'll take a fresh snapshot of the $PATH for the wrapper directory. I think the dependencies are right that it won't rebuild anything else, except recompling the wrapper which should take less than a second.)

July 1, 2008

Going through the busybox 1.11.0 config. Wincing a bit.

  • General Configuration
    • exec prefers applets - doesn't say if it can run the built-in commands _after_ searching $PATH. This should probably be a choice menu.
    • usage messages - this should be a "none/terse/verbose" choice menu instead of two separate options tied together with duct tape.
    • Assume that 1:1 char/glyph correspondence is not true - _horrible_ name for an option that should basically be called something like "Unicode support". (If it's not complete, then say that in the comment. If it's _useless_ until unicode support does go in, then why is it a separate option? And it's an internationalization feature that should be grouped with locale support.
    • RPC support - should not be user visible if it's selected automatically by stuff that needs it. Just yank the description string and it vanishes from menuconfig.
  • Build Options - this entire menu is pretty much make targets, not config options.
    • Static binary - make static
    • PIE - make pie or make pie_static
    • Force NOMMU build - what is this _for_? Yeah, I know what a nommu system is, but what does forcing a nommu build mean for busybox? What does the option _do_?
    • Build shared libbusybox - make libbusybox
    • Large File Support - that's general configuration, not really a build option.
    • Cross compiler prefix - does _not_ belong in the config, specify it on the make command line or as an environment variable.
  • Debugging options - I can sort of see this, but it hard-wires in stuff that could be specified on the command line. In toybox I have an OPTIMIZE variable you can set by hand which contains all these sorts of flags, so you don't have to hardwire things like electric fence into the config system.
    • Enable obsolete features removed before SUSv3 - Dear Glenn: the gnu utilities still support this stuff, so really support for old stuff is a gnu extension. I know you were personally offended by this, but insulting the features in the config option description is silly, and hiding the option that enables them in the DEBUG menu... what the heck does this have to do with debugging?
  • Installation Options - make PREFIX=/blah install (or install_hardlinks). This entire menu doesn't belong in config.
  • Busybox Library Tuning - what's the difference between this menu and general config? The allocation policy (malloc or on the stack) is in general config, but the copy buffer size is in library tuning. I don't get it.
    • Several entries are here because they're shell options, and there are too many shells. Old problem, presumably not fully fixed yet. And if the networking menu can let you select ipv6 in there, why are the shell command line options over in library tuning?
    • Support for /etc/networks - the help says it's for the route command. If that's true, it should be an option to route. If it's also used by "ip", the help should say so. This menu should probably track which commands are affected by which option.

So I set the "busybox settings" I wanted, built a busybox with no applets enabled (because I have to recreate my list of what command line utilities actually get used by each package build), and the resulting busybox binary is 14k. Implementing _no_ applets. Huh? (Ok, nm --size-sort implies it's the compressed help support. Disabling both verbose and terse help messages brings it down to 10.7k. Circa 1.2.2, it was around 5k. Something's wierd. (Let's see, an allnoconfig build is 6.5k. I guess moving to x86_64 is responsible for some of that, I need to measure...)

Digging up my old wrappy.c script and integrating it into the toybox build, so it can automatically record the commands run by each build. This is, of course, yet another config option controlled by a magic environment variable, and rather than add a script I've decided to put comments about these variables at the start of, and move most of the other environment variable setting from to the start of that file.

I _really_ need to update the documentation, but doing that right is a big job...

Testing the build under PCLi~xOS. (Don't ask me why they put a cutesy swirl in the middle of that name, I don't know. I guess their name is "PCLiruxOS".) Got a bug report that the build is breaking, and I'd like to figure out why.

The PCLiruxOS livecd prompts me for my keyboard type. (It's prompting me in english.) Now time zone, now it's walking me through network setup. That's just _sad_. Knoppix managed to boot straight to the desktop 5 years ago, Ubuntu does it more or less right today, but these guys still can't figure it out. Why am I caring about this distro again? Oh right, a bug manifests here that doesn't happen under the other distros I've tried. What a surprise...

PCLiruxOS showed me a dozen config options, and for each one hitting "enter" was a sufficient answer. It ended with a "congratulations, network configuration is finished" dialog that provided NO information, it was just one more pointless dialog standing between me and getting a desktop. It didn't have to show me ANY of that. To add insult to injury, their motto (displayed during bootup) is "radically simple".

Why does its desktop look like a corrugated metal floor plate during bootup? What's the difference between "control center" and "administration center", so far neither of them seems to let me change the resolution down to something that won't go off the bottom of my screen when run in a qemu (unless I minimize my KDE task bar, which I don't like to do)... And I hung the thing. The control center icon gave me no indication it was coming up, so after about 15 seconds I clicked it again, and then each one wanted me to type in the password to become root so it brought up _two_ of whatever those dialogs are called (not "atomic", the ones that block your display unless you deal with them. The ones that the Macintosh UI guidelines say you should never ever use), and the one in front is blocked by the one behind it, so I can't type into either of them. Brilliant!

The _sad_ part is that preferred screen resolution was _not_ one of the dozen thing it prompted for on the way up...

I think I'm ready to write off pclinuxos as "too stupid to live" and move on, but there's still the possibility their stupidity is triggering a real bug in my code, so I've got to deal with it long enough to track down what's breaking. Time to kill qemu and try again...

June 30, 2008

I posted a patch to the busybox mailing list a couple days ago (fixing an already-fixed bug in some of my old code in a slightly more elegant way, because Denys had cc'd me on the bug report). It's a bit like an alcoholic taking a drink, now I'm pondering poking at BusyBox again. (No I don't want to be maintainer again, Denys is doing a marvelous job and I happily defer to his authority. But it's coming up on 2 years and I haven't _looked_ at anything since 1.2.2, and in any other embedded developer I'd say that makes them out of touch...)

Bruce #*%(&# Perens cost that project my services, but I'm starting to get over it. He's just not important enough to care about. A quick check of my busybox folder (yes I'm still subscribed, but it's currently accumulated 5818 unread messages) shows he hasn't posted to that list since before I left. So his _only_ contribution to the project in the past _12_years_ was to troll on the losing side of a licensing flamewar.

I find it particularly ironic that BFP insisted he was going to fork the project if other people didn't give him his way, but I'm the one who actually did a fresh implementation from scratch (and have already implemented more commands than he ever did). That's not why I did it, but I must admit him thinking it was a good idea is one of the stronger arguments against it.

The problem with toybox is that one programmer, no matter how talented, is unlikely to make up for a 10 year headstart by a team of a dozen programmers (one of whom was said programmer putting several years into the other project). Especially when I don't _want_ to render the old project irrelevant. I put good work into it and left it in the hands of the best maintainer I could find. I don't talk up toybox both because it's unfinished and becaue I don't _want_ to undermine busybox. Erik laid a marvelous foundation, Denys is doing a great job today, and I'm proud of the years I put into it as well. (Heck, I did a forensic analysis to show there _is_ no Bruce in the project, even the idea of a multi-call binary came from gzip, one of the first applets merged into the thing which was using gunzip as a synonym for gzip -d back in the early 90's.)

Yeah, BFP took all the fun out of it for a while: but he just doesn't _matter_.

More to the point, I just haven't got enough time for all my projects. The toybox command shell is a full time project in itself, which I haven't touched for a year due to lack of time/energy. Doing mke2fs right also requires several uninterrupted weeks of focusing on that and nothing else, because spending an hour here and there results in zero progress. It takes a couple hours of concentration just to refamiliarize myself with the details of the problem I'm trying to solve. Firmware Linux should really come first, it's potentially the most _useful_ project I work on and the one that nobody else is doing in quite the same way. But right now FWL is blocked on toybox missing six commands. Yeah, I'm focusing on adding them to toybox, but five of those six reimplementing commands busybox already has. With wget busybox was just missing missing two command line options that would have taken five minutes to add. Yeah, doing this helps toybox but it's not the best way to get FWL moved forward as rapidly as possible.

For the sake of completeness: the only reason I don't work on the main branch of tinycc is I just can't take a CVS archive seriously anymore. If they just switched to mercurial (or git, or even subversion) I'd happily queue up patches against that, even LGPL 'em. Just not until CVS _dies_.

And I haven't had _any_ time to poke at the kernel documentation stuff, and I have to give a talk on it at OLS next month so I need to _find_ some time...

All that said, I prefer lots of things about the toybox infrastructure. When starting over, I had the opportunity to avoid a _lot_ of things I didn't like about busybox. The two do _not_ work alike, and porting my old code from busybox to toybox can take a week to turn a single busybox command (that I wrote every line of!) into a working toybox applet. Going the other way isn't likely to be much easier, and some of it can only be described as regressions. I _like_ being able to add a command as a single file, not having to worry about cryptic makefiles, I _much_ prefer my command parsing infrastructure (unifinished in places as it is)... There would have to be some design discussions.

On the other hand, I suggested several similar improvements to busybox before I left, and they've had 2 years to work on it (and confront similar problems of their own; Denys is a clever guy). I should look at what they've done...

(Also, I must admit that saying "7 packages: busybox, uClibc, linux, make, binutils, gcc, bash" is the minimal environment to rebuild itself under itself is kind of fuzzed by the fact that I'm using a combination of busybox and toybox, and toybox won't be ready to replace busybox entirely for another couple years at this rate.)

(Also also: Denys has been poking at FWL a bit recently, and it's only fair that I reciprocate... :)

No firm decisions yet, but I am poking around...

June 29, 2008

Still feeling terrible. Not sure if this is a side effect of the antibiotic or a sign the antibiotic isn't working, but I just can't concentrate. Bashing through the server mode of wget anyway. (I've decided that -l means listen for an incoming connection, -ll means persistent server listening for incoming connections and forking off a child to handle each one, -e means exec a child process and -ee means exec a child process with a pty. Making it _work_ requires being able to think straight enough to keep the four cases distinct. (No, what's not right. Um, no opts, l only, e only, le, ll only, ee only, lle, lee, llee) nine cases. Nine cases? Nine cases distinct. (And figure out if I want to insert a config option to allow a smaller version to build.)

See "not thinking clearly", above. Tired and cranky, and I've only been up for 8 hours. (Admittedly, I woke up at 3pm and it's now 11pm, but still.)

Thought some exercise might help, so I biked out to Whataburger. Of course I got caught in a downpour on the way back, and am huddling under the awning of a trophy shop on Lamar, running my laptop on battery. (Fade's plane should be getting in any time. I look forward to this, and would like to clean up the condo a bit before she gets home. See "downpour", above.)

I really shouldn't be surprised that my huddling place is within range of 13 wireless access points. This _is_ Austin, after all...

Fade's plane was delayed just enough to miss the last bus home, so I needed to go pick her up. Luckily I had a plastic bag in my backpack. (The nail board was in it, and that seemed more likely to dry out intact than my laptop did.)

June 28, 2008

Banging on toybox wget. I've narrowed down the option set I want. (Once you decide that recursive fetching is somebody else's problem -- if they want that, they can build gnu wget -- things simplify tremendously.) It's mostly the same as the busybox 1.2.2 option set, although I need -t and -T, and a -v that shows headers exchanged with the server is all sorts of useful. I don't need -Y (it's 2008, I no longer care about socks/proxy). I'm tempted to support --bind-address (because I needed it once back in 2002) but I think I'll wait for somebody to ask for it first. (Mostly because writing up the help entry for that one sucks, it makes the usage line too long to fit and I have to explain that you need to give it a dotted quad IPv4 address.

There are still many future possible additions. I suppose I should care about ipv6 at some point, but it's not a priority. Maybe I can punt on --user and --password handling (the options are synonyms for specifying the same info in the URL, and exactly as insecure. Even xargs can't run a command without its command line being visible to ps. I could add an option to take the url from stdin, but that would be a non-standard extension...) I'm not planning to handle cookies at all right now, and the --no-cache option might be better specified as "--extra-header 'Pragma: no-cache'" so you could specify _any_ arbitrary extra header you wanted. But since I'm not supporting proxies right now anyway...

Still trying to figure out what to do about passive ftp transfers. (Make all ftp passive? Have a command line option? Ignore it and just implement the one there's a standard for? Try to set passive and parse error responses?) I did discard the idea of bothering with an http 1.0 mode, because that doesn't handle virtual domains meaning half the sites out there would be unavailable. (It's very simple, but it's not useful enough by itself to bother with, and if you have http 1.1 support for 1.0 doesn't really add anything.)

I'd love to add https support, but I need stunnel for that and dropbear hasn't got one yet. Maybe later...

I was pondering trying to share infrastructure with netcat, but wget is only sending data in one direction at a time so an alarm timeout probably makes more sense than messing with poll.

It's a lot of _work_ making this look easy. The result should be so simple it looks like it took a few minutes to write, but it's like bonsai. Pruning it back to something small and clean is _hard_.

Renamed the various in-progress toybox commands from .c to .pending in my tree. That way the build doesn't find 'em. Some of them (such as mke2fs) are already checked in. I should get back to that...

On the netcat front, -s and -p are being ignored. I'm feeding an saddr_in structure to bind and it's not using the results. (I know this because if I tell it an saddr that isn't on this machine, or a port that's already in use, it doesn't complain.) Ah, the -s part is because the lookup function was using *toys.optargs rather than the name parameter I'm passing in. (Back when I moved it to a function, I didn't adjust everything properly. Yeah, maybe that function should be in lib/lib.c, but I'll move it when I have a second file using it. Probably wget...) And the port reuse thing is understandable since I'm doing a setsockopt(SO_REUSEADDR), although I'm surprised the result _worked_...

Down to one more antibiotic pill. I feel a lot better than I did, but still not fully recovered. I wonder if I can get another round of these suckers to actually knock _out_ my sinus infection this time, rather than waiting three months for it to get bad before going to the doctor yet again...

I'm feeling very tired and this evening, although it's possible that not having had anything to eat today except a jelly donut and a salad (they cancel each other out, obviously) is contributing to that...

June 27, 2008

I remember why I never use gdb. It's so much easier to recompile the source with printfs stuck in it. After fifteen minutes of telling the thing "run", "step", "next", and setting various breakpoints, I have yet to get it to the line of code I want to inspect the variables at. The user interface on this thing is seven kinds of horrible.

Hanging out at Epoch. Totally packed on a friday night. Now there are _eight_ police cars, lights flashing, blocking off the street. And an ambulance, and a fire truck. (Kind of unusual, Epoch is at the edge of a small strip mall in an otherwise highly residential area...)

People at the next table:

Guy1: "I have a degree in computer engineering, I've worked in the industry for ten years, I spent an hour and a half on the phone with my mom trying to get a network share working between two vista machines, couldn't make it happen."

Guy 2: "There's a reason for that. Vista."

Good to hear that Apple's continuing march to world domination continues apace. Too bad it couldn't be Linux, but we've had a dozen "year of the Linux desktop" since the Linux 1.0 release in the mid-90's, to the point where it's a joke now. We're the OS who cried wolf.

Linux had its big coming out party in 1998, when its desktop ambitions were all over the news.  The 212% growth figure, the microsoft antitrust trial, the Netscape source release, Windows Refund Day, the record-setting IPOs of Red Hat and VA Linux, Windows 98's slow start failing to live up to the expectations set by Windows 95 and sandwitched between "Microsoft Bob" and the cratering of Windows Millenium... We were BIG NEWS. Now we're old news.

When the dot-com crash happened and we retrated to the server market, the exact same way that Java and the Itanium did.  Just like Solaris crashed and burned in the workstation market and fled to a server-only niche.  The server is where you go when you can't compete on the desktop, a retirement community for things like Cobol and the DEC Alpha and Netware and AIX, where old technologies can live on years after they've lost all relevance.

This is the perception Linux would have to overcome, that desktop Linux tried and failed, it was part of the crazy dot-com days and it went the way of If people even remember it, they think that when the hype cleared there just wasn't anything real there.

And to be honest, between Red Hat abandoning its non-enterprise customers to Fedora and the rise of Ubuntu, there really wasn't much. SuSE went through bankruptcy, Turbo and Mandrake shuffled off into obscurity, Slackware was a one man shop and that man fell ill... Knoppix was the desktop leader for a while, and it didn't install on the hard drive at all well.

By 2005 desktop Linux was coming back, but nobody cared. They still don't. We'd need a serious marketing push to bring desktop Linux _back_ into the limelight, to show that we've got something new and interesting.  To compete with Apple's "pc vs mac" TV spots and their endless silhouette bilboards.

Word of mouth won't do it when the rumor mill thinks they already know everything there is to know about desktop Linux. Half our community is _embarassed_ to talk about desktop Linux anymore, and the people they'd talk to aren't particularly interested in hearing more.

The way to regain mindshare is a big advertising campaign. Not just online, but in conventional media: magazines, television, radio, billboards. FireFox bought ad space in the new york times to show everyone it wasn't just an "all your base" internet fad but something real that would stick around. What's Ubuntu done to promote itself, other than copy AOL's trick of sending CDs to people who could download and burn them?

I like Linux. I would love to see Linux win the desktop transition. But if I had to call it right now, Apple is in the lead. A few days ago Jon Stewart on The Daily Show pulled out a laptop as part of a comedy bit (pretending to look something up online, I think), and it was a mac with a large friendly Apple logo on the cover. Apple probably didn't even pay for that product placement, it's his actual laptop. They're a common enough part of the culture it didn't distract anyone from the bit.

June 26, 2008

Saw Fade off the the airport this morning, went back to bed. Feeling horrible. My neck is stiffer than usual and moving my jaw hurts for some reason. (I'm already _on_ antibiotics, maybe this is a side effect of them, or yesterday's heatstroke...)

Re-read Trickster's Choice, on to Trickster's Queen. Wincing at a couple things Tamora Pierce's editor should have caught. (The blood oath mechanic is unabalancing, why didn't the kings demand them of their subjects as a matter of course? Aly started by trying to steal a special saw to remove her collar, but when it was finally removed the saw wasn't how, so why does it exist?) And who the heck is on the covers? The first one can't be Aly because the hair color is wrong, the nose isn't broken, and no eyebrow scar. It can't be Sarai and Dove because they're _black_ (big plot point!) and the women on the cover are whiter than me.

Still excellent books despite that. I often want to slap the editors of various things I'm reading or watching. (Doctor Who, girl in the fireplace, MARVELOUS episode. But "part of events" is not a good reason you can't move the tardis. "Move the tardis without shutting down these unstable time windows first and we could destroy half of france" is a good reason. THINK people. Sigh. And am I the _only_ one to notice that the doctor's only attracted to women whose minds he's read? Telepathic contact seems to be the galifreyan equivalent of pheremones. Right, stopping now...)

Hey, Shay is working tonight. (He's been a security guard in the UT student center for _years_, but I think the last time I saw him was before Pittsburgh. He's one of the other people I know who does chain mail.)

Gave him a card, and we reminisced about why I'm not on myspace. (Or facebook.) I have a livejournal I no longer post to (still read the friends list when I remember). A twitter I don't twit into. I was browbeaten into creating a linkedin account I don't use (except to go "who are you again" to the various linkedin requests I get that use the standard form letter and never say how I met whoever it was). I used to waste hours every day on social networking site du jour (from The Motley Fool message boards to the old Realm of the Dragon BBS on the commodore 128). These days, I have email (and lots of mailing lists I can't keep up with), this blog, and I sometimes remember to log into freenode. If I really find the need to waste time online I have lots of places to go...

As Eric Burns of websnark said: "Apparently, according to this presenter, the Web is now Web *2.0.* This is an innovative idea no one else thought of. Really."

Poking at the install command, which isn't in susv3 either but it's still easier than wget because I can just test what options are being used by the packages I'm building.

It occurs to me that I don't really _need_ wget to test the FWL builds, I could go "echo 'GET /path/to/file.tbz' | netcat 80 > filename", except that the builds don't have netcat in them. The reason they don't is that netcat defaults to n in the toybox defconfig, and the reason for _that_ is I haven't finished implementing its option list.

Unfortunately, I don't seem to have recorded which bits of netcat I did and didn't implement. It looks like -wfp are implemented. (I don't care about making -p look at /etc/services to turn a name into a number. If you don't know that port 25 is the mailserver, netcat isn't going to help you, and you can't go "-p mail" anyway, it would have to be "-p smtp", just like "-p dns" isn't useful, it's "-p domain" for port 53. Oh, and "-p nameserver" is 42, which is not the port bind is running on.)

That leaves "netcat -eiqsl" and I think I'm dropping -i, because you can just pipe the input through this script instead:

while readline i
  echo "$i"
  sleep $1;

And get the same effect.

Implementing -e requires another poke at the option parsing functionality. It needs to execute the rest of the line, so it needs to stop parsing options after encountering -e. I can already put + at the start of an option string to tell it to stop at the first non-option argument (fun for xargs and such), but putting + after a specific option means setting this option enables another one, just as - would disable the other one. I'd _like_ to use the same character to indicate stopping option parsing after any non-option argument and stopping after encountering _this_ option, but I like the +- symmetry of function, so I need to change the + string prefix to something else. I'm not currently using ^, so I'll make it that, and change the existing users.

According to "grep 'TOY(' toys/*.c | grep +" the existing users are echo, oneit, and seq. Why is seq using that when it has no options? (It's using the option parsing logic to enforce a minimum and maximum number of arguments, but there are no actual flags... Ah right, if I _don't_ do that the option parsing logic will eat (and complain about) negative number arguments, because they start with a dash. Sigh. Ok, tell lib/args.c that if there are no flags after the prefix arguments, set stopearly.

Fiddly little...

And once again, the tradeoffs between having bigger shared infrastructure which can do more so each individual command is smaller, vs having each instance be smaller so building a toybox with just one command is smaller... they make my head hurt. My head was already hurting, so this is not an improvement.

June 25, 2008

Biked to the chick-fil-a on ben white. In 95 degree heat. Had to stop for about 15 minutes under a tree while I refamiliarized myself with the symptoms of heatstroke. (Nauseous to the point where you feel like throwing up, with a sudden stabbing headache? It's a bad thing. Do not try to "work through the pain", stop what you're doing and drink lots of fluids. Luckily I had both a bottle of tea and a bottle of water with me, because I prefer to be insane rather than stupid.)

Poking at the neuros stuff a bit. Asked on #neuros on freenode and found the "start here" part of the wiki. That links to the page explaining how to build their OS image from source, and I also got a link to the source I need to download.

Another recruiter called. I'm not complaining, but why does this happen when I try to remain unemployed and focus on open source stuff?

June 24, 2008

I found my nail board! Yay! (It was in a grocery bag in the office upstairs.) Now to write that darn HOWTO I promised Andrew Morton back at CELF...

Epoch has definitely inherited the "auditory diarrhea" mantle from Metro. The current "song" involves a tone deaf woman whining (not singing, _whining_ shrilly) about no discernable topic, and a percussion track that I initially thought was the roof leaking into the air conditioning vents (except that would be much more regular). Once again, I can't understand how anyone could actually be aesthetically pleased by this (although I have the same reaction to lutefisk, so I'm not surprised there _are_ such people, I just don't personally get the appeal).

It's strangely reassuring. It's like the cats shedding, taking your chair, and turning the cat boxes into biohazard zones. They're cats. It comes with the territory. And I have sound cancelling headphones.

Started on a wget implementation, for a definition of "started" that mostly involves reading the wget man page and figuring out what subset of that to implement. For a program that performs such a simple function, it has lots and lots of fiddly little options. (You can set an inactivity timeout in seconds with -T, the default of which is an insanely long 900 seconds. But you can separately set the DNS lookup timeout, the connect timeout, and the read timeout.) The option parsing is just _weird_. (-c is continue, but -nc is noclobber. -v is verbose, but -nv is noverbose (which is not the same as -q for quiet). The _default_ is to be verbose, by the way.) It has at least three different ways of being verbose (-v for verbose, -S to print server header response, and -d to print debug info.) It has proxy support. (Has anybody actually _used_ socks or proxy since the 1990's?)

I should probably just look at the busybox wget to see what subset they bothered to implement.

The other fun thing is that although http is pretty simple to implement, ftp is just fiddly enough to be annoying. Maybe I should just implement ftp "passive" mode...

June 23, 2008

Using the USB to ide converter I got at Fry's to copy files off some of these ancient hard drives I keep finding in these boxes I'm unpacking. "Oh wow, 30 gigabytes of files last updated in 2003." Not quite sure what to do with this. A lot of it's duplicate with the backups I already have, but not all. Just found a tarball of files from 2000. There's the old Java source code to the project I worked on at Quest Multimedia back in 1998. There's early correspondence with my bosses at WebOffice. A bunch of Motley Fool columns I submitted (the unedited versions, before the editor applied the "house style" to 'em). Bulletin board software I wrote in the late 90's...

I meant to work on wget in toybox today, but I'm distracted going through this. That file claims to be my Unix account from rutgers, but it's an arj archive. Gotta install unarj...

The frightening part is I have three more old hard drives to go through, and there may still be more in boxes...

The hot water started working again this afternoon. Life is good.

June 22, 2008

Email's back. As soon as Eric forwarded the actual web page defacement it was obvious a 12 year old had cracked ibiblio's blog software. (Wordpress stores passwords in plaintext and someone was _proud_ of overcoming this. That's hilarious.)

Still no hot water.

Ok, the remaining applets has to link to out of the host system to get the build to work (not counting the gcc/binutils stuff which is ok) are: bzip2, find, install, od, diff, wget.

I have plans to replace all six, the question is what to tackle next. Hmmm... bzip2 is have partially done but requiring a big lump of undigestible sort code, wget and install seem fairly easy, find and od aren't _hard_ (just complicated), and diff is mostly a question of learning Bram Cohen's algorithm (and I think I spelled his name right this time :).

Toybox also has several unfinished applets I should do the rest of: bzcat, bunzip, help, mdev, mke2fs, netcat, readlink, sed, and toysh. Of those mke2fs, sed, and toysh are big deals and the rest are cleanups.

Ok, bzcat just needs filename support via loopfiles(). The bunzip2 command line behavior should probably be in the same file.

June 21, 2008

Still no hot water or email. As far as Eric can tell Grelber wasn't cracked, but he's taking the opportunity to Confront System Administration (tm), and it's not back together yet. (For reasons I won't go into, this now involves reinstalling the OS on his laptop. It's one of those kind of projects. Email is still going into grelber, but I can't get it out.)

Still no brainpower to program. So far today Fade and I hit Ikea, I took a nap, read a children's book ("Nurk" by Ursula Vernon), and took another nap.

Wandered out to Epoch. Yay 24 hour coffee shop, plus exercise in the form of walking many miles with a big heavy laptop in a backpack. Closed many browser tabs.

Banging on sort and the test infrastructure. Fixed the "optional" test logic, which got confused by gen_config.h moving to generated/ subdir. Reading the susv3 sort spec and picking apart my old sort.tests to see what it's actually testing. (The key logic actually gets a little bit of a workout, but it could be far more evil. No tests for SUSv3 stuff like -c, -m, -o... No tests for any of the gnu extensions like -z, -g, or -M I implemented to make autoconf happy.)

The spec brings up edge cases too, such as "if no sort keys are specified, the entire line up to, but not including, the terminating ", and after a moment's head scratching to figure out where that would matter I _think_ it's for a file where the last line doesn't end with a null terminator but is otherwise equal to an earlier line, and they're distinguishable because they have different whitespace but you specified -d.

I'm fairly sure I don't actually care about that case.

Huh, this looks interesting. It's yet another variant on "use farmland to grow fuel until food becomes as expensive as gas", but if we can turn sugar into _oil_ instead of ethanol (and stop using corn for it, which is just stupid), it's a step sort of right direction-wards. Needs a better feedstock though (kudzu and marching bamboo come to mind. Not these wimpy crops you have to fertilize and water all the time, but something that grows so aggressively it would be a problem if we _didn't_ harvest it by the truckload to keep up with its growth. Such plants do exist. Not crops, _weeds_.) People aren't likely to be nearly as touchy about genetically engineered fuel as food. (Burn it sure, eat it no.) Having genetically engineered yeast get out into the environment and make crude oil in top soil and mud puddles probably wouldn't be a good thing, but the Exxon Valdeez hasn't exactly set the bar low there...

Ok, sort's checked into toybox and passing its test suite. Dropping it into the FWL build and seeing how that works...

My current road map for FWL is to implement the remaining six applets, write up the design and rationale of the whole thing, and get out a release that can actually rebuild itself under itself. Then I build Linux From Scratch under it (the stock version using all those insane GNU things, built natively). I should also write up an Embedded Linux From Scratch using busybox and uClibc both to make /tools and to build the final system. (I know how to do this, I should document it in a familiar format and get it out there.)

I should also do another rev of my perl removal patch and try to get it merged, and I should poke around in the guts of ext3 and see how hard it would be to at least read-only mount ext2 using that driver. (If nothing else you could tell it to use a ramdisk as a separate journal for a read only mount, but that's darn silly. It should be possible to stub it out for read only mounts.)

Yay, FWL built with the new sort. One down, six more to go.

June 20, 2008

I accomplished nothing useful programming-wise today, so you can stop reading now if you like.

I'm mad at whichever subset of the cats forced me to make an unnecessary trip to the laundromat, at day two of "antibiotics vs sinus infection" it's still hard to tell who's winning, it's been two days since the hot water worked, and Grelber (the machine that collects my email, hosts this website, and contains my offsite backups including my private ssh key) may have gotten cracked. Been a day, basically. No brainpower left over for programming, just haven't got the energy.

Eric runs the "hacker howto", and it got defaced. (Yeah, I know.) That howto's based on the archaic definition of "hacker" rather than the modern usage, but it's still surprising it took this long for some 12 year old with an inferiority complex to prove they didn't know the difference. (Not that anybody under the age of 30 does anymore, but try telling Eric that.)

After replacing the defaced howto, Eric called me and I told him to assume his home network's compromised. (The howto is hosted on ibiblio, but we don't yet know how they got access to it and I tend to assume the worst in security situations.) Going up against Eric on network security is like beating Linus Torvalds at Quake; it really doesn't say much. It's not their thing. Eric despises and avoids system administration, and his home systems run fairly stock Ubuntu. (I poked him to fix the Debian ssh bug and regenerate the host key for grelber, and the ssh key he was using was from his old Fedora system, but this could easily still be fallout from that anyway. Dunno.)

I only secure embedded systems, mostly by removing everything they don't need and reading the source of everything they _do_ have installed. (If they have so much installed I can't read its source code, it's not really an embedded system, is it?) I can't do that with an Ubuntu server. I dunno what the current security issues are with Ubuntu's version of apache and imap and the mailserver and all the other fun things Gerlber's running. (I know from the security page that there's a _lot_ of them, but I don't really try to keep up. This is one reason I've been reluctant to put up my own server. The last time that server was cracked it was because Eric still ran sendmail, and it was just spewing spam. It runs postfix now, that's probably not the problem. Unless it's the greylisting plugin...)

I told Eric to shut down ssh on grelber and call Stu in the morning, meaning I can't check my email or update my website (including this blog) until stu gets to look at stuff. If I was there in person I could replace grelber with a honeypot running a snapshot of the old system (perhaps under qemu), log all the network traffic from outside the honeypot and throw away the stuff I recognized, and hope they were dumb enough to try again. (Plus figure out what jurisdiction to file a criminal complaint in on general principles, based on the existing defacement.) But I'm not there, and trying to do that sort of thing remotely is really no fun...

Luckily there's a complete month-old clone of grelber standing by to hot swap in case of a hardware failure, meaning Eric or Stu can boot both systems with knoppix and compare them to find any obvious rootkits. (Non-obvious ones tend not to survive an fsck done from a clean recovery CD, followed by filling up the "unused" parts of the disk with "cat /dev/zero > blah".) This doesn't tell us what data got copied off the server (such as ssh or gpg keys, or /etc/shadow). He'll probably wind up revoking the keys and changing passwords anyway.

I've already replaced my ssh key on Morris ( and sourceforge; can't do so on Grelber ( until it goes back up, and I'm trying to remember what other systems I have ssh access to via key instead of password. (My passwords vary on the systems I care about.) It was about time to rotate the keys anyway, the old key file is dated 2003.

Why replace my key if Eric's machine may (or may not) have been compromised? Becaue the downside of doing an offsite backup to a machine that's live on the web is it's got old tarballs of my home directory going back to Red hat 7.0, and there's probably a couple copies of the private key in there somewhere. It may be a longish stretch to assume "they changed something on this server, therefore they looked at old tarballs on another server under another user account, and guessed which _other_ servers out on the net they might be able to ssh into using that key". But when I start thinking security, I tend to have a scorched earth policy.)

I tend to assume it's a 12 year old who does this kind of thing partly because that's the last time it seemed "cool" to me, and because you have to hope that anyone old enough to be prosecuted as an adult knows it's a felony these days. (It's not the 1980's anymore, most of the real cracking is done by organized crime in Russia and Pakistan and such, spamming from botnets and phishing for credit card info and so on. If you're going to commit a felony, that's a _much_ better reason than the digital equivalent of peeing on a lamp post to mark territory. Sheesh.)

The hot water is because some idiot (probably more drunken fratboys) broke the circuit breaker box and disabled the exterior lights around the complex, also taking out the building's hot water heater in the process. (And they really did a number on it, people were out there working on it all day but neither the hot water nor the exterior lights are back on yet. I'm told the city has to re-certify that junction box before they'll hook it back up to the mains, or some such.)

In Texas, I'm not sure where the dividing line between misdemeanor and felony vandalism is. Some dollar amount I think. I do know that if you catch them in the act of damaging your property, you're legally allowed to kill them in defense of said property. (When I first got to Austin, somebody caught a thief breaking into their car on 6th street, chased them something like 11 blocks before shooting them in the back, and it was ruled justifiable. Welcome to Texas. Strangely, this _does_ make me feel kind of warm and fuzzy about Austin. Especially while taking a cold shower.)

June 19, 2008

Why does this remind me of Penguicon year 3?

Got the edits back for my OLS paper so I can review 'em. I need to book plane tickets.

The antibiotics are making my immune system sit up and take notice that Something Is Wrong. This does not improve my comfort level in the short term. I go lie down now.

June 18, 2008

Slept until 1 again, then got a doctor's appointment for 3:10 tomorrow. (Calling three places, the first two of which couldn't get me an appointment for a _month_. No wonder so many people just go to the emergency room for minor things; how do people know they're going to be sick that far in advance without _dying_ from whatever it is?) Here's hoping that the third attempt can actually knock this darn sinus infection out.

My concentration's still totally shot, but toybox sort's 90% done. I started from the first version I checked into busybox, but it required almost a complete rewrite to toyboxize it. Almost done now.

Of course one of the downsides of starting with the _first_ version I checked into toybox is that I went on to maintain it for a year or so and I keep second-guessing things and having to look them up again. For example, when there are no sort keys do I really need to set a fake "whole line, alpha sort" key, or can the fallback sort do that? Except that "sort -s" (disabling fallback sort but providing no keys) still sorts the input. Yes, this is the kind of edge case I have to get right, _and_ the kind I need to add test cases for...

One of the TVs at Wendy's is showing Mr. and Mrs. Smith, a decent movie Fade and I got through Netflix last year. It had the potential to be a _very_ good movie, but the ending sucked rocks. They survived the climax solely because bullets never hit protagonists, and for no other reason. When outnumbered 20-1 by ex-co-workers (presumably in the same general skill league), with no cover or body armor, and they simply don't get hit. (It seemed to come as a surprise to _them_, too.) The writers wrote themselves into a corner, and instead of resolving it they just ignored it. They didn't even bother with a deus ex machina, the threat just _stopped_ for no reason. (I guess that explains why they didn't even bother to move someplace safe at the end, their universe contains no real threats to protagonists. The actors themselves commented how silly it was in the DVD commentary...)

Sad. I would have been up for a sequel otherwise. The first 3/4 of it were quite good.

*blink* *blink* According to the other TV, Tiger Woods injured his knee and will be out of comission for a while. Ordinarily this wouldn't even catch my attention, but how often do you hear the phrase "an old golf injury"? (Football, sure. Hockey, basketball, baseball even. But golf? I'm definitely boggling at that bit. "Summar of sixty-three, it were a par seven..." Why reminiscing about sports injuries brings to mind a captain Ahab type doing a pirate voice is an open question, but it does. Ah, it's Tom Baker's character from Black Adder, that explains it.)

Wendy's also has coupons for "Volente Beach Waterpark", without saying where it actually _is_ or providing any contact information. The people working the register didn't know either. The placemats are also involved, and they say "Lake Travis, Austin, Texas". Austin has a water park? When did this happen? Still no contact info. I guess they assume we can use Google, but it's a kind of incompetent promotion that forgets that sort of info...

Ok, sort.c compiles, and half the test from the busybox 1.2.2 test file pass. (The other half are being totally loopy.) Looking at that test file, it needs a _lot_ more tests to check the complete set of functionality it implements, I'll have to sit down and seriously expand it. Checking the busybox patchlist, it seems I wrote all the tests except one (from Joey Hess; I wrote the bugfix though, and there's one other interesting bugfix I wrote to remove -libm in uClibc).

(Yes, I'm still going over my old code with a fine tooth comb, every time I import something busybox touched. My original impetus for doing toybox was something that didn't have Bruce Disease, and even though the project has its own momentum now, I still quarantine each hunk of old code I bring over.)

First, I need to fix sort for the existing tests. One down; when I moved a global variable into the global union, I forgot to remove the declaration of the global outside the union, so the compiler didn't catch that I'd missed moving a user of it. Two tests still failing.

June 17, 2008

My darn sinus infection's back. I had two weeks worth of antibiotics for this three months ago (after a related emergency room visit), and before that in the fall, and it's the same darn sinus infection. It's like a horror movie; I can never quite seem to kill it off...

Probably because of this, I slept until 2pm yesterday, and today I slept until 1pm. Got to bed about an hour after Fade both times, and she's up long before noon. I don't mind so much sleeping through half the day when I get to stay up all night being _productive_, but I didn't. I hate being sick.

No computing of note today, read a book instead.

June 16, 2008

Stu injured his back (more or less complications from the appendicitis he's still recovering from), sidelining him for upwards of three weeks, and we decided to push Austicon back a year to Fall 2010 when we can all focus on it properly. (I'm kind of focused on launching an embedded Linux company right now anyway.)

Banging on toybox sort. Deferred the argument parsing logic ordering problem, but I'm back to it now.

The argument parsing logic is returning a singly linked list (struct arg_list *), but the easy way to keep a list in order is to use a doubly linked list, meaning the data structure I return would be different (and contain wasted space). That's an API change I'm trying to avoid making. Efficiently assembling a singly linked list in order means you need to track two points (the head of the list and the most recent insertion point), and the argument parsing code is table driven with no provision for that or obvious way to add it. Inserting each new element at the list head is the obvious "easy way" to create a singly linked list, but the list winds up in reverse order. The next most obvious way is to traverse the list from the head each time to find the end, which is n^2 runtime with the length of the list. (These lists _probably_ won't ever be long enough for it to matter, but can I be sure of that?) I could also let it continue to assemble the lists in reverse order but add a pass at the end to reverse each list so it's in order when the function returns, which is kind of ugly.

Sigh, there are several different ways to do this, each of which would work, but I don't like any of them. I keep hoping if I stare at it long enough I'll see an elegant way to do it. (This is where the real time sinks come from...)

Eh, go with the n^2 algorithm for now. The code to implement it is small and simple, and the runtime shouldn't be noticeable until it gets to about 5000 entries. (If a single command line gets that big, something is very weird.) If it becomes a problem later, I can always change it then.

June 15, 2008

Spent two days mostly offline, unpacking boxes. The condo looks like a bomb hit, but it looks like it was a living area rather than a storage space before the bomb hit.

I put in all that effort while basically avoiding doing laundry. Rather than perform the cleaning task in front of me, I cleaned up everything else in the apartment.

Now that I've fired up my laptop again, I need to do a refreshed version of the perl removal patch for the Linux kernel. So naturally, I'm working on the toybox "sort" command.

The argument parsing logic is once again going "boing" in a subtle way. Sort -k is the second use of a repeated argument (the first was df -t) but this one cares what _order_ they go in. The existing logic is assembling a linked list in reverse order, because that's smaller and simpler to code. In theory I can reverse the order again when I parse the raw keys to create the usable key list, but although that's small it's not simple. If order is important, it should preserve the order.

Always fun when the different design criteria fight and previous design decisions have to be reevaluated and recoded...

June 12, 2008

Got all the _defconfig files in the kernel converted to _miniconfig files, and posted them to linux-embedded.

Spent the rest of the day catching up on web things. (Nope, WoW isn't one of them. My 30 days expired, and I'm not renewing until the new business I'm trying to launch is in better shape.)

June 11, 2008

With gas finally at $3.99 a gallon down the street from me, I didn't feel up to driving Fade in to work, so I decided to take the bus with her to hang out at Chick-fil-a. Unfortunately, my attempt to meet her at the bus stop didn't work (the only pickup at 24th and guadalupe is northbound, SJG is southeast). So I walked to chick-fil-a (only 6 miles, according to google maps). I think I sunburned the left side of my face. And when I get here, I find that Chick-fil-a's internet is blocking Something Positive. "You are not authorized to view this content." Sigh. Wouldn't have bothered to come if I knew they were going to be ACTIVELY STUPID. (Just for comparison purposes, it lets through yafgc, which has nudity, torture and dismemberment on a fairly regular basis. I'm not recommending they block that either, I just think they're being silly trying to filter the internet at all. It's _the_internet_.)

And lo, I wrangle sort code. It's not a straight port becuase I'm really unhappy with the #ifdefs in compare_keys(). Unfortunately, a better way to do it has yet to become obvious. Working on it...

I'm seriously starting to lean twoards four space indents instead of one tab that's to be interpreted as four spaces. Ubuntu broke vi's tab interpretation logic, and it's cleaner to just not mess with tabs anyway. But changing the code is a big flag day thing that screws up "hg annotate" and diffs and so on. Sigh...

So according to the posts on linux-embedded, redoing and resubmitting my perl removal patch might actually be relevant right now. This has inspired me to finally work on the toybox sort.c code. Yeah, I work that way. I have important work to avoid doing!

I now know how long the batteries in my noise cancelling headphones last. Luckily, we have many more triple-A batteries. They are not here at Chick-fil-a, and I'm not sure they've actually been unpacked yet, but we _have_ them. Somewhere.

The allnoconfig code in 2.6.25 is amazingly crappy. In the past 24 hours I've thrown allnoconfig into an endless loop, found a config that requires a #comment line be retained in the miniconfig to avoid switching on a symbol, and now I'm fighting with the spitz_defconfig which sometimes wants to output the # USB_GADGET section as comments, and sometimes doesn't want to output it at all, and its reasons for doing so are _deeply_ unclear...

Now I realize I have a black belt in breaking software. I come up with ways of breaking software in which nobody's ever broken it before. But come on guys, break _deterministically_, alright? (I added a "make oldconfig" after the first "make allnoconfig" and got it to go away. Yes, it is possible for the output of "make allnoconfig" to need a "make oldconfig" to stabilize it.)

June 10, 2008

Milton Miller pointed out last night that the sidebar on my pages went away when Eric upgraded to Ubuntu 8.04. (Somehow the mod_include and ExecCGI stuff got yanked from httpd.conf, don't ask me how.)

So if you've poked at the FWL or toybox pages recently and been unable to figure out how to download anything because there was no download link... That would be why. (And of course my email address was in the sidebar, and I wasn't on IRC much over the past coupld months. See what happens when I'm incommunicado doing consulting gigs for months at a time?)


The other thing I left running overnight was a little script to convert every _defconfig file in the tree into a corresponding _miniconfig file. It's taking slightly longer to run than I expected, but there are an awful lot of defconfig files in the tree. (Also the hang on arch/blackfin/configs/BF548-EZKIT_defconfig didn't help: if you remove CLKIN_HZ make allnoconfig gets a little confused...)

Went out to the bubble tea place for dinner with Fade, then off to what replaced Metro. It's a new coffee shop, just opened, and still working out things like how to make a Chai Latte. (Putting the chai in the milk, then steaming the combination: not good. The resulting taste is... burnt and slightly chemical.) Their net isn't up yet, nor are their menus. Still, I'm glad this will still be a coffee shop. Open until midnight is something.

This miniconfig stuff keeps finding new and amazing ways to break. I found out when Tony Pryzgienda's heuristic breaks. All it does is remove blank lines and comment lines, we're adding stuff to allnoconfig so this should NEVER break, and yet it does if you shrink half the stuff in the ppc directory because CONFIG_NETFILTER_XTABLES switches itself on (well, to "m") in luan_defconfig and friends. What the...?

It needs this line:


And I have no idea why...

Right, add another sanity test...

June 9, 2008

I find this article unreadable, but for an interesting reason. It claims to be about a top ten list, then it doesn't give the list. It sets up expectations and violates them, but not in a good way. It starts with #1, then talks about how the list was made, then mentions #2, and then jumps to #7. It comes across as incoherent, and keeping track of what's left to get complete coverage (and their relative importance) gets distracting. As a reader, I found it trying to make me do totally unnecessary work to follow it. The source material was a top ten list they already _had_, they just wouldn't give it to me.

I have 147 open tabs right now, things like this and this and this and this, and this might be particularly fun for diabetics. I'm trying to CLOSE these tabs, beyond a certain amount of effort on my part the content of the article isn't worth digging for. I skipped to the end, but at no point did the article contain an actual LIST, so I closed the tab. The author violated my expectations, and gave me the impression that they cannot coherently convey information. I don't care about their attempts at maintaining suspense or being clever: they wrote an article I don't want to read.

I mention this because I should probably work it into my OLS talk about good documentation: don't make the focus of the article how clever you think you, the focus should be the _material_. Your job is to get out of the reader's way.

So xkcd now has a pantheon. Good to know...

June 8, 2008

Got about half of cross-compiler/host-i686 built and uploaded. Working on the rest, but distcc needs to be taught how to parse and distribute a _lot_ more command lines.

I'm not quite sure how to best deal with gcc command lines with multiple .c files. In theory modern compilers can do a better job optimizing if you feed them larger chunks, so I don't want to break them up and have distcc handle them separately. But C doesn't have a "#pragma forget" that I'm aware of, to mark file breaks when you collate lots of files. If I just do "gcc -E file1.c file2.c file3.c" and then try to compile the output, it gives lots of errors about redefinitions. (And the result is 5 megs when I tried it on toys/*.c because things like stdio.h got #included many times. The files are preprocessed separately and the results simply concatenated.)

I suppose I could preprocess each file individually and send them across as a batch ala "gcc -c one.c two.c three.c -o blah.o", and then link the result. That still has the network overhead of lots of duplicate #include files, but it ought to gzip pretty well.

This also brings up the "modify distcc or write my own tool" question. The quick and dirty way is to write my own tool; what it's doing is simple enough that it's actually harder to read the distcc code than reproduce it. On the other hand, it's more useful to _other_ people if I modify the existing one, since nobody but me is likely ever use mine. Except distcc is several years old and nobody over there seems to have cared about this functionality before...

Broke my "page up" key yesterday, trying to clean under it the way that worked for my previous Dell laptop. (Dell hasn't quite worked out the "consistent way of doing things" schtick yet.) It's sort of back on, and sort of working, but "at a noticeable angle" and "not every time", respectively.

He's actually calling himself Mr. Penguicon now? Boggle. (This is a guess, I didn't actually bother to listen to the podcast. I'm not involved in that anymore, just catching up on my livejournal friends list...)

Ok, all the prebuilt 32-bit host cross compilers are up on the website, and it's time for me to go pick Mark up from the airport.

June 7, 2008

Ack! Darn embarassing bug! (I screwed up the mirror list in the 0.4.0 release. I have a copy of my website on my laptop, and I substitute in the scripts when I want to talk to that version, and when I added to the mirror list I accidentally checked _in_ in place of

It's not _quite_ embarassing enough to cut a new release (it should never fall back _to_ the second mirror), but of course you only find this stuff after you ship. Sigh.

Hmmm, using the distcc trick by hand to speed up cross-compiler builds for i686, since I have an i686 xubuntu image lying around in my qemu/images directory. Playing around with it, I've learned that distcc does _not_ speed up "gcc hello.c", only "gcc -c hello.c; gcc hello.o". If you don't break it up into stages, the distcc command line parser isn't smart enough to do it for you.

By the way, here's how you set up the distcc trick by hand. On the host, in its own xterm do:

PATH=`pwd`/cross-compiler-i686/distcc /usr/bin/distccd --listen --log-stderr --daemon -a --no-detach

Running it that way, the log going by on stdout shows you each compiler invocation that goes out to the cross compiler, so you can easily see whether or not it's working and what's taking advantage of it..

In the system running under qemu, do:

mkdir ~/distcc ln -s /usr/bin/distcc ~/distcc/gcc ln -s /usr/bin/distcc ~/distcc/cc cd ~/firmware PATH=~/distcc:$PATH CPUS=4 DISTCC_HOSTS= ./ armv4l

(Remember to enable your network inside qemu, of course. If you forget to run dhcpcd the build will still work, using the native compiler, but won't take advantage of distcc. The log mentioned above should tell you whether or not it's working.)

The resulting build still takes forever to run, but running the compiler is only a tiny part of it. (Running ./configure takes forever, and make figuring out whether it has anything to do in lots of tiny binutils subdirectories is also really slow. Plus unnecessarily invoking libtool a lot.)

The reason for the "CPUS=4" in the ./ environment variables is that each distccd maxes out at twice as many processes as the number of processors in the machine, and I have a dual processor laptop. However, the qemu system is very much the bottleneck here: my cpu monitor is showing one CPU pegged (running qemu) and the other having a few little spikes but not much. Running ./configure takes longer than actually compiling, for every package so far, and qemu performance is even more sensitive to cache locality than a normal system. (Admittedly this is translation cache rather than L2 cache, but it works out the same.) So it's quite possible that a more optimal number would be lower. Doing just 1 CPU would optimize QEMU cache locality (it can only emulate a uniprocessor system), but then it would be blocking and waiting for each distcc transaction to complete so that can't be optimal... I'll have to benchmark it.

Oddly enough, something that speeds the compile up noticeably: minimizing the xterm window (inside the QEMU window) that the build process in running in. That way the system running under qemu doesn't waste so much time updating the screen. (There's a reason mine's using stdin/stdout instead of a bitmapped display. Ok, more than one...)

Ooh, when the build gets up to about tree-data-ref.c (in gcc) then distcc finally starts eating all the CPU and qemu is paused waiting for it to return. I'm impressed. The gcc build is spitting out individual .c files that take 12 seconds to compile on the _host_ system. The distcc accelerator is really helping there... (And tree-cfg.c took 50 seconds. Boggle.) It's slinging half-meg preprocessed files across the network, but the virtual network can do over 3 megs/second via wget, so that's not that big a deal. If that becomes a bottleneck I'll experiment with the virtual gigabit ethernet card they added recently...

Hmmm, the uClibc build doesn't seem to be helped at all by distcc. (Nothing's getting sent out to the daemon.) I think I may need to teach distcc how to understand more command lines, and thus distribute more work. I've already got the wrapper that parses gcc command lines for relocatability purposes...

June 6, 2008

Wrapped up the day job today. Now to focus on FWL.

Cut the 0.4.0 release.

I need to figure out how to get the cross compiler to build for the i686 target from my laptop. In theory "gcc -m32" works, in practice passing in that flag to just the right parts of the build isn't _quite_ trivial. (Possibly setting CFLAGS="-m32" during is the way to go?) Long-term I want to get the build to work under itself, so I can use qemu and do cross compiler hosts for every supported target, but that's next release...

It was inevitable for the internet to make political statements via lolcats. *sniff* I'm so proud...

June 4, 2008

For the record, a $5 gift card at starbucks doesn't _quite_ buy a mint hot chocolate and a slice of lemon pound cake, but it comes close.

Mips is yielding. Turning off EARLY_PRINTK in mips requires a kernel patch, which implies a bug in kconfig somewhere. (Looks like it's in the menuconfig infrastructure, actually.)

Ah yes, "console=/dev/ttyS0" doesn't work, but "console=ttyS0" does. Right. Switching a lot of obvious crud off and crushing the .config to a miniconfig gives me 384 lines of crap left to wade through. Much more switching off to come before I check this in...

Braham Cohen (author of bittorrent) mentioned his diff algorithm in his livejournal again, which he never _explains_ but just says it's in the most recent bazar source. Downloaded the bzr source and grabbed, read a wikipedia article about patience sorting. Seems only marginally eldrich, as algorithms go. (I note that diff is one of the blocking commands I have to add to toybox before FWL is self-hosting...)

It was time to go to work an hour ago. I don't wanna go on the cart.

My nice flaming horsey shirt is just starting to wear out. (Small hole where the seam's giving out at the collar.) I found the sewing kit while unpacking yesterday...

My online to-read list is well beyond overflowing, went right through incoherent without stopping, and is now in the uplands of "unmanageable heap". I've started to make a list of sites I need to read all the links on. Some of those have rss feeds...

Ok, the new mips and mipsel configs are in, and I'm test building them now... Built. Checked in my smoketest script while I'm at it. Now I just need to do a "rm -rf build && --nofork" to rebuild everything, and I can probably cut the 0.4.0 release.

For 0.5.0, I need to implement the following commands before the thing is self-hosting:

  • bzip2 - I wrote an implementation of this long ago, and I still have the code. It uses the original string sorting routines, but the compression engine is mine. Should only be a day or two to dig it up, brush it off, adapt, test, and check in.

  • sort - I wrote this for busybox already, adapting my old implementation.

  • diff - downloaded a python implmentation of Brahm Cohen's algorithm, read a wikipedia article about it. Looks doable.

  • wget - A new one, because the busybox one didn't support timeout or retry limiting, and the defaults are just STUPID. Doesn't seem too hard.

  • install - Haven't started yet, looks small.

  • od - Haven't started yet. Looks small but fiddly, not sure how much work it actually is.

  • find - Haven't started yet. This is probably the biggest remaining lump of work, since it needs the exec stuff. Could easily take a week or more to do it right.

June 3, 2008

So the comments on the qemu mips platform removal (which occurred in two parts and broke Mips in FWL) suggested Malta as a replacement board. Grabbed arch/mips/config/malta_defconfig and built it. It was unhappy. I'd bang on it more but I have dayjob. Hate dayjob.

Fade and I did gnomergan in the evening, with two people from the guild. We made it about 1/3 off the way in, and managed three total party wipes. (Still, went up one level, got one quest finished. Not a total loss.)

June 2, 2008

Biked to work, realized I didn't have my badge, biked to a Wendy's. I can put in 8 hours tomorrow.

The splenda people have apparently discontinued the "quick packs", which were packets equivalent to one cup of sugar each, very convenient for making gallons of tea. They didn't sell very well because the idiots didn't put them in the splenda aisle, they put them next to the kool-aid (and mentioned some kind of promotional tie-in with kool-aid on the box). Of course a packet of kool-aid is 12 cents and an uber-packet of splenda (sold individually) was 75 cents, so it really didn't look good in comparison. (They were slightly cheaper in boxes of 5, but admittedly not that much. But I bought 'em anyway because it beats tearing open 30-40 individual packets to pre-sweeten a gallon of tea.)

I noticed them on clearance back at Penguicon, when I went on a grocery run for ice cream supplies. I bought their entire supply, but I only have 3 boxes of that left, and my local grocery store doesn't have it anymore either. I should write to the splenda people and see if there's some way to get the stuff _other_ than in tiny little single serving packets, or watered way down with some kind of filler as "splenda for baking". (I'm not putting a cup of unknown filler material in my tea. What is it, starch? Cellulose? Sawdust? The amount of actual sucralose needed is tiny, they probably have to stretch it with filler just so you can _see_ it.)

When does the patent on this stuff expire so somebody _competent_ can start selling it?

Russell T. Davis is regenerating into Steven Moffatt. So the guy who brought Dr. Who back from the dead is stepping down after 4 years, to be replaced by the guy who wrote The Empty Child/The Doctor Dances, Girl in the Fireplace, and Blink. I think I'm ok with this.

So, mips. Got a little sidetracked over the weekend. (Got the Stockades and Blackfathom Deeps done, though.)

The problem is that the "CONFIG_QEMU" target for the mips platform went away in the 2.6.25 kernel. Sort of understandable: now that qemu 0.9.1 emulates several different types of real hardware we theoretically don't need the kernel to fake hardware for it. Burn darn annoying in that it breaks my existing setup and now I have to flail around to get a new board working.

Booting a new platform under qemu is an amazing pain because if it doesn't work, you get no output and have no idea why. I know I've got a working toolchain (which is ordinarily a huge pain to get). Is the kernel packaged right? (This target boots vmlinux elf images, so that should be ok.) Do I have the right CPU details ala cache size and such? (Arm is more brittle than mips here.) Which serial port does this fake board think it has, do I have the right device driver enabled for that (switch 'em _all_ on) and what magic "console=/dev/ttyfruitbasket" invocation do I need to select _that_ driver?

Unfortunately, there's no way to get qemu to dump what hardware each virtual board comes with. You can get a list with "qemu-system-mips -M ?" but does that have an 8250 variant serial port, or what?

I should really build a version of gdb that understands mips and use qemu's -p option to attach a remote gdb to it, and see what it thinks it's doing. But that's more work and less help than it sounds like. I could also just read the qemu source code and see what devices each platform is initializing that way. Or (and this is probably what I'll do) ask on the mailing list how other people did this...

June 1, 2008

Trying to watch the LLVM 2.0 video on google tech talks, but the Flash plugin keeps hanging. Alas, closed-source binary-only crap...

May 31, 2008

Eric's server (Grelber) is down for some reason, which means my website and email are both down again. (I phoned him about it, but he's not at home at the moment so it'll be down for a couple more hours.)

I was pondering putting up my own archive of the embedded Linux mailing list based on the copies I got, but vger discards messages it can't send for 4 hours (because it's very high volume, and a mail server should never be down that long according to some spec), and grelber's been down longer than that a half-dozen times in the past year. Oh well.

Hmmm, trying to debug the mips problem and step 1 is building an old version from back when it worked, so I grabbed the last release tarball, extracted it into a fresh directory, and set it building, and found a problem. It wants to download toybox, which is on The mirror it tries to grab packages from if the primary site is down is also on That's a single point of failure, and a problem.

I personally can trivially work around this because I've got the packages locally on my laptop, and after the first build it'll have the packages cached for other people, but this is a single point of failure for fresh builds using nothing but the tarball, and I thought I'd eliminated all those. (And at one point, I had: timesys used to provide a second mirror.) Hmmm... Time to add to the rotation, I think.

Also, wget's default of 20 retries before giving up and declaring a site dead is crazy, especially since I've got mirrors to fall back to. Setting it to 2. Also the timeout on each try shouldn't be 900 seconds, it should be more like 20. Except that the busybox 1.2.2 wget doesn't support those options. Darn it. I'm now up to 7 commands I need to add to toybox before it'll rebuild itself under itself. Grrr.

I also need to have a full mirror if I want the old versions of FWL to build. Right now, my mirror just has the most recent versions of each package (and often what the version source control needs doesn't match what the last release needed). The really old versions used uClibc nightly snapshots, which cycled off the server after 60 days. Running ./ on those breaks when it gets to those, and I'd have to recreate them somehow and put them in my mirror. Also qemu 0.8.2 no longer seems to be available from the qemu website (some old versions tried to build qemu from source before I gave that up as a bad idea due to the gcc 3.x requirement), possibly it moved into an old/ subdirectory of some kind.

And of course this mirror has to be the one rather than the new one, because the old tarballs didn't know about the new mirror, so they're not checking there.

The OTHER thing that has to be fixed is the old scripts need "#!/bin/sh" redirected to "#!/bin/bash" because of the Stupidest Thing Ubuntu Ever Did. That needs a README entry in the download directory.

Hmmm, getting the mirror directory to live in more than one place on my laptop remains a challenge, because I can't hard link a directory and symlinks still do the wrong thing for rsync. Have to bang on my upload script and special case it. Darn.

A pretty young barista lady at Starbucks explained their next internet access plan to me. Their contract with T-mobile branded lack of internet access expired, and now they're going with AT&T. You have to get a starbucks debit card, and you have to keep a $5 balance on it, and that allows you to wrestle with a login screen to get 2 hours of internet access per day before they start charging you extra. This is still a "no".

Look, providing internet access is like keeping the place well lit. You either do it or you don't. Trying to put _conditions_ on taking advantage of the lights is beyond clueless, it's actively stupid. If you want to come in and read a book, buying a beverage for permission to sit in the coffee shop for a while is one thing, but having to identify yourself and confirm you have a $5 balance on some kind of loyalty card in order to make the lights work is something else. The fact that in 2008 Starbucks upper management still doesn't GET this makes them look amazingly out of touch, and we should get off their lawn.

Of course the reason I hang out at the Starbucks on 15th street rather than the closer one on 24th street is that internet access leaks in from the Texadelphia next door. (And I just had lunch there so I don't feel guilty about using it.)

Oooh, temptation.

I have the Dr. Who episode "Voyage of the Damned" on my laptop (the christmas special at the end of season 3, Mark used it as an example showing me how to find stuff to download via bittorrent), and I now have the driver to actually view it (the contents are standard mp4 but the wrapper's a windows AVI and it needed to be hit with a rock). I watched the first 3 minutes and then stopped it because I want to watch it with Fade, and we have one more DVD of season 3 (and a Children in Need special) before it's time to watch this episode.

But I don't have those on my laptop, and Fade's not here at Starbucks...

Still loving the noise cancelling headphones.

May 30, 2008

Ha! This is fun:

>We'll still send our 24 little rovers to the Moon and we'll still do it on an aggressive schedule because I get bored too easily.

I'm sorry to hear the X-price foundation turned into a paralyzed bureaucracy, but not actually surprised. I've been following Armadillo Aerospace for years.

A variant of Moore's Law applies to most technologies, the big variable is the doubling time. Electronics are impressive because the doubling time is so _short_, but technology marches on everywhere. A thousand years ago printing involved scribes writing books by hand, then the printing press happened but it was still a big deal to publish your own newsletter. Nowdays there's desktop publishing with a printer on your desk, or a kinkos down the street if you need fancy options or volume.

The same thing applies to space travel. 40 years ago getting to the moon required the resources of an entire country and _billions_ of dollars, but a whole lot of the problems were solved, and the solutions recorded, studied, and widely disseminated. 20 years ago individual corporations could launch their own sattelites, for phone service, weather recording, and so on. These days, it's getting down in the reach of motivated individuals.

A lot of the problem space has changed since we were last on the moon. For example, the big titan rockets were made with 1960's technology; they were big because they had to lift _themselves_. They were made of sheet metal because we didn't have kevlar or carbon fibers yet. They were designed by guys with slide rules, back when an electronic desk calculator (plugged into wall current) was cool new technology you had to learn reverse polish notation to use. These days we have off the shelf CAD/CAM packages that can simulate a wind tunnel on your laptop with a few mouse clicks. Our improved knowledge of chemistry gives us more fuel options, and although the cheap basic options like peroxide plus kerosene are most appealing to home hobbyists we can get the most out of 'em. The control and communications systems we can muster today with off-the-shelf parts couldn't be imagined back then.

As for funding it, I first bumped into the Artemis Project guys at Armadillocon back in the late 90's. They wanted to fund a civilian moon landing by selling advertising: t-shirts and a documentary. That's more or less the approach Cringely's taking, the difference is that that putting together media deals is what he does for a living. (He's the guy who did the "Triumph of the Nerds" TV series, and several more since then, including one called Plane Crazy about designing and assembling his own ultralight aircraft, from scratch, in 30 days.) He estimates he needs a $5 million budget and 20 months to land a 1kg rover on the moon, which is a fairly reasonable budget and schedule for a TV show, and ala Mythbusters the special effects actually _do_ something.

Darn it, I forgot that mips was broken with the 2.6.25 kernel.

May 29, 2008

I'm totally out to lunch today. Not quite sure why. I got to bed at a less unreasonable hour than some days, but just could _not_ wake up this morning, and even around 1pm I'm still coming up with engrish sentences when I try to do anything coherent. (I just wrote an email with the sentence "If you have the memory budget for infrastructure, there are people happily to deliver forklifts full..." Yeah, right.)

Huh, is this why spending a day at work totally screws up my ability to get anything done on my open source projects in the evening? After twenty minutes in an office, I feel fried all day...

Of course the 2 1/2 hour meeting I just got out of really didn't help.

May 28, 2008

Oh wow. Noise cancelling headphones are so AMAZINGLY COOL. Flipping the little switch on them to turn them on and off, the difference is HUGE and instant. (Yeah, I can still hear people talking and the singer overhead, but both sound like they're in the next room and the _chatter_ is gone. And I'm not even playing audio through 'em yet...)

I think I'm going to need to get some more AAA batteries. It's too bad they don't have one of these that works off of USB yet. (Yeah, from a hotplug perspective that would suck because it would show up as another sound card and Linux would go "wha?" when you hotplugged it, but still... No batteries.)

A few links I'm going through:

Didn't go to work today. I'm half time now, so I'll do 8 hours tomorrow.

I think hanging out at Starbucks is cheaper than hanging out at the bubble tea place, because two big hot chocolates at Starbucks is around $6, and three bubble teas is $7.50. The hot chocolates last longer, partly because they're bigger but mostly because I drink 'em more slowly. (Taro milk tea! SLUUUUURP.) Maybe it's because the air conditioning in starbucks works well, and the bubble tea place is 80 degrees inside.

Trying to do a weekly news, ala the qemu weekly news only staying up to date from day one. We'll see...

May 27, 2008

Destroyed my watch this morning. (And this is why I buy $7 watches.) Only minor bleeding on that wrist. Need to hit Big Evil to get another one.

The firewall at work continues to block google (but not any other site I've tried so far). It also blocks IRC, so I can't get on freenode.

Todo items for when I get home:

  • One more pass on the OLS paper before they actually print the books.
  • Send paper to CELF guys.
  • Finish toybox sort.
  • Finish rewrite of FWL about page for 0.4.0 release.
  • Assemble bookshelves

What I actually did:

  • Play World of Warcrack
  • Cook soup.
  • Watch Dr. Who commentary for "blink" so I could return the DVD to netflix.

May 26, 2008

Put a few "span" tags into previous entries. Nothing's actually using them now, you'd have to view source to see 'em, but in future I might do something with it.

Why did the mercurial developers break symbolic links in a repository? They had to go out of their way to do it:

$ hg commit www/news.html
abort: path 'www/news.html' traverses symbolic link 'www'

The "www" directory is a symlink from my project working directory to the website for that project. (In this case toybox, but FWL does the same thing and tinycc might someday.) I want to track some of the website files in the repository, and the obvious way to do it is to put a symlink there. So I did, back in 2006, and it's worked JUST FINE until the mercurial 1.0 release where it suddenly started complaining FOR NO REASON. Doing an "hg diff" aborts when it hits that. (I hope it diffed all the _other_ files first, but how would I know?) Doing an hg commit won't work, and there's no --force option to the commit to tell it I know what I'm doing and it should shut UP.

Right, bonked it on the head. This is not the correct fix, but it works for me:

--- /usr/lib/python2.5/site-packages/mercurial/	2008-05-26 16:12:07.000000000 -0500
+++ /usr/local/lib/python2.5/site-packages/mercurial/	2008-05-26 16:05:58.000000000 -0500
@@ -709,8 +709,9 @@
                 if stat.S_ISLNK(st.st_mode):
-                    raise Abort(_('path %r traverses symbolic link %r') %
+                    sys.stderr.write(_('path %r traverses symbolic link %r') %
                                 (path, prefix))
+                    sys.stderr.write('\n');
                 elif (stat.S_ISDIR(st.st_mode) and
                       os.path.isdir(os.path.join(curpath, '.hg'))):
                     raise Abort(_('path %r is inside repo %r') %

There's a "warn" function in I'd like to use, but it doesn't seem to be available from, and simply importing it didn't work, so screw it.

Cut a toybox 0.0.6 release, on the theory that it's always easy to cut a 0.0.7 (a release that has theme music) if I need to, and the toybox version FWL is using has diverged a bit from the last release, so...

Finally implemented a to run, and I have a test script that calls it like this:


./ $1 << 'EOF'

tar xvjf make-3.81.tar.bz2
cd make-3.81
time make -j $CPUS

The blank line at the top of the here document is necessary because something in the kernel boot sequence is eating the first line before the shell runs, but other than that I can cat an arbitrary shell script into it and it works fine. Except for the part about the ./configure stage of "make" dying because it hasn't got "sort". (Every other package I've tried has also died due to lack of sort. The kernel won't build, toybox won't build, distcc, strace, bash... Ok, I need to finish sort in toybox.

May 25, 2008

Met Stu and Mark for lunch. Mark left when we started talking about the new convention, he's changed his mind and doesn't want to go through it again. (It _is_ a lot of work.)

Stu and I have decided to start a Linux Developers Group. This differs from a LUG in that A) it hasn't got a vowel, B) it's about programming and actually doing cool technical stuff. (In theory answering endless newbie questions about getting OpenOffice to read Word documents and configuring Wine to run app X is a valuable service to the community... But let's face it, we've lost the desktop transition. Apple won. We never got enough preinstall support from hardware manufacturers to matter, and if Dell and HP are too stupid to realize this until Clayton Christensen eulogizes them in his next book, there's not much I can do about it. Intel's happy either way, and IBM has servers and mainframes and the chip powering all the game consoles...)

We have our first LDG meeting on wednesday, and we might do lightning talks. Stu has a video camera, and whoever shows up can give little 5 minute technical presentations on a topic of our choice that we can put on the thing's web page (whenever we get one). Sort of like a podcast.

Meanwhile, I'm pondering starting my embedded Linux business. I remember reading the book by the founders of Home Depot, about how one of their best managers used to run a company, and they wanted to buy his company to get him, but when they went through his books they found out he'd be bankrupt in a year and had to wait until after that to hire him.

The failure mode here was subtle. He was selling at a profit, and selling a lot, but still losing money, and he didn't know it because he didn't have good accounting. Let's say each month his paint department sells 1000 cans of paint for $10, each of which cost him $9. So that department contributes $10,000 to the company's bank account, and at the end of the month he pays that department's chunk of the salaries, rent, electricity, and so on, and has $8,000 left to restock the shelves. Except that doesn't buy 1000 cans of paint, it only buys 888 cans of paint. (But he still has piles of cans to sell next month, and if didn't sell every can he had he probably won't notice the difference...

The trap here is that inventory represents a significant pile of money, and if you're losing money slowly you can live off that money for years without ever noticing you're losing money and spending your principal instead of earning interest.

Another trap (which Sears and K-mart seem to have fallen into) is selling inventory based on acquisition cost rather than replacement cost. If your grandfather bought a house in for $10,000 in 1942, would you sell it 50 years later for $11,000 and consider it a profit? Probably not. That's why gas prices go up every morning, despite the same gas being in the tanks under the gas station that was there last night: it costs them more to buy _more_ gas after they've sold what they got to you.

The reason this is a problem right now is we're having huge inflation. (It's 1974 all over again, and I await the return of the word "stagflation".) A dollar used to buy more than a gallon of gas, now it buys about 1/4 of a gallon of gas. So for that commodity, inflation has been 400%. But the McDonalds double cheeseburger was a dollar back then and it's a dollar now, because of the "dollar menu". I expect it's becoming a loss leader, but at the moment for that commodity inflation has been zero over the same time period.

Unfortunately, most food has doubled in price. Milk is now $3.50 a gallon and rising, it was $1.75 when El Shrubbo took office. Meat, corn, wheat... all sharply up. And we all know gas has quadrupled, along with electricity, diesel for truckers, jet fuel for airlines... "Volatile food and energy prices" are usually discounted when figuring inflation, except that they've gone sharply and consistently upward for seven years now, and those are two things everybody needs to buy, they have the _least_ localized impact of any commodities. It's not mere "volatility" if they never go back _down_. Plus the housing market (which affects rents) did the same thing...

If you believe our money has lost half its purchasing power since El Shrubbo took office, that would be an average inflation rate of 7% per year. Of course you can point to commodities that _haven't_ done this (computers are the easy one, since Moore's Law says they should drop in price 50% every 18 months given a constant currency, it would take hyper-inflation to even notice an effect in that space).

I could go on about Paul Volker trying to stop it by raising interest rates in 1979 (go read the book "Liar's Poker", which also explains the roots of the current mortgage collapse).

What all this means is the budget I worked out a few years ago, how much savings I needed and how much I'd spend in a month... It's no longer accurate. I need to rebudget. (Pondering going back to UT for an accounting course or two...)

May 24, 2008

Fade took me to the south Drafthouse location to see Speed Racer, on the theory that if all the movie has is visuals we should see it in the theatre rather than wait for it to come out on Netflix.

That movie made me want to punch the Cohen Brothers, not for making a _bad_ movie but for making a movie with painfully squandered potential. Yes, it has lots of shiny. The driving scenes are great, and the jump bolts mechanic actually makes it just plausible enough to keep the disbelief airborne.

But the dominant theme of the movie is "audience squirming in discomfort". It starts with a young protagonist in grade school failing all his tests and sitting at his desk making vroom vroom noises with his mouth, while the rest of the class (and the audience) squirms uncomfortably. This goes on for about 200 years, with cartoony CGI to show that from the kid's point of view, what's really happening is he's having a psychotic break.

This is our _introduction_ to the _point_of_view_character_. Yes I'm aware that the movie's aimed at kids, but plenty of other movies aimed at kids avoided making every adult in the audience want to get up and leave. Heck, Shrek (dreamworks) and the entire Pixar arsenal appeal to young and old alike. But this seemed like it was trying to actively offend adults. (Where did they find a 9 year old version Rodney Dangerfield to play opposite the chimp, anyway? How can have jowls before puberty?)

And don't get me started on the middle third the movie where the bad guy shows up and courts the Protagonist family, and you know he's the bad guy not only because all the heavy-handed musical queues say so but because the nature of this sort of movie is Protagonist Triumphs Over Adversity By Doing His Thing, which means there will be a big race he has to win against great odds, with serious consequences for losing. The CHIMP knows this. Racing for the rich guy at the start does not provide that, therefore it can't happen. Yet they go on and on with the bad guy courting them, eating pancakes in slow motion (study "checkov's gun" and then contemplate the darn pancakes: WASTE OF SCREEN FOOTAGE PEOPLE), giving them a tour of his assembly line... And we're squirming, waiting for the reveal. There's no suspense here, the outcome is a foregone conclusion, it's just a question of HOW they're about to get screwed by this man: is he going to lock them up so they have to escape? Kidnap the girlfriend to force him to race for them? But no, they go to a dinner party and get measured for shirts, and probably other stuff while I had to leave the theatre and go out into the lobby. And then when they finally _do_ the reveal: the bad guy narrates what's going to happen while there's a montage of it actually happening (breaking the "show, don't tell" rule of storytelling 101)... and then they return to the confrontation so the protagonist can walk out. What the? So where is the movie at that point: is the movie continuing from "bad stuff happened, the Protagonist family must recover from it", or was it a warning he can now work to prevent...? The movie _itself_ doesn't seem to know for the next minute or so. This is NOT competent storytelling, people. I don't care how bad your story _is_, you can still _tell_ it well.

I blame the story editor. Perhaps the movie could have been saved if there had _been_ a story editor. The point of a movie (even a live action cartoon like this one) is to tell a story, and it sucked at this.

It had good moments, some I wouldn't have expected. The "WWF wrestling vs ninjas" worked better than it had any right to. Having the girlfriend drive was belated character development but it at least gave her _something_ (and explained the "why does she put up with this one note monomaniac again?" hole nicely). I didn't even mind the CGI going all cartoony in places (no, not the psychotic break parts, I meant the bits in the desert where it started to look like it was rendered on an Amiga), because it seemed an intentional shout-out to the cartoon source material.

But the only reason I sat through it to _get_ to those good parts was because Fade didn't want to leave. No wonder it's taking so badly...

May 23, 2008

Saw "Indiana Jones and the Years Plus Mileage" last night with Mark. It was actually quite good. I think I still enjoyed Iron Man more, but this one appealed to me specificially, because one of my pet peeves in movies is the "Disposable Girlfriend" who doesn't return for the sequel.

It's _stupid_ when things like "The Karate Kid" or the first Batman movie (the one with Michael Keaton, years ago) make a big deal out of "getting the girl"... and then by the next movie the hero's forgotten all about her and has to go get a new one. It's something movies do that's _stupid_ and it _annoys_ me.

This undermines a movie for me for the same reason the sequel to Ghostbusters trashing _everything_ they'd achieved in the first movie drove audiences away in droves. Die Hard II: his wife's back and he has to rescue her again, and it was just as good as the first one. Die Hard III: he's on his own and it not only screwed up the entire dynamic, it made him a pathetic loser.

I like sequels that don't fall into this trap, like The Mummy Returns or Spider Man 2. Yes, the female love interest was actually a part of the cast and involved in the plot. In many cases, when she returns she's leveled up. (More so than the hero, who had to be pretty maxed out by the end of the previous movie so the hard part this time is finding a fresh _challenge_ without power inflation washing out all potential for drama. Letting the heroine kick ass alongside the hero is new development for _her_ character, and I dunno why they don't take advantage of it more often. There should be more "love interest from previous movie has to rescue hero from previous movie" sequels.)

Recruiter season. (Got another call at work today.)

I finished a third week of QEMU Weekly News, but the fourth week of January starts with a bunch of patches posted to the list (with no significant discussion). Before I try to summarize that I really need to get a mercurial mirror of the qemu repository up, so I can link to commits that went in. (That's what the "repository" section at the end of each week is supposed to be for. I can go back and fill in the previous weeks, and then do week four and plow on in hopes of catching up.)

I gave up on tailor a while ago (it treats mercurial as an afterthought, it's really a darcs project and I don't care about that). I still can't get the built in "convert" extension to do anything useful. I downloaded svn2hg which actually works and seems nice, but I want to tweak its behavior (svn commit numbers should go in the checkin comment, preferably at the end so the one line summaries that the hg web browser gives aren't shortened).

I wrote my own svn2hg converter back when I was poking at busybox and doclifter and such (/code/, and I kept meaning to make it properly mirror an archive (rather than doing a one-time conversion) so I could use it to keep a uClibc mirror up to date. (I used to do so with tailor, until tailor died when I upgraded to Ubuntu 7.10 and I couldn't get it to work again.) I haven't poked at it in a while because other tools theoretically already do this, but if I can't get 'em to work and I prefer the output mine creates...

I should really write a new skin for the hg web viewer. Or at least modify the current one to show three lines of description rather than just one...

May 22, 2008

Permission to go half-time at work: check. Noticing that the majority of their customers want to use the C API, and that the vendor of one of the big tools they're using said C++ support "is not the most used feature in [tool]": check. Actually being directed to check in code and start talking about code: check.

Towards the end of week three of this job, things are finally starting to look up.

Hooked up my laptop to the internet so I can check email and update my blog while at work. I have a vmware instance of kubuntu masquerading for me. The layers of indirection here are kind of impressive, really.

May 21, 2008

I just finished summarizing my third week of QEMU Weekly News. Alas, this is the third week of _January_, meaning I'm now about 5 months behind, but I'm catching up. Most of the delay was the Houston job, during which I got nothing done. (This is one of the reasons to go half time at my day job; little things like this fall by the wayside, and there are a lot of little things like this I try to do and enjoy doing.)

Of course yesterday's "noon tomorrow" was optimistic. Stopped by my boss's office at noon: nobody there. At least the note on it had been updated to say today, no mention of a time. Sent him email about going half time, got his out of office autoresponder.

The spec for the piece of code I'm writing got updated again, due to a conversation I wasn't involved in (but at least I got cc:'d on the actual update part). As far as I can tell, I'm expected to have precisely zero creative input into this process.

Oh, and it turns out that anything I send from my work email has the following appended to it sometime after I hit "send":

This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient. Any review, copying or distribution of this email (or any attachments thereto) by others is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.

I saw this because my recruiter's reply included the entire message I'd sent. I didn't know it was doing this. The depth of Epic Fail in the above paragraph is just awe inspiring. It's not even enforceable (legally or otherwise), it contains no actual information (not even of the "may contain traces of peanuts" variety), it assumes the people using the email system are morons who don't know who they're sending confidential data to (hint: if you're sending it outside the building as a cleartext email, it's over already)...

May 20, 2008

It occurs to me that if my fingers hurt even when I'm not moving them, it's less likely to be some variant of arthritis and more likely to be something like my darn sinus infection (which came back, of course) impinging on _new_ nerves. Sigh, I should go see somebody about that...

Still planning on talking to my boss about going half time, but the note on his door about being back today (which is still there) turned out to be somewhat optimistic: his email says he's in New Orleans and now expects to be back by noon tomorrow. (Michael signed my timecard.)

No programming last night, watched Dr. Who episodes instead. Human Nature, Family of Blood, Blink. All _excellent_ episodes, although having seen them both Human Nature/Family of Blood should get the Hugo. Blink is quite nice, but it was a "bottle" episode (like last year's horrible "Love and Monsters") that the main cast was hardly in, and it contained rather a lot of filler (the montage in the last 15 seconds was totally unnecessary and undermined the entire episode a bit, I thought). Plus Blink has plot holes you could drive a truck through (the monsters move when the light in the basement goes out, they're trapped with all four looking at each other... in that same basement, with the single light bulb that was flickering earlier. Oh yeah, that's a permanent solution that'll keep 'em locked up forever. Who's paying the electric bill in the abandoned house, anyway? Presumably the Doctor fixed it all up afterwards, but still...

Meanwhile Human Nature/Family of Blood gave David Tenant the chance to really stretch. The story was good, the acting was good, there were very few effects to get in the way. (Yeah, the scarecrows were kind of cheap and hideous but they're actually _supposed_ to look like that.) The story and acting drove each other in a way that they really didn't in Blink

My favorite line of the season so far belongs to Blink, though. Family of Blood had the marvelous "You should never have let me press all those buttons", but you just can't top "It goes ding when there's stuff". That's sheer multi-layered brilliance.

"It goes ding when there's stuff" is actually character development on the part of the Doctor, an extension of nine's "Jiggery pokery, that's a technical term" but could also be seen as a response to the Family of blood line "does he really talk like that?". It's not _quite_ that he's talking down to his audience, more that he understands them better than he used to. The William Hartnell era doctor didn't really like humans and would happily lie to them until an individual human had earned his respect, but by about Jon Pertwee he honestly tried to explain things to everybody (with lectures and whiteboards if necessary), and Tom Baker educated Leela to the point where she could cope with Gallifrey (admittedly by sticking knives and arrows into bits of it, which worked surprisingly well). But these days, it's not so much that he's gotten tired of fighting his listeners' lack of background knowledge, it's that he's realized most of them aren't actually _interested_, and they just want the bits they can cope with so they can move on.

(All that said, Stephen Moffat's won the Hugo for the past two years, so they probably won't give it to Blink this year if there's an equally strong candidate just to give somebody else a chance.)

I really, really, really need to start adding span tags to this blog so I can filter individual paragraphs by topic. Possibly I could get topic-related rss feeds automatically generated too. Hmmm...

Bought a 16 gigabyte USB key at Fry's yesterday (on sale for either $60 or $70, I forget), reformatted it ext3, and backed up chunks of my laptop onto it. Not quite enough for the Kubuntu 8.10 reinstall I need to do (I should dig up the 500 gig USB drive for that), but the 4 meg one just wasn't big enough for "my website plus my email" anymore. Which is sad. (The new one doesn't quite fit on my keychain, but I can probably arrange something with a better lanyard, and in the meantime I can carry it in my laptop bag no problem.)

Also got new headphones. Yay new headphones.

May 19, 2008

Back at work. I don't want to go on the cart.

I need new headphones. Can't find the big silver ones I bought at Wal-mart, hope they didn't go the way of the first PSP. And I need internet access at work. (The windows machine has it, but my laptop doesn't. Hooking one to the other and having the vmware instance running Kubuntu masquerade, but that would probably make the uber-anal firewall unhappy.)

My fingers have been hurting at night. It's like arthritis or something. Only really happens when I go to bed and try to sleep. I know I hurt them trying to pry the driver's side car door open last month (which is why I don't do that anymore, I go in the passenger side door and open it from the inside. It's down to 3 kicks, hopefully after another few dozen openings like that it'll stop sticking and open normally again). But it'd really _suck_ if I damamged something that isn't healing right and I wind up with arthritis in my 30's. (Did I mention I have a hypochondriac streak? Mostly I try to ignore it...)

Still at work. Still not enjoying it. I want to drop down to half time and see if I'd have better luck dealing with it in smaller doses, but my boss isn't in today. (This also means I can't get my timesheet signed.)

So I wrote up a chunk of code, and then found out that the spec I'd been given had a flowchart (starting on page 25, yes it's that long, and I note this is the third draft of it I've received so far but the first one with enough information to actually implement anything) detailing exactly, step by step, how they wanted the code to work. I.E. it would have been _less_ work to write the code than to make the darn flowchart. If they _had_ this, why did they ask me to write code? This is "transcribe", not write. (And no, the code I wrote doesn't look anything like their flowchart. Oh, and they have lots of enum typedefs for "event and message enumeration", but they didn't give it to me as a header file, they gave it to me as a PDF with each enum in its own document section.)

The frustrating thing about this job is the way they make extra work for themselves. They have no functional modules yet, but they have a huge build system to compile the masses of glue code they've already made to connect the prospecitve modules together. They don't seem to consider the actual functional parts particularly important, as long as they've got enough glue and sufficiently detailed internal interface specifications describing all the messages they're passing... to themselves.

May 18, 2008

Hmmm, the new toybox is failing to build during the mini-native phase, and it has something to do with host-tools. (If build/host is in the path, the build fails. If it isn't, it builds fine. Ok, now what did I break...)

Yes, this is part of the reason I build that way. Smoke test!

Redoing the FWL about page to prepare for the next release, and as usual the "What is Firmware Linux" tab is the hard part. Describe your project in three sentences or less. Hmmm...

Amused by this bit about how Obama's campaign appeals to Silicon valley, and how he raises so much money from small donors using an online approach. No wonder he's won young people and the internet. The question is, will that be enough or do we have to wait for the baby boomers to die off before we get somebody like him?

Metro is closed. There's a note on the door saying to shove mail under it (for five different organizations, of which "Metro Espresso Bar" is #2 on the list), all the metal cabinets that once held cookies and juices and such have been shoved against the front windows mostly blocking them), and if you look past that the inside is full of piles of lumber. I'm strongly suspecting this is their going out of business strategy, although they _might_ just be remodeling (they did buy new couches last month). Or perhaps the owners sold it to people who plan to open a new coffee shop there (entry #4 on the list was another coffee shop name). Either way, hanging out at whichwhich instead.

Heh, if you run bash with $PATH trimmed to just build/host, it goes kind of funny trying to run .bashrc out of your home directory. (Spent a while tracking down the six lines of complaint bash was making. Turns out to be irrelevant, but now I know why.)

I've also tracked down why build/host is winding up in the path twice. (The top level wrapper script, either or, is setting the path equal to that. And then is inserting it at the start of the path.) And that's legit: the point of the wrappers is to _remove_ everything else from the path, the point of is to add it to the start of the path. And if I have the wrappers totally blank the PATH then call, the `pwd` call in won't work to set the path properly at that point. Hmmm. I suppose I could make include check if the path already equals the host dir, and not add it in that case... Except that when the cross compiler is prepended to that $PATH, host-tools would get prepended again. But that's not happening right now, so the sequencing must prevent this. Ok.

I must admit a slight discomfort with the "my script is being untidy" vs "adding extra complexity to check for and avoid being untidy". Simple is better, but having to choose between a simple _process_ vs a simple _result_ is a no-win scenario...

Working on documentation for the next FWL release. I'm redoing the "about" page hugely, and dumping a lot of the "design" material into it. I'll have to redo the design page after this...

May 17, 2008

At Epoch, on the net, catching up. Having a job in an office, with my time being tracked and paid for, is incredibly isolating. No internet, can't take 5 minutes to answer an email on a topic unrelated to work, and something about being in The Box and arguing about trivialities with people who Just Don't Get It is exhausting, so when I get home I just want to play World of Warcraft or go to bed. Not good. (Money is good, but is this what I want to do with my life? Yeah, same question as the previous job, but once again they've got me wrestling with Outlook and trying to do Linux work in a Windows environment, with C++ blindly considered a good thing.)

The end result is I just replied to some email I've been meaning to get to for 3 weeks now. Eek. Beats not doing it at all, but not by much. (Glances at qemu weekly news, where I'm currently finishing the week of January 15th. Yeah.) I also told somebody on wednesday I was available for phone conversations with 24 hours notice... and then didn't read my email again until Saturday morning. I feel horrible about that...

Ok, toybox. FWL is blocked on the next toybox release. Right. The command line parsing stuff. The seq thing could be fixed by simply not checking for any options when the option string is empty (except for prefixes), and that case should probably auto-set the + and ? prefixes. But that doesn't solve the "echo -nex" case. What I really need to do is back up and include the argument verbatim, which means undoing any flag setting that happened. Checkpointing flags is easy enough (it's a long) but what if there are arguments? "tar -Cdirname" is easy enough because the rest of the argument is eaten verbatim so can't be invalid. If it needs to be an int and isn't (ala "tail -nxxx") we error out so no recovery's needed there either. The funky corner case is the non-dash options ala "tar xvjfC filename dirname", except that "xvjfC" is known to be an argument due to its position, and any non-option arguments in there also error out. So, I don't currently know of a recovery case that has to restore anything except flags. (No unsetting variables, or peeling things off the end of lists. Which would be too much like work anyway and I'd probably just ignore it, but it's nice not to have to.)

Ok, fixed argument parsing, updated echo to use the right argument parsing mode, added an echo.test (and updated it so it wasn't just testing the shell builtin), found a bug in "which" and fixed it, finished seq and seq.test and checked in both. Not a bad afternoon's work.

Downloading the new Kubuntu image. The only places that include KDE 4 are overseas, so it's a touch slow download-wise. (I did all the above while it's downloading, and it's about halfway. I remember when 50k/second was crazy fast...) Luckily, wget -c will continue an interrupted download, since Fade and I are likely to head dinner-wards before too long.

I have a nice list of technical to-invite people for Austicon. Probably wind up flying in more than 5 GoHs, thanks to the corporate sponsorship the SFLC got us.

May 16, 2008

Sitting down and forcing myself to write the chunk of code work wants me to write. The actual task it's performing is very simple. Almost all the actual work is in interfacing with the other pieces of code. They have endless meetings about these unnecessary internal interfaces. They've sucked in message passing libraries to help make them bigger and more imposing. And they're not actually _needed_. If they didn't spend all their time getting in their own way, this project might be done by now. (I've seen a transcript of what goes across the wire, it's not brain surgery...)

"Consultant", noun: person hired to do stupid things for people with more money than sense.

May 15, 2008

To add or remove packages in Kubuntu, never go to "add/remove programs" in the start menu. Go to "System->Adept Manager" instead. Both ways launch the same program, but the first gives you a Gnome-style "you are too stupid to understand this, look at the pretty pictures" view with most of the interesting functionality removed.

Just FYI.

Went home sick from work. Slept for several hours, then played WoW.

May 14, 2008

Eric reinstalled the server (Ubuntu 8.04 now). My website is up, and my email is accumulating, but I can't read it yet. Whole lotta backups going on.

Reading a book on fax stuff for work.

May 13, 2008

Morning, at the Mug of Unity with Fade. Still no internet here.

I need to write a dhclient that isn't stupid. (Don't request the old address when the wireless access point has changed, go straight to discover. If you do request, don't pause for the full retransmission timeout after a NAK.)

Bought an actual World of Warcraft account last night. Yes, I'm aware that Blizzard is suing people claiming that copyright law lets them eat their brains (but not their eyes). And this competes with programming time.

Adding seq to toybox. Hit a fun corner case: seq's arguments are numbers, which can be negative. Meaning "seq -1 -2 -3" is a perfectly valid command line. Except that the option parsing logic sees "-1" and says it's an unknown option. Right.

In theory I can feed the option parsing logic the "+" and "?" options (which say stop at the first non-option argument, and don't error on an unknown option, respectively. This is documented at the start of lib/args.c by the way). Unfortunately, when I do that, "./toybox seq -1 -2 -3" hangs in an endless loop in the option parsing logic, because the "don't error" case was never tested and doesn't advance past the option. (And advancing past the option isn't what I want, I want to keep it as a non-option argument.)

Sigh. I need regression tests for the option parsing logic. (It's got fairly complex behavior. The "--" to stop early, for example. --longopts. The "tar xvjfC file dir" stuff. Right now, "echo -x --longopts" works with Ubuntu's echo, but not with toybox's. I need to fix that.

Ok, so what should happen when a command understands "-n" but not "-x" and gets "-nx"? Let's see... "echo" understands -n and -e, but not -x, and "echo -ne" does what you'd expect (in the absence of additional arguments: nothing, but it doesn't complain about it). Next, try "echo -nx" which prints "-nx", I.E. it does _not_ eat the -n which it theoretically understood. And the -n doesn't trigger as an option either, it prints a newline after the output line, which is what you get in the absence of -n. So it's backing up and undoing the parse? Unlikely. "echo -nex" prints "-nex", so it's not one character lookahead. "echo -xen" prints "-xen" so it's not parsing backwards. It has to be scanning the entire string, making sure it understands all of it, and then rescanning it a second time. Which is just _silly_.

What does susv3 say here? (There is an susv3 spec for "echo", but not for seq, or mount, or init. Sigh.) "Implementation defined." Wheee...

May 12, 2008

Got mdev beat into shape (haven't redone the exec functionality yet, but it should work with a 2.6.25 kernel), dropped it into the firmware build (set "SHA1SUM=" to blank in and then from the toybox dir go "hg archive -t tbz2 ~/firmware/sources/packages/toybox-0.0.5.tar.bz2"), and of course it broke rebuilding I needed to yank mdev, cat, and rmdir from the busybox config, then I found a totally unrelated bug in toybox and fixed it. (Yes, the firmware build remains the best test harness for beating busybox/toybox to death and finding bugs in it, but how can keeping a list of command names sorted be so darn complicated? I'm now taking a "nuke it from orbit" approach with two different sed invocations in the pipeline.)

I started around 9pm sunday night. It is now 1:44 am monday morning, and I have to go to bed soon to get up for work in 6 hours or so. And THIS is why I've developed a reluctance to sit down and bang on my code. I hate being interrupted. I work based on momentum, and when I get up a good head of steam I don't want to stop and not get to work on it again for a long time. I'd rather just not work on it until I can clear a large enough block of time. I'm glad I got some stuff done, but now I'm really really really not looking forward to work in the morning because the comparison with real programming I enjoy makes that job even _less_ fun. Sigh.

Still, I might get to actually do some coding at work today. (Friday's meeting did actually end on a positive note, it just took a while to get there.) But first, bed...

And the build breaks because I didn't include the pregenerated help file in the archive, and generating it requires python. I knew that. So untar the archive that "hg archive" makes above, copy in generated/help.h and tar it back up. Right. Now "rm -rf build/mini-native-armv4l" and re-run "./ armv4l" and "./ armv4l"...

Yay, it worked. Back to getting the distcc trick working out of the box (which will require a new toybox release to get it working, but with mdev I've got enough to justify that.)

Huh, I got a message on the FWL mailing list on the 8th that I hadn't noticed. Kmail's new message indicator didn't update. (One downside of the sucker crashing so much, the indexes don't always get recalculated properly when it comes back up until I actually go to the folder.)

Noon, at work, I feel hung over. I'd blame this on being old and decrepit and no longer able to be happy on 5 hours of sleep, but to be honest when I was in my early 20's I never tried to function on less than about 6 hours of sleep. (Sure I'd stay up for 24 hours... and then crash for 10.) I'm actually _better_ at the sleep deprivation thing these days, through sheer practice, but I'm not enjoying it.

Got a phone call from the Stafford police department, still very upset at me because I did actually have car insurance when they pulled me over, and they want me to pay a fine and accept points on my license. So I'm hiring a lawyer. (As Harper said, "Millions for defense but not one penny for tribute". Or "I tried to resolve this nicely over the phone and got a bureaucrat whose head was so far up his own ass he couldn't even hear me.")

Why do people think police are anything but bureaucrats? They drive around a desk and fill out forms at you in triplicate (they keep the white copy, you get the yellow copy, who knows what happens to the pink copy). The result is an appointment to go talk to people in offices so more forms can be filled out, and they get extremely upset if you miss this appointment. They never create anything, their job is to prevent stuff from happening. This is textbook bureaucrat.

At home, trying to run WoW on my Linux laptop. Installing the new wine was refused by apt for reasons unknown. Instead apt is suggesting I update to 8.04. I've never gotten one of these update tools to work. (67 packages to remove, 141 to install, 927 to upgrade. Downloading a total of 958 megs.) I should really really really back up my laptop before doing that...

May 11, 2008

I'm watching the video of Clay Shirky's "Where do people find the time" talk, and this is after reading the blog entry on the same topic (which is more or less a transcript of the talk). It's quite good.

I'm not sure whether I've had no time, or no energy this past week. It's a little of both. Firmware is still blocked on adding mdev to toybox, and the problem with mdev is I'm fighting with my infrastructure. (The design issues are the ones that take forever to work out. Just implementing stuff is easy. But when I can think of 12 ways to do it and none of them are quite _right_, that's when I get blocked.)

(Yes, programmers get writer's block. The good ones do, when doing hobbyist programming. It's a creative activity, if you can't get writer's block it's not a creative activity.)

Converting mdev to use dirtree means I now have a third user for dirtree, and once again the dirtree infrastructure isn't quite _right_. I want to make this both generic and have it to everything its users need, without making it enormous and complicated. This is hard.

Right now, I want a depth indicator in the recursion and it's... Ooh! Ooh! I just figured it out! I was hung up on adding an extra argument to the function (bad) but I've got a structure it can go in. I can also put the length of the string in this structure, although calling strlen() on the whole path again is slow, but it's cache local, and being fancy with checkpointing the previous length is both unnecessary complication and it makes the code bigger. Is keeping an extra local variable on the stack while recursing really an improvement over having an extra argument to the function? (Yes, because the function call API imposes on outside callers starting a new recursion, I.E. the users of said API. Don't mind me, just thinking out loud.)

It's the tradeoffs that eat time and effort. If you just want to make it work it's easy to bang out one quick way to do it and worry later; it's usually going_to run in less time than it took to write it. If you want to do it right and have code you'll still be happy with a year later (especially shared infrastructure like the dirtree code you expect to re-use many times in future), you often wind up examining several different approaches that just move the bad cases around rather than fixing them, and then you wind up spending the whole day thinking about the problem rather than coding. (Which can actually be a week if you can't spend all your time devoted to this problem but have to take it in small chunks around other things.)

May 9, 2008

I asked if there was any kind of spec for a yet-to-be-written module at work, and they sent me a flowchart. An honest to goodness flowchart, with diamonds and ractangles and ovals connected by arrows, of a kind I last saw in my Fortran programming course at Rutgers in 1992. (And we have a meeting about it at 1:30... meeting started with a 2 hour semantic argument about whether states in the state machine should be named with verbs or adjectives (really) and then started being actually productive but ran for four hours total. Totally fried.)

Over in FWL, I updated the threaded version of "hello world" to pass the "Hello world!" string from one thread to another, using mutex and event sempahores and pthread_join(). This is an impressive amount of effort to do very little, but it actually exercises the thread library which the previous one didn't really.

May 8, 2008

Quote of the day from an email from my boss: "I would recomend that you use Internet Explorer to access internal [company] web pages -- I've found a lot of pages that don't work properly in Firefox." The email is outlook, the machine on my desk runs XP (although it's got a vmware instance of Kubuntu)

Meant to do programming when I got home (didn't have my laptop with me at work today so I scribbled four or five notes to self on a piece of paper as I thought of things I needed to do), but wound up playing Valkyrie Profile on the PS2 instead. I'm detecting a theme here.

May 7, 2008

Yesterday's attempt to switch to a day schedule involved enough caffiene that I didn't get to sleep until 6am, and really wasn't in shape to go to work in the morning. Took half a day off sick to catch up on sleep.

My time in the office was mostly taken up by an hour and a half long meeting about the best way to pass a blob of data between threads. This is basically an array of char[]. and we know the size. The logical thing to do is pass a pointer around. Slightly less logical thing to do, feed it through a pipe. (So why use threads then?)

Considerably less logical thing to do: instantiate an instance of a C++ class for each message (with constructor and accessor functions... for a blob and its length), and have a second class representing the connection (each thread having an instance of this for each other thread it might want to send stuff to, yes that's N^2 many of them).

Amazingly less logical thing to do: write up a seven page spec about the overdesigned C++ approach and then argue about it for an hour and a half in a meeting.

The actual "faxing" problem is something that worked just fine under DOS in 1992. (Protocol's changed a bit, but not the basic problem.) Not brain surgery. The hard part is convincing a hardware company that if you can't reliably hand off data between threads in your own program, the program needs to be _fixed_, not covered with a thick layer of redundant error checking.

May 6, 2008

First day at the new contract. They gave me a windows machine, which runs Kubuntu under vmware and has things like the serial devices tunneled through to the vmware instance so kubuntu can talk to the arm board. Why on _earth_ they do this, I have no idea. It comes with a big 20 inch CRT monitor of the kind they stopped making 5 years ago.

The arm board itself is a fairly standard xscale system, which for no apparent reason they put in a giant enclosure with a battery but no on/off switch. Epic fail: not only does a development board like this have no possible use for a battery backup, but it means you can't even reboot the thing by unplugging it and plugging it back in. You have to stick a piece of wire into a tiny unlabeled hole in the back of the thing.

Oh well.

May 5, 2008

Poking at mdev, being kind of annoyed at the sysfs developers. My laptop is still running Ubuntu 7.10 with the 2.6.22 kernel, meaning it hasn't got /sys/class/block (or /sys/devices/{platform,system}). So the obvious way to implement mdev for the 2.6.25 kernel doesn't work on the 2.6.22 kernel and the obvious way to implement it on 2.6.22 would break on 2.6.25. And this is something like the fourth time they've done this.

Implementing mdev has always been a case of "fighting the API". Sysfs changes all the time, and not because the data it's exporting changes but because they can never decide how they want to represent it.

In the beginning /sys/block was a flat list of block devices and /sys/class was a flat list of char devices. It was easy to find all the block devices and all the char devices. Then the sysfs developers moved directories for block devices representing partitions into the directories for the parent block device they were partitions of, making a multilevel hierarchy you had to traverse. Rather than try to guess what other changes they'd make to the structure in future (and they've changed it a lot since), I just started recursing down looking for "dev" entries. Then they added the "devices" symlink which pointed back up in the tree and made descent following symlinks into an infinite loop, so I stopped following symlinks. Then they made /sys/block contain nothing but symlinks. (Each instance of breakage was a different kernel release; each of these strategies worked for at least one kernel release.)

At one point the sysfs developers assured me that my recursing strategy wasn't needed because all I had to look at to find all the dev entries under /sys/class was /sys/class/*/*/dev, which doesn't explain why the /sys in Ubuntu 7.10 /sys/class/input/input0/event0/dev and friends (which contain one level too many)...

May 4, 2008

Saw Iron Man last night. It was good. The guy who played Flynn in Tron makes a decent bad guy (despite the writers giving him _nothing_ to work with), but the guy playing Tony Stark stole the show. (Luckily, he was the main character, so it all works out.)

So, the Firmware Linux release is blocked on making work, which is blocked on making work, which is blocked on adding mdev to toybox, which is blocked on finishing rmdir in toybox. Squeezing bugs out of rmdir has me running tests that should be in the regression test suite, which adding scripts/test/rmdir.test. Running scripts/ runs all the tests, except that cat.test doesn't work when run from there (because it's has a stupid relative path dependency, and fixing that broke two other things...) Plus I never checked cat.test into mercurial.

There was a mash episode like this, trying to get tomato juice for Col. Potter. The song "there's a hole in the bucket" comes to mind, except I'm trying to get something _finished_, not spawn endless tangents to delay it. But this is how open source projects always go for me.

So that's why getting cat.test minimally working and checked into mercurial is one step closer to the next Firmware Linux release. (Hey, at least I'm not currently playing World of Warcraft. :)

On to rmdir. The problem I was having with it turns out to be that loopfiles() isn't actually a good fit for rmdir. That opens each file and passes a file handle in to the callback function, but you don't want to do that when you're deleting stuff because it could have permissions 000. (Yes, my test case checks for this. I also note that the gnu version of rmdir -p can't cope with a parent directory with permissions 000 any more than rm -rf can. No, of _course_ the standards don't mention this, but I think my rm -rf should be able to handle automatically zapping the contents of subdirectories that could be made accessable via chmod, at least when you say -f to force the issue.)

May 3, 2008

Part of the reason I've been so discouraged about banging on my open source projects is the job starting on monday. I can't sit down and get into a serious groove programming because I'll have to leave it half finished, and it's easier to just not start yet.

When I'm not working I'm not making money for Oxford, so I understand they have an incentive to wave more contracts at me as soon as possible. And there have been times in my life where I needed a job and didn't have one, sometimes for months at a time, so I have a hard time turning _down_ a job I think I can do. But it gets silly when I tell the recruiter I plan to show up around 9am, she checks and corrects me that I should show up at 8:30, and the actual manager tells me there's no point showing up before 1pm because the network account won't be set up before lunch (and if I wanted to just start Tuesday that's fine with him too)...

However, with monday as a deadline if I want to get an FWL release out with the distcc trick working before I get buried in work again, I need to bang on FWL this weekend. So...

Patched User Mode Linux to turn a bunch of KERN_ERR warnings into KERN_WARNING. (Attempts to use configured-out channel types are _not_ so important they shouldn't be shut up by "quiet".) Submitted that upstream.

Propagated $WITH_HDB through the plumbing until qemu is actually being fired up with a second drive when ./ is called, and now I remember why I was blocked on that. I have to go finish mdev in toybox, because Greg "why would sysfs need a stable API?" Kroah-Hartman and Kay Sievers broke the mdev in busybox 1.2.2 and it's no longer finding _any_ devices. It looks like what I need to do now is look for /sys/class/*/*/dev and if the first "*" is "block" it's a block device, otherwise it's a char device.

Except that over in toybox land, I'm halfway through adding both rmdir.c and sort.c. So I can either put more stuff on hold (pile the stack higher with more interrupts) right before going away for a long time so when I come back I have no idea where I left off, or I can try to finish the tangents first and probably run out of time/energy before starting the new job monday.

This is why I want to start a new consulting company...

Hmmm, laptop battery running out. Must leave the free soda refills at the mug of unity one mug's Einstein's bagels and head out to somewhere with outlets, and possibly internet access. Metro remains closed on weekends. It is sad.

AAAAAAH! The music in Tapioca Touse is somebody doing a sappy cover of "Seasons in the sun"! The original was bad enough, why would anybody want to make more of it? (Ah, it's over. Thank goodness.) On the bright side, their taro milk tea is just as good as Coco's, there are more outlets, and their meal combos come with a bubble tea as the beverage. Might take them up on that later...

May 2, 2008

Played World of Warcraft all day. Started a horde priest to play with Fade, and a night elf druid. Did the standard newbie animal slaughtering and plant harvesting elf area newbie quests with the druid (showing oneness with nature by killing it), and am now wondering if skinning/leatherworking is a good profession for a druid (peace, harmony, chop up recently killed animals and wear bits of them) or if mining/engineering works into the theme better here...

May 1, 2008

Banging on FWL, redid the plumbing that constructs so I can make actually work. And testing them all, I find that mipsel went bye-bye. When did that happen? (Something to do with the 2.6.25 upgrade, perhaps?)

Yup, it's definitely the kernel. Probably what happened is the kernel config added some stupid menu guard symbol or some such, again, and I need to update the miniconfig. (What I really need to do is revamp the miniconfig gui patch and start using it again. Die with an error if the config tries to set an unknown symbol, and open parent menus when the config tries to set a symbol with the broken type of guard that they added a few months back.)

Went back to playing World of Warcraft in the evening. Apparently, a trial account caps your character at level 20, and your two professions at 100 points each (but not cooking/fishing/first aid). You also can't trade or send/read mail, can't use the auction house, and can't whisper to anybody (although that seems mostly aimed at gold farmers, and doesn't stop the incessant whisper spam aimed at low-level characters).

April 30, 2008

Fade went in to work today, taking her laptop with her. The hypnotic WoW machine is gone for the moment, time to catch up on backlog! (Oil change, hit the bank to get a replacement debit card, laundry, grocery store...)

Hmmm. Apparently, if you leave a laptop in software suspend and then don't use it for 3-4 days, when you come back the battery has died and it cold boots. Good to know. :)

I have much email. It is downloading. (The slow part is SpamAssassin grinding through over 10 megs of data...)

Implementing rmdir in toybox. It's small and simple and a decent warm-up exercise after a few days away from the keyboard. (Well, the non-WoW keyboard.) Also running a test build of every firmware arch against the 2.6.25 kernel to prepare for a release.

Gasoline is expected to hit $7/gallon within 4 years. Not really much point in trying to track peak production at this point, look out the darn window. I'm amused by a cover story in today's Austin American Statesbeing, about how the Republicans in congress are trying to blame the Democrats for high gas prices, in hopes of winning back congress. Right. (And of course in knee-jerk response Clinton II supports cutting the gas tax, because that'll fix everything and it's not like the government needs to pay for road construction or anything else that can be deficit financed indefinitely. Sigh.)

If Obama looses, I'm voting for him as a write-in candidate. I cannot bring myself to vote for Clinton at this point, any more than I could the other spoiler candidates like Nader. Yes, I'm aware of this, although from what I've seen women who take the approach "my group needs X" instead of "I personally need X" don't trigger this so much (and geeks react more like women than like Jocks to men being aggressive and pushy anyway; we ain't in the ball club), but my objections to Clinton are things like this and many others like them. I do not trust her judgement. She's a political animal who would do absolutely anything to get elected, and has no obvious values/goals/agenda _except_ getting elected. Obama's in hot water because he _didn't_ sell out his pastor friend at the first opportunity. I consider that a plus, actually. (Does Clinton even have any friends she's known for 20 years, who aren't merely political assets? It never comes up, somehow...)

Sigh. I crash kmail about twice a week. If I pop up a new reply window on a heavily loaded system (such as the firmware builds going on in the background), with lots of reply text, and start editing the reply text within the first second or so of the window being available (I click and type fast), sometimes it'll freeze. When it does that it means I need to wait for whatever weird recursive explosion is going on to blow the stack, crash kmail, and then I can re-launch it (at which point it gives me the window back, with the edits I managed to make! Apparently there's some race with its save-state checkpointing or some such. It doesn't happen often enough I can give a reproduction sequence, but often enough to make me ponder thunderbird or some such.)

I'd happily apply an Ubuntu update that fixed this, but who knows what each update fixes (and what it breaks). I also need to update to 8.04 which will hopefully fix this, and _maybe_ not break 80 other things since it is an LTS release. (I'm told knetworkmangler is still a rabid diseased abomination, though.)

April 29, 2008

More World of Warcraft. (I now have a level 7 priest and a level 17 mage.) Again, didn't turn laptop on all day. (Also didn't go do laundry, didn't go to the grocery store...)

April 28, 2008

Glenn Henshaw pointed me at which makes the suck go away, so I guess I'll keep reading that one.

Lunch with the Silicon Labs people. They want me to go work for them (through Oxford again) on a six week project to get an arm Linux reference platform out to show customers how to use their new fax chip in an actual fax machine. (A little xscale board, armv5l with 32mb flash and 64mb DRAM, talking to their chip via a 16550 serial tty.) I didn't _mean_ to take another job so soon, but I'd originally meant to stay in Houston through August and this project ends shortly before OLS, and their offices are within biking distance of where I live. (I can get _exercise_ on this commute. I told 'em I can start Monday. Nothing's final yet, but it'll probably happen.)

Went home, played WoW a lot. Didn't even turn my laptop on all day.

April 27, 2008

Fade is having fun with her new iMac. The screen, it is big. Finally hooked up her big speakers. She is having much fun with the thing back home.

Me, I'm hanging out at Coco's. There is internet here! There aren't many plugs, and I seem to have left Mark's last night with a half-full laptop battery. Hmmm... The table in the corner has an outlet, though.

The new website redesign is horrible enough that I think I may actually stop reading that comic. It's just not worth it. (The comic flashes up, then gets replaced by a flash app that doesn't work. You can read most of them (really small) in the archives, except Sundays only show you the first three panels... Oh well, Scott Adams' problem, not mine. I have over a dozen other webcomics I read daily, and another 30 or so in a text file I remember to check in on every couple weeks.

Created a World of Warcraft 10 day trial account. (Now that Fade's got an iMac, her macbook is free for me to play WoW on.) This could be bad...

Fade also got me a new PSP, with Disgaea. What it does not seem to have is a memory stick to save game on. (If I'd noticed this before the trip to Fry's, it would have been easy to fix. Alas.)

April 26, 2008

Last night's thunderstorm cooled things down a bit, the weather's marvelous today. I remember lying on the bed, fully clothed, with rain intermittently sprinkling on me (60 mph gusts will do that, despite quite impressive eaves on the condo) pondering whether sitting up and closing the window was worth it. Meant to just nap and then finish the OLS paper. Woke up at 11am instead.

My cell phone is back! Yay! Other mail Fade's saved for me includes a letter from the stafford police saying I never showed up for my court date over the "I had insurance but couldn't find my insurance card when they stopped me" thing, so they want money. And the emergency room I went to a month ago wants more money. And some third thing I don't even remember wants money too. Sigh. Plus I need to tell the electric company in Stafford that I don't live in that apartment any more.

Grocery shopping, drove Fade and Michaela (I.E. Michelle, don't ask) to Michelle's birthday lunch thing, and now I'm at chick-fil-a. (The north location has wireless now too!) Finally a chance to finish the paper...

Sigh. It's sad how one blocked program can hang the whole of X11. (It's not _quite_ hung, the mouse still moves. But the entire screen might as well be a snapshot image, nothing responds to mouse overs or clicking. Thank goodness for ctrl-alt-F1. What's sad is I think I'm about to be thankful for ctrl-alt-backspace, which means I'm going to lose a lot of work. Oh well...)

Fade and I went out to the Apple store, where she bought an iMac. Went to Radio Shack to purchase a firewire cable to sync her laptop to the iMac with. (The Apple store was out.) My record of never having gotten a working piece of hardware from Radio Shack remains unbroken: they sold us a 4 pin firewire cable and we needed a 6 pin. (My previous encounter with Radio Shack included buying a multi-type power converter for my laptop and the adapter plugs in the box having no relation to the parts listed _on_ the box, and when the store manager opened a second box the parts in that one were a different random assortment. The time before that, I bought an audio cable that didn't work. Yes, a bog standard "headphone plug, 6 foot, male-male" type that a sixth grader could make with a soldering iron: DID NOT WORK. It passed no signal. That's... sad.)

The Apple store employee had implied the sync could also be done (more slowly) with a USB cable, but it turns out that was a USB _crossover_ cable, not the kind of cable hooking up the printer and the nail boad. I'm not sure why it couldn't do it through gigabit ethernet (since both machines have that), but apparently not. The software wanted firewire. Right.

Called up Mark to see if he had a firewire cable. He suggested Fry's. Dragged him along to Fry's (they did, it cost 1/3 what radio shack charged us for the wrong cable), then took Mark out to The Cheesecake Factory to preemptively thank him for converting my paper to latex, then back to his place to _finish_ said paper while he converted it. I finally have something I can check in! Yay! (It's somewhat incoherent, missing a couple links, and I want to add more material at the end, but that's optional.)

Fought with the Fedora repository thingy for a bit. I don't do Fedora development (and despite them forcing me to make an account to submit my OLS paper, don't really plan to start), and I think it needs some time for things like joining the OLS group and uploading my public ssh key to propogate so the subversion thingy will use it.

But my OLS paper is IN. (I emailed an almost usable version to the guy in the right format; might be able to check it into subversion tomorrow.)

April 25, 2008

Stayed up until midnight last night working on OLS paper, then set the alarm for 4:30 am and got another couple hours in before work. It went from 2/3 finished to 90% finished. Sent a snapshot in to the OLS guys, hopefully I can get it done later today. (It needs about two more hours of work, but where can I find 2 hours without some other immediate must-do-now thing while connected to the internet around here?)

Cleaned out my apartment this morning as well. It was still mostly cleaned out from the friday before CELF, but there were finishing touches (throw out Mark's Futon pad, flush the dead roach in the bathroom that showed up while I was out of town, etc). Handed in the keys and the gate clicker. Happy to be out of there, I really hope they don't ask me for even more money.

9:30 am meeting with Kevin and the team working on the new direction of Long Salvo. Told them the new direction (minimal changes to the existing amazingly brittle pile of too many layers of indirection and unnecessary wrappers) required people intimately familiar with the existing code to avoid tickling bugs, which meant they needed to use existing employees and not contractors, and that today would be my last day.

Did another 2-3 hours of work with Evan on the emulation thing, got a Kubuntu instance booting directly into full-screen qemu (and showed him how I did it), helped him install Windows XP under that qemu (by far the longest step), showed him instruction pages for the kqemu accelerator module, how to set up tap networking for qemu, and how to change the kubuntu boot screen (google for "usplash theme".) Filled out my timesheet, Kevin signed it, faxed it in, cleaned out my office, and left the building. Goodbye Ion Geophysical Services and Stafford, Texas.

Driving home to Austin is a completely different experience starting out at noon than doing it overnight. I didn't get home until around 5:30, and was in a very very tired and grumpy when I did. Fade made me feel noticeably better, but we ordered in food instead of going out for it, and then I collapsed into the bed.

April 24, 2008

The meeting this morning pretty much confirmed to me that the new direction of the project makes it silly to try to use contractors for any of the work.

Evan's got a little work for me to do (actual, useful work involving booting a Linux box straight into QEMU so it provides the expected Windows UI but runs the underlying Linux daemon that does the work, so you can demo the system with a single laptop). So I'm sticking around through Friday to finish that.

AAAH! OLS paper! Must finish OLS paper. (It's 695 lines long and NOT FINISHED. Late night tonight, looks like...)

April 23, 2008

Back at work to finish up. (Because just leaving is impolite, it's more professional to give some kind of notice and shut things down gracefully. Besides, I have to break the lease on the Houston apartment which is going to be fun.) Robin (the other guy in my office) quit while I was out. The manager I report to (now that Evan's been reassigned) is trying to convince me to stay. There's a meeting tomorrow morning on the new direction of the project. We'll see.

Never rent an apartment in Houston. The pool they showed me during the tour? Still not open. The exercise facility they talked about? Ditto (under "renovation"). And breaking the lease turns out to be worse than paying it off through the end. I'm wondering how much I actually care about my credit rating. (It's not a lot of money, about as much as I've been earning in this job in a week, after taxes. But they're being slimy enough that I really, really, really don't want to give it to them...)

April 22, 2008

Penguicon was fun. CELF was fun. I'm totally fried.

Backfilling the past few days of entries. (The last time I had a chance to update my blog was Wednesday. I've been getting by on 2-4 hours of sleep per night since then. I got 11 hours last night and I'm still deeply out of it.)

My recruiter at Oxford thought that my failure to show up at work on Monday and Tuesday meant I was quitting (and to be fair, I've been seriously considering it, just not that _way_), rather than merely being incommunicado due to travel, losing my cell phone, and the number Sprint directory assistance gives out for the company I'm working at being a wrong number). As such, I got an email with a position waved at me, including the following sentences:

> Strong C/C++.
> Knowledge of Perl and/or Python.

And I realized that I've learned something over the past couple years that nobody ever bothered to write down. Saying "C/C++" means the job will be using C++. Saying "Perl and/or Python" means the job will be using Perl.

People who know/choose python are better programmers than people who only know (or choose to program in) perl. Just as people who know C and choose it over C++ are better programmers than people who either just know C++ or don't understand why C is a better language to program in than C++. This is not a "knowing more languages is better" thing, this is a "some languages encourage bad programming practices, make it harder to read other people's code, don't scale gracefully to large projects, and make it more difficult to maintain and upgrade the same codebase for long periods of time. Simply put, some languages suck for doing real programming in. (Don't believe me? "Cobol." "Intercal." Now that we've established the truth of the basic statement, the rest is just a matter of degree.)

Here's a marvelous blog post about why java is in the perl/C++ camp rather than the C/Python camp. (Sigh. I suppose Lisp is in the C/Python camp, I just can't stand the syntax.)

Heh, I need post titles. ("Quicker, easier, more seductive. Never stronger.")

Anyway, the point is that when an employer ha aa C++ project or a Perl project, they'll often mention "C/C++" or "Perl/Python" and try to imply that the applicant will have some kind of choice. But the programmer never actually does. If the employer wants Python, they'll say "Python". If they want C they'll say "C".

Companies big and rich enough to hire consultants never leave the choice of implementation language to the consultant, especially if they're not the only person on the team, or hired to be the architect of a brand new project and giving direction to junior programmers under them. (As a new hire, for a project management already has sketched out.) Companies use permanent employees as architects, it's a senior position controlling large investments over a long period of time, not a temporary position for somebody expensive but unproven, with no company loyalty who will walk out the door soon with half your IP in his head.

So if you want to do Python, don't apply to a "Perl/Python" job. If you want to do C, don't expect "C/C++" to involve any. (I presume you've figured out by now that if you want to do Linux, don't bother with "Linux/Windows" gigs.)

April 21, 2008

Spent the entire day on airplanes. Confirmed that I'd left my cell phone in the hotel room. They found it and are mailing it to Austin, but who knows when it'll arrive.

Got home around 7pm. Reassured hysterical cats. Went to bed.

April 20, 2008

Another 3-4 hours of sleep and then we had to pack out of the room. Why did the hotel have a noon checkout time this year? (I heard from several people that the hotel hated us. Not sure why.)

Hit several more panels. (The one on the mathematics of voting was fun. Randall Munroe has empirical proof that his vote does not count, or at least counts 1/10^40th as much as somebody in a swing state.) Blew $100 in the dealer's room on Devil's Panties books and Fump CDs. (I'd have bought the "Parental Advisory: ur doin it wrong" t-shirt, but they were out of XL. And I'd have bought an XKCD shirt if he'd actually been _selling_ any in the dealer's room; you had to mail order 'em from the site if you wanted one. I still think he should have had "sudo" ribbons to hand out, so he could order around anybody wearing one.) Went back into the dealer's room when I discovered I had cash left, and bought a couple books.

Wandered by closing ceremonies. It started with Mr. Penguicon talking. Went next door to see Sal and the Aegis crew. Came back, and Mr. Penguicon was telling people about next year's con. Went off to see Sal again. Came back, Bill the year 3 Con chair was talking about how great next year was going to be. Wandered off to the con suite.

I was told that the ceremonial liquid nitrogen dump into the swimming pool was scheduled for 1pm. I didn't go. (I did it spontaneously the first year, because we'd run out of ingredients and still had LN2 left, so we might as well have fun with it. Since, they've turned it into a tradition with some ceremony, except this year the initial _reason_ for the dump got lost. When I went to the con suite after closing ceremonies, there were plenty of ingredients left, but nobody making ice cream because they thought the LN2 had run out. (There was plenty left, ingredients are usually the limiting factor unless you're decanting a _lot_ to play with.) So I made a half dozen batches, including the perennial favorite Chocolate Chocolate Chocolate and Oreo, Orange, Lime, Apple Strawberry Banana (where was Munroe for this, eh?) and one of my personal favorites: honey. Also did Rice Milk Grape, which came out great and made the Vegans happy.

Left the hotel for Sal's place, for the Aegis cookout. Got to play with knives and fire. Sal didn't have a metal spatula, and using a plastic one over an open fire has certain downsides, so I found The Spoon of Approximation (a metal spoon that could sort of fake being a metal spatula) and we used that.

At one point we were discussing how much we missed Howard Tayler being there, and Sal called Howard Tayler so the group could taunt let him know we missed him.

Up until about 4am talking to Sal again. (And Eric, and Cathy, and Fade, and Garret, and Heather. And three _enormous_ cats in dog suits.)

Fun con, but coming right after CELF? I'm glad it's over...

April 19, 2008

Got 4 hours of sleep, then more con. Don't ask me how Tracy conned me into being on an 11am "intro to Penguicon" panel, she's really good at that. (This is me sitting on my hands. I suck at it.)

Saw a couple more of Randall Munroe's panels, and one with Tamora Pierce, Elizabeth Bear, and Vernor Vinge. Jennie Breeden was on the "flirting for geeks" panel, but I had to keep ducking out for some reason (either a panel next door, or Tracy's Idea).

Tracy's Idea was a follow-up to the test we'd come up with the previous night. She came up with a better test, one that could be done at the con, and borrowed my laptop to implement it. (This involved a trip to Kinkos, printing up a bunch of flyers containing fairly obvious things, and seeing what the reaction would be from Mr. Penguicon and his circle.)

Went out to stand in line for Brazilian Beef. Wound up behind Andy Looney, who apparently didn't know that Nifties don't have to wait in line. (It's a perk of being Nifty.) Called over Eric to deliver beef directly to Andy, who was in socks and didn't want to go across the grass. Eric was learning to cook brazilian beef. He was inordinately pleased by this. Got my dead cow after half an hour or so (it was very, very good) and took it off to a panel.

Made chain mail a bit near the Aegis guys, and taught 4 other people (including Fade), but the lighting in Birch sucked for doing anything up close and fiddly. (No windows, spot lighting. Can we say eyestrain?) And four pairs of pliers just isn't enough to do this right.

Wound up missing the first Tesla Coil concert because one person got really enthused about the concept of making chain mail (something to show her kids), yet couldn't quite manage to open and close links. Oh well, known risk. They had more Tesla concerts later (and several videos are online). Visible from the stairwells and the balcony of the smoking con suite. (If you're wondering how they do it, here's an old interview with the guys here in Austin who created it. The ones at Penguicon were much bigger, though.)

Xaina showed up. Yay Xaina. (She's pretty. Also fun to hang out with.) Went to Elven Toast with her in the evening. (They did not serve toast.) Doing elven toast with a warm bottle of Diet Mountain Dew is not quite as pleasant an experience as they probably intended, but it was nice anyway. Alas, I didn't get nearly as much time to hang out with her as I wanted (one of us was always rushing off to some scheduled event), but that's a con for you. I should say hi when I'm back in town for Sword Camp.

Didn't make any LN2 ice cream most of the day (well Molly had told me to stop), but made a little in the evening since nobody else was doing so and they'd missed at least one scheduled time due to lack of volunteers. Noticed Jennie Breeden in the crowd and tried to convince her to pour the LN2. (She almost went for it, but flexed the fingers on her right hand and insisted "I need these". I also missed Randall Munroe making Strawberry Banana LN2 ice cream, which he said was the most delicious flavor ever.)

The breathing con suite was chronically understocked all day, although you could always go down to the smoking con suite to get stuff. (It wasn't a lack of food, it was a lack of volunteers to keep the room stocked.) Still better than the con suite at most conventions I've been at, just noticeably understaffed.

The panel recording didn't happen this year. Instead of reusing the cheap digital recorders I bought and donated to the con last year, people were supposed to come in and record the panels with expensive equipment that needs someone in each panel to babysit it. This comes to mind because it would be more volunteer hours than con suite uses over the weekend. When they didn't show up, redeploying last year's cheap digital recorders (no babysitting, not much of a theft target, yes I thought about it) apparently wasn't an available option. From what I understand, last year's recorders still have last year's data on them. Apparently, the recordings can't go online without a "podcast introduction" read by The Voice of Penguicon, and after the first six he was too busy. (He still thanked himself in the program book for doing it, though.) Oh well. I'm sure this has nothing to do with me pointing out panel recording as the new thing I introduced last year when I was informed that everything I had done recently "reduced my credibility", whatever that means. Right.

Bumped into Tracy in the evening, who was Upset (with a capital U). Tracy's Flyer of Obvious Things We Should All Agree On provoked the reaction I'd expected from Mr. Penguicon. Apparently, he compained about it to his posse, loudly emotionally and at some length, in an open hallway. Later, I'm told his posse actually sang a filk song mocking Tracy and her document. I didn't see any of this, but Tracy had an upset stomach and went to find the loud drumming to take her mind off it for a while before she had to decide whether to try to save it or walk away and start a new one. (I see it as a "cut the baby in half" vs "let the other person have it" thing. That's why I'm not even attending next year.)

Up late, hitting room parties. One of them was showing Star Trek 6. The pirate party had pirate glitter! (Little silver skull and crossbones!) Apparently, you can get it at "Michaels". I asked.

At different times, Sal and Garrett each asked why Tracy was upset, and I did my best to explain but I didn't have my laptop with me to show anything specific. Wound up talking to Sal until the sun came up anyway. (Does that man ever sleep?) He already had his concerns, probably due to the parallels with year 3.

April 18, 2008


Got into the airport at 7am, called Fade, who made sleepy noises so I told her I'd found a Starbucks and had a book, so there was no rush. She picked me up around 9, and when I got back to the hotel (we shared a room with Eric and Cathy), where I slept for 2 hours before showering and hitting the con.

I continue to suck at sitting on my hands. After a recent blow-up with Mr. Penguicon (I don't know who deleted this thread, but I have all the replies livejournal emailed to me), I once again decided I was just attending this year and not actually doing anything "behind the scenes", as it were. (I already wasn't doing any panels due to an earlier encounter with the same individual. I'd recently ordered a few hundred dollars of links to teach people to make chain mail with, but decided to leave them in Austin.)

On Friday morning, I found out that Fade had brought the chain mail links to the con. (Well I'd never explicitly told her _not_ to, and as long as they were there...) But I didn't have any pliers, and hadn't arranged a time on the schedule to teach anyone to do chain mail. Hmmm.

After my nap, I hit the con suite (only thing open yet) where I bumped into Mr. Penguicon working on his laptop. For whatever reason, we've always gotten along fine in person (it's just online we can't stand each other, it's a long story), and I asked him how things were going. He mentioned that he needed somebody to pick up Eratta sheets from Kinko's, so I went and did that (although technically that was before the con started, certainly before registration opened). I also bought four pairs of pliers while I was out (I really needed about 10, but that's all the store had and they were about twice as expensive as at home anyway). Dropped the eratta box off at registration, and hit the con suite again.

In the con suite, I noticed somebody trying to get liquid nitrogen out of the tank without a phase separator. (This doesn't work so well. The phase separator is a sort of metal sponge that provides back pressure. Without it, you just get out nitrogen gas under high pressure, and only a tiny amount of liquid which squirts a long way. You'll empty the tank really fast trying to get LN2 out without a phase seprator.

When I mentioned the lack, they showed me the remains of the phase separator which had snapped off cleanly at the base just like at Linucon 1. Sigh. (Unfortunately, the phase separator is delicate, cracks if improperly stored, and gets very brittle when chilled to LN2 temperatures at the best of times. I warned people at great length to treat the phase separator like eggshells, but that was back around Penguicon 4 and they hadn't actually experienced this problem for themselves. Right. Already broken on friday, and they had no backup. It's a $65 part if you mail order it, where you get one on a weekend or after hours in detroit, I had no idea.)

Luckily, a clean break like that can be repaired. I explained how Mark had fixed the phase separator at Linucon 1 with Duct Tape (you've just got to hold it on against the back pressure; tightly since the stickem stops working at LN2 temperatures and it's the elasticity holding it on), and we went on a Quest For Duct Tape. Ops had electrical tape (no cloth backing, probably gets brittle and shatters when exposed to LN2). The Aegis guys crew could get duct tape, but didn't have any with them. The front desk had more electrical tape. The gaming guys had some kind of tape that might work, but I wasn't sure. Then an attendee brought out good old grey duct tape from his hotel room, and we repaired the phase separator and made a batch of ice cream. All was well.

Saw opening ceremonies. This year's con chair and Mr. Penguicon had the stage to themselves for most of it. Guess who got more lines?.

When I went down to register, I noticed that the box of eratta sheets was open but otherwise being ignored, so I started putting eratta sheets into program books and setting them out for people to take. I also handed a few eratta sheets out to people in line who already had a program book. Then I was informed there was a second book (the white one is the "souvenir book", the green one's the program book), and a box of them was brought from behind the table. So I started making little bundles of two books and an eratta sheet. For efficiency, I handed out bundles to people waiting in line, and in the breather moved the boxes to the "upstream table" and then moved that table 90 degrees and a couple feet around a pillar so it would be parallel to the line, and people could take books from the table while waiting in line. (Where it was, the program books and the badge holders were fighting for space.)

Then the Moleskin notebooks from google showed up, and the bundles became a moleskin, a souvenir book, a program book, and an eratta sheet. (At first we thought all the moleskins were red, until we opened the second box which contained green ones, and looked at the remaining stack of boxes and went "huh".) I lamented the lack of baggies, and I explained to the registration people how they could hit up a vendor next year for free ones (the vendor puts their logo on one side, penguicon logo on the other), because a baggie to give each attendee would really have come in handy. (Yeah, "Power Word: Complain". I know. I didn't put any mana points into this one.) By this point, I had two volunteers assigned to help me (I don't know why) and the entire line waiting had little bundles, so I handed the task off the volunteers and went to the end of the line to go buy my badge at the door. (This confused the registration people, although in their defense I still had my CELF lanyard which was a badge with my name on it, and had about three ribbons on it by that point. Force of habit.)

My next visit to the con suite, they were out of LN2 ice cream ingredients. Nobody had done a grocery run for them, and Molly was swamped with other stuff now that the con had started. I convinced John Guest (last year's con chair) to drive me to the grocery store, where I bought $150 worth of groceries which we carried back to the con suite. (I'd also paid for the eratta sheets, but the total is still less than I spent on chain mail supplies, even ignoring the pliers.)

Got back to the con suite, got showed where to put most of the groceries away in the hotel freezer, made several batches of LN2 ice cream for the crowd. Around 11:30 Molly showed up and told me to stop (because ice cream was going to be _officially_ made at midnight; presumably they wouldn't eat it if the con suite had food in it before then), so I did.

This is me "just attending" Penguicon. Sigh. I suck at this.

Late at night Tracy and myself invited Sal out to a restaurant, although the Aegis crowd arrived several minutes after we did and wound up at the next table over. Tracy wanted to know why I wasn't attending Penguicon next year. I explained that I didn't want to fight with Mr. Penguicon, who is A) third wave enough to drive away all the first wavers, B) already reenacting the "divide and conquer" failure modes of year 3.

This means A) as a first waver, I'm inclined to walk. (Because Penguicon is something I can recreate from scratch, so why fight over this one?) B) I already helped rebuild the con year 4 and my anti-codependent-enabler streak makes me disinterested in shoring up somebody else's persistent problem if it's going to do a sufficiently similar replay. (If the problem doesn't become acute enough for them to notice, how are they ever going to learn?) C) I neither want nor need a spotlight. (Heck, this blog only has an RSS feed because Christian wrote a script to give it one. This is really my "notes to self" because I won't remember the details otherwise.)

I also pointed out to Tracy that if I'm reading the situation right, after I'm gone, with the previous con chairs also hitting the road (Steve Gutterman's had the con at arm's length for a while, John Guest told me on the LN2 grocery trip that he's pondering a move to Wisconsin, Aaron Thul always had a low profile), she'll be the biggest roadblock between Mr. Penguicon and an unobstructed spotlight, and thus the next logical target for him to try to retcon out of history once he was convinced I was really gone and not running some kind of secret cabal against him.

This concerned Tracy enough that she tried to come up with a test for it. She suggested a series of Youtube videos on the history of Penguicon; if Mr. Penguicon inexplicably freaked out about accurate history from a co-founder of the event, we'd know his need for the spotlight is indeed pathological. (If not, then maybe he just has a personal problem with me, in which case my leaving might return his behavior to normal.)

April 17, 2008

My tutorial on cross compiling ran over its scheduled 2 hours by another 45 minutes. (I apologized to the audience for this, and they noted that I hadn't exactly tied them to their chairs to keep them in the room.) Luckily, the slot afterwards was not only lunch but it was delayed by over half an hour because the delivery truck got lost, so it all worked out. (The sad part is, that _still_ wasn't enough time. I could do a week long lecture series about cross compiling and still not be out of material. Oh well. And I didn't get to make proper use of Solar's presence, although I pointed people to him afterwards since he could answer their questions better than I can.)

I'd hoped to get a Firmware Linux release out before my tutorial, but the 2.6.25 kernel didn't drop until the previous evening, and I was just too swamped. Besides, I needed to debug the distcc trick with the new UI, and test build all the architectures under the new kernel, and what little spare time I had went to banging on my overdue OLS paper or taking a frantic stab at updating my lecture notes.

I decided to keep the name "Firmware Linux" rather than rename the project to Impact Linux. I explained why on the 10th but didn't make the actual decision until recently. I still need to move it to the new website/server, though.

Then it was time for my overnight red-eye flight from california to Michigan for my last Penguicon. CELF was kind enough to make my return flight go to Michigan instead of back to Austin, and Tim Bird (and Nadine, whose last name I don't know) personally drove me to the airport. That was nice of them.

My airport experience started out with the security theater guys making me throw out two (still unopened) cans of diet mountain dew. Admittedly they were more CELF freebies, but still. (I complained about CELF's soda selection and they bought new types of soda, just like I complained about the Hammer board and the Tin Can Tools guys designed the nail board. Either I have "Power Word: Complain" or I know some REALLY nice people.) Pondered the kind of industrial equipment it would take to tamper with the contents of a sealed can, and what that would imply about my ability to hide stuff inside other things they're not already targeting. (I still think hiding stuff in my laptop would be the easy way, I could fit a pound or two of material in there without interfering with its ability to boot, but there's tons of other ways. Faking a leg cast and claiming it has steel pins, or leaving the cast alone and hiding stuff in the crutch. A wheelchair is probably too obvious. Drug runners swallow stuff; suicide bombers could do all sorts of implants.)

Anyway, the point isn't to stop people blowing up the plane (since you're not protecting busses or trains the same way). The point is to prevent the plane from being weaponized, and that's easy to do simply by locking the cockpit door. Airport security isn't merely a farce, it's one that forgot its reason for existing in the first place. (And we go along with it. They made me take my flip-flops off and put them through the X-ray. Why? Because after that shoe-bomber idiot people voluntarily took their shoes off to reduce their chance of a body cavity search, and after enough people volunteered they made it mandatory. Idiots. It'll continue as long as people go along with it, which is why I'm really not that upset about airlines going bankrupt.)

Finally got to the gate, where they asked for volunteers to be bumped from the overbooked flight and driven to Oakland to take a flight out of there. I asked if the bumping could still get me to Las Vegas for my connecting flight (which originally had a 3 hour layover), and their eyes lit up. I now have a voucher for a free flight anywhere in the continental US. This makes visiting Sword Camp in Michigan this summer somewhat easier.)

April 16, 2008

Slept through the alarm. Argh.

Working on paper while watching Andrew Morton's keynote. Luckily, must of the material he's convering I'm familiar with...

Presented Andrew with a Nail board after his talk. Promised to email him instructions on how to use it. Working on writing that up...

The OLS guys have been remarkably tolerant of me missing the paper submission deadline. (I got a finger shake, essentially, and was told not to do it again. Working on it...)

Another fun day. A great talk from the guy (they ported the whole of Ubuntu to arm! Cool!)

I have no met solar@gentoo. He has many tattoos and piercings.

When did Linux Bios get renamed to "coreboot"?

To get gdb to work with a jtag, compile the kernel both with debugging info (then strip vmlinux to get a smaller non-debug version to flash). If it dies before you get any printk output, "grep __log_buf /boot/" and dump at that address. Converting virtual->physical addresses is usually stripping off 0xc0 at the front (I.E. "0xc0445980->0x445980") Actually invoking the debugger involves "gdb debugger=arm-linux"... nope, that went by too fast. "target remote bdi:2001" (ok, how do we get openocd to give us a network gdb client?) Is "mon reset run" relevant to openocd?)

Darn it, solar and I have to leave this panel to go do our panel. Luckily, they're recording it on video...

Very fun day. Very, very busy.

April 15, 2008

Banging on my OLS paper. It's due today.

Matt Mackall gave a good presentation on bloatwatch (here's the source).

Many other good panels throughout the day. No time to update blog...

Had dinner with David, then collapsed into my hotel room. My OLS paper is due but my brain is fried, set the alarm for 4am and try to do it in the morning...

April 14, 2008

Packed for the plane flight at 6pm, and I'm on the sofa at Metro. I've missed this.

I want an "open in new tab" button for Konqueror. Specifically, I want to be able to type something into the URL bar, but then open it in a new tab rather than opening it in this tab. There's a "go" button and a "clear URL bar" button, but not an "open in new tab" button.

I mention this because I'm trying to close web browser tabs, and catch up on livejournal. (These two activities directly conflict. I am aware of this.) It would also be nice if I could either get Konqueror to stop giving CPU time to tabs that aren't currently being displayed, or at least get it to show me which tabs are eating so much CPU time. (Top says it's Konqueror eating all the CPU, but I have ~100 open tabs, and it's potluck trying to close the right ones.)

Eh, I can at least slow the CPU down so the battery goes dead more slowly on the way to California. Time to catch a bus...

Google has wifi all over silicon valley, and I can get their login page, but they think I already have an account. No clue what password they think I have. I note that I'm one of the three remaining people on the planet who hasn't got a gmail account. And the "I cannot access my account" tab consistently gives me "connection is broken", possibly never debugged with Konqueror? Hmmm...

Time to bang on my OLS paper some more. Too tired to accomplish much, but let's see...

April 13, 2008

Walked down the drag around midnight. Everything was closed. Metro is closed on weekends (and closes at 8 on weekdays), all the other restaurants close at or before midnight (even the fast food places, if you didn't bring a car to hit the drive through). UT used to be open late, but not anymore.

Wound up at Jimmy John's, which is still open until 3am. The music is decent but way too loud to hang out comfortably for long. (It doesn't help that the only table with an outlet is right under a speaker.) It's the best available option, but not really designed as a late night hangout.

Spent the day hanging out with Mark, running errands for Fade, petting cats, failing to take a nap.. Fun, but I didn't get much done.

April 12, 2008

Hanging out at Epoch with Fade. A good phrase in Erik Burns' obituary for Gary Gygax: "a voice of reason, if of firm opinion". That also describes Linus Torvalds, and that's an ideal I strive for as well. I wonder how much more work I have to do to make it there? Apparently part of the formula is:

Gary Gygax was unfailingly polite and supportive. His kindness was clear and apparent. And he had a way of making a punkass kid (regardless of his age) in the middle of nowhere, New Hampshire feel like a peer whose opinions were worthy of respect even if they were ill informed and wrong.

/me takes notes. (New... Hampshire... Check.)

Meanwhile, over on Making Light:

What a real leader needs is people who disagree with him. I don’t mean the needlessly contrary, the ornery and the difficult. I mean people who share his ultimate goal, but whose job and passion it is to pick holes in his plans to get there in order to improve them. Sometimes that’s the loyal opposition; sometimes it’s the court jester. Sometimes it’s citizens exercising their First Amendment rights. Sometimes it’s me.

That's part of the reason I took a job doing C++ at a large bureaucratic company with a dress code. I despise C++ but I want to figure out what attracts the people who use it. Alas, as far as I can tell "ignorance of the alternatives" is one of the biggies. (Everybody I've talked to on this project agrees that C++ is a bad language to be doing this in, but they can't agree on what language they _should_ be using. One pervasive mistake I've seen is equating C with C++, and thus ascribing the problems of C++ to C. I think I have to blame colleges for that one. (If the only drink you've ever had ice in was a flat diet soda you didn't like, and you thus assume that putting ice in drinks is a bad idea...)

April 11, 2008

Friday morning, and the network at the office is out. (At least for me, and the guy in the next office.) The suggested support tech route is to send email. (My work email would still be broken even if the network wasn't out.) Talked on the phone with a support guy who wouldn't deviate from his script, and thus kept re-asking questions from earlier in the conversation.

Went to lunch early while the network guys fiddled with things. Locked my keys in my car on the way back. (The driver's side door is still enough of a pain to open that I sometimes go out the passenger side door, but that doesn't warn me about lights on or keys left in.) Triple-A to the rescue again.

Did I mention I came in to work early today to get some stuff done I couldn't do yesterday due to being sick? (Yeah, that's worked out well so far.) The stuff is, of course, writing a draft of a document about message formats to be passed on to other people and reviewed a series of meetings. I have not been assigned to write a single line of code since I got here a month and a half ago. (Read code, yes. Write or modify any, no.) It passed silly a while back.

I have next week off from work, because of CELF and Penguicon. Spoke to Evan (who clarified that he's _not_ my manager, he's just my team lead; Kevin is my manager) on my way out, about whether or not I'd be coming back after that week.

Evan wants me to come back, and my contract goes to the end of July, but here's the problem: I haven't done anything yet. I've been here since late February and it's now mid-April, and I haven't encountered a single situation I could actually meaningfully contribute to. I haven't been asked to write a single line of code so far.

Instead I've participated in document review meetings that _every_time_ ended with "we're not ready for this stage, we must back up and do something more basic", all the way to a tutorial on how seismic acquisition works and what equipment the company sells actually does. Not just for me, for all half-dozen people in the meeting. (I was mostly there as an observer, they never got to the material I'd studied and was there to discuss.)

Yes there's a steep learning curve, and I've learned a whole bunch. But my contract is only 5 months, it's 40% over already, and I don't plan to extend it because I really don't like Houston. The obstacles to finishing this project are political, not technical. They need to agree on what this project will _do_ before they can implement it, and that could easily last another three months before writing any actual code starts. (The design is supposed to come from the project's architect, who is overseas at a customer site. We're supposed to be figuring out how to implement an existing design, what to implement is the architect's job.)

Robin, the other guy in my office, spends all of his time doing flowcharts (except they call it by some other name, "state diagrams" I think; it involves running Visio on Windows). He doesn't seem to mind; the money's good. I could shut up and just keep collecting a paycheck, but the opportunity cost is getting to me.

Every day I'm sitting in my office reading various word documents or sitting in meetings about them is a day I'm not working on embedded Linux development. I'm not turning tinycc into a tool that can compile an unmodifed Linux kernel. I'm not starting my own company to do cool and useful things. And I'm not doing those things because the money is good, but I'm being paid to do... nothing.

My hobby programming has other people paying to fly me to california next week and boston in the fall, and I'm presenting in canada in between (although that's just free conference admission; travel to OLS is on my dime). Plus various people contacting me through email and irc all the time, and even the occasional phone call about it. My day job pays me to sit in an office and take up a headcount budget slot. The money is good, but I have many months worth of expenses in the bank already. Wheter I stay through the end of this contract or not, my next step is launching an embedded Linux consulting business. The question is, is waiting until August a good thing or a bad thing?

Cleaned out my desk, and cleaned out the houston apartment on my way out of town. I haven't actually quit (or broken the lease, which costs one month's rent), but all either would require is a phone call...

April 10, 2008

Went home sick from work around 1:30. Possibly this is because the antibiotics for my ear infection finally ran out, and the fact I've been drinking the water in Houston finally caught up with me. (Or perhaps I now dislike my job so much my stomach knots up when I set foot in the building, but I'm hoping it's the water.) Slept until 5. Maybe I'll actually get something done this evening?

Ok, hands up everybody who can read this without hearing Doc Brown saying "One point twenty one gigawatts!" in the back of their mind. (Alas, it is not yet backpack mounted.)

The internet now has video of Mike Wallace interviewing people back in 1957, including Gloria Swanson, Steve Allen, Frank Lloyd Wright, Kirk Douglas, Elanor Roosevelt, Henry Kissinger, Salvadore Dali, Peter Ustinov... (I'm currently listening to Frank Lloyd Wright discuss Euthanasia, several decades before Jack Kervorkian...)

Hanging out with my laptop at KFC (flat surface, relatively quiet, nice lighting, soda refills, and today I found a table with an outlet). I'm just at the edge of an open wifi signal. Tantalizing, but it hasn't quite managed to load a full page before timing out yet...

Digging into my old busybox archives, dusting off the sort.c I wrote back in 2004, and adapting it to toybox. It' one of the six remaining commands I need before Impact is self-hosting...

Banging on my local copy of the website, hoping to get it up before I have to leave for CELF. I should also hit kinko's to get a fresh batch of business cards printed up, because I still haven't found the box of 'em. (I knew where it was when we had a storage unit in Pittsburgh, but that's the last time I saw it. The supply in my wallet ran out a while back, and keep having to tell people my email address and knowing they'll never spell it right. It does not contain a "g", it never did, nor is my first name "bob".)

The connection has improved a bit as the sun sets. Currently watching a Barack Obama interview on youtube, which shows three seconds, pauses for ten seconds, and then shows three more. Reminds me of the modem days... Nope, the connection went away again.

Getting ready to actually move the code/firmware directory from to the domain and rename the project in the process, and I'm getting cold feet about the rename. Perhaps this is because I'm sitting in a KFC, and everybody knows what those letters stand for. (And I personally still call Boston Market "Boston Chicken", and that name went away a decade ago.)

Yes, the old name "Firmware Linux" is kind of inappropriate, but renames are silly. People still call wireshark "ethereal", they only changed their name because they were forced to. The firefox/iceweasel thing was widely and deservedly mocked. I've been using the name "Firmware Linux" for something like six years now, and that's a fairly long time in computer terms.

Pondering. I need to make up my mind this weekend...

April 9, 2008

I'm missing a Linux conference in Austin while I'm stuck here in Houston.

Had the phone call with the google recruiter, but nothing came of it. They might have an engineer contact me back later, they might not. *shrug*

I am amused by out of context quotes from other people's blogs.

Our new passports arrived in the mail, and my, we're ugly. - Kelly Wagner.

Now I'm going to take the dog for his second walk of the day, and I really hope that nobody dies this time. - Neil Gaiman

According to the megapenny project, half a quintillion pennies would be enough to cover the earth with a layer one penny deep.

Huh. Barack Obama was in Malvern today. I wonder if Eric or Cathy saw him speak?

April 8, 2008

Got home last night and collapsed for a nap that lasted 13 hours. Saw my first roach in the houston apartment when I got up. Sigh. (What does it expect to find to eat in here? There's no trash, all the food is in cans except for a sealed jar of peanut butter and a ziplock-closed plastic bag of cereal. Probably came in through the window, which has no screens...) Off to bother the front desk about exterminator services.)

Got a little more work done on the QEMU Weekly news writeup (for the week of January 15, much catching up to do) before I had to head in to work and stop being productive for 8 hours.



The conversation went something like this:

THEM: This is Melissa from Microsoft, is this a good time?"

ME: Uh... This is as good as it's going to get.

THEM: I saw your resume online (blah blah blah)... Would you be interested in coming to work for us?


THEM: [proceeds through checklist] Can you tell me why not?

ME: Maybe if you went through the kind of transformation IBM underwent in 1992 under Lou Gerstner, and STOPPED BEING EVIL, I'd consider it. But right now? [lost for words] I'm a Linux geek. Did you notice that part of my resume?

THEM: [dead silence]

ME: bye. [hangs up]

I realize that Microsoft has no way of knowing I told my manager at Dell I'd rather flip burgers than write code for Windows, but if they're trying to hire Linux developers with no windows experience at all on their resumes (and after this many years, there's generally a reason for that), then they're _really_ desperate.

The result of last week's meeting was to back up to a more basic level. The manager in charge decided we weren't ready to have a document approval meeting, we were all disagreeing on what the thing said and this was the first time we'd had a chance to discuss it, so first we needed to have document review meetings before we could come up with something ready to be approved. So he scheduled some more basic meetings, earlier in the process, and today's meeting at 1:30 was the result of that.

The result of the 1:30 meeting was that we needed a tutorial on basic seismic acquisition, how it works, what equipment does this company sell and how is it used, etc. And so at 3:00 we had that tutorial, which lasted 2 hours. (It was actually quite productive and useful, and I learned a lot. I'm usually up for a good tutorial.)

What I'm wondering is, what does the _next_ meeting in this series look like. "Why do people try to find oil?" (We're making rapid progress. As long as nobody asks in which direction, we're good.)

I'd ask questions of the project's architect, but he's currently in Libya. We have a customer support person in our architecture meetings to provide perspective, and the project architect is out in the field at a customer site.

Still, the microsoft thing remains the boggling high point of the day so far...

I just got email from a Google recruiter, for a "general Software Engineering role that became available in our Austin office". (Did not immediately reply "Hell yes!", for one thing I don't know what the actual position is yet, but there's a very weird karma thing going on here.)

Headed out to IHOP after work (it's open 24 hours, if I sit here with my laptop for a bit my only deadline is my laptop battery). The radio has a lounge singer doing "Roxanne". (The sting song about somebody stalking a prostitute. As a lounge singer.) The man is _phenominally_ untalented. Now it's going into an instrumental section that seems to be trying to be a cross between elevator music and a luau, except still to "Roxanne". It's yet another thing I'm chalking up as "this is Houston". (Oh, and the waiter screwed up my order. Couldn't understand "substitute fries for hash browns". I repeated it enough times trying to get it through to them that he did substitute them for the pancakes, then when I explained for the fifth time he brought me pancakes and charged me for the fries. Right.)

Right: getting tinycc to work on an arm host. But first, teaching the toybox patch command to apply prpplague's hammer patch, which is the first one I've encountered in a while actually using the "file with 1969 date means it didn't exist" rather than "/dev/null means it doesn't exist".

(Now they have some woman singing Tom Petty's "free falling". With electric guitars straight out of country western. This seems to be Amateur Covers Hour.)

And tinycc works on an armv4l qemu host (with my Impact build)!

Build procedure (using the impact cross compiler) is a touch convoluted:

PATH=~/cross-compiler-armv4l/bin:$PATH CC=armv4l-gcc HOSTCC=armv4l-gcc STRIP=armv4l-strip CC_HEADERPATH=/tools/include CC_DYNAMIC_LINKER=/lib/ CC_LIBPATH=/tools/lib make/ arm

Then install it into the mini-native-armv4l/tools directory of the impact build (PREFIX=~/mini-native-armv4l/tools make/ and re-run ./ Next extract the qemu-system-armv4l tarball and boot it up with the normal script. Copy in a "hello world" program via your preferred method (I did "cat > hello.c", cut and pasted into the terminal, and hit ctrl-D.)

One final step: it doesn't currently build a libtinyccrt-$ARCH.a for any platform other than x86, so I had to substitute libgcc.a:

ln -s /tools/gcc/lib/libgcc.a /tools/lib/libtinyccrt-arm.a

And then "arm-tinycc hello.c" and run "./a.out"!

Not _much_ of a test, but hey. It's a start! (If I missed a step, try "arm-tinycc -v -v hello.c" to see what it is.)

I don't know _what_ that the two black guys in the face-concealing hoodies in 85 degree weather were smoking in the IHOP parking lot (smelled like burning drain cleaner), but one lungfull on the way to my car and I have a very unpleasant buzz. Bedtime, I think.

April 7, 2008

Managed to oversleep (after not being able to _get_ to sleep), then misplace my glasses this morning. My subconscious _really_ doesn't want me going back to Houston. On the drive in I pondered how the standard roadkill in Austin is armadillos, possums, and the occasional bird. The standard roadkill in houston is rats. Big ones.

The workaround for exchange webmail breakage that was working last week, has now stopped working. No obvious reason, of course...

Fade has a twitter. I wonder if I'd do better with a twitter? Couldn't post to it when I was offline, though... Got one anyway.

Somebody on freenode wants to use tinycc on FreeBSD. Downloaded the FreeBSD 12 "livefs" CD, but when I fired it up under QEMU it turns out to be an install CD. So what were the other three install CD images? Data files, probably. This thing says it can install from the internet but only via FTP (which won't go through the firewall), no http (unless I know an of an http-ftp proxy... what is this, 1998?)

April 6, 2008

Decided to get away and focus on programming for a bit. Biked to Wendy's (would have preferred the food at Jimmy John's but the loud music they play cost them that sale), found a nice quite corner table, pulled out my laptop, and tried to concentrate.

In theory, the lack of internet access means no distractions. In practice, so far Eric called (wondering if I know about a bug in a Dell bios) Mark called (wondering about this evening's visit with Stu and what the hospital's visiting hours are), Fade called (because we need to go get rid of the books we culled from the unpacking pile and make a trip to the grocery store, she hasn't got a car during the week)...

And you wonder why I feel like I'm getting nothing done? Work is a pointless (if lucrative) waste of time that leaves me exhausted in the evenings, the weekends are hemmed in by a commute that eats an evening each way, and then the rest of my life tries to squeeze into the weekends.

That said: I don't think tinycc can currently cross compile from arm to i386. In gtst() (which I need to rename gen_test()) it traverses a linked list of integer pointers, and writes a jump offset to each one, but there's no provision for making sure the addresses are aligned. And unaligned integer access on an arm host is a no-no.

I also need to teach the code generator to do simple dead code elimination so I can clean up things like the #ifdef __i386__ around the floating poing upper bits clearing David Wheeler did in the trusting trust paper. The size comparison should return a constant 12 and comparison against the constant should drop out the body of the if, but that requires dead code elimination. In theory it's simple enough to have a dummy code segment it outputs to if we're not sure we're going to use the code, but splicing that code back in if we _do_ need to use it (including following the above linked list of test sites) is something I need to understand a _lot_ better before attempting.

Begged off from the half price books trip, and rescheduled the grocery run for late this evening, which gives me until 7-ish to bang on code. Yay! (At the expense of feeling like I'm ignoring Fade. Sigh.)

Ooh, the arm code generator won't work cross compiling from an x86-64 host, either. It uses long * when it means uint32_t *.

Yay, Eric found a workaround to his sister's Dell Bios issue. (He's converting his family's systems to Linux, since Vista seems to have made them finally ready to leave Windows, and buying macs costs money.) Apparently, Dell systems are so brain damaged that if there isn't a 260 megabyte partition of type FAT on the hard drive, they refuse to boot. (No windows recovery partition found! The sky is falling!) Of course nobody said Linux couldn't use this for swap, since the partition table type and the actual content of the partition are unrelated, but Eric's run out of patience for fiddling with it at this point. Don't blame him. I've known for years Dell couldn't write a bios to save its life, but they keep coming up with new ways to fail...

Making notes about tinycc cleanups I won't have time to _start_ this weekend. (Look on TOK_GET ye mighty and despair. Yes, that's a 34 line macro, repeated 10 times.)

April 5, 2008

At Epoch, with Fade. Life is good.

Pondering how much shared code there should be between "cp -r" and "rm -r". They sort of do similar things, but cp has a destination and rm doesn't. It's really a question of whether the stuff in "main" can be genericized, since both do a loopfiles() and then a direct operation with a dirtree_read() repeating that operation on child nodes only if the -r flag is specified. Of course rm needs to do an operation leaving each node cp needs to do an operation entering each node... They're similar, but are they similar enough that merging the logic would be an improvement? (And how about chmod and chown which should work in there too...)

Fade finally got around to installing World of Warcraft on her mac laptop last night, and is playing World of Warcraft here at the coffee shop. I am deeply jealous.

Google web alerts continues to be amusingly incompetent. (I still have the vanity search on my last name. I regularly find things on the web talking about me or responding to something I did that the web alert never mentions. Today's web alert had one entry: one of my old livejournal entries from 2004. That's right, four years ago.)

April 4, 2008

The mercurial breakage was because "aptitutde remove" doesn't delete config files like /etc/mercurial/*, that would be "aptitude purge". Fixed now.

The Impact build is vaguely unhappy because I switched busybox from "make defconfig" to making with the busybox config that has only what's needed to build. I'm adding more toys as I actually boot into the resulting system and notice stuff missing. Some things like "ls" I need to add back into the .config, others like "cat" I can add to toybox because it takes 5 minutes. (Pondering rmdir next.)

April 3, 2008

Had a brain-melting 2 hour meeting this morning, the purpose of which I'm unclear on. (The material I read to prepare for the meeting never came up. The only note I remember taking was "10:43 - headache started.") This was immediately followed by a half hour department status meeting, at which point I ran away for a 2 hour lunch. Finally got the passport documentation submitted, spending $100 in the process. Now I have to wait six weeks.

Installed mercurial 1.0. Broke mercurial 1.0. Emailed mercurial list.

Yes, this is pretty much my experience with all software. I break stuff. You wonder why I'm attracted to embedded development? I dig down into the underlying layers anyway, because they don't work out of the box for me. At CTY in 1985 I was almost expelled for breaking the prototype electronic library card catalog. I spaced off the end of the input field, and the system went into an endless loop trying to redraw the screen and failing. There's a reason I held off on upgrading until I could do without source control for a few hours...

Fixed a truly _embarassing_ bug in tinycc, which I introduced in what should have been a pure cleanup patch. (There's a downside in make/ ending in a known failure. You don't notice that the _previous_ test, which should have worked, has regressed...)

April 2, 2008

The firmware-0.3.1 build for i686 happily completed on Slackware 12. Can't reproduce the problem reported on the list...

I hate Houston. Today's passport appointment didn't happen, because the instructions the post office gave me on how to get there involved "turn right on 8" without ever saying that 8 had another name (the Sam Houston Tollway) and wouldn't be _called_ 8 on the signs, so I wound up driving through downtown houston for an hour. (Plus, if you're going to tell somebody to take a toll road, it might help to MENTION it to them so they know to hit an ATM first, not that I would have take the toll road anyway.) Calling the post office to reschedule involved being put on hold for 15 minutes before somebody else asked if I was being helped, and then being told the next available appointment is next week. (So I'm going to the sugarland office, which doesn't do appointments. They just expect you to show up.) Of course five minutes after I confirm they open at 9:30 am, I get a 9:30 am meeting scheduled here at work, which is expected to last for 2 hours.

It's been that kind of day.

And I appear to have dinged somebody's car in the starbucks parking lot. Darn stuck door. (They already got hit there, so they're not exactly mad at me, but they are annoyed I didn't track them down and tell them I'd added a ding to the sideswipe they already had. Turns out to be somebody who works at the starbucks, who had a conversation about this with me that I'm still trying to figure out what the aim of was.) It's still that kind of day.

Mark called up wondering if should go to the emergency room. When you have symptoms that make you ask this, and you have health insurance, the answer is probably "yes". That makes it a clean sweep: three for three of the potential founders for the new convention (the proposed name for which I'm not typing here until we register the domain or decide we can't) has now been to the emergency room in the past 2 weeks.

Got my armv4l build booting on the hammer hardware! Yay! Alas, getting that to a _usable_ state turns out to be more off a struggle than I expected. My script works reasonably well on a system that isn't qemu, but not so much on a system that's using ash instead of bash because I set BUILD_SHORT=1 before building mini-native. (Alas, the hammer board has 32 megs of ram and my root filesystem with gcc is about 35. I do note that prpplague pointed out a screw-up of mine that saved a few megs once I fixed it -- hostfs in UML was breaking hard links -- but there still just isn't enough memory on a hammer board to put gcc in an initrd.)

I miss Fade, I miss Austin, I miss the cats, I miss being able to choose from several _different_ places to get wireless internet access when I'm out and about, I miss having free time to sit down and do this kind of thing without it directly costing me sleep, I miss _not_ having to face C++ every day...

April 1, 2008

Woken up this morning by Eric, chortling about an April Fool's press release he's writing for Wesnoth. I've never quite gotten the April Fool's thing, even back when I worked for the Motley Fool and it was their big annual _day_. (Now if the Onion came out with a serious issue, that would be funny.) Oh well. Then the nice lady at Oxford called and asked how things were, hinting that she wanted me to extend my contract beyond the original 5 months. I kept flashing back to an IRC conversation with Tim Riker last week where he explicitly told me to raise my consulting rates (which apparently shouldn't be below about $150/hour for what I do, that's the... third person to tell me this?). But I didn't mention this to the recruiter.

Went to the 59 cafe to work on the paper a bit this morning. Their wireless was down. Confirmed with the apartment complex's front office that the pool is padlocked until sometime in May (possibly the end of May) because it's winter. They told me about the pool when I first came there, didn't mention the "padlocked through May" bit. Similarly, the reason I can't get into the exercise room is it's under construction, and has at least another 45 days to go. Wheee...

Wow Houston is muggy. This is actively unpleasant inside an air-conditioned office building. I don't remember it raining this morning, but there were puddles everywhere. I mentioned this to co-workers and they said I ain't seen nothin' yet, welcome to Houston.

The OLS submission deadline got pushed back to April 15th. Big surprise there. They also updated the submission instructions page which contains a new latex bundle that manages to be even uglier than I'd imagined. (I'm going to continue writing it in simple HTML and worry about converting it once I've got it written. I'll probably ask Mark to help this weekend.) I'm still glad I stayed up until 2am working on the paper, though. Got a lot done. It might be as much as halfway finished.

March 31, 2008

The elf spec on is much better than the crappy old Caldera one. (For one thing, it has the processor supplement information in it.) Ulrich Drepper's how to write shared libraries is good too.

Went out to get my antibiotic prescription refilled (actually a different type this time), and between the doctor's visit, trying to find a pharmacy around here that isn't Wal-mart, and giving up and going back to Wal-mart, it took 2 hours. Only got 6 1/2 hours of work in today because of it. (I could only stay until around 6pm; I have to finish my OLS paper.)

Worked late into the night on my paper for OLS. Happier with the structure now, but it's still only half done, and the deadline's tomorrow. (Dunno how hard a deadline it is, but I still have to wrestle with Latex to get it into their preferred format.)

What I'd really like to be doing now is debugging tinycc on the nail board. What I _am_ doing is puzzling through fairly hideous C++ code to document message formats sent between layers of a seismic acquisition system. Off to go do more of that...

Found out that Stu is in the hospital with a burst appendix. He's ok, but on intravenous antibiotics and likely to be off his feet for a month. Looks like the next convention meeting is at his house.

Got a bug report about the toybox 0.0.4 build in Firmware 0.3.1 breaking on slackware. Confirmed it still builds on my xubuntu system, then downloaded the Slackware 12 dvd and installed that under qemu. (It's still building busybox in host-tools, and yes I've found a case where my dual processor 64 bit laptop is too slow. Was that ever in doubt?)

March 30, 2008

The antibiotics for the ear infection are definitely helping. I feel much better. Also tired.

More or less in a position to put out the next impact release, just waiting on the 2.6.25 kernel. I need to get the new website up and move everything over...

Travel arrangements for Penguicon are looking to be an enormous pain this year. I'll probably have to take Monday off too...

March 29, 2008

Biked to Epoch with Fade, poked at my OLS paper. Wound up doing a toybox release instead (0.0.5) so I could unblock the accumulating changes in Impact and check them in.

March 28, 2008

Ooh, Mercurial 1.0.0 is out. Hopefully they fixed the darn directory traversal thing, I'll have to upgrade this weekend and see what it breaks. :)

Sigh. Between the antibiotics and the ear infection, I'm darn irritable today. (Also very, very tired. I slept for 13 hours wednesday night and 8 last night, and I'm exhausted...)

March 27, 2008

Spent yesterday increasingly out of it. Dizzy, headache (dismissed as TMJ in the right side of my jaw, but it got worse). Eventually got contact info for a clinic here in Houston, but their first appointment was 8am. Took a nap when I got home, and didn't wake up until... 8am.

The doctor did some quick tests to rule out a brain tumor and took another EKG when I explained about last weekend's trip to the emergency room. Said I "have the heart of an athlete" and not to worry about that. It hurt when he stuck his little light scoke thing in my right ear. That was a bit of a tip off: ear infection, and it's screwing up my inner ear.

So now I have antibiotic pills, antibiotic ear drops, and anti-dizziness medication. Meant to pull a half day at work today, but got caught up in stuff and stayed until 5:30 anyway (about 6 hours total, since I didn't get in until 11:30 due to being late for the doctor's appointment and then having to fill the prescription and grabbing lunch while I was there).

Updated Impact (remember, I renamed Firmware Linux? Yeah, I have to update the web page. Anyway... I updated it) to the 2.6.25-rc7 kernel, and made sure my perl removal patch still applies. Built all the target platforms, found out that asm/page.h is gone and that breaks the busybox 1.2.2 mkswap build (sigh), and made busybox build the smaller applet list (in the config) for mini-native as well as host-tools. (The 2.6.25 kernel will require perl in order to build, thanks to Peter Anvin thinking it's a good idea. I have a patch to remove it, but he argued against it when I submitted it. I should resumit it during 2.6.26-rc1, on general principles. And submit it to linux-tiny too.) I'll check in the upgrades when 2.6.25 final ships.

Got an updated hammer patch from prpplague (David Anders) and plugged it into the Impact build. Built a kernel, worked out once again how to flash the nail board (well I forgot, this time I wrote it up), and it booted! Woot! Now I need to replace the initrd...

Mercurial is still recursing into subdirectories of the working directory rather than looking at the contents of the .hg directory for things like "hg diff". This means that when I do an hg diff after a build, and the "build" subdirectory (which isn't tracked) contains complete extracted copies of the source code for linux, gcc, binutils, and so on... It can easily be 30 seconds of disk grinding before the diff does _anything_. This is DEEPLY STUPID, since diff is never going to find anything in a file that _isn't_ tracked. (I've complained about this , though. (It doesn't help tinycc any more than any other external linker does, but I have been studying linker stuff all week and he did a series on it...)

I now have two significant Impact patches I can't check in until I do a new toybox release. Guess it's time for one of those soonish, and then time for an Impact release with the new name and new web page...

March 25, 2008

Couldn't get the door fixed. They have to order parts, and then I have to drop it off for three days while they work on it, and the total would cost $1100. I got the car itself for about twice that, and put another $1000 into making it drivable. Not sure it's worth it.

I did manage to get the electrical system fixed, though. (Properly this time, I think. Who knew a pontiac routed so many functions through a single part? Finally, an intermittent problem that manifests in front of the mechanic.)

Got the toybox "cp" command working well enough to plug it into the Impact build. (Five more commands to go, two of which I've already written and just need to port. Then I can get Impact self hosting again.) Upgraded to while I'm at it, which lets me drop the mips patch.

Darn it, cp isn't _quite_ working. Grumble, grumble... Ok, how about now?

Back to the salt mines tomorrow...

March 24, 2008

Spent a longish chunk of the day at jury duty selection. Didn't get selected, but it took until 6pm for them to figure this out their final 12. (An aggrivated sexual assault case, involving a "he said, she said" between two people who were _both_ admittedly drunk at the time, and more or less entirely boiling down to issues of credibility and consent. I was _so_ not looking forward to being involved in that, my social skills really don't stretch that far. To be honest I probably would have sided with the woman because standing up and publicly branding yourself a rape victim for life isn't really something most people do on a whim, and they made it pretty clear that she was willing to testify in court and he was pleading the fifth. Yeah, I'm aware that saying that before seeing any evidence would have made me a horrible juror here. But hey, the whole of society skews slightly against women, here it should probably skew slightly for them.)

Headed back to my car to make my 6:30 appointment, and found out that I'd left the lights on when Fade and I went to the grocery store earlier, so the battery was drained to the "starter makes clicky noises instead of turning over" point. Sigh. That's the second time I've done this since I broke the driver's side door. (The passenger door doesn't "ding" if you left the lights on, so getting out that way has extra built-in downsides.)

Found a cute blonde woman who was willing to jump me (and how often do I get to say that?) and headed out to meet Mark and Stu at IHop for the decision meeting on the new con. This was where the three of us made the "go/no go" meeting, and we decided we're going for it.

So, in around 18 months (late September or early October 2009) we're going to do another combination Science Fiction Convention and Linux Expo here in Austin, in the style of Penguicon and Linucon. We won't be using the Linucon name (after handing stuff off to Chase year 2, we're not sure where the ownership of that sucker lies, and I was never really that fond of the name anyway).

There are several reasons we're doing this. (One is that I want to give some of the money the SFLC sent me back to the community, so I plan to fly in a couple of embedded developers on my own dime.) But probably the main one is that we want to do something that _lasts_.

From Penguicon I learned that it takes about 5 years to make a con self sustaining. That convention had a stunningly successful year 1 and year 2, 500 people the first year and 800 the second. In Penguicon's second year it was the largest science fiction convention in Michigan. And then year 3 more or less cratered (attendance shrank about 25% and the con lost money for the first time, and or momentum was _gone_), in large part because the original group behind it scattered. (I got distracted with Linucon 1, co-founder and year 1 con chair Tracy Worcester got thyroid cancer, year 2 con chair Steve Gutterman got engaged at Year 2's opening ceremonies and was off being a newlywed... Not sure what John Guest was up to but he wasn't part of the year 3 con chair's posse...) We all had to come back and pour a lot of effort into year 4 to get it turned right side up again, get our momentum back. Year 5 it growing again pretty strongly, and now at year 6 it pretty much has a life of its own, and I for one am no longer involved in it at all. (Although that's as much due to a personality conflict with the upcoming year 7 con chair as anything, but the point is it doesn't actually _need_ any of the original team anymore. It's doing fine without us. This was clearly not the case in Penguicon's year 3, and very much not the case in Linucon year 2.)

So with this new con, Mark, Stu and myself are starting out with something vaguely like a 5 year plan. There's no point in doing this if it won't continue beyond our interest in running it. Linucon we burned ourselves out doing year 1, handed it off to other people for year 2 with very little continuity, and didn't bother to do a year three. (I spent what would have been Linucon year 3 in Pittsburgh).

This time, we know who will be con chair for each of the first three years, and then we stay around to help whoever is con chair years 4 and 5. We have a better idea how long things will take (and how much work they'll be, and how much to budget), as well as how many attendees to expect and where we can recruit help from.

I won't be able to make it back to Houston tonight because my car is still in pieces. I have to go deal with that tomorrow.

March 23, 2008

Unpacking last night, I dug up my old three ring binder with the printout of the TCC source code. Brought it to Ikea this morning when we went to pick up four more bookshelves, but didn't have much chance to read through it. At CoCo's, on the drag (it has internet now!), watching a cute oriental woman bring pizza to the cooks in the back. I guess if you work at the same restaurant long enough, you get sick of everything on the menu...

Metro changed its schedule again; now closed saturday and sunday. Sigh. Five more days to go...

I want to add an option to tcc to print out the name of each file it's compiling, so "i386-tinycc one.c two.c three.c..." gives some kind of progress indicator when dealing with a boatload of files. The obvious thing to do is move all the "-v" options down one and have a single -v do it, but the first -v prints out the name and version of the compier. (Which is externally constrained, or at least gcc does it. It's not in SUSv3's definition of the "c99" utility...) I suppose I could add some kind of "--progress" long option. Worry about it later...

Slapped the toybox cp command into the impact build to see what it would do. It segfaulted. The reason for that was two statements were backwards in the option parsing logic, but the rest of the copy command didn't work because the logic for passing names from the recursive tree descent thingy into the actual copy function is all wrong, especially for absolute paths. I suspect I'm going to have to pass in separate source and destination paths, and I'm vaguely trying to figure out how I got away with _not_ doing that so far. (It's been about a month since I've looked at this code, and it no longer seems quite so clear and straightforward as I remember. Sigh.)

March 22, 2008

Trip to the emergency room last night due to chest pain going down my left arm. They did an ekg and an x-ray and said my heart looks fine. A bit annoyed I wouldn't let 'em take blood, but given my longstanding phobia of needles I just wasn't up to it. They agreed it might be due to the blow on the head on wednesday, or a pinched nerve, or who knows what. They recommended I follow up with a cardiologist, and gave me contact info.

I remember leaving Quest Multimedia in 1998 because I got a sinus infection and thought "health insurance: good idea". Neither the Houston job or the Linux Foundation thing before it offered health insurance. Starting my own company doesn't inherently offer that either. Sigh...

Finished reading the ELF spec.

March 21, 2008

Back in Austin for the holiday, running many many errands. Getting a haircut at supercuts didn't used to translate to "have a gay man fondle your head for half an hour" (I thought that was usually reserved for the more expensive places), but oh well.

Went to the car insurance place and got a fresh printout of the card thingy to show the police back in Stafford. Found out they do health insurance while I was there and got a card. (I'd be more worried about the chest pains I've been having if I didn't also have rib pains, foot pains, side of face pains... Random migrating "ow", lasts about a minute at a time. Seems to have started when I stood up into a half-open dryer door a couple days ago. The top of my head is still sore, it was a heck of a whack, wouldn't be at all surprised if I had a concussion from it. Hopefully it'll work its way through soon. That said, I got a baked potato instead of fries as my side for lunch today. Losing a few pounds is unlikely to make things worse, whatever's wrong.)

Took to the car to Lamb's for them to frown professionally at the door. They sent me to a body shop which can bang on it monday (it's apparently about 1/4 inch forward from where it should be, which makes Pontiacs deeply unhappy).

Got passport photos. (Yes, Ottawa Linux Symposium is still in Canada. This year, anyway. Dug up a copy of my birth certificate, and I still have a driver's license. The first appointment the post office in Austin can give me for passport stuff is April 2, but the post office in Stafford can do Tuesday at 1:30.

Whether or not jury duty will last through Tuesday, I have no idea. The likelihood of me actually being _selected_ for a jury is close to zero. I used to be a member of Mensa (and would still be if I started paying the dues again; that's how I met Kelly and Steve, who used to run Mensa games night). Intellectual property law is a hobby of mine. I've been a plaintiff in 4 lawsuits in the past year, I've been paid by lawyers to be a technical domain expert, and somebody else is paying to fly me to Boston at the start of May to talk to a bunch of lawyers about my experiences with open source licene enforcement. (I've even spoken to Pamela Jones of Groklaw on the phone once.) Heck, I know what a writ of mandamus is, and used to know what "Reis Judicata" meant but have forgotten. ("It has been decided"? Something to do with whether or not an issue is dismissed with or without prejudice, perhaps? I should look it up...) I followed the 1995 and 1998 Microsoft antitrust cases day by day (I was a big _fan_ of david Boies in 1998; which lasted until his involvement in the supreme court election thing in 2000). I followed the SCO trial (and Novell's related motions) closely before there _was_ a Groklaw. These days, I'm following the Hans Reiser trial...

As for local Texas law, I'm aware of jury nullification and agree with it. (And it's not like you can _stop_ it, it's what happened in the OJ Simpson trial without the fancy legal foundation. It's the downside of having juries decide the issues, they may _decide_.) I also used to be a fan of Nolo Press, I wonder whatever happened to them?

Basically, I'm exactly the kind of person lawyers _don't_ want to pick for juries. They want somebody they can predict, control, and manipulate, who brings no outside knowledge to the proceedings and limits their thinking to only what's presented before them. Somebody clearly dumber and less informed on the issues than the lawyer, who will therefore look to said lawyer for guidance. Me, I'd be grading them on their performance.

That said, jury _seletion_ could easily last several days before I get eliminated. (And who knows, maybe they'll want to pick me for laughs. Lottery winners and lightning strike victims do occasionally happen.)

On the technical front. I'm still reading the ELF spec. Got a bit distracted reading about gcc extensions in the gcc documentation, which was linked from the Linux assembly language programming howto, which is one of many resources linked from the "Magic of ELF" section of the Virus Writing Howto, which google pulled up while I was looking for the name of the actor who played Elrond in Lord of the Rings. (He was played by Agent Smith, just as Neo was played by Ted Theodore Logan. Whoa.)

Into the dynamic linking section now, and WOW is this obtuse. Why do I have to dig up the processor supplement to figure out what the procedure linkage table and global offset table actually do, or what this rel/rela stuff is? Ah, the muppetlabs version has this info (which is absent in the old caldera PDF). The version is a strange combination of "up to date" and "probably written by people who do not program much".

March 20, 2008

Using SuSE on the machine at work is quite a let-down after spending so long with Ubuntu. EVERYTHING'S BROKEN. There's no "minimize everything at once so I can see the background" button in KDE. The fonts are ugly and wrong (and the kerning outright broken in places). Their version of Konqueror is so unstable (crashes) I have to use Firefox, then Firefox tries to pull up Adobe acroread to view PDFs instead of KPDF. Their start menu has a tab named "Edutainment" (really!). I can't find a "system guard" equivalent that will actually dock with the panel and show me cpu/memory usage...

Could be because Work has 10.1 installed on this machine (it's 2 years old), but that doesn't explain why they stamped their Lizard mascot all over everything. (The menu botton is a lizard. The help icon has a lizard in the middle of it. The title bar of every single menu has a lizard right after the title. I get it, I'm using the giant exercise in branding which is suse! You can stop now. Kubuntu does not do this.)

Right, at least it's not a Windows box...

Rereading this old classic in light of yesterday's study of ELFdom. That site also has a text version of the ELF spec that's a bit easier to deal with in places.

March 19, 2008

Ok, debugging this early boot stuff with qemu and gdb works like this:

Run qemu-i386 -g 9876 commandline

fire up gdb (no arguments)
  target remote :9876
  display/i $eip
  info r
  (repeat those last two, note that the display is the instruction it's
   _about_ to run.)

When I do an "objdump -d a.out" on an executable produced with gcc, it shows me where each function starts and the name of the function. I don't even have to use -g for this, it just does it. But when I do it on an executable produced by tinycc, it's just one big block, even if I built it with -g. That's probably a higher priority "to fix" item than the static linking thing. This means I have to learn about the guts of the ELF format. There's a spec on that. Read, read, read...

Notes! (I may update this chunk in future, or move it to a seprate file or something.)

I moved this to its own file

Hmmm, tinycc needs to be a swiss army knife executable. It needs to run as "cc" (the default), "ld", "ar", and maybe "strip". (I wonder if make functionality belongs in here or in toybox? Hmmm...)

March 18, 2008

Reading the comments on slashdot is always amusing when the story involves you. (In this case I can't reply to any of 'em because the terms of the settlement included an NDA preventing us from talking about the terms of the settlement, and it's just easiest not to go there. I admit there is a certain amount of irony involved in a settlement about open source license compliance being under NDA, but if Lawrence Lessig and Eben Moglen are ok with it, and the end result is compliance with the GPL terms, life is good.

Banging on tinycc some more. I've suppressed the flood of sign and size mismatch warnings in my local copy, but I'm not checking it in. I need to FIX them, not suppress them. This revealed a couple of easy to fix warnings and one instance of "darn it, gcc is doing 'may be used uninitialized' when it _ISN'T_ again":

i386/asm.c:414: warning: ‘seg_prefix.reg’ may be used uninitialized in this function

Let's look at that, shall we? Simplifying the code a bit, we get:

static void asm_opcode(...)
    int has_seg_prefix;
    Operand *pop, seg_prefix;

    has_seg_prefix = 0;
    for(;;) {
        pop = stuff();
        if (tok == ':') {
            seg_prefix = *pop;
            has_seg_prefix = 1;

    if (has_seg_prefix)

I.E. has_seg_prefix is always initialized to zero, and then the only place it's set to a nonzero value is when seg_prefix is initialized on the line before. Therefore, the test for has_seg_prefix will ONLY be true when seg_prefix.reg has been initialized.

Thus gcc is JUST PLAIN WRONG HERE, and should SHUT UP ABOUT IT. I'd switch off this warning with a -Wno-being-stupid flag (like I temporarily did for the other warnings I haven't fixed for months because the benefit to pain ratio is fairly low), but there's no way to switch off "may be used uninitialized" without switching off "is used uninitialized". They're two separate warnings, controlled by the same switch. Sigh...

And I despise gdb. I want to disassemble the program prefix. (The stuff from crt1.o and friends. It's segfaulting _before_ main.) There's no obvious way to tell gdb to do this. Load the program and step: "But the program isn't running!" Set a breakpoint on the start address from readelf: "That's not in a function!" Yes, I KNOW it's not in a function you pile of glop. By the time it gets to main(), it's already segfaulted.

Sigh. Back to objdump, I suppose... Ah, no wait! The -g option of qemu-i386 lets me connect gdb to qemu running the program, and QEMU isn't written by the FSF constructed entirely out of unfounded assumptions the way gdb is. I can step right from the start. Yay!

Ok, it's starting at 0x804a78c which is indeed the program's entry point address according to readelf.a. And a single step goes to what looks like the next instruction. (It would be nice if I could convince gdb to show me each instruction as it executes it, but I'm not going on a half hour tangent to look that up right now.)

March 17, 2008

Got lost driving in to work (missed the turn-off), spent a couple extra hours wandering around downtown Houston before getting back to 59. Wound up getting in to work totally sleep deprived, to the point where I had to leave early for a nap. The wind was going crazy and it smacked my car's driver side door into something so it wouldn't close. Finally got it closed, now it won't open (but I can get in and out on the other side and drive it that way). Off to Lamb's on Friday, I suppose.

I don't like Houston.

So, downloaded Grishka's tcc-0.9.24 release candidate and gave it a whack just to see if it had any behaviors noticeably improved from my version. It still doesn't build on an x86-64 host (and the old ./configure provides no obvious way to configure it to do so), so I fired up 32 bit xubuntu under qemu to work around this. Now, to check a few low hanging todo items:

The -static linking bug against Ubuntu 7.10 glibc is still there. The "fix" that went in to cvs either isn't in this version or didn't work.

The arm cross compiler is almost unusable. There's no way to change the search paths in ./configure, they're hardwired into the C code. It doesn't recognize --nostdinc or --nostdlib (you have to use the single dash versions of each one). Although -nostdlib stops it from linking against libc (so you have to add -lc to your command line), it doesn't remove /lib from the search path (so it finds the host libc before the -L I fed it). The world's ugliest workaround for this is to bind mount the armv5l cross compiler's lib directory onto /usr/local/lib and then run the sucker under strace to make sure it's not missing anything and falling back to grab it out of the host system. (The crt*.o files are also still at hardwired paths, but -nostdlib zaps them too so I just add 'em by hand at the _right_ paths...)

The next bug is that if it encounters a linker script redirecting it to a file that doesn't live at an absolute path, it looks for the file in the current directory rather than going back through the library search path. Sigh. I fixed that in mine. Right, cd to /usr/local/lib and run the build from there!

Ok, so, after bind mounting /usr/local/lib and doing a cd into that directory, this:

arm-tcc crti.o crt1.o ~/hello.c -o ~/arm-hello -nostdinc -nostdlib -I ~/coss-compiler-armv5l/include/ -I ~/tcc-0.9.24 crtn.o -lc

Produces an arm-hello file! Yay! Now the question is, "does it work"? Let's see, copy it into an empty directory, "qemu-arm -chroot . arm-hello" (yeah, my chroot patch, I submitted it to the qemu list a week or two back)... Wants lib/ so cp out of the cross compiler lib dir to that name... Wants, add that...

And it works! Cool! Now the question is, if I make a statically linked one, will it work? I never actually tested making a _dynamically_ linked arm thingy with mine, just a static one. Let's see:

arm-tcc crti.o crt1.o ~/tcc-0.9.24/hello.c -o ~/blah -nostdinc -nostdlib -I ~/cross-compiler-armv5l/include/ -I ~/tcc-0.9.24 crtn.o -lc -static ~/cross-compiler-armv5l/gcc/lib/libgcc.a

And the resulting binary segfaults, just the way the one I was trying did. Ok, I didn't introduce that bug. So does that mean mine works dynamically linked?

arm-tinycc -nostdinc -nostdlib -I ~/cross-compiler-armv5l/include/ -L ~/cross-compiler-armv5l/lib hello.c -I include -lc ~/cross-compiler-armv5l/lib/{crti.o,crt1.o,crtn.o}

Yup, it works! Yay! So arm isn't specifically broken, it's the same "static linking against uClibc segfaults" bug that x86 has. Right, fewer problems to fix.

So basically, the upcoming tcc 0.9.24 release contains zero fixes of interest to tinycc, with the possible exception of the new win32 stuff (which I barely care about anyway).

March 16, 2008

Taking a whack at Firmware Linux again, the kernel broke "make headers_install", because this:

--- linux/include/linux/Kbuild
+++ linux/include/linux/Kbuild
@@ -217,6 +217,7 @@
 unifdef-y += icmp.h
 unifdef-y += icmpv6.h
 unifdef-y += if_addr.h
+unifdef-y += if_addrlabel.h
 unifdef-y += if_arp.h
 unifdef-y += if_bridge.h
 unifdef-y += if_ec.h

Is not accompanied by an actual if_addrlabel.h file anywhere in the tarball. Sent off a bug report...

It turns out that the sprint wireless internet thingy now works with Linux, although in a definite "buyer beware" way that still involves performing initial setup on a windows machine (which I hope they can do for me in the store). Might be worth a try. Looks like the USB device is just a bog standard usb serial PPP connection once you've got the initial configuration out of the way (which apparently only has to be done once and is then stored in flash or something). Set to 921600 bps, dial #777 and login "user" password "user". Sounds doable, and way better than trying to get 5 months of cable modem service in Houston...

March 15, 2008

Couple of small patches to tinycc while frying a turkey at Mark's. (The dynamic linker is now specified in ./configure rather than hardwired in the code.) Other than that, mostly offline all day.

March 14, 2008

Another night of Disgaea rather than productive work. Moved into the new apartment near work. It's amazing how much you miss the little things like a bed, a shower curtain, trash cans, toilet paper... Eaily fixed, but not today.

I emailed my boss a couple days ago about presenting at CELF. Still haven't heard back.

Here's a video of the CEO of a seismic exploration services company talking about peak production without actually using that phrase. (Click the "I/O: Integrated Solutions for Today and the Future" to start the video). About 15 seconds in:

We have effectively an energy crisis in the world.  We'll use about 80 million
barrels of oil a day.  It's projected that number will go up to 110-112
million over the next few years, probably by 2010-2011.  At the same time
we're only finding 1 barrel of oil for every 2 barrels we use....
Within that context, the challenge for the industry is getting more and more
difficult.  The wells are deeper, the formations are more complex...
as you get into more difficult places to look, it's more expensive.

The second and fourth sections of the video also start by talking about how oil exploration is getting harder (admittedly in a "why you want to pay this company lots of money to help you do it" style marketing context, but it's much more watchable than Wally).

March 13, 2008

When did Diet Dr. pepper stop tasting nasty? Why was I not informed? (It was awful circa 2003, I dunno if they changed the formula or if I've just gotten used to diet sodas since then...)

Found the PSP in my backpack last night. Got zero programming done. (Did make it to level ten of a Testament but then Etna got whacked and she was the only character over level 100, and I did a party wipe trying to take down the darn item general before using the Mr. Gency's exit. Sigh. If that makes no sense, google "Disgaea, Afternoon of Darkness".)

The breakfast part of the "engineering breakfast" this morning didn't quite agree with me. (On a related note, whoever selects the music in the bathroom may need couseling. Eric Clapton's "Tears in Heaven", Seal's "Kiss from a rose on a grave"...) And yet, I went to see if there were any leftovers around 1:30 because I haven't been to lunch yet. (Yup, I still think like a college student. Surprise, surprise.)

Reading up about Design Patterns. Encountered some code that uses the "visitor" pattern and _still_ can't wrap my head around it. (In C, you put a function pointer in your structure to do a callback with, and thus can control what you're doing. In python, it doesn't even try to figure out what to do until runtime because it's fully dynamic, and thus it Just Works. This Visitor thing seems to be a verbose and tedious workaround for brittleness in C++ that the languages I normally use just don't HAVE. Yeah, another one.) But there's existing code that implements what the comments insist is "Visitor pattern", and I'd like to understand _why_ it does it this way...

Eric suggested that the name for the C++ rant I need to write should be "Why C++ is not my favorite language", and after his experience with Wesnoth he's definitely up for co-authoring it. Cool.

March 12, 2008

Put out another tinycc release last night. Woot! It's 1.0.0-pre2 (since I'm deciding the next major release should be 1.0.0, and I already put out a -pre1...) The i386 target works (on both i386 and x86_64 hosts), arm is still slightly unhappy in the linker, and who knows what c67 is doing. Windows doesn't even build, and it's full of warnings, static linking doesn't work against glibc, configuring it to link against uClibc is awkward... But IT'S BEEN TOO LONG, darn it. Gotta get back on a regular release schedule. Here's a known version with known bugs, which is at least usable on x86, and it gives me something to measure regressions against and a presumably finite set of bugs to fix and missing features needed before 1.0.0.

Possibly I should look up how to bother Freshmeat about this. (Ah, the joys of having net access at the hotel. Yeah, I broke down and got another couple days at the Sun Suites. I should finally be able to pick up my key to the new apartment tomorrow after 4pm.)

The tcc guys noticed that Mach-o isn't ELF yesterday. I sent 'em some pointers. It's sad: I'd happily help them out but I want that CVS repository to DIE. It's the 21st century, people: NOTHING SHOULD BE USING CVS ANYMORE. That should have gone the way of 16 bit hardware by now. QEMU (another project Fabrice started) has been publicly talking about a move to at least svn, and even Emacs is switching to bzr under the new maintainer.

I made tinycc a new project and changed the license to GPLv2 not because I didn't want people to _use_ it but because I want to make sure that nothing I write winds up back in that #*%(&% CVS repository. (If I could easily get a commit list out of cvs so I could see what patches went _into_ the repository, that would be one thing. But it hasn't got the concept of commits, each file is tracked individually, without grouping info. I.E. you can't go to the top of the directory tree and ask "show me the last three changes", not via the cvs command line utility, nor in the web repository viewer. And that's sad. Yes, there are third party add-ons for this. They're called "tools to convert the entire repository to a real archive format", which CVS is not.)

I'll mess with CVS if I am _paid_ to do so, but not on a volunteer basis.

Heard back from the CELF people. They want me to give a longer version of the cross compiling talk I gave at OLS, with paper. So I guess I'm going to CELF next month...

When did I get grey hairs? I have one on each side now, and they're really long, I'm talking 4 or 5 inches. (Yeah, I need a haircut.) How did I not previously notice them? (Ok, it could be an artifact of the flourescent lighting in the bathroom, but I _am_ 36 now, and my father went grey in his teens...) Weird.

I'm told the rss feed is throwing extra </a> tags at the end of the dates again. Sigh. Have to find time to dive into Christian's python script again... Ok, how did that _ever_ work? Fixed, I think?

Wonder what I'm doing at my new day job? A recommended resource on the "new developer" wiki is (I am not making this up): Wally the Wavelet Explains Seismic Technology. (How many 5 year olds are influencing purchasing decisions for seismic imaging technology, I have no idea, but this video is evidence that the number is nonzero.)

March 11, 2008

Made another stab at obtaining internet access this morning. Still nothing.

The crt1.o changes in tinycc are turning into a general library cleanup. The mess of tcc_add_file(), tcc_add_file_internal(), tcc_add_dll(), and tcc_add_library() can be consolidated and simplified rather a lot. It should look for the crt?.o files in the library path. Also, in passing: make "cat hello.c | ./tinycc -E -" work.

I would _really_ rather continue working on this today than go to work. :( On the other hand, I can't go to the gym any evening this week (no driving after dark until I get the taillights fixed), so that should give me more time to work on this. (Getting actual sleep helps one stay awake in the evenings. Go figure. :)

You learn some interesting stuff reading the human resources website of an oil exploration services company. Peak oil seems to be just taken for granted in the industry news section (it's old news; apparently if you're talking about "light sweet crude" it happened in May 2005, if you add in the harder to extract and process stuff that's expected to peak sometime in 2011).

Random example: "Financial Times: Production declines at Exxon and Chevron" (By Sheila McNulty in Houston and Ed Crooks in London), February 2, 2008:

Exxon's oil and gas production for the year fell by 1 per cent to 4.18m barrels of oil equialent a day. Chevron's production fell 2 per cent at 2.61m boe/d.

Chevron also warned that it expected to report additions to its reserves to replace only 10-15 per cent of the oil and gas it produced last year. Exxon said it would give details of reserves replacement in February.

The results followed Royal Dutch Shell, which a day earlier also reported record profits but falling production. Shell's production fell 5 per cent in 2007, and is set to fall again in 2008 for a sixth successive year.

Apparently, when it comes to oil, it's a seller's market. News flash for you there. Not a whole lot of extra suppliers bidding down that $100/barrel...

Most of the rest of that article's on profits and capital spending, although it does note in passing "More than 80 per cent of oil reserves are controlled by national oil companies", which explains why so much of this information is treated as some kind of state secret. (Of course the people who _find_ the stuff might know... :)

Shell's "Scenarios thru 2025" (yes, that's how they spelled it) is a giant glossy marketing blurb in PDF format full of pointy-hair speak (the entire thing claims to be an "executive summary"), but it's still got the occasional interesting tidbit. The section "India out of China's shadow" (they're trying to predict oil demand going forward) notes that in India "agriculture still occupies more than half the working population but accounts for only 22% of GDP." I did not know that. Still, Matthew R. Simmons' "Special Focus: Outlook 2008 Prices and Supply" (February 2008, Vol. 229 No 2 from Simmons & Company International) manages to cram several times as much information into its 6 pages as the shell guys manage in their 18 pages of not quite powerpoint slides. From Simmons, page 4:

The most troubling piece of historic oil supply data available in the public domain comes from the US Department of Energy's Energy Information Administration (EIA)... [which shows] a steady growth in crude oil output until world crude output finally blew through 70 million barrels a day, setting a new annual record of 72.5 million barrels a day in 2004. Soon this all-time high crude output sputtered. For 9 out of 12 months of 2005, it remained in the 73 million-per-day range, only exceeding 74 million barrels a day in April, May and finally December. The all-time crude oil output record, as best we now know, was realized in May 2005, when the world produced an average of 74.3 million bpd of crude. This peak quickly slipped under the 74 million-bpd level. Ironically, this record was set in the same month that CCantarell, Mexico's giant oil field, peaked and then went into decline.

Average world crude production in 2005 was 73.8 million bpd. In 2006, it fell to 73.5. Preliminary data through August 2007 indicates the seven-month average was 73.1 million barrels per day. Reported 2007 crude production slid to 72.8 million in June 2007, and then 72.5 million in August 2007.

Quick math: 74 million barrels per day times 365 days is over 27 billion barels per year, world population currently estimated at just under 6.8 billion, that's around 4 barrels per year for every single person on the planet including the third world. That's a lot. The problem isn't getting oil, it's getting _THAT_MUCH_ oil, consistently. And demand continues to increase especially among said third world...

Another recurring theme in these articles is that the drilling equipment and workers are old. (Simmons covers it on page 5, the National Petroleum Council's 41 page "Draft Report: Facing the Hard Truths about Energy" mentions it on page 2 and then discusses it in depth on pages 28-31.) Apparently, the traditional end of life of an offshore oil drilling rig is 25 years, and the average age of oil drilling rigs in 2008 (there are about 500 of them in service) is 26 years, and this is a problem for something that's not only made of metal moving parts, but spends its life immersed in salt water. Plus over half the trained oil drilling workers in the industry are within 10 years of retirement, and unskilled labor this ain't.

The various articles never explicitly come out and _say_ that the oil companies aren't investing in the future of oil drilling, perhaps because they expect to need less of it going forward and are letting natural attrition do its thing? But I do note that the company I'm working at does oil _discovery_, not drilling. (An oil exploration services company makes the equipment that other people use to find oil. Getting at it is your problem, as is actually using said equipment to actually find any actual oil. Apparently there's still lots of money being put into better and better ways to try and find oil, while the drilling equipment rusts and refineries consolidate. Hmmm...)

The next fun topic is "Enhanced Oil Recovery", which is all about dozens of different ways to squeeze more and more oil out of the same old wells. A recent speech Tony Meggs (British Petroleum Group Vice President for Technology) gave to the Society of Petroleum Engineers' R&D conference titled "The Third Trillion: Where are the Barrels and How Will We Get Them?" was all about that. The transcript mentions horizontal drilling, coiled tubing drilling, miscible gas EOR, gas cap water injection, and so on. (If you reduce water salinity when you do steam injection it can "can increase recovery factors by anywhere between five and 40 per cent." And they don't know why. Ahem, "The precise chemistry for this dramatic improvement is not yet fully understood." Obviously, not the same thing.)

So the second half of the bell curve (the part about continuing to get oil from old wells, albeit at a slower and slower rate, for many years) seems to be covered. And we're finding some new fields too (Sugar Loaf in brazil comes to mind, the third largest and possibly enough oil to supply the whole world for 2 years), just not as fast as we're exhausting the old ones. (Heck, there's 3 trillion barrels of oil sand between Canada and Venezuela; we'll be making plastics and fertilizers for a while. But the price of gas continues to creep towards $4/gallon. If China and India wants to drive as many cars as we've got, we'll all have to find something else to fuel 'em with.) Oh, and the "miscible gas" thing is particularly interesting because you can inject pure carbon dioxide down the wells to try to coax more oil out of the rock (maybe it acts as a solvent or something, I dunno) and in addition to getting more oil out you get bonus points for carbon sequestration. Woo. Genetically engineered microbes are on the menu too. They're getting creative.

Signed a six month lease on an apartment here in Houston yesterday, and it goes until the end of September. Even if this job only lasts as long as originally scheduled (through the end of July) it's still cheaper than spending every night in a hotel. If they want to extend it through August, it costs me very little to stay. (If they want to extend it all the way through the end of September, I'll have to decide if I want to take classes at UT in the fall or not...)

March 10, 2008

So, staying at Chez Rathole is $165/week at their cheapest rate, and assuming a 4 week month (I.E. February) that's $660/month. I can get a one bedroom apartment across the street from the Kentucy Fried Lizard Parts I eat lunch at way too often for $560/month. (I then have to pay electricity on top of that, so it probably comes out about even.) Neither option comes with internet access, but this one is right across the street from the 59 cafe (which does) and I can get one of those sprint cards if Ubuntu can be convinced to work with it. This one also means I don't lose sleep worrying somebody's going to break into my car, don't wake up smelling like cigarette smoke every morning, and am not regularly afraid of catching an unmentionable disease from the plumbing fixtures...

The shortest stint they can do is 6 months, but it's looking more like ION wants extend this contract an extra month anyway...

Went out to dinner at IHOP (not sure what else is open a half hour before midnight around here, other than the 59 cafe I'm getting a touch sick of). Got pulled over on the way back because my car's tail lights are out. Apparently whatever electrical problem makes the dashboard lights intermittently stop working also takes out the tail lights. (If I'd known that, I'd have walked to somewhere closer for dinner.) The cop was nice enough to give me a warning for that (since I honestly didn't know; the front ones are working), but cited me for my car extortion payment card having expired on the 5th. (There's presumably a new insurance card waiting in Austin, but I'm not _in_ Austin...)

Staying at Sun Suites again tonight. Bothered to get the internet access code from the front desk, but I can't get it to work. (Neither Konqueror nor Firefox brings up the login page, it just does a redirect to a server that times out.) I need to get one of those sprint internet card thingies. This is getting silly.

If it seems like I've gotten NOTHING DONE recently... That's what this darn Houston gig is shaping up like. When I have time I'm either too tired or too busy fighting Houston. That said, I managed some minor banging on tinycc, and might manage more in the morning before work.

March 9, 2008

Offline over the weekend, unpacking boxes, setting up bookshelves, reassuring cats... Checked my email a couple times, but that was about it.

March 7, 2008

More banging on tinycc. Got the arm and c67 targets building again. (I still don't know what c67 _is_, but it compiles.) Using arm-tinycc as a cross compiler is darn awkward, the path to crt1.o is hardwired in a way I need to fix, but for right now I can work around it.

Huh. If I "arm-tinycc -static hello.c", linking against the my armv4l uClibc, the resulting a.out immediately segfaults under qemu-arm. What happens if I build a .o and link the result with an arm gcc cross compiler ("arm-tinycc -c hello.c; armv4l-gcc -static hello.o")... And it complains that the .o is using hardware floating point and the uClibc.a is using soft float. Ok, try armv5l cross compiler... Hey, I got "hello world" to run linking with uClibc.

Ok, back up and try linking with the armv5l libraries instead via tinycc...

Fun little detail: the compiler looks for "" in the search path. These days, that's usually a linker script and tinycc has basic linker script support (ignoring AS_NEEDED entries, but in general weak symbol support is a todo item, as is thread local storage). The problem is that if the resulting library names it gets forwarded to aren't at absolute paths (which you generally don't _want_ them to be if your compiler is to have any sort of relocatability), then it looks for them in the current directory, not in the library path...

In gcc, the -B option changes where it looks for crt1.o and friends. And tinycc has a -B. So why did tcc hardwire this way back when? Hmmm...

March 6, 2008

So, I finally got tinycc unblocked again. It's sat untouched for 6 weeks because breaking out options.c broke the code. Reverting that cleanup is a major step in the wrong direction, but a _proper_ fix involved dealing with the mess that is tcc.h.

The problem is that tcc.h was just a big chunk of the start of tcc.c moved to a header file, and it's full of static declarations and "inline but not always_inline" function declarations, and is generally a huge mess that compiles to 20k or so of code (and header files shouldn't produce _any_ code when you #include 'em). So a major roadblock to breaking up tinycc into multiple .c files is that #including tcc.h from more than one c file causes problems. This is probably the reason breaking out options.c broke tinycc's ability to recompile itself: it was the second file to #include tcc.h and among other things each file had its own copies of various static global variables. Ugly.

So what I did was remove the #include of tcc.h from options.c and replace it with an #include of tinycc.h (initially an empty file). Then I repeatedly compiled options.c on its own, fixing each build break by commenting out the appropriate symbol from tcc.h and adding it to tinycc.h. Today I finished converting options.c to #include "tinycc.h" instead of "tcc.h", and now options.c compiles.

This may sound like a lot of esoteric churn, but I've been blocked on this. I haven't been able to break the code up into manageable chunks, which makes it really hard to do any work on it.

If I sound a little disjointed and rambling (even to myself right now), blame Houston and my enforced day schedule. I need more sleep...

According to "/proc/acpi/battery/BAT0/info", my laptop battery has lost 15% of its capacity already. :(

Drove around a bit rather than heading back to the hotel. Found a "Bally's Like Totally Fitness, Dude!" and bought a month's membership. (I could use the exercise.) It was across the street from an "extended stay" hotel which charges a little over $2000/month. (That would be a "no".) Found an extended stay Motel 6 variant ("suites") offering $239/week which might be worth a closer look. Found a Starbucks (of course), which still has "T-mobile" brand lack of internet access but they _claim_ they're switching to AT&T in the spring and will be offering free wireless at that point. This is seriously good news. (They've discontinued the _orange_ syrup now. Blackberry has not come back yet. Raspberry in hot chocolate is ok, but nothing to write home about.) The iced lemon cake remains as unhealthy as ever.

March 5, 2008

So apparently the little battery icon thing that got killed because it wasn't responding and then I couldn't figure out how to restart without rebooting my laptop was "/usr/share/python-support/kde-guidance-powermanager/" which, obviously, I should have guessed.

Got a little bit of banging on tinycc in today, but mostly my brain was too fried after work. This could be a problem. (Staring at C++ for hours, pondering things like "is there's any possible way in which this class's need to take a lock in the destructor isn't a sign of bigger problems, considering the lock variable is a member of the class instance this is the destructor _for_?" (Answer: no. If you're in the destructor while some other thread is still messing with the object, Bad Things have already happened.) Also, it seems you can't declare a vector of references, and if you want to subclass the Vector template to have it call delete on a vector of pointers, you may need to make their destructors virtual.)

Don't try to understand the above parenthetical, it's not worth it. This entire language is composed out of leaky abstractions. I'm collecting material for a big paper on why C++ is fundamentally misdesigned and should never be used for anything ever. (Really. That's not sarcasm. There is no niche or intersection of niches where C++ is the best language for the job, specifically where there isn't a _better_ language for the job, and I should be able to explain why at both the theoretical level and provide examples. I may try to suck Eric Raymond into working on this; he's had to come up to speed on C++ over the past year to bang on Wesnoth.)

March 4, 2008

So, I have jury duty starting March 24th, which may run for 2 weeks.

Poking at tinycc. Breaking out tcc.h and then options.c resulted in some serious stress fractures in the code, and to fix it right I essentially have to melt down large chunks of it and recast 'em. I've been putting it off because it's a serious pain, but it needs to be done.

The big indigestible lump is the global structure TCCState, which is hard to break into smaller lumps. I think for the moment I'm just going to move the variables I'm redoing out of it into individual globals with a common prefix, and then re-group them later. (Nope, I can't wrap it in a new structure that includes the old one as a member, then I'd have to have to #include the header that defines the old one and the point of this exercise is to _avoid_ doing that. In theory I could make a new structure and have the _old_ one start with an instance off the new structure, in which case I can even typecast between 'em. Then the old header is #including the new one, which isn't so bad...)

I have a 12 pack of Red Bull. Be afraid.

The old comment about "it's not whether the glass is half empty or half full, it's what's in it" comes to mind while pondering the need to rip out some hideous C++ code and reimplement it... in C++. More a lateral move than progress, really. Oh well, I'm getting paid.

The $32/night hotel would be stunningly bad if I hadn't seen the one down the street first. The one where an underage prostitude solicited me as I got out of my car, while her pimp looked on from one of the rooms, and a junkie having a bad trip ran into the tiny little bulletproof glass enclosed hotel lobby while I was in there and held the door shut because he'd set off the car alarm (crouching comically in the corner and panting very loudly) until his friend (the bum who'd asked me if I could "help him out" with 85 cents earlier; I gave him 50 cents) calmed him down enough to let me out. Got back in my car and left.

The abovementioned disaster is visible from the parking lot of the building I'm working at. The dive down the street I selected instead is still more or less within walking distance. The place reeks of cigarette smoke, I'm picking burned down incense sticks out of every crack in the walls (not sure if that's from the last tenant or the maid). The lock on the door was broken at some point in the past and the door doesn't quite close right unless you use the deadbolt. (And still doesn't seal properly.) Half the TV channels are static (and none of them is Comedy Central), but there is a "no actors were harmed in the making of this porn" channel that makes Cinemax look extremely classy in comparison. (Oh, and thanks to the Sci Fi channel I now know that Johnny Mnemonic is a truly horrible movie, bordering on incoherent from the far side, which manages to _retroactively_ be a cheap rip-off of The Matrix. That's kind of impressive.)

So the question becomes "Do I hate houston traffic more than I hate the rest of Houston?"

Five months...

March 3, 2008

Spent far too many hours last night trying to find my wallet, which is probably in the white pair of pants I wore to work on Friday. It seems like it got packed, no idea where. There is now a huge pile of dirty laundry (and laundry that used to be nicely folded before I dumped it on the pile at 2 am) in the living room. Still no white pair of pants. Fade is out at Metro so as to distance herself from all this. Don't blame her in the slightest.

Obviously, I am not at work today. Phoned them this morning and explained that my wallet had been packed, and I had to wait for the bank to open before I could get cash to put gas in the car, let alone get a hotel in Houston. They sympathised. (And it's nice to know that phoning them up and asking for "Evan's office, I forget his last name but he's next door to Kevin Rose" is actually a workable strategy. Yay having a human answer the phone.)

Got a new debit card (with visa logo even) from my credit union. I like my credit union. Still need to fax in my timesheet (and W4, and direct deposit paperwork, and about three other forms) to the consulting company today.

I have a jury duty summons waiting in the mailbox at the condo (apparently since the 19th). Might as well take care of that (and the huge pile of laundry) today too.

After two days of intense exercise, my resting heart rate is down to about 2/3 of what it used to be. I dunno to be happy about this or deeply worried about how bad it was before? (I _really_ need more exercise. I wonder if there's a gym near the Houston job?)

P.S. The most dangerous key you can hit in vi is "u". Because it can eat half a paragraph (like it just did), but "redo" was never implemented in vim. I occasionally ponder what kind of text editor I want to add to toybox, and I'm thinking maybe something skinnable so it can do various different key bindings. The UI really shouldn't be the hard part...

Oh well, no time for that this week. I can't even stick around long enough to vote in tomorrow's primary (registered in Austin, not Houston. I could have done absentee voting if I'd had a bit more warning, but that ended friday and between packing, the flu, and having to leave for Houston tuesday night I just didn't manage to pick up the right forms). Which is sad.

Hilary had to screw up rather a lot in order for me _not_ to want to vote for the female candidate, and yet she managed. She wants the job too much, and would obviously do anything to get it. Obama seems to want to _do_ the job, but doesn't want the job for its own sake. (In LOLcat terms, Hilary's motivations would sum up as "MINE!" and Obama would be pointing out of frame saying "You're doing it wrong.")

I still remember my Hitchhiker's Guide: Nobody who actually _wants_ the job is qualified to be president. Clinton was publicly preparing for her presidential bid 10 years ago, and it's why she became senator from New York despite not having lived there before. She can't have been motivated to run by Iraq or guantanamo or the patriot act or the retiring supreme court justices or most of the other current issues facing the country because they weren't on the agenda back then. She didn't want to solve problem X, she wanted to be president.

Obama hasn't been a national figure for more than a couple years, and says if he's not elected this time he's not running again. He doesn't show a pathological _need_ to be president. (Maybe he just hides it better?)

Of course the democratic party has an amazing ability to snatch defeat from the jaws of victory, and all the polls say that Clinton would lose to McCain and Obama would win against McCain, so you'd think Hillary would be a sho-in in the primaries. She also has the same kind of lock on her party's machinery that got Bob Dole the nomination in 1996. Oh well, we'll see...

March 2, 2008

Rented a U-haul. (Stu's truck is nice, but we just have too much stuff.) Filled the U-haul (with the help of Mark and three of Fade's friends). Emptied the U-haul. This glosses over much stuff. Returned the U-haul.

A brief aside about U-haul: wow are they slimy money-grubbing bastards. They charge you for the truck, they charge you per mile, and they charge you to put gas in the truck (gas isn't covered by the per-mile charge). That's already nickel and diming you, but that's not what puts them over the edge into full "slimy money-grubbing bastards" territory. What does is that they no longer give you a truck with a full tank of gas with the truck.

This means that you can't put an exact amount of gas into the truck so as not to be charged a "service fee", the way you could when you'd just fill it up before returning it. At the pump, you have to guess how much gas you used. If you put in too much, you give them free gas. If you put in too little, you get charged not only a hideous price per gallon (ok, "as opposed to" is a valid criticism there) but also a "service fee" for putting any gas in it at all (which they probably don't bother to do, since they don't have to send it out with any specific amount of gas in it anymore). That's the slimy bit: they've turned the act of refueling the truck into a _fourth_ way to charge you. (Well, fifth counting the insurance.)

Everybody went out to some vegetarian restaurant on Duval called "Mom's garden" or some such (because yesterday's trip to Outhouse Steak Back wasn't done with vegetarians in mind). Not impressed. The past was ok but not great, two attempts at a beverage failed to result in anything drinkable (how can you _not_ serve diet soda?) and the deserts they weren't out of didn't exactly inspire. (I hadn't previously known that peanut butter and chocolate pie could be chewy.)

March 1, 2008

Moving. Packing. Lifting boxes.

Broke two bookshelves.


February 29, 2008

According to Fade, Penguicon's hotel already filled up by the time she tried to make a reservation last night. Oh well, good for them. It actually tilts me towards not going for the first time (Matt's already tilted me 95% towards that, this is just quibbling over the last 5%), but Fade's looking forward to it and it is our anniversary. Oh well, no need to decide yet.

In some ways I consider this job an innoculation against C++. Just as I took a perl job back in 2005 despite really not being a fan of perl, I'm doing a limited (5 month) job where I try to do my best in a language I really don't like just to make sure I don't become too narrow by sticking to an ever narrowing set of things I know and like. At the end of this, I might have figured out what the people who like this thing see in it, and I might have a boatload of fresh ammunition to explain exactly what's wrong with it in detail. (Note that these cases are not necessarily exclusive.)

Meanwhile, I thought that the Linux box they gave me on Thursday was just a temporary machine they'd scrounged from the lab until the other box got set up for me to use. I was wrong, it's staying. There's is now also a windows machine on my desk. It's XP and not Vista, so I'm willing to just leave it switched off and use the other one rather than trying to do something about it. But contemplating the proximity to XP vs proximity to Vista thing I'm reminded of the comedian on HBO last night who said "She shot me! Ok it was with a .22 but it still hurt."

Possibly I should revive my old livejournal, or find/write some better blogging software that allows me to tag this in chunks. (Hmmm... maybe some kind of span tags around paragraphs, and then a python cgi to break out subsets of the material by tag? I've already got christian's old python script to make an rss feed...)

February 28, 2008

Nobody looked at my Identity Theft Card and driver's license yesterday. Apparently I just fax/photocopy it to the consulting company's HQ, despite the federal law about somebody having to look at the originals in person. (I did at least show it to somebody in person, although that was the HR person of the company I'm working at and the person who has to fill out the form is the HR person of the consulting company. In maryland, I think. Who can't see my Identity Theft Card due to being >1000 miles away. Not that an Identity Theft Card looks at all hard to forge _anyway_, being just a piece of oaktag with a name and an Identity Theft Number printed on it in blue ink. Wheee.)

Oh wow:

This html page requires that you use Netscape Navigator
version >= 4.05 or Microsoft Internet Explorer version >= 4

That's... from a page on a CD dated June 2007 in large friendly letters on the label.

February 27, 2008

Slept until 2am, headed out around 3am. Bought a new "business casual" wardrobe on the way out (because the most important part of doing this job is what kind of shoes I'm wearing), although the only thing open at the time was the 24 hour wal-mart so none of it quite fits right. Made it on the road to Houston by 4am, spent the next 4 hours driving (Houston traffic manages to suck _before_ the sun comes up). But I was there on time at 8:30 am, with enough caffiene in my system I seemed only vaguely ill.

After about 2 hours they sent me home so I didn't give anybody else the flu. Found a hotel, collapsed into bed, slept for 6 hours.


In theory I have internet access here, in practice I need to get a code from the front desk and haven't bothered to leave the room. Tackling a backlog of todo items in FWL/Impact and working up the courage to tackle the tinycc breakage again. (The breakage was caused by refactoring the code, which alas cannot be done in small chunks. It desperately needs cleanup, but the cleanup breaks stuff. Basically I need to sit down with it and work on nothing else for a month, which is hard to find time for even without a day job.)

Wandered out to the "59 Cafe" (on route 59), a nice 24 hour place with wireless internet.

I've decided I like RoughlyDrafted Magazine, which calls itself a magazine but seems to actually be an upscale blog. It focuses a lot more on Apple than I tend to, but that's not necessarily a bad thing. The iPhone is to the PC what the PC was to minicomputers. We all carry cell phones with us already, if they become general purpose computing devices with enough power and a good enough UI to run all our software, they will become the most common computing platform, and therefore the dominant one. Now imagine an iPhone that can auto-associate with a bigger keyboard and screen via bluetooth or some such and you could easily see things like desktop and laptop systems relegated to the "server" status mainframes and minicomputers were...

February 26, 2008

I have the flu. (Or possibly food poisoning, but that seems unlikely. Mark had the flu last week and about now is when the incubation period would end. This was around reason 9 on my list of reasons I wanted to start on the 3rd, but they insisted it had to be the 27th. I assume they have their reasons, but if I throw up on them I feel no remorse about this.)

Spent about three hours this morning in the bathroom making alarming noises, and the entire rest of the day in bed. It is now 7pm. I feel terrible. So far today, I had an instant breakfast drink, a slice of apple, and one Trader Joe's ginger cookie (about 1" in diameter). Felt somewhat nauseous after all of them.

Off to Houston...

February 25, 2008

Darn it, tinycc is segfaulting trying to build itself. This was noticed by tsuramoto on #firmware, who tracked it down to:

[14:26]  tinycc-7fb1cf0d8a84 returns: tcc: undefined symbol '__udivdi3' and six others
[14:26]  tinycc-11d95002dfe1 returns: segmentation fault

That means changeset 545 broke it, which is odd because that was code refactoring and the removal of a few "const" and "static" indicators. Fun.

The segfault is because the global stack is trying to free() something that isn't a pointer, so the real question is "where did this get on the stack"?

Kelly and Steve took us out to dinner, but I wasn't very good company afterwards. Feeling very tired and a bit unwell. Probably stressed about heading to houston.

February 24, 2008

Trying to get the Dr. Who DVD back in the mail to netflix, having found out that the commentaries on the dvds are crap and the good commentaries were actually podcast on the BBC website. Why they didn't include this on the DVD, I have no idea. We sent back the first DVD without knowing this, and in 10 years, nobody'll remember the online content. Except that half the commentaries on the current DVD (Daleks in Manhattan through 42) start out with the commenters wondering what they're going to talk about since the podcast covered all the good stuff, and then they go on and explicitly discuss spoilers for later in the season (because nobody is going to get the series through netflix and want to watch the commentaries before they have to send the DVD back, but not have actually seen the later episodes yet)...

Speaking of 42, did they HAVE a scientific advisor on this episode? You can't look directly at the sun comfortably on earth, but if you're in a close orbit around one staring straight at it is no problem. And if you jettison an escape pod right near a sun you can call it back with magnets, apparently the electromagnetic field of the star isn't a problem (nor is a gravitational pull way bigger than Jupiter's). Also, the concept of "crashing into a star", which is a big fuzzy ball of gas with no well-defined surface (see "solar flares") is darn stupid; a countdown until the shields failed and you get flash-fried would have made more sense. And how the heck could a tiny ship's fuel scoop have any real effect on something that size (that mosquito stole a vital skin cell!), and outlawing that kind of fuel scoop implies they've encountered _other_ stars like this? (Yeah, they put that in so they could place blame and be all moralistic, but it raises some pointy questions, doesn't it?) I suppose you can hand wave away the vulnerable bits being on the surface, after all Earth's like that. Except if you scoop a chunk out of earth you get numerous discrete entities pissed at you, it's not all one big thing...)

Still mostly a good episode, but disbelief did not stay suspended. (At the very end: what possible good could putting Martha's mother's cell phone in a plastic bag _do_?)

Alas, despite getting the DVD in the mail today, there's no way the next one will arrive before I have to leave for Houston. Not that I'd have time to watch it if it did... (Packing boxes, faxing paperwork, trying to get compu-thingies done...)

February 23, 2008

First day of new job is Wednesday, but I'm supposed to show up at 8:30 am meaning I need to drive there on Tuesday. I need to fax papers, pack boxes, send off the checks for taxes, mail out the old hammer board, try to document the new nail board, generally try to churn through as much of the todo list as I can because I'm not likely to get much done after the new job starts until August...

Wheee. Moving into "so much to do I'm paralyzed" territory. Don't like that.

Trying to finish the toybox cp command, because I don't want to add another one (gene2fs, sed, readlink...) that I got interrupted on halfway through. The cp command is one of the ones the Firmware build needs which neither busybox nor toybox currently supply a usable version of, and it's about 95% complete now. Just needs a few more command line options added...

February 22, 2008

Breaking up run-$ into three scripts, which call each other in sequence. I'm taking $ARCH out of the name since the output now gets wrapped in a qemu-image-$ARCH.tar.bz2 so the files in each qemu-image directory can probably have the same name. This means the outer two wrapper scripts don't have to be generated and only the innermost one does.

The three new run scripts are:

  • run-with-distcc CROSS_PATH [#port] - Run mini-native under the emulator with distcc calling out to the cross compiler. The first argument is the location of the cross compiler directory, and is required to use this script. Starts distccd (which must be in $PATH) before calling the emulator, and kills it again afterwards. The optional second argument is what port number (of loopback) to run distccd on.

  • run-with-hdb [hdb.img] [#megabytes] - Run mini-native with an ext3 image mounted on /home. If there's no first argument, the default is hdb.img. If the named image doesn't exist it'll create a sparse file (second argument is the size in megabytes, default 2048) and format it ext3.

  • run-mini-native - Calls the emulator to run the zImage with the mini-native image as its root filesystem. Optionally, it can use environment variables set by the previous two scripts to trigger extra behavior.

Note that run-with-distcc calls run-with-hdb which calls run-mini-native. You can call any later script directly if you don't want distcc or an hdb image.

Sometime before the next release, I might swap things around a bit so the hda image is mounted on /tools (which would require creating the image with the current contents of /tools as the top level directory) and the hdb image is mounted at /. This would let me make hda read only by default (so you don't have to fsck it if you kill qemu or panic the emulated kernel), and mean you could build a new system at / and then just umount /tools.

This is a larger change, which would require an initramfs to do properly. (Note to self: it should have a tmpfs on / if you don't supply an hdb.) Also, I really should build toybox in the final system, and use oneit...

February 21, 2008

Made a fresh todo list, because I've lost track of all the things I'm doing. Then stuck it at the front of the old todo list when it ballooned to a comparable size within about 15 minutes of thinking of more todo items. Need to collate, as usual. Concatenating's a start, I suppose. :)

The dirtree infrastructure cp is using hasn't actually been used by anything else yet (it was built for gene2fs but that's been stalled for a while, yes I really should get back to it. And toysh. You think that's bad, my bzip2 implementation has been about 98% completed for _four_years_now_). This, of course, means that it's both buggy and has subtle design flaws. The problem with doing a recursive cp based on chdir is there are _two_ contexts (source and dest) so chdir would do lots and lots of swapping back and fourth. Also, the structure I'm filling out has just the component name, but as long as the path is sitting around anyway it's nice to feed it to the callback.

Ok, toybox cp is passing the current test suite (yay!) but that's only because cp.test doesn't have any symlink tests yet. And I can think of a few more corner cases I should add tests for, such as three level source directories with both an empty target and an existing directory target, naming the same source file twice with a directory target...

Got in a long walk today (since I start my new job on the 27th and am unlikely to go on long walks for the next 5 months; they'd be through Houston). Thought a lot about sorting algorithms for bzip2 compression side while I was at it. (Well it was too bright to play Disgaea on the PSP.) Then went and re-read the sorting code, which is full of asserts and hand-unrolled loops...

Julian Seward's original bzip2 code uses a heuristic combination of several different sorting algorithms, some of which abort what they're doing once they've done a certain amount of work without reaching a conclusion, and restart with a different algorithm. Since they have different pathological cases, this is a fairly clever way of snappily sorting a boatload of data (essentially 900k different strings, each of which is 900k long).

From a licensing perspective, I already got permission to copy the existing code verbatim into a GPLv2 project (retaining a record of the existing contributors, of course). But from a size and complexity perspective, I'm tempted to chuck the whole sorting blob and replace it with a big heapsort because there's something like _five_ different sorts in here that get used on various bucket sizes or fall back to each other... Unfortunately, this is one of them size vs speed tradeoffs that's likely to _suck_ if I shrink it much. (My naieve first attempt produced a sorting algorithm that ran for 15 minutes on a pathological data block, which 900k of /dev/zero counts as because you have to compare each 900k run all the way to the end, 900k times. Yeah, that was a couple laptops back, but that laptop was still faster than my nail board.)

I've never bothered to implement the "low memory" bunzip2 code for similar reasons. It packs the location indexes into 20 bits instead of 32, and can decompress in under 4 megs of ram. But it's also something like 20 times slower than the simpler "each index is an int" decompression code that allocates an array of 900k 32-bit integers to do the math with.

Hanging out at Metro. It's quiet. it's 6pm and they used to have this many people at 3am. Oh well, quiet is good while it lasts... Except they're closing at 8pm. That's sad. Close at 3, people stop coming at 1:30. Close at 1:30, people stop coming at midnight. Close at midnight, people stop coming at 10pm... And now they're closing at 8pm and attendance was already thinning out noticeably by 7...

Ok, fun corner case: how do I get a filehandle to a symlink? I can get a handle to a file, and a handle to a directory, and if I want to minimize chown races I need a filehandle I can stat and check S_ISLNK() before using fchown() on it. (Also, if I want to reuse the existing -p support code.) But open(name,0) follows the symlink, and the open(2) man page says feeding it O_NOFOLLOW just makes it fail if name points to a symlink.

Right, for the moment, -p is going to have no effect on symlinks...

February 20, 2008

The job was offered and accepted: I get to spend the next 5 months in a suburb of Houston doing work on upgrading a Seismic Acquisition System. (This being texas, of course it's for oil exploration. Basically you set off explosive charges, listen to the results, and wash it through software to sonar the ground. "To think of all the marvelous ways they're using Linux nowadays...")

This means I get to try contracting "per diem" while only being 2 hours from home, plus I get to do a different kind of programming for a while, with a known time horizon when the project's over. *shrug* Good deal.

Ok, the amusing part of this:

> I very much appreciate your willingness to participate in this off-beat
> activity.

I suspect I've got you out-off-beaten. :)

You're unlikely to have Eric Raymond help you throw liquid nitrogen into a 
swimming pool and have a man who retired from being in charge of Novell's 
Groupwise for Linux product line to become a full time webcomic cartoonist 
post video of it on youtube:

(We've done far more offbeat things than that, but they take longer to 

Is that the above was written in response to one of Hewlett Packard's lawyers, who wants me on a panel about intellectual property issues. (I love my lifestyle.)

On a related note, I may be in Boston in May, I may be in Califonia and Michigan in April, I might be in Ottawa in July... Good grief, I have a convention schedule!

Poking at the nail board. David Anders (prpplague) sent me a script to rip the existing flash images off of a nail board (bootloader, kernel, initrd), and walked me through getting the jtag support software to work (and then how to fix it so I didn't need to be root). I plan to document it and rewrite it a bit (for example, don't zero the board before checking to see if the three files to write to it are there in the current directory. Write a message about what you're going to do _before_ doing it, rather than hanging anywhere from 20-70 second and then saying "I wasn't hung, I just did X!" Little things...)

Fun toy. He's also promised to email me broken up kernel patches so I can build my own kernel for this hardware, and once I've got those I can push 'em upstream and into FWL/Impact.

Speaking of fun toys, this is just too cool for words. Admittedly less cool than I thought it was before I looked up "lumens" and found out that a conventional 100 watt bulb emits about 1700 of them and then is doing a little under half that. (It seems like this is around a 40 watt bulb. Nice, but I'd want about 3 of 'em going at once to be really comfortable in a room lit just by that.)

And still poking at cp -p, and there's a security hiccup. There's no obvious way to close the hole between create, chown, and chmod. The problem is really directories. First of all, mkdir is a syscall so we can't atomically open it and then get a filehandle to it and be sure the object we opened is the one we just created. Secondly, the directoy has to have the write bit set in order to create anything _in_ the directory, so if we recursively copy a read only directory we have to leave the write bit set, and then go back and switch it off later for -p.

I'd like to be able to use the same codepath for directories as for files, and the race-free way to do this for files is with fchmod() and fchown()...

Ok. I'm cheating. I can use open(name,0) to get a filehandle to a directory (which I can't read from, but which I can call fchown() on). There's still a race condition between directory creation and chown, but that's inherent in mkdir not returning a filehandle and I can mitigate it a bit so I at least makesure I apply the permissions to a _directory_ and not a file. And a race condition on setting the timestamp doesn't have obvious security implications.

Not quite the smallest implementation I could do, but reasonably small, simple, and still secure. I should still probably redo dirtree() based on chdir, but that can wait a bit.

February 19, 2008

Heh. I moved off livejournal to here basically because livejournal isn't twitter. (I mention this because I just noticed that both Barack Obama and Hilary Clinton have twitter accounts. Why am I turned off that Hilary's looks like it's written by someone who's never used the internet before when I _know_ that Obama isn't writing his own? (Unless he normally refers to himself in the third person, ala Bob Dole...)

I don't use twitter because, like livejournal, it wants you to be online to post. (This is still done in vi and rsynced to the website with a script that updates the rss feed. Downside: no comments. I've pondered writing my own bloggy thing to parse this file into 8 gazillion small chunks that would have CGI allowing comments to be added, but account management and spam filtering are enough work that I'd probably just poke at somebody else's package to do this if I got around to caring. Or just start using twitter. But I expect only about three people actually _read_ this. Other than me, of course; I look up things in it all the _time_, which is most of the reason I write it. Most of the rest of the readers I'm aware of talk to me in person or on the phone on a semi-regular basis anyway. :)

Once again, mercurial is being stupidly slow. When I do an "hg diff" I want it to check all the files in the repository. Don't recurse down into the working directory and look at all the files there, because in "build" under that are tens of thousands of temporary files that aren't in the repository. It would take maybe 2 seconds with a cold cache to search through the entire repository, and it takes easily 30 seconds to read in everything under "build" which will NEVER MATCH ANYTHING VIA DIFF because there's no copy in the repository to compare it against.

It doesn't just do this for diff. It does it for "hg commit", and even (inexplicably) "hg revert" with a filename. I tried putting build in the .hgignore list, but that doesn't work reliably. (It's not always build, it's build.bak sometimes, and other times it's that I extracted a temporary copy of a package's source somewhere to fiddle with it for an hour or two, and if it's something like the linux kernel that'll take some searching to get through...)

Oh, and bash's "smart" tab completion that realizes you're feeding arguments to hg and asks hg to supply said arguments. THAT recurses through the directory contents instead of the repository too, meaning you hit tab and go get a beverage refill while you wait, or hit ctrl-c to make it just look at the current directory already. There's a reason for the quotes around "smart" when applying it to bash. I didn't ask for it to try to guess what I meant, and I'd like it to stop, but that's how Ubuntu set it up. And as with the blog software, I've gone down enough ratholes to recognize an enormous timesink when I see one, and I'm Not Going There at present.

February 18, 2008

Darn it, I need two callbacks from dirtree_read. When doing a cp -p (or a tar extract), the directories need to be created on the way down but the permissions need to change on the way _up_. Otherwise if you remove all the x bits from a directory then you can't create files in it, so without two passes cp -rp on a read only directory hierarchy wouldn't work.

And is there no way to set ctime? utimes() only sets atime and mtime, but not a file's creation time. For some reason I thought there was some kind of inverse stat() operation that would stamp back as many fields from that as it could, but I guess that was in a service library I was using, not in libc...

I'm pondering the use of openat() and friends. It's making paths right now, with a 4k limit. Using toybuf to do it, too, which is breaking my own rules and on my short term "to fix" list... Except that readdir(3) hasn't got a readdirat() variant. The man page for readdir(2) says it's been replaced by getdents(), and glibc doesn't even bother to _wrap_ that syscall and points people back at readdir(3), which still takes a path from cwd.

February 17, 2008

Somewhat confused trying to figure out why a stripped "make allnoconfig" toybox is 8k, when nm --size-sort comes up just over 800 bytes of actual functions in it. For comparison, a stripped hello world built with -Os is 4.5k. Tried trimming the two bss data chunks but that made no difference.

Closer examination finds gcc cheating like mad: even though I used printf() in hello world it used puts() in the resulting executable (and inlined it). But that's mostly a side issue, I think... I note that the "readelf" uClibc is producing for x86_64 segfaults immediately (ldd works, but doesn't show anything interesting), and the glibc version is being overcomplicated and not actually telling me what I want to know.

More surgery on toybox's option parsing. Redid the comments to match the current globals, and implemented logic to let options set, unset, and exclude each other (R+r, R~r, and R!r respectively). This does mean that you can no longer reliably go through and look at just the letters to find the various flag values. I suspect I should teach the "generated" logic to make a file with the appropriate flag values, although doing this without python is going to be one of those mind-bending exercises and what to call the #defines... is CP_FLAG_r or FLAG_CP_r less confusing?

Took another look at the vdso thing, which is weird. The failure is in a shell script snippet that's horribly written (it uses grep to test if it can avoid doing a sed thing when it's not needed, except when it's not needed the sed thing is a NOP so the grep test is completely pointless additional complexity). Something about cross compiling is throwing it off, not quite sure what yet. Only got about half an hour of poking in, and I was watching "Castle in the sky" during that. Anime is much better with subtitles, but also much harder to multitask...

Another embedded developer emailed me and told me I needed to make more of a fuss about the perl thing. (What's that, five now?) Why don't the email linux-kernel directly, rather than asking me to do it? (Or at least reply to the thread so it doesn't look like I'm some lone whackjob? Peter Anvin's already dismissed my objections as "academic"...)

It's amazing how many embedded developers feel so unrepresented in the Linux kernel development process they've given up. Part of my reason for doing a "hello world" kernel is so I can break up the kernel build process more and discard chunks that aren't needed in the embedded world. If Sam Ravnborg goes through with his plan to rewrite chunks of kbuild in perl, I'll need to write a bash script to replace the whole of kbuild. (Gee, wouldn't it be nice if the _data_ and the _computation on the data_ were cleanly separated? Yeah, I know that's one of the core ideas behind declarative langauges, but make is Doing It Wrong. And adding Perl to kbuild without removing all use of make does _not_ sound like a recipe for reducing complexity. Wheee...)

February 16, 2008

Heard back from both Peter Anvin and Sam Ravnborg about my patch. Peter says he wouldn't mind removing the _shipped logic to require lex and yacc, and calls adding python dependencies (on _top_ of perl dependencies) "reasonable". Sam says he's been thinking of rewriting portions of kbuild in perl, and calls attempts to avoid perl "a dead-end". Neither of them cc'd the list (or anybody else) on their emails to me, for reasons I don't understand.


I understand why so many windows users are still using Windows 2000. Upgrades break stuff that used to work. Ubuntu breaks something new every release (I've detailed several here, I _still_ haven't fixed vim's "set ts=4" comment parsing). Half of kernel development seems to be churn for the sake of it. (I'm sure they've got their reasons for doing it, but there's no longer one central place to go to to find out what those reasons are, and oh boy do they have side effects.)

Eric (Raymond) insists that one of the big advantages of open source is "modularity", but you can't break up open office, can't use Konqueror without KDE (or Kmail without Kontact), Gnome is even worse... The modularity advantages seem largely theoretical outside the embedded world. Gratuitous environmental dependencies are a _bad_thing_. Didn't anybody learn from the demise of Gnucash? Even the huge ./configure nightmares existed because they were seen as better than the alternative, but here we are happily recreating it and I'm doing the whole voice in the wilderness thing...

Ignoring it all and banging on cp at the moment. Already found a test case that drives busybox 1.2.2 nuts. (Busybox has probably fixed it by now, but I'm trying to avoid _having_ that problem to begin with. The problem being that -r automatically assumes -d for all levels past the first, so if you do "mkdir sub; ln -s .. sub/sub; cp -r sub sub2" it doesn't fill up your hard drive. Which means that dirtree_add_node() _does_ always need to use lstat(), regardless of what the top level logic is doing.)

Over on the gnu extension side of things, "cp -rs" is less useful than you'd think. Feed it a relative source path to a directory and it doesn't work. It won't convert a relative path to an absolute one, nor can it handle variable relative paths (ala needing extra ../ stuck on the front as you recurse deeper into the tree).

I need to implement command line parsing synonym logic: -R means the same as -r (hysterical raisins, probably), -a means -dpr... How would one represent that in the get_opt string? (Rummage, rummage): "R+r" (then always test r), "a+d+p+r"... that's verbose.

Hmmm, looking at arch/x86/vdso/Makefile (what _is_ vdso, anyway?), possibly the 2.6.25-rc2 build break I've been attributing to binutils 2.17 is actually due to nm not being in the path? No, nm _is_ in the path. Hmmm...

February 15, 2008

Today's the last day to get an OLS presentation proposal in, isn't it? And my laptop's not connected to the internet. Must remember to do something about that when I get home...

Playing with the nail board! The software that comes with it has /bin/busybox, /bin/devmem, /sbin/ldconfig, /sbin/, and /usr/bin/ldd. (And lots of symlinks to busybox.)

Busybox I know. I wonder what /bin/devmem is? (Seems to just be a trivial absolute peek/poke utility.) ldd and ldconfig come from uClibc (what, no readelf?) /sbin/ is a script to blink an LED on the board, which is called via a silly demonstration kernel patch that isn't needed.

/usr/lib is empty. /lib has uClibc 0.9.29 (along with libdl, libm, libnsl, libpthread, libresolv, librt, and libutil from the same package, plus ld-uClibc). The only non-uClibc library in here is (which is a bit of an abomination, to tell the truth).

Speaking of abominations, I'm banging on perl. I don't _want_ to bang on perl, but H. Peter Anvin was under the mistaken assumption that the kernel build already required perl (it doesn't), and introduced a perl dependency into the kernel build. You can't build ANY 2.6.25-rc1 kernel without perl.

So I'm making the darn thing spit out a largeish pregenerated header, shipping that header, and only regenerating it if doesn't exist...

I got in three OLS proposals: one to do a paper, one to do a tutorial, one to do a BOF. This'll be the last OLS, so I might as well go. They're moving out of Ottawa next year, and given what that did to Atlanta Linux Showcase (which held its last year in Oakland, California)...

February 14, 2008

Banging on cp some more. For the moment I'm not using loopfiles() because I haven't got a handy array of arguments that are all handled the same way. First because the last argument on the list is the destination, and removing that from the list is about as much trouble as just doing the loop inline without the callback. Second because some of the sources might be directories (with -r) and opening those to get a filehandle to them isn't a useful action. And third because what I need to do to each argument is stat it, not

Possibly this means loopfiles() needs to be redesigned. (Tar has a similar problem, and so does ls. Arguments could be files _or_ directories...)

Ooh, my nail board arrived! It does indeed look exactly like its picture (there's a little red glowy LED next to the laptop-side USB plug that lights up when you plug it in). This early production sample has _no_ case, meaning when I put it down on the rug and then jostled it, it froze and had to be unplugged and plugged back in, possibly due to static the rug put on the pins. It's on the sheet of bubble wrap it shipped in, at the moment.

Fun corner case #1: it talks to the world through /dev/ttyUSB1, which is created by udev when you plug the nail board in to the machine. You can't point a serial program at /dev/ttyUSB1 first and then plug the board in to watch the boot messages because the serial device doesn't exist before the board is plugged in, but the device starts booting immediately (and the obvious way to get reboot it is to unplug it and plug it back in, which makes the serial device go away...)

I think I need to write a program that does a dnotify on /dev and opens /dev/ttyUSB1 the instant it shows up, so you can run that program before plugging the nail board in. When you unplug the board, netcat exits, so presumbly the dnotify watcher should spawn netcat and then go back to waiting when it exits, so you can unplug and replug and fake a continuous session even though the /dev node is going away...

It is highly cool. 6 feet of USB cable is _way_ too long, it needs maybe 6 inches. (It's the same USB cable my printer plugs into, so it should be easy enough for end users to swap it out if they want a longer one. Meanwhile I just tracked down the twist-tie to roll the thing back up, but the coil is still bigger than the nail board.

The bootloader should pause a few seconds. I have yet to see the start of the bootloader messages. (Note that udev has a certain amount of latency waking up and creating /dev/ttyS0 and /devt/ttyS1, by which time the nail is already booting. With mdev, it might create them fast enough to give me a chance to catch it, but Ubuntu uses the big bloated dbus-infected... Ahem.

February 13, 2008

Sigh. I finally have to break down and build a kernel from source to install on my laptop.

I fell out of the habit of doing this on Ubuntu, because getting the darn intel wireless drivers (in both this laptop and the previous one) involed messing with binary firmware blobs, plus there was the whole 3D acceleration issue. But now there's a local root exploit in every kernel since 2.6.17.

Ordinarily I'd just use the Ubuntu package management system to grab an update from upstream, but it's eaten itself. (Badly. The little construction sign icon updater crashed trying to download headers, firing up aptitude showed me just the installed packages until I re-downloaded the headers, but it had an error connecting to the "security" repository. (Maybe it's overloaded?) Told it to do a full upgrade anyway, it downloaded a new kernel package... and then it went:

There was an error commiting changes. Possibly there was a problem downloading some packages or the commit would break packages.

Or it could be flying monkeys, with the level of detail that error message gives me.

Right. Ubuntu doesn't support /proc/config.gz but it does invent its own nonstandard way of doing it (saving the config under /boot), so grab that, inflict it upon (which has this fix), install that into grub with duct tape and a text editor, and see what it does...


> At Ralf Baechle's suggestion, this version uses a Perl script to compute
> the necessary constants.  We already have dependencies on Perl for kernel
> compiles.

NO WE DON'T! I can personally confirm that 2.6.24 didn't need it to build x86, x86-64, powerpc, mips, arm, sparc, or sh4. And I personally ripped it out of User Mode Linux back in 2005.


Chick-fil-a's wireless sucks today. Their DNS server takes three attempts to resolve most addresses and google keeps telling me my queries look like spam. At a guess, one of the other laptops here is a Windows machine hosting a "virus outreach event"?

February 12, 2008

My tax paperwork continues to be a nightmare. I escalate to H&R Block's "premium" office on thursday.

So, cp. This potentially uses both loopfiles() (to iterate through each source file listed) and dirtree_read() (to recurse through subdirectories for -r). Note that dirtree_read() does a stat(), but I separately need to stat source and destination arguments (non-recursively) to see how to deal with them. No obvious way to avoid duplicate code there...

Once again, as I sit down to write the command I keep thinking of 8 gazillion corner cases. For once I did the useful thing, writing scripts/test/cp.test and putting all the corner cases in there I could think of at the time.

If there's more than one source, dest must exist _and_ must be a directory. If there's one source and dest doesn't exist, it's ok to create it but we'll only create a directory at dest if the one source is a directory _and_ we have -r. And even then we won't create a destination path, just a single directory. (Note that -f won't remove an existing file to put a directory there, even with -r. It'll only remove a file to put a file there.)

Corner cases, corner cases... As usual.

February 11, 2008

Offline a lot this weekend. Got most of a second qemu weekly thingy done anyway. Taking a break from sh, poking at adding cp to toybox instead.

My W2 from Timesys finally arrived. Time to file taxes tomorrow...

February 10, 2008

After reading mini-msft's take on Microsoft's bid for Yahoo (and about 30 articles linked from there or linked from links from there), I'm actually rooting for Microsoft to wind up acquiring Yahoo. I think it would do enormous damage to Microsoft to be saddled with a dying also-ran, it would be incredibly disruptive for them to try to digest this purchase (and would distract them from focusing on much else for at least the next three years), it would not only drain all their ready cash but actually put them into _debt_ (the one thing they've refused to ever do), and (the one thing mini abhors) it would bloat their headcount another ~13k people.

Vista shows that Microsoft is well over the Brooks' Law event horizon and spiraling downwards. They got so many cooks you can't _see_ the soup, and the left hand doesn't even know where the right hand is, let alone what it's doing. Windows 7 is probably already irrelevant, but a Yahoo acquisition would guarantee it.

From another viewpoint, Microsoft may finally be trying to turn itself into a third wave company. That doesn't mitigate any of the above, what it says is this kind of acquisition (not necessarily _this_ acquisition) is what Microsoft needs to do to still be relevant 20 years from now, but if it does it the next 5-10 years will be incredibly painful for the company. This would indeed force MS to become a modular congolomerate with diversified business units, and put some firewalls between the business units. To do that, Microsoft must abandon the second wave identify based on a single core product. As long as "Microsoft == Windows", the company is strangling itself. You can't be a conglomeerate like IBM or GE _and_ still have a core product. If Microsoft tries to weld Yahoo to the Windows platform, it'll destroy Yahoo and possibly even bankrupt Microsoft. If Microsoft finally diversifies away from Windows... that would be interesting.

February 9, 2008

Finished summarizing the first week of january on qemu-devel. Now to start on the next week.

Poking as the sh board stuff some more. It is just _not_ being cooperative.

February 8, 2008

The number of simultaneous job-lead-like things I'm simultaneously juggling are actually quite impressive. None of them have resulted in actual concrete opportunities to make money, and so I continue to bang on fun stuff.

Adding a new Super Hitachi board to qemu continues to involve lots and lots of reading. I should get back to debugging uClibc on Sparc. And I need to get back to armeb as well. So what am I actually doing at the moment?

My current fun stuff is doing a qemu weekly news. Yeah, I'm weird. But the traffic on this list is low enough that I might actually be able to keep up with it, and it would force me to stay current _reading_ the thing. We'll see.

Pondering giving the kdocs page a brush and polish. I might submit an OLS talk proposal about what's in there. (Doing a paper on assembling an index of documentation is a bit meta, but why not?)

And my desktop locked up again. This time, HAL lost its marbles, took DBUS with it. The mouse cursor still moved but nothing in KDE was clickable. I switched to text mode with ctrl-alt-F1, logged in and told the system to shutdown, which it mostly did but hung trying to tell HAL to shut down, and a half hour later I powered the system down.

Dear kde developers: adding more and more HAL and Dbus crap to the system just adds a single point of failure that fails a lot. Having it notify you when new hardware shows up, great. Having it lie about the status of the network, hang the system, and screw up things like the taskbar that don't need to KNOW about any of this... Not good.

February 7, 2008

So apparently, qemu's sh4 system support is totally untested, most likely buggy, and doesn't provide the hardware I need anyway. (In addition to the CPU and memory, I need a serial console, a hard drive, an ethernet card, and a persistent clock. Neither of the current boards provide this, and the shix one insists on loading rom images qemu 0.9.1 doesn't include.)

So I'm reading the qemu source code. Not really a sinkhole I've wanted to go down, but it's _tradition_ for FWL to spawn enormous time-sucking tangents. At the moment, I'm trying to learn how to define a new platform for sh4.

The subdirectories in the qemu source are:

  • audio - host-side audio output code. When qemu emulates a sound cards, this is the code that produces the sound on the host.

  • darwin-user - interpets system calls for application emulation under MacOS X.

  • fpu - floating point routines, including a software floating point implementation (slow but with known behavior) and a hardware one (that handles floating point however the host does).

  • hw - emulate devices, busses, and boards.

  • keymaps - translation tables for converting between ascii and keyboard scan codes.

  • linux-user - interprets system calls for application emulation under MacOS X.

  • pc-bios - various ROM images.

  • slirp - virtual LAN code. Try "man 1 slirpvde". I think this is only used to plug a qemu instance into a host network so it can have a real (non-masqueraded) IP address and receive incoming connections.

  • target-$ARCH - code generation stuff for each processor type.

  • tests - test suite. Doesn't appear to actually work.

The main() function of qemu is in vl.c. Early on this calls register_machines(), which is a bunch of #ifdefs that populates the list of machines this particular qemu-system-$ARCH supports (I.E. the list "-M ?" spits out).

Random notes, meaningless to anyone else:

usb_devices[] ?
hda_index = drive_add(HD_ALIAS, argv[optind++], 0);
machine = find_machine(optarg);
What's semihosting?  (code_copy_enabled, PHYS_MAX_RAM_SIZE...?)

Ooh, qemu 0.9.1 can indeed emulate an older processor! (0.9.0 couldn't.) Added "-cpu pentium" to, and yes indeed the i586 image runs under that but the i686 image doesn't. (Haven't found one that runs armv4 but not armv5 yet. Have to look up the various arm options, and possibly tweak the kernel config. Still: yay.)

February 6, 2008

Today, I add Super Hitachi support! Let's see what's involved in that.

Copy another sources/configs file to a wild guess at the correct tuple ending: "sh3". And edit KARCH to say (rummage in linux kernel sources)... It's "superh". I'll come up with kernel and uClibc miniconfigs once it builds binutils and gcc successfully.

when it gets that far, let's build the toolchain first.

Sigh, and gcc has a build break in the dwarf2 stuff. Why won't gcc build sh3 like a normal platform? Ok, build set CROSS_TARGET=sh3-elf (instead of the generated sh3-unknown-linux). I'm lobotomizing the header and linker paths _anyway_, maybe that'll work.

Meanwhile, I built a mips qemu kernel where I switched on every RTC device in the CONFIG_RTC_CLASS menu, and it still boots up saying 1970. And nothing interesting looks like it's there under /sys. Right, come back to that later...

Binutils and gcc both built. Tried editing the uClibc miniconfig to say "TARGET_sh3=y" as the first line, and it tried to build alpha instead (dying because the kernel headers didn't match). That means it doesn't recognize TARGET_sh3, so go into build/temp-sh4/uClibc and fire up "make menuconfig". The correct symbol is "TARGET_sh" and then there's a "CONFIG_SH3" symbol later on. Ok, make a miniconfig out of that:

cp .config blah
$FIRMWARE/sources/toys/ blah
cat mini.config >> $FIRMWARE/sources/configs/sh4
vi sh4 # move contents into miniconfig-uClibc here document

Right, rebuild and... uClibc breaks trying to make the dynamic linker. It can't find dl_start (called from _start), and that symbol is called from assembly code, and the function does not appear to exist within uClibc source anywhere (or at least grep can't find it). Right.

First guess: maybe sh4 is more tested? I notice that qemu only has qemu-system-sh4, so I might as well build sh4 for now and try to add sh3 later. Is Linux even supported on SH3? (Probably.) Right, rename the config file to "sh4", zap the CONFIG_SH3 symbol from the uClibc miniconfig so that goes back to the default (sh4), and try again... Nope. Oh well.

Second guess: Maybe building gcc for -elf instead of -linux drops out some of the hooks the dynamic linker needs? (Something in crtbegin.o perhaps? It's gotta live _somewhere_, and gcc and binutils are the only other things we've built so far. Binutils usually works fine out of the box because it's not maintained by the FSF. The breakage is almost always in gcc.) So what's wrong with gcc this time...

Right, building for sh4-uknown-linux breaks because gcc/config/sh/linux-unwind.h is trying to #include glibc header files despite "inhibit_libc" having triggered in ./configure. Comparing with gcc/config/mips/linux-unwind.h I see that the entire contents of that header have an" #ifndef inhibit_libc" around it so let's try adding that... (Apparently, this platform was never tested with inhibit_libc.)

Ok, whip up a quick patch to wrap "#ifndef inhibit-libc" around the contents of gcc/config/sh/ and... It built! And uClibc died for a DIFFERENT reason:

cc1: error: unrecognized command line option "-mfdpic"

What the...?

Fresh hot chocolate with orange syrup. And one of those little overpriced lemon pound cake slices I shouldn't be eating anyway. (Yes, I am at Starbucks.) Ok, back to tackling Super Hitachi! (I keep envisioning a cape and changing costumes in a phone booth when I type that. Gimme the darn kryptonite.)

Ok, a grep of the uClibc source says that -mfdpic is set in Rules.mak, and looking at that file says its in an "ifeq ($(UCLIBC_FORMAT_FDPIC_ELF),y)" with the else case just using "-fPIC" instead. Does the sh compiler recognize that? ("touch hello.c; $FIRMWARE/build/cross-compiler-sh4/bin/sh4-gcc -c hello.c -fPIC" and yes, it seems to recognize it. Or at least it doesn't give the error -mfdpic does.)

Right, could be a config issue: pull up menuconfig in uClibc, hit forward slash and type "FORMAT_FDPIC_ELF" says it's in the "Target Architecture Features and Options -> Target File Format" menu, and... Yup, it's there and the other three options are all variants of binflat. Right. But under the "General Library Settings" menu is a "Generate only Position Independent Code" option, how about... Nope, switching that off doesn't give me more target file format options. Sigh. Ok, time to look in the Config files. "find . -type f | xargs grep FORMAT_FDPIC_ELF" says extra/Configs/ and that...

Ah-hah! UCLIBC_FORMAT_ELF is guarded by ARCH_USE_MMU. I'm telling it to build a nommu Super Hitachi, something that's apparently never been tested and doesn't work. Right, switch the MMU on (that hardwires in ELF), go through the miniconfig dance again, and rebuild!

I'm liking my new headphones, but it would be nice if they were noise cancelling. The old deaf people having loud conversations have mostly wandered off, but Starbucks has "aimless, bored trumpet player doing variations in scales" on the PA system that cuts through "Hotel California" fairly sharply. It's the instrumental version of tunless humming. Fairly impressive, actually...

And the next break is:

sh4-ld: /home/landley/firmware/firmware/build/cross-compiler-sh4/bin/../gcc/lib/libgcc.a(_movmem_i4.o): compiled for a little endian system and target is big endian

Endianness mismatch! Right, toggle whichever one uClibc thinks it's doing and it should match the compiler. And uClibc thinks it's doing big endian, so the compiler's defaulting to little endian. Sounds about right. Just diff mini.config with ...configs/sh4 and it added a line "ARCH_WANTS_LITTLE_ENDIAN=y" so copy that line in and build one more time...

Yay, and it made it into purple! I have a working powerpc cross compiler, and it's trying to build mini-native with it, and almost certainly going to die because it hasn't got a linux kernel miniconfig. (I think the one it's got is for arm...)

Good grief, the kernel built. (Yay miniconfig!) Probably won't _work_, but hey... And the native gcc broke during its install, for reasons that aren't immediately obvious due to -j 2. Right:

rm -rf build/mini-native-sh4
CPUS=1 ./ sh4

While that does its' thing, time to find a better kernel config. Pull up the Linux source (I have a convenient up to the minute mercurial repository for this) and look at the defconfig files in arch/sh/configs. Hmmm... Don't recognize any of that. "qemu-system-sh4 -M ?" says the default machine qemu emulates is a "shix card" (whatever that is). Maybe that's "shx3_defconfig"? I'd google for it, but Starbucks still has "T-mobile" brand lack of internet access ($3 the first minute, $1.99 each additional minute, or some such. All the class and style of a pay toilet. I just spent $9 on beverages and cake, I'm not paying for internet access and I'm not putting coins in the light fixture to keep that on, either. I'd rant more but they just came around offering free samples of pumpkin loaf, and I feel rather nice towards them at the moment. There's a reason I hang out here, even without internet access...)

So, the gcc break is because a block of shell script starting with "if [ xstmp-install-fixproto != x ] ; then" is triggering, attempting to copy stuff out of gcc build directories that don't exist. Brilliant, it looks like gcc grew yet another "fixinc" variant, messing with header files it didn't generate. A find on the gcc source code finds that gcc/configure is checking the environment variable use_fixproto. Unfortunately, that's set by gcc/config.gcc to "yes" for pretty much all platforms. Why didn't this cause a problem previously? No clue.

Ah, but I think I can update the sed invocation that rips out fixinc to also rip out fixproto at the same time...

Ha! And it built!

February 5, 2008

And of course, they extended the OLS paper deadline. (Alright, I'll submit something.)

Trimming all the mini-native-$ARCH.ext2 images to 64 megs:

Filesystem           1K-blocks      Used Available Use% Mounted on
-                        63461     46334     13851  77% /temp-x86_64
-                        63461     35057     25128  59% /temp-armv4l
-                        63461     34895     25290  58% /temp-armv5l
-                        63461     37014     23171  62% /temp-i586
-                        63461     38052     22133  64% /temp-i686
-                        63461     50390      9795  84% /temp-mipsel
-                        63461     50399      9786  84% /temp-mips
-                        63461     42125     18060  70% /temp-powerpc
-                        63461     38481     21704  64% /temp-sparc

That gives between 9 and 25 megabytes free, depending on which filesystem it is, which is enough breathing room. I can update the run-$ scripts to feed qemu an empty /dev/hdb with however much free space, and have the setup script mount that on /home or something.

The next question is, should /dev/hda be mounted read only? The advantage of that is you'd never need to fsck it (which is nice considering I haven't implemented any sort of shutdown, pid 1 just panics.) Right now, it's just a /tools directory and everything else is added by the setup script, but if it was read only I'd need to make top level directories to act as mount points. I'm trying _not_ to turn mini-native into a distro, it's just supposed to be a build environment you create your final system in.

Bumped into Steve Jackson last night, picking Fade up from work. We talked about the possibility of another potential Penguicon/Linucon type convention here in Austin in 2009. Mark, Stu and myself are probably going to meet next month and decide whether or not to do it.

Got a presentation proposal in to CELF, on how to avoid cross compiling.

February 4, 2008

The deadline to submit a paper to Ottawa Linux Symposium went by on Friday, and I didn't submit anything. I pondered doing another embedded development topic, but I've done that twice already. (Yeah, I could come up with a new topic, but OLS isn't about embedded.) I pondered talking about what I learned from 7 months documenting the Linux kernel, but if the Linux Foundation wasn't interested in the results why should anybody else be? And I still haven't got a passport, and this year they're apparently requiring them...

Apparently, I'm not the only one pulling back from OLS. Thomas Gliexner didn't even attend last year. Instead he's went to the Consumer Electronic Linux Forum in california, which has its own call for papers ending tomorrow. I should submit something. I've been pondering submitting a proposal to them for a while now (it _is_ an entire conference about what I do for fun), but it ends the day before Penguicon. Fade would have to drive up to Penguicon by herself, then I'd have to fly to california for CELF, and fly from there directly to Michigan for Penguicon. Add in the hotel room and it gets way too expensive to do for fun...

February 3, 2008

Ok, the gcc 4.2.2 thing is not a priority, and I've reverted it for now. (It didn't fix m68k or armeb, and it broke soft-float. What's the point?) I can take another stab at it later, once I've cleared some higher priority todo items.

Things that ARE priorities are adding the missing tools to toybox (bzip2 cp find install od sort) that the other packages don't provide, getting the build fully self-bootstrapping, adding armeb, getting a tinycc release out, and finishing up the toybox commands I've started but not gotten to a good topping point (sed, bunzip2, mke2fs, readlink).

February 2, 2008

Getting soft floating working on armv4 with gcc 4.2.2 with --disable-shared is a pain. It's still broken, and adapting the 4.1.2 patch I had to apply to 4.2.2 doesn't fix it. The m68k internal compiler error is still occurring. So far, gcc 4.2.2 has no obvious advantages over 4.1.2.

Looking back at how much of a pain it was to get soft-float working last time, sticking with changeset 292 for a bit might be a good idea for anyone following along at home. The gcc build system was designed by M.C. Escher. This is _insane_.

I've gotten my first request from the field for armv5b-eabi (from jacques on freenode), as well as a warning that qemu's big endian arm support is untested and probably buggy.

February 1, 2008

Happy birthday to me...

Next time my laptop decides to resume from hibernate (software suspend to ram) with both the keyboard and mouse dead (as it did again this morning), I should plug in a USB keyboard and mouse and see if they work. Maybe there's an interesting dmesg entry that would help somebody track it down?

Mostly have gcc 4.2.2 nailed in place now, I think, except for the soft float thing. (Those people telling me soft float should "just work" if I upgraded gcc? They were lying.)

Nope, upgrading to gcc 4.2.2 didn't fix m68k (which was the original reason for trying it):

  CC libc/inet/inet_ntoa.os
libc/inet/addr.c: In function 'inet_ntoa_r':
libc/inet/addr.c:145: internal compiler error: in output_move_qimode, at config/m68k/m68k.c:1899
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[1]: *** [libc/inet/inet_ntoa.os] Error 1
make: *** [lib/] Error 2

Oh well, I've got enough of it in I might as well tidy up the rest and paint it to match. Still, looks like I'll have to patch uClibc to work around a gcc bug rather than fixing gcc. Sigh.

January 31, 2008

So, ./configure and make need the realtime clock, which works on arm and x86 but doesn't work on mips or powerpc. Hmmm... Possibly I can have the run script feed in a TIME environment variable and set the clock with the "date" command, although the busybox date command is darn crotchety and the help is useless, have to go look at the source code again I suspect. Or write a toybox one soonish...

A better solution is to poke at qemu to see if it _is_ providing timer hardware, and then poke at the kernel to try to get it to use that.

Meanwhile, due to building m68k with gcc 4.1.2 dying with an "internal compiler error" I've swapped in gcc 4.2.2 to see if it's any better. (Forgetting to upgrade gcc-g++ to match gcc-core builds a longish way before it exploding, and is then very confusing to track down.) It also spits out huge quantities of warnings building uClibc, and helpfully tells me how to shut it up. (Why bother?)

Telling gcc to use a consistent cross prefix for the host tools (other than the one it guesses) is even more of a pain than it was last version. Now you need to set environment variables with names like "ac_cv_path_AR_FOR_TARGET", which is just _insane_. It's getting to the point where letting ./configure run and then running sed against the output is easier... Actually, it is easier, and I think I'll do that.

Ah, Milton Miller was on the #mklinux channel, and he helped me get the realtime clock working on powerpc. Yay. (Needed an upgrade to the device tree, and some config symbols in the kernel, but qemu was already supplying the bits it needed.)

Getting soft-float working again is going to require an updated patch...

January 30, 2008

Ok, distcc support for Firmware Linux is in progress. It's somewhat hampered by the fact that distcc is somewhat difficult to cross compile correctly. (It does ./configure and automake, which is always a bad sign. Those are gnu tools, which means they're chock full of incorrect assumptions, not only about the name of the cross compiler it should use, but assumptions about the _format_ of this name... Sigh.

Yeah, the whole point of doing this is to get a native toolchain that runs at more or less cross-compile speeds, so you can just build natively under qemu and not have to worry about this cross compiling mess. I am aware of the irony.

The mini-native build is also getting complicated enough I need to throw some kind off configuration at it. There used to be an environment variable "BUILD_SHORT" that would skip the entire native toolchain build if it was set. It's still there, but it's no longer enough: do you want no native toolchain (resulting in a small root filesystem you add stuff to by cross compiling stuff before packaging), do you want a fully native toolchain, or do you want a hybrid native/distcc toolchain? (I need to build a native toolchain to use distcc because it runs the preprocessor and linker locally.)

Also, I need to split the qemu image into two parts. The first image file should just have the root filesystem containing all the tools, and the empty space to compile new stuff in should be a second image file. This is easy enough to do, I just have to make the images, configure qemu, tweak the qemu-setup script to mount stuff correctly...

Ha! Got it to work. Building Make 3.81 on armv4l under qemu (and acknowledging that the emulated clock's accuracy is moderate at best), and using qemu's built-in clock (which is notoriously inaccurate should at least give useful _ratios_), the tarball takes a little under 5 seconds to extract, the ./configure stage claims to take 2 minutes, 40 seconds, and the fully native make stage 2 minutes and 50 seconds. Using distcc to call out to the cross compiler (PATH=/tools/distcc:$PATH DISTCC_HOSTS= time make -j 3) turns that last number down to just under 24 seconds. For the actual compile, the speedup is a factor of _seven_.

Too bad distcc doesn't help with the ./configure stage, but I expected that. (Autoconf is an abomination anyway.)

The comparable figures for the same hardware building the native x86-64 version outside the emulator are just over 1 second to extract the tarball, a little over 15 seconds to run configure, just over 4 to run make.

To try this out, download the current hg snapshot, build it, make sure distcc is in your host's $PATH (add build/host to the $PATH if necessary) and then feed "--crosspath /path/to/cross/compiler" to the ./run-$ script.

At the moment you need to "mknod /dev/null c 1 3" because sysfs randomly changed its lack-of-api again and broke mdev. I need to switch to using the toybox one, and maintain it...

  • Download the current hg snapshot and build it for your target platform.

  • Create an empty directory on the host and put "gcc" and "cc" symlinks in it that point to the right cross compiler's gcc_unwrapped. (It can't point at the $ARCH-gcc wrapper or it'll try to hand off to a gcc_unwrapped that won't be in the $PATH, but it shouldn't need path adjustment because the cross compiler should not ever have to do any path searching, that's all done natively inside qemu).

In order to get FWL to build under itself, I only need to add six commands to toybox: bzip2, cp, find, install, od, and sort. The rest are binutils/gcc/make utilities that mini-native already has.

Sort I've already written a good version of (I just need to port and debug it). I've also written most of a working bzip2 implementation I can dig up and dust off. I've put in the infrastructure to make cp easy...

Yeah, next release goals: rebuild under itself with distcc, build on a macosx host, and start the long slow erosion of busybox -> toybox.

January 29, 2008

Guess who this quote is from:

After 2015, easily accessible supplies of oil and gas probably will no longer keep up with demand. As a result, we will have no choice but to add other sources of energy – renewables, yes, but also more nuclear power and unconventional fossil fuels such as oil sands. Using more energy inevitably means emitting more CO2 at a time when climate change has become a critical global issue.

Nope, not Al Gore. It's a letter posted by the CEO of Shell Oil on the website. Shell's new official position is they can't continue to supply the demand for oil (even at ever-increasing prices) past about 2015. At which point things get ugly. (I note that biodiesel and ethanol are already driving the price of food through the roof.)

Put out a Firmware Linux 0.3.1 release. Sparc is still broken, and m68k won't even built due to an internal compiler error in gcc:

Decided life's too short to spend it doing PHP and mysql for the backend of an e-commerce website. Not if I have other choices. Yeah, right across the street from Fade's work is nice, and if it was a six month or one year contract I'd probably go for it. But a full-time permanent position... I don't _want_ to be doing that 18 months from now.

I'd be a lot more conservative about this if I didn't have three _other_ recruiters talking to me right now. (None of whom I went out to search for, they all contacted me.) And my friend Will collecting evidence that $150/hour is the low end of what people pay for my skill set...

  CC libc/inet/inet_ntoa.os
libc/inet/addr.c: In function 'inet_ntoa_r':
libc/inet/addr.c:145: internal compiler error: in output_move_qimode, at config/m68k/m68k.c:1827
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[1]: *** [libc/inet/inet_ntoa.os] Error 1
make: *** [lib/] Error 2

But the others are all working, and it's close enough for a dot release. To fix m68k I may have to upgrade gcc to a newer version, which isn't something do be done this close to a release.

January 28, 2008

Spent a decent chunk of the day poking at PHP. It has yet to seriously engage my enthusiasm. (Nor, for that matter, has mysql. I poked extensively at postgresql back around 2002, and came to the conclusion that flat text files and python dictionaries can do everything it can do faster and simpler, as long as you have enough memory.)

Still, there's a job across the street from Fade's work with interesting people, here in Austin, and management that seems clueful. Of course if I can't manage to stomach a php take home test I wouldn't want the job, so this isn't really a test of my _ability_ to do this (I'm allowed to look up the answers online), it's a test of my desire to. I'd _love_ this job if I could do my cgi in python, and in theory PHP isn't that big of a difference...

So I confirmed that backing out the patch I tracked down yesterday (the one that first caused the mips kernel to panic during boot) did indeed let mips boot to a shell prompt, and it seems to work fine. So I've added a reversed form of that patch to sources/patches, checked it in, and I think I'm ready to cut a release now. (Sparc still doesn't work, but it never did, and I still _almost_ care.)

January 27, 2008

Ok, testing for a Firmware Linux release, five targets are fully working (armv4l, armv5l, i586, i686, x86-64), two gargets panic during ne2k driver init (mips, mipsel), one needs to be packaged differently and panic doesn't shut it down (powerpc), and on one only hello-static works (sparc) _and_ the panic doesn't shut it down but that's a side issue.

The powerpc packaging is easy enough. I've got a "" that makes tarballs containing the ext2 image, the kernel, and the run script for each platform. I haven't checked in yet because it's logically the same step as, except that file contains entirely temporary code (dependent on UML) that I plan to replace... But if I have some final packaging code that stays even when UML gets swapped out, I guess that's still the logical place to put it.

The "kernel panic doesn't exit qemu" isn't new, but it's annoying because it prevents me from scripting this test. If I could

The mips thing is different, this worked in 2.6.23 but not in 2.6.24. (I _should_ have caught this in the rcs but I didn't test mips recently. If all the platforms exited properly on panic I could script a test, but failure to exit hangs such a test script. Blah.)

Here's the basic theory of how you debug this kind of thing using the kernel mercurial repository to do a binary search:

  1. Edit "" to remove the SHA1 sum from the kernel tarball, and set it trying to download 2.6.00 (which doesn't exist).

  2. In some other directory, "hg clone" (or "hg pull -u" to update one you've already got).

  3. "hg tags | less" shows that v2.6.24 was hg revision 76096, and v2.6.23 was hg revision 65723. I already think I know that 2.6.23 worked and 2.6.24 doesn't, but I'll start by confirming that 2.6.23 does indeed work on mips.

  4. Extract a bzipped tarball of a given version from mercurial with "hg archive -r 65723 $FIRMWAREDIR/sources/packages/linux-2.6.00.tar.bz2"

  5. "cd $FIRMWAREDIR; ./ mips; cd build; ./". Did it work? (In this case, yes.)

  6. Now we have a known good version and a known bad version to binary search between. It's a longish process, but the time consuming steps are fairly automated.

There are two complications to this basic theory. The first is that sources/patches/linux-2.6.13-cmdline.patch doesn't apply the same way to both 2.6.23 and 2.6.24, because somebody in kernel development corrected the spelling of "mispelled". Not only do they have no sense of humor, but it causes me an actual problem. Sigh. So I need to either yank that patch entirely during the debugging run, or add/remove the extra "s" before each build depending on which side of hg 72254 I'm on. (To find that number, "hg annotate init/main.c | grep misspelled", and according to "hg log -v -r 72254" the people with no sense of humor are Simon Arlott and Adrian Bunk. I repeat: that change was pointless churn, it had zero benefit to anybody and caused me extra work.)

The second problem is that intermediate checkins don't necessarily compile cleanly. This is endemic to binary searching on a development tree. For example, to minimize Simon and Adrian's gratuitous extra work, the first thing I tested was 72253, but using the kernel headers from that breaks the build in busybox. Still, that produced a kernel and that kernel did _not_ exhibit the panic during ne2k initialization (which happens before it tries to mount root so I didn't need the ext2 image anyway).

So, the binary search goes: 76096 breaks, 65723 works, 72253 works (well, works-ish. Doesn't exhibit _this_ bug, anyway), 74500 breaks but with what might or might not be the same bug (it seems to be hitting hte same bug at a different point, but a null pointer dereference could be anything), 73500 works (-ish), 74000 works (-ish), 74250 works (-ish), 74325 breaks, 74280 works (-ish), 74300 breaks, 74290 breaks, 74285 breaks, 74282 breaks, 74281 breaks.

This is where it gets tricky: This is a nest of merges. I could either use the bisect extension or wade through this by hand. Wading through by hand looks like this: Changeset 74281 is a merge. The parents are 74280 (which works), and 74277 (which breaks). 74277 is a merge with parents 74276 (which is on the wrong side of the "misspelled" thing but once you get past that it works) and 74273 (breaks). 74273 is an actual commit, 74272 was another merge (breaks) with parents 74271 (works) and 74260 (breaks), which is a merge of 74259 (breaks) and 74239 (works). Ooh, the old one works and the new one breaks! Progress!

74253 works, 74256 works, 74257 works, 74258 breaks.

p>We have a winner!

So, back to binary searching between 74253 and 74259: 74256 (works),

I thought the sparc issue was stdio init but since hello-dynamic doesn't work either that says it's something to do with shared libraries. That should make it easier to track down.

Oh good grief. Fade got "newsies" through netflix, and the previews are for: Return to Neverland (saw that one at the dollar theatre matinee, and I still think I overpaid), Cinderella II, Hunchback of Notre Dame II, and "101 Dalmations, the Animated Sequel" (yes, that's the title). The only thing in the list that wasn't a retread was "Return to Atlantis", which had "return to" in its title just so it didn't feel left out.

Wow, after Katzenberg left, Disney was running on fumes. They had NOTHING. No wonder they shelled out big bucks for Pixar and shut down their in-house animation department. It's always painful to watch a third wave company try to be creative, but that collection was just SAD...

As for newsies itself, I've heard from several women who like it. No men. The almost complete lack of females on its cast might have something to do with this. 20 minutes in, my lack of interest is astounding. 30 minutes in a woman showed up who isn't a nun (some stage actress), but she left again. Oh, now somebody's mother... Nope, gone again. now they're having a musical number about unionizing. (They had a couple other songs previously but they were so forgettable I already don't remember a thing about 'em. This one hasn't got a very interesting tune or lyrics, it's just such boggle-worthy subject matter.) Now there's a musical number where either the title or the chorus is "sieze the day".

And now a character named "crutchie" (because he walks with a crutch; this is the extent of his characterization) is demonstrating how he graduated from the Jerry Lewis school of overacting. (Either that or he's immitating the character "Melvin" from wargames, the stereotype who didn't want to tell the protagonist about back doors, as opposed to the cool geek who did.) Now the "sieze the day" song is back with modern choreographed dance moves out of a music video (Michael Jackson or Britney Spears, take your pick). It just serves to highlight the lack of noticeable choreography in the previous scenes. Now the strike breaking large men with chains are being driven off by the arrival of children with slingshots, I believe we've achieved one of the "home alone" movies.

Sigh. I like musicals, but it helps when _either_ the participants can actually sing, or the songs are something you'll remember three minutes later. I've heard people improvise riffs more compelling than the choruses of these songs. Advertising jingles for the radio spots of local businesses are generally better than this.

So far every adult has been either a villain or ineffective. To the point where when "crutchie" got captured earlier, three police rode up on horseback to scatter the crowd... And then two evil kids grabbed him and dragged him off. (Yeah yeah, child labor is normal in this setting. But working for the police?)

Wow, a _second_ woman has shown up who isn't somebody's mother (she's somebody's sister instead). And she's been on screen longer than all the others combined. She's the more or less main character's prospective love interest, that would appear to be why. (I say "more or less main character" because he's only onscreen half the time, this movie doesn't exactly have a protagonist.)


Ah, the actress character from earlier is back. She's having a musical number, of course. She doesn't actually seem to have any actual character traits. Not even crutchie's one note. And now the cliche du jour is "the corrupt court system", what a surprise. Ah yes, and the one sympathetic adult who was only marginally ineffective has been reassigned away. Ooh, and the main bad guy has shown up to tempt the not-quite-protagonist to the dark side.

I commented on the cliches to Fade, and she replied "Oh yes, this is an _utterly_ predictable movie. I watch it for the cute boys singing and dancing... I used to fast forward through the other parts." And is ok with me quoting her on that. Five minutes later after I yelled a retort at the screen following a really stupid line, Fade said: "They have to take turns carrying the stupid ball. It's a _disney_ movie."

Oh wow, the song when they're printing their own 'zine is the weakest one so far. And that's saying something. I'm not even sure what the name of the song would be, there's nothing like a chorus. It's... out of tune chanting by people who can't really sing. And instruments kind of haphazardly and unevenly thrusting them forward.

I reall don't need to mention the rest of the movie. My _cats_ could predict it from here. Although I'm still not sure what they arrested the guy who'd been chasing the pseudo-protagonist for. (Being the villain, I think.) And the bit where Teddy Roosevelt showed up to give the pseudo-protagonist a ride was just painful.

The audio commentary has a legal disclaimer when you select it. Yeah, that's Disney.

January 26, 2008

Working on a Firmware Linux release. Should be this weekend.

Fade and I took a break from Starbucks and went to Metro today. It was closed. Apparently, it's not open saturdays anymore. So we went to Epoch instead. It's PACKED. There are 19 people in this room (not counting the staff, Fade, and Myself), probably about as many in the room next door (which I can't see all of from my chair so I can't accurately count the occupants), almost as many people hanging around outside the building as inside it (it's a marvelous day. and there are picnic tables and covered porch things on two sides of the build, plus they can smoke out there).

Dear Metro: You're doin' it wrong.

Metro used to be packed like Epoch. Then they stopped being 24 hours. Customers never had to worry about it _not_ being open. It was always there for us, whenever we thought about it we could go and never have to worry about whether it was _open_. Just as Starbucks was everywhere, Metro was always, and now epoch is. And because Epoch is open to the trickle at 4am, it's built up a customer base that packs it solid saturday afternoons. In the long run, they're the same customers, and that's what Metro seems to have forgotten in its quest to avoid unprofitable operating hours and cherry pick only those times when enough customers are there to make it worth their while to be open. They've stopped making it worth _our_ while to go. Which is sad.

Fiddling with toybox's mke2fs. The logic to make sparse image files is a bit tricky. The problem is, the way you leave holes in a file is to seek past chunks rather than writing to them. But if the data isn't already zeroes, this can leave who knows what crud where the filesystem expects zeroes. You can _write_ zeroes, but then the file isn't sparse anymore.

There are patches adding the ability to punch holes in existing files with current kernels, but although sys_fallocate() got merged the FA_DEALLOCATE part doesn't seem to be in 2.6.24. And even if it was, i'd have to patch uClibc 0.9.29 to support it.

There's also an uninit_groups feature flag that lets ext2 variants leave groups uninitialized so it doesn't matter what's in them because the upstream metadata doesn't point to them until they're needed (at which point they're zeroed). Really speeds up fsck on big filesystems that aren't full, too. Unfortunately, that seems to have been merged into ext4 but not ext3 or ext2. (Having _three_ drivers for the same basic filesystem is darn silly, by the way. Just teach ext4 to work without a journal and be done with it. It has feature flags for a _reason_.)

January 25, 2008

Ok, Firmware Linux is now using the 2.6.24 kernel (which means I finally got to check in the "somebody in kernel-land has no sense of humor" fix to cmdline.patch).

The build stage is finally using busybox (and toybox 0.0.4), and explictly enumerating the commands it needs on top of that (in a way that doesn't allow other commands to leak in). Alas, there are still side effects, mostly of the "gee, yet _another_ busybox command is subtly broken". Yeah, I'm using an old version of busybox. No, I'm not upgrading it: I'm replacing each broken command with a toybox version, but for the moment I'm putting most of them back in the "explicitly enumerated host commands" list. The most recent victim seems to be "install", which overwrote the busybox executable

If you're wondering why I have almost no involvement in this year's Penguicon, and plan to have _nothing_ to do with next year's (except possibly attending, since it's my wedding anniversary and all), note that the man who will be con chair next year can make me want to punch him in the head with a single sentence of an email he probably considers reasonably polite. This becomes a problem when I bump into something like the video at the bottom of wednesday's penny arcade and go "that guy's at Carnegie Melon, which is in Pittsburgh, and Molly and Garrett are coming to Penguicon from Pittsburgh, maybe if they could give this guy a ride and crash space worked out somehow he could be a Nifty". I am bad at sitting on my hands in such a situation. I need to get better at it. It only leads to aggrivation anymore...

If airport security theatre doesn't notice a live cat in the luggage during the x-ray, exactly how effective does anybody think they are? We already know they can miss guns...

Why not forget the whole luggage screening thing and stick two plainclothes air marshalls on each flight, and give _them_ guns. And give the pilots a silent alarm button.

In the evening, Kelly and Steve stopped by last night and took Fade and myself to a place called "Cheddars", where we ate far too much.

January 24, 2008

Taught to add the extra symlinks to the build/host directory, and then taught to trim $PATH after host-tools. You can still skip if you run the scripts independently.

And I broke the kernel! Again. I tried to demonstrate mercurial to Fade (because source control systems are a fun thing for webmasters to know about). But trying to run hg was immediately going "Killed". Odd. The reason was that trying to run /usr/bin/python was immediately going "Killed". Very odd, it worked last night... Run strace, and python was receiving a kill signal trying to open a random text file with some python source in it. What?

On a side note, there seems to be no obvious way to find out which process is sending a signal, when you receive it.

On a hunch, run dmesg, and there's all these lovely kernel panic messages doing a null pointer derefernce trying to open the file. The kernel was following a null pointer doing the dentry cache lookup (well, a null pointer plus 0x05; structure member access probably). And the panic was killing the process, but not the kernel. I have no IDEA how it got into that state. Some kind of race condition, most likely.

I might have just been able to do "echo 1 > /proc/sys/vm/drop_caches", although that's more likely to have just paniced the kernel. But at this point, I was worried about filesystem integrity.

The next fun little detail is that rebooting and forcing a full fsck on ext3 is nontrivial. The point of journaling is to prevent the need for full fsck, so stopping the system improperly won't do it. You have to boot into single user mode, "mount -o remount,ro /", and do "fsck -f".

Ubuntu provides a way to do this, which doesn't work for two reasons. The first reason is that if you boot in recover mode, it goes "Hit ctrl-D or enter root password for system maintenance", but Ubuntu doesn't set a root password and goes out of its way to prevent you from ever needing one. Not "root password is blank", but "there is none, you can't log in as root". Except here it asks you to. Luckily, one of the first things I do on an ubuntu system is go behind its back and _set_ a root password.

The second problem is that their "single" mode isn't "PID 1 is your command shell", it's "upstart ran random things, one of which is a command shell on /dev/console". And one of the other things it's running (dunno which) is pinning / so the remount fails because it's "busy".

So what you have to do is hit escape during the grub countdown, edit the _first_ entry (not the "system recover mode" one) and append "init=/bin/bash" to the kernel command line, then boot with that (escape, b). When you get your shell prompt, you can do the remount and then the fsck.

The filesystem turned out to be fine. I'd poke the kernel guys about it, but I'm using an ubuntu kernel (modified 2.6.22) and not a current one (vanilla 2.6.23). I suppose I could report it to the kubuntu guys, but that's through a web page thingy rather than email, and I'm offline right now. Can't queue up a message into one's outbox via a web form when one isn't on the net. (This time, Wayport's brand of lack-of-internet access. That's what the local McDonalds has. Dunno why. Unlimited free soda refills, no internet. More or less balances out...)

January 23, 2008

So I got the darn toolchain wrapper relocatable on an x86-64 host last night. FINALLY. I still need to teach it about -iwithprefix to build any uClibc after svn 19932, but that shouldn't be too big a deal.

In the meantime, I'm investigating exactly which executables are used by the build. What I did is write a wrapper program that finds the name of the file it was called as, and execs that file out of a "handoff" directory with the argv[] and env[] it was called with. By itself this is a NOP, ensuring the build proceeds as normal and all the commands get called and produce the right results so the build completes. But before this handoff the wrapper can:

  • Append its entire command line to a log file

  • Create an empty file (if it doesn't already exist) in a "used" directory

Then I install busybox (and all the symlinks to it) in the handoff directory, install the wrapper (and the same set of symlinks) in a "wrapper" directory (which I add to the start of the $PATH), and when I run the build I can "ls used" to see what commands have been accessed, and grep for those commands out of the log file to see how they were called, all while the build is running.

Well, sort of normal. I've had to "rm" several symlinks out of the "handoff" directory and point them at the non-busybox versions. Busybox "ar", "cp", "patch", and "find" screw up the cross compile. The busybox 1.2.2 build itself dies if I don't take busybox's "od" out of the path. (That's just embarassing.) I used to test this kind of stuff against busybox _before_ I became maintainer, but it's obviously bit-rotted a bit since then. (Part of it is that the requirement set of building these packages has grown over time, and part of it is stuff in busybox _broke_. Why is patch segfaulting with a double free? Nope, don't care: already implemented a toybox version of that which works just fine.)

So apparently, these are the files I need to replace (mostly with toybox) before I can remove busybox from Firmware Linux: ar, awk, basename, cat, chmod, chown, cmp, cp, cut, date, dd, diff, dirname, echo, egrep, env, expr, find, grep, gzip, hostname, id, install, ln, ls, mkdir, mktemp, mv, od, patch, pwd, readlink, rm, rmdir, sed, sha1sum, sleep, sort, tail, tar, touch, tr, true, uname, uniq, wc, which, whoami.

Why didn't bunzip2 show up in there? Probably because busybox tar did an external exec instead of going through $PATH.

Of these, the build completes if I replace the current busybox versions of: ar, cp, find, od patch.

Of those, I already have replacements for: ar, basename, dirname, echo, patch, pwd, sha1sum, sleep, touch, true, and which.

Looks like my short-term priorities should be cp, find, and od. (Plus sed for MacOS X, and gene2fs to take UML out of the packaging step.)

And the busybox sort command screws up the toybox build. Sigh. Ok, yank _that_...

Ok, so now I want to build FWL without the standard $PATH, but instead manually adding each command so I know what it actually needs.

Host tools builds toybox already. Add busybox with a config file containing A) just the used commands B) minus the ones toybox isn't providing, C) minus the ones that don't work. Then create a temporary directory, fill it with symlinks to all the other commands it needs, and have the $PATH start with just that directory.

That's a bit of an oversimplification, of course, because if "which" isn't in the path then when you run, tries to rebuild busybox and toybox, and those need the commands they supply in order to build, and it all goes chicken-and-egg shaped. What you actually have to do is build ./ with a normal $PATH first, and then go "PATH=`pwd`/tmpdir:`pwd`/build/host ./ arch". And _then_ you can use a minimal tmpdir that doesn't reproduce anything in build/host.

So what other commands does tmpdir need? You need links to: ar, as, cc, cp, find, gcc, ld, make, od, and sort.

I'd really like to be able to yank "gcc" out of there, since cc _should_ cover it, but both the linux kernel and uClibc are full of assumptions about this. Especially in their scripts. Todo item for later...

January 22, 2008

Must... not... nitpick... Penguicon... website... ("Registration is open 24 hours. When it closes..." Er, perhaps _available_ 24 hours is a better word?)

Plugging the updated toybox into the firmware build resulted in a build break during the host tools stage. That's reassuring. The longstanding bug that got triggered is that if you point a symlink at toybox that doesn't correspond to a known command, the error message it tries to display dreferences an uninitialized field and segfaults. Easy enough to fix. The problem that _triggered_ this bug is that the new generated newtoys.h file was sorted wrong (sorted by USE_ macro instead of by command name) and thus the binary search to find "patch" wasn't finding it, even though it was built in. That was a fix to the build scripts.

I'm told I should pick up a copy of "The Art of Electronics", 2nd edition.

Ooh, Flowers for Barry Ween may actually be the best fanfic I've ever read. And that's saying something.

January 21, 2008

It occurs to me that large complicated code changes with a long time to completion are discouraging. When you're committed to spending another week slogging through a big change before you can get to a point where you can test anything, you can spend an entire day having done a huge amount of work and not actually be able to see progress, or even be able to clearly state to yourself what you did with your day.

Worse, if you then need to do a small unrelated change to the same source, you need to either back out your other changes, work against a clean tree and re-integrate the changes, or try to work around the changes and check in something you haven't quite tested on its own with a high likelihood of leaking in unrelated stuff when you check things in.

This is another advantage of distributed source control. I can do a small chunk, get to a good stopping point, check it in without being blocked by lack of net access or somebody else's work, and then go do something else for a bit.

In theory branching allows you to do three or four unrelated changes to the same tree and keep them separate. I should learn to do branching, but I still fear the "octopus merge" because it was so much pain under Subversion and CVS...

January 20, 2008

Dragon is apparently not getting enough cardboard in her diet, and is chewing on the boxes I'm putting books in for the move back to the condo. Sigh.

I've been working on toybox because I need to get a Firmware Linux release out. Specifically, I need to upgrade toybox because I need to apply Mark's MacOS X patch to Firmware Linux. Yes, there actually is a sort of logic behind my recent set of nested tangents, it goes like this: To build on MacOS X I need a reliable sed. The MacOS X verion uses -E to indicate extended regular expressions, and Linux uses -r, and one of the more intrusive changes in Mark's patch is detecting which sed you're using and feeding it the appropriate command line arguments (not always trivial, it turns out).

I've been meaning to add sed to toybox anyway, so I bumped that up in priority. In general, it's nice to be able to build busybox and toybox first, because this gives the rest of FWL a known environment to build in. Unfortunately, busybox has bit-rotted since the last time I built a whole system under it (2005), and I've lost interest in fixing it and instead want to replace it with toybox. I also need a fully functional sed to build either one, because their configure stages (among other things) make extensive use of sed. (Relying on sed beats requiring perl or python as a build prerequisite: both packages should _supply_ a version of sed that's good enough to build them with, there's just the chicken and egg task of installing sed before you can build the package.)

So I started to add sed to toybox, which isn't too hard for me since I more or less wrote the busybox version. It's a lot of work but I've done it before. Unfortunately, that's only half the problem.The other half is "make individual", building a busybox or toybox command as a standalone executable instead of part of a big "swiss army knife" multiplexer applet. I taught BusyBox how to do this back when I was the project's maintainer, and I've always planned to add a similar capacity to toybox. If I can build the toybox sed standalone (and without having to run menuconfig first), I can then use that sed to build the rest of toybox, and as much of busybox as I still need, and then building on MacOS X becomes a much easier problem because I'm using a known toolset. (I still need to deal with the case insensitive filesystem issue, lack of elf headers, and so on. But Mark already has a workaround for all that in his script.)

Unfortunately, building toybox commands standalone turned out to be hard the way I had it set up, because information for each command was scattered through a bunch of different files, and those files didn't always split out just a subset of their information cleanly. I made the swiss army knife mode very tightly integrated (which is good), but it didn't want to do anything _else_ (which is bad). So I reorganized the headers, moving each command's data into a single file and generating the tightly integrated headers from the information in the C files as needed. This mostly clears the way for building individual commands.

So, now that I've redone the headers, I need to teach toybox to build standalone commands, meaning I can get back to sed and finish implementing that, and then use that sed to make integrating the rest of Mark's MacOS X patch easier.

In general, my other two projects (tinycc and toybox) are somewhat subsidiary to Firmware Linux; both are things I plug into FWL to replace existing components of the thing. I got into busybox in the first place because of Firmware Linux (the old version, before the restart in 2006), and I got into tinycc because I wanted a different compiler to build FWL with. It's also what dragged me into qemu, User Mode Linux, and several other things. (It's an uberproject that spins off unlimited tangents.)

Firmware Linux has the following pending todo items for the next release or two:

  • Improve the wrapper so x86-64 hosted toolchain is relocatable (extra $PATH mangling and lobotomize collect2)
  • Rebuild under itself (mostly meaning "rebuild with busybox").
  • Build on MacOS X (via Mark's patch).
  • Replace busybox with toybox.
  • Replace genext2fs with toybox gene2fs.
  • Add distcc support calling out to the cross compiler from native builds.

Meanwhile, over in tinycc land, the package I was missing was called "w32api". So now I can download 4 packages (binutils, gcc-core, mingw-runtime, and w32api), extract them into the same directory, run "wine cmd", add the appropraite "bin" to the path, and build a "hello world" C program that wine can run. In theory, this means I can build and test a win32-hosted tinycc and build win32 binaries with tcc to test their output.

In practice, my interest in doing this comes and goes, and I'm forcibly reminded how truly pathetic the dos/windows command line is. I don't remember how to save the output of a command into a DOS environment variable. The "echo" command no only respond to no arguments by printing "echo is ON" (instead off giving me a blank line), but it special cases "on" and "off" as arguments. (Yes, magic in-band signalling!) I can see "cd" with no arguments acting like "pwd" (especially since there is no concept of a "home directory" in a single user environment).

Hmmm... Sometimes this way of blogging gets a little unwieldy when I wander through as many topics as I have today (and bother to write about them). It would be nice if I could break these entries up into smaller chunks (rather than per-day granularity) and tag the chunks ("tinycc", "fwl", "toybox"). Of course that gets us back into the realm of traditional blogging software with a database, and then I could let people post comments (not that I expect they would, this is a big notes to self and it still surprises me other people occasionally read it).

But the reason I stopped using livejournal (even before the russian mafia bought them out) is I incrementally write a few sentences at a time throughout the day, often while disconnected from the net. That doesn't work so well with something like livejournal. What I _really_ need is the blogging equivalent of mercurial.

Besides, here I'm not worried about flooding people's friendslists with irrelevant chatter. :)

Speaking of irrelevant chatter (or at least livejournal material, except that Starbucks still has T-Mobile branded lack of internet access so I can't post to livejournal from here), I seem to be developing an allergy to cats. Specifically, petting George (the longhair) makes my hands break out in a rash immediately afterwards (itchy red bumps lasting for a half hour or so, and over time the skin on my fingertips dries out and peels if I do it too often). I don't have a noticeable reaction to petting the other three (dragon and peejee are both very short haired cats, and Aubrey's a bit longer but still shorthair), but last night when dragon scratched my arm from the bookshelf (she wanted to play) and the entire length of the scratch swelled up, even more so than usual. (The swelling part isn't new, but there's more of it than there used to be. I've always swelled up a bit when I get clawed. No, not because "cat claws are dirty" as people keep telling me; I've nicked myself on dusty furniture and gotten backyard dirt in wounds before and it doesn't cause swelling).

This sucks. I think my immune system is being overwhelmed by four cats. I've also had intermittent but persistent congestion in my lungs for the past year, especially at night, which may slowly clear up the longer I'm away from home. (It's hard to tell whether or not it does, but then I tend to leave home covered in cat hair. There _are_ times when it's not happening, long walks outside seem to help, driving less so.) I thought it was an environmental thing in Pittsburgh (especially the downstairs pothead neighbor, which I _know_ I'm alergic too), but the congestion followed me back to Austin.

Sigh. Back in toybox-land I'd dearly like to be able to add the following line to the end of toys.h:

#define DEFINE_GLOBALS(a, ...) #define TT this.a

Unfortunately, the C preprocessor just doesn't work that way. You can't have a macro resolve to another preprocessor directive. Macro resolution can be forced to sort of recurse slightly with a big enough hammer, but the preprocessor is having none of it. I can't use __FILE__ because that has extraneous junk and I can't strip it down. I can't -D it on the way in when I'm compling lots of files at once... Stuck with it for now. Oh well.

Renamed "toy" to "this", because keeping "toy" and "toys" straight was hard for me to do, and I wrote it. Also consistently made all the commands using globals access them through a "TT" macro. Probably I should add a global and some argument parsing to "hello" just so it's a better template.

January 19, 2008

Still burned out, but channeled into fiddling with toybox for fun rather than towards an objective. Wrote rather a longish post about the build rewrite and sent it to the toybox mailing list.

I notice that readlink -f is failing two tests, because realpath() isn't behaving like I expected. Sigh. Using realpath() saves a huge amount of effort implementing a complicated persnickety behavior postively filled with corner cases... But it's a big non-orthogonal lump of behavior that I can't break apart to use only part of, either. And the variant it's implementing isn't the variant I need, and I don't quite see how to derive the variant I need from the one it's implementing.

I expect Roberto Foglietta is justifiably mad at me by now. (Not that the one he implemented, which I didn't use, does quite what I need either. This is a surprisingly ugly problem.)

The other ugly problem is breaking up toylist.h into something generated from struct command_data definitions in each file. If I have a structure definition in a file, I want to directly _use_ that definition, not have it be in a comment section used to generate a header file that the command.c file sucks back in to get the definition. For one thing, directly using the local definition makes building individual commands (each as their own executable, without the toybox multiplexer) a lot simpler and more straightforward.

But if I define a struct twice, the compiler complains, even if the definitions are identical. So if I copy all the full structure definitions before the union, it barfs when it hits that same struct again in the C file. But you can't use an incomplete type as a member of a union, so I can't just do a "struct command_struct;" for each structure before the union and then declare them later. (And even if I could, you can't do a sizeof() on an incomplete type, which rules out declaring an instance of the union with an incomplete type in it anyway.)

So, that pretty much rules out me putting an actual structure definition in each C file without it either being in the comments or hidden behind some kind of preprocessor directive. #ifdefs around a normal struct definition are too disgusting, so that leaves a multiline MACRO().

So what I'm doing is:

	int blah;
	char *blah2;

That can be turned into an actual structure definition for individual builds, and is easy to pick out via sed to generate header files with. It looks enough like a structure definition to avoid having to look anything up to use it, but not enough that it confuses people by not actually BEING the actual structure definition 100% of the time.

It's still wince-worthy, but it's the least ugly variant I've come up with so far. It'd be nice if I could get it to "#define TT toys.##a" but I haven't found a way to get a preprocessor macro to resolve to more preprocessor lines yet.

Spent an hour or two trying to get a build environment working under Wine so I can build and test tinycc's pe mode. The "compile from source" script still doesn't like me. Downloaded the prebuilt mingw base and corresponding gcc and binutils, extracted them all into the same directory, and then called gcc from a "wine cmd" command line, with the path tweaked. (And yes, remembering how dos did things is a bit odd after all these years. I last seriously used it around 1993.)

The wine cmd shell would suck much less if "doskey" worked.

Hmmm, building "hello world" died because it wants "-luser32", and although Wine development package provided a c:\windows\system32\user32.dll", the mingw gcc says "file format not recognized" when I point it at that. Hmmm... Oh good grief, the remains of the "build from source" thing have one. And adding a -L to that directory made it build, and the resulting a.exe worked. Sigh.

This is probably the most cobbled together build environment I've ever used. And that's really saying something.

January 18, 2008

Retroactive entry, because I didn't turn my laptop on all day. Burned out on this "computer" thing, re-read "Wolf who Rules" and watched a Miyazaki from Netflix, did laundry, made soup, etc.

January 17, 2008

My tinycc cleanups went down a large culdesac where I'd spent a week not getting it compiling again. I read through a lot of the code, but it's a bit like reading wikipedia or tvtropes, you spawn tangents way faster than you close them, with no end in sight.

Dumped the whole mess to a patch and reverted to what was in source control, and tried to find some smaller self-contained cleanups. Started chipping away at some of the warnings, on the theory not only is this something that needs to be done eventually, but being hip deep in those things makes building hard in the short term. Of course one of the explosive tangents is trying to make the host 64 bit clean, and the "typecast between pointer and int" warnings are part of that. But the "mixing signed and unsigned char" warnings... are gcc throwing a hissy fit because 4.x is a delicate compiler which grew up in a monastery and can't handle direct sunlight or raised voices. Ahem. But that's fairly mechanical cleanups.

Installed the extra "multilib" package so I can now go CC="gcc -m32" and run the test suite. Yay! This saves a great deal of tedious mucking about with hyperspace

January 16, 2008

Couldn't get to sleep at all last night, then massively overslept through most of the day. This "day schedule" thing didn't stick. Trying again tomorrow...

January 15, 2008

Out of bed at 9. Hoping "awake" happens by noon at the latest.

Ok, "awake" finally kicked in around 3pm. But I was _up_ darn it. (Not counting a 20 minute nap in my car shortly before noon.) Yay day schedule.

Meant to do taxes again, but still haven't gotten my W2 from timesys. Phoned them and left voicemail. Emailed their accounting department, and somebody who at least used to work for their accounting department. Dunno what else to do...

So I've narrowed down the main missing skill for launching Impact Linux: I need somebody who can ask other people for money. It's a skill I lack. For example, yesterday somebody called me from England with a Linux booting issue and offered to pay me for my time. Naturally, I solved his problem over the phone and when he asked how much he owed me I told him not to worry about it. (I'm not complaining, just pointing out that when I'm _offered_ money I have a distressing habit of turning it down, because I'm not comfortable taking it. The SFLC did something similar wondering if I wanted a share of the proceeds of the GPL enforcement lawsuits, although that was a more clear cut "no".)

I can do the work part of an embedded Linux business. Development, support, documentation, training... no problem. I can also find/hire/manage other people doing these things. I can keep expenses under control (including negotiating contracts with suppliers). I can even do marketing, market research, set strategic direction... I can budget, schedule, meet deadlines and more or less hold to a schedule. (Ok, my scheduling's a bit week because my time estimates suck; I tend to underestimate how long anything takes by around a factor of 3, both because of my desire to please and because I know what I'm capable of if I really buckle down and _work_ at my full capacity, which includes evenings and weekends and not getting distracted by today's new shiny email/rss/irc tangent. But I'm aware of this and can compensate for it, and although it never feels honest to do so it winds up being much closer to _accurate_. Yeah, I know that sounds strange, but it's true.)

What I can't do is ask for money. I can't do sales because I can't close. I can negotiate contracts with suppliers easily, but _dread_ doing so with customers. I'm uncomfortable even collecting _receivables_, although I can do that (they already agreed to pay us and even how much, this is just following up on that). I have a list with a half-dozen sales leads I've sat on for weeks, including one who outright told me they want to be my first customer, because asking people for money just goes against the grain.

And you wonder why open source is such a natural fit for my psyche? And volunteer-run conventions? Doing cool stuff as a volunteer is just _how_it_works_.

Originally David Mandala was going to handle the incoming money part of the new business, but Cannonical offered him "stupid money" and he has kids to put through college. More power to him, but it does make starting a small business problematic for me. I haven't got a sales bone in my body...

Poking at tinycc. It would be so nice if there was somebody I could ask questions to instead of having to stare at three lines of code for twenty minutes before I realize "oh, the bit in the second half of get_reg() where it looks at the second register of a long long while traversing the stack to find registers to free is looking at the second register potentially in use by a long long on said stack. It's _not_ trying to free two registers at once to _add_ a long long to the stack, in that case you call the function twice instead. Duh. (Yeah, it takes me a while to get these things sometimes.)

I still don't understand this chunk of gv():

#if defined(TCC_TARGET_ARM) && !defined(TCC_ARM_VFP)
            check.d = 1;
That seems to be doing some kind of endianness reversal (after the else case is the same loop with tab[i] instead of tab[size-1-i]), except that tab is an array of _integers_, so it's doing an endianness reversal at 4-byte granularity. That's... weird. But I don't know what ARM non-VFP floating point is supposed to look like. (What is non-VFP in this case, anyway? Soft float? I need to go look that up somewhere...)

January 14, 2008

Sick today. Mostly slept until 6 pm. Going to bed again at midnight to try to get back on a day schedule. (This should be fun...)

Met Mark for dinner and finally handed over the calendar I got him back in December. Poked at tinycc a bit, but I'm just not coherent today.

January 13, 2008

I'm trying to set up an rss feeder, and it's being a pain. The default one in KDE is "akregator", which looks nice except that it's part of the metasticizing tumor known as "Kontact".

I liked kmail. Kontact ate it. it looks like I could stomach akregator, but Kontact ate that too. And it won't give me two windows for the two different functions, it INSISTS on switching one window back and forth, which is deeply stupid.

I made Kontact look like kmail by hiding the stupid transform bar and _deleting_off_the_system_ the various notification things about scheduler "reminders" actively I don't want. The only reason I haven't gone to something like thunderbird is I can _ignore_ the huge unnecessary growth of Kontact off the back of kmail where I don't see it.

But when I brought up akregator it A) stole my kmail window, B) put a mini-icon in my toolbar I don't want, C) kept interfering with my use of kmail periodically..

I installed something called "rawdog" (I liked its description, "rss reader without delusions of grandeur") but it doesn't quite do what I want. I like akregator's ability to view my feeds like email, keeping track of which articles I've read and which I haven't yet. Instead rawdog makes a giant html page out of it, which is better than my livejournal friends list, but not by much. And its documentation borders on nonexistent.

Also, some feeds are high volume things where I just want to see headlines (engadget, slashdot, fark) while others I want to see the whole article (my livejournal friends list).

Speaking of my friends list, I don't see a way to log in and see friendslocked posts via an offline reader. Of course with everybody moving away from livejournal I suspect this is a short-term problem...

January 12, 2008

Heard back about why mingw doesn't build on Ubuntu. There were two problems: 1) I didn't have bison installed, 2) /bin/sh points to dash. Gee, the Defective Annoying Shell breaks something ELSE, what a surprise! (Still the single worst technical decision the Ubuntu developers have made in the entire history of the project.)

The only way my software works around this bug is to explicitly say #!/bin/bash every time. No software can use /bin/sh on Ubuntu anymore because they broke that symlink.

Dumped a makefile rant from here into a file, need to clean it up lots before it makes much sense though.

January 11, 2008

Feeling under the weather today. Dunno why.

Heard back about the phone interview, didn't get it. *shrug* After perl showed up during the phone call as a hard requirement (rather than the write-up, which said "perl, python, or tcl"), I expected as much. When asked why they wrote it that way, they said that making the job posting accurate prevented people from applying. Er... Yes. That's sort of the point.

I despise "make". It's complaining about a circular dependency in toybox. The problem is, there actually _is_ one, because parts of toys/help.c do different things and make's only tracking file-level granularity. To get make to build stuff in the right order, I have to lie to it about what the actual dependencies are. What a horrible tool. I need to stop using it in toybox, but that's a todo item for later.

One of the downsides of being a bit of a computer history geek is that when I read a book like "Eniac" by Scott McCartney I get a bit annoyed when he gets it wrong on page 5. (No, Eckert and Mauchly didn't invent the computer, they applied vacuum tubes to it. Howard Aiken started work on the Harvard Mark 1 in 1939 and had it operational by 1944. That was the first modern computer, explicitly following up on Charles Babbage's ideas after a several century gap (with Grace Hopper reprising the role of Ada Lovelace, doing the software).

You can say "but the Mark 1 used relays and electric motors, and Eniac had no moving parts". To which I reply that in 1944 Eniac had to be programmed by rewiring it, while the Mark 1 ran a program off of paper tape.

Of course there were mechanical calculators printing results on paper tape before then (think about early cash registers with the bell and "no sale" pop-up tab, or the scene in "The Mask" where Jim Carrey's acting like an old-school accountant with the green visor and the calculator with the big pull-lever on the side. Yeah, those. Around in the 1920s, and earlier.) IBM's punch card stuff (origin of the "punching in" and "punching out" employee time cards in the old warner brothers cartoons) went back to the late 1800's, and provided full database functionality using stacks of cards for each table. One machine does math (perhaps calculating payroll for a department based on the week's timecards), punching new cards to contain the results. Another machine sorted cards into different output hoppers based on matching various search criteria. A third machine had a printer built into it, reading a stack of cards and printing their contents.

But a real computer is programmable. It has "test and branch", and can loop. Those couldn't do that, a human had to provide those functions for it by hand.

The historical record is slightly muddled because the Mark I was funded by the navy, and ENIAC by the army. The two services have some rivalry, and both needed to calculate artillery tables to shoot down planes during World War II, and had lots of money and people to throw at the problem. But Howard Aiken is the guy who dug up Babbage's dusty old ideas and showed that calculation could be automated. (And Babbage was applying the punched cards of the Jacquard loom to automating math instead of weaving). The chain of "X followed up on the work of Y" winds up in the modern era by going through Howard Aiken.

And no, Konrad Zuse doesn't count because nobody followed up on his work. Zuse was on the losing side of World War II, his stuff was destroyed during the war and nobody even knew he'd done it for decades, which means the modern computer would be exactly the same if that man had never even been born. You can't say the same about Aiken. (Grace Hopper invented the compiler! She was a mathematician who got into computers when the Navy assigned her to work for Aiken on the Mark I. That's called a _hint_, people.)

Right, back to scowling at make.

January 10, 2008

Still haven't heard back about the phone interview on tuesday. (It seemed to go well at the time...) On the one hand, spending three months away from my wife/home/cats/netflix queue would be a bit inconvenient. On the other hand, the money's decent and the work sounds interesting...

So, interesting corner cases is making generated files from toys/*.c:

  • TOYBOX is a config symbol in toys/ which has attached help.
  • Defining a struct twice makes compilers unhappy, all structures need to be defined before the union containing them can have its size determined, and commenting out the struct to get it from the header file would make standalone building unhappy. I really don't want to #ifdef this in every C file...

The first one's sort of clumsy but not all _that_ hard to do. I can add main.c to the start of the script's file list. I need to get "toybox" info out if it, rather than "main" info, but "config [A-Z]" at the start of a line shouldn't hit any false positives with actual C code.

The second I'm kind of stumped on.

January 9, 2008

Right now, to add a new command to toybox I need to modify three files. In addition to adding the actual toys/*.c file for the new command, I need to insert the new command into toys/ and toys/toylist.h.

The file contains the Config symbol(s) for the command, and the help text. This isn't just help text for menuconfig, but is also used to generate toys/help.h which is displayed by the "help" command. (Sort of the toybox equivalent of "man", I might alias that if I can work out a graceful way to fall back to some other man command to display external man pages.) A command can have additional config symbols for compile time options, and the enabled help entries that start with the same PREFIX_ (everything before the first neline) are concatenated. The first line of each concatenated help entry should be processed specialy (merged into a single "usage" statement), but isn't at the moment.

The file toylist.h has two sections. The first section includes the structures containing each command's global variables, which are squashed together into a union to share space. (Not every command needs global variables, but if it does it needs a structure and if that structure exists it must be added to the union.) Toybox's command line argument parsing can save results into global variables, and when it does the first few entries in the structure declaration need to match up with what the command's option string says should be there. (No compile-time tool enforces this, but the regression test suite should spot it pretty easily.)

The second half of toylist.h is a big list of NEWTOY() macros. Among other things, these macros initialize an array of toy_list structures, containing the name of each command, the main() function to call to invoke that command, an option string in a format reminiscent of getopt() (but actually parsed by lib/args.c), and a flags field that says where the command should be installed (in {/usr}/{sbin,bin}) and whether or not toysh should avoid forking and just call the command's function from the same process (for things like "cd" and "exit" where a fork would defeat the purpose). I've pondered adding a second flag to indicate a command _may_ fork (for ctrl-z handling and such) but that it's not actually necessary for this command. (Probably TOYFLAG_MAYFORK will wind up meaning don't fork when job control is turned off, because forking from a signal handler during a ctrl-z sounds really dodgy. Yeah, I need to add memory/filehandle/mmap leak detection when I get to that point, but that's part of the reason toysh is a big job.)

The second half of toylist.h is what makes standalone command building nontrivial, but I've got an idea. Suppose I put a big comment block at the start of each command's toys/*.c file, and in that comment block I have three things:

  • The data block for the command (including all sub-options and help text).
  • The global structure for the command (if any).
  • The NEWTOY() data for the command.

Then, a compile-time preprocessing step can grab this data out of the toys/*.c files and generate toys/toylist.h and toys/ from this. If those files become generated, all the information for each command can be stored in a single file, so adding a new command would involve adding just one file.

The main hangup at the moment is that the easy way to grab the data would be via python, and I really don't want to introduce that as a build environment dependency. (toys/help.h is generated via python, but it only changes when toys/ does and I usually include that in the release tarballs so you don't need to generate it if you're just compiling the source unmodified. I believe I forgot to do that this time, and should probably re-cut the 0.0.4 tarball as a result. Or just put out a 0.0.5 sooner than I expected...)

I could always make a small C program to generate these files, which would be fairly ugly. Or I could try a fancy sed invocation, which would be ugly in different ways.

However, building the standalone sed could always cheat slightly if necessary, and once I've got a known and capable version of sed, using it to do fancy preprocessing is easy and even portable...

Hmmm... If I put the structure definition at the start of the file right before "#define TT toy.commandname" (which pretty much always needs to be there if we've got a global structure)... Think think think...

January 8, 2008

Hmmm, the toybox argument parsing logic needs a tweak. The "*" argument type means that an option takes an argument that can occur more than once, and it should assemble a linked list of the arguments. And it's been doing so, but as a singly linked list it reversed the order (because pushing at the head of the list is easy, traversing to append at the end is hard). Unfortunately, "sed -e command1 -e command2 -e command3" cares about the order the commands go in.

Luckily, since I wrote the argument parsing logic I've added doubly linked lists, and those are easy to add to in the right order. (Make it a circular list and insert add at head->prev.)

Ok, this was amusing.

And this is hilarious:

Executive Summary

This critical security update resolves two privately reported vulnerabilities in Transmission Control Protocol/Internet Protocol (TCP/IP) processing. An attacker who successfully exploited this vulnerability could take complete control of an affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights.

This is a critical security update for all supported editions of Windows XP and Windows Vista, an important security update for all supported editions of Windows Server 2003, and a moderate security update for all supported editions of Microsoft Windows 2000.

To clarify: if a Windows system is exposed directly to the internet, this bug lets anyone run arbitrary code on it. There is literally zero security. And the bug has been there for years. (This comes as a surprise to nobody, I expect. And you know it's probably not the _only_ bug of its kind, don't you?)

A qemu status update now that 0.9.1 is out: The current list of systems qemu supports is arm, cris, m68k, mips, ppc, sh4, sparc, x86, and x86-64.

Some of those have qemu systems have multiple variants: arm has v4-v7 each in little and big endian, mips has 32 and 64 bit versions in big and little endian, ppc has 32 and 64 bit plus whatever "emb" is, sh4 has little and big endian. In theory x86 also has i386, i486, i586, and i686.

Currently, Firmware Linux supports arm, mips, ppc, x86, and x86-64. Sparc doesn't work, m68k isn't finished, and cris and sh4 haven't been started yet. On a more thorough level, two of the four mips variants are covered, two of the eight arm variants, one of the three ppc variants, and two of the five x86 variants.

Plus I'm waiting for the alpha processor to move into the "system emulation" category, rather than just application emulation. Yeah, it's low priority retrocomputing, but still...

January 7, 2008

Gave the 60 days notice to end the lease and told the realtor to stop trying to sell the downtown condo. (Which has been on the market since August.) Fade and I are moving back there since it's silly to pay rent _and_ a mortgage, and one of her friends lives within walking distance of that place anyway.

Phone interview for a job tomorrow, a short (3 month) contract in California, with "Per Diem".

Banging on sed for toybox.

January 6, 2008

So, apparently the failure mode of resuming from suspend to ram is the keyboard and mouse not responding. The rest of the system worked fine (cursor was blinking in the email I'd been editing, when I hit the power button it popped up a menu of shutdown/logout/suspend/hibernate buttons), but the keyboard and mouse did nothing. Caps lock didn't even toggle the LED. Had to power it off and start over. Sigh.

Replied to 2 pending "linkedin" invites. Apparently it stopped asking me for a darn password I don't know when I do this, and just goes with the URL again. Went through the old ones, but I seem to have deleted several by accident. Oh well. (I don't really _use_ linkedin, but other people do, and it seems only polite to confirm "yeah, I know that person". A bit like key signing, I suppose.)

OOH! qemu 0.9.1 is out! I know what I'm probably doing with the rest of _my_ day... :)

In response to Warner dropping HD-DVD support:

A two-format landscape has led to consumer confusion and indifference toward high definition, which has kept the technology from reaching mass adoption and becoming the important revenue stream that it can be for the industry.

I really think it has more to do with the fact that the geeks get their video directly from the internet these days, and people were ok with crappy analog television pictures for 50 years before HD came along. A higher-resolution DVD isn't as interesting as getting a set top box that plays internet video. Internet video doubles every 18 months, improving both the quality of the picture and the length of the videos you can post. Just as "cd-rom multimedia projects" dried up and blew away 10 years ago, expect the successors to CD to do the same thing sooner or later. They're introducing a technology with a limited lifespan, covering it in DRM crap, ignoring the growth curve of the obvious alternatives, and wondering why there's a certain lack of caring?

January 5, 2008

After agonizing over how to implement "readlink -f" for about two hours (and writing over 100 lines of implmentation notes here in this blog, which I just deleted), I decided to just use "realpath()" with the extension to malloc its own darn buffer. Yeah, it's not portable, but I can add an xrealpath() to the library. The behavior is _exactly_ what I want, and PATH_MAX is indeed 4096 on Linux at present (defined in linux/limits.h).

If, at some point in the future PATH_MAX becomes infinite, readlink doesn't need to be updated, just the library function. (Whether "library function" in this case means libc or lib/lib.c is something I'll happily punt on at present.)

By the way, man 7 path_resolution has most of the material in my notes, although not the "how to break it" reasoning for the test cases or all the stuff about what's actually involved in recursion detection (which turns out to be the hard part. The easy way is to just just punt at 10,000 path components resolved and say "ETOODEEP").

Set up an apache server running on loopback that mirrors This means I don't need to run three copies of the mercurial daemon to have something that qemu instances can pull from when I'm not on the net.

Poked at the toybox web page a bit. It now has its own news.html page, with some of the old news fluffed out a bit. (The old release announcements list which applets each version had based on a quick dredge through the mercurial archive, retroactively add a news entry with the date of the project launch, etc.) Also making the nav bar on the left have less pathological spacing. And split the license rant into 2 pages. And put an explantation of toycans at the bottom off the about page. Did I mention there are now separate about and news pages? And a list of currently implemented commands at the top of the news page, since that's likely to be volatile...

Finally sat down to fix the gcc wrapper in FWL. It's segfaulting at the moment. Wheee...

Writing up docs for the nail board, and ad copy of all things. No, I'm not directly involved in this project, but it seems cool and the company sent me free hardware. Besides, it would be nice if _somewhere_ out there was an easy way to get into embedded development with real hardware. One that doesn't assume you already know how to use a jtag (or what one is), that reflashing the board is a trivial step, that have you have a CLUE what bootloader is appropriate for your board or how it works, that you just happen to have a working cross compiler toolchain lying around (and configured for precisely the appropriate target), that serial console configuration is something other than a black art (from either end)...

There's a huge amount of stuff just getting x86 to work at low levels. You need to get a spare system to play with (obtaining hardware can be nontrivial), configuring and building a kernel on hardware you're not entirely familiar with (quick: what are ethernet and video drivers is the system you're reading this on using?), building your own root filesystem and init scripts and such (the entire Linux From Scratch project is devoted to just that one step), installing the whole mess and getting it to boot (grub is evil). Now try to do this on a headless box you can't reboot from CD, which turns into a brick if you get it wrong.

When I say I'm interested in making the nail board easy to use, I mean ALL of that needs to be easy. Deal with the issues one at a time, learn each one by itself in some kind of coherent order, not assuming you already know how to do it or that you can't easily recover from doing it wrong. THAT is what interests me in this project.

I've started adding sed to toybox. This should make integrating the MacOS port _much_ easier.

Tried to build mingw to test tinycc with. Ordinarily I don't just use these things verbatim because they never work for me. (I break stuff.) But I thought "eh, I don't care about mingw except to test this specific project, only has to work _once_" and went ahead and followed the instructions. And after downloading something like 20 packages, the build broke in the very first one. Sigh.

Yay! Cheshire Crossing issue four is out.

January 4, 2008

Busy day.

Somebody got the linux 0.0.1 kernel to run under qemu. Downloaded and booted myself. That is _so_cool_. (Not much you can _do_ with it, but it's good for studying the 0.0.1 code and seeing what it does. This might help my "building a "hello world kernel" project.)

Met another realtor at my condo, who says that the listing expired and tried to convince me he could sell the thing faster than the current one. Fade and I are pondering just moving back there (among other things we'd save over $800/month). The first realtor emailed us (with a bill for some repairs) and mentioned two people who expressed interest in buying the condo (but have not, as of yet, made offers).

Fade and I are hanging out at Spider House, a coffee shop which turns out to be off of 29th street. (Behind Ruby's, not blockbuster. Right, I was a block off.)

Found out that "wine cmd" gives me a dos prompt, and I can probably use that to install a development environment and use it to test tinycc's PE mode. (Both a PE host and a PE target.)

Poking at toybox readlink -f, because I've kept Robert Foglietta's patches on hold too long already.

Spent most of the day on the phone (on and off) with recruiters trying to convince me to take 3 month contracts in California. The concept of "per diem" makes it much more appealing. The idea of writing closed source wireless drivers does not, but there are other contracts...

*shrug* A day.

January 3, 2008

Bug report in tinycc, which turned out to be that it's not building the library to link tests/libtcc_test.c against. The hard part is actually figuring out what to call it. Wound up renaming libtinycc-i386.a to libtinyccrt-i386.a and generating the new library as

Got it working, but I'm probably renaming the exported functions in libtinycc.h.

January 2, 2008

Put out a toybox release yesterday, now I should actually start job hunting.

Let's see, I'm trying to develop/maintain toybox, FWL, tinycc, kdocs, and the weekly column I want to write. I need to catch up on uClibc development. I want to spend more time banging on the hammer board. I need to do license compliance evaluations for the SFLC which currently means testing the User Mode Linux patch to loopback mount a jffs2 image...

A quick dice search came up with a half-dozen jobs that I could do, but have nothing to do with any of the above and would prevent me from having the time or energy to do even half of them. Hmmm...

January 1, 2008

Happy new year.

Plugging toybox into Firmware Linux finds just as many bugs as plugging busybox into the 2005 Firmware Linux used to. After beating patch to death and finding three or four different bugs in it, a bug in sha1sum comes up. (Not in the algorithm, in the command line handling: in the file not found case it still prints an sha1sum value.)

Reading through Mark's patch to make FWL build on MacOS X. Already integrated a couple bits, made notes on how to fix half the problems he spotted in a different way, and some I'm still head-scratching at. Would have done this last month if 80% of the patch wasn't extraneous noise from deleting unrelated files and moving code around. (Ah, broken out patches. I need to track down the various rants on why they're a good thing and integrate them into kdocs. I need to finish kdocs. Later.)

Back to 2007