diff options
Diffstat (limited to 'kernels/linux-libre-aufs_friendly')
13 files changed, 98 insertions, 58 deletions
diff --git a/kernels/linux-libre-aufs_friendly/Kbuild b/kernels/linux-libre-aufs_friendly/Kbuild index 8a9d7dceb..8a9d7dceb 100644..100755 --- a/kernels/linux-libre-aufs_friendly/Kbuild +++ b/kernels/linux-libre-aufs_friendly/Kbuild diff --git a/kernels/linux-libre-aufs_friendly/Kbuild.platforms b/kernels/linux-libre-aufs_friendly/Kbuild.platforms index 90a226888..90a226888 100644..100755 --- a/kernels/linux-libre-aufs_friendly/Kbuild.platforms +++ b/kernels/linux-libre-aufs_friendly/Kbuild.platforms diff --git a/kernels/linux-libre-aufs_friendly/PKGBUILD b/kernels/linux-libre-aufs_friendly/PKGBUILD index 8c82d07cd..9dc2cbbce 100644..100755 --- a/kernels/linux-libre-aufs_friendly/PKGBUILD +++ b/kernels/linux-libre-aufs_friendly/PKGBUILD @@ -4,19 +4,17 @@ # Maintainer: Calimero <calimeroteknik@free.fr> # Maintainer (Parabola): Nicolás Reynolds <fauno@kiwwwi.com.ar> # Maintainer (Parabola): Sorin-Mihai Vârgolici <smv@yobicore.org> -# Maintainer (Parabola): André Silva <andre.paulista@adinet.com.uy> +# Maintainer (Parabola): André Silva <emulatorman@lavabit.com> # Maintainer (Parabola): Michał Masłowski <mtjm@mtjm.eu> -# Contributor (Parabola): Márcio Silva <coadde@adinet.com.uy> +# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> -pkgbase=linux-libre-aufs_friendly -pkgname=('linux-libre-aufs_friendly' 'linux-libre-aufs_friendly-headers') # Build stock -LIBRE kernel with AUFS-libre support -# pkgname=linux-custom # Build kernel with a different name -_kernelname=-LIBRE-AUFS_FRIENDLY +pkgbase=linux-libre-aufs_friendly # Build stock -LIBRE-AUFS_FRIENDLY kernel +#pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.3 _sublevel=4 pkgver=${_basekernel}.${_sublevel} +pkgrel=1.3 _lxopkgver=${_basekernel}.4 # nearly always the same as pkgver -pkgrel=1 arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -29,14 +27,14 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn # patches exporting symbols for the aufs module (reason for this package) 'aufs3-libre-base.patch' 'aufs3-libre-standalone.patch' # standard config files for mkinitcpio ramdisk - "${pkgname}.preset" + "${pkgbase}.preset" 'Kbuild' 'Kbuild.platforms' 'boot-logo.patch' 'change-default-console-loglevel.patch' 'i915-fix-ghost-tv-output.patch' 'ext4-options.patch' - "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") + "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") md5sums=('5487da14ca81715a469c7594d39722fa' 'ce7d959667b9f158b1fb814b5806950a' '9824d09d2a659db17a6468e27ccc29ad' @@ -57,6 +55,9 @@ if [ "$CARCH" != "mips64el" ]; then unset md5sums[${#md5sums[@]}-1] fi +_kernelname=${pkgbase#linux-libre} +_localversionname=-LIBRE-AUFS_FRIENDLY + build() { cd "${srcdir}/linux-${_basekernel}" @@ -67,6 +68,9 @@ build() { # Add freedo as boot logo patch -Np1 -i "${srcdir}/boot-logo.patch" + # add latest fixes from stable queue, if needed + # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git + # Some chips detect a ghost TV output # mailing list discussion: http://lists.freedesktop.org/archives/intel-gfx/2011-April/010371.html # Arch Linux bug report: FS#19234 @@ -76,7 +80,6 @@ build() { # needed. patch -Np1 -i "${srcdir}/i915-fix-ghost-tv-output.patch" - # Patch submitted upstream, waiting for inclusion: # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param) # remove this when a Kconfig knob is made available by upstream # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) @@ -91,7 +94,7 @@ build() { patch -p1 -i "${srcdir}/aufs3-libre-standalone.patch" if [ "$CARCH" == "mips64el" ]; then - sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre|" Makefile + sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre-aufs_friendly|" Makefile sed -r "s|^( SUBLEVEL = ).*|\1$_sublevel|" \ < "${srcdir}/lxo-config.patch" > lxo-config.patch msg2 "Adding loongson-community patches" @@ -105,7 +108,7 @@ build() { sed -ri -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \ -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \ -e "s|CONFIG_UEVENT_HELPER_PATH=.*|CONFIG_UEVENT_HELPER_PATH=\"\"|g" \ - -e "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" \ + -e "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_localversionname}\"|g" \ -e "s;(CONFIG_USB(_COMMON|_EHCI_HCD|_OHCI_HCD|_STORAGE.*|_UAS)?)=.*;\1=y;g" \ ./.config else @@ -113,12 +116,16 @@ build() { fi if [ "${_kernelname}" != "" ]; then - sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config + sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_localversionname}\"|g" ./.config + sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config fi # set extraversion to pkgrel sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile + # don't run depmod on 'make install'. We'll do this ourselves in packaging + sed -i '2iexit 0' scripts/depmod.sh + # get kernel version make prepare @@ -130,15 +137,22 @@ build() { #make oldconfig # using old config from previous kernel version # ... or manually edit .config + # rewrite configuration + yes "" | make config >/dev/null + + # save configuration for later reuse + if [ "${CARCH}" = "x86_64" ]; then + cat .config > "${startdir}/config.x86_64.last" + else + cat .config > "${startdir}/config.i686.last" + fi + #################### # stop here # this is useful to configure the kernel - #msg "Stopping build" - #return 1 + #msg "Stopping build"; return 1 #################### - yes "" | make config - # build! if [ "$CARCH" == "mips64el" ]; then # The build system passes it directly to linker, disable to avoid @@ -146,21 +160,22 @@ build() { export LDFLAGS="" # bzImage is arch-specific and not supported on mips; vmlinux is # useful for oprofile. - make ${MAKEFLAGS} vmlinux vmlinuz modules + make ${MAKEFLAGS} LOCALVERSION= vmlinux vmlinuz modules else - make ${MAKEFLAGS} bzImage modules + make ${MAKEFLAGS} LOCALVERSION= bzImage modules fi } -package_linux-libre-aufs_friendly() { - pkgdesc="The Linux-libre Kernel and modules, with symbols exported for AUFS3-libre" - depends=('coreutils' 'module-init-tools>=3.16') +_package() { + pkgdesc="The ${pkgbase} kernel and modules with symbols exported for aufs3" + [ "${pkgbase}" = "linux-libre" ] && groups=('base') + depends=('coreutils' 'kmod') optdepends=('crda: to set the correct wireless channels of your country') - provides=('kernel26-aufs_friendly' "linux-aufs_friendly=$pkgver") - conflicts=('kernel26-aufs_friendly' 'kernel26-libre-aufs_friendly' 'linux-aufs_friendly') - replaces=('kernel26-aufs_friendly' 'kernel26-libre-aufs_friendly' 'linux-aufs_friendly') - backup=("etc/mkinitcpio.d/${pkgname}.preset") - install=${pkgname}.install + provides=("kernel26${_kernelname}=${pkgver}" "linux${_kernelname}=${pkgver}") + conflicts=("kernel26${_kernelname}" "kernel26-libre${_kernelname}" "linux${_kernelname}") + replaces=("kernel26${_kernelname}" "kernel26-libre${_kernelname}" "linux${_kernelname}") + backup=("etc/mkinitcpio.d/${pkgbase}.preset") + install=${pkgbase}.install if [ "$CARCH" = "mips64el" ]; then optdepends+=('mkinitcpio: to make the initramfs (needs reinstall of this package)') conflicts+=('mkinitcpio<0.7') @@ -174,35 +189,42 @@ package_linux-libre-aufs_friendly() { [ $CARCH = "mips64el" ] && KARCH=mips # get kernel version - _kernver="$(make kernelrelease)" + _kernver="$(make LOCALVERSION= kernelrelease)" + _basekernel=${_kernver%%-*} + _basekernel=${_basekernel%.*} mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} - make INSTALL_MOD_PATH="${pkgdir}" modules_install + make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install if [ "$CARCH" == "mips64el" ]; then - cp vmlinuz "${pkgdir}/boot/vmlinuz-${pkgname}" - cp vmlinux "${pkgdir}/boot/vmlinux-${pkgname}" + cp vmlinuz "${pkgdir}/boot/vmlinuz-${pkgbase}" + cp vmlinux "${pkgdir}/boot/vmlinux-${pkgbase}" else - cp "arch/${KARCH}/boot/bzImage" "${pkgdir}/boot/vmlinuz-${pkgname}" + cp "arch/${KARCH}/boot/bzImage" "${pkgdir}/boot/vmlinuz-${pkgbase}" fi # add vmlinux install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux" # install fallback mkinitcpio.conf file and preset file for kernel - install -D -m644 "${srcdir}/${pkgname}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset" + install -D -m644 "${srcdir}/${pkgbase}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" # set correct depmod command for install sed \ - -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgname}\"|g" \ - -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgname}.img\"|g" \ - -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgname}-fallback.img\"|g" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset" + -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" \ + -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ + -i "${startdir}/${pkgbase}.install" + sed \ + -e "1s|'linux*.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" # mkinitcpio 0.7 relies on bzImage to find the kernel version if [ "$CARCH" == "mips64el" ]; then - sed -e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|g" \ - -i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset" + sed -e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" fi # remove build and source links @@ -212,17 +234,23 @@ package_linux-libre-aufs_friendly() { # gzip -9 all modules to save 100MB of space find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \; # make room for external modules - ln -s "../extramodules-${_basekernel}${_kernelname:--LIBRE}" "${pkgdir}/lib/modules/${_kernver}/extramodules" + ln -s "../extramodules-${_basekernel}${_localversionname:--LIBRE-AUFS_FRIENDLY}" "${pkgdir}/lib/modules/${_kernver}/extramodules" # add real version for building modules and running depmod from post_install/upgrade - mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--LIBRE}" - echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--LIBRE}/version" + mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_localversionname:--LIBRE-AUFS_FRIENDLY}" + echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_localversionname:--LIBRE-AUFS_FRIENDLY}/version" + + # move module tree /lib -> /usr/lib + mv "$pkgdir/lib" "$pkgdir/usr" + + # Now we call depmod... + depmod -b "$pkgdir" -F System.map "$_kernver" } -package_linux-libre-aufs_friendly-headers() { - pkgdesc="Header files and scripts for building modules for linux-libre-aufs_friendly kernel" - provides=('kernel26-aufs_friendly-headers' "linux-aufs_friendly-headers=${pkgver}") - conflicts=('kernel26-aufs_friendly-headers' 'kernel26-libre-aufs_friendly-headers' 'linux-aufs_friendly-headers') - replaces=('kernel26-aufs_friendly-headers' 'kernel26-libre-aufs_friendly-headers' 'linux-aufs_friendly-headers') +_package-headers() { + pkgdesc="Header files and scripts for building modules for ${pkgbase} kernel" + provides=("kernel26${_kernelname}-headers=${pkgver}" "linux${_kernelname}-headers=${pkgver}") + conflicts=("kernel26${_kernelname}-headers" "kernel26-libre${_kernelname}-headers" "linux${_kernelname}-headers") + replaces=("kernel26${_kernelname}-headers" "kernel26-libre${_kernelname}-headers" "linux${_kernelname}-headers") KARCH=x86 [ $CARCH = "mips64el" ] && KARCH=mips @@ -230,13 +258,13 @@ package_linux-libre-aufs_friendly-headers() { # In case of repackaging this is empty if [ -z "${_kernver}" ]; then cd "${srcdir}/linux-${_basekernel}" - _kernver="$(make kernelrelease)" + _kernver="$(make LOCALVERSION= kernelrelease)" fi - mkdir -p "${pkgdir}/lib/modules/${_kernver}" + install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}" - cd "${pkgdir}/lib/modules/${_kernver}" - ln -sf ../../../usr/src/linux-${_kernver} build + cd "${pkgdir}/usr/lib/modules/${_kernver}" + ln -sf ../../../src/linux-${_kernver} build cd "${srcdir}/linux-${_basekernel}" install -D -m644 Makefile \ @@ -361,7 +389,7 @@ package_linux-libre-aufs_friendly-headers() { done # remove unneeded architectures - rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa} + rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} if [ "$CARCH" = "mips64el" ]; then rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/x86 else @@ -369,3 +397,11 @@ package_linux-libre-aufs_friendly-headers() { fi } +pkgname=("${pkgbase}" "${pkgbase}-headers") +for _p in ${pkgname[@]}; do + eval "package_${_p}() { + _package${_p#${pkgbase}} + }" +done + +# vim:set ts=8 sts=2 sw=2 et: diff --git a/kernels/linux-libre-aufs_friendly/aufs3-libre-base.patch b/kernels/linux-libre-aufs_friendly/aufs3-libre-base.patch index 99a63d024..99a63d024 100644..100755 --- a/kernels/linux-libre-aufs_friendly/aufs3-libre-base.patch +++ b/kernels/linux-libre-aufs_friendly/aufs3-libre-base.patch diff --git a/kernels/linux-libre-aufs_friendly/aufs3-libre-standalone.patch b/kernels/linux-libre-aufs_friendly/aufs3-libre-standalone.patch index 584d592ef..584d592ef 100644..100755 --- a/kernels/linux-libre-aufs_friendly/aufs3-libre-standalone.patch +++ b/kernels/linux-libre-aufs_friendly/aufs3-libre-standalone.patch diff --git a/kernels/linux-libre-aufs_friendly/boot-logo.patch b/kernels/linux-libre-aufs_friendly/boot-logo.patch index c392928a5..c392928a5 100644..100755 --- a/kernels/linux-libre-aufs_friendly/boot-logo.patch +++ b/kernels/linux-libre-aufs_friendly/boot-logo.patch diff --git a/kernels/linux-libre-aufs_friendly/change-default-console-loglevel.patch b/kernels/linux-libre-aufs_friendly/change-default-console-loglevel.patch index 63435d84f..63435d84f 100644..100755 --- a/kernels/linux-libre-aufs_friendly/change-default-console-loglevel.patch +++ b/kernels/linux-libre-aufs_friendly/change-default-console-loglevel.patch diff --git a/kernels/linux-libre-aufs_friendly/config.i686 b/kernels/linux-libre-aufs_friendly/config.i686 index 7ef304fb7..7ef304fb7 100644..100755 --- a/kernels/linux-libre-aufs_friendly/config.i686 +++ b/kernels/linux-libre-aufs_friendly/config.i686 diff --git a/kernels/linux-libre-aufs_friendly/config.x86_64 b/kernels/linux-libre-aufs_friendly/config.x86_64 index 1a687faf0..1a687faf0 100644..100755 --- a/kernels/linux-libre-aufs_friendly/config.x86_64 +++ b/kernels/linux-libre-aufs_friendly/config.x86_64 diff --git a/kernels/linux-libre-aufs_friendly/ext4-options.patch b/kernels/linux-libre-aufs_friendly/ext4-options.patch index ea48c384b..ea48c384b 100644..100755 --- a/kernels/linux-libre-aufs_friendly/ext4-options.patch +++ b/kernels/linux-libre-aufs_friendly/ext4-options.patch diff --git a/kernels/linux-libre-aufs_friendly/i915-fix-ghost-tv-output.patch b/kernels/linux-libre-aufs_friendly/i915-fix-ghost-tv-output.patch index 3b631361a..3b631361a 100644..100755 --- a/kernels/linux-libre-aufs_friendly/i915-fix-ghost-tv-output.patch +++ b/kernels/linux-libre-aufs_friendly/i915-fix-ghost-tv-output.patch diff --git a/kernels/linux-libre-aufs_friendly/linux-libre-aufs_friendly.install b/kernels/linux-libre-aufs_friendly/linux-libre-aufs_friendly.install index cad3564d8..019c659ed 100644..100755 --- a/kernels/linux-libre-aufs_friendly/linux-libre-aufs_friendly.install +++ b/kernels/linux-libre-aufs_friendly/linux-libre-aufs_friendly.install @@ -2,14 +2,16 @@ # arg 2: the old package version KERNEL_NAME=-aufs_friendly -KERNEL_VERSION=3.3.4-1-LIBRE-AUFS_FRIENDLY +KERNEL_VERSION=3.3.4-1.3-LIBRE-AUFS_FRIENDLY post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if command -v mkinitcpio 2>&1 > /dev/null; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi # compat symlinks for the official kernels only if [ -z "${KERNEL_NAME}" -o "${KERNEL_NAME}" = "-aufs_friendly" ]; then @@ -28,7 +30,7 @@ post_install () { post_upgrade() { pacman -Q grub &>/dev/null hasgrub=$? - pacman -Q grub2 &>/dev/null + pacman -Q grub2-common &>/dev/null hasgrub2=$? pacman -Q lilo &>/dev/null haslilo=$? @@ -51,8 +53,10 @@ post_upgrade() { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." - mkinitcpio -p linux-libre${KERNEL_NAME} + if command -v mkinitcpio 2>&1 > /dev/null; then + echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." + mkinitcpio -p linux-libre${KERNEL_NAME} + fi } post_remove() { diff --git a/kernels/linux-libre-aufs_friendly/linux-libre-aufs_friendly.preset b/kernels/linux-libre-aufs_friendly/linux-libre-aufs_friendly.preset index c802eda83..c802eda83 100644..100755 --- a/kernels/linux-libre-aufs_friendly/linux-libre-aufs_friendly.preset +++ b/kernels/linux-libre-aufs_friendly/linux-libre-aufs_friendly.preset |