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 the Joggler is booting rEFIt with a functioning keyboard, experimenting with things to boot is easy. The ideal thing to boot would be the standard Debian kernel. If that works, then pretty much any stock Linux distribution kernel should also work. In order to boot it you need an EFI GRUB. I grabbed a premade binary from the Joggler wiki for now (we'll come back to this later).
Unfortunately, while the GRUB binary worked fine, the kernel doesn't boot, with no indication of why. This is tricky to debug; since the Joggler doesn't have standard VGA, you don't get any console messages on the screen until it's booted far enough to activate efifb, the framebuffer driver which talks to the EFI video output system. It also doesn't have a serial port (at least, not that anyone has found) so you can't get the log messages out that way either, and after experimenting with netconsole (sending console messages over UDP) I concluded that it was failing before initialising networking as well. The only other early boot debugging system that Linux explicitly supports is a weird host-to-host USB debug interface that I don't have and isn't cheap.
So, I grabbed a working Joggler kernel config from one of the Joggler Ubuntu images available on the forum, and built Debian's kernel sources using that configuration. That worked fine, so I bisected the interesting differences between the kernel configurations until I tracked down the single configuration option which stopped it from working: CONFIG_PHYSICAL_ALIGN. This one is going to take some explaining. :)
UPDATE: this is now fixed, see my post here.
Saturday, 28 January 2012
Wednesday, 25 January 2012
Joggler: Installing rEFIt
This is part of my series on running an unmodified Debian on the Joggler. See here for other posts on the same topic.
In the last part I explained how the Joggler boots its retail firmware, and the ways in which the boot process can be interfered with. The first step to getting somewhere is to get a proper bootloader on there; one that can give you access to an EFI shell and tools, and can boot other things without fiddly editing of scripts or pressing ESC repeatedly.
rEFIt is a Mac EFI bootloader which gives you a nice graphical menu of possible EFI programs to boot, and comes with a shell and tools. It's not the ideal bootloader for Linux since it can't directly load a Linux kernel, but it can load an EFI GRUB binary for that. I don't want to rely on rEFIt permanently because I don't know how to build it or where to obtain a binary of guaranteed provenance; this defeats the point of the "booting stock Debian" exercise; but it's a useful tool while messing around with the boot configuration.
In the last part I explained how the Joggler boots its retail firmware, and the ways in which the boot process can be interfered with. The first step to getting somewhere is to get a proper bootloader on there; one that can give you access to an EFI shell and tools, and can boot other things without fiddly editing of scripts or pressing ESC repeatedly.
rEFIt is a Mac EFI bootloader which gives you a nice graphical menu of possible EFI programs to boot, and comes with a shell and tools. It's not the ideal bootloader for Linux since it can't directly load a Linux kernel, but it can load an EFI GRUB binary for that. I don't want to rely on rEFIt permanently because I don't know how to build it or where to obtain a binary of guaranteed provenance; this defeats the point of the "booting stock Debian" exercise; but it's a useful tool while messing around with the boot configuration.
Joggler: How it boots
This is part of my series on running an unmodified Debian on the Joggler. See here for other posts on the same topic.
Okay, so the first thing that's important in running something other than the stock software is understanding exactly how the device boots normally, and at what points in that process you can easily/safely interfere.
The Joggler is mostly just a PC in a weird box: it has an Atom processor that runs normal x86 code. However, unlike most x86 computers, it doesn't have a traditional PC-compatible BIOS: it uses EFI. Some very modern PCs boot with EFI, but they generally have BIOS compatibility code that allows them to run traditional bootloaders and operating systems, and EFI is not widely used to actually boot on them just yet. The only platforms I know of where this is already used by large numbers of users are the x86-based Macs.
This means that the early stages of boot proceed very differently to the usual process on a PC, and to make things more annoying, the Joggler doesn't bother to display any hints as to what it's actually doing; the screen just displays a static logo on poweron (either the OpenPeak logo or the O2 logo, depending exactly which hardware variant you have) and leaves it there until the OS has booted far enough to take control of the display and display its own boot animation. As far as I know there's nothing you can press/do to see any actual boot progress; the logo is all you get.
Fortunately, other people already figured out pretty much everything it does during boot, though not all the details seem to be well-explained in the same place. To try and help out with that, here's my explanation of how it boots its factory-shipped OS. I've included notes that compare this to PC BIOS booting in red and notes on how you can encourage it to deviate from the normal boot sequence in blue.
Okay, so the first thing that's important in running something other than the stock software is understanding exactly how the device boots normally, and at what points in that process you can easily/safely interfere.
The Joggler is mostly just a PC in a weird box: it has an Atom processor that runs normal x86 code. However, unlike most x86 computers, it doesn't have a traditional PC-compatible BIOS: it uses EFI. Some very modern PCs boot with EFI, but they generally have BIOS compatibility code that allows them to run traditional bootloaders and operating systems, and EFI is not widely used to actually boot on them just yet. The only platforms I know of where this is already used by large numbers of users are the x86-based Macs.
This means that the early stages of boot proceed very differently to the usual process on a PC, and to make things more annoying, the Joggler doesn't bother to display any hints as to what it's actually doing; the screen just displays a static logo on poweron (either the OpenPeak logo or the O2 logo, depending exactly which hardware variant you have) and leaves it there until the OS has booted far enough to take control of the display and display its own boot animation. As far as I know there's nothing you can press/do to see any actual boot progress; the logo is all you get.
Fortunately, other people already figured out pretty much everything it does during boot, though not all the details seem to be well-explained in the same place. To try and help out with that, here's my explanation of how it boots its factory-shipped OS. I've included notes that compare this to PC BIOS booting in red and notes on how you can encourage it to deviate from the normal boot sequence in blue.
Tuesday, 24 January 2012
Project intro: Joggler
This is the most recent project I've started working on: I bought a Joggler a couple of weeks ago. It's a weird device that looks like a rather thick digital photo frame, but contains a reasonably complete Atom computer, with the only peripherals being a touchscreen, a single USB port, wifi, ethernet and audio out. It was sold as a "lifestyle organiser", with the intention that it would serve as a hub for a family who used their O2 mobile phones to organise their lives. Nobody was interested, and they ended up selling the remainder of the stock off cheap before abandoning it. Their software is kinda crappy (written in Flash running on Linux) and many of the backend services are broken at this point, so it's not particularly useful running the factory software.
I originally bought it with various random purposes vaguely in mind, but by the time it actually arrived I'd thought of better ways to accomplish several of those things, so right now I'm just fiddling with it for fun.
They are pretty easy to repurpose; there's no secure boot system or anything else protecting the device, so you can just boot your own OS on it. What does "protect" the device is the obscure way in which it boots; more about that in a future post, but it's been worked around by others already, so it's not a real barrier.
These devices are quite popular to use to run other Linux-y stuff, so there's a pretty good community out there (mostly around this wiki, as far as I can tell) who have ported various distributions and applications to run on the device. However, most of the available software distributions for it are based on various collections of patches, nonstandard configurations, and occasionally odd binaries with unclear origins; a standard Linux distribution doesn't quite run on it out of the box. I get irritated by that kind of thing, so my first goal is to get Debian (my preferred distribution for non-desktop uses) running correctly on it with no local modifications. This looks like it will involve submitting various interesting changes to Debian and other upstream projects, so I'm volunteering myself to do that. :)
I have a Trello board here for my tasks to get this to work. I've already made some progress in getting it working with less hackery, as you can see there, and I'll blog about the parts I've done before considering them finished.
I originally bought it with various random purposes vaguely in mind, but by the time it actually arrived I'd thought of better ways to accomplish several of those things, so right now I'm just fiddling with it for fun.
They are pretty easy to repurpose; there's no secure boot system or anything else protecting the device, so you can just boot your own OS on it. What does "protect" the device is the obscure way in which it boots; more about that in a future post, but it's been worked around by others already, so it's not a real barrier.
These devices are quite popular to use to run other Linux-y stuff, so there's a pretty good community out there (mostly around this wiki, as far as I can tell) who have ported various distributions and applications to run on the device. However, most of the available software distributions for it are based on various collections of patches, nonstandard configurations, and occasionally odd binaries with unclear origins; a standard Linux distribution doesn't quite run on it out of the box. I get irritated by that kind of thing, so my first goal is to get Debian (my preferred distribution for non-desktop uses) running correctly on it with no local modifications. This looks like it will involve submitting various interesting changes to Debian and other upstream projects, so I'm volunteering myself to do that. :)
I have a Trello board here for my tasks to get this to work. I've already made some progress in getting it working with less hackery, as you can see there, and I'll blog about the parts I've done before considering them finished.
insert blog here
I'm going to try blogging about some of the software and gadget-hacking projects I've been working on, instead of just talking about them on IRC. So, this is that.
Over the next couple of days/weeks/months (depending on motivation) I'll talk a bit about the projects I'm currently working on, and then going forward cover stuff that's interesting as I do it.
Hope to get some interesting feedback!
Over the next couple of days/weeks/months (depending on motivation) I'll talk a bit about the projects I'm currently working on, and then going forward cover stuff that's interesting as I do it.
Hope to get some interesting feedback!
Subscribe to:
Posts (Atom)