Target: Raspberry pi
1. Download tool chain and configuration
- Get from git
- Add tool chain gcc path to /etc/profile, it will take effect when next login.
2. Download kernel source
git clone https://github.com/raspberrypi/linux.git
3. Get raspberry pi config
- Login to raspberry pi console and:
- Back to download source code location
- Copy config file
4. Make kernel and module0
- Make config
- kernel compile
- module install
make modules_install ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=../modules/
- Generate image
./imagetool-uncompressed.py ~/linux/arch/arm/boot/zImage"
5. Copy image and modules to pi
scp ~/tools/mkimage/kernel.img pi@
scp -r ~/modules ~/ pi@
- Backup original kernel if needed
- Move new kernel image to boot partition
- Move corresponding modules to lib
7. Reboot pi and check the it uses new kernel
uname -r