mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
core/linux-raspberrypi to 4.14.83-2
This commit is contained in:
parent
a82877c07a
commit
5152164058
5 changed files with 50 additions and 51 deletions
12
core/linux-raspberrypi/60-linux.hook
Normal file
12
core/linux-raspberrypi/60-linux.hook
Normal file
|
@ -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%
|
|
@ -2,10 +2,11 @@
|
|||
Type = File
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = boot/kernel*.img
|
||||
Target = boot/kernel.img
|
||||
Target = boot/kernel7.img
|
||||
Target = usr/lib/initcpio/*
|
||||
|
||||
[Action]
|
||||
Description = Updating %PKGBASE% initcpios
|
||||
Description = Updating %PKGBASE% initcpios...
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
|
|
@ -10,7 +10,7 @@ _srcname=linux-${_commit}
|
|||
_kernelname=${pkgbase#linux}
|
||||
_desc="Raspberry Pi"
|
||||
pkgver=4.14.83
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('armv6h' 'armv7h')
|
||||
url="http://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
|
@ -21,13 +21,15 @@ source=("https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz"
|
|||
'cmdline.txt'
|
||||
'config'
|
||||
'linux.preset'
|
||||
'99-linux.hook')
|
||||
'60-linux.hook'
|
||||
'90-linux.hook')
|
||||
md5sums=('e31b8651e987c78283401b82785cf446'
|
||||
'7c6b37a1353caccf6d3786bb4161c218'
|
||||
'60bc3624123c183305677097bcd56212'
|
||||
'4f76d657e44c5dd90f38d8123086c300'
|
||||
'552c43bf6c0225bc213b31ee942b7000'
|
||||
'982f9184dfcfbe52110795cf73674334')
|
||||
'86d4a35722b5410e3b29fc92dae15d4b'
|
||||
'ce6c81ad1ad1f8b333fd6077d47abdaf'
|
||||
'69e1db90d78f691dc446fe2ab94727eb')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
@ -90,8 +92,8 @@ _package() {
|
|||
_basekernel=${_kernver%%-*}
|
||||
_basekernel=${_basekernel%.*}
|
||||
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware}
|
||||
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
|
||||
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
|
||||
make INSTALL_DTBS_PATH="${pkgdir}/boot" dtbs_install
|
||||
|
||||
[[ $CARCH == "armv6h" ]] && cp arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel.img" \
|
||||
|
@ -100,39 +102,36 @@ _package() {
|
|||
&& rm -f "${pkgdir}"/boot/bcm{2835,2708}*.dtb
|
||||
cp arch/$KARCH/boot/dts/overlays/README "${pkgdir}/boot/overlays"
|
||||
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||
-i "${startdir}/${pkgname}.install"
|
||||
# make room for external modules
|
||||
local _extramodules="extramodules-${_basekernel}${_kernelname}"
|
||||
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
|
||||
|
||||
# install mkinitcpio preset file for kernel
|
||||
install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||
sed \
|
||||
-e "1s|'linux.*'|'${pkgbase}'|" \
|
||||
-e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|" \
|
||||
-i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
|
||||
|
||||
# install pacman hook for initramfs regeneration
|
||||
sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/99-linux.hook" |
|
||||
install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/99-${pkgbase}.hook"
|
||||
# add real version for building modules and running depmod from hook
|
||||
echo "${_kernver}" |
|
||||
install -Dm644 /dev/stdin "${pkgdir}/usr/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:--ARCH}" "${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:--ARCH}"
|
||||
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
|
||||
rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
|
||||
|
||||
# Now we call depmod...
|
||||
depmod -b "$pkgdir" -F System.map "$_kernver"
|
||||
# now we call depmod...
|
||||
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
|
||||
|
||||
# move module tree /lib -> /usr/lib
|
||||
mkdir -p "${pkgdir}/usr"
|
||||
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||
# sed expression for following substitutions
|
||||
local _subst="
|
||||
s|%PKGBASE%|${pkgbase}|g
|
||||
s|%KERNVER%|${_kernver}|g
|
||||
s|%EXTRAMODULES%|${_extramodules}|g
|
||||
"
|
||||
|
||||
# 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"
|
||||
|
||||
# install boot files
|
||||
install -m644 ../config.txt ../cmdline.txt "${pkgdir}/boot"
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=-raspberrypi
|
||||
KERNEL_VERSION=4.9.11-1-ARCH
|
||||
|
||||
disable_cma() {
|
||||
if [[ -f /boot/config.txt && $(grep '^cma' /boot/config.txt) != '' ]]; then
|
||||
echo ">>> You appear to have dynamic memory (CMA) enabled, which is currently broken"
|
||||
|
@ -14,9 +8,6 @@ disable_cma() {
|
|||
}
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
disable_cma
|
||||
}
|
||||
|
||||
|
@ -28,10 +19,6 @@ post_upgrade() {
|
|||
fi
|
||||
fi
|
||||
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
|
||||
disable_cma
|
||||
|
||||
if [ "$(vercmp $2 3.18.3)" -lt 0 ]; then
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# mkinitcpio preset file for the linux-raspberrypi package
|
||||
# mkinitcpio preset file for the '%PKGBASE%' package
|
||||
|
||||
ALL_config="/etc/mkinitcpio.conf"
|
||||
ALL_kver="4.10.0-rc4-1-ARCH"
|
||||
ALL_kver="%KERNVER%"
|
||||
|
||||
PRESETS=('default')
|
||||
|
||||
|
|
Loading…
Reference in a new issue