Raspbian kernel sources/headers

I (obviously) have not done any digging around on this yet. Still, I had assumed that Raspbian (being Debian) would have full kernel sources available via some channel(s). But after seeing mention of the lack thereof in a different thread. I now need to ask: Are kernel mods diffficult/impossible to make/maintain under Raspbian?

I've toyed with kernel mods, etc in other distros (ie RH, Ubuntu, Debian, Mandrake, SUSe, etc) on i386. But have ZERO experience on ARM7/Raspbian.

I'm wondering about patching Jessie's 4.1 kernel with the RTAI RT microkernel- although they currently only support up to kernel 3.8.xx. I would love to have a deterministic RT thread to schedule my robot's functions under.

Also anybody know - have the low latency/rt preempt patches been migrated to anything other than i386? Might they be available as config options for the Raspbian Jessie kernel?

Thanks!
'sig

piborg's picture

Getting the exact source for the current kernel version can be tricky as it does not appear to be labelled well in the repository.
Building your own copy from the latest source should be easy enough though:
https://www.raspberrypi.org/documentation/linux/kernel/building.md

What you could do is patch the newest source version for 3.8.X instead by using its branch:
https://github.com/raspberrypi/linux/tree/rpi-3.8.y
Alternatively you could try and patch the 4.1 kernel and see how much needs to be fixed to make it work.
You may find there is not much that needs changing, or it could be a large task.

sigpaw@hotmail.com's picture

Once again, excellent links, super fast response times. You people are AMAZING. I think I need to purchase more goodies to help "support the support". ;-) Definitely need another UltraBorg - hopefully the heavy servos will show up soon.

I'll give applying the RTAL 3.8 patch to 4.1 a go and see what falls out. I used to help maintain and update patches for the NMT branch of this same micro-kernel. Although I may be a bit rusty - as I was working with 2.4 and 2.6 kernels. :-o

Further, although well versed in i386 assembler. On ARM7 - not so much.

Cut my teeth on the likes of 6800, 8080, Z80, 8088, 6502, 6809. 68010, PDP11 and the like. So hopefully similar in many ways? Do the ARMs follow more along Motorola format or Intel (ie register order, mnemonics, endianess, etc)?

Cheers!
'siggy

piborg's picture

The ARM chips are very much a different kettle of fish, they have their own instruction set et cetera.
They default to little-endian, but I believe they are generally bi-endian these days (the last one I worked with
was).

I think they have more in common with Motorola behaviour, but not enough to rely on it.
From memory ARM is actually very well supported in the Linux community.

The ARM architecture page on Wikipedia has a fair amount of detail on the subject:
https://en.wikipedia.org/wiki/ARM_architecture#32-bit_architecture

There is a cheat-sheet for the assembly instrcutions here:
http://users.ece.utexas.edu/~valvano/Volume1/QuickReferenceCard.pdf

sigpaw@hotmail.com's picture

Hmmmmm, it almost feels DEC-ish. And since Motorola (at least early on) "complimented" the DEC architecture in many ways...

One thing missing are the many BR variants. But the IF ... THEN is a unique/welcome touch.

Gosh brings back many fond memories from the 80's. :-)

Now if I could just "re-discover" the drive/energy I had in my 20's. LOL

Subscribe to Comments for "Raspbian kernel sources/headers"