kernel-lts.guncellendi
This commit is contained in:
parent
7db274e027
commit
37f3d7a9bb
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
name=kernel-lts
|
name=kernel-lts
|
||||||
version=4.4.27
|
version=4.4.27
|
||||||
release=2
|
_srcname=linux-4.4
|
||||||
|
release=3
|
||||||
|
|
||||||
_version=${version:0:3}
|
_version=${version:0:3}
|
||||||
alias=(linux-lts)
|
alias=(linux-lts)
|
||||||
|
@ -36,13 +37,14 @@ vfs-ino.patch
|
||||||
aufs_type.h
|
aufs_type.h
|
||||||
$name.config_64
|
$name.config_64
|
||||||
virtualbox.conf
|
virtualbox.conf
|
||||||
virtualbox-modules-depmod.patch)
|
virtualbox-modules-depmod.patch
|
||||||
|
https://github.com/milisarge/aufs/archive/master.tar.gz)
|
||||||
|
|
||||||
build(){
|
build(){
|
||||||
|
|
||||||
cd linux-${_version}
|
cd linux-${_version}
|
||||||
|
|
||||||
cp -r $DERLEME_KAYNAKDIZIN/aufs $SRC/fs/
|
cp -r $SRC/aufs $SRC/fs/
|
||||||
|
|
||||||
if [ -f $SRC/patch-$version.xz ]; then
|
if [ -f $SRC/patch-$version.xz ]; then
|
||||||
xz -d -c $SRC/patch-$version.xz | patch -Np1
|
xz -d -c $SRC/patch-$version.xz | patch -Np1
|
||||||
|
@ -120,10 +122,127 @@ cp System.map $PKG/boot/System_64.map-$version
|
||||||
cp .config $PKG/boot/config_64-$version
|
cp .config $PKG/boot/config_64-$version
|
||||||
cp arch/x86_64/boot/bzImage $PKG/boot/kernel-$version
|
cp arch/x86_64/boot/bzImage $PKG/boot/kernel-$version
|
||||||
|
|
||||||
# Reorgenise the sources
|
#kaynak basliklarin ayarlanmasi
|
||||||
cd $PKG/lib/modules/${KERNEL_VERSION}/
|
KARCH=x86
|
||||||
|
cd "${SRC}/${_srcname}"
|
||||||
|
install -D -m644 Makefile \
|
||||||
|
"${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Makefile"
|
||||||
|
install -D -m644 kernel/Makefile \
|
||||||
|
"${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/kernel/Makefile"
|
||||||
|
install -D -m644 .config \
|
||||||
|
"${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/.config"
|
||||||
|
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include"
|
||||||
|
|
||||||
|
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
|
||||||
|
media net pcmcia scsi soc sound trace uapi video xen; do
|
||||||
|
cp -a include/${i} "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/"
|
||||||
|
done
|
||||||
|
|
||||||
|
# copy arch includes for external modules
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/x86"
|
||||||
|
cp -a arch/x86/include "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/x86/"
|
||||||
|
|
||||||
|
# copy files necessary for later builds, like nvidia and vmware
|
||||||
|
cp Module.symvers "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build"
|
||||||
|
cp -a scripts "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build"
|
||||||
|
|
||||||
|
# fix permissions on scripts dir
|
||||||
|
chmod og-w -R "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/scripts"
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/.tmp_versions"
|
||||||
|
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/${KARCH}/kernel"
|
||||||
|
|
||||||
|
cp arch/${KARCH}/Makefile "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/${KARCH}/"
|
||||||
|
|
||||||
|
cp arch/${KARCH}/kernel/asm-offsets.s "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/arch/${KARCH}/kernel/"
|
||||||
|
|
||||||
|
# add docbook makefile
|
||||||
|
install -D -m644 Documentation/DocBook/Makefile \
|
||||||
|
"${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Documentation/DocBook/Makefile"
|
||||||
|
|
||||||
|
# add dm headers
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/md"
|
||||||
|
cp drivers/md/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/md"
|
||||||
|
|
||||||
|
# add inotify.h
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/linux"
|
||||||
|
cp include/linux/inotify.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/linux/"
|
||||||
|
|
||||||
|
# add wireless headers
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/net/mac80211/"
|
||||||
|
cp net/mac80211/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/net/mac80211/"
|
||||||
|
|
||||||
|
# add dvb headers for external modules
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/9912
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-core"
|
||||||
|
cp drivers/media/dvb-core/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-core/"
|
||||||
|
# and...
|
||||||
|
# http://bugs.archlinux.org/task/11194
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/config/dvb/"
|
||||||
|
cp include/config/dvb/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/include/config/dvb/"
|
||||||
|
|
||||||
|
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/13146
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-frontends/"
|
||||||
|
cp drivers/media/dvb-frontends/lgdt330x.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-frontends/"
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/i2c/"
|
||||||
|
cp drivers/media/i2c/msp3400-driver.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/i2c/"
|
||||||
|
|
||||||
|
# add dvb headers
|
||||||
|
# in reference to:
|
||||||
|
# http://bugs.archlinux.org/task/20402
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/usb/dvb-usb"
|
||||||
|
cp drivers/media/usb/dvb-usb/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/usb/dvb-usb/"
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-frontends"
|
||||||
|
cp drivers/media/dvb-frontends/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/dvb-frontends/"
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/tuners"
|
||||||
|
cp drivers/media/tuners/*.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/drivers/media/tuners/"
|
||||||
|
|
||||||
|
# add xfs and shmem for aufs building
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/fs/xfs"
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/mm"
|
||||||
|
# removed in 3.17 series
|
||||||
|
# cp fs/xfs/xfs_sb.h "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/fs/xfs/xfs_sb.h"
|
||||||
|
|
||||||
|
# copy in Kconfig files
|
||||||
|
for i in $(find . -name "Kconfig*"); do
|
||||||
|
mkdir -p "${PKG}"/usr/lib/modules/${KERNEL_VERSION}/build/`echo ${i} | sed 's|/Kconfig.*||'`
|
||||||
|
cp ${i} "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/${i}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# add objtool for external module building and enabled VALIDATION_STACK option
|
||||||
|
if [ -f tools/objtool/objtool ]; then
|
||||||
|
mkdir -p "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/tools/objtool"
|
||||||
|
cp -a tools/objtool/objtool ${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/tools/objtool/
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R root.root "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build"
|
||||||
|
find "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build" -type d -exec chmod 755 {} \;
|
||||||
|
|
||||||
|
# strip scripts directory
|
||||||
|
find "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
|
||||||
|
case "$(file -bi "${binary}")" in
|
||||||
|
*application/x-sharedlib*) # Libraries (.so)
|
||||||
|
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
||||||
|
*application/x-archive*) # Libraries (.a)
|
||||||
|
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
|
||||||
|
*application/x-executable*) # Binaries
|
||||||
|
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# remove unneeded architectures
|
||||||
|
rm -rf "${PKG}"/usr/lib/modules/${KERNEL_VERSION}/build/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa}
|
||||||
|
|
||||||
|
# remove a files already in linux-docs package
|
||||||
|
rm -f "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Documentation/kbuild/Kconfig.recursion-issue-01"
|
||||||
|
rm -f "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Documentation/kbuild/Kconfig.recursion-issue-02"
|
||||||
|
rm -f "${PKG}/usr/lib/modules/${KERNEL_VERSION}/build/Documentation/kbuild/Kconfig.select-break"
|
||||||
|
|
||||||
|
|
||||||
rm {build,source}
|
|
||||||
|
|
||||||
# Firmware are in linux-firmware
|
# Firmware are in linux-firmware
|
||||||
rm -rf $PKG/lib/firmware
|
rm -rf $PKG/lib/firmware
|
||||||
|
|
Loading…
Reference in New Issue