kernel-lts
This commit is contained in:
		
							parent
							
								
									2481d88639
								
							
						
					
					
						commit
						4b147e4c2f
					
				
					 1 changed files with 12 additions and 87 deletions
				
			
		| 
						 | 
				
			
			@ -3,37 +3,19 @@
 | 
			
		|||
# Packagers: milisarge
 | 
			
		||||
 | 
			
		||||
name=kernel-lts
 | 
			
		||||
alias=(linux-lts)
 | 
			
		||||
 | 
			
		||||
version=4.4.27
 | 
			
		||||
_version=${version:0:3}
 | 
			
		||||
 | 
			
		||||
release=1
 | 
			
		||||
 | 
			
		||||
# Virtualbox
 | 
			
		||||
vb_version=5.1.6
 | 
			
		||||
buildrelease=110634
 | 
			
		||||
[ "`uname -m`" == "i686"   ] && _VBARCH=x86
 | 
			
		||||
[ "`uname -m`" == "x86_64"   ] && _VBARCH=amd64
 | 
			
		||||
 | 
			
		||||
# nvidia
 | 
			
		||||
nv_version=361.42
 | 
			
		||||
[ "$PKGMK_ARCH" == "i686"   ] && _NVARCH=x86
 | 
			
		||||
[ "$PKGMK_ARCH" == "x86_64"   ] && _NVARCH=x86_64
 | 
			
		||||
 | 
			
		||||
_version=${version:0:3}
 | 
			
		||||
alias=(linux-lts)
 | 
			
		||||
 | 
			
		||||
# Broadcom
 | 
			
		||||
wl_version=6.30.223.271
 | 
			
		||||
[ "`uname -m`" == "x86_64" ] && _wlarch=_64
 | 
			
		||||
 | 
			
		||||
## Download all the sources
 | 
			
		||||
#
 | 
			
		||||
_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://download.virtualbox.org/virtualbox/${vb_version}/VirtualBox-${vb_version}-${buildrelease}-Linux_${_VBARCH}.run
 | 
			
		||||
http://download.nvidia.com/XFree86/Linux-${_NVARCH}/${nv_version}/NVIDIA-Linux-${_NVARCH}-${nv_version}.run
 | 
			
		||||
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
 | 
			
		||||
| 
						 | 
				
			
			@ -46,15 +28,10 @@ lockdep-debug.patch
 | 
			
		|||
tmpfs-idr.patch
 | 
			
		||||
vfs-ino.patch
 | 
			
		||||
aufs_type.h
 | 
			
		||||
$name.config $name.config_64)
 | 
			
		||||
 | 
			
		||||
## Time to build everything
 | 
			
		||||
#
 | 
			
		||||
$name.config_64)
 | 
			
		||||
 | 
			
		||||
build(){
 | 
			
		||||
 | 
			
		||||
#bsdtar -p -o -C $SRC -xf linux-${_version}.tar.xz
 | 
			
		||||
 | 
			
		||||
cd linux-${_version}
 | 
			
		||||
 | 
			
		||||
cp -r $DERLEME_KAYNAKDIZIN/aufs $SRC/fs/
 | 
			
		||||
| 
						 | 
				
			
			@ -75,21 +52,9 @@ patch -p1 -i "${SRC}/tmpfs-idr.patch"
 | 
			
		|||
patch -p1 -i "${SRC}/vfs-ino.patch"
 | 
			
		||||
 | 
			
		||||
make mrproper
 | 
			
		||||
case `uname -m` in
 | 
			
		||||
	x86_64)
 | 
			
		||||
		cp $SRC/kernel-lts.config_64 ./.config;;
 | 
			
		||||
	i?86)
 | 
			
		||||
		cp $SRC/kernel-lts.config ./.config;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
cp $SRC/kernel-lts.config_64 ./.config
 | 
			
		||||
make
 | 
			
		||||
 | 
			
		||||
case `uname -m` in
 | 
			
		||||
        x86_64)
 | 
			
		||||
		cp .config $SRC/$name.config_64;;
 | 
			
		||||
        i?86)
 | 
			
		||||
		cp .config $SRC/$name.config;;
 | 
			
		||||
esac
 | 
			
		||||
cp .config $SRC/$name.config_64
 | 
			
		||||
 | 
			
		||||
## Modules
 | 
			
		||||
#
 | 
			
		||||
| 
						 | 
				
			
			@ -113,64 +78,24 @@ if [ "$PKGMK_ARCH" == "x86_64" ]; then
 | 
			
		|||
  install -Dm644 broadcom-wl.modprobe.d $PKG/etc/modprobe.d/broadcom-wl.conf
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Module nvidia
 | 
			
		||||
cd $SRC
 | 
			
		||||
sh NVIDIA-Linux-${_NVARCH}-${nv_version}.run --extract-only
 | 
			
		||||
cd NVIDIA-Linux-${_NVARCH}-${nv_version}/kernel
 | 
			
		||||
SYSSRC=$SRC/linux-${_version} make module
 | 
			
		||||
for MODULE in nvidia.ko nvidia-modeset.ko
 | 
			
		||||
do
 | 
			
		||||
	install -m 0644 -D $MODULE \
 | 
			
		||||
	$PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/$MODULE
 | 
			
		||||
done
 | 
			
		||||
if [ "${_ARCH}" == "x86_64" ]; then
 | 
			
		||||
	install -m 0644 -D nvidia-uvm.ko \
 | 
			
		||||
	$PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/nvidia-uvm.ko
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Module virtualbox
 | 
			
		||||
cd $SRC
 | 
			
		||||
sh VirtualBox-${vb_version}-${buildrelease}-Linux_${_VBARCH}.run --target vb --keep --noexec
 | 
			
		||||
cd vb
 | 
			
		||||
tar xfj VirtualBox.tar.bz2
 | 
			
		||||
cd src/vboxhost/
 | 
			
		||||
KERNELRELEASE=${version}
 | 
			
		||||
KERN_DIR=$SRC/linux-${_version} make
 | 
			
		||||
 | 
			
		||||
for i in *.ko
 | 
			
		||||
do
 | 
			
		||||
	install -D -m0644 $i \
 | 
			
		||||
	$PKG/lib/modules/${KERNEL_VERSION}/kernel/drivers/zzzz/$i
 | 
			
		||||
	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 -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
 | 
			
		||||
case `uname -m` in
 | 
			
		||||
        x86_64)
 | 
			
		||||
                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 ;;
 | 
			
		||||
        i?86)
 | 
			
		||||
                cp  System.map \
 | 
			
		||||
                $PKG/boot/System.map-$version
 | 
			
		||||
                cp  .config \
 | 
			
		||||
                $PKG/boot/config-$version
 | 
			
		||||
                cp  arch/i386/boot/bzImage \
 | 
			
		||||
                $PKG/boot/kernel-$version ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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}/
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue