Tuesday, February 14, 2006

Compiled at last, Hallelujah!

I've been fighting with the Fedora kernel compiles under Linux 2.6 for a couple of months now. For a while I had it, no problem! Then I didn't have it, big problem. Now I have it again. I think what happened is that I had a .rpmmacro file that messed things up. With it the kernel was put willy-nilly about the /usr/src subdirectories. Without it things went back where they belonged.

So how do you compile the kernel? Like this:

  • export VERSION=2.6.15
  • export EXTRA=1.1831_FC4
  • wget ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/updates/4/SRPMS/kernel-${VERSION}-${EXTRA}.src.rpm
  • rpm -ihv ~/kernel-${VERSION}-${EXTRA}.src.rpm
  • cd /usr/src/redhat/SPECS
  • rpmbuild -bp --target=i686 kernel-2.6.spec
  • cd ../BUILD/kernel-${VERSION}/linux-${VERSION}/
  • cp config/kernel-2.6.15-i686.config .config
  • make xconfig
  • make rpm
  • cd /usr/src/redhat/RPMS/i386/
  • rpm -ivh kernel-${VERSION}prep-1.i386.rpm
  • cd /boot
  • mkinitrd initrd-${VERSION}-prep.img ${VERSION}-prep

After that make sure that /boot/grub/grub.conf has an entry for your new kernel. Something like this:

title Fedora Core (2.6.15-1.1831_FC4 custom)
  root (hd0,0)
  kernel /vmlinuz-2.6.15-prep ro root=LABEL=/ rhgb quiet
  initrd /initrd-2.6.15-prep.img 

My machine has a Athlon 64 bit processor (but I'm using it in 32 bit mode for now) so that's why I selected the i686 target. I selected the correct bits for the xconfig such as the Moxa Serial Ports board. In addition, once the kernel compiled correctly I was able to properly compile the Lirc package. I can now send and receive IR with no problems (at least to my stereo system). I hope to add the controls for my VCR and TIVO to the mix. Things are looking up!

2 Comments:

At 3/24/2006 12:35 AM, Anonymous Anonymous said...

Hi, Really love your blog. I love home automation. I am a professional mac programmer. I have Indigo and the Powerlinc 1132CU. I would love to write my own software to "talk" to the 1132CU. Do have any information on where I can find sample code (in any language) to get started.

 
At 3/24/2006 10:58 AM, Blogger Neil Cherry said...

You've caught me at a bad time, I'm in the middle of a system restore (hard drive failure). Try looking at the www.linuxha.com site under the Wish project. They have stuff for the 1132 and I would expect that the CU would be a super set (they may support it directly).

 

Post a Comment

<< Home