summaryrefslogtreecommitdiff
path: root/libre/linux-libre-hardened/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre-hardened/PKGBUILD')
-rw-r--r--libre/linux-libre-hardened/PKGBUILD88
1 files changed, 48 insertions, 40 deletions
diff --git a/libre/linux-libre-hardened/PKGBUILD b/libre/linux-libre-hardened/PKGBUILD
index 06ceda819..a17e4bedb 100644
--- a/libre/linux-libre-hardened/PKGBUILD
+++ b/libre/linux-libre-hardened/PKGBUILD
@@ -10,8 +10,8 @@
# Based on linux-hardened package
pkgbase=linux-libre-hardened
-_pkgbasever=4.13-gnu
-_pkgver=4.13.13-gnu
+_pkgbasever=4.14-gnu
+_pkgver=4.14.3-gnu
_hardenedver=a
_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
@@ -24,7 +24,7 @@ pkgver=${_pkgver//-/_}.${_hardenedver}
pkgrel=1
rcnrel=armv7-x2
arch=('i686' 'x86_64' 'armv7h')
-url="https://linux-libre.fsfla.org/"
+url="https://jxself.org/git/?p=linux-libre-hardened.git"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf')
makedepends_armv7h=('git')
@@ -37,14 +37,15 @@ source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/l
"https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm"{,.sig}
# the main kernel config files
'config.i686' 'config.x86_64' 'config.armv7h'
- # pacman hook for initramfs regeneration
+ # pacman hooks for initramfs regeneration
+ '60-linux.hook'
'90-linux.hook'
# standard config files for mkinitcpio ramdisk
'linux.preset'
'0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch'
'0002-fix-Atmel-maXTouch-touchscreen-support.patch'
# armv7h patches
- "https://repo.parabola.nu/other/rcn-libre-hardened/patches/${_pkgver%-*}/rcn-libre-hardened-${_pkgver%-*}-${rcnrel}.patch"{,.sig}
+ "https://repo.parabola.nu/other/rcn-libre/patches/${_pkgver%-*}/rcn-libre-${_pkgver%-*}-${rcnrel}.patch"{,.sig}
'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'
@@ -54,11 +55,11 @@ source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/l
'0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch'
'0008-disable-USB3-port-on-ODROID-XU.patch'
'0009-ARM-dove-enable-ethernet-on-D3Plug.patch')
-sha512sums=('9ad6866c68f29f7e4f8b53d0b857f9b3c7f6abd0054460675c76f3100db34a77c2777d7f4191831008b532cb2ab6f686d8c4f457a4d005226c73f90937963518'
+sha512sums=('0d4b0b8ec1ffc39c59295adf56f6a2cccf77cad56d8a8bf8072624bbb52ba3e684147ebed91d1528d2685423dd784c5fca0f3650f874f2b93cfc6b7689b9a87f'
'SKIP'
- '9c4e753de1865778a5bdece95ed4487cedf55d23d383640ec3616db4b631e971bf1ac21d7019677dde2dbd9d7469ea20f58a7b11496f7e56d6c0162bcf2d657a'
+ 'efa3d7de4ce50cff18cbf53b482a1368450c6a395e401ff98e6f34da4bfeff63d5fc5bc56a17ce5fd041d818cf7767b2611270f4e1c7adc52063b6abadf0e70d'
'SKIP'
- '979dfd464353980de9c2166bb0fca041fa5faef0a2365678632bae94693a1de1d0867239f08cdc76bb3672a1eeaec280511c24470092f77a265fe140864704ac'
+ 'ff6b322039f1dda054cb18e6d681989c40f183d85e7ab68380d3c010345d15dc89e65a102e22fb175c20c33027496593db739348935305cdcf8c6a1ccb0db99c'
'SKIP'
'13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
'SKIP'
@@ -69,11 +70,12 @@ sha512sums=('9ad6866c68f29f7e4f8b53d0b857f9b3c7f6abd0054460675c76f3100db34a77c27
'd4f82526711779b15ac21acab8f9bdec46569a9c2712ccda334afdd975ab4aa21162481576e5fc938a59a35ea2208d1053cdb08bf0e14954146d0fbcb2358851'
'915b339d4633bf31c2d3a2c953ad099173af58dd19369973adafe7f3d6fcfa430a86178757f87e28f064ee65249135628e2b5eaf541542838a0854966a98ddfc'
'2836a1f184033eb8a6abea1d620260b52b25fb989c67b7fc0614d6275457b4efa10ad6be40510c01868b7e1e4c505fad9ecb02dd2a9936d31d14f77439856b1b'
- 'd6faa67f3ef40052152254ae43fee031365d0b1524aa0718b659eb75afc21a3f79ea8d62d66ea311a800109bed545bc8f79e8752319cd378eef2cbd3a09aba22'
+ '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a'
+ '4a8b324aee4cccf3a512ad04ce1a272d14e5b05c8de90feb82075f55ea3845948d817e1b0c6f298f5816834ddd3e5ce0a0e2619866289f3c1ab8fd2f35f04f44'
'2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
'02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af'
'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168'
- '32533b4e3c3c16db4794b9f0de56ce61ee27e40adea422732f596328c9a01f85dce5a3347f7a3b2326f0466cfd7667c3fde5adc90a14fb17ec652568ca8ce66b'
+ '258c3014fc3c4399c19e2385cdff6d28b5711ce4dfba5069199eac6c491ed34a98e693c78882aab87ae504e27f19b78a44255e55423505c96aa7f581fe336455'
'SKIP'
'8da49af5cce12f0bf21f5985cf85d13624404bab76cc0fd7a04b3ee6c046b5dceb4ae0bb821e060405366310473042892e716f530f04d1dab9a21ca1f778dd6c'
'06f40e0f197b15dffc7c724aba9a41f2343c8528576700202f069d5cd00013e7e5e8d62153cf358d02c21e28d7cf2a66e3f5190677cb590ac07f36be58b43cab'
@@ -201,7 +203,7 @@ _package() {
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
- mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
+ mkdir -p "${pkgdir}"/{boot,lib/{modules,firmware},usr}
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
if [ "${CARCH}" = "armv7h" ]; then
make LOCALVERSION= INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs/${pkgbase}" dtbs_install
@@ -210,46 +212,52 @@ _package() {
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
fi
- # set correct depmod command for install
- sed -e "s|%PKGBASE%|${pkgbase}|g;s|%KERNVER%|${_kernver}|g" \
- "${startdir}/${install}" > "${startdir}/${install}.pkg"
- true && install=${install}.pkg
-
- # install mkinitcpio preset file for kernel
- if [ "${CARCH}" = "armv7h" ]; then
- sed "s|/boot/vmlinuz-%PKGBASE%|${_kernver}|g
- s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" |
- install -D -m644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
- elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
- sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" |
- install -D -m644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
- fi
-
- # install pacman hook for initramfs regeneration
- sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/90-linux.hook" |
- install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
+ # make room for external modules
+ local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}"
+ ln -s "../${_extramodules}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
+
+ # add real version for building modules and running depmod from hook
+ echo "${_kernver}" |
+ install -Dm644 /dev/stdin "${pkgdir}/lib/modules/${_extramodules}/version"
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
+
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
- # make room for external modules
- 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}${_kernelname}"
- echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}/version"
-
- # Now we call depmod...
+
+ # now we call depmod...
depmod -b "${pkgdir}" -F System.map "${_kernver}"
+ if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
+ # add vmlinux
+ install -Dt "${pkgdir}/lib/modules/${_kernver}/build" -m644 vmlinux
+ fi
+
# move module tree /lib -> /usr/lib
mkdir -p "${pkgdir}/usr"
mv "${pkgdir}/lib" "${pkgdir}/usr/"
- if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
- # add vmlinux
- install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
- fi
+ # sed expression for following substitutions
+ local _subst="
+ s|%PKGBASE%|${pkgbase}|g
+ s|%KERNVER%|${_kernver}|g
+ s|%EXTRAMODULES%|${_extramodules}|g
+ "
+
+ # hack to allow specifying an initially nonexisting install file
+ sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
+ true && install=${install}.pkg
+
+ # install mkinitcpio preset file
+ sed "${_subst}" ../linux.preset |
+ install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
+
+ # install pacman hooks
+ sed "${_subst}" ../60-linux.hook |
+ install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
+ sed "${_subst}" ../90-linux.hook |
+ install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
}
_package-headers() {