Compiling a kernel module for jessie on the Beaglebone itself

Trying to compile a module of mine which compiles and works fine on my Ubuntu PC. It is basically just usb-skeleton.c but with the usb VendorID and ProductID changed. Now I want to compile it on my BeagleBone.

I’m running Linux beaglebone 4.1.30-ti-r69 #1 SMP Sun Aug 14 11:23:09 UTC 2016 armv7l GNU/Linux

I’ve downloaded the kernel source via
git clone

I’ve linked the source folder to /lib/modules/4.1.30-ti-r69/build

The build of my module fails because there is no config. I tried to use the .config from my /boot directory…

I copied /boot/config-4.1.30-ti-r69 to linux-stable-rcn-ee/.config

Not sure what to do now. So I did

make oldconfig && make prepare

It asked me a thousand questions which I just hit enter to. Then when it was generating .h files, it failed on timeconst.h:

/bin/sh: 1: bc: not found
Kbuild:67: recipe for target ‘include/generated/timeconst.h’ failed
recipe for target ‘prepare0’ failed

I’m not trying to rebuild the kernel. I would just the module build system to know how to build my module so that I can use it on my BeagleBone.

Thanks for your time.

Hi, I know it’s a ‘little’ later and you probably already did it, but give ‘apt-get install bc’ a try