2.12. Customizing the Pyramid Kernel
Problem
You want to compile a custom kernel with everything built-in instead of hassling with kernel modules. Your little routerboard runs only a limited set of hardware, and it's not something you're going to be updating or modifying a lot. Additionally, this will save a fair amount of storage space on your Compact Flash card.
Solution
No problem. You need a build environment on a PC, with kernel sources and build tools. Build your kernel there, then copy it to your Pyramid board. Use Ubuntu kernel sources with Ubuntu patches. Fetch Ubuntu kernel sources and build tools with this command:
$ sudo apt-get install linux-source linux-kernel-develThat should get you everything you need.
If you want to start with the existing Pyramid kernel configuration, copy the /proc/config.gz file to your build machine:
pyramid:/# scp /proc/config.gz carla@192.168.1.10:downloads/Unpack it using gunzip:
$ gunzip config.gzNow you can build a new custom kernel and drop it into place on Pyramid. Remember to update /boot/grub/menu.lst with the new kernel name.
Discussion
Pyramid consists of mostly unmodified Ubuntu binaries, so sticking with Ubuntu binaries and source files is the safest and easiest method for modifying it. As long as your Ubuntu CD is the same release as your Pyramid installation (Breezy, Dapper, and so forth), you shouldn't experience any compatibility problems.
To see how much space /lib/modules
occupies, use the du
command:
pyramid:/# du --si -c /lib/modules/2.6.17.8-metrix ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access