summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2017-12-07 18:37:46 -0300
committerDavid P <megver83@parabola.nu>2017-12-07 18:37:46 -0300
commit6d997261814afd1b6034705d14042f5a84f7d740 (patch)
tree915d46b47a6ed755df78fce4c0d9c842a5921006
parent2b2be1f8782f406d4fc0205ef36c2bcafd5ed150 (diff)
downloadabslibre-6d997261814afd1b6034705d14042f5a84f7d740.tar.gz
abslibre-6d997261814afd1b6034705d14042f5a84f7d740.tar.bz2
abslibre-6d997261814afd1b6034705d14042f5a84f7d740.zip
Update libre/linux-libre pacman hooks and PKGBUILD
-rw-r--r--libre/linux-libre/60-linux.hook12
-rw-r--r--libre/linux-libre/90-linux.hook2
-rw-r--r--libre/linux-libre/PKGBUILD97
-rw-r--r--libre/linux-libre/linux.install20
4 files changed, 64 insertions, 67 deletions
diff --git a/libre/linux-libre/60-linux.hook b/libre/linux-libre/60-linux.hook
new file mode 100644
index 000000000..b33873c85
--- /dev/null
+++ b/libre/linux-libre/60-linux.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/modules/%KERNVER%/*
+Target = usr/lib/modules/%EXTRAMODULES%/*
+
+[Action]
+Description = Updating %PKGBASE% module dependencies...
+When = PostTransaction
+Exec = /usr/bin/depmod %KERNVER%
diff --git a/libre/linux-libre/90-linux.hook b/libre/linux-libre/90-linux.hook
index 985115199..be0d88653 100644
--- a/libre/linux-libre/90-linux.hook
+++ b/libre/linux-libre/90-linux.hook
@@ -6,6 +6,6 @@ Target = boot/vmlinuz-%PKGBASE%
Target = usr/lib/initcpio/*
[Action]
-Description = Updating %PKGBASE% initcpios
+Description = Updating %PKGBASE% initcpios...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index 547e3bd6f..f003167a7 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -1,5 +1,5 @@
# Maintainer: David P. <megver83@parabola.nu>
-# Maintainer: Jesús E. <heckyel@parabola.nu>
+# Maintainer: Bruno Cichoń <ebrasca@parabola.nu>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: fauno <fauno@parabola.nu>
@@ -37,23 +37,24 @@ 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/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'
- '0004-fix-mvsdio-eMMC-timing.patch'
- '0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch'
- '0006-set-default-cubietruck-led-triggers.patch'
- '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'
+ "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'
+ '0004-fix-mvsdio-eMMC-timing.patch'
+ '0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch'
+ '0006-set-default-cubietruck-led-triggers.patch'
+ '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=('0d4b0b8ec1ffc39c59295adf56f6a2cccf77cad56d8a8bf8072624bbb52ba3e684147ebed91d1528d2685423dd784c5fca0f3650f874f2b93cfc6b7689b9a87f'
'SKIP'
@@ -67,8 +68,9 @@ sha512sums=('0d4b0b8ec1ffc39c59295adf56f6a2cccf77cad56d8a8bf8072624bbb52ba3e6841
'SKIP'
'9b1a87dbaf4008ccfd1da7e1b358dcba771002f313fa4eb65ec979b537c2e2eee51aa8b06ef13f4ff3472e0d50d0fb22bc9284f358aa130d9f07e5f20ae0c8d5'
'1e60649cebaff3aa55838f0fe3dd7df513ee3076c85299c81036eb7be58cf35b41c3039b44110033a84bf57c2df4847cc3eee0142034d3f1002ac2b5a9fd7d00'
- '7797b1e5cbad4ed532ef883814ccc3096ac82f66384c369c0003381d5bf9aa0f758308c2263e4786dd185a48c2c8773c5d2733a538285567f1f37b39e00309e1'
- 'd6faa67f3ef40052152254ae43fee031365d0b1524aa0718b659eb75afc21a3f79ea8d62d66ea311a800109bed545bc8f79e8752319cd378eef2cbd3a09aba22'
+ '63588a0a8f9196812179fca839ec9a02f6e5f014a08162e5028e6eb3a129b9e1db1c375778aa7a9ee3965ce76ed1e03c0be4b22064e5697eed76e0916f9b712b'
+ '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a'
+ '4a8b324aee4cccf3a512ad04ce1a272d14e5b05c8de90feb82075f55ea3845948d817e1b0c6f298f5816834ddd3e5ce0a0e2619866289f3c1ab8fd2f35f04f44'
'2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
'02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af'
'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168'
@@ -192,7 +194,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
@@ -201,48 +203,51 @@ _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" ../linux.preset |
- install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
- elif [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
- sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" |
- install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
- fi
-
- # install pacman hook for initramfs regeneration
- sed "s|%PKGBASE%|${pkgbase}|g" ../90-linux.hook |
- install -Dm644 /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 "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -r "${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
- echo "${_kernver}" |
- install -Dm644 /dev/stdin "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}/version"
-
- # Now we call depmod...
+ # now we call depmod...
depmod -b "${pkgdir}" -F System.map "${_kernver}"
- # move module tree /lib -> /usr/lib
- mv -t "${pkgdir}/usr" "${pkgdir}/lib"
-
if [ "${CARCH}" = "x86_64" ] || [ "${CARCH}" = "i686" ]; then
# add vmlinux
- install -Dm644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
+ install -Dt "${pkgdir}/lib/modules/${_kernver}/build" -m644 vmlinux
fi
+
+ # move module tree /lib -> /usr/lib
+ mv -t "${pkgdir}/usr" "${pkgdir}/lib"
+
+ # 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() {
diff --git a/libre/linux-libre/linux.install b/libre/linux-libre/linux.install
index d13105b4b..510897956 100644
--- a/libre/linux-libre/linux.install
+++ b/libre/linux-libre/linux.install
@@ -1,31 +1,11 @@
-post_install () {
- # updating module dependencies
- echo ">>> Updating module dependencies. Please wait ..."
- depmod %KERNVER%
- if [ "$(uname -m)" = "armv7l" ]; then
- echo ">>> WARNING: Using this kernel requires an updated U-Boot!"
- fi
-}
-
post_upgrade() {
- # updating module dependencies
- echo ">>> Updating module dependencies. Please wait ..."
- depmod %KERNVER%
if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then
if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
echo "WARNING: /boot appears to be a separate partition but is not mounted."
fi
-
- if [ $(vercmp $2 3.13) -lt 0 ]; then
- echo ">>> WARNING: AT keyboard support is no longer built into the kernel."
- echo ">>> In order to use your keyboard during early init, you MUST"
- echo ">>> include the 'keyboard' hook in your mkinitcpio.conf."
- fi
- fi
}
post_remove() {
- # also remove the compat symlinks
rm -f boot/initramfs-%PKGBASE%.img
rm -f boot/initramfs-%PKGBASE%-fallback.img
}