marmrk
Posts: 16
Joined: Fri May 25, 2012 6:29 pm

Building linux kernel for RPi

Sat May 26, 2012 4:16 pm

Hi,

I would need to recompile linux kernel because the kernel should be compiled with pppoe module and with ppp filter enabled in order to support PPPoE on RPi.

I've downloaded linux kernel from linux hub (version 3.1.9) and I've took config file from /proc/config.gz. In this config file, I've changed 2 lines:
CONFIG_PPPOE=m
CONFIG_PPP_FILTER=y

After that I've run make to build the kernel, but certain properties was not set in config file and I did not which values to provide during build process.

Are there any instructions how to build linux kernel for RPi?

Thanks


User avatar
soslug
Posts: 43
Joined: Mon May 21, 2012 12:31 pm
Location: Southend on Sea

Re: Building linux kernel for RPi

Sat May 26, 2012 4:35 pm

Hi,

I am not sure this will help you but I can run through the basics.

If you are compiling on Linux and lets assume it is some Ubuntu version you need the following installed, open a new console and type this:-.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential

....After you have downloaded the kernel image you need to build change to that directory using cd (directory path) for example.

cd linux_kernel

Once you have changed to this directory and you have edited the file that retains the config option for the kernel, run the following command

make clean
./configure (you may need to add the system architecture as an option)
make
sudo make dep
sudo make install

I think you might also need to build bZimage I seem to remeber

make bZimage

I haven't built any kernels for a good long while so out of practice I am pretty sure it's something like that, however after you have made a configuration change remember to do a

make clean

Before any new build.

I hope this helps
IPFreely, to weed the network demons that dwell in them their Windows!

marmrk
Posts: 16
Joined: Fri May 25, 2012 6:29 pm

Re: Building linux kernel for RPi

Sat May 26, 2012 4:56 pm

Thanks, soslug! I will post here if I encounter some problems.

xleon
Posts: 9
Joined: Mon Jun 04, 2012 11:37 am

Re: Building linux kernel for RPi

Wed Jun 06, 2012 2:05 am

marmrk, if you have any tips from doing this, or issues encountered do please post back as it's looking like I may have to do a similar compile.

xleon
Posts: 9
Joined: Mon Jun 04, 2012 11:37 am

Re: Building linux kernel for RPi

Fri Jun 08, 2012 2:59 pm

OK, so I've done the same thing on Ubuntu and cross-compiled. A number of stumbling blocks but all done. Only issue is, with the new kernel, the Pi starts up with a rainbow screen and doesn't do anything else!! Putting original kernel back is fine.

I took the original config file from the Pi and only made a few tweaks, now fails to boot :-)

Off to do it again I guess, unless someone has a working config.gz (I'm trying to make it fairly minimal
for quick booting)?

Return to “Beginners”