about summary refs log tree commit diff stats
path: root/linux/ports/linux-gnu/Pkgfile
blob: ea8868f5bd30ac2968040596c38ab20df969aab6 (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
41
42
# Description:  Gnu linux kernel that comes without blobs
# URL:          http://linux-libre.fsfla.org
# Maintainer:   Silvino, silvino at bk dot ru
# Depends on:   dracut grub2 grub2-efi

name=linux-gnu
version=4.9.111
release=12
source=(https://linux-libre.fsfla.org/pub/linux-libre/releases/$version-gnu/linux-libre-$version-gnu.tar.xz \
    cpu_optimizations.patch \
    config-crux)

build() {

    cd linux-$version

    patch -p1 < $SRC/cpu_optimizations.patch

    make distclean

    cp $SRC/config-crux .config

    make olddefconfig
    # make nconfig
    # make localmodconfig

    # make LOCALVERSION= all
    make LOCALVERSION= bzImage modules
    make INSTALL_MOD_PATH=$PKG modules_install

    install -m 0644 -D arch/x86_64/boot/bzImage $PKG/boot/vmlinuz-$version-gnu
    install -m 0644  System.map $PKG/boot/System.map-$version-gnu
    install -m 0644 .config $PKG/boot/config-$version-gnu
    install -m 0644 -D .config $PKG/usr/src/config-${version}-gnu
    install -m 0644 $SRC/cpu_optimizations.patch $PKG/usr/src/cpu_optimizations-${version}.patch

    rm ${PKG}/lib/modules/${version}-gnu/source
    rm ${PKG}/lib/modules/${version}-gnu/build

    ln -s /usr/src/linux-${version} $PKG/lib/modules/${version}-gnu/source
    ln -s /usr/src/linux-${version} $PKG/lib/modules/${version}-gnu/build
}