Migrating Device Drivers to the 2.6 Kernel 269
An anonymous reader writes "While it's all well and good to find out how to upgrade your kernel to 2.6, as this recent /. story pointed out, developers, especially device driver developers, might be more interested in the kernel's new device driver model. Over at Linux Devices, there's a new article on Migrating device drivers to Linux kernel 2.6. The short version: That little ole Hello, World! kernel module is a heckuva lot more complicated than it used to be."
uhh... (Score:5, Insightful)
Re:uhh... (Score:5, Informative)
Actually, the license macro isn't even necessary, 2.6 is just bitchier about kernel taints.
Re:uhh... (Score:5, Informative)
First of all, there's now a symbolic link from
Basically, compiling a module outside of the tree in the old 2.4.x was difficult and if you were using modversions, almost impossible - you need to have the kernel source and kernel configuration - its necessary anyways. Now, all I need to do is
make -C
and voila, kbuild handles everything for me.
If it means we're one step closer to... (Score:5, Funny)
Re:If it means we're one step closer to... (Score:5, Funny)
Re:If it means we're one step closer to... (Score:2)
Sun E3500 (Score:5, Funny)
I use a Linux X terminal as a client, but the principal is the same as on an altair.
Re:Sun E3500 (Score:5, Funny)
I had to re-solder every connection, using my tongue as a wet sponge.
Re:Sun E3500 (Score:3, Insightful)
Been a while hasn't it?
Booting from punch card, setting switches, changing disks, all on a machine (64KB of core memory) that would barely fit in a two-car garage.
I miss the good 'ol days. Damn kids are spoiled these days.
Linux Device Drivers (Score:5, Informative)
Re:Linux Device Drivers (Score:5, Informative)
Some other useful sites
the Linux kernel API [kernelnewbies.org] reference
Linux cross reference [iglu.org.il], especially the `identifier search'.
the driver porting series [lwn.net] over at LWN.net (which Rufus211 [slashdot.org] alreay pointed out).
the module init tools FAQ [kernel.org]
this document [win.tue.nl], aptly titled `the linux kernel'
apart from these there are many more interesting links, but mostly those have to do with specialty domains, such as networking or memory management. I pasted my bookmarks.html [wdebruij.dds.nl] to my personal website.
And lastly, if you want to do cross-version
LWN (Score:5, Informative)
a lot more complicated ? (Score:5, Informative)
The only difference in the skeleton modules described in the article is a MODULE_LICENSE("GPL"); and a "return 0;".
Breathtakingly difficult ! In fact, the only 'hard' part seems to be changing how (if at all) your module interacts with other kernel components ! If you wrote a module that utilises these aspects of the kernel, moving to a new API would not be that difficult.
LWN has far more depth (Score:5, Informative)
Linux 2.6... (Score:5, Interesting)
One of my biggest problems with the current driver model is the poor-ish support for loading drivers across minor revisions. I prefer GPL, and agree with a lot of the idealogical reasons behind Free and open source software. Companies, OTOH, do not. We need companies to write device drivers, since the complexity of something like an nVidia GeForce GPU is simply too much for a small team of people to reverse engineer.
One of the biggest problems at the moment is not being able to go to nVidia's website, download a precompiled binary module for your arch and load it into the kernel. Equally drivers off of a manufacturer's floppy or CD-ROM need to work this way too. Unfortunately it seemed that with Kernel 2.4, even a 0.0.1 difference in version number could mess things up and require recompilation. Has this been improved in 2.6?
I think that this is the level of compatibility that needs to be achieved before we see more widespread support by the HW manufacturers. It seems like the guys over a freedesktop.org will have their work on a graphical driver loading system in place quite soon, so this part of the deal is essentially solved.
Re:Linux 2.6... (Score:5, Informative)
Right now 3D graphics drivers for ATi and NVIDIA cards are the only sticking point in hardware support IMO. Just about every other major component has Linux support, if you do careful research before buying.
Re:Linux 2.6... (Score:5, Interesting)
Re:Linux 2.6... (Score:5, Interesting)
That's interesting. I'm sure I'm not the first person to come up with this idea, but I wonder how easy it would be to create a compatibility layer between the kernel and the modules that accepts a common binary format for the entire life of a kernel release (or maybe all kernel releases?).
Then you'd only have to port the layer to the newer kernel revision, and all the old binary drivers would work right away.
If it could be done, it would be a cool hack in league with that module that allows you to run windows drivers (most notably the NTFS driver) in the Linux kernel. IIRC, the performance of this arrangement sucked, but I wouldn't expect it would be as much of a problem with an abstraction layer for Linux binaries since the difference between a Windows DLL and a kernel module is much bigger than the difference between a 2.4.16 kernel module and a 2.4.24 kernel module.
Re:Linux 2.6... (Score:5, Insightful)
And face it, x86/AMD64 are the main platforms that Linux is used on.
Re:Linux 2.6... (Score:4, Insightful)
Hardware companies love Linux, and they want to support Linux, but they also have limits to how far they're willing to go; many are not willing to sink resources in to creating drivers that either are difficult to install, or involve exposing their valuable IP. If companies could just have a way to write a binary Linux driver that will "just work," and work for most people, just like it does with Windows and OS X, then that provides a big carrot to them to provide the driver and get the sales. The lack of a binary option makes things more costly to them and more difficult for them, and that deminishs the value of a sale.
Ultimately, the lack of a binary driver interface scares away users and companies alike, and if Linux wants to do better than a niche, and do better than Windows, then it needs to be friendly to everyone, not just the OSS crowd. Some day, Linus is going to have to make a descision between ultimately limiting Linux to the hobbyist, or letting it truely grow to become a popular, de-facto OS; and it's binary drivers that are going to help make the difference.
Let the market handle it... (Score:5, Interesting)
Once you can attribute a significant number of "Lost sales" to "Lack of Linux compatibility", PHBs will demand that it happens. They couldn't care less about the hobbyist, but if large corporations starts running Linux desktops, as is very likely for basic office tasks, they sure as hell care. And so every peripheral used by corporations, which bleed over pretty damn well into consumer peripherals, then consumers starts demanding the same...
And then the engineers will go "Gah, this binary API is changing *all* the time. Can't we simply release a GPL driver and be done with it?" And then, after a little talk with legal, and probably the PHB again, hopefully it'll happen. Not to mention they can take the GPL code of any similar driver, and copy-paste (with appropriate copyright headers and all, of course) into their own.
All Linus has to do is to stay strong on this matter - once Linux is past a reasonably critical mass, I suspect it won't really be much of an issue. The strongholds will be where there is no real alternative, mostly GPUs. But it might also be that Linux is hardly used much by heavy gamers - so they don't see much lost sales at all yet.
I suspect that it will go the other way. Most drivers will become open, and a few will remain closed. Perhaps in the end, if and when Linux is popular enough, they will simply close the kernel to any binary modules, and whichever has the "weaker" OSS drivers would face lost sales. I sure think it's easier to hit companies where it hurts (in their wallet) than getting Linus to change his ideological viewpoint. We're just not there yet.
Kjella
Re:Linux 2.6... (Score:4, Insightful)
"If Linux wants" again. Linux doesn't want anything than being useful to those who want to run Linux (see Linus' interviews...). The (grand-)parent poster was right: If you want to run Linux, there is usually no problem to find hardware that is supported without the need for proprietary drivers (the exceptions being GFX cards and hardware niche uses).
Yes, it's a problem if you want to migrate your existing hardware. But that hardware will stay usable only for so long. After that, if you really do want to run Linux, you know to check the hardware compatibility before you buy the replacement.
Re:Linux 2.6... (Score:5, Interesting)
However, at the risk of sounding incredibly naive, would it be possible to create a Linux module that presents a forward compatible API/ABI that other modules could be coded against? An abstraction layer, if you will. Thus, on upgrading the kernel, the only thing that would require a recompile (and possibly a rework) would be this uber-module. NVidia drivers, etc would be coded against this module's API/ABI and thus they themselves wouldn't require rework/recompilation.
Now there are probably good reasons why this can't be done, but I thought I'd throw it out here and watch it be shot down.
Re:Linux 2.6... (Score:3, Interesting)
In 2.2 kernels, it was legal to call function "foo" from interrupt context. However, in 2.4 kernels, foo calls sleep which means it's illegal to call from interrupt context (I'm making this up, it's my understanding that certain things can't be done from interrupt context). You have a module that calls the function "foo" from the interrupt context.
Now you are in trouble. How do you code aro
Re:Linux 2.6... (Score:4, Insightful)
You have created a false binary opposition here. From reading this one would assume that the only alternatives were a reverse-engineered driver written by hobbyists, or a proprietary binary-only driver from the vendor. They are both bad choices, and the vast majority of kernel drivers are built on neither model. They are written as free software either by the manufacturer, or by outside developers based on specifications provided by the manufacturer. A driver from nvidia is only "necessary" because for 5 years they have refused to release any kind of meaningful specifications to driver developers, and they can't really release the source to their own driver because they don't own most of it.
This is actually a step backwards from the historic pattern of support for graphics cards under Linux. Since the first accelerated X11 server for S3 chipsets from 1992 or so most manufacturers were willing either to release specifications, or actually commision outside developers to write open-source drivers for their hardware. When almost all major video chipset makers (with the exception of nvidia) supported Precision Insight's work developing the DRI infrastructure, there was actually a short time where a large fraction of common video hardware was completely supported, out of the box, including accelerated 3D, by a typical Linux distribution. This was BETTER than the typical support pattern for Windows; no need to mess around with downloading drivers or loading them off of vendor CDs, if the distribution had a properly configured kernel you just installed it and it worked. Unfortunately most of the cards with working DRI drivers are basically obsolete now, aside from some low-end ATI Radeon models. This is how hardware should work in Linux, and for some things like ethernet cards and SCSI adapters it basically does.
The problem is that ATI and nvidia do not understand how to properly support free operating systems, and until they do this "problem" is going to persist. Developers are willing to sign NDAs to gain access to these specifications, and if hardware companies would agree to this there would be no need to port their own precious code at all, much less put up with constant whining to open-source it.
Re:Linux 2.6... (Score:2, Interesting)
This may be impolitic, but... (Score:5, Insightful)
Linux, on the other hand, seems to think it's OK to make developers retrofit their code when they don't like the ad hoc design that the OS contributors came up with. This coupled with issues (questions?) of compatibility with things like the GNU C runtime libraries really must make it frustrating to do any serious development on Linux. (Feel free to rebut--it's been a long time since I've been active in Linux development.)
Still, I think it's a testament to Microsoft that an
Re:This may be impolitic, but... (Score:4, Informative)
Re:This may be impolitic, but... (Score:2)
Unfortunately, a driver for kernel 2.4.18 may not work out of the box on kernel 2.4.19, 2.4.20, 2.4.21, 2.4.22, and so on..
Re:This may be impolitic, but... (Score:5, Informative)
It would be nice if the code allowed this, but since it doesn't, all we can do is carefully research the support and drivers that do exist and are available for the latest and greatest hardware, before we buy them.
Re:This may be impolitic, but... (Score:2)
Yes, a fixed module API across versions would benifit binary modules, but it would also have massive benefits fo
Re:This may be impolitic, but... (Score:5, Insightful)
The reason the API changes is because of improvements, not some secret desire to make live hard on other people....
Jeroen
Re:This may be impolitic, but... (Score:2)
Re:This may be impolitic, but... (Score:4, Informative)
But, the kernel is released under the GPL, he can't stop you from writing an ABI that allows you to do this. So, while he doesn't want do the work for you, he gives you the freedom to do it if you wish. I don't see how he's inconsistent with the principles of free software. He just doesn't want to do it, nor does he have to.
If jane_hacker can't roll her own kernel, that's not Linus' problem. He gives you the kernel, what you want or are able to do with it is your problem, not his.
Maybe if you offered Linus (or somebody else with the skills) some money to write code that creates a standard ABI to make binary-only modules work, some work would be done on it.
As a final note, Linus started the kernel, it's only fair that he should be in control. If you don't like his level of control, then the GPL gives you the freedom to fork off the code and do with it as you will, as long as you release the source to the changes.
-- Joe
Comment removed (Score:5, Funny)
Re:This may be impolitic, but... (Score:2)
Drivers, however, are a whole different story, and I seriously question you assertion that a driver written for windows 98 (or whatever) will "pretty much" work on windows 2000 (or whatever). Having done various upgrades of Windows over the years (both at work and home) I have yet to ever see this working. If I did, I would not trust it - and neit
Re:This may be impolitic, but... (Score:5, Interesting)
Windows good:
With some effort, my USB networking driver is binary compatible with Win98 through WinXP. This is really awesome because I don't have to spend a lot of time re-writing and re-compiling drivers. For the customer, it just works.
Windows bad:
Writing drivers for Windows is like working on your car with the hood welded shut with only a 12-inch diameter hole cut into the top. Driver writing is EXTREMELY complex on Windows. MS tries to hide everything from you with convoluted callbacks and opaque data structures. My first USB networking driver took me two months just to get a basic skeleton running. On Linux, the same driver took me two weeks to completely finish and I'd never written a driver for Linux before.
Linux good:
Driver writing is soooo much easier and intuitive (at least for the 2.2/2.4 kernels). One
Linux bad:
Having to recompile for every kernel just bites. I understand and agree with Linus's reasoning for encouraging open source driver development. Alas, the company I work for doesn't.
So overall, I'd say the Linux driver model is superior for developers but ease of use is what drives mass-adoption of a product. I guess it just depends on your target audience. Our Linux user base, while vocal, is insignficant compared to Windows and even Mac so guess which driver I spend most of my time working on?
X
Re:This may be impolitic, but... (Score:2)
What version of Windows have _you_ been running? I've got quite a few drivers that work just fine under 98 and break in XP/2000. Including a couple for which there are no XP/2000 dri
Differing experience (Score:2, Insightful)
Whoopee about an
Re:This may be impolitic, but... (Score:5, Interesting)
If the .exe is statically linked perhaps, otherwise, you're going to have all kinds of library problems when moving the sam app between win 95, win 98, win 2k, and win XP. Keep in mind for earlier OSes in the chain, apps frequently shipped with their own shared libraries causing other apps or even the whole system to break.
I'm not sure about device drivers for Windows, but I would be suprised if there weren't problems with using win 95/98 device drivers with win XP.
Not to say that updading linux is painfree, I just think you're overstating the case for microsoft products. C library upgrades aren't a big deal, most distros contain compatibility libraries for older versions. There were some serious issues with libc upgrades, but that was years ago. It's really a non-issue in my development experience. Other libraries cause more headaches than libc.
Attn Mods: How a post that intends to comment on the strain imposed on developers for linux kernel and libc upgrades and also says this "it's been a long time since I've been active in Linux development" can get modded up to +5 informative is beyond me. Insightful or perhaps inciteful, but not informative.
Re:This may be impolitic, but... (Score:3, Interesting)
That's funny, I do it all the time with no such problems. You do have to use GetProcAddr if you want to use features that don't exist in the older versions, but that's far from difficult. Sometimes there'll be some subtil change in behavior in things like common dialogs, but nothing earthshattering.
Microsoft goes to a LOT of trouble t
Re:This may be impolitic, but... (Score:2, Informative)
EXEs are completely different from drivers, and drivers do NOT migrate from 9x to NT kernels.
Re:This may be impolitic, but... (Score:2, Informative)
Linux, on the other hand, seems to think it's OK to make developers retrofit their code when they don't like the ad hoc design that the OS contributors came up with.
That's not true at all. Any interested party with the knowhow can download the kernel source, fix up an obsolete driver, and send a patch in.
What's that? It doesn't work when you want to keep your sourcecode private and out of the hands of the developers? Fine, but don't expect help porting, or crufty workarounds to maintain the outdat
Re:This may be impolitic, but... (Score:3, Insightful)
Fark off - USB devices didn't exist on Windows 95 and had a major revision between Windows 98 and Windows 98SE.
This is particularly annoying as the driver installer only checks for Windows 98 and then doesn't check for which edition it is - so you can completely trash the Windows cache of drivers and be unable to uninstall the incorrect version.
Re:This may be impolitic, but... (Score:2)
I don't think anybody ever did anything more with it...
Its API also wasn't compatible with the later ones so writting a single unified windows driver still doesn't go...
Jeroen
Re:This may be impolitic, but... (Score:2)
I've always wondered.... (Score:4, Interesting)
FORTH (Score:2)
Re:I've always wondered.... (Score:5, Informative)
Help! 2.6.2 is huge (Score:5, Interesting)
ls -l arch/i386/boot/bzImage
1472687 arch/i386/boot/bzImage
I've kept my kernel config to the absolute minimum and made everything as modular as possible. On 2.4.24 the bzImage was only 1056223 bytes, now it's jumped by 400kBytes.
Has anyone any useful tips for cutting the "bloat"?
Re:Help! 2.6.2 is huge (Score:5, Informative)
Re:Help! 2.6.2 is huge (Score:2)
Th
Re:Help! 2.6.2 is huge (Score:2)
CONFIG_EMBEDDED isn't non-standard! It's under "General Setup" in 'make menuconfig' (or whatever your favorite config option is).
By default it leaves all the standard options on, but you can read the help and see if there are any you don't need (do you really need all three IO schedulers for a device with no hard drive?).
Also, you can certainly turn on "Optimize for size". You're
Re:Help! 2.6.2 is huge (Score:2)
I wonder what's going wrong with booting by LILO from a high-capacity 1
Re:Help! 2.6.2 is huge (Score:2)
You people are all hypocrites (Score:5, Insightful)
So then, let's take it a step further: would you people also be willing to put up with a totally closed-source kernel, and a closed-source C compiler, if the hardware manufacturers demanded it? In that case, why not just use Windows?
Seriously, I fail to understand why you people want to use Linux, only to complain about the lack of hardware support, since the Linux world requires everything to be open source.
Tell me, would you people also be willing to jump off a bridge to get driver support if the hardware manufacturers demanded it?
I do believe Linux (or GNU Linux, if you prefer), as a platform (not just the kernel), would not be as open as it is today if the developers didn't insist on such openness. If you people don't care how open things are, then why bother with Linux?
Re:You people are all hypocrites (Score:5, Insightful)
If a HW company considers Linux support, they will have to decide in terms of money earned vs money spent. If supporting Linux means supporting every kernel version out there + distribution-specific patches, their costs will be high. High costs - no Linux driver
I know they could release it as GPL, but that is _their_ decisions. OSS & Free Software is not about forcing others to open-source their work (even if their decision sucks
Right now both ATI and NVIDIA use ugly hacks to get past the lack of stable API. And we still use binary-only code for the drivers, it is just not in the kernel. I understand that Linus is very
I'd also like to mention that the lack of stable driver API also hurts OSS developers and users. Not every patch (read driver) gets accepted into the mainstream kernel from where it goes to distros. And not everyone knows how to patch, compile and install. And you know what - they shouldn't need to, if Linux is a serious desktop player. They _should_ have a _choice_ to do all that if they wanted to...
Enough of ranting, off to bed
Re:You people are all hypocrites (Score:5, Insightful)
It gives an advantage to hardware manufacturers who use open interfaces to the hardware they ship.
Re:You people are all hypocrites (Score:2)
Yup. You're right. We slashdotters are all of one heritage,
Re:You people are all hypocrites (Score:2)
I find your post hard to understand. There are a variety of reasons to use Linux rather than Windows. It is faster. It is more stable. It is more secure. It is more customizable. If you attach a binary driver to Linux, Linux will still be faster, more stable, more secure, etc.
Even if a person chooses to install Linux because it is open source, there is nothing hypocritical in thereafter installing binary games or drivers on that operating system. The value to the end-user of open source-ness varies depend
Re:You people are all hypocrites (Score:3, Insightful)
Who's this WE you're talking about? Some of us ARE the hardware manufacturers! While we are great Linux supporters, we are damn tired of taking support calls, writing FAQs, and loosing business because of customers can't make use of our drivers. I have conversations like this all the time... who is this benefiting?
CUSTOMER: I need the kernel?
US: No, the kernel source. You n
Tell me (Score:3, Interesting)
Re:Tell me (Score:2)
Re:Tell me (Score:3, Informative)
You do have CPU microcode updates from Intel, and corresponding Linux code to facilitate uploading the code to the CPU : Microcode [urbanmyth.org].
This microcode is not easily hackable (at least I hope so), and most certainly is not open source.
Re:Tell me (Score:2, Insightful)
Easy Migration (Score:5, Interesting)
Re:Easy Migration (Score:2)
So how'd you waste the rest of the week?
LWN also has an excellent series on driver porting (Score:5, Informative)
The article never mentioned "insmod" (Score:2, Interesting)
Now, how is this going to work for 2.6? First of all, NO F*CKING WAY would I even think of re-compiling th
for ppl with kernel compile problems.. (Score:2, Informative)
you will maybe get your system up faster if you cheat [cheesily] and grab the config
from your currently running kernel to start from, provided you have a relatively late
model 2.4.x || >.
its the file in most distros thats sitting in
[not really using more than RH or Deb these days, so im sure there are other places/names].
if you get a working kernel image for 2.6, go back and trim/add options... at least at that point its academ
Binary drivers are inevitable (Score:4, Interesting)
An alternative, come up with a standard API for each device type (video, ethernet, scsi, etc) Then create a wrapper between the internal API and the spec. Internal API changes, port the wrapper. If we can do it with windows drivers we should be able to come up with something more efficient and less hackish.
Original API aged poorly? Design a new one and implement the wrapper as another driver. Both can coexist.
I see no reason Linus would have a problem with this from a tech perspective. It's just another driver. GPL drivers could avoid the wrapper and would remain prefered.
Parallel implementation with a BSD would avoid most of the licensing issues.
This is DRM! (Score:4, Interesting)
Who the hell wrote that? Why was the patch accepted? What part of "I'm in control of my own computer" was too confusing for this guy to understand? Just to make it absolutely perfectly clear, when I say 'insmod foo.o' I expect foo.o to be loaded into the kernel. The only reason why it shouldn't is if there is a dependancy that would make it not work (but I expect to be able to insmod -f throught that). I do not want my kernel checking the license of foo.o and determining whether or not I am allowed to insert the module.
Even if you make the claim that you have the right to refuse someone who doesn't GPL their module to link to your module, that has absolutely nothing to do with me. It's a matter between you and the guy who isn't GPLing his module. Me, as a user, are free to link any two pieces of software together that I like. You have absolutely no legal claim to stop me. It's my computer. I thought this all was pretty obvious and it was only the stupid corporations that think they can control our lives who write software to stop me doing what I want to do with my computer, now I'm finding linux kernel developers are doing the same.
If you want to set a "tainted" flag, if you want to show me a warning, that's just fine, go right ahead, but don't ever stop me from doing what I want with my computer. Now I'm going off to hack my kernel to remove this insanity. Who knows, I might post a patch on the kernel mailing list.
For an up-to-date kernel book... (Score:5, Informative)
Will 2.6.x improve life for driver devs? (Score:5, Informative)
The driver APIs in windows appear to be more stable and documented better. The backwords compatiblity that MS allows in their driver model is great. For example, each time a new feature was added, it was always possible to use the old style for a few revisions. For example, when power managment and plug and play were added in Win2k, MS made sure you could still make a driver without the new calls and things would work. Even their wrapper models for networking (NDIS miniport) and storage (SCSI miniport) easily allow backworks compatibility. NDIS is nicely designed with versioning in the structures so that NDIS can know what version of the API the driver supports and handle it correctly.
The documentation in the DDK help is has improved greatly since the dark NT4 days. MS worked hard to audit the DDK docs and work with the developer community to improve them. These days their isn't much you will find in a header that doesn't have a nice page in the DDK help.
At each Windows Hardware Engineering Conference and also at the new Driver Developer Conferences they go way out of their way to make life easy for driver developers. On the source front, they provide source for sample drivers of almost every kind...even for some currently shipping internals.
The debugger is great. From a GUI or command linux, I can reload drivers over my debugger connection (serial or 1394) on a live system. I can connect to my debugger over TCP and remotely debug it. I can do almost everything I can do in a normal application debugger.
I can get kernel dumps of various types from full memory to 64 kb minidumps. Full memory dumps allow crashes to be totally debugged...much of the guess work is removed when you can see everything that was on the system at the time of death.
They also have great test tools built in. Between Driver Verifier and the Hardware Compatiblity Tests, a massive number of issues can be caught before the driver even gets to system testing.
In the linux world, I have to live with weak kernel debuggers and lack of true memory dumps. In real low level driver for a DMA device, in many cases you don't get the nice happy survivable oops...you get the "I need a damn camera and small console font to capture what stack made it out" oops. Every linux 2.4 device driver book should come with a digital camera for debugging! I heard that 2.6 adds some sort of memory dump...a dump to disk would make post-mortems so much easier. Any one know more about this?
Add to that the constant changes that instantly make documentation outdated and force driver develepers to rewrite with only the new source as their guide. The kernel rev issue is not just a GPL it and recompile...the APIs change and the meanings of status codes change, etc.
Each kernel revision my company supports requires significant work on our end. Even if it was as simple as a recompile and test, the rate of kernels released makes it difficult for developers and system test groups to keep up. It takes a lot to test high end drivers. Weeks can go into a system test plan for a specific revision of the driver with a specific revision of the kernel only to see a newer kernel suddenly become the "new new" thing.
On the test tools front, the world is fragmented with some companies having some certification testing but no true driver certification tests. I would love to see a 2.6 storage driver tester and a 2.6 networking driver tester. Is there anything happening on this front?
Re:Will 2.6.x improve life for driver devs? (Score:3, Informative)
There are lots of ways to get info back from an interrupt. The simple "standard" way is for the caller to use an IOCTL interface in the driver and then wait on an event. On t
Re:Upgrade now? (Score:2, Informative)
Re:Upgrade now? (Score:2)
Re:Ok expert super genius elite! (Score:2)
2 Install new kernel just like any other.
Jeroen
Re:Ok expert super genius elite! (Score:2)
Re:Ok expert super genius elite! (Score:3, Informative)
Re:Upgrade now? (Score:5, Interesting)
emerge development-sources
cd
make menuconfig
make && make modules_install && cp arch/i386/boot/bzImage
reboot
How hard is that? Are you running a 486 or something? Compiling took under 30 mintes on my 350MHz box.
Re:Upgrade now? (Score:2)
You lost me on step 1:
-bash: emerge: command not found
Oh, silly me, here we go:
Re:Upgrade now? (Score:3, Interesting)
Ahh the joys of a two-stage bootloader.
BTW, I run two entries in GRUB, unik-mpd1 and unik-mpd2, unik-mpd2 is the 'safe' kernel, when I'm happy with 2.6 I'll copy it to unik-mpd2 and run newer kernels in unik-mpd1.
Re:Upgrade now? (Score:4, Interesting)
Re:Upgrade now? (Score:5, Informative)
Err, I'm feeling generous, here: 2.6 input drivers FAQ [theaimsgroup.com] ^_^;
You may be confusing the "USB event subsystem" (of which I'm really not sure you're talking about) with the generic input system.
Re:3rd party modules: kernel tainted (Score:3, Informative)
Re:3rd party modules: kernel tainted (Score:5, Informative)
Re:whats the benefit? (Score:5, Informative)
will it help some more device manufacturers make "drivers" for linux?
New device driver format. Is it good or is it whack?
Basically, the article is explaining that by following certain conventions in the driver code, you allow the kernel a standardized way to load and use the driver.
In other words, if you're going to make third-party Legos, make sure the nubbins on the blocks are the same size and wit the same spacing as the nubbins on Legos, if you want everything to fit together.
The author of the article then inserts a plug for his company's software:
He also explains that in cleaning up driver building for 2.6, somebody forgot that not everybody has write access to a copy of the kernel source, which 2.6 driver building -- whoops -- requires. This is simpler to get around, so long as you've got room for your own writable copy of the kernel source. This will prove annoying for people who build drivers by compiling them on certain *cough* Zaurus *cough* embedded devices (rather than cross-compiling) and who use something like cramfs.
The article then spends a few paragraphs on where the real compatibility problems will be: 2.6 is lot different than 2.4 in a lot of internal processes, so if your driver made assumptions about any of that -- instead of being itself written in a layered way -- you're going to be making a lot of changes.
(Ideally, you should write the driver so that one layer handles communication with linux, one layer handles communication with hardware, and one layer sits between the other two to "translate" and maintain state; this also makes porting the driver -- whether to 2.6 or another operating system altogether, -- far cheaper and easier. Programmer laziness, management short-sightness, or pre-mature optimization may however have driven you to write a monolithic driver.)
Will this help more manufacturers make drivers for linux? Not really. If manufacturers cared about making linux drivers, they'd have already done it for 2.4. If they didn't care to do it for 2.4, they won't care to do it for 2.6.
If you really want more manufacturers to make drivers, you have to do the following: get the phone number for investor relations at the company. Call up and ask them how much market share they've lost by not offering linux drivers, and explain that you're worried about the company's long-term prospects if it continues to ignore this growing market. explain that as a result you're going to be reducing you exposure in the company's stock in favor of their competitors who do offer linux drivers.
(Since most companies are now run by managers whose compensation is based on short-term stock movement, and not long tern company growth, the companies hare increasingly deaf to the needs of customers, but alert to stock speculators and their stock price. Therefore I now recommend calling Investor Relations rather than Customer Relations if you wish to change a company's policies.)
Re:whats the benefit? (Score:4, Funny)
Who cares, that's the usual percentage of posters, who read the articles at all. Can't answer the rest of your reply - lost interest somewhere in the middle of it. I wanted to give you my 2 cents, but discovered that I'm a bit short on money today, sorry.
Re:whats the benefit? (Score:5, Funny)
Re:That's one of Linux' main weaknesses (Score:4, Informative)
As for complicated... having had a look at some windows drivers source code and writting my own linux drivers I can say that it is way easier to write a linux driver than a windows driver. (Even if you have to port it to a new major kernel release every few years)
Jeroen
Re:2.6 woes (Score:2)
Re:Why the license macro? (Score:5, Informative)
1) User loads proprietary module
2) Kernel goes unstable and crashes like hell
3) User responsibly decides to post OOPS and bug report to LKML
4) Kernel devs groan for the 1000th time and explain that they can't test a problem with an opaque driver
The problem is that a black box piece of code is 'tainting' the kernel. If something goes wrong with that code, you're SOL because you can't look inside the black box. Module licensing forces a closed driver to identify itself as such, and then notes that the kernel is tainted in the OOPS, so if you submit an oops like that then the kernel devs will (quite rightly) say "Don't expect us to fix a problem with a proprietary driver, bug the guy who wrote it".
It's mostly a bug tracking thing for the kernel developers in other words, it doesn't really change how the kernel behaves or what you are or aren't allowed to do with it.
Re:Why the license macro? (Score:5, Informative)
But the most important is bug reports. If you load a non open module your kernel gets 'tainted' and this is reported in oopses. If you then send this oops to one of the kernel maintainers they can just ignore you. Since you have a piece of unknown code in use in your system they can't do anything usefull anyway.
Jeroen
Re:Why the license macro? (Score:5, Insightful)
I feel like getting flamed and losing some karma. It's the day after Valentine's anyway, so it's not like I was expecting to be happy anyway.
Why prevent closed source drivers from using certain kernel functions?
Sure, I realize it makes a political point to closed source developers: "your code will remain second-class code until you show us the source", but like a SPEWS blacklist, it does that by annoying innocent third parties in the hopes of getting the third parties to join you in your complaints.
In this case the innocent third parties are the people running linux. So linux users get punished by linux developers for "consorting" with the "enemy's" closed source drivers. Ironically, at the same time, linux is promoted as the OS that allows the user full control over his computer.
If you really believe in the user's right to run his PC as he wishes, let him decide whether or not to buy closed-source hardware.
If you don't, then say so: "I'm giving you the benefit of my code, and I'm not charging for it, but it's not really free, as I expect you to adopt my ideology to use it, and to let me dictate to some degree how you use your PC." That's a valid and defensible stance -- but it's a different stance than is usually professed.
And admit that it's a barrier to wider-spread adoption of linux, and factor it in when asked why more people are not using linux.
Re:Why the license macro? (Score:3, Informative)
Its just a convinient way for developpers to say they don't want anything to do with it.
Jeroen
Re:Why the license macro? (Score:3, Insightful)
That's all very nice, but you are missing the point.
It is most definitely the user's right to run his machine as he pleases, however the user has no right whatsoever to demand that someone else gives up his free time to debug his problems. In the case of a closed-source driver doing unknown things to the kernel, it is the very height of arrogance to demand of a total stranger to reverse engineer your personal hardware setup.
It is not about politics. It is about politeness. One does not ask people to do th
Re:Why the license macro? (Score:4, Funny)
It prevents the kernel maintainers from wasting their time trying to debug a problem that may be caused by a module for which they have no source and no hope of fixing.
Next week on Saturday Night Live:
LINUX USER JIMMY (Played by Horatio Sanz): "I want to use the Yoyodyne USB Blender on my linux box, so I can make margaritas over dial-up SSH!"
KERNEL DEVELOPER (played by Chris Parnell): "If we let the blender driver call kernel_foobar(), it might work flawlessly."
LINUX USER JIMMY: "OK great! Linux r0x0r5!"
KERNEL DEVELOPER (dourly) "But... it some cases, it might fail."
LINUX USER JIMMY: "But it'll usually work? I can't wait to taste those margaritas!"
KERNEL DEVELOPER: "No, Jimmy" (shakes head and sighs) "it will never work, because we don't allow the Yoyodyne driver to call kernel_foobar()." (pause) "It might fail, and we can't allow that to happen. (nods authoritatively, looking Jimmy in the eyes) You understand."
LINUX USER JIMMY: "So I can't make my margaritas if I use linux?"
KERNEL DEVELOPER: "No, Jimmy, you can't. Because we kernel developers know better."
Re:I don't understand (Score:3, Informative)
OpenAFS.
The reason I'm still using 2.4
My only wish is for wish! (Score:3, Informative)
The only reason *I*'m not using 2.6 is that the unified Linux X10 driver (wish) has not been ported to 2.6, and apparently requires significant work. Everyone using Linux in an X10 environment is apparently sorry-out-of-luck at the moment.