jancona
Posts: 10
Joined: Tue Oct 23, 2012 4:43 pm

Kernel Packaging

Mon Dec 17, 2012 6:43 pm

Are there any plans to package Raspbian kernels using the normal Debian mechanisms to make it easier build stuff that includes kernel modules and so that things like DKMS work?

I've been following the procedure here (thanks, shig!) to build kernel modules, but it would be quite a bit simpler to just be able to just install the proper kernel header or source packages.

I've been experimenting with using make-kpkg to build my own. If I get it to work, I can post a link here if there's interest.

Jim

plugwash
Forum Moderator
Forum Moderator
Posts: 3611
Joined: Wed Dec 28, 2011 11:45 pm

Re: Kernel Packaging

Tue Dec 18, 2012 1:19 pm

I actually started modifying the debian kernel packaging (not using make-kpgk which afaict is intended for people who want to build local kernels) to produce a rpi kernel image. The build process worked fine after some beating. However I abandoned the effort because the kernel patches for 3.2.x available at that time (this was when the foundation was still on 3.1.9) were unusablly crash prone and the authors of the patches failed to provide any help in getting them sorted out. The results of that effort are still in the raspbian repository but IIRC they no longer boot with current firmware.

I have been thinking I should restart the effort now the foundation is on kernel 3.2 but two things have stopped me.

Firstly there always seems to be something more important to do.

Secondly the relationship between kernel, firmware and videocore libraries needs to be sorted out. Putting the kernel and firmware in the same package like the foundation do currently is IMO not a reasonable long term option. IMO the foundation need to commit to a sane versioning scheme for those interfaces and then split their packages. Once this is done kernel packages based on the debian infrastructure can then be made to drop in and in the long term hopefully the foundation kernel can be phased out. However to move forward on this requires discussion with the relavent people in the raspberry pi foundation and they are very difficult to get hold of. friggle/asb used to be fairly easy to get hold of on IRC but I haven't managed to speak to him for literally months.

chrisw2
Posts: 106
Joined: Sat Apr 07, 2012 11:22 am
Location: Manchester, UK

Re: Kernel Packaging

Tue Dec 18, 2012 8:42 pm

Plugwash,

That is a real shame. I would have thought "the relevant people in the raspberry pi foundation" would be beating at your door.

Perhaps they think a raspberry pi specific front end to apt (aka "The Pi Store") is more important (maybe that'll get some attention for you!)

jancona
Posts: 10
Joined: Tue Oct 23, 2012 4:43 pm

Re: Kernel Packaging

Wed Dec 26, 2012 3:58 am

So, after messing with make-kpkg for too long, I finally managed to build a usable linux-headers package using make deb-pkg target in to the kernel build system. I modified the builddeb script that does most of the work to:
  • Add some missing headers files to the package
  • Create a /lib/modules/$version/build symbolic link on install
With this I've been able to install a package that uses DKMS to build a driver. The modified code is at https://github.com/raspberrypi/linux.

If you'd like to test it, you can download the package from http://repo.anconafamily.com/repos/apt/ ... _armhf.deb, then install it using dpkg.

Alternatively, you could add my repo to your system then install using aptitude or apt-get:

Code: Select all

sudo wget -O /etc/apt/sources.list.d/jim-raspbian.list http://repo.anconafamily.com/repos/apt/raspbian/jim-raspbian.list
wget -O - http://anconafamily.com/repos/apt/raspbian/jim-raspbian.gpg.key | sudo apt-key add -
sudo aptitude update
sudo aptitude install linux-headers-3.2.27+
If you give it a try, feel free to report any issues you run into here or at Github. I'd also be interested to hear if you find this useful.

DIYKiwi
Posts: 18
Joined: Wed Dec 19, 2012 10:33 pm

Re: Kernel Packaging

Thu Dec 27, 2012 11:45 pm

Thanks for these instructions & links.

I successfully downloaded (via dial-up!) & installed the kernel headers using dpkg -i

This was part of trying to get a usb dial-up modem working on the RPI (see forum). However, the modem driver I have is for i386, not for the armv6 of the RPI, so it hasn't worked!
But I appreciate these forum topics & sharing :)

jancona
Posts: 10
Joined: Tue Oct 23, 2012 4:43 pm

Re: Kernel Packaging

Wed Jan 09, 2013 3:07 am

A followup to note that I've built headers for the 3.6.11+ kernel and they're available from the same location. Just substitute linux-headers-3.6.11+ for linux-headers-3.2.27+ in the directions above.

dunsey
Posts: 1
Joined: Wed Jan 16, 2013 7:04 am

Re: Kernel Packaging

Thu Jan 17, 2013 6:24 am

Thank you for the Linux Headers. All seemed to work for me and the 'no directory' or 'no rules to make module' were no longer present when "make" command was issued.
Unfortunately my goal of building driver module for ezcap DVB-T FM DAB, RTL2823u was not successfull due to errors of type ' long integer expected' and others. I assume these mean there is some incompatibility with Raspbian.
I was successful in building these drivers and using this usb TV tuner on a laptop running Debian 2.6.... .
Dunsey

chrisw2
Posts: 106
Joined: Sat Apr 07, 2012 11:22 am
Location: Manchester, UK

Re: Kernel Packaging

Fri Jan 18, 2013 12:14 am

You might be interested in the info about kernel 3.2.0 + headers in the raspbian repo.

in this thread: http://www.raspberrypi.org/phpBB3/viewt ... 66&t=18727
See 3rd post (and 8th post contains a tip on getting it to work)

I've been running with this for a few days now with no problems.

jancona
Posts: 10
Joined: Tue Oct 23, 2012 4:43 pm

Re: Kernel Packaging

Wed Jan 30, 2013 6:05 pm

For anyone finding this thread, your best option is probably to install the new kernel and headers from the official repos that chrisw2 refers to above.

Here's the link again: http://www.raspberrypi.org/phpBB3/viewt ... 27#p259342

Return to “Raspberry Pi OS”