Older blog entries for kroah (starting at number 47)

Ahh goingware is looking at doing embedded work.

I started out doing embedded programming, and over the years realized that I was doing OS programming (right on the hardware, size restrictions, dealing with nasty, undocumented electronics, etc.) and started playing with Linux drivers as I saw somewhere I could help out. Flash forward to today, and I'm doing pure kernel work (but still dealing with the same constraints of embedded work.) In short, if you're comfortable writing kernel driver code, writing embedded code is a very short step.

Unfortunately, I second Zaitcev's statement about embedded programmers personalities and the general state of the environment in which they work. Typically you are working at a hardware based company, and have to live with design decisions made by people focused on the bottom line of product cost (remember, in production the firmware is free, and no one will recall the 6 months that it took you to get a beeper not to warble, even though they could have solved it with a 5 cent part in the design up front.) Because the company started out as a hardware environment, no one will understand the programmer's point of view, and you will be rarely brought into the hardware design process (or if you will, you will be ignored by them, as "they could produce the required code in this size EEPROM").

That being said, I loved it, but hey, I love writing Linux kernel drivers, what kind of a person likes doing that? :)

On a related note, I would like to publicly apologize to the Cygnus employee that I talked to at the 1997 Embedded Programmers Conference, and asked "what are you all doing here, I thought gcc was free?" I later realized what a jerk I sounded like, and I hope you are retired somewhere on an island due to the buyout by Red Hat :)

29 Aug 2002 (updated 30 Aug 2002 at 00:26 UTC) »

Bleah, I've not posted in forever, I'll try to do better next time...

Some things in the past:

OLS 2002 and the Kernel Summit

I went there all nervous about a proposal that Pat Mochel and I were making about driverfs and /sbin/hotplug. Basically we are wanting to move all of the existing device naming policy out into userspace. Well, our worse nightmare happened, everyone loved it and wants it right now :)

So now we're madly scrambling to get this done by 2.6. The main driverfs changes are now in the 2.5 tree and most of the core driver and now class changes are too. The PCI driver code is converted, and I've been posting patches to convert the USB core and driver code to the new model.

We might just make it yet...

PCI Hotplug

The PCI Hotplug code is very broken in 2.5, and need to fix that up. Unfortunately we changed the pci_ops structure, so have a ton of patches to fix all of that up to get in before I can go back to the hotplug stuff.

2.4 is looking good, and the ACPI PCI Hotplug driver is working remarkably well (as well as ACPI can work.)

Linux USB

Zillion of patches sent to Linus to clean up __FUNCTION__ stuff last night. A ton more to Marcelo for 2.4 to backport the usb-serial stuff that has been in 2.5 for a while. Now that this is done, other backporting can happen, depending on what other people really want.


For some reason Linux Journal trusts me enough to write a column. This should be fun...
9 May 2002 (updated 9 May 2002 at 21:09 UTC) »

Catching up on stuff...
PCI Hotplug

Things have been pretty quiet with the code lately. I've been playing with the ACPI version of the driver on a machine in the lab at work, and it is almost working properly... At least until the next ACPI update comes along and changes everything again :)

Made a new release of pcihpview this time making .rpm packages up to try to relieve all of the questions I had to answer about building the program from the tarball.

Linux USB

More tiny fixes all the time. I want to sync up with all of the USB changes in the -dj kernel, so will attempt to get that finished tonight.


Been having quite a run of articles published lately:
Hopefully they help people out.


OLS looks to be a lot of fun this year. My talk is on the first day, so it will be nice to get it over and have fun going to the other talks. It looks like there are a lot of very good papers being presented.
Misplaced anger
In working on syncing up the USB code in the -dj kernel into the latest 2.5 tree, I ran across this rant about the use of EXPORT_SYMBOL_GPL() in the kernel tree. As the first person who used this macro, I don't have much sympathy.

Also pay attention to the last sentence of the second to last paragraph of that page, I think that says it all :)
26 Mar 2002 (updated 26 Mar 2002 at 17:53 UTC) »

Catching up on stuff...

PCI Hotplug

The IBM PCI Hotplug driver got submitted and got accepted into the 2.4 and 2.5 trees. Nice to see this code finally escape the lab and make it into the wild. Now if only someone would actually use the thing...

Gave lots of documentation to someone at Compaq about how the pcihpfs interface works, so hopefully they will produce some good docuementation about how to use it.

Linux USB

Am slowly plugging away at cleaning up the Linux USB kernel code in the 2.5 tree. Now urbs have proper reference counting, cleaning up loads of potential race problems. More importantly, it now keeps people from having long involved arguments about when it is ok to free up a urb from within a device driver.

I took advantage of this new interface to redo the visor driver, showing off how you can abuse the new model :) Reduced the size of the driver quite a bit and didn't seem to slow it down any.


My Linux Hotplug article finally got published in the April 2002 issue of Linux Journal. This time I remembered to include my email address, and the responses so far have been very nice.

I need to work on the dietHotplug code some more, and put out a new release of the main Linux Hotplug package, now that the debian developer has fixed a number of small issues in it. I also finally got the cvs archive cleaned up by moving the fxload program into a different directory. It only took about 3 weeks to get the sf.net admins to move the cvs files around (did I mention that I hate cvs?).


Nice to see that Linus and Marcelo are now using BitKeeper to do kernel development. I've been using it for over a year, and it's the only way I am able to say sane, juggling 3 different kernel trees.

I gave a short talk to people at work, and at OSDL about how to do kernel development with BitKeeper. I've put the slides up online if anyone is interested in some BitKeeper basics (the last two slides are kinda interesting to show how different people use it.

Actually, now it takes longer to make up changesets for Linus and Marcelo to pull into their repositories than it did to make up patches for them, but the advantage of being able to send them more than one chunk of patches per -pre kernel, and ability for the people who do the real work to get the proper credit, more than make up for any minor inconvience that I may have (this means no more "USB updates - Greg KH" change log entries when I only sent the patches on from other people.)

Thanks cmiller for the advodiary script. I used it to post this entry, very nicely done.

Much Linux USB fun has been had lately.

Linux USB
Had lots of fun rewriting usbdevfs to use the VFS a lot better. Got everything working and the code turns out to be smaller, which shows how much the VFS code rocks. Wow, manipulating inodes by hand (like usbdevfs used to do) took up more code than the dentry manipulation stuff that I added. Posted the patch to linux-usb-devel if anyone is interested.
After hearing about Google's latest usenet archives, I (like almost everyone else) went to find my old postings. Thankfully I didn't write anything that I don't mind anyone reading. Unfortunatly all of my messages are not there. It does show me as having the second ever post to alt.surfing, and third post to alt.skate-board, but both of those posts are me responding to a message from someone else. So that proves that the archives aren't complete :(

I remember reading comp.os.minux back in 1988 or so, but I didn't post anything there. I can't remember when I started posting to alt.surfing, but I think it was right after the group was created. I did find the post over 9 years ago about a trip that my girlfriend at the time and I took across the country. That trip proved that we got along great. We're married now :)
PCI Hotplug
The PCI Hotplug core and Compaq driver got merged into 2.4.15 with the great -ac flush. This exposed the code to a lot more people, and a potential security problem was pointed out to me and quickly fixed.

Because some people kept complaining that I had broken the old PCI Hotplug GUI tools, I knocked together pciview using GTK+. It came out quite well. GTK+ rocks, as it is so easy to create GUI programs. Glade also helps out a lot in prototyping different layouts.
Linux USB
Well, I'm now the official maintainer, instead of just the temporary maintainer. Should be an interesting time... :)
PCI Hotplug
Wee, got the PCI Hotplug core code and Compaq PCI Hotplug driver into the -ac kernel tree.
The PCI Hotplug core is one of the first drivers to be a filesystem. It uses a ram based file system to interace with userspace, instead of the ugly /proc or /dev nodes with ioctls and such. Just mount the pcihpfs file system where ever you want and you get a tree that looks something like:
|-- 2
|   |-- adapter
|   |-- attention
|   |-- latch
|   |-- power
|   `-- test
|-- 3
|   |-- adapter
|   |-- attention
|   |-- latch
|   |-- power
|   `-- test
|-- 4
|   |-- adapter
|   |-- attention
|   |-- latch
|   |-- power
|   `-- test
|-- 5
|   |-- adapter
|   |-- attention
|   |-- latch
|   |-- power
|   `-- test
`-- 6
    |-- adapter
    |-- attention
    |-- latch
    |-- power
    `-- test
Then just read the status of the different slots, and change the values by using 'echo' and 'bash'. So to turn on slot 6, you would do:
     echo 1 > ./6/power

The PCI Hotplug core also is the first chunk of kernel code that uses the EXPORT_SYMBOL_GPL() macro instead of the traditional EXPORT_SYMBOL() one. People at Intel are going to love that one :)
Licensing stuff
Wow, I never thought I would be arguing licensing issues on any mailing list, let alone lkml. The whole thing got started on the LSM mailing list with this posting.

Time to go write some code to clense myself...


The Hotplug PCI driver is coming along nicely. The new structures for the core code look workable and should enable others to implement their drivers quite easily (others in this context is probably me...)

Did just find out about the "Atlas" project that Intel and other companies are working on. It's like PCI Hotplug, but think of adding and removing entire PCI busses at once. Hope it works out to something that actually is useful.


Well, I'm the current Linux USB maintainer for a bit, while the "real" maintainer takes a vacation and gets settled into a new job. Previously when I have been the temporary maintainer, big, contriversial patches have been sent in (HID happened, along with a big usb-uhci vs. uhci debate), but so far it's been pretty smooth...

Unless you count the whole "swap over USB devices" debate :)
Sony Clie USB
Yeah, got all of the USB Clie devices now working! Just sent off a patch, which should show up in the next -ac kernel. Now all Palm OS USB devices are supported on Linux, it's about time :)

Now to get pilot-link to work with the Palm 4.0 USB protocol properly...

Linux Hotplug

Released a small "dietHotplug" package that implements the /sbin/hotplug functionality in a C program instead of the current linux-hotplug scripts. Huge size savings!

I did this not to replace the current scripts, which are still necessary for a system to work with different kernels, and are much easier to add new hooks and do other fun scripting things with, but because the 2.5 kernel initrd structure will need it. Think loading only the pci drivers for the devices that you have in the system at boot time. That is what dietHotplug is good for.

Embedded systems / rescue boot discs might find it handy, if they don't want to have a version of bash or awk on their system to still be able to do hotplug stuff.

And it was fun to write, which was the biggest reason for doing it :)

38 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!