Monday 18 March 2013

Joggler: poking at it some more

I have three Jogglers now thanks to a kind donation, and I'm poking at them a bit more. Booting debian-installer works on all of them as described in my previous post, which is nice. My plan is still to get an unmodified Debian to work correctly on it to the maximum possible degree, but after that I might see about getting it to play nice with Android 4.2. Not much of an update yet, but we'll see.

Saturday 5 January 2013

JavaScript library recommendations?

I picked up JavaScript a while ago to write a Chrome extension (PawHash) and was surprised to discover that it's not as gross as I thought (though, it still leaves rather a lot to be desired). The negative impression I had previously was mostly based on two things: the DOM API, and the compatibility trickery you have to do in order to use the DOM API in a way that works on all browsers.

So, now I have a couple of projects in mind or in the early stages which are, more or less, clientside JS apps (i.e. singlepage apps that only depend on a server to fetch data, not to render pages). I've picked up AngularJS on a recommendation from a coworker and it's just excellent, removing basically any need to care about the DOM at all, instead just getting magic data binding. It also handles modules and dependency injection, which is nice to write clean code.

I'd like suggestions on what JS libraries I should look into, in order to make it into a richer programming environment. To be clear, I'm not talking about UI/MVC/etc frameworks; I'm talking about things like PrototypeUnderscore or even CoffeeScript (though that's not really a library, but hey). If you have opinions about these libraries, or anything really that isn't a UI tool, then I'd love to hear, but it'd be especially useful if you agree with me about some/all of the following preferences:

  1. I love Python. JS libraries that let me do more Pythony things would be a definite plus.
  2. I love higher order functions and continuation-passing style. Most of the JS code I've written so far makes heavy use of nested closures. Libraries that enable more functional programming idioms are great.
  3. I mostly hate Java. JavaScript's "new" operator and the accompanying constructor weirdness is just bizarre when you already have perfectly good prototypes. Libraries that define lots of pseudo-class constructors look a bit gross to me.
So, yeah. Any suggestions you have, or arguments for/against certain things, I'd love to see: leave me a comment here, or get in touch some other way (you can email me here if you really want), and I'll happily get into a discussion :)

Friday 2 November 2012

Joggler: sorry for the delay!

I've been really busy lately working on other stuff, which you might get some posts about soon. Debian has added 64-bit EFI support to d-i and I intend to look at the Joggler again soon to see if the installer can be prodded into working a bit better on it now.

Saturday 5 May 2012

Joggler: booting Linux directly

This is part of my series on running an unmodified Debian on the Joggler. See here for other posts on the same topic.

Thanks to Ben Hutchings (see this bug), the standard Debian kernels in unstable now have the EFI boot stub enabled. This means that you can boot them directly on the Joggler without needing to use a bootloader at all. This isn't all that great for regular booting, because there's no sensible way to pass a command line to the kernel without typing it manually on the shell, but it works very well for debian-installer. All you need to do is download the latest kernel and initrd.gz from the d-i nightly site, rename the kernel from "linux" to "linux.efi", put them on a FAT-formatted stick, and create a file on the stick called boot.nsh containing:
fs1:
linux initrd=\initrd.gz
and then the Joggler should boot directly to the installer. The issue with the keyboard not working when booting from boot.nsh doesn't apply, because Linux doesn't depend on EFI services for input. It also gets loaded at a suitable address without any issues.

For the actual installed system, GRUB is still preferable, since it allows much more flexible boot configuration; my plan there is to wait until GRUB 2.00 is released and makes it into Debian so that it can be installed with the regular grub-efi package.

Saturday 24 March 2012

Joggler: No more GRUB patches!

This is part of my series on running an unmodified Debian on the Joggler. See here for other posts on the same topic.

Just a quick update: you can now build and run an unmodified GRUB on the Joggler! A finished version of the patch I referred to in my previous post has been committed and is present in version 2.00~beta2, which you can get here. You still need to build it yourself, but it will work without any source modifications. Once the final release of 2.00 comes out, there should be a Debian package which will work :)

Thanks to Matthew Garrett and Vladimir Serbinenko for finalising and committing this patch.

Sunday 12 February 2012

Joggler: eMMC hilarity

This is part of my series on running an unmodified Debian on the Joggler. See here for other posts on the same topic.

Since my last post, the helpful folks at Debian have added the missing sdhci_pci module to the installer packages, so now, daily builds of debian-installer do indeed detect the Joggler's internal storage. However, it doesn't quite work right. (shock!)

If you boot up d-i and install to the internal storage, everything will appear to be working fine, and it will install... but if you switch to tty4 where syslog is being displayed, you'll see about a million copies of this message:
mmc2: Too large timeout requested for CMD25!
Every single write to the internal storage causes this message to be printed (CMD25 is the write command). It doesn't prevent the install from working, but when you boot the actual system the console is just filled with this message and you can't see what you're doing. You can change the kernel loglevel so it doesn't spam those messages to the console (adding loglevel=4 to the kernel command line is sufficient here, to disable messages of level warning and below), but they are still getting spewed into klogd, which will, via syslogd... write them to your logfiles.

Yes, you guessed it: this causes more MMC writes, which causes more log spam, which causes more MMC writes... so the system starts spending an unfortunate amount of its resources spiralling its logs out of control. Oh dear. It's not as bad as it could be because the log is buffered, but it's still rather unfortunate. It's possible to hack the logging configuration to "solve" this in various ways, but rather than mess about with that, I wanted to look into why the kernel was printing this message in the first place.

Tuesday 31 January 2012

Joggler: Trying debian-installer

This is part of my series on running an unmodified Debian on the Joggler. See here for other posts on the same topic.

Now that I've compiled a GRUB binary that works on the Joggler, I can try booting debian-installer. Being able to run this would be nice, since it means that instead of preparing the system on another machine using debootstrap, you can just install it the usual way. I'm going to be trying to install wheezy, the current testing release; it's too late to fix any issues that come up during a stable install. The development version of debian-installer also has several features that are helpful.

I usually use netboot images to install Debian, though I don't actually boot them from the network. You can boot the netboot kernel and initrd from any existing Linux bootloader, and as long as your network interface is supported by the drivers included, the rest of the install can proceed directly from a Debian mirror, with no need to download an ISO. To try this, you need four things:
  1. A USB stick with a small FAT16 partition.
  2. An EFI GRUB binary built with the patch from my previous post.
  3. The linux and initrd.gz from the d-i daily builds archive, and a grub.cfg which will load them (you don't need any command line arguments).
  4. The firmware for the Joggler's wireless interface: download the firmware archive here and extract the firmware-ralink udeb.