EDIT: This post is from 30.09.2013 and should be the "how to" to this post. However, I never released it for a now unknown reason. Because of the interest in this topic, I still will publish it today so that it can stand as some kind of documentation of what I did back then. However, I might not work anymore.
This is the latest Guide.
What are we doing here?
Building OpenWRT Trunk with the offical RPi 3.10 (next) Kernel.
Packages:
You can use some packages of the offical OpenWRT 12.09 Attitude Adjustment repo.
However, most kernel modules and stuff has to be built but yourself, as I
got no repo. Sorry!
Dependencies needed
sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip
Prepare Enviroment (Trunk)
cd ~
mkdir rpi_openwrt
cd rpi_openwrt
git clone git://git.openwrt.org/openwrt.git
cd openwrt
mkdir dl
Install Packages
./scripts/feeds update -a
./scripts/feeds install -a
Check Enviroment
make defconfig
make prereq
Download Kernel and Prepare:
cd /tmp
wget https://github.com/raspberrypi/linux/archive/rpi-3.10.y.tar.gz
tar xfvz rpi-3.10.y.tar.gz
mv linux-rpi-3.10.y linux-3.10.13
tar -cJvf linux-3.10.13.tar.xz linux-3.10.13/
mv linux-3.10.13.tar.xz ~/rpi_openwrt/openwrt/dl/
Prepare Target
cd ~/rpi_openwrt/openwrt/target/linux/brcm2708/
Remove the RPi Kernel specific patches
we don't need them because we use the ORIGINAL kernel
- and not some retailored standard kernel!
mv patches-3.10 patches-3.10.bkp
mkdir patches-3.10
check wheter the makefile does try to catch the right kernel version
vi Makefile
change LINUX_VERSION to LINUX_VERSION:=3.10.13
Prepare Generic Patches
cd ../generic/patches-3.10
Normally it should be ok to just remove some of the patches like this.
if make target/linux/{clean,prepare} V=99 does fail in patching stage
you would need to remove another patch here
but for the time beeing, lets kill these files which are known to
wreck it:
rm 063-arm-fix-fiq-vivt.patch
rm 880-gateworks_system_controller.patch
#Make
cd ~/rpi_openwrt/openwrt/
make menuconfig # Choose BCM2708 Chipset, Raspberry Pi Board, Exit and Save
make target/linux/{clean,prepare} V=99 # does extract kernel and patch it
make kernel_oldconfig # builds some tools
make kernel_menuconfig # configures kernel
make menuconfig # to change RPi Patterns, i.e.:
Packages rep:
Image configuration -> Version configuration options -> Release Repo to:
http://downloads.openwrt.org/attitude_adjustment/12.09/%T/generic/packages
Main Partition Size from 48 to 64:
Target Options -> Root File System Size, change from 48 to 64 MB or more
Exit and Save
make V=99 -j 3
Files are in ~/rpi_openwrt/openwrt/bin/brcm2708
( i.e. openwrt-brcm2708-sdcard-vfat-ext4.img )
New build:
make kernel_menuconfig
make menuconfig
make V=99 -j 3