lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

The process of Cross-compiling Pi kernel

Tue Feb 25, 2014 4:10 pm

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?

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2393
Joined: Thu Jul 11, 2013 2:37 pm

Re: The process of Cross-compiling Pi kernel

Wed Feb 26, 2014 11:54 am

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.
Rockets are loud.
https://astro-pi.org

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5537
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: The process of Cross-compiling Pi kernel

Wed Feb 26, 2014 4:02 pm

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

Return to “General discussion”