The Geekess   Linux, bicycling, open source, gardening, amateur rockets, and other seemingly unrelated hobbies.

Update for Netconsole Tutorial

Image Copyright pfly -- http://www.flickr.com/photos/pfly/130659908/ A while back I posted a Netconsole tutorial for how to capture Linux kernel debugging messages from a crashing machine. I've refined the instructions down to three scripts and three commands, which are after the break.

Read more »

Tags: , , | link | 3 comment(s)


Installing a custom kernel with USB 3.0 support

This documents my personal flow for downloading and installing a Linux kernel with my xHCI and USB 3.0 code. Until the code is in the upstream kernel and shipping in Linux distributions, you'll have to follow these directions to get Linux USB 3.0 support.

Read more »

Tags: , , , | link | 26 comment(s)


USB 3.0 support: coming soon to a Linux kernel near you!

The xHCI (USB 3.0) host controller driver and initial support for USB 3.0 devices is now publicly available on my kernel.org git tree. Greg K-H has queued the patches for 2.6.31, so Linux users should have official USB 3.0 support around September 2009. This is impeccable timing, since NEC recently announced they'll be producing 1 million xHCI PCI express add-in cards in September.

This means that Linux will be the first operating system with official USB 3.0 support. I'm working with Keve Gabbert (the OSV person in my group at Intel) to make sure that Linux distributions like Ubuntu and Red Hat pick up the xHCI driver. Advanced users can always compile their own kernel on a standard distro install.

I hope that some USB 3.0 vendors who have prototypes will test with my driver. Instructions on how to compile a kernel using my git tree will follow.

This is a giant project that I've been working on for the past year and a half. It's gratifying to see the code finally released, and exciting to know that hardware is on its way.

Tags: , , , | link | 77 comment(s)


Debugging with printks over Netconsole

Image Copyright saschaaa -- http://flickr.com/photos/saschaaa/152502539/ Netconsole is a powerful Linux kernel debugging tool. The dmesg output from a machine under test is transferred over an ethernet link (via UDP packets) to another machine. That means that you can see the debugging messages from the test machine on the screen of another machine. Netconsole isn't good for debugging early kernel panics, but it is very useful if your new kernel driver hangs your system.

I used it to debug an oops in the xHCI driver that was caused by a NULL pointer access in a kernel linked list -- I should have used list_empty(). It took four hours to get netconsole working, even with three people who were clueful about Linux. (A big thank you goes out to Jamey Sharp and Josh Triplett for their help with this.)

At the time, there was no good tutorial that talked about all the basics and gotchas, so I decided to create one. This tutorial walks you through configuring both machines to be on the same network subnet, configuring the target machine to listen to UDP packets from the source, and configuring the source to send the kernel debugging messages over UDP.

UPDATE: My latest scripts for setting up Netconsole are here.

Read more »

Tags: , , | link | 9 comment(s)


USB 3.0 and Linux

USB is getting a facelift!

In the beginning, there was USB 1.1, with the "low speed" and "full speed" devices (at 1 Mbps and 12 Mbps, respectively). Then USB 2.0 came along with "high speed" devices that ran at 480 Mbps. Now the new USB 3.0 bus specification defines "SuperSpeed" devices that run at 5 Gbps (5,120 Mbps).

SuperSpeed Logo - image copyright 2008 Sarah
Sharp

Now that the bus specification is public, I can finally talk about the code I've been developing at work. I've been writing a Linux driver for xHCI (the new USB 3.0 host controller), and changing the Linux kernel stack to support USB 3.0 devices. On November 17th, I got to demo my work at the world's first USB 3.0 "SuperSpeed" Developers Conference.

This is a demo showing a USB 3.0 Mass Storage Device (commonly called a USB drive, thumb drive, or flash drive) prototype running under Linux with an unmodified Mass Storage Device driver. My Linux xHCI driver is necessary to communicate with the USB 3.0 device through the xHCI host controller prototype. The FPGA prototype was provided by Fresco Logic, a company that sells host controller and device IP.

The demo showed speeds that were about 3.5 times faster than USB 2.0 high speed devices. I expect this demo to be even faster when the device and host controller are implemented in silicon.

Details about USB 3.0

USB 3.0 is 10 times faster than USB 2.0. Roughly speaking, it means that a file that takes 30 minutes to transfer over USB 2.0 could take 3 minutes to transfer under USB 3.0.

USB 3.0 also provides better power management, which translates to longer laptop battery life. USB 3.0 is backwards compatible. That means you can plug all your USB 2.0 devices into a USB 3.0 port, or plug your USB 3.0 device into a USB 2.0 port. The USB 3.0 device will work at USB 2.0 speeds in the latter case, but that means consumers don't have to upgrade their PC or laptop to use USB 3.0 devices at the slower speed.

Read more »

Tags: , , , | link | 42 comment(s)


Student Day at Linux Plumbers Conference

For the past couple of months, I've been helping organize a student mini-conference for LPC, which will take place on September 16th. So far we only have 9 people registered for student day. We would like at least 15 students to make the student mini-conference a full-day event, and this week is the deadline for conference organizers to decide whether they need to scale back.

If you're a student, and you're even remotely interested in open source development, I suggest you take a look at the Linux Plumbers Conference Student Day page and register for the event.

Why is this event cool? As one project manager at IBM's Linux Technology Center said, "I would have killed for an experience like this as an undergrad. Students get to talk one-on-one with open source developers for a whole day, and then they get to go to Linux Plumbers Conference too! How could you pass that up?"

To some students, it may sound daunting. A whole conference full of professional open source developers? I was nervous when I went to my first Linux conference too. It was a small conference called FreedomHEC. I was really shy, but I (a lowly undergrad at Portland State) got to talk to Greg Kroah-Hartman (subsystem maintainer for USB and PCI) face to face. That's when I realized that open source developers are people too, and I could actually, like, talk to them.

Student registration is $50. (My friend Brandon, when asked if $50 was too expensive for students, said, "$50 is a new video game or a really hot Friday night date. It's not that much.") Registration is open to part-time and full-time undergraduates and graduate students, along with advanced high school students. (Trust me on the registration requirements, some portions of the LPC site haven't been updated with the new requirements yet.)

So you have no excuse not to attend! If you have any questions, feel free to email me personally. Otherwise, go register!

Tags: , , | link | 0 comment(s)


Dispelling a Linux Myth

Over the past week, I've run into two different people who expressed the same thought, "Linux lacks support for a lot of devices." I told them that this was a myth, and the Linux Driver Project has proven it is a myth.

Today I had an idea for a way to dispel this myth. I think someone should post a video of them walking into Circuit City, buying a random device, and walking out to their car. The video shows them configuring it on a Linux box and testing it. Then they would return the device and buy a new device. Buy, configure, return; repeat as necessary. The devices and configuration notes could be posted on the Linux Drivers Project wiki.

Now to find a decent videographer, buy a GSM data phone plan (for downloading packages and drivers in the car), and find some funding for devices that are non-returnable. In my copious spare time, of course.

Tags: , , | link | 0 comment(s)


Five projects I've been procrastinating on

We all have projects that have been pushed onto the back burner, or even shoved into a closet to be dealt with "later, when I have time". Every once in a while I get freaked out by all the crap I'm not doing. To purge my guilty conscious so I can finally work on one of these projects this evening, I present my list of "dusty projects":

  • LPCUSB This is a small open source project to write a slave-side USB stack for the NXP LPC2xxx ARM microprocessors. We want to use this for the rocket, but the code needs to use interrupts instead of polling and support isochronous transfers. I actually ran into Bertrik, who started the project, on the LessWatts IRC channel today. He gave me commit access a year ago and I haven't touched it. Ouch.
  • usbfs2 I've talked a little about this project before. The rewrite of usbfs has been put on hold until I can work through Zach Brown's aio patches. They make my head hurt, and I've been avoiding them.
  • Sunbird and RTM integration The official Remember the Milk plugin to integrate your todo list with Mozilla's calendaring software, Sunbird, lacks offline support. If I have an internet connection why would I use Sunbird? Someone posted on my old livejournal, asking me to keep them informed of my progress on writing a GCal backend for this. Uh, yeah, the project never made it past the initial blog post explaining the problem.
  • Switching to mbsync I've been wanting to read email on multiple laptops for a month now, which means my current fetchmail setup isn't going to cut it. I need to use IMAP instead of POP3, but I've avoided touching that project with a ten-foot pole. The Gmail interface is good enough for me right now.
  • Enabling better PM on my eeepc I haven't used powerTOP to optimize my eeepc power consumption yet. The batteries last about 2.5-3 hours with the wifi enabled, but I suspect I can do better. I also haven't fixed the problem where the laptop doesn't actually turn off when I power it down. Arjan told me it might be a BIOS bug, and Brandon suggested it was the intel sound module. I haven't checked either of these yet.

That's enough of a list for now. I could dig more dusty projects out of my brain, but that would stop me from working on any of them. I think I'll tackle the hardest one, which is reading Zach's aio patches. Good luck with your own "dusty projects".

Tags: , | link | 0 comment(s)


Portland State Aerospace Society meeting notes for 2008-05-21

The Portland State Aerospace Society (PSAS) builds, designs, and launches open source amateur rockets. If you haven't heard about PSAS, watch my five minute Ignite Portland 2 talk and follow along with the sides.

In this PSAS episode, we talk with some potential members, work on simulators, and stare at shiny LEDs.

Slow meeting. I was distracted because I was playing with my new eeepc 900. Some new members showed up, and Andrew attempted to explain some rocket science to them:

Sounds like the guy in the black t-shirt (Eric) is interested in communications and our open source GPS. Not sure what the guy in plaid (George) is interested in.

Jamey, Josh, and Fletcher (a high school student) are working on the software simulator this evening. We don't have the sensor nodes designed yet, but want want to feed old data into our flight computer software to test it. Then we can inject failures and see how the software reacts. It's a good idea because the hardware people *cough* Andrew *cough* haven't started laying out the sensor node schematics. They haven't even put the sensors on a bread board yet, although they did build a turntable to test the accelerometers.

On a completely unrelated note, Frank (our "Resident Artiste") brought his electronics project. He's building an art installation that includes tri-color LEDs.

Shiny!

Tags: , , , | link | 0 comment(s)


Portland State Aerospace Society meeting notes for 2008-05-14

The Portland State Aerospace Society (PSAS) builds, designs, and launches open source amateur rockets. If you haven't heard about PSAS, watch my five minute Ignite Portland 2 talk and follow along with the sides.

In this PSAS episode, Tim shows off the airframe shell he's been working on:

Tim's vacuum setup for pulling epoxy into the fiberglass airframe isn't perfect. There was a large piece near the top where epoxy didn't flow.

Tim brought a work light to demonstrate that the fiberglass shell is slightly translucent. Andrew (in his bun-bun shirt) demonstrated said translucence.

Tags: , , , | link | 0 comment(s)


Portland State Aerospace Society meeting notes for 2008-05-07

I have become the official blogger for the Portland State Aerospace Society (PSAS). If you haven't heard about PSAS, watch my five minute Ignite Portland 2 talk and follow along with the sides.

In this PSAS weekly episode, I talk about the rocket airframe and the software for the avionics sensor nodes.

Airframe

Tim showed off pictures of his setup for creating the light-weight fiberglass shell that goes around our rocket:

Read more »

Tags: , , , , | link | 1 comment(s)


Pyblosxom TODO

Things I still need to install and test before I decide on Pyblosxom as my blogging platform:

  • comments and captchas
  • the readmore plugin (because my entries are often long)

There's also a very long list of things I'd like to do if I decide on Pyblosxom:

Read more »

Tags: , | link | 0 comment(s)


Now with even more Git!

I'm currently setting up my remote git repository for my blog. I have to setup a post-update script, so that changes to the remote repo will be reflected in the local checkout of my blog (which is on the same server, coincidentally). It's a bit of a hack, but PyBlosxom needs the actual files around somewhere on the server.

Here's my post-update script (where $blog is the directory of your local repository):

#!/bin/sh

cd $blog
unset GIT_DIR
git-fetch origin
git-reset --hard origin/master

Tags: , , | link | 0 comment(s)


Gaps in the Pyblosxom install instructions

I just installed Pyblosxom on Jamey's Debian server, and now I'm posting my installation notes on my new Pyblosxom blog!

Unfortunately, the Debian package for Pyblosxom has been orphaned. The package version is 1.3.2, and the current Pyblosxom version is 1.4.3. Someone submitted a bug report about the lack of updates, and included a link to a package they'd updated to 1.4.2. This was before the package was orphaned, so no one could sponsor an upload of the new package. I grabbed the 1.4.2 .deb file and installed it with dpkg -i. Works great so far.

There are two installation pages on the Pyblosxom website that I found relevant: the Debian install instructions, and the CGI install instructions.

The Debian instructions are very short, and it didn't mention that the Debian package installs flavours in /usr/share/python-support/pyblosxom/Pyblosxom/flavours. I copied those files to my homedir so that I could modify the HTML flavor and change the look of my blog.

The CGI instructions didn't mention that flavourdir is a string, not a list of strings. So it can only be one directory, not multiple directories. If you wanted to keep the default Debian flavour directory, you would put this line in your /etc/pyblosxom/config.py:

py["flavourdir"] = "/usr/share/python-support/pyblosxom/Pyblosxom/flavours"

My blog URL is currently at http://minilop.net/cgi-bin/pyblosxom.cgi The installation instructions talk about using Apache mod_rewrite to change your blog URL to something more sane, but you really don't need Apache. Jamey's server runs LightTPD, and he's said you can do similar URL redirections with it.

Several times during the install, I had to check for Pyblosxom error messages in /var/log/lighttpd/error.log.

Tags: , , | link | 1 comment(s)


Organizing my life

I've been slightly side-tracked from my quest to host my own blog by the search for a good calendar and todo list application. It is still sort of relevant, because I'd like to embed my calendar in my blog. It's really useful to point family members to a web calendar and say, "You pick a free night for us to have dinner."

My current setup is just not working. I've been keeping my todo list and events in a plain text file in a git repository. I usually only check the file when I'm adding a new task or event. This means I'm suddenly faced with the mountain of undone tasks during a (usually) stressful moment. It's no wonder I've slowly started avoiding looking at that file at all. I need something pretty that I can bear to look at every morning.

I'd like to have a nice GUI to display my calendar and todo list, and a way to do offline edits for both. A way to publish my calendar on the web and keep some events private is a must.

I've found a partial solution with Google Calendar + Sunbird + GCalDaemon + Remember the Milk. As of today, I can view and edit my Google Calendar with Sunbird, and I can view my Remember the Milk (RTM) todo lists in Sunbird. The only thing lacking is the support to edit my RTM todo lists in Sunbird, both online and offline.

Screenshots of the integrated goodness:

Having separate work and personal todo lists is wonderful because I can hide the tasks by unclicking the RTM calendar that they're associated with. Now I won't think about putting out the garbage when I really should be figuring out how to use the signing-party package to sign Matthew Wilcox and James Perkins' GPG keys.

The public side of my Google Calendar can be found via html here or via ical here. Please don't stalk me.

Read more »

Tags: , | link | 1 comment(s)


About This Blog

This blog is powered by PyBlosxom, an open source python project. I have the tags plugin installed, which allows you, the reader, to filter what blog entries you want to see.

For instance, if you only want to see entries tagged with "open source", you can append that tag to the end of my blog URL like so:

http://sarah.thesharps.us/tags/open%20source

Or you can find an entry with an "open source" tag and click on the tag for a link to that URL.

You can also get an RSS feed for all my entries:

http://sarah.thesharps.us//index.rss

Tags: , | link | 7 comment(s)


USB 3.0 FAQ

What is USB 3.0?

USB 3.0 is a new Universal Serial Bus specification that was released in November 2008. It promises wire speeds of 5Gbps, bi-directional communication, and better power management.

What is xHCI?

The eXtensible Host Controller Interface (xHCI) is the hardware on your PC that talks to USB 3.0 devices and legacy USB devices. The xHCI specification details can be found on Intel's website.

Wasn't USB 2.0 good enough? Why is USB 3.0 cool?

USB 3.0 is expected to be 10 times faster than USB 2.0. It's also more power efficient, which translates into longer laptop battery life. Since USB 3.0 packets are routed instead of broadcast, idle links can be automatically put into low power states without the help of an operating system. USB 3.0 also adds the concept of endpoint "streams", which are used to submit multiple SCSI commands and get better performance out of USB attached SCSI hard drives and flash drives.

What about all my old USB devices?

Older USB devices will still work when you plug them into a USB 3.0 port on an xHCI host controller. They will still operate at their original speeds.

Can I plug a USB 3.0 device into my old computer?

If you plug a USB 3.0 device into an EHCI host controller, it will work at USB 2.0 speeds. To get 5Gbps wire speed, you need an xHCI host controller.

USB 3.0 sounds pretty cool. When will Linux support it?

The Linux xHCI driver has been merged into 2.6.31. The git development tree for the driver can be found on kernel.org

Is there any mailing list for xhci driver related discussions?

You can subscribe to the linux-usb mailing list at http://www.linux-usb.org/mailing.html I'll also post updates on my blog.

I found a bug in the xHCI driver. What should I do?

Enable xHCI debugging in your kernel (CONFIG_USB_XHCI_HCD_DEBUGGING) and send your dmesg output to sarah.a.sharp@linux.intel.com. Please CC the Linux USB mailing list linux-usb@vger.kernel.org.

You didn't answer my question; where can I find more info?

See a longer blog post for more information.

Tags: , , | link | 0 comment(s)