# Description: uzun donem kararli kernel surumu # URL: http://www.kernel.org # Packagers: milisarge name=kernel-lts version=4.4.27 release=1 _version=${version:0:3} alias=(linux-lts) # Broadcom wl_version=6.30.223.271 _wlarch=_64 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 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 aufs_type.h $name.config_64) build(){ cd linux-${_version} cp -r $DERLEME_KAYNAKDIZIN/aufs $SRC/fs/ if [ -f $SRC/patch-$version.xz ]; then xz -d -c $SRC/patch-$version.xz | patch -Np1 fi #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" make mrproper cp $SRC/kernel-lts.config_64 ./.config make cp .config $SRC/$name.config_64 ## 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 install -D -m0644 $i $PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/$i done # depmod needed depmod -b $PKG -a ${KERNEL_VERSION} install -D -m 644 $SRC/aufs_type.h "${PKG}/usr/include/linux/aufs_type.h" # Install config and kernel files cd $SRC/linux-${_version} mkdir -p $PKG/boot 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 # Reorgenise the sources cd $PKG/lib/modules/${KERNEL_VERSION}/ rm {build,source} # Firmware are in linux-firmware rm -rf $PKG/lib/firmware }