milis/talimatname/temel-ek/kernel-lts/talimat

132 lines
3.3 KiB
Plaintext
Raw Normal View History

2016-10-23 14:10:48 +02:00
# Description: uzun donem kararli kernel surumu
2016-02-24 01:27:23 +01:00
# URL: http://www.kernel.org
2016-04-12 05:32:27 +02:00
# Packagers: milisarge
2016-02-24 01:27:23 +01:00
name=kernel-lts
2016-10-23 14:10:48 +02:00
version=4.4.27
2016-11-15 23:36:18 +01:00
release=2
2016-02-24 01:27:23 +01:00
2016-10-27 18:41:45 +02:00
_version=${version:0:3}
alias=(linux-lts)
2016-10-23 14:10:48 +02:00
2016-11-15 23:31:16 +01:00
# Virtualbox
vb_version=5.1.8
[ "`uname -m`" == "i686" ] && _VBARCH=x86
[ "`uname -m`" == "x86_64" ] && _VBARCH=amd64
2016-10-23 14:10:48 +02:00
# Broadcom
wl_version=6.30.223.271
2016-10-27 18:41:45 +02:00
_wlarch=_64
2016-10-23 14:10:48 +02:00
source=(\
http://www.kernel.org/pub/linux/kernel/v4.x/linux-${_version}.tar.xz
https://www.kernel.org/pub/linux/kernel/v4.x/patch-$version.xz
2016-11-15 23:31:16 +01:00
https://sourceforge.net/projects/kaosx/files/sources/virtualbox-modules/vbox-kernel-module-src-${vb_version}.tar.xz
2016-10-23 14:10:48 +02:00
http://www.broadcom.com/docs/linux_sta/hybrid-v35${_wlarch}-nodebug-pcoem-${wl_version//./_}.tar.gz
broadcom-wl.modprobe.d broadcom-wl.license.patch wl_linux.c.patch
aufs4-loopback.patch
aufs4-base.patch
aufs4-mmap.patch
aufs4-standalone.patch
aufs4-kbuild.patch
aufs4.4-20160912.patch
lockdep-debug.patch
tmpfs-idr.patch
vfs-ino.patch
2016-10-23 17:57:36 +02:00
aufs_type.h
2016-11-15 23:31:16 +01:00
$name.config_64
virtualbox.conf
virtualbox-modules-depmod.patch)
2016-02-24 01:27:23 +01:00
build(){
cd linux-${_version}
2016-10-23 14:10:48 +02:00
cp -r $DERLEME_KAYNAKDIZIN/aufs $SRC/fs/
2016-02-24 01:27:23 +01:00
if [ -f $SRC/patch-$version.xz ]; then
xz -d -c $SRC/patch-$version.xz | patch -Np1
fi
2016-10-23 14:10:48 +02:00
#aufs patches for Live:
patch -p1 -i "${SRC}/aufs4.4-20160912.patch"
patch -p1 -i "${SRC}/aufs4-base.patch"
patch -p1 -i "${SRC}/aufs4-kbuild.patch"
patch -p1 -i "${SRC}/aufs4-loopback.patch"
patch -p1 -i "${SRC}/aufs4-mmap.patch"
patch -p1 -i "${SRC}/aufs4-standalone.patch"
patch -p1 -i "${SRC}/lockdep-debug.patch"
patch -p1 -i "${SRC}/tmpfs-idr.patch"
patch -p1 -i "${SRC}/vfs-ino.patch"
2016-02-24 01:27:23 +01:00
make mrproper
2016-10-27 18:41:45 +02:00
cp $SRC/kernel-lts.config_64 ./.config
2016-10-23 14:10:48 +02:00
make
2016-10-27 18:41:45 +02:00
cp .config $SRC/$name.config_64
2016-02-24 01:27:23 +01:00
2016-10-23 14:10:48 +02:00
## Modules
#
# Kernel modules
cd $SRC/linux-${_version}
make INSTALL_MOD_PATH=$PKG modules_install
KERNEL_VERSION="${version}-milis-lts"
# Module broadcom is broken on 32 bits machine
if [ "$PKGMK_ARCH" == "x86_64" ]; then
cd $SRC
bsdtar xf $DERLEME_KAYNAKDIZIN/hybrid-v35${_wlarch}-nodebug-pcoem-${wl_version//./_}.tar.gz
patch -p1 -i broadcom-wl.license.patch
patch -p1 -i wl_linux.c.patch
sed -e "/BRCM_WLAN_IFNAME/s:eth:wlan:" \
-i src/wl/sys/wl_linux.c
BUILD_NOPEDANTIC=1 make -C $SRC/linux-${_version} M=`pwd`
install -m 0644 -D wl.ko $PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/wl.ko
install -Dm644 broadcom-wl.modprobe.d $PKG/etc/modprobe.d/broadcom-wl.conf
fi
for i in *.ko
do
2016-10-27 18:41:45 +02:00
install -D -m0644 $i $PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/$i
2016-10-23 14:10:48 +02:00
done
2016-11-15 23:31:16 +01:00
# Module virtualbox
cd vbox-kernel-module-src-5.1.8
patch -p0 -i $SRC/virtualbox-modules-depmod.patch
KERNELRELEASE=${version}
KERN_DIR=$SRC/linux-${_version} make
mkdir -p $PKG/etc/sysconfig/modules.d
install -D -m644 $SRC/virtualbox.conf $PKG/etc/sysconfig/modules.d/virtualbox.conf
for i in *.ko
do
install -D -m0644 $i $PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/$i
done
2016-10-23 14:10:48 +02:00
# depmod needed
depmod -b $PKG -a ${KERNEL_VERSION}
2016-10-27 18:41:45 +02:00
install -D -m 644 $SRC/aufs_type.h "${PKG}/usr/include/linux/aufs_type.h"
2016-10-23 17:57:36 +02:00
2016-10-23 14:10:48 +02:00
# Install config and kernel files
2016-02-24 01:27:23 +01:00
cd $SRC/linux-${_version}
2016-10-23 14:10:48 +02:00
2016-02-24 01:27:23 +01:00
mkdir -p $PKG/boot
2016-10-23 16:23:47 +02:00
2016-10-27 18:41:45 +02:00
cp System.map $PKG/boot/System_64.map-$version
cp .config $PKG/boot/config_64-$version
cp arch/x86_64/boot/bzImage $PKG/boot/kernel-$version
2016-10-23 14:10:48 +02:00
# Reorgenise the sources
cd $PKG/lib/modules/${KERNEL_VERSION}/
2016-02-24 01:27:23 +01:00
rm {build,source}
# Firmware are in linux-firmware
rm -rf $PKG/lib/firmware
}