summaryrefslogtreecommitdiff
path: root/kernels/linux-libre-xen
diff options
context:
space:
mode:
Diffstat (limited to 'kernels/linux-libre-xen')
-rw-r--r--kernels/linux-libre-xen/PKGBUILD79
-rw-r--r--kernels/linux-libre-xen/config2
-rw-r--r--kernels/linux-libre-xen/linux.install (renamed from kernels/linux-libre-xen/linux-libre-xen.install)2
-rw-r--r--kernels/linux-libre-xen/linux.preset14
4 files changed, 58 insertions, 39 deletions
diff --git a/kernels/linux-libre-xen/PKGBUILD b/kernels/linux-libre-xen/PKGBUILD
index e4b0e6716..710e431cd 100644
--- a/kernels/linux-libre-xen/PKGBUILD
+++ b/kernels/linux-libre-xen/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 219731 2014-08-14 06:02:01Z tpowa $
+# $Id$
# Contributor (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Contributor (Arch): Thomas Baechler <thomas@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>
@@ -8,29 +8,33 @@
# Contributor: Márcio Silva <coadde@parabola.nu>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
-pkgbase=linux-libre-xen # Build stock -libre-xen kernel
-#pkgbase=linux-libre-custom # Build kernel with a different name
-_basekernel=3.16
-pkgver=${_basekernel}.1
+pkgbase=linux-libre-xen # Build stock -xen kernel
+_pkgbasever=3.16-gnu
+_pkgver=3.16.1-gnu
+
+_replaces=('kernel26%' 'kernel26-libre%' 'linux%' 'linux-libre%-kmod-alx') # '%' gets replaced with _kernelname
+
+_srcname=linux-${_pkgbasever%-*}
+pkgver=${_pkgver//-/.}
pkgrel=1
arch=('i686')
url="http://linux-libre.fsfla.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
options=('!strip')
-source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz"
- "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz"
+source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasekernel}/linux-libre-${_pkgbasekernel}.tar.xz"
+ "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_basekernel}-${_pkgver}.xz"
# the main kernel config files
'config'
# standard config files for mkinitcpio ramdisk
- "${pkgbase}.preset"
+ 'linux.preset'
'logo_linux_'{clut224.ppm,vga16.ppm,mono.pbm}
'change-default-console-loglevel.patch'
'compal-laptop-hwmon-fix.patch')
sha256sums=('9c2a524c901febe0f0138f702bfdeb52d6f79f22c1fdbabaa37580bc70f16218'
'3bbc78694d76b12b6229799d7c4daf5215b9dd731908d96b03603aceb54ad5c7'
'285ba206830c2ab24336133de87351d4ecf5483563d4bb2493eb7ea0cb74e43d'
- '7a475ada892857397cf80d2de777825ae94758dc2d9dfa3754ae3d670f4a2f02'
+ 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'074b67818582874146c389c029bc43648d145891a27e47aa2c5c42d3571f0264'
'2e87a8ec1cc0c91938cac24992d8a3d4362b3e9d939767e4c9d2ec8e6d969d53'
'f67f60a30bcf2e9a2ba88ad97cace308da7a7f94919bb95c3dc030f5885a8015'
@@ -38,13 +42,14 @@ sha256sums=('9c2a524c901febe0f0138f702bfdeb52d6f79f22c1fdbabaa37580bc70f16218'
'f36f61a0a72bcb0a9c04264343503bfbf927c9ea0db819e66734a3933b060588')
_kernelname=${pkgbase#linux-libre}
-_localversionname=-libre-xen
+_replaces=("${_replaces[@]/\%/${_kernelname}}")
prepare() {
- cd "${srcdir}/linux-${_basekernel}"
+ cd "${srcdir}/${_srcname}"
- if [ "${_basekernel}" != "${pkgver}" ]; then
- patch -p1 -i "${srcdir}/patch-${_basekernel}-gnu-${pkgver}-gnu"
+ # add upstream patch
+ if [ "${_pkgbasever}" != "${_pkgver}" ]; then
+ patch -p1 -i "${srcdir}/patch-${_pkgbasever}-${_pkgver}"
fi
# add freedo as boot logo
@@ -65,12 +70,12 @@ prepare() {
cat "${srcdir}/config" > ./.config # simpler
if [ "${_kernelname}" != "" ]; then
- sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_localversionname}\"|g" ./.config
+ sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|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
+ # append pkgrel to extraversion
+ sed -ri "s|^(EXTRAVERSION =.*\S).*|\1-${pkgrel}|" Makefile
# don't run depmod on 'make install'. We'll do this ourselves in packaging
sed -i '2iexit 0' scripts/depmod.sh
@@ -91,23 +96,23 @@ prepare() {
}
build() {
- cd "${srcdir}/linux-${_basekernel}"
+ cd "${srcdir}/${_srcname}"
make ${MAKEFLAGS} LOCALVERSION= bzImage modules
}
_package() {
- pkgdesc="The ${pkgbase^} kernel and modules with Xen guest support"
+ pkgdesc="The ${pkgbase/linux/Linux} kernel and modules"
[ "${pkgbase}" = "linux-libre" ] && groups=('base')
- depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7')
+ depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country')
- provides=("kernel26${_kernelname}=${pkgver}" "linux${_kernelname}=${pkgver}")
- conflicts=("kernel26${_kernelname}" "kernel26-libre${_kernelname}" "linux${_kernelname}")
- replaces=("kernel26${_kernelname}" "kernel26-libre${_kernelname}" "linux${_kernelname}")
+ provides=( "${_replaces[@]/%/=${pkgver}}")
+ conflicts=("${_replaces[@]}")
+ replaces=( "${_replaces[@]}")
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
- install=${pkgbase}.install
+ install=linux.install
- cd "${srcdir}/linux-${_basekernel}"
+ cd "${srcdir}/${_srcname}"
KARCH=x86
@@ -129,9 +134,9 @@ _package() {
-i "${startdir}/${install}"
# install mkinitcpio preset file for kernel
- install -D -m644 "${srcdir}/${pkgbase}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
+ install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
sed \
- -e "1s|'linux*.*'|'${pkgbase}'|" \
+ -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\"|" \
@@ -144,10 +149,10 @@ _package() {
# 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}${_localversionname:--libre-xen}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
+ ln -s "../extramodules-${_basekernel}${_kernelname}" "${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}${_localversionname:--libre-xen}"
- echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_localversionname:--libre-xen}/version"
+ mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}"
+ echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}/version"
# Now we call depmod...
depmod -b "${pkgdir}" -F System.map "${_kernver}"
@@ -162,13 +167,13 @@ _package() {
_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")
+ provides=( "${_replaces[@]/%/-headers=${pkgver}}")
+ conflicts=("${_replaces[@]/%/-headers}")
+ replaces=( "${_replaces[@]/%/-headers}")
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
- cd "${srcdir}/linux-${_basekernel}"
+ cd "${srcdir}/${_srcname}"
install -D -m644 Makefile \
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
install -D -m644 kernel/Makefile \
@@ -281,11 +286,11 @@ _package-headers() {
_package-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase^} kernel"
- provides=("kernel26${_kernelname}-docs=${pkgver}" "linux${_kernelname}-docs=${pkgver}")
- conflicts=("kernel26${_kernelname}-docs" "kernel26-libre${_kernelname}-docs" "linux${_kernelname}-docs")
- replaces=("kernel26${_kernelname}-docs" "kernel26-libre${_kernelname}-docs" "linux${_kernelname}-docs")
+ provides=( "${_replaces[@]/%/-docs=${pkgver}}")
+ conflicts=("${_replaces[@]/%/-docs}")
+ replaces=( "${_replaces[@]/%/-docs}")
- cd "${srcdir}/linux-${_basekernel}"
+ cd "${srcdir}/${_srcname}"
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build"
cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"
diff --git a/kernels/linux-libre-xen/config b/kernels/linux-libre-xen/config
index 5f73893f3..de57c71a1 100644
--- a/kernels/linux-libre-xen/config
+++ b/kernels/linux-libre-xen/config
@@ -49,7 +49,7 @@ CONFIG_BUILDTIME_EXTABLE_SORT=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
# CONFIG_COMPILE_TEST is not set
-CONFIG_LOCALVERSION="-libre-xen"
+CONFIG_LOCALVERSION="-xen"
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
diff --git a/kernels/linux-libre-xen/linux-libre-xen.install b/kernels/linux-libre-xen/linux.install
index 388c1172e..32514d892 100644
--- a/kernels/linux-libre-xen/linux-libre-xen.install
+++ b/kernels/linux-libre-xen/linux.install
@@ -1,7 +1,7 @@
# arg 1: the new package version
# arg 2: the old package version
-KERNEL_NAME=-xen
+KERNEL_NAME=
KERNEL_VERSION=
post_install () {
diff --git a/kernels/linux-libre-xen/linux.preset b/kernels/linux-libre-xen/linux.preset
new file mode 100644
index 000000000..b06292d10
--- /dev/null
+++ b/kernels/linux-libre-xen/linux.preset
@@ -0,0 +1,14 @@
+# mkinitcpio preset file for the 'linux' package
+
+ALL_config="/etc/mkinitcpio.conf"
+ALL_kver="/boot/vmlinuz-linux"
+
+PRESETS=('default' 'fallback')
+
+#default_config="/etc/mkinitcpio.conf"
+default_image="/boot/initramfs-linux.img"
+#default_options=""
+
+#fallback_config="/etc/mkinitcpio.conf"
+fallback_image="/boot/initramfs-linux-fallback.img"
+fallback_options="-S autodetect"