mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 02:37:14 +08:00
kernel26: fix config - update linux-2.6-CHAKRA
This commit is contained in:
parent
2311f77ea6
commit
8cfef12407
@ -1,67 +1,60 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
# Core Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgbase="kernel26"
|
||||
pkgname=('kernel26' 'kernel26-headers' 'kernel26-docs') # Build stock -CHAKRA kernel
|
||||
#pkgname=kernel26-mainline # Build kernel with a different name
|
||||
#_kernelname=${pkgname#kernel26}
|
||||
_kernelname=""
|
||||
_basekernel=2.6.38
|
||||
pkgver=${_basekernel}.8
|
||||
# pkgname=kernel26-custom # Build kernel with a different name
|
||||
_kernelname=${pkgname#kernel26}
|
||||
_basekernel=2.6.39
|
||||
pkgver=${_basekernel}.2
|
||||
pkgrel=1
|
||||
makedepends=('xmlto' 'docbook-xsl')
|
||||
_patchname="patch-${pkgver}-${pkgrel}-CHAKRA"
|
||||
#_patchname="patch-${pkgver}-1-CHAKRA"
|
||||
arch=(i686 x86_64)
|
||||
license=('GPL2')
|
||||
url="http://www.kernel.org"
|
||||
options=(!strip sign)
|
||||
source=(http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-$_basekernel.tar.bz2
|
||||
options=(!strip)
|
||||
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
|
||||
config config.x86_64
|
||||
# standard config files for mkinitcpio ramdisk
|
||||
kernel26.preset)
|
||||
md5sums=('7d471477bfa67546f902da62227fa976' # linux-$_basekernel.tar.bz2
|
||||
'5c26dd2deff4b310a23514b8a272fc0a' # ${_patchname}.bz2
|
||||
'37216396c5d8844e675d1720fa38f01f' # config
|
||||
'ff1778c577a2a47cb41c22e9bb04050b' # config.x86_64
|
||||
'25584700a0a679542929c4bed31433b6' # kernel26.preset
|
||||
)
|
||||
md5sums=('1aab7a741abe08d42e8eccf20de61e05'
|
||||
'77be2894dd88bc868212c10ac9a8313a'
|
||||
'694bf6bf9cbeb22ef84cb00bccdb2aa3'
|
||||
'7e9a0bb54791776f51e209de8b76f3eb'
|
||||
'25584700a0a679542929c4bed31433b6')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
|
||||
# fix setlocalversion
|
||||
sed -i 's|echo "+"|# echo "+"|g' ./scripts/setlocalversion
|
||||
|
||||
|
||||
# Add -CHAKRA patches
|
||||
patch -Np1 -i ${srcdir}/${_patchname} || return 1
|
||||
patch -Np1 -i ${srcdir}/${_patchname}
|
||||
|
||||
if [ "$CARCH" = "x86_64" ]; then
|
||||
cat ../config.x86_64 >./.config
|
||||
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
|
||||
sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/kconfig/streamline_config.pl # Fix localmodconfig
|
||||
# get kernel version
|
||||
make prepare
|
||||
# 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 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
|
||||
#make xconfig # X-based configuration
|
||||
#make oldconfig # using old config from previous kernel version
|
||||
# ... or manually edit .config
|
||||
####################
|
||||
# stop here
|
||||
@ -75,10 +68,10 @@ build() {
|
||||
}
|
||||
|
||||
package_kernel26() {
|
||||
pkgdesc="The Linux Kernel and modules (mainline)"
|
||||
pkgdesc="The Linux Kernel and modules"
|
||||
groups=('base')
|
||||
backup=(etc/mkinitcpio.d/${pkgname}.preset)
|
||||
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.12' 'mkinitcpio>=0.6.8')
|
||||
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.12-2' 'mkinitcpio>=0.6.8-2')
|
||||
# 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
|
||||
@ -95,7 +88,6 @@ package_kernel26() {
|
||||
KARCH=x86
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
# get kernel version
|
||||
make prepare
|
||||
_kernver="$(make kernelrelease)"
|
||||
mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
|
||||
make INSTALL_MOD_PATH=${pkgdir} modules_install
|
||||
@ -128,7 +120,6 @@ package_kernel26() {
|
||||
|
||||
package_kernel26-headers() {
|
||||
pkgdesc="Header files and scripts for building modules for kernel26"
|
||||
|
||||
mkdir -p ${pkgdir}/lib/modules/${_kernver}
|
||||
cd ${pkgdir}/lib/modules/${_kernver}
|
||||
ln -sf ../../../usr/src/linux-${_kernver} build
|
||||
@ -141,7 +132,8 @@ package_kernel26-headers() {
|
||||
${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 xen; do
|
||||
for i in acpi asm-generic config crypto drm generated linux math-emu \
|
||||
media net pcmcia scsi sound trace video xen; do
|
||||
cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
|
||||
done
|
||||
|
||||
@ -212,18 +204,6 @@ package_kernel26-headers() {
|
||||
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 vor virtualbox
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/14568
|
||||
cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
|
||||
# add headers for broadcom wl
|
||||
# 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.*||'`
|
||||
@ -232,20 +212,29 @@ package_kernel26-headers() {
|
||||
|
||||
chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
|
||||
find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
|
||||
# strip scripts directory
|
||||
find ${pkgdir}/usr/src/linux-${_kernver}/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 ${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}
|
||||
}
|
||||
|
||||
package_kernel26-docs() {
|
||||
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
|
||||
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
|
||||
|
||||
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
|
||||
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
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
391
kernel26/config
391
kernel26/config
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2,19 +2,19 @@
|
||||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=
|
||||
KERNEL_VERSION=2.6.38-CHAKRA
|
||||
KERNEL_VERSION=2.6.39-ARCH
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod $KERNEL_VERSION
|
||||
/sbin/depmod $KERNEL_VERSION
|
||||
# generate init ramdisks
|
||||
echo ">>> MKINITCPIO SETUP"
|
||||
echo ">>> ----------------"
|
||||
echo ">>> If you use LVM2, Encrypted root or software RAID,"
|
||||
echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
|
||||
echo ">>> More information about mkinitcpio setup can be found here:"
|
||||
echo ">>> http://chakra-project.org/wiki/index.php/Mkinitcpio"
|
||||
echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
|
||||
echo ""
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
/sbin/mkinitcpio -p kernel26${KERNEL_NAME}
|
||||
@ -39,24 +39,109 @@ post_upgrade() {
|
||||
echo ">>>"
|
||||
fi
|
||||
|
||||
if grep "^[^#]*/boot" /etc/fstab 2>&1 >/dev/null; then
|
||||
if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then
|
||||
if grep "^[^#]*[[:space:]]/boot" /etc/fstab 2>&1 >/dev/null; then
|
||||
if ! grep "[[:space:]]/boot" /etc/mtab 2>&1 >/dev/null; then
|
||||
echo "WARNING: /boot appears to be a seperate partition but is not mounted"
|
||||
echo " This is most likely not what you want. Please mount your /boot"
|
||||
echo " partition and reinstall the kernel unless you are sure this is OK"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "`vercmp $2 2.6.13`" -lt 0 ]; then
|
||||
# important upgrade notice
|
||||
echo ">>>"
|
||||
echo ">>> IMPORTANT KERNEL UPGRADE NOTICE"
|
||||
echo ">>> -------------------------------"
|
||||
echo ">>> As of kernel 2.6.13, DevFS is NO LONGER AVAILABLE!"
|
||||
echo ">>> If you still use DevFS, please make the transition to uDev before"
|
||||
echo ">>> rebooting. If you really need to stay with DevFS for some reason,"
|
||||
echo ">>> then you can manually downgrade to an older version:"
|
||||
echo ">>>"
|
||||
echo ">>> # pacman -U http://archlinux.org/~judd/kernel/kernel26-scsi-2.6.12.2-1.pkg.tar.gz"
|
||||
echo ">>>"
|
||||
echo ">>> If you choose to downgrade, don't forget to add kernel26-scsi to your"
|
||||
echo ">>> IgnorePkg list in /etc/pacman.conf"
|
||||
echo ">>>"
|
||||
echo ">>> (NOTE: The following portion applies to uDev users as well!)"
|
||||
echo ">>>"
|
||||
echo ">>> If you use any DevFS paths in your GRUB menu.lst, then you will not"
|
||||
echo ">>> be able to boot! Change your root= parameter to use the classic"
|
||||
echo ">>> naming scheme."
|
||||
echo ">>>"
|
||||
echo ">>> EXAMPLES:"
|
||||
echo ">>> - change root=/dev/discs/disc0/part3 to root=/dev/sda3"
|
||||
echo ">>> - change root=/dev/md/0 to root=/dev/md0"
|
||||
echo ">>>"
|
||||
fi
|
||||
# generate new init ramdisk
|
||||
if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
|
||||
echo ">>> --------------------------------------------------------------"
|
||||
echo ">>> | WARNING: |"
|
||||
echo ">>> |mkinitrd is not supported anymore in kernel >=2.6.18 series!|"
|
||||
echo ">>> | Please change to Mkinitcpio setup. |"
|
||||
echo ">>> --------------------------------------------------------------"
|
||||
echo ">>>"
|
||||
fi
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod $KERNEL_VERSION
|
||||
# generate init ramdisks
|
||||
/sbin/depmod $KERNEL_VERSION
|
||||
echo ">>> MKINITCPIO SETUP"
|
||||
echo ">>> ----------------"
|
||||
if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
|
||||
echo ">>> Please change your bootloader config files:"
|
||||
echo ">>> Grub: /boot/grub/menu.lst | Lilo: /etc/lilo.conf"
|
||||
echo "------------------------------------------------"
|
||||
echo "| - initrd26.img to kernel26${KERNEL_NAME}.img |"
|
||||
echo "| - initrd26-full.img to kernel26${KERNEL_NAME}-fallback.img |"
|
||||
echo "------------------------------------------------"
|
||||
fi
|
||||
if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
|
||||
echo ""
|
||||
echo ">>> New PATA/IDE subsystem - EXPERIMENTAL"
|
||||
echo ">>> ----------"
|
||||
echo ">>> To use the new pata drivers, change the 'ide' hook "
|
||||
echo ">>> to 'pata' in /etc/mkinicpio.conf HOOKS="
|
||||
echo ">>> The new system changes: /dev/hd? to /dev/sd?"
|
||||
echo ">>> Don't forget to modify GRUB, LILO and fstab to the"
|
||||
echo ">>> new naming system. "
|
||||
echo ">>> eg: hda3 --> sda3, hdc8 --> sdc8"
|
||||
echo ""
|
||||
echo ">>> piix/ata_piix (Intel chipsets) - IMPORTANT"
|
||||
echo "----------"
|
||||
echo ">>> If you have enabled ide/pata/sata HOOKs in /etc/mkinitcpio.conf"
|
||||
echo ">>> the 'ata_piix' module will be used."
|
||||
echo ">>> This may cause your devices to shift names, eg:"
|
||||
echo ">>> - IDE: devices from hd? to sd?"
|
||||
echo ">>> - SATA: sda might shift to sdc if you have 2 other disks on a PIIX IDE port."
|
||||
echo ">>> To check if this will affect you, check 'mkinitcpio -M' for piix/ata_piix"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo ">>> If you use LVM2, Encrypted root or software RAID,"
|
||||
echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
|
||||
echo ">>> More information about mkinitcpio setup can be found here:"
|
||||
echo ">>> http://chakra-project.org/wiki/index.php/Mkinitcpio"
|
||||
echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
|
||||
echo ""
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
|
||||
/sbin/mkinitcpio -p kernel26${KERNEL_NAME} -m "ATTENTION:\nIf you get a kernel panic below
|
||||
and are using an Intel chipset, append 'earlymodules=piix' to the
|
||||
kernel commandline"
|
||||
else
|
||||
/sbin/mkinitcpio -p kernel26${KERNEL_NAME}
|
||||
fi
|
||||
if [ "`vercmp $2 2.6.21`" -lt 0 ]; then
|
||||
echo ""
|
||||
echo "Important ACPI Information:"
|
||||
echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized."
|
||||
echo ">>> The modules are located at:"
|
||||
echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi"
|
||||
echo ">>> For more information about ACPI modules check this wiki page:"
|
||||
echo ">>> 'http://wiki.archlinux.org/index.php/ACPI_modules'"
|
||||
fi
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
rm -f /boot/kernel26${KERNEL_NAME}.img
|
||||
rm -f /boot/kernel26${KERNEL_NAME}-fallback.img
|
||||
}
|
||||
|
@ -1,48 +1,40 @@
|
||||
# Source env-settings
|
||||
source ../_buildscripts/core-testing-${_arch}-makepkg.conf
|
||||
# Pre-Patch settings
|
||||
_patch="2.6.38.9-pre"
|
||||
_queue="2.6.38"
|
||||
_patch="2.6.39.3-pre"
|
||||
_queue="2.6.39"
|
||||
# Aufs
|
||||
_aufs="38-20110328"
|
||||
_aufs="39-20110704"
|
||||
# Kernel source file
|
||||
SRC="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.tar.bz2"
|
||||
SRC="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.bz2"
|
||||
# Original source directory
|
||||
SRCORIG="linux-2.6.38"
|
||||
SRCORIG="linux-2.6.39"
|
||||
# Our source directory
|
||||
SRCNAME="linux-2.6.38-CHAKRA"
|
||||
SRCNAME="linux-2.6.39-CHAKRA"
|
||||
# Patches:
|
||||
# URL%patchlevel
|
||||
# or
|
||||
# filename%patchlevel (file must be in patches subdirectory)
|
||||
PATCHES=(
|
||||
# add upstream patch from 2.6.38 series
|
||||
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-2.6.38.8.bz2%1
|
||||
# add upstream patch from 2.6.39 series
|
||||
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-2.6.39.2.bz2%1
|
||||
|
||||
# add latest fixes from stable queue, if needed
|
||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||
#http://chakra-project.org/sources/kernel26/patches/38/bugfix/$_patch.patch%1
|
||||
|
||||
# fix hibernate resume
|
||||
# http://www.chakra-project.org/bbs/viewtopic.php?id=4419
|
||||
http://chakra-project.org/sources/kernel26/patches/38/bugfix/fix-hibernate-resume-2.6.38.patch%1
|
||||
#http://chakra-project.org/sources/kernel26/patches/39/bugfix/$_patch.patch%1
|
||||
|
||||
# fix #19234 i1915 display size
|
||||
http://chakra-project.org/sources/kernel26/patches/38/bugfix/fix-i915.patch%1
|
||||
|
||||
# fix i915 pipelining glitches
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=34584
|
||||
http://chakra-project.org/sources/kernel26/patches/38/bugfix/i915-pipeline.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/39/bugfix/fix-i915.patch%1
|
||||
|
||||
# add aufs2 support, in reference to:
|
||||
# http://aufs.sourceforge.net
|
||||
http://chakra-project.org/sources/kernel26/patches/38/aufs2.1/aufs2-kbuild-$_aufs.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/38/aufs2.1/aufs2-base-$_aufs.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/38/aufs2.1/aufs2-standalone-$_aufs.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/38/aufs2.1/aufs2.1-standalone.tree-$_aufs.patch.bz2%1
|
||||
http://chakra-project.org/sources/kernel26/patches/39/aufs2.1/aufs2-kbuild-$_aufs.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/39/aufs2.1/aufs2-base-$_aufs.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/39/aufs2.1/aufs2-standalone-$_aufs.patch%1
|
||||
http://chakra-project.org/sources/kernel26/patches/39/aufs2.1/aufs2.1-standalone.tree-$_aufs.patch.bz2%1
|
||||
)
|
||||
# Name of the resulting patch (will be bzipped afterwards)
|
||||
PATCHNAME="patch-2.6.38.8-1-CHAKRA"
|
||||
PATCHNAME="patch-2.6.39.2-1-CHAKRA"
|
||||
|
||||
# Run this before applying patches
|
||||
pre_apply() {
|
||||
|
31
linux-2.6-CHAKRA/create-aufs.sh
Executable file
31
linux-2.6-CHAKRA/create-aufs.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# clone the aufs repository to the local disk
|
||||
git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git aufs2-standalone.git
|
||||
cd aufs2-standalone.git
|
||||
git branch -r
|
||||
git checkout origin/aufs2.1-39
|
||||
|
||||
# modify what you want
|
||||
|
||||
# and after
|
||||
# create the patch with the directories: fs, include and Documentation
|
||||
|
||||
rm -v $(find . -type f -name '*.orig')
|
||||
grep -qse 'EXPORT_SYMBOL(' aufs2-standalone.patch && \
|
||||
sed -i-old -e 's|EXPORT_SYMBOL(|EXPORT_SYMBOL_GPL(|' aufs2-standalone.patch
|
||||
rm -rf /tmp/linux-2.6
|
||||
mkdir /tmp/linux-2.6
|
||||
cp -a fs /tmp/linux-2.6
|
||||
cp -a include /tmp/linux-2.6
|
||||
cp -a Documentation /tmp/linux-2.6
|
||||
echo "test"
|
||||
rm /tmp/linux-2.6/include/linux/Kbuild
|
||||
cd /tmp
|
||||
diff -Naur null linux-2.6 | filterdiff | \
|
||||
sed -e 's|null\(/include/linux/Kbuild\)|linux-2.6-old\1|;s|^--- null.*|--- /dev/null|;\|linux-2.6/include/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' \
|
||||
| bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p' linux-2.6/include/linux/aufs_type.h).patch.bz2
|
||||
cd $OLDPWD
|
||||
|
||||
# the patch is created in /tmp
|
||||
# the other patches needed to compile are in the base directory
|
Loading…
Reference in New Issue
Block a user