Software projects/OS/Slackware/Advanced usage/Kernel
From Pandora Wiki
- 1 Kernel: to recompile or not to recompile ?
- 2 Is it simple or complicated to recompile ?
- 3 Downloading and pre-configuring the latest kernel sources
- 4 The fun part: tweaking
- 5 Kernel compilation
- 6 Speed up the compilation time using two or more Pandoras
- 7 3D driver
- 8 Older Wiki page
Kernel: to recompile or not to recompile ?
- You don't have to if you don't need to add a new feature.
- You don't have to if there's no urgent security kernel update.
- If you want to acquire a lot of global Linux knowledge, or if you are just curious, then yes, just go for it.
Is it simple or complicated to recompile ?
- But as there's a default kernel configuration file for Open Pandora, it's pretty easy.
Downloading and pre-configuring the latest kernel sources
Directly on the Pandora
- I wrote a script to automatize the OP kernel sources download and preparation.
- Plug the net, be root, then:
- It's very long because of the 16MB/s SD slots throughput.
From a PC
If you prefer to speed up the process and download them from your computer, then proceed like this (assuming your SD card is mounted under /media/SLACK/):
mkdir -p /media/SLACK/usr/src/ cd /media/SLACK/usr/src/ git clone git://openpandora.org/pandora-kernel.git ln -s pandora-kernel linux cd pandora-kernel git checkout --track -b pandora-3.2 origin/pandora-3.2
- Then boot the pandora, and do this as root:
cd /usr/src/linux make omap3_pandora_defconfig
The fun part: tweaking
- The configuration is stored in a hidden file named /usr/src/linux/.config
- You can use many tools to edit the configuration.
- The kamikaze way: edit manually the .config . Don't do that.
- The lazy way: install KDE and use as a user:
gksu make xconfig
- The common way, which i recommend:
- Kernel options are stored in a tree.
- Options can be marked as [*] built-in, or <M> module.
- The vast majority of those options refers to a driver or a functionality.
- Built-in means inside the kernel, so once the kernel boots, you can't remove or change parameters.
- Module means you can either add or remove them after the boot. Ever typed "modprobe ehci-hcd" ?
- The example below is copied from my PC, will copy a real OP one later.
Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: [*] built-in [ ] excluded <M> module < > module capable [*] DMA memory allocation support General setup ---> [*] Enable loadable module support ---> [*] Enable the block layer ---> Processor type and features ---> Power management and ACPI options ---> Bus options (PCI etc.) ---> Executable file formats / Emulations ---> [*] Networking support ---> Device Drivers ---> Firmware Drivers ---> File systems ---> hacking ---> options ---> Cryptographic API ---> Virtualization ---> Library routines ---> <Select> < Exit > < Help >
A simple tweak
- Highlight Cryptographic API --->
- Push [enter]. You're now in the Cryptographic API section.
- With [space], select all cryptographic algorithms you can. Ensure they are marked as <M>, not <*>.
- With [right], select < Exit >, then push [enter].
- Again, with [right], select < Exit >, then push [enter].
- Now push [enter], saying <Yes> to "Do you wish to save your new configuration ?".
- You're now ready to compile a kernel which will drive James Bond angrily jealous.
- Be sure you've overclocked your OP to the maximum MHz.
- At 800MHz, it's a 3+ hours job.
- Now you can compile it with another custom script:
Speed up the compilation time using two or more Pandoras
- Read this, and set up your Pandoras.
- Make the adequate changes in /root/kernel-dist.sh with your editor of choice.
- Then compile with:
- So you booted your OP with your brand new kernel, but you can't run 3D apps. Again, two custom scripts for lazy people.
- Download the sources:
- Compile and install them:
Older Wiki page
- 13.37 page is located here.