pi-kernel
-
Upload
kkdddennis -
Category
Documents
-
view
213 -
download
0
Transcript of pi-kernel
-
7/30/2019 pi-kernel
1/9
3This worked for me.
TutorialsAndroidArduino
IOIOUbuntuKinectRaspberry PiGithubContact
search this site...
Home Raspberry Pi Raspberry Pi Kernel Compile
Raspberry Pi Kernel Compile
Posted by michael on Jun 8, 2012 in Raspberry Pi, Tutorials, Ubuntu | 12 comments
This tutorial will demonstrate how to cross compile the kernelfor the Raspberry Pi on Ubuntu 12.04 LTS. The kernel is functional with both theDebian and Arch Linux Raspberry Pi images. First, install the package dependencies,git and the cross-compilation toolchain:
sudo apt-get install git-core gcc-4.6-arm-linux-gnueabi
Create a symlink for the cross compiler:
sudo ln -s /usr/bin/arm-linux-gnueabi-gcc-4.6 /usr/bin/arm-linux-gnueabi-gcc
Make a directory for the sources and tools, then clone them with git:
mkdir raspberrypicd raspberrypigit clone https://github.com/raspberrypi/tools.gitgit clone https://github.com/raspberrypi/linux.gitcd linux
Generate the .config file from the pre-packaged raspberry pi one:
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-bcmrpi_cutdown_defconfig
If you want to make changes to the configuration, run make menuconfig (optional):
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c
9 01/07/2013 08
-
7/30/2019 pi-kernel
2/9
Share this:
menuconfig
Once you have made the desired changes, save and exit the menuconfig screen. Nowwe are ready to start the build. You can speed up the compilation process by enablingparallel make with the -j flag. The recommended use is processor cores + 1, e.g. 5 ifyou have a quad core processor:
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -k -j5
Assuming the compilation was sucessful, create a directory for the modules:
mkdir ../modules
Then compile and install the loadable modules to the temp directory:
make modules_install ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- INSTALL_MOD_PATH=../modules/
Now we need to use imagetool-uncompressed.py from the tools repo to get the kernelready for the Pi.
cd ../tools/mkimage/./imagetool-uncompressed.py ../../linux/arch/arm/boot/Image
This creates a kernel.img in the current directory. Plug in the SD card of the existingDebian image that you wish to install the new kernel on. Delete the existingkernel.img and replace it with the new one, substituting boot-partition-uuid with theidentifier of the partion as it is mounted in Ubuntu.
sudo rm /media/boot-partition-uuid/kernel.imgsudo mv kernel.img /media/boot-partition-uuid/
Next, remove the existing /lib/modules and lib/firmware directories, substitutingrootfs-partition-uuid with the identifier of the root filesystem partion mounted inUbuntu.
sudo rm -rf /media/rootfs-partition-uuid/lib/modules/sudo rm -rf /media/rootfs-partition-uuid/lib/firmware/
Go to the destination directory of the previous make modules_install, and copy thenew modules and firmware in their place:
cd ../../modules/sudo cp -a lib/modules/ /media/rootfs-partition-uuid/lib/sudo cp -a lib/firmware/ /media/rootfs-partition-uuid/lib/sync
Thats it! Exject the SD card, and boot the new kernel on the Raspberry Pi!
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c
9 01/07/2013 08
-
7/30/2019 pi-kernel
3/9
12 Comments
snakeJune 16, 2012
if you copt the boot directory from the firmware github onto the sdcard bootpartition, you can just copy the kernel image arch/arm/boot/bzImage tosdcard/boot_partitiion/kernel.img it will work straight away.
reply
michaelJune 16, 2012
Thanks for the tip snake!
reply
1.
sokkaajJune 18, 2012
What is the modification youre talking about on the external USB rootfs page?
reply
michaelJune 22, 2012
The modification allows you to move the root filesystem (ie /) from the SD
card to a USB drive. I have several USB drives in excess of 16GB, but only a4GB SD card. Moving / to the USB drive gives me much more space.
reply
2.
iqzer0++July 14, 2012
is there any way to change the root password ?
3.
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c
9 01/07/2013 08
-
7/30/2019 pi-kernel
4/9
reply
KoenkkAugust 4, 2012
sudo passwd root
reply
Ludolf KolligsAugust 14, 2012
Moin dear Michel and interrogators!Thank You for detailed instruction which I was looking for since I found no directADSL connection over PPPoE provided for on RP.
Perhaps some more advice available in this direction?Greetings from Hamburg, North Germany!Ludolf
reply
michaelAugust 17, 2012
Hi Ludolf,It looks like PPP is supported by default, but PPPoE is not. For kernelsupport, you will need to enable the PPPoE module. In the .config file,change:# CONFIG_PPPOE is not set
toCONFIG_PPPOE=m
Then you should be able to follow the official Debian instructions toconfigure PPPoE here:http://wiki.debian.org/PPPoE
reply
4.
smithOctober 26, 2012
hey, ive followed all the steps above and the new kernel runs, but a cant loadmodules and getting Exec format error after modprobe
reply
5.
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c
9 01/07/2013 08
-
7/30/2019 pi-kernel
5/9
ZiaNovember 5, 2012
Hey ,
All steps are very clear to me. I successfully built the kernel and run on theboard. but it fails to load any module as even mouse and keyboard attached toboard stop responding. Please guide me through thisThanks.
Zia
reply
6.
Sb
December 19, 2012
make modules_install ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-INSTALL_MOD_PATH=../modules/
should be
make modules_install ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-gcc-4.6 INSTALL_MOD_PATH=../modules/
reply
Brian H WilsonJanuary 2, 2013
Thanks, worked first try for me! I needed to build a kernel to use aDisplaylink monitor.
reply
7.
Trackbacks/Pingbacks
Raspberry Pi Root FS on USB Drive | MitchTech - [...] This tutorial willdemonstrate how to install the Debian root filestem (ie. /) on a USB driveinstead of ...
1.
Compile Kernel on CentOS/RHEL for Raspberry Pi at - [...]http://mitchtech.net/raspberry-pi-kernel-compile/ [...]
2.
Raspberry PI and AOC e1649Fwu USB powered LED monitor imkiyoung - [...]Follow instructions in http://mitchtech.net/raspberry-pi-kernel-compile/ [...]
3.
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c
9 01/07/2013 08
-
7/30/2019 pi-kernel
6/9
Leave a Reply
Connect
Categories
ADB Microbridge
Android + Arduino + USB Host + Temperature + LightAndroid + Arduino + USB Host + Pan Tilt LEDsAndroid + Arduino + USB Host + Serial 4 digit LEDAndroid + Arduino + USB Host + Swivel Head Android with LEDsAndroid + Arduino + USB Host + Combination LockAndroid + Arduino + USB Host + D-PadAndroid + Arduino + USB Host + Dual Analog InputAndroid + Arduino + USB Host + Sensor GraphAndroid + Arduino + USB Host + Simple Analog InputAndroid + Arduino + USB Host + Simple Analog OutputAndroid + Arduino + USB Host + Simple Digital InputAndroid + Arduino + USB Host + Simple Digital Output
Android
VNC setup on Raspberry Pi from AndroidCompile Cyanogenmod 9 for Galaxy NexusAndroid + BackTrack ChrootAndroid + Linux Chroot + Common ProblemsAndroid + Linux Chroot + Node.jsAndroid + Ubuntu ChrootAndroid + IOIO + Remote OutletsAndroid + IOIO + Window Blinds ControlAndroid + IOIO + Garage DoorAndroid + IOIO + Laser Turret
Android + IOIO + Laser TripwireAndroid + Arduino + USB Host + Temperature + LightAndroid + Arduino + USB Host + Pan Tilt LEDsAndroid + Arduino + USB Host + Serial 4 digit LEDAndroid + Arduino + USB Host + Swivel Head Android with LEDsAndroid + Arduino + USB Host + Combination LockAndroid + Arduino + USB Host + D-PadAndroid + Arduino + USB Host + Dual Analog InputAndroid + Arduino + USB Host + Sensor GraphAndroid + IOIO + Temperature + Light
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c
9 01/07/2013 08
-
7/30/2019 pi-kernel
7/9
Android + IOIO + Countdown TimerAndroid + IOIO + Range FinderAndroid + IOIO + BreathalyzerAndroid + IOIO + Accelerometer ServosAndroid + IOIO + Combination LockAndroid + IOIO + Software Joystick ServosAndroid + IOIO + Seven Segment LEDAndroid + IOIO + Sensor Graph
Android + IOIO + Servo ControlAndroid + IOIO + D-PadAndroid + IOIO + Dual Analog InputAndroid + IOIO + Simple Analog InputAndroid + IOIO + Simple Analog OutputAndroid + IOIO + Simple Digital InputAndroid + IOIO + Simple Digital OutputAndroid + Arduino + USB Host + Simple Analog InputAndroid + Arduino + USB Host + Simple Analog OutputAndroid + Arduino + USB Host + Simple Digital InputAndroid + Arduino + USB Host + Simple Digital Output
Android Linux Chroot
Android + BackTrack ChrootAndroid + Linux Chroot + Common ProblemsAndroid + Linux Chroot + Node.jsAndroid + Ubuntu Chroot
Arduino
Raspberry Pi + Arduino + SPIArduino Poor Man's OscilloscopeArduino Physical CPU GaugesArduino USB HID KeyboardArduino on Raspberry PiAndroid + Arduino + USB Host + Temperature + LightAndroid + Arduino + USB Host + Pan Tilt LEDsAndroid + Arduino + USB Host + Serial 4 digit LEDAndroid + Arduino + USB Host + Swivel Head Android with LEDsAndroid + Arduino + USB Host + Combination LockAndroid + Arduino + USB Host + D-Pad
Android + Arduino + USB Host + Dual Analog InputAndroid + Arduino + USB Host + Sensor GraphAndroid + Arduino + USB Host + Simple Analog InputAndroid + Arduino + USB Host + Simple Analog OutputAndroid + Arduino + USB Host + Simple Digital InputAndroid + Arduino + USB Host + Simple Digital Output
IOIO
Android + IOIO + Remote Outlets
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c
9 01/07/2013 08
-
7/30/2019 pi-kernel
8/9
Android + IOIO + Window Blinds ControlAndroid + IOIO + Garage DoorAndroid + IOIO + Laser TurretAndroid + IOIO + Laser TripwireAndroid + IOIO + Temperature + LightAndroid + IOIO + Countdown TimerAndroid + IOIO + Range FinderAndroid + IOIO + Breathalyzer
Android + IOIO + Accelerometer ServosAndroid + IOIO + Combination LockAndroid + IOIO + Software Joystick ServosAndroid + IOIO + Seven Segment LEDAndroid + IOIO + Sensor GraphAndroid + IOIO + Servo ControlAndroid + IOIO + D-PadAndroid + IOIO + Dual Analog InputAndroid + IOIO + Simple Analog InputAndroid + IOIO + Simple Analog OutputAndroid + IOIO + Simple Digital Input
Android + IOIO + Simple Digital Output
Kinect
Ubuntu + Kinect + OpenNI + PrimeSenseUbuntu + OpenKinect + Mouse ControlUbuntu + OpenKinect
MSP430 Launchpad
Raspberry Pi + MSP430 + SPIMSP430 Launchpad + PWMCross-Compiling for TI MSP430 Launchpad
Raspberry Pi
Easily connect Raspberry Pi to Gmail, Facebook, Twitter & more!Raspberry Pi + MSP430 + SPIRaspberry Pi + Arduino + SPIDropbox on Raspberry Pi via SSHFSPeer Guardian on Raspberry Pi
Raspberry Pi Physical Gmail NotifierArduino on Raspberry PiRaspberry Pi NES EmulatorRaspberry Pi + OpenCVRaspberry Pi Root FS on USB DriveRaspberry Pi Kernel CompileWordpress on Raspberry PiRaspberry Pi + ApacheEasy GUI Install & Re-Partition Raspberry Pi on UbuntuRalink/Realtek Wireless Dongle (rt3070) on the Raspberry Pi
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c
9 01/07/2013 08
-
7/30/2019 pi-kernel
9/9
Raspberry Pi AudioInstall Quake 3 on Raspberry PiVNC setup on Raspberry Pi from AndroidVNC setup on Raspberry Pi from Ubuntu
Ubuntu
Arduino Physical CPU GaugesArduino USB HID KeyboardRaspberry Pi Kernel CompileVNC setup on Raspberry Pi from UbuntuCommon Kernel Errors & Debugging TipsCompile Linux Kernel on Ubuntu 12.04 LTS (Detailed)Compile Linux Kernel on Ubuntu 12.04 LTSCompile Cyanogenmod 9 for Galaxy NexusOpenCV + PythonOpenCV + UbuntuGoogle Earth + Mult-axis Controller
Ubuntu + Kinect + OpenNI + PrimeSenseUbuntu + OpenKinect + Mouse ControlUbuntu + OpenKinect
Recent Posts
Easily connect Raspberry Pi to Gmail, Facebook, Twitter & more!Raspberry Pi + MSP430 + SPIRaspberry Pi + Arduino + SPIArduino Poor Mans OscilloscopeDropbox on Raspberry Pi via SSHFS
Supporters
#INCLUDE STD_DISCLAIMER
Always excercise caution when working with electronics. All software is provided onan "as is" basis without warranty of any kind, express or implied. Unless otherwise
noted, all code content is licensed under theApache 2.0 license
Designed by Elegant Themes | Powered by Wordpress
Switch to our mobile site
pberry Pi Kernel Compile | MitchTech http://mitchtech.net/raspberry-pi-kernel-c