summaryrefslogtreecommitdiff
path: root/kernels/linux-libre-rt
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-08-12 16:05:42 -0300
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-08-12 16:05:42 -0300
commit2052e1d69724e827ecc95194fd412b5e64994583 (patch)
tree18142b3319541932e1dab95206132ab86ca520b8 /kernels/linux-libre-rt
parent2067f05f8ba592770f68c980a93958d1f4999375 (diff)
downloadabslibre-2052e1d69724e827ecc95194fd412b5e64994583.tar.gz
abslibre-2052e1d69724e827ecc95194fd412b5e64994583.tar.bz2
abslibre-2052e1d69724e827ecc95194fd412b5e64994583.zip
linux-libre-rt-3.4.8_rt16-1: updating version
Diffstat (limited to 'kernels/linux-libre-rt')
-rw-r--r--kernels/linux-libre-rt/PKGBUILD108
-rw-r--r--kernels/linux-libre-rt/linux-libre-rt.install2
2 files changed, 68 insertions, 42 deletions
diff --git a/kernels/linux-libre-rt/PKGBUILD b/kernels/linux-libre-rt/PKGBUILD
index 7fb570f1b..57b6b615c 100644
--- a/kernels/linux-libre-rt/PKGBUILD
+++ b/kernels/linux-libre-rt/PKGBUILD
@@ -8,17 +8,15 @@
# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
-pkgbase=linux-libre-rt
-pkgname=('linux-libre-rt' 'linux-libre-rt-headers') # Build stock -LIBRE kernel with RT support
-# pkgname=linux-custom # Build kernel with a different name
-_kernelname=-LIBRE-RT
+pkgbase=linux-libre-rt # Build stock -LIBRE-RT kernel
+#pkgbase=linux-libre-custom # Build kernel with a different name
_basekernel=3.4
-_releasever=7
-_rtpatchver=rt15
+_releasever=8
+_rtpatchver=rt16
_pkgver=${_basekernel}.${_releasever}
pkgver=${_basekernel}.${_releasever}_${_rtpatchver}
-_lxopkgver=${_basekernel}.7 # nearly always the same as pkgver
pkgrel=1
+_lxopkgver=${_basekernel}.8 # nearly always the same as pkgver
arch=('i686' 'x86_64' 'mips64el')
url="http://linux-libre.fsfla.org/"
license=('GPL2')
@@ -30,7 +28,7 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn
# the main kernel config files
'config.i686' 'config.x86_64'
# standard config files for mkinitcpio ramdisk
- "${pkgname}.preset"
+ "${pkgbase}.preset"
'Kbuild'
'Kbuild.platforms'
'boot-logo.patch'
@@ -38,6 +36,9 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn
'i915-fix-ghost-tv-output.patch'
'3.4.4-fix-backlight-regression.patch'
"http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2")
+
+_kernelname=${pkgbase#linux-libre}
+_localversionname=-LIBRE-RT
md5sums=('a5e128ca059cceb8b69148b41ff4ac6f'
'f2b6c6a0929ba3a85b4263a9605de13a'
'140717a668c9dc266bd09595d4785d60'
@@ -103,7 +104,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
@@ -111,7 +112,8 @@ 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
@@ -131,15 +133,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
@@ -147,21 +156,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-rt() {
- pkgdesc="The Linux-libre Kernel and modules with realtime preemption"
+_package() {
+ pkgdesc="The ${pkgbase} kernel and modules with realtime preemption"
+ [ "${pkgbase}" = "linux-libre" ] && groups=('base')
depends=('coreutils' 'kmod')
optdepends=('crda: to set the correct wireless channels of your country')
- provides=('kernel26rt' "linux-rt=$pkgver")
- conflicts=('kernel26rt' 'linux-rt')
- replaces=('kernel26rt' 'linux-rt')
- 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')
@@ -175,35 +185,42 @@ package_linux-libre-rt() {
[ $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
@@ -225,11 +242,11 @@ package_linux-libre-rt() {
depmod -b "$pkgdir" -F System.map "$_kernver"
}
-package_linux-libre-rt-headers() {
- pkgdesc="Header files and scripts for building modules for linux-libre kernel with realtime preemption"
- provides=('kernel26rt-headers' "linux-rt-headers=${pkgver}")
- conflicts=('kernel26rt-headers' 'linux-rt-headers')
- replaces=('kernel26rt-headers' 'linux-rt-headers')
+_package-headers() {
+ pkgdesc="Header files and scripts for building modules for ${pkgbase} kernel with realtime preemption"
+ 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
@@ -237,7 +254,7 @@ package_linux-libre-rt-headers() {
# In case of repackaging this is empty
if [ -z "${_kernver}" ]; then
cd "${srcdir}/linux-${_basekernel}"
- _kernver="$(make kernelrelease)"
+ _kernver="$(make LOCALVERSION= kernelrelease)"
fi
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
@@ -375,3 +392,12 @@ package_linux-libre-rt-headers() {
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/mips
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-rt/linux-libre-rt.install b/kernels/linux-libre-rt/linux-libre-rt.install
index 8afaabeed..9321a1c8b 100644
--- a/kernels/linux-libre-rt/linux-libre-rt.install
+++ b/kernels/linux-libre-rt/linux-libre-rt.install
@@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=-rt
-KERNEL_VERSION=3.4.7-1-rt15-LIBRE-RT
+KERNEL_VERSION=3.4.8-1-rt16-LIBRE-RT
# set a sane PATH to ensure that critical utils like depmod will be found
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'