Commit 7a5096f2 authored by Natanael Copa's avatar Natanael Copa

core/linux-grsec: create link to /boot/<flavor>. add some comments

parent 57c9b6bd
...@@ -4,7 +4,7 @@ _flavor=grsec ...@@ -4,7 +4,7 @@ _flavor=grsec
pkgname=linux-${_flavor} pkgname=linux-${_flavor}
pkgver=2.6.29.5 pkgver=2.6.29.5
_kernver=2.6.29 _kernver=2.6.29
pkgrel=1 pkgrel=2
pkgdesc="Linux kernel with grsecurity" pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net url=http://grsecurity.net
makedepends="perl installkernel" makedepends="perl installkernel"
...@@ -57,24 +57,38 @@ build() { ...@@ -57,24 +57,38 @@ build() {
INSTALL_MOD_PATH="$pkgdir" \ INSTALL_MOD_PATH="$pkgdir" \
INSTALL_PATH="$pkgdir"/boot INSTALL_PATH="$pkgdir"/boot
# point the build symlink to headers dir ln -s vmlinuz-${_abi_release} "${pkgdir}"/boot/$_flavor
rm -f "$pkgdir"/lib/modules/${_abi_release}/build \ rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
"$pkgdir"/lib/modules/${_abi_release}/source "$pkgdir"/lib/modules/${_abi_release}/source
} }
dev() { dev() {
# copy the only the parts that we really need for build 3rd party
# kernel modules and install those as /usr/src/linux-headers,
# simlar to what ubuntu does
#
# this way you dont need to install the 300-400 kernel sources to
# build a tiny kernel module
#
pkgdesc="Headers and script for third party modules for grsec kernel" pkgdesc="Headers and script for third party modules for grsec kernel"
# create flavored headers ubuntu style
local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release} local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
# first we import config, run prepare to set up for building
# external modules, and create the scripts
mkdir -p "$dir" mkdir -p "$dir"
cp "$srcdir"/kernelconfig "$dir"/.config cp "$srcdir"/kernelconfig "$dir"/.config
make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \ make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \
silentoldconfig prepare scripts silentoldconfig prepare scripts
# remove the stuff that poits to real sources. we want 3rd party
# modules to believe this is the soruces
rm "$dir"/Makefile "$dir"/source rm "$dir"/Makefile "$dir"/source
# copy the only the parts that we really need # copy the needed stuff from real sources
#
# this is taken from ubuntu kernel build script # this is taken from ubuntu kernel build script
# http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=blob;f=debian/rules.d/3-binary-indep.mk;hb=HEAD
cd "$srcdir"/linux-$_kernver cd "$srcdir"/linux-$_kernver
find . -path './include/*' -prune -o -path './scripts/*' -prune \ find . -path './include/*' -prune -o -path './scripts/*' -prune \
-o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \ -o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment