Difference between revisions of "Rpi kernel compilation"

From eLinux.org
Jump to: navigation, search
(compiling)
(Transferred to RPi Kernel Compilation, intentionally blanking and redirecting)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Raspberry PI kernel compilation =
+
#REDIRECT [[RPi Kernel Compilation]]
 
+
You can compile the kernel on the board itself, but you can also cross compile on a standard Linux machine (or maybe even on Windows machines?) .
+
 
+
The following documents my attempts at compiling the raspberry pi kernel.
+
 
+
== cross compiling ==
+
 
+
=== getting the compiler ===
+
 
+
On Ubuntu Oneiric getting the arm cross compiler can be as easy as:
+
 
+
sudo apt-get install gcc-4.6-arm-linux-gnueabi
+
 
+
(TODO: Is this the right one? More packages required? I did this a while ago! TODO: Other distributions?)
+
 
+
=== getting the sources ===
+
 
+
 
+
====  using git ====
+
create a directory where you can work on  the raspberry pi software. I called mine "raspberrypi". Then clone the git repository.
+
 
+
mkdir raspberrypi
+
cd raspberrypi
+
git clone https://github.com/raspberrypi/linux.git
+
cd linux
+
 
+
==== using the patch ====
+
 
+
TODO: write this.
+
 
+
 
+
=== compiling ===
+
 
+
Next you have to configure the kernel:
+
cp arch/arm/configs/bcmrpi_cutdown_defconfig .config
+
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- oldconfig
+
 
+
Then building the kernel:
+
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k
+
 
+
You can use the "-j" flag to improve compilation time. If you have a dual core machine you can use "-j 3", for a quad core machine you can use "-j 6", and so on.
+
 
+
== on the Raspberry pi itself ==
+
 
+
Get the sources just like above.
+
 
+
TODO: write the rest of this section.
+

Latest revision as of 20:28, 28 January 2012