diff options
Diffstat (limited to 'core/ports/linux-libre/Pkgfile')
-rw-r--r-- | core/ports/linux-libre/Pkgfile | 65 |
1 files changed, 44 insertions, 21 deletions
diff --git a/core/ports/linux-libre/Pkgfile b/core/ports/linux-libre/Pkgfile index b792163..eec03b8 100644 --- a/core/ports/linux-libre/Pkgfile +++ b/core/ports/linux-libre/Pkgfile @@ -4,37 +4,60 @@ # Depends on: grub2 dracut name=linux-libre -version=4.1.34 -release=1 +version=4.9.9 +release=3 source=(http://linux-libre.fsfla.org/pub/linux-libre/releases/$version-gnu/$name-$version-gnu.tar.xz \ -https://raw.githubusercontent.com/graysky2/kernel_gcc_patch/master/enable_additional_cpu_optimizations_for_gcc_v4.9%2B_kernel_v3.15%2B.patch \ -linux-$version.defconfig) + https://raw.githubusercontent.com/graysky2/kernel_gcc_patch/master/enable_additional_cpu_optimizations_for_gcc_v4.9%2B_kernel_v3.15%2B.patch \ + https://grsecurity.net/test/grsecurity-3.1-4.9.9-201702122044.patch \ + port-libre-grsecurity.patch \ + port-libre-cpu.patch \ + port-libre-make.patch \ + config-c9) build() { - cd linux-$version - mkdir -p $PKG/usr/src - cp $SRC/enable_additional_cpu_optimizations_for_gcc_v4.9%2B_kernel_v3.15%2B.patch $PKG/usr/src/cpu_optimizations.patch + mkdir -p $PKG/usr/src - cp ../linux-$version.defconfig $PKG/usr/src/ + # /usr/src/version-libre-config + install -m 0644 $SRC/config-c9 $PKG/usr/src/${version}-libre-config - make distclean + # /usr/src/version-cpu_optimizations.patch + install -m 0644 $SRC/enable_additional_cpu_optimizations_for_gcc_v4.9%2B_kernel_v3.15%2B.patch $PKG/usr/src/${version}-cpu_optimizations.patch - cp ../linux-$version.defconfig .config + # /usr/src/grsecurity-version.patch + install -m 0644 $SRC/grsecurity-3.1-4.9.9-201702122044.patch $PKG/usr/src/ + install -m 0644 $SRC/port-libre-grsecurity.patch $PKG/usr/src/ + install -m 0644 $SRC/port-libre-cpu.patch $PKG/usr/src/ + install -m 0644 $SRC/port-libre-make.patch $PKG/usr/src/ - make silentoldconfig - # make localmodconfig + patch < port-libre-grsecurity.patch + patch < port-libre-cpu.patch - make -j $(nproc) all - make INSTALL_MOD_PATH=$PKG modules_install + cd linux-$version - install -m 0644 -D arch/x86_64/boot/bzImage $PKG/boot/vmlinuz-$version-gnu_crux - install -m 0644 System.map $PKG/boot/System.map-$version-gnu_crux - install -m 0644 .config $PKG/boot/config-$version-gnu_crux + patch < ${SRC}/port-libre-make.patch - rm $PKG/lib/modules/${version}-gnu_crux/source - rm $PKG/lib/modules/${version}-gnu_crux/build - #ln -sf /usr/src/linux-4.1.30-gnu_crux $PKG/lib/modules/4.1.32-gnu_crux/build - #ln -sf /usr/src/linux-4.1.30-gnu_crux $PKG/lib/modules/4.1.32-gnu_crux/source + make distclean + patch -p1 < $SRC/grsecurity-3.1-4.9.9-201702122044.patch + patch -p1 < $SRC/enable_additional_cpu_optimizations_for_gcc_v4.9%2B_kernel_v3.15%2B.patch + + cp $SRC/config-c9 .config + + make silentoldconfig + make nconfig + # make localmodconfig + + make LOCALVERSION= bzImage modules + make INSTALL_MOD_PATH=$PKG modules_install + + install -m 0644 -D arch/x86_64/boot/bzImage $PKG/boot/vmlinuz-$version-grsec + install -m 0644 System.map $PKG/boot/System.map-$version-grsec + install -m 0644 .config $PKG/boot/config-$version-grsec + + rm ${PKG}/lib/modules/${version}-grsec/source + rm ${PKG}/lib/modules/${version}-grsec/build + + ln -s /usr/src/linux-${version} $PKG/lib/modules/${version}-grsec/source + ln -s /usr/src/linux-${version} $PKG/lib/modules/${version}-grsec/build } |