about summary refs log tree commit diff stats
path: root/core/ports/linux-libre/Pkgfile
blob: 23f5836e9c1d390ba2cd119dd45e8c89e890b486 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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

}