Page 1 of 1

The process of Cross-compiling Pi kernel

Posted: Tue Feb 25, 2014 4:10 pm
by lilzz
http://elinux.org/RPi_Kernel_Compilatio ... nel_source


6) Pull the /proc/config.gz from the running Raspbian installation
7)Prime kernel with the old config by running "ARCH=arm CROSS_COMPILE=${CCPREFIX} make oldconfig"
8)Modify the kernel config by either modifying the .config file or using "ARCH=arm CROSS_COMPILE=${CCPREFIX} make menuconfig"
9)Build the new kernel by using "ARCH=arm CROSS_COMPILE=${CCPREFIX} make"

on step 6, I suppose to get the config.gz from another Pi installation and use it as template?
on step 7, how does config.gz becomes old config? Should I unzip the config.gz and rename it .config and put into the source folder?
on Step 9, is that a command line?

Re: The process of Cross-compiling Pi kernel

Posted: Wed Feb 26, 2014 11:54 am
by jdb
6) You can, but beware that if it's from a very old Pi with an older version of the kernel it may not be compatible. You should use one from a similar branch (e.g. 3.6 or 3.10).
7) You should unzip the config.gz. Or just zcat /proc/config.gz > .config
9) Yes.

Re: The process of Cross-compiling Pi kernel

Posted: Wed Feb 26, 2014 4:02 pm
by dom

Code: Select all

make ARCH=arm bcmrpi_defconfig
will use the .config options used when making the released kernel:
https://github.com/raspberrypi/linux/bl ... _defconfig