BRN:Software:Build and Distribution:Linux: Difference between revisions
Jump to navigation
Jump to search
(→Patch) |
(→Build) |
||
Line 5: | Line 5: | ||
= Patch = |
= Patch = |
||
$ |
$ svn co svn://sarsvn.informatik.hu-berlin.de/BerlinRoofNet/trunk/platform/wgt634u/kernel-patches |
||
⚫ | |||
$ cd linux-2.6.16.13 |
$ cd linux-2.6.16.13 |
||
$ for p in ../kernel-patches/{generic,mips,brn}/*.patch |
$ for p in ../kernel-patches/{generic,mips,brn}/*.patch |
||
> do if [ -r $p ] |
> do if [ -r $p ] |
||
> then patch -p1 -i $p || { echo "Apply of patch \"$p\" failed! Exiting..."; break; } |
> then patch -p1 -i $p --dry-run || { echo "Apply of patch \"$p\" failed! Exiting..."; break; } |
||
> fi |
> fi |
||
> done |
> done |
||
= Build = |
= Build = |
||
'''<span style="color:red">TODO</span>''' |
|||
$ svn cat svn://sarsvn.informatik.hu-berlin.de/....../build.sh > build.sh |
|||
$ sh build.sh # or "sh build.sh -j4" for SMP machines |
$ sh build.sh # or "sh build.sh -j4" for SMP machines |
||
== Click kernel patch == |
|||
If this process led to a positive result, you can try to patch your kernel source tree with the '''click linux kernel patch''': |
|||
$ cd .. |
|||
$ cvs -d :pserver:anoncvs@cvs.pdos.csail.mit.edu:/cvs co -d click-cvs click/release/one |
|||
⚫ | |||
$ cd click-cvs |
|||
$ patch -p1 -i ../click-patches/click-linux-2.6.16.13-patch.patch # fix some broken stuff |
|||
$ cd ../linux-2.6.16.13 |
|||
$ patch -p1 -i ../click-cvs/etc/linux-2.6.16.13-patch |
|||
If patch was successfully applied, build the modified parts again: |
|||
$ sh build.sh # or "sh build.sh -j4" for SMP machines |
|||
Now you should have a linux kernel (vmlinux), which is able to load the '''click''' router as a linux '''kernel module''', also called ''linuxmodule'' later. |
|||
Revision as of 22:18, 10 September 2006
Vanilla Kernel Sources
$ KERNEL_MIRROR=ftp://ftp.kernel.org/pub/linux/kernel # or ftp://ftp.informatik.hu-berlin.de/pub/Linux/Kernel/kernel $ wget $KERNEL_MIRROR/v2.6/linux-2.6.16.13.tar.bz2 $ tar xjf linux-2.6.16.13.tar.bz2
Patch
$ svn co svn://sarsvn.informatik.hu-berlin.de/BerlinRoofNet/trunk/platform/wgt634u/kernel-patches $ cd linux-2.6.16.13 $ for p in ../kernel-patches/{generic,mips,brn}/*.patch > do if [ -r $p ] > then patch -p1 -i $p --dry-run || { echo "Apply of patch \"$p\" failed! Exiting..."; break; } > fi > done
Build
$ sh build.sh # or "sh build.sh -j4" for SMP machines
Click kernel patch
If this process led to a positive result, you can try to patch your kernel source tree with the click linux kernel patch:
$ cd .. $ cvs -d :pserver:anoncvs@cvs.pdos.csail.mit.edu:/cvs co -d click-cvs click/release/one $ svn co $BRN_SVN_REPOS/BerlinRoofNet/trunk/click/patches click-patches $ cd click-cvs $ patch -p1 -i ../click-patches/click-linux-2.6.16.13-patch.patch # fix some broken stuff $ cd ../linux-2.6.16.13 $ patch -p1 -i ../click-cvs/etc/linux-2.6.16.13-patch
If patch was successfully applied, build the modified parts again:
$ sh build.sh # or "sh build.sh -j4" for SMP machines
Now you should have a linux kernel (vmlinux), which is able to load the click router as a linux kernel module, also called linuxmodule later.