mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 06:37:14 +08:00
update kernel26 to 37.4
This commit is contained in:
parent
8515ab112f
commit
df1cd78ae5
@ -8,17 +8,18 @@
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgbase="kernel26"
|
||||
pkgname=('kernel26' 'kernel26-headers') # Build stock -CHAKRA kernel
|
||||
pkgname=('kernel26' 'kernel26-headers' 'kernel26-docs') # Build stock -CHAKRA kernel
|
||||
# pkgname=kernel26-custom # Build kernel with a different name
|
||||
#_kernelname=${pkgname#kernel26}
|
||||
_kernelname=""
|
||||
_basekernel=2.6.37
|
||||
pkgver=${_basekernel}.1
|
||||
pkgver=${_basekernel}.4
|
||||
pkgrel=1
|
||||
_patchname="patch-${pkgver}-1-CHAKRA"
|
||||
_patchname="patch-${pkgver}-${pkgrel}-CHAKRA"
|
||||
arch=(i686 x86_64)
|
||||
license=('GPL2')
|
||||
url="http://www.kernel.org"
|
||||
options=(!strip sign)
|
||||
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
|
||||
http://chakra-project.org/sources/kernel26/${_patchname}.bz2
|
||||
# the main kernel config files
|
||||
@ -26,7 +27,7 @@ source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
|
||||
# standard config files for mkinitcpio ramdisk
|
||||
kernel26.preset)
|
||||
md5sums=('c8ee37b4fdccdb651e0603d35350b434'
|
||||
'f28c839658a2f172939af5b0a45ca20a'
|
||||
'fe8b4592733c86b3f739d29eab1d5577'
|
||||
'1daf0dc043949ecc4f48afa4260e952a'
|
||||
'92f1276655f801d4cb7a80eb481b9226'
|
||||
'25584700a0a679542929c4bed31433b6')
|
||||
@ -44,20 +45,21 @@ build() {
|
||||
else
|
||||
cat ../config >./.config
|
||||
fi
|
||||
|
||||
sed -i 's|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|' .config
|
||||
if [ "${_kernelname}" != "" ]; then
|
||||
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
|
||||
fi
|
||||
|
||||
# hack to prevent output kernel from being marked as dirty or git
|
||||
echo "" > ${srcdir}/linux-${_basekernel}/.scmversion
|
||||
|
||||
# get kernel version
|
||||
make prepare
|
||||
sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/kconfig/streamline_config.pl # Fix localmodconfig
|
||||
# load configuration
|
||||
# Configure the kernel. Replace the line below with one of your choice.
|
||||
#make localmodconfig # Configure automaticly for the local machine
|
||||
#make menuconfig # CLI menu for configuration
|
||||
#make xconfig # X-based configuration
|
||||
#make oldconfig # using old config from previous kernel version
|
||||
#make nconfig # new CLI menu for configuration
|
||||
#make xconfig # X-based configuration, needs qt3 to be installed
|
||||
#make gconfig # GTK based configuration, needs gtk2 to be installed
|
||||
make oldconfig # using old config from previous kernel version
|
||||
#yes ""|make oldconfig # lazy version of the above
|
||||
# ... or manually edit .config
|
||||
####################
|
||||
# stop here
|
||||
@ -67,13 +69,14 @@ build() {
|
||||
####################
|
||||
yes "" | make config
|
||||
# build!
|
||||
make bzImage modules || return 1
|
||||
make ${MAKEFLAGS} bzImage modules
|
||||
}
|
||||
|
||||
package_kernel26() {
|
||||
pkgdesc="The Linux Kernel and modules"
|
||||
backup=(etc/mkinitcpio.d/kernel26.preset)
|
||||
depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.6.3')
|
||||
pkgdesc="The Linux Kernel and modules (mainline)"
|
||||
groups=('base')
|
||||
backup=(etc/mkinitcpio.d/${pkgname}.preset)
|
||||
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.12' 'mkinitcpio>=0.6.8')
|
||||
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
|
||||
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
|
||||
# kernel24 support is dropped since glibc24
|
||||
@ -81,7 +84,7 @@ package_kernel26() {
|
||||
'alsa-driver' 'ieee80211' 'hostap-driver26'
|
||||
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
|
||||
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
|
||||
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'kernel26'
|
||||
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500'
|
||||
'aufs2')
|
||||
provides=('aufs2')
|
||||
install=kernel26.install
|
||||
@ -89,16 +92,18 @@ package_kernel26() {
|
||||
|
||||
KARCH=x86
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
# get kernel version
|
||||
make prepare
|
||||
_kernver="$(make kernelrelease)"
|
||||
mkdir -p ${pkgdir}/{lib/modules,boot}
|
||||
make INSTALL_MOD_PATH=${pkgdir} modules_install || return 1
|
||||
mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
|
||||
make INSTALL_MOD_PATH=${pkgdir} modules_install
|
||||
cp System.map ${pkgdir}/boot/System.map26${_kernelname}
|
||||
cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
|
||||
# # add vmlinux
|
||||
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
|
||||
|
||||
# install fallback mkinitcpio.conf file and preset file for kernel
|
||||
install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/kernel26.preset || return 1
|
||||
install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||
@ -106,21 +111,22 @@ package_kernel26() {
|
||||
-i $startdir/kernel26.install
|
||||
sed \
|
||||
-e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
|
||||
-e "s|default_image=.*|default_image=\"/boot/kernel26.img\"|g" \
|
||||
-e "s|fallback_image=.*|fallback_image=\"/boot/kernel26-fallback.img\"|g" \
|
||||
-i ${pkgdir}/etc/mkinitcpio.d/kernel26.preset
|
||||
-e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
|
||||
-e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
|
||||
-i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
|
||||
|
||||
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/kernel26.kver
|
||||
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
|
||||
# remove build and source links
|
||||
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
|
||||
# remove the firmware
|
||||
rm -rf ${pkgdir}/lib/firmware
|
||||
# gzip -9 all modules to safe 100MB of space
|
||||
find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;
|
||||
}
|
||||
|
||||
package_kernel26-headers() {
|
||||
pkgdesc="Header files and scripts for building modules for kernel26"
|
||||
cd ${srcdir}/linux-${_basekernel}/
|
||||
make oldconfig && make prepare || return 1
|
||||
|
||||
mkdir -p ${pkgdir}/lib/modules/${_kernver}
|
||||
cd ${pkgdir}/lib/modules/${_kernver}
|
||||
ln -sf ../../../usr/src/linux-${_kernver} build
|
||||
@ -132,11 +138,11 @@ package_kernel26-headers() {
|
||||
install -D -m644 .config \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/.config
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
|
||||
|
||||
for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
|
||||
|
||||
for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do
|
||||
cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
|
||||
done
|
||||
|
||||
|
||||
# copy arch includes for external modules
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
|
||||
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
|
||||
@ -159,7 +165,7 @@ package_kernel26-headers() {
|
||||
# add headers for lirc package
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
|
||||
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
|
||||
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo; do # zc0301 - damaged
|
||||
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102; do
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
|
||||
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
|
||||
done
|
||||
@ -191,11 +197,20 @@ package_kernel26-headers() {
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
# add dvb headers
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/20402
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb
|
||||
cp drivers/media/dvb/dvb-usb/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb/
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends
|
||||
cp drivers/media/dvb/frontends/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners
|
||||
cp drivers/media/common/tuners/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners/
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
|
||||
cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
|
||||
# add headers for virtualbox
|
||||
# add headers vor virtualbox
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/14568
|
||||
cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
|
||||
@ -203,36 +218,31 @@ package_kernel26-headers() {
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/14568
|
||||
cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
|
||||
# add headers for crypto modules
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/22081
|
||||
cp -a include/crypto $pkgdir/usr/src/linux-${_kernver}/include/
|
||||
# copy in Kconfig files
|
||||
for i in `find . -name "Kconfig*"`; do
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
|
||||
cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
|
||||
done
|
||||
|
||||
#cd ${pkgdir}/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm
|
||||
# add header for aufs2-util
|
||||
#mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/asm
|
||||
#cp -a ${srcdir}/linux-$_basekernel/include/asm-generic/bitsperlong.h ${pkgdir}/usr/src/linux-${_kernver}/include/asm/
|
||||
|
||||
chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
|
||||
find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
|
||||
# remove unneeded architectures
|
||||
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
|
||||
# fix aufs
|
||||
# rm -rf ${pkgdir}/usr/src/linux-${_kernver}/include/linux/aufs_type.h
|
||||
|
||||
# fix io.h
|
||||
sed \
|
||||
-e "s~#include <xen/xen.h>~~g" \
|
||||
-i ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/include/asm/io.h
|
||||
}
|
||||
|
||||
package_kernel26-docs() {
|
||||
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
|
||||
|
||||
# package_kernel26-firmware() { ##### This package miss important firmwares!!! it's deprecated, use linux-firmware instead.
|
||||
# pkgdesc="The included firmware files of the Linux Kernel"
|
||||
#
|
||||
# cd ${srcdir}/linux-$_basekernel
|
||||
# make firmware || return 1
|
||||
# make INSTALL_MOD_PATH=${pkgdir} firmware_install || return 1
|
||||
# }
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
mkdir -p $pkgdir/usr/src/linux-$_kernver
|
||||
mv Documentation $pkgdir/usr/src/linux-$_kernver
|
||||
find $pkgdir -type f -exec chmod 444 {} \;
|
||||
find $pkgdir -type d -exec chmod 755 {} \;
|
||||
# remove a file already in kernel26 package
|
||||
rm -f $pkgdir/usr/src/linux-$_kernver/Documentation/DocBook/Makefile
|
||||
}
|
||||
|
||||
|
@ -10,17 +10,17 @@ SRCNAME="linux-2.6.35-CHAKRA-LTS"
|
||||
# filename%patchlevel (file must be in patches/ subdirectory)
|
||||
PATCHES=(
|
||||
# add upstream patch from 2.6.35 series
|
||||
http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/patch-2.6.35.10.bz2%1
|
||||
http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/patch-2.6.35.11.bz2%1
|
||||
|
||||
# add latest fixes from stable queue, if needed
|
||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||
|
||||
# add aufs2 support, in reference to:
|
||||
# http://aufs.sourceforge.net
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-base.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-standalone.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-kbuild.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2.1-standalone.tree-35-20101206.patch.bz2%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-base-35.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-standalone-35.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2-kbuild-35.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/aufs2/aufs2.1-standalone.tree-35-20110221.patch.bz2%1
|
||||
# squashfs with lzma
|
||||
http://chakra-project.org/sources/kernel26/patches/35/squash-lzma/001-squashfs-lzma-add-support-for-lzma-compressed-filesystems.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/35/squash-lzma/002-squashfs-lzma-make-lzma-available-to-non-initramfs-initrd-code.patch%1
|
||||
@ -33,7 +33,7 @@ PATCHES=(
|
||||
|
||||
)
|
||||
# Name of the resulting patch (will be bzipped afterwards)
|
||||
PATCHNAME="patch-2.6.35.10-1-CHAKRA-LTS"
|
||||
PATCHNAME="patch-2.6.35.11-1-CHAKRA-LTS"
|
||||
|
||||
# Run this before applying patches
|
||||
pre_apply() {
|
||||
|
@ -10,7 +10,7 @@ SRCNAME="linux-2.6.37-CHAKRA"
|
||||
# filename%patchlevel (file must be in patches subdirectory)
|
||||
PATCHES=(
|
||||
# add upstream patch from 2.6.37 series
|
||||
http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.37.1.bz2%1
|
||||
http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.37.4.bz2%1
|
||||
|
||||
# add latest fixes from stable queue, if needed
|
||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||
@ -20,7 +20,7 @@ PATCHES=(
|
||||
http://chakra-project.org/sources/kernel26/patches/37/aufs2.1/aufs2-kbuild-37.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/37/aufs2.1/aufs2-base-37.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/37/aufs2.1/aufs2-standalone-37.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/37/aufs2.1/aufs2.1-standalone.tree-37-20110207.patch.bz2%1
|
||||
http://chakra-project.org/sources/kernel26/patches/37/aufs2.1/aufs2.1-standalone.tree-37-20110307.patch.bz2%1
|
||||
# squashfs with lzma
|
||||
http://chakra-project.org/sources/kernel26/patches/37/squashfs-lzma/01-squashfs_revert_to_2.6.35.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/37/squashfs-lzma/02-squashfs_add_lzma.patch%1
|
||||
@ -32,7 +32,7 @@ PATCHES=(
|
||||
|
||||
)
|
||||
# Name of the resulting patch (will be bzipped afterwards)
|
||||
PATCHNAME="patch-2.6.37.1-1-CHAKRA"
|
||||
PATCHNAME="patch-2.6.37.4-1-CHAKRA"
|
||||
|
||||
# Run this before applying patches
|
||||
pre_apply() {
|
||||
|
Loading…
Reference in New Issue
Block a user