It sort of depends on the size/capabilities of the system overall I guess. It's certainly not anywhere near as large as 50% for us. CQC is coming up on a million lines of code. The device drivers may make up, I dunno, 50,000 lines altogether, something like that. It can be a little misleading though, because the bulk of our drivers are in CML or PDL, both of which are very much designed to minimize the amount of work required, i.e. they have lots of built in functionality designed to make it easier to write a driver.
But, what device drivers might lack in code bulk, they can certainly make up for in tediousness. Many devices are not well documented, or incorrectly documented, or have bugs, or have many versions over time that are slightly different, or require the driver writer to be practically an expert in the device itself (and how many complex devise can you really be highly knowledgeable about given that you will never actually use them all yourself probably.)
Still, in the grand scheme of things they pale compared to the rest of CQC. You have to remember that CQC isn't written in a high level language, using lots of third party code. We do almost everything ourselves, so that we can control the quality. So it's been a huge effort. We have everything from our own custom build tools, to our own standard object libraries for core stuff (strings, memory buffers, sockets, serial ports, synchronization services, threads, streams, collections, processes, file system, etc...), our own implementations of many technologies (e.g. PNG, ZLib, HTTP, Websockets, Web Server, regular expressions, text transcoding, validating XML parser, JSON, image manipulation, CD ripping, various cryptographic standards, metadata extraction, etc...), we have our own ORB technology and IDL language/compiler which is a huge benefit, our own object oriented language with virtual machine and IDE, we have our own virtual kernel that encapsulates all access to system services so our entire system is built in terms of our own object interfaces, and we have our own entire custom windowing system (we only use the Windows frame window, everything else is ours.) And that's all before CQC itself. CQC is built on that stuff, and is something around half'ish the size of the of the general purpose code base.
Compared to all of that, drivers are tedious and time consuming but not so much of a challenge other than in their bugs and inconsistencies, and having sufficient access to the devices. Far and away the heaviest aspect of CQC itself is the interface viewer and designer system. It's brutally complex, as you could imagine. It's a full bore object oriented, graphical application design system with a very nice graphical designer, with full integration into the product. So it's killed more brain cells than anything other single part of the system.
* I hadn't run the line counter for a while, so I just did it. The C++ code comes out to 962,867 lines of code. If the CML code for drivers was counted, I guess we'd be almost there already, but the line counter doesn't understand CML files, so it can't count them. But, with the CML code, likely it'll hit a million for the upcoming 4.7 release.