ck-patchset team mailing list archive
-
ck-patchset team
-
Mailing list archive
-
Message #00019
Re: local build instructions -dev
Here is what I have so far. It isn't done enough to call a draft or test
it yet. I'm probably not going to have time to work on it the next couple
weeks.
> Introduction
> - Why the guide exists
>
I write this guide, hoping to make it easy for folks to build an Ubuntu
kernel with the ck patches.
> - Why you may want to build the ck patched kernel locally
>
There are two reasons why you may want to build the kernel yourself over
using the one in my ppa. For various reasons, I don't always put out
updated kernels in a timely fashion (sometimes never if it for a older
release). Building locally may get you the kernel updates faster. The
other reason is that for reasons unknown, it seems that the kernel that
gets built in my ppa doesn't work with virtualbox, where as a locally built
one does. I don't expect to make much progress on this issue in the future.
> - Why you will want to follow this guide over others to accomplish the
> local build
>
This guide is not intended to teach you how to build a kernel in general.
This guide is intended to give you the commands that you need so you can
build a ck patched kernel with less know-how and with streamlined commands
so that much of it can just be copy and pasted into a command line.
> Overview
> - Structure of the guide / how one should expect to use this guide on a
> regular basis
>
There will be two sections with commands to run: setup and update. Setup
will only need to be run once, and update you will run each time you want
to update your kernel.
> - Who should follow the guide / What technical skills are needed to
> follow the guide (ie, you need to understand directories and how they are
> referenced in bash)
>
The directory setup chosen is ultimately a matter of personal preference,
but all subsequent commands in the update section will assume you have
followed the suggested directory structure. THIS IS NON-TRIVIAL. The
structure of all the commands will be dependent on the directory structure.
Therefor, I recommend having some basic knowledge of the command line and
directories.
> - - maybe some links to bash guides? I dunno
>
> Initial setup
> - Install all the packages needed to patch and build the kernel
>
sudo apt-get install fakeroot build-essential
sudo apt-get install crash kexec-tools makedumpfile kernel-wedge
sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)
sudo apt-get install libncurses5 libncurses5-dev libnewt-dev
- setup a suggested source directory structure and naming convention
>
First, create a directory for your workspace, and then create another
directory within that directory named linux-latest
> - acquire the appropriate set of ck patches
>
Then aquire the ck patchset with:
wget
http://ck.kolivas.org/patches/3.0/3.2/3.2-ck1/3.2-ck1-broken-out.tar.bz2
tar xf 3.2-ck1-broken-out.tar.bz2
>
> Patch and build
> - download the latest kernel version for precise
>
rm -R linux-latest/*
cd linux-latest
apt-get source linux-image-$(uname -r)
- apply patches
>
PATCHES="3.2-sched-bfs-416.patch
mm-minimal_swappiness.patch
mm-enable_swaptoken_only_when_swap_full.patch
mm-drop_swap_cache_aggressively.patch
mm-kswapd_inherit_prio-1.patch
mm-background_scan.patch
mm-idleprio_prio-1.patch
mm-lru_cache_add_lru_tail-2.patch
mm-decrease_default_dirty_ratio-1.patch
kconfig-expose_vmsplit_option.patch
hz-default_1000.patch
hz-no_default_250.patch
hz-raise_max.patch
preempt-desktop-tune.patch
ck1-version.patch"
: > ../patching.log
for patch in $PATCHES; do
echo $patch >> ../patching.log
patch -p1 < ../../patches/$patch >> ../patching.log;
echo >> ../patching.log
done
grep FAILED ../patching.log
- configure
>
cp /boot/config-`uname -r` debian.master/config/i386/config.flavour.ck
chmod -R u+x debian/scripts/*
- setup some variables TODO
File: debian.master/rules.d/amd64.mk
File: debian.master/control.d/vars.i7
- execute build command
>
fakeroot debian/rules clean
DEB_BUILD_OPTIONS=parallel=2 AUTOBUILD=1 NOEXTRAS=1
skipabi=true skipmodule=true fakeroot debian/rules binary-ck
> Installation
> - Where to find the .deb files, and how to install them
>
> Package management ? maybe
> - advice on how to keep track of the kernels installed, and remove old
> ones
>
> References
> - links to all webpages that were used to compile this guide
> - https://help.ubuntu.com/community/Kernel/Compile
> - http://blog.avirtualhome.com/compile-linux-kernel-3-2-for-ubuntu-11-10/
>
>
--
21
Sensual pleasures are like salty water:
The deeper you drink, the thirstier you become.
Any object that you attach to,
Right away, let it go — this is the practice of a bodhisattva
Follow ups
References