Headaches whilst upgrading to Raspberry Pi 2

So we’ve been having difficulty getting the underwater fish cam streaming reliably – and now that there is a higher-powered Pi around I thought that I’d try upgrading the basestation of our Aquaponics control system to see if the extra ooomph helps.

But of course, there are new problems – such as our old way of getting kernel headers doesn’t seem to work. Why the foundation have rolled their own kernel and then made it so hard for people to get kernel headers is beyond me, surely they want people to hack on the thing??!! If anyone can explain this please leave a comment – it seems like an obvious gaff, and a longstanding one too. The Pi forums are full of people struggling with this, as they have been since 2012! I just don’t get why they have done this, it makes my life harder and what does it accomplish? Grrrrrr…

Anyway, I’ve been searching and experimenting and I think I’ve got a new way to get the headers, so that we can compile the drivers for various things such as the rfm12b driver. It’s as simple as adding ‘2’ to the install of linux-image-rpi-rpfv and linux-headers-rpi-rpfv to make them linux-image-rpi2-rpfv and linux-headers-rpi2-rpfv.

Also, the new device-tree may cause issues – using the raspi-config utility handles this automagically – see here for an excellent explanation of the issue.

2 Comments

 Add your comment
  1. Hi gareth, totally agree with your grievance. I am a new comer but just went through 3 years of complaints with a variety of solutions. Could you provide exact instructions to solve this on the Pi 2? Do you simply say:

    apt-get install linux-image-rpi2-rpfv
    apt-get install linux-headers-rpi2-rpfv

    Or do you also append the boot/.config? And does this return the latest module?

    Thanks!

    • Hello Atro, thanks for the comment – nice to feel that I’m not alone in my grievance!!

      Yes, you have to do both the apt-get (or aptitude) install AND the appending in /boot/config.txt.

      Basically the apt-get stage downloads the new kernel and matching headers, then they are ready in /boot as alternatives to the ones in use at the moment. You might see errors in the apt installation referring to ‘unable to make hard links’ or something like that. I think maybe that’s why we have to edit /boot/config.txt ourselves?

      It’s the entries in /boot/config.txt that allow a non-default kernel name. See here for a good guide to these.

      You can edit it with a text editor if you like or just paste the command provided, either way you should get the new (i.e. older. rpi2-rpfv) kernel on reboot. Do a ‘uname -r’ on reboot to check.

      If you’ve made a typo or somehow the right files aren’t in /boot then the raspberry pi will not boot. I pull the card and edit it on another computer in this case. Hope this helps!!

Leave a Comment

Your email address will not be published.

+ 30 = 40

1 Trackback

  1. RFM12B linking a JeeNode Micro with a Raspberry Pi - layer zero labs (Pingback)