summaryrefslogtreecommitdiff
path: root/libre/linux-libre/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre/PKGBUILD')
-rw-r--r--libre/linux-libre/PKGBUILD82
1 files changed, 76 insertions, 6 deletions
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index 6611a4b2d..f0ee6f87d 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -4,6 +4,7 @@
# Contributor: Michał Masłowski <mtjm@mtjm.eu>
# Contributor: Márcio Silva <coadde@parabola.nu>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: Luke R. <g4jc@openmailbox.org>
# Based on linux package
@@ -15,12 +16,14 @@ _pkgver=4.1.6-gnu
_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
_replacesoldkernels=('kernel26%' 'kernel26-libre%') # '%' gets replaced with _kernelname
_replacesoldmodules=('linux-libre%-kmod-alx') # '%' gets replaced with _kernelname
+_replacesarcharmkernel=('linux%-armv7' 'linux%-armv7-smileplug' 'linux%-armv7-mirabox' 'linux%-armv7-ax3' 'linux%-armv7-d3plug' 'linux%-armv7-cubox') # '%' gets replaced with _kernelname
_srcname=linux-${_pkgbasever%-*}
_archpkgver=${_pkgver%-*}
pkgver=${_pkgver//-/_}
pkgrel=1
-arch=('i686' 'x86_64')
+rcnrel=armv7-x2
+arch=('i686' 'x86_64' 'armv7h')
url="http://linux-libre.fsfla.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
@@ -36,11 +39,21 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/li
"https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm"
"https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm.sig"
# the main kernel config files
- 'config.i686' 'config.x86_64'
+ 'config.i686' 'config.x86_64' 'config.armv7h'
# standard config files for mkinitcpio ramdisk
'linux.preset'
'change-default-console-loglevel.patch'
- '0001-drm-radeon-Make-the-driver-load-without-the-firmwares.patch')
+ '0001-drm-radeon-Make-the-driver-load-without-the-firmwares.patch'
+ # armv7h patches
+ "http://rcn-ee.com/deb/sid-armhf/v${_pkgver%-*}-${rcnrel}/patch-${_pkgver%-*}-${rcnrel}.diff.gz"
+ '0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch'
+ '0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch'
+ '0003-SMILE-Plug-device-tree-file.patch'
+ '0004-fix-mvsdio-eMMC-timing.patch'
+ '0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch'
+ '0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch'
+ '0007-set-default-cubietruck-led-triggers.patch'
+ '0008-USB-armory-support.patch')
sha256sums=('48b2e5ea077d0a0bdcb205e67178e8eb5b2867db3b2364b701dbc801d9755324'
'SKIP'
'335d3e07319ddf393c69e047c27bc5d28ee9e6126282619e3364db56a4331d34'
@@ -53,9 +66,19 @@ sha256sums=('48b2e5ea077d0a0bdcb205e67178e8eb5b2867db3b2364b701dbc801d9755324'
'SKIP'
'7ec6927f4a4bc8e1aa50adfcce868f04b07b0de19a54554a8ad27ee0341b4b45'
'ac457bf24c83a4af82251a67cb3de06f0b73e66bd08c2fb1eb936caa3b555c6f'
+ '455971ce7690c15a7983a2cc75271c4095df6dda5bfee41cc052b0706422fa3b'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
- '38cf6bdf70dc070ff0b785937d99347bb91f8531ea2bcca50283c8923a184c6d')
+ '38cf6bdf70dc070ff0b785937d99347bb91f8531ea2bcca50283c8923a184c6d'
+ '355619b37022d70a42fd0fee0d7ef4f5c972641083711bb7ee0543f4ee36b48e'
+ '203b07cc241f2374d1e18583fc9940cc69da134f992bff65a8b376c717aa7ea7'
+ '28fb8c937c2a0dc824ea755efba26ac5a4555f9a97d79f4e31f24b23c5eae59c'
+ '39bfd7f6e2df0b87b52488462edb2fbcfaf9e3eb2a974fc7b3bc22147352fece'
+ '59444ed7dce62697f1c35be340b740899e1d71398b334c419ad07cea838c6ed6'
+ '90cff98e43322e79c8d8b1c6456a328650f6af3ebf018086a82ab690a688da5d'
+ 'ed6cf79434d3b1c10e0e141ab6bdc2aa9abfe7e7df6bbb24b2097c0e0d62ac17'
+ '2c3df3d9a3d8fe11fefc485167a81c6fc53635b04ba0312bef144505dc0a6ce4'
+ '0f6b0146096ee7a04938d39a013c23cfd8719f3bef0956b5c88a33e7d7ecafdc')
validpgpkeys=(
'474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
'684D54A189305A9CC95446D36B888913DDB59515' # Márcio Silva
@@ -65,9 +88,11 @@ _kernelname=${pkgbase#linux-libre}
_replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}")
_replacesoldkernels=("${_replacesoldkernels[@]/\%/${_kernelname}}")
_replacesoldmodules=("${_replacesoldmodules[@]/\%/${_kernelname}}")
+_replacesarcharmkernel=("${_replacesarcharmkernel[@]/\%/${_kernelname}}")
case "$CARCH" in
i686|x86_64) KARCH=x86;;
+ armv7h) KARCH=arm;;
esac
prepare() {
@@ -78,6 +103,23 @@ prepare() {
patch -p1 -i "${srcdir}/patch-${_pkgbasever}-${_pkgver}"
fi
+ # add armv7h patches
+ if [ "${CARCH}" == "armv7h" ]; then
+
+ # RCN patch
+ patch -p1 -i "${srcdir}/patch-${pkgver%.0}-${rcnrel}.diff"
+
+ # ALARM patches
+ patch -p1 -i "${srcdir}/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch
+ patch -p1 -i "${srcdir}/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch
+ patch -p1 -i "${srcdir}/0003-SMILE-Plug-device-tree-file.patch
+ patch -p1 -i "${srcdir}/0004-fix-mvsdio-eMMC-timing.patch
+ patch -p1 -i "${srcdir}/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
+ patch -p1 -i "${srcdir}/0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch
+ patch -p1 -i "${srcdir}/0007-set-default-cubietruck-led-triggers.patch
+ patch -p1 -i "${srcdir}/0008-USB-armory-support.patch
+ fi
+
# add freedo as boot logo
install -m644 -t drivers/video/logo \
"${srcdir}/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}
@@ -129,8 +171,18 @@ _package() {
depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country')
provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}")
- conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
- replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
+ conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}")
+ replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}")
+ if [ "$CARCH" != "armv7h" ]; then
+ provides+=("${_replacesoldmodules[@]}")
+ conflicts+=("${_replacesoldmodules[@]}")
+ replaces+=("${_replacesoldmodules[@]}")
+ fi
+ if [ "$CARCH" = "armv7h" ]; then
+ provides+=("${_replacesarcharmkernel[@]}")
+ conflicts+=("${_replacesarcharmkernel[@]}")
+ replaces+=("${_replacesarcharmkernel[@]}")
+ fi
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=linux.install
@@ -188,6 +240,11 @@ _package-headers() {
provides=("${_replacesarchkernel[@]/%/-headers=${_archpkgver}}")
conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
+ if [ "$CARCH" = "armv7h" ]; then
+ provides+=("${_replacesarcharmkernel[@]/%/-headers}")
+ conflicts+=("${_replacesarcharmkernel[@]/%/-headers}")
+ replaces+=("${_replacesarcharmkernel[@]/%/-headers}")
+ fi
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
@@ -209,6 +266,14 @@ _package-headers() {
# copy arch includes for external modules
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}"
cp -a arch/${KARCH}/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
+ if [ "$CARCH" = "armv7h" ]; then
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-omap2"
+ cp -a arch/${KARCH}/mach-omap2/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-omap2/"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-mvebu"
+ cp -a arch/${KARCH}/mach-mvebu/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/mach-mvebu/"
+ mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/plat-omap"
+ cp -a arch/${KARCH}/plat-omap/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/plat-omap/"
+ fi
# copy files necessary for later builds
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
@@ -308,6 +373,11 @@ _package-docs() {
provides=("${_replacesarchkernel[@]/%/-docs=${_archpkgver}}")
conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
+ if [ "$CARCH" = "armv7h" ]; then
+ provides+=("${_replacesarcharmkernel[@]/%/-docs}")
+ conflicts+=("${_replacesarcharmkernel[@]/%/-docs}")
+ replaces+=("${_replacesarcharmkernel[@]/%/-docs}")
+ fi
cd "${srcdir}/${_srcname}"