<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="robpress/1.0" -->
<rss version="2.0"
>
 <channel>
  <title>Rob Landley's Firmware Linux Build Log.</title>
  <link>http://www.landley.net/notes.html</link>
  <language>en</language>
  <item>
   <title><![CDATA[November 19, 2008]]></title>
   <link>http://www.landley.net/notes.html#19-11-2008</link>
   <pubDate>Wed, 19 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

]]></description>
   <guid>http://www.landley.net/notes.html#19-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 18, 2008]]></title>
   <link>http://www.landley.net/notes.html#18-11-2008</link>
   <pubDate>Tue, 18 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>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.</p>
</span>

<span id=entertainment>
<p>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.</p>

<p>(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.)</p>

<p>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.</p>
</span>

<span id=programming>
<p>Interesting phone call with some guys from Cisco.</p>

<p>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.</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#18-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 17, 2008]]></title>
   <link>http://www.landley.net/notes.html#17-11-2008</link>
   <pubDate>Mon, 17 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>Yay, Fade is back from Maryland.</p>

<span id=programming>
<p>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.</p>

<p>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 <a href=http://lwn.net/Articles/218766/>the rustyvisor</a>,
aka <a href=http://lguest.ozlabs.org/>lguest</a>, and shares with xen the
status of "technology that once showed promise, but just isn't interesting
anymore".</p>

<p>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.</p>

<p>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/build-all-targets.sh"
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.)</p>

<p>Argh!</p>
<blockquote><pre>
firmware-004f9509349b/www/header.html
firmware-004f9509349b/www/history.html
firmware-004f9509349b/www/index.html
tar: short read
</pre></blockquote>

<p>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_).</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#17-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 16, 2008]]></title>
   <link>http://www.landley.net/notes.html#16-11-2008</link>
   <pubDate>Sun, 16 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>I rsynced the
<a href=http://impactlinux.com/code/firmware>fwl</a> and
<a href=http://impactlinux.com/code/toybox>toybox</a> repositories up to
<a href=http://impactlinux.com>impactlinux.com</a> 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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>
</span>

<p>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.</p>

<p>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.</p>

<span id=programming>
<p>I'm really starting to hate User Mode Linux.  The one in 2.6.25.10
(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?</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#16-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 15, 2008]]></title>
   <link>http://www.landley.net/notes.html#15-11-2008</link>
   <pubDate>Sat, 15 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>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.
</p>

<p>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 10.0.2.2 $(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?)</p>
</span>

<span id=entertainment>
<p>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.</p>

<p>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).</p>

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

<p>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.</p>

<p>I wonder if there's any way I can watch this thing on fast forward?</p>
</span>

<span id=programming>
<p>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.</p>

<p>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 ./download.sh slow enough
that passing the data over the emulated network would be faster?)</p>

<p>Darn it, either short reads or short writes are happening over netcat.
I thought it was <a href="#20-07-2008">this old problem</a> 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...</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#15-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 14, 2008]]></title>
   <link>http://www.landley.net/notes.html#14-11-2008</link>
   <pubDate>Fri, 14 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>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.</p>

<p>So I added server mode to toybox netcat so I can run
"netcat -s 127.0.0.1 -p 12345 -l tar cz sources/build" and then have qemu do
"netcat 10.0.2.2 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.</p>

<p>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 10.0.2.2 $(netcat -s 127.0.0.1 -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...)</p>

<p>Still tracking down the sparc thing.</p>
</span>

<p>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.</p>

<span id=entertainment>
<p>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.</p>

<p>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.</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#14-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 13, 2008]]></title>
   <link>http://www.landley.net/notes.html#13-11-2008</link>
   <pubDate>Thu, 13 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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"...)</p>

<p>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.)</p>

<span id=programming>
<p>Ok, time to make sparc work.</p>

<p>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.</p>

<p>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.</p>

<p>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...</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#13-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 12, 2008]]></title>
   <link>http://www.landley.net/notes.html#12-11-2008</link>
   <pubDate>Wed, 12 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<span id=programming>
<p>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.</p>

<p>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.)</p>

<p>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.</p>

<p>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.)</p>
</span>

<span id=entertainment>
<p>Oh dear.</p>

<blockquote>
<p>Rob,</p>

<p>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.</p>
</blockquote>

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

]]></description>
   <guid>http://www.landley.net/notes.html#12-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 11, 2008]]></title>
   <link>http://www.landley.net/notes.html#11-11-2008</link>
   <pubDate>Tue, 11 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=politics>
<p>Amused at <a href=http://punditkitchen.com>political lolcatting</a>.
There are plenty of <a href=http://punditkitchen.com/2008/09/16/political-pictures-barack-obama-hillary-clinton-been-like-hours/>good</a>
<a href=http://punditkitchen.com/2008/09/30/political-pictures-sarah-palin-john-mccain-look-shiny-object/>ones</a>.
The most amusing part of <a href=http://punditkitchen.com/2008/09/05/political-pictures-barack-obama-chill-out-got-this/>this one</a> is it was from back in
September.</p>
</span>

<p>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...</p>

<span id=programming>
<p>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.</p>

<p>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.)
<a href=http://busybox.net/bugs/view.php?id=6174>One of the
ones I looked at</a> 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?
<a href=http://busybox.net/cgi-bin/viewcvs.cgi?view=rev&rev=24005>Impelement
the bug.</a><p>

<p>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.</p>
</span>

<p>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.</p>

<p>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.)</p>

]]></description>
   <guid>http://www.landley.net/notes.html#11-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 10, 2008]]></title>
   <link>http://www.landley.net/notes.html#10-11-2008</link>
   <pubDate>Mon, 10 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=politics>
<p>There are a few countries I <a href=http://news.bbc.co.uk/2/hi/africa/7708169.stm>wouldn't mind the US preemptively invading</a>.
Alas, El Shrubbo's poisoned that well, so I blame him for this continuing.</p>

<p>Catching up on the last few days of the <a href=http://podcast.msnbc.com>Rachel Maddow podcasts</a>,
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.</p>
</span>

<span id=programming>
<p>Poking at the Linux From Scratch build under system-image-i686 with
qemu faking a Pentium II, and perl just went "boing":</p>

<blockquote><pre>
./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm
make: *** [lib/Config.pod] Illegal instruction
make: *** Deleting file `lib/Config.pod'
</pre></blockquote>

<p>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?</p>

<p>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.</p>

<p>There's a new <a href=http://www.youtube.com/watch?v=-F-3E8pyjFo>how to
survive poisonous people</a> video.  (The
<a href=http://www.youtube.com/watch?v=ZSFDm3UYkeE>old one</a> is still up,
of course.)</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#10-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 9, 2008]]></title>
   <link>http://www.landley.net/notes.html#09-11-2008</link>
   <pubDate>Sun, 09 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>And Morris got cracked.  Great.  Both busybox.net and uclibc.org may
be compromised.</p>

<p>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.)</p>

<p>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:</p>

<blockquote>
<pre>
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 ?
</pre>
</blockquote>

<p>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.)</p>

<p>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 osuosl.org (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.</p>

]]></description>
   <guid>http://www.landley.net/notes.html#09-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 8, 2008]]></title>
   <link>http://www.landley.net/notes.html#08-11-2008</link>
   <pubDate>Sat, 08 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>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.</p>

<p>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 cross-compiler.sh 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.</p>

<p>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:</p>
<blockquote>
<p>[ 4448.583450] /build/buildd/linux-2.6.24/drivers/usb/serial/visor.c: USB HandSpring Visor / Palm OS driver</p>
</blockquote>

<p>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.</p>

<p>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.</p>

<p>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...</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#08-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 7, 2008]]></title>
   <link>http://www.landley.net/notes.html#07-11-2008</link>
   <pubDate>Fri, 07 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>Cell phone internet continues to be wonky.  It's back to giving me
10.11.12.13 and 10.11.12.14 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.</p>

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

<p>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...)</p>

<p>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...</p>

<span id=programming>
<p>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 ./cross-compiler.sh 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.</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#07-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 6, 2008]]></title>
   <link>http://www.landley.net/notes.html#06-11-2008</link>
   <pubDate>Thu, 06 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>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.</p>

<p>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.</p>

<p>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:</p>
<blockquote><pre>
AT+cgdcont=1,"IP","internet2.voicestream.com"
</pre></blockquote>

<p>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.</p>

<p>And Lennart Sorensen sent me an updated ppcqemu patch for 2.6.26, which
is highly cool except that 
<a href=http://kernel.org/hg/linux-2.6/rev/0aee8a6bf24c>Bartlomiej
Zolierkiewicz hadn't deleted the entire PREP platform</a> 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.)</p>

<p>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...)</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#06-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 5, 2008]]></title>
   <link>http://www.landley.net/notes.html#05-11-2008</link>
   <pubDate>Wed, 05 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.)</p>

<p>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.</p>

<p>I feel the urge <a href=http://www.girlgeniusonline.com/comic.php?date=20071214>to get</a> Obama <a href=http://www.girlgeniusonline.com/comic.php?date=20080514>a hat</a>.</p>

<p>And on that note, off to get angry at something else.</p>

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

<p>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.)</p>

<p>But mostly, it's because KDE 4.1 is a _disaster_.</p>

<p>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.</p>

<p>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.)</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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?????</p>

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

<p>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.</p>

<p>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.</p>

<p>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?</p>

<p>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.</p>

<p>What, it it under the internet menu?  Nope.  System-&gt;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.</p>

<p>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_...</p>

<p>This is not Linux.  Time to wipe it and install the real Ubuntu 8.10.</p>


]]></description>
   <guid>http://www.landley.net/notes.html#05-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 4, 2008]]></title>
   <link>http://www.landley.net/notes.html#04-11-2008</link>
   <pubDate>Tue, 04 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=politics>
<p>The existence of
<a href=http://maps.google.com/maps/mpl?moduleurl=http://maps.google.com/mapfiles/mapplets/elections/2008/us-voter-info/us-voter-info.xml>a Google Maps polling place finder</a> is pretty darn cool, if you ask me.</p>

<p>I really really really hope that <a href=http://www.cnn.com/POLITICS/blogs/politicalticker/2007/04/bush-sr-bush-fatigue-may-be-setting-in.html>Bush Fatigue</a> 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 <a href=http://tvtropes.org/pmwiki/pmwiki.php/Main/RefugeInAudacity>Refuge in Audacity</a>.  We forget about old scandals because they're
constantly buried by new scandals.</p>

<p>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.</p>

<p>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
<a href=http://news.bbc.co.uk/1/hi/talking_point/2551389.stm>Paul O'Neil
resigning</a> back in 2002 and becoming the first in a long line of
ex-insiders publicly lambasting the administration for malignant
incompetence, and being <a href=http://crooksandliars.com/taxonomy/term/1598>proven right</a>?</p>

<p>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.</p>

<p>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.</p>

<p>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?</p>

<p>(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?)</p>

<p>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.)</p>

<p>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 <a href=http://en.wikipedia.org/wiki/John_McCain#Commanding_officer.2C_liaison_to_Senate.2C_and_second_marriage>second marriage</a> (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.</p>

<p>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.</p>

<p>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.</p>

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

<p>To quote John Adams in the marvelous movie <a href=http://www.amazon.com/1776-Restored-Directors-William-Daniels/dp/B000067D1R>1776</a>, "Now _vote_, damn you."</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#04-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 3, 2008]]></title>
   <link>http://www.landley.net/notes.html#03-11-2008</link>
   <pubDate>Mon, 03 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=politics>
<p>You <a href=http://www.salon.com/opinion/feature/2008/11/03/racists_for_obama/>can't
make this stuff up</a>.  When they say truth is stranger than fiction, this
is what they're talking about.  (Especially the picture that goes with the
story.)</p>

<p>Humans.  Weird lot.</p>
</span>

<span id=programming>
<p>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.)</p>

<p>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:</p>

<blockquote>
LDFLAGS:=-Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,defs
</blockquote>

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

<blockquote><pre>
combreloc
    Combines multiple reloc sections and sorts them to make dynamic
    symbol lookup caching possible.

defs
    Disallows undefined symbols in object files.  Undefined symbols
    in shared libraries are still allowed.
</pre></blockquote>

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

<p>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...)</p>

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

<p>Ha!  Ran out of things wrong with it, at least when it comes to building
a "hello world" c++ file.  <a href=http://landley.net/hg/firmware/rev/447>C++ support is in</a> the native toolchain.</p>

<p>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.)</p>

<p>After the uClibc++ release and the next FWL release, I have to get back
to the C++ paper with Eric...</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#03-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 2, 2008]]></title>
   <link>http://www.landley.net/notes.html#02-11-2008</link>
   <pubDate>Sun, 02 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>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!</p>

<p>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.)</p>

<p>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...)</p>

<p>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!)</p>

<p>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...)</p>

<p>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.)</p>

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

<blockquote><pre>
/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<char>::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
</pre></blockquote>

<p>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.)</p>

<p>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.</p>

<p>And now I've found a "how did that _ever_ work"?  Checkin 390 added
this to cross-compiler.sh:</p>

<blockquote><pre>
+$CC $STATIC_FLAGS -Os -s "${SOURCES}"/toys/gcc-uClibc.c -o "${ARCH}-gcc" \
+  -DGCC_UNWRAPPED_NAME='"$ARCH-rawgcc"'
</pre></blockquote>

<p>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 <a href=notes-2007.html#05-12-2007>last year</a>),
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.</p>

<p>Easy enough to fix: -DGCC_UNWRAPPED_NAME='"'"$ARCH-rawgcc"'"'</p>

<p>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*</p>

<p>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.)</p>

<p>Ah, it's because I was creating a here document (fixup-toolchain.sh) 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.</p>

<p>Back to getting c++ to work.</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#02-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[November 1, 2008]]></title>
   <link>http://www.landley.net/notes.html#01-11-2008</link>
   <pubDate>Sat, 01 Nov 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>Up until 4am getting a cron job I'm happy with to build and upload
all the FWL targets.  It copies stuff into a <a href=http://uclibc.org/~landley/fwlnew>staging directory</a>
as it builds each thing, and then moves it all to <a href=http://uclibc.org/~landley/fwl>the final directory</a> in one go once it's all there.  This keeps
the README and the tarballs from getting out of sync.</p>

<p>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.</p>

<p>This must be what Perl programmers must feel like all the time.</p>

<p>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.</p>

<p>I can whip up 32 bit versions statically linked against x86 uClibc no
problem; chroot into the i686 system-image directory and re-run
cross-compiler.sh 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.)</p>

<p>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...)</p>

<p>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. :)</p>
</span>

<p>Ouch.  My sister's getting divorced.  Not good...</p>

]]></description>
   <guid>http://www.landley.net/notes.html#01-11-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 31, 2008]]></title>
   <link>http://www.landley.net/notes.html#31-10-2008</link>
   <pubDate>Fri, 31 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<span id=programming>
<p>Mostly to a good stopping point with the wrapper script fiddling, now
building uClibc++.  I really, really, really hate make.</p>

<p>Ok, after much fiddling I got it to build libgcc_eh.sh, 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.</p>

<p>Which is what was breaking earlier.</p>

<p>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.</p>

<p>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".</p>

<p>I need a bigger hammer...</p>
</span>

<p>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.)</p>

]]></description>
   <guid>http://www.landley.net/notes.html#31-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 30, 2008]]></title>
   <link>http://www.landley.net/notes.html#30-10-2008</link>
   <pubDate>Thu, 30 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>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.</p>

<p>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.</p>

<p>I'm setting UCLIBC_RPATH in mini-native.sh, 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 <a href=/hg/firmware/rev/66>checkin 66</a> which was primarily
about the uClibc install patch.  I should audit the executables again
to make sure none of them _have_ an rpath...</p>
</span>

<span id=entertainment>
<p>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.)</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#30-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 29, 2008]]></title>
   <link>http://www.landley.net/notes.html#29-10-2008</link>
   <pubDate>Wed, 29 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<span id=programming>
<p>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 ./punch.sh
script which populates an "andpie" directory with the toolchains and system
images (and bzip2'd logs, and README file), and rsyncs it up to
<a href=http://uclibc.org/~landley/fwl>the nightly snapshot site</a>.  But
that script expects the build to already have happened (via ./forkbomb.sh).
I've also been updating the uClibc and busybox archive tarballs by hand
from my local copies of those svn archives, and ./punch.sh 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.</p>

<p>Instead I should update ./download.sh to point to the nightly snapshot
urls for <a href=http://busybox.net/downloads/busybox-snapshot.tar.bz2>busybox</a>
and <a href=http://uclibc.org/downloads/uClibc-snapshot.tar.bz2>uClibc</a>,
then run "USE_UNSTABLE= ./download.sh" 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 ./forkbomb.sh should re-download fresh snapshots normally
when it gets them in USE_UNSTABLE again.  Change punch.sh 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).</p>

<p>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.</p>

</p>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:</p>

<blockquote><pre>
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
</pre></blockquote>
</span>

<p>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?</p>

<p>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?</p>

<p>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...</p>

]]></description>
   <guid>http://www.landley.net/notes.html#29-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 28, 2008]]></title>
   <link>http://www.landley.net/notes.html#28-10-2008</link>
   <pubDate>Tue, 28 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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).</p>

<p>On his way through, he hand delivered our copy of
<a href=http://www.positivethinkers.net/products/super-stupor-1>Super Stupor
issue 1</a>, which was quite good.  I am reminded of my
<a href="#22-10-2008">approach to finding the early voting polling
place</a>.</p>

<p>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.</p>

<p>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.)</p>

<span id=programming>
<p>The third -rc of uClibc is up now.</p>
</span>

<p>It's possible <a href=http://www.youtube.com/watch?v=m7Jh1BV1EOc>this
guy</a> may have too much time on his hands.</p>

<p>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...)</p>

]]></description>
   <guid>http://www.landley.net/notes.html#28-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 27, 2008]]></title>
   <link>http://www.landley.net/notes.html#27-10-2008</link>
   <pubDate>Mon, 27 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<p>I say this because I'm driving
<a href=http://somethingpositive.net>Randal Milholland</a> 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.)</p>

<span id=programming>
<p>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.</p>

<p>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.</p>

<p>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.</p>
</span>

<span id=entertainment>
<p>Yay, the Rachel Maddow Show on podcast.msnbc.com 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.</p>
</span>

<p>Ha!  I can has laptop battery again!</p>

<p>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.</p>

<p>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.)</p>

<span id=programming>
<p>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...</p>

<p>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.</p>

<p>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.</p>

<p>Banging away on <a href=/qemu>QEMU weekly news</a>.  I'm up to the
introduction of the Tiny Code Generator.  Coolness...</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#27-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 26, 2008]]></title>
   <link>http://www.landley.net/notes.html#26-10-2008</link>
   <pubDate>Sun, 26 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>It's always weird for me to come across <a href=http://vovo2000.com/phpbb2/viewtopic-10389.html>this sort of thing</a>.
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.)</p>

<p>On the other hand, some random person edited out my tenure as BusyBox
maintainer from the <a href=http://en.wikipedia.org/w/index.php?title=BusyBox&oldid=247067919>wikipedia
article on busybox</a>, 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]".)</p>

<span id=programming>
<p>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.</p>

<p>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.</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#26-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 25, 2008]]></title>
   <link>http://www.landley.net/notes.html#25-10-2008</link>
   <pubDate>Sat, 25 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.)</p>

<p>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.</p>

<p><a href=http://www.linkedin.com/pub/a/17a/b21>My brother</a> now has
a linkedin profile.  How odd.</p>

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

]]></description>
   <guid>http://www.landley.net/notes.html#25-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 24, 2008]]></title>
   <link>http://www.landley.net/notes.html#24-10-2008</link>
   <pubDate>Fri, 24 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>Bernhard asked me to resubmit my old qemu chroot patch, because apparently
there's a <a href=http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415996>debian
bug</a> requesting the feature.  <a href=http://lists.gnu.org/archive/html/qemu-devel/2008-10/msg01036.html>So I did</a>.</p>

<p>I also got the <a href=http://uclibc.org/~landley/fwl>prebuilt binary
toolchains and system images built against uClibc-svn</a> updated.</p>

<p>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 href=http://www.micasaverde.com/>a thing</a> instead...</p>

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

<p>So I couldn't reproduce Jean-Christophe's bug, asked for more info.</p>
</span>

<span id=entertainment>
<p>Ok, now <a href=http://www.youtube.com/watch?v=H8f8drk5Urw>that is
juggling</a>.</p>

<p>I can see why the
<a href=http://www.hulu.com/watch/7530/the-tick-pilot#x-0,vepisode,1>live
action Tick series</a> 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.)</p>

<p>Sad, really.  It _could_ have been great.</p>
</span>

<span id=politics>
<p>Yesterday Fade and I did the early voting thing.  She got a sticker.
I did not get a sticker.  *sniff*</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#24-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 23, 2008]]></title>
   <link>http://www.landley.net/notes.html#23-10-2008</link>
   <pubDate>Thu, 23 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>Heh.  Back in 2000 I wrote an article for The Motley Fool called
<a href=http://www.fool.com/portfolios/rulemaker/2000/rulemaker000217.htm>Why
Microsoft's Stock Options Scare Me</a>.  In 2001 Gretchen Morgenson wrote
an article for the New York Times called
<a href=http://www.pulitzer.org/archives/6523>Some Suffer Tax Hangovers From
Microsoft Option Spree</a>.  Her article won the 2002 Pulitzer prize for
"best reporting".  Mine was intimidated my editor so much he wrote
a <a href=http://www.fool.com/portfolios/rulemaker/2000/rulemaker000218.htm>rebuttal the next day</a>.  Yeah.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>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:</p>

<ul>
<li><p>The 1998 antitrust trial gutted company morale.  Totally trashed it.
When footage of Bill Gates arguing about the definition of "is" winds up on
the 6 O'clock news and your company insists it can bundle a ham sandwich if
it wants to, this is embarassing to the employees.  (Interviews from the
period compared working at Microsoft to working for Philip Morris.)  What's
more, it burned out <a href=http://www.fool.com/portfolios/rulemaker/1999/rulemaker991223.htm>dozens of senior excutives</a> who retired or went on
indefinite "leaves of absence" and never returned.  The company burned out
its brains fighting the antitrust trial, and they still got convicted of
being a predatory monopoly anyway.  (They just weaseled out of any enforcement
action, but the Findings of Fact still stand.)<p></li>

<li><p>Then the "permatemps" case happened.  For decades Microsoft hired
"temporary" workers, fired them for two weeks over christmas, and then hired
them again in January.  Some were there for over a decade, talented and
experienced employees with essentially no benefits or job security, watching
their "employee" coworkers accrue vacation time and health insurance and get
rich off their stock options.  Eventually, the permatemps had enough and
demanded to be treated the same as permanent employees, with the same
benefits.  They filed a class action lawsuit, and won.  And in response,
Microsoft fired the lot of them.</p>

<p>What Microsoft didn't realize is that the "low status" jobs these workers
had done included actually compiling the software.  The Windows 2000 build
system was maintained entirely by permatemps, and after they left Microsoft
couldn't get the sucker to compile anymore.  The windows source code may have
been in source control, but the build system for it wasn't considered imporant.
The build was littered with binary-only build tools the permatemps had written,
and when they left their machines were reformatted, destroying the source code.
When changes to the source cause a binary-only tool to segfault, and the source
code to that tool no longer exists and the people who wrote it are long gone...
what do you do?</p>

<p>What Microsoft did was find an existing development team that had just
finished a product.  The Windows 2000 development team had broken up and
the developers moved on to other projects but Windows Millenium had just
finished up so they grabbed that team.  Microsoft tasked the Winni-ME
team with backporting as much of the Windows 2000 code as they could salvage
onto the last codebase they could get to compile (Windows NT 4), and making
it look really pretty so people would switch from Windows 2000 to something
they could still compile.  The result was called "Windows XP", largely viewed
as a heck of a step back from Windows 2000, and now you know why.</p>
</li>

<li><p>Third, wall street turned on Microsoft.  The problem was that Microsoft
copied Cisco's <a href=http://www.theregister.co.uk/2000/10/09/accounting_masterclass_how_cisco/>"pooling" method
of acquisitions</a> without properly understanding it.  Buying a tiny company
for stock instead of cash and treating it as a merger to dodge some taxes
also triggered an unexpected SEC rule preventing them trading in their own
stop for six months after the "merger".  But due to the other games Microsoft
played with stock options (again, see
<a href=http://www.fool.com/portfolios/rulemaker/2000/rulemaker000217.htm>Why
Microsoft's Stock Options Scare Me</a>), they had to buy back billions
of dollars of stock each year just to break even.  For six months, their stock
buyback program was suspended, and the stock plummeted.</p>

<p>In the first six months of 2000, right after Microsoft was added to
the Dow Jones industrial average, their stock price fell from $100/share to
$50/share, and that's where it remains today, eight years later.  (Microsoft
tried to kick the share price up with a 2-for-1
<a href=http://www.usatoday.com/money/industries/technology/2003-02-18-microsoft_x.htm>stock split</a>, dropping the share price to $25.  Yesterday's close was
$21.53, and no they haven't split again since.)  Once upon a time large
mutual fund managers thought Microsoft stock never went down, but once it
had nobody wanted to touch it.</p>

<p>After the stock cratered and stayed flat for a few years, the employees who
worked at Microsoft to get rich stopped thinking that being a Microsoft
employee was an above-average way to make money.  As the
<a href=http://www.pulitzer.org/archives/6523>Pulitzer-winning
New York Times article</a> above mentioned, for a lot of employees this
wasn't a theoretical problem but actual bankruptcy.</p>
</li>

<li><p>The fourth thing that hurt Microsoft was Google hiring away all its
employees.  Google went on a massive hiring binge, and they picked Microsoft
clean of anybody with half a brain who was willing to leave.  They offered
more salary, their stock was on fire, they offered buckets of perks (everything
from free food cooked while you wait by a professional chef to one day each
week to work on your hobby projects as part of your job) at a time Microsoft
was cutting out its existing perks, and real technical challenges.  Google
was exciting, and it cream skimmed Microsoft of everybody with the initiative
to leave and try something new.  What was left behind was piles of dead
wood, useless talentless hacks hired during the dot-com boom, and they
rapidly came to dominate just about every development team at the
company.</p></li>

<li><p>The fifth thing that happened was the Vista death march.  Microsoft
became so dysfunctional that even after trimming every single interesting new
feature from "Longhorn" and tacking years of slippage onto its schedule,
when Vista finally did ship it didn't even work as well as the existing XP.
The years of Vista development ground up the remaining good developers and
spit out burnt husks, and in the end nobody wanted it.  The failure was
enormous, obvious, and humiliating.  Years of impotence developers had felt
trying to wade through increasing bureaucracy to get Vista out became public
shame at its reception, as the scheduled end of life of XP was postponed
again and again.  Customers paid _extra_ to "downgrade" from Vista to XP.
Vista proved both inside Microsoft and to the outside world that the company
simply had nothing left.  (The other cash cow, Office 2007, didn't do much
better.  Office 2008 is Macintosh only.)</p></li>

<li><p>Oh, one more thing.  Gates retired, and his hand-picked successor
(Lotus Notes author <a href=http://money.cnn.com/magazines/fortune/fortune_archive/2006/05/01/8375454/>Ray
Ozzie</a>) turned out to <a href=http://blogs.zdnet.com/BTL/?p=6803>not to be
up to the task</a>.  His <a href=http://news.cnet.com/Ozzie-memo-Internet-services-disruption/2100-1016_3-5942232.html>one big idea</a> (that web services like
gmail and writely have more of a future than boxed retail copies of software
like Office) led Microsoft to a disastrous hostile takeover attempt
of Yahoo, which made Microsoft not only a laughingstock but obviously
rudderless.  Steve Ballmer stayed on as head of the company after Gates'
departure, despite investors and employees blaming him for a decade of
stagnation and calling for his head.  The company flirted with putting a
<a href=http://www.guardian.co.uk/media/2008/jun/29/microsoft.billgates>"Triumviratie"</a> of Ray Ozzie, Steve Ballmer, and Craig Mundie in charge,
&lt;sarcasm&gt;since that worked so well for ancient Rome&lt;/sarcasm&gt;.</p>
</li>
</ul>

<p>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?</p>

<p>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?</p>

<p>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.</p>

<p>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...</p>

<p>I don't know what's coming, but it could be an
<a href=http://minimsft.blogspot.com/2008/10/is-microsoft-recession-proof.html>interesting few months</a>.
I suspect they'll find a way to make their numbers look good later today,
they've got <a href=http://www.fool.com/portfolios/RuleMaker/1999/RuleMaker990120.htm>quite a history</a> of that.  (<a href=http://boycottnovell.com/2008/08/31/charles-pancerzewski-vs-fraud/>More here</a>, and <a href=http://www.pbs.org/cringely/pulpit/1999/pulpit_19990527_000396.html>here</a>.)
They always present a smiling face to the outside world, with well-oiled hair.</p>

<p>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...</p>

<p>Mini's <a href=http://minimsft.blogspot.com/2008/09/compensatory-arrangements-of-certain.html>noticed a bit of this</a>, 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?</p>

<p>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?</p>

<p>Oh well.</p>

]]></description>
   <guid>http://www.landley.net/notes.html#23-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 22, 2008]]></title>
   <link>http://www.landley.net/notes.html#22-10-2008</link>
   <pubDate>Wed, 22 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<p>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.</p>

<p>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.</p>

<p>People keep asking me about tinycc, and nobody reads the mailing list
thread I linked to, so I wrote up <a href=/code/tinycc>a summary of why
I ended my tinycc fork</a>.  I note that <a href=http://pcc.ludd.ltu.se/>PCC</a>
and <a href=http://clang.llvm.org>llvm/clang</a> are both
non-gcc compilers you can poke at, if you're into that sort of thing.</p>

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

<p>I had not previously noticed that the sizes on the menu in
<a href=http://questionablecontent.net/view.php?comic=1255>Coffee of Doom</a>
were S, M, L, and WTF.  I want a local coffee shop like that.  (I miss
Metro.)</p>

]]></description>
   <guid>http://www.landley.net/notes.html#22-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 21, 2008]]></title>
   <link>http://www.landley.net/notes.html#21-10-2008</link>
   <pubDate>Tue, 21 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=politics>
<p>It's amazing that The Onion managed
<a href=http://www.theonion.com/content/node/28784>to accurately summarize</a>
the entire Bush administration the month he was inaugurated.</p>
</span>

<span id=entertainment>
<p>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.)
</span>

<span id=programming>
<p>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 ./download.sh --extract
without first running ./host-tools.sh it worked fine, but then when I zapped
the build directory and did a "./forkbomb.sh --nofork" to build all targets,
it failed setting up the source code.  Some boggling occurred until I figured
out what was going on.</p>

<p>Working around the problem to build the
<a href=http://uclibc.org/~landley/fwl>toolchains I posted</a> was easy enough,
just "rm -rf build; ./download.sh --extract; ./forkbomb.sh --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 ./forkbomb.sh do a ./download.sh,
build ./host-tools.sh, and _then_ do a ./download.sh --extract, so it's
using the target tools when extracting most of the source tarballs.</p>

<p>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.</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#21-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 20, 2008]]></title>
   <link>http://www.landley.net/notes.html#20-10-2008</link>
   <pubDate>Mon, 20 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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 ./forkbomb.sh --nofork and it builds host-tools.sh
before doing the ./download --extract, the patch fails to apply thinking
it has a reversed hunk.</p>

<p>Yay, msnbc added Rachel Maddow's show to <a href=http://www.msnbc.msn.com/id/8132577/>their podcast page</a>.
I need to set up an rss feed reader.</p>

<p>I put current uClibc toolchains and system images up on my
<a href=http://uclibc.org/~landley/fwl>uclibc web page</a> (which is the
same as my <a href=http://busybox.net/~landley/fwl>busybox web page</a>
since they're the same server.)</p>

<p>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.</p>

<p>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...)<p>

<p>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.)</p>

<p>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 http://busybox.net/tags" 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 http://busybox.net/tags/uClibc_0_9_26", and don't worry about that
being busybox.net instead of uclibc.org, they're the same server) in order to
get a data dump like this from svn info:</p>

<blockquote>
<pre>
Path: uClibc_0_9_26
URL: svn://busybox.net/tags/uClibc_0_9_26
Repository Root: svn://busybox.net
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)
</pre>
</blockquote>

<p>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.)</p>

<p>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.</p>

<p>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...</p>

]]></description>
   <guid>http://www.landley.net/notes.html#20-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 19, 2008]]></title>
   <link>http://www.landley.net/notes.html#19-10-2008</link>
   <pubDate>Sun, 19 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<p>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.</p>

<p>Catching up on the <a href=/qemu>qemu weekly news</a> 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.</p>

<p>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...</p>

]]></description>
   <guid>http://www.landley.net/notes.html#19-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 18, 2008]]></title>
   <link>http://www.landley.net/notes.html#18-10-2008</link>
   <pubDate>Sat, 18 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>Oh yeah, Stu told me <a href=http://torvalds-family.blogspot.com/>Linus
Torvalds has a blog now</a>.  I'd forgotten about that...</p>

<p>Re-reading the <a href=http://misfile.com>misfile archive</a>.  Perhaps
you have to be in the right mood to properly appreciate a line like
<a href=http://www.misfile.com/?page=758>"Logic is for the weak.  Follow me."</a>  But I want it on a button anyway.</p>

<p>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?</p>

<p>Got a card for <a href=http://sparkfun.com>sparkfun</a>.  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.</p>

]]></description>
   <guid>http://www.landley.net/notes.html#18-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 17, 2008]]></title>
   <link>http://www.landley.net/notes.html#17-10-2008</link>
   <pubDate>Fri, 17 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.)</p>

<p>Huh, audio of <a href=http://www.archive.org/details/IntroductionToOpenSourceEmbeddedSystems>one of the panels I did at Penguicon 5</a> 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.)</p>

<p>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, <a href=/talks>done it</a>.)</p>

]]></description>
   <guid>http://www.landley.net/notes.html#17-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 16, 2008]]></title>
   <link>http://www.landley.net/notes.html#16-10-2008</link>
   <pubDate>Thu, 16 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<p>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...</p>

<p>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
<a href=http://busybox.net/downloads/patches/>these</a>.)  I forgot
how INSANELY SLOW svn is, it's been going for 4 hours and it's only
up to the year 2001.</p>

<p>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...</p>

]]></description>
   <guid>http://www.landley.net/notes.html#16-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 15, 2008]]></title>
   <link>http://www.landley.net/notes.html#15-10-2008</link>
   <pubDate>Wed, 15 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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...</p>

<p>Peter Mazinger tells me that to get arm soft float working on a newer
gcc:</p>
<blockquote>
<p>[15:24] &lt;psm&gt; 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</p>
<p>[15:28] &lt;psm&gt; the part from t-linux-eabi is to replace a *tls file with one *lnx, see comment about div0 rasing SIGFPE</p>
<p>[15:43] &lt;psm&gt; 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</p>
</p></blockquote>

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

<p>Wrote up an explanation of what <a href=http://busybox.net/lists/busybox/2008-October/033327.html>complying with the GPL for BusyBox</a> 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...)</p>

<p>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...</p>

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

<p>Oh, wow.  I downloaded <a href=http://www.bay12games.com/dwarves/>Dwarf
Fortress</a> and ran it under Wine, and it... worked?  (*BOGGLE*.  I even
have sound.  No idea how to _play_ the game, but wow...)</p>

]]></description>
   <guid>http://www.landley.net/notes.html#15-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 14, 2008]]></title>
   <link>http://www.landley.net/notes.html#14-10-2008</link>
   <pubDate>Tue, 14 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=entertainment>
<p>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.)</p>

<p>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!"</p>

<p>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.</p>

<p>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.</p>

<p>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_.)</p>

<p>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.)</p>

<p>I've gushed about this <a href=#04-07-2008>before, so I'll stop now.</p>

<p>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.</p>

<p>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_.)</p>

<p>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.</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#14-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 13, 2008]]></title>
   <link>http://www.landley.net/notes.html#13-10-2008</link>
   <pubDate>Mon, 13 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<span id=programming>
<p>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.)</p>

<p>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.</p>

<p>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.</p>

<p>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...</p>

<p>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...)</p>

<p>Now, back to debugging the binutils thing.</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#13-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 12, 2008]]></title>
   <link>http://www.landley.net/notes.html#12-10-2008</link>
   <pubDate>Sun, 12 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=programming>
<p>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.</p>

<p>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?)</p>

<p>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).</p>

<p>Wound up rewriting readit() in busybox's editors/vi.c.</p>
</span>

<span id=entertainment>
<p>I'm having trouble following
<a href=http://www.hulu.com/watch/37691/bleach-ichigo-dies>Bleach episode
17</a>.  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?</p>

<p>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.")</p>
</span>


]]></description>
   <guid>http://www.landley.net/notes.html#12-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 11, 2008]]></title>
   <link>http://www.landley.net/notes.html#11-10-2008</link>
   <pubDate>Sat, 11 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.)</p>

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

<span id=programming>
<p>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...</p>

<p>Nope, that didn't fix it.  Sigh.  Debugging the hard way.  Wheee...</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#11-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 10, 2008]]></title>
   <link>http://www.landley.net/notes.html#10-10-2008</link>
   <pubDate>Fri, 10 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<p>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.</p>

<p>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).</p>

<p>The <a href=http://dailyshow.com>daily show website</a> 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 <a href=http://www.hulu.com/feed/show/902/episodes>it's on hulu</a>, and they're competent about this whole "web" thing.</p>

<span id=programming>
<p>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...</p>
</span>

]]></description>
   <guid>http://www.landley.net/notes.html#10-10-2008</guid>
  </item>
  <item>
   <title><![CDATA[October 9, 2008]]></title>
   <link>http://www.landley.net/notes.html#09-10-2008</link>
   <pubDate>Thu, 09 Oct 2008 23:59:59 +0000 </pubDate>
   <description><![CDATA[<span id=politics>
<p>Oh wow, that's screwed up.</p>

<p>I've mentioned the current economic crunch <a href="#24-08-2008">before</a>.
I talked about Liar's Poker and the invention of mortgage bonds with trenchards.
(These days t