about summary refs log tree commit diff stats
path: root/core/ports/linux-libre/Pkgfile
diff options
context:
space:
mode:
Diffstat (limited to 'core/ports/linux-libre/Pkgfile')
-rw-r--r--core/ports/linux-libre/Pkgfile40
1 files changed, 40 insertions, 0 deletions
diff --git a/core/ports/linux-libre/Pkgfile b/core/ports/linux-libre/Pkgfile
new file mode 100644
index 0000000..23f5836
--- /dev/null
+++ b/core/ports/linux-libre/Pkgfile
@@ -0,0 +1,40 @@
+# Description:  Linux libre kernel that comes without blobs
+# URL:          http://linux-libre.fsfla.org
+# Maintainer:   Silvino, silvino at bk dot ru
+# Depends on:   grub2 dracut
+
+name=linux-libre
+version=4.1.32
+release=1
+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)
+
+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
+
+        cp ../linux-$version.defconfig $PKG/usr/src/
+
+        make distclean
+
+        cp ../linux-$version.defconfig .config
+
+        make silentoldconfig
+        # make localmodconfig
+
+        make -j $(nproc) all
+        make INSTALL_MOD_PATH=$PKG modules_install
+
+        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
+
+        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
+
+}