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

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

parent 57c9b6bd
......@@ -4,7 +4,7 @@ _flavor=grsec
pkgdesc="Linux kernel with grsecurity"
makedepends="perl installkernel"
......@@ -57,24 +57,38 @@ build() {
INSTALL_MOD_PATH="$pkgdir" \
# point the build symlink to headers dir
ln -s vmlinuz-${_abi_release} "${pkgdir}"/boot/$_flavor
rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
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"
# create flavored headers ubuntu style
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"
cp "$srcdir"/kernelconfig "$dir"/.config
make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \
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
# copy the only the parts that we really need
# copy the needed stuff from real sources
# this is taken from ubuntu kernel build script
cd "$srcdir"/linux-$_kernver
find . -path './include/*' -prune -o -path './scripts/*' -prune \
-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