Page 1 of 1
Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 2:42 am
by lilzz
http://elinux.org/RPi_Kernel_Compilatio ... nel_source
2. Cross compiling from Linux
Complete script requires raspberrypi.config to be in the same folder that you execute from
I copy that raspberrypi.config script and put into my linux folder
I type make raspberrypi.config however it says nothing to be done.
Re: Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 2:56 am
by ShiftPlusOne
I don't see anything there that says to run "make raspberrypi.config"
Re: Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 3:01 am
by lilzz
ShiftPlusOne wrote:I don't see anything there that says to run "make raspberrypi.config"
then if I copied that raspberry.config what do I do with it other than make? That's the only thing I can do with that .config file right?
Re: Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 3:04 am
by ShiftPlusOne
I am not sure what to say. all of the instructions are on the page you linked. I can only paste the relevant bit.
Code: Select all
cd /Volumes/raspberrypi-kernel/src/linux-rpi-3.6.y/
export CCPREFIX=/opt/local/bin/arm-none-eabi-
make mrproper
cp /Volumes/raspberrypi-kernel/raspberrypi.config .config
#answer yes to all config options
#yes "" | make ARCH=arm CROSS_COMPILE=${CCPREFIX} oldconfig
make ARCH=arm CROSS_COMPILE=${CCPREFIX} -j$cpup1
#make ARCH=arm CROSS_COMPILE=${CCPREFIX} modules -j$cpup1
Re: Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 3:08 am
by lilzz
ShiftPlusOne wrote:I am not sure what to say. all of the instructions are on the page you linked. I can only paste the relevant bit.
Code: Select all
cd /Volumes/raspberrypi-kernel/src/linux-rpi-3.6.y/
export CCPREFIX=/opt/local/bin/arm-none-eabi-
make mrproper
cp /Volumes/raspberrypi-kernel/raspberrypi.config .config
#answer yes to all config options
#yes "" | make ARCH=arm CROSS_COMPILE=${CCPREFIX} oldconfig
make ARCH=arm CROSS_COMPILE=${CCPREFIX} -j$cpup1
#make ARCH=arm CROSS_COMPILE=${CCPREFIX} modules -j$cpup1
So you saying that .config can't run automatically I have to run each instruction at a time on the command line?
Re: Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 3:14 am
by ShiftPlusOne
The config contains information about which features of the kernel to enable, how it's optimized, what CPU it's compiled for and everything necessary to ensure the kernel suits the hardware and purpose it's compiled for. It is not a set of instructions.
I haven't looked too closely at the instructions, but oddly enough, I don't see where it tells you to get the .config from. What are you using as the .config?
Re: Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 5:10 am
by lilzz
ShiftPlusOne wrote:The config contains information about which features of the kernel to enable, how it's optimized, what CPU it's compiled for and everything necessary to ensure the kernel suits the hardware and purpose it's compiled for. It is not a set of instructions.
I haven't looked too closely at the instructions, but oddly enough, I don't see where it tells you to get the .config from. What are you using as the .config?
It said cp raspberry.config .config from that script
Re: Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 5:27 am
by ShiftPlusOne
I got that, I am asking where you got the raspberrypi.config from.
Re: Cross Compiling kernel from MacOS
Posted: Thu Feb 27, 2014 7:49 am
by lilzz
ShiftPlusOne wrote:I got that, I am asking where you got the raspberrypi.config from.
copy and paste from section that page. Just search raspberry.config on that page.
Re: Cross Compiling kernel from MacOS
Posted: Fri Feb 28, 2014 2:54 am
by ShiftPlusOne
Right, that's not how it works. The Mac instructions on that page are atrocious.
This is what you should be using as the .config file:
http://pastebin.com/e3Qk0WhE
When that page says raspberrypi.config it is NOT referring to the script. It simply says that the script expects raspberrypi.config to be present. What it fails to mention is where to get the file from! The instructions are okay if you are already familiar with the process of compiling a kernel, but for beginners, it's junk.
Another problem with those instructions is that they are dated. It will download the 3.6 kernel, although there was a switch to 3.10 a while back.