Re: Patching kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My kernel version is 3.3.2, so you will have to adjust the directory
names if you are using a
different one. Everything up to the kernel building is distro-agnostic
so this should help anyone
at least get a patch going.I know you're not on fedora, but figured
I'd put the whole thing up in
case it helps someone.

# Cloned bcache git:
cd ~/
git clone git://evilpiepirate.org/~kent/linux-bcache.git

# Added linux remote to the repository:
cd linux-bcache
git remote add linux
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch linux

# Generate a patch of bcache changes to kernel. Note that this patch
probably isn't directly
# usable for kernel building, as there may be conflicts, so we have to
go through the next step...
git diff linux/master...bcache > ~/bcache.patch

# Follow the standard fedora kernel build at
http://fedoraproject.org/wiki/Building_a_custom_kernel
# When you get to the section "Copy the Source Tree and Generate a
Patch", go ahead and
# create the tree as in that doc (but do yourself a favor and ignore
the part about hard links, it's
# much more trouble than it's worth, just copy) then apply your patch like so:
cd ~/rpmbuild/BUILD/kernel-3.3.fc17.new/
patch -p1 < ~/bcache.patch

# Look for merge conflicts! I missed one scrolling by and my kernel
was inexplicably lacking
# bcache support. Just to be sure, you could run this guy to find
reject files generated by patch..
find ~/rpmbuild/BUILD/kernel-3.3.fc17.new/ -name "*.rej"

# Fix any conflicts (they should be minor) and clean out any extra
files generated by patch..
find ~/rpmbuild/BUILD/kernel-3.3.fc17.new/ -name "*.orig" | xargs rm
find ~/rpmbuild/BUILD/kernel-3.3.fc17.new/ -name "*.rej" | xargs rm

# Generate the patch as in the kernel doc.
# The document then describes how to edit your SPEC file and build. Good luck!
# One thing to note, I'd suggest starting with your existing config
file (you can find it in
# /boot/) instead of one of the templates when it comes time to
configure. Make sure
# you enable CONFIG_BCACHE when asked by `make oldconfig`!

-Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux