Skip to main content

Digging in deeper with Ubuntu 7.04

I spent part of the weekend migrating the Qt-based qconf, used to help configure the kernel, from Qt3 to Qt4. A screen shot of the final result is below.


The move from Qt3 to Qt4 started when I tried to build the 2.6.20.3 kernel on SLED 10, and I attempted to run 'make xconfig'. I'd already downloaded and built Qt 4.2.3 and I wanted to use it instead of Qt 3. I knew that Qt 4.2.2 was available to Ubuntu 7.04, and a version of Qt 4.2.1 is also available as part of Open Suse 10.2. With KDE 4 to be released sometime later this year and based on Qt4, I thought it might be a good idea to get a feel for how to port an application from Qt3 to Qt4. The astute reader will note that I performed this on Ubuntu, which is Gnome based. Why not just execute 'make gconfig' and use the Gnome-based configuration tool? To be different, I guess.

Observations
  • As mentioned earlier, Ubuntu 7.04 repositories now have Qt 4.2.3.
  • I installed and used KDBG to help debug some of the core dumps being produced while I was doing the migration.
  • I pretty much followed the directions for porting from Qt3 to Qt4. My greatest challenge was modifying the Makefile in scripts/kconfig so that it would properly compile and link the binary qconf.
  • A spanner thrown into the mix was the use of g++ 4.1.2. G++ would not compile some of the coding idioms in the Qt3 sources. Nothing major, but they needed to be cleaned up.
  • The Trolltech porting tool qt3to4 did not catch everything that needed to be converted to use the Qt3 support packaged. Specifically it did not modify QAction to Q3Action. I had to discover this after qt3to4 had finished and I started to compile the modified sources.
  • The number '0' (zero) is not a good value for an argument that is passed by reference. Specifically, 'Q3ListViewItem::setPixmap (int column, const QPixmap & pm)' core dumps when '0' is passed as the second argument under Qt4 and using the Qt3 support libraries. It works for plain old Qt3, simply because it's been in there since the beginning. I simply fixed the problem by adding 'QPixmap nullPixmap;' to the class definition, and passing nullPixmap as the second argument.
  • As you can see from the screen shot, qconf has a strong Gnome look-and-feel. Qt4 is supposed to better integrate with Gnome, along with Java 6u1. From my experiences with Qt4 and Java 6u1 on this version of Ubuntu, I'd have to say that Trolltech and Sun are pretty close to realizing that goal. Development of graphical applications on Linux in general and Ubuntu in particular is growing richer and deeper at an ever accelerating rate.
I've been in email contact with the original author of qconf, Roman Zippel. Roman did all the heavy lifting with the creation of qconf. All I've done so far is a minor migration. As soon as I get some of my 'fixes' better organized I'll send him the diffs as patches and let him decide if he wants to add it to the original sources.

One of the reasons I wanted to move to Qt4 is because I've got some ideas of my own about enhancing qconf. Before I do that I want to move completely to Qt4, removing all Qt3 support classes and libraries, making qconf a fully native Qt4 application.

Finally

The acid test came when I configured kernel 2.16.20.3 with my version of qconf, built it, and rebooted Ubuntu 7.04 Alpha 5+ with my kernel. It's not the first time I've tuned and built a kernel for this box. It is the first time I've used mkinitramfs instead of mkinitrd to create my initrd image. But everything built and worked and right now my Ubuntu system is running on top of the kernel I tweaked and built. It was a lot of fun and satisfying when it all worked.

Comments

Popular posts from this blog

cat-in-a-box channels greta garbo

So I'm sitting at my computer, when I start to notice a racket in back. I ignore it for a while until I hear a load "thump!", as if something had been dropped on the floor, followed by a lot of loud rattling. I turn around and see Lucy in the box just having a grand old time, rolling around and rattling that box a good one. I grab the GX1 and snap a few shots before she notices me and the camera, then leaps out and back into her chair (which used to be my chair before she decided it was her chair).

Just like caring for Katie my black Lab taught me about dogs, caring for Lucy is teaching me about cats. She finds me fascinating, as I do her. And she expresses great affection and love toward me without coaxing. I try to return the affection and love, but she is a cat, and she takes a bat at me on occasion, although I think that's just her being playful. She always has her claws in when she does that.

She sits next to me during the evening in her chair while I sit in mi…

vm networking problem fixed

Over the weekend I upgraded to Windows 8.1, then discovered that networking for the virtual machines wouldn't work. Then I tried something incredibly simple and fixed the problem.

Checking the system I noticed that three VMware Windows services weren't running; VMnetDHCP, VMUSBArbService, and VMwareNatService. VMware Player allows you to install, remove, or fix an existing installation. I chose to try fixing the installation, and that fixed the problem. The services were re-installed/restarted, and the virtual machines had networking again.

Once network connectivity was established there was exactly one updated file for Ubuntu 13.10, a data file. This underscores how solid and finished the release was this time. Every other version of every other Linux installation I've ever dealt with has always been succeeded by boatloads of updates after the initial installation. But not this time.

Everything is working properly on my notebook. All's right with the world.

sony's pivotal mirrorless move

I'm a died-in-the-wool technologist, even when it comes to photography. I have always been fascinated with the technology that goes into manufacturing any camera, from the lenses (optics) through the mechanical construction, the electronics involved, and especially the chemistry of the film and the sophistication of the digital sensor. It's amazing that the camera can do all it's asked of it, regardless of manufacturer.

Of all the types of cameras that I've really taken an interest in, contemporary mirrorless (again, regardless of manufacturer) are the most interesting because of the challenging problems the scientists and engineers have had to solve in order to build a compact but highly functional camera. In particular I've followed the sensor advances over the years and watched image quality climb (especially with μ4:3rds) to exceed film and rival one another such that there's very little difference any more as you move from the smaller sensors such as 4:3r…