Diary of a geek

December 2010
Mon Tue Wed Thu Fri Sat Sun

Andrew Pollock


Other people's blogs


RSS feed

Contact me

JavaScript required

Sunday, 05 December 2010

And if only I'd read Planet Debian first...

Argh. So of course there's a difference between CONFIG_USB_SERIAL=y and CONFIG_USB_SERIAL=m, and that would explain the behavior I'm seeing. Thanks Ben Hutchings.

I guess I'm recompiling my kernel again. Kill me now.

[15:24] [tech] [permalink]

If you're trying to use a USB serial adapter as your Linux kernel console, part 2

Seriously, the amount of yak shaving I'm doing these days...

So I discover this CONFIG_USB_SERIAL_CONSOLE config option. I proceed to edit my .config, throw it in there and rebuild my kernel. (For the record, I hate building kernels). I'm about to reboot into said new kernel, and I thought I'd just double check the resulting config-2.3.36 file to check that CONFIG_USB_SERIAL_SERIAL did indeed get enabled. It's not there.

I spend a few minutes WTFing, and assume I've been an idiot and should have run a make oldconfig or some such thing after hand-editing my .config file. So I try that. The additional line vanishes again afterwards. More WTFing ensues.

I fire up make menuconfig, and go looking for the menu entry for the option. It's not there. The plot thickens.

I hand-edit drivers/usb/serial/Kconfig and change depends on USB_SERIAL=y to just depends on USB_SERIAL, and rerun make menuconfig, and lo and behold, the option appears!

So now I'm off rebuilding the kernel again.


[15:17] [tech] [permalink]

If you're trying to use a USB serial adapter as your Linux kernel console...

The kernel needs to be compiled with CONFIG_USB_SERIAL_CONSOLE=y

Debian kernels do not appear to be. Somewhat strangely, the config option doesn't even wind up in the config file in the typical commented-out manner, so you don't even know the option exists until you discover it from random Web searching, and then looking at drivers/usb/serial/Kconfig in the kernel source.

[12:05] [tech] [permalink]

A cleaner puppet manifest

Jon Downland is tinkering with Puppet, and wrote a class with a package resource to install a bunch of packages, but didn't quite like the way it was written.

The way that I'd achieve the same thing, and be slightly cleaner would be something like this:

class jon-desktop {

	$packages_to_install_by_default = [

	package { $packages_to_install_by_default:
		ensure => installed,

This way your actual package resource definition never needs to change. The variable you choose to use to define the list of packages to install can be abstracted away as much as desired.

[10:05] [tech] [permalink]