update: linux-aarch64-raspberrypi to 4.19.75.r791931.g642e12d892e6

This commit is contained in:
JerryXiao 2019-10-03 09:42:06 +08:00
parent 6bd03cf784
commit beefdd0b4c
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA
7 changed files with 706 additions and 1695 deletions

View file

@ -0,0 +1,12 @@
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 71f39410691b..f76b0bbc6f5d 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -31,6 +31,7 @@ fi
scm_version()
{
+ return
local short
short=false

View 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%

View file

@ -6,6 +6,6 @@ Target = boot/Image
Target = usr/lib/initcpio/* Target = usr/lib/initcpio/*
[Action] [Action]
Description = Updating %PKGBASE% initcpios Description = Updating %PKGBASE% initcpios...
When = PostTransaction When = PostTransaction
Exec = /usr/bin/mkinitcpio -p %PKGBASE% Exec = /usr/bin/mkinitcpio -p %PKGBASE%

View file

@ -1,51 +1,55 @@
# AArch64 kernel for RaspberryPi 3 # AArch64 kernel for RaspberryPi 3
# Original Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# Maintainer: Jerry Xiao <isjerryxiao at outlook dot com> # Maintainer: Jerry Xiao <isjerryxiao at outlook dot com>
buildarch=8 buildarch=8
pkgbase=linux-aarch64-raspberrypi pkgbase=linux-aarch64-raspberrypi
_srcname=linux _srcname=linux-4.19
_kernelname=${pkgbase#linux} _kernelname=${pkgbase#linux}
_desc="AArch64 kernel for RaspberryPi 3" _desc="AArch64 kernel for RaspberryPi 3"
pkgver=4.19.25.g7f26b4456f70 pkgver=4.19.75.r791931.g642e12d892e6
pkgrel=1 pkgrel=1
arch=('aarch64') arch=('aarch64')
url="https://github.com/raspberrypi/linux" url="https://github.com/raspberrypi/linux"
license=('GPL2') license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'uboot-tools' 'vboot-utils' 'dtc') makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'uboot-tools' 'vboot-utils' 'dtc')
options=('!strip') options=('!strip')
source=("git+https://github.com/raspberrypi/linux.git#branch=rpi-4.19.y" source=("${_srcname}::git+https://github.com/raspberrypi/linux.git#branch=rpi-4.19.y"
'config' 'config'
'0001-disable-scm-version.patch'
'linux.preset' 'linux.preset'
'99-linux.hook') '60-linux.hook'
'90-linux.hook')
md5sums=('SKIP' md5sums=('SKIP'
'8d69065f716d419a350953ee971b8775' '3a489f6118198344f5c07d6cfd117abc'
'06e904bf795a75f5bc74b8b000780467' 'b8a3b7cc32a8786114e29c41636979fc'
'1d4477026533efaa0358a40855d50a83') '41cb5fef62715ead2dd109dbea8413d6'
'ce6c81ad1ad1f8b333fd6077d47abdaf'
pkgver() { '3dc88030a8f2f5a5f97266d99b149f77')
cd "${srcdir}/${_srcname}"
printf "%s.g%s" "$(make kernelversion)" "$(git rev-parse --short HEAD)"
}
prepare() { prepare() {
cd "${srcdir}/${_srcname}" cd ${_srcname}
# disable scm version
patch -p1 < "../0001-disable-scm-version.patch"
cat "${srcdir}/config" > ./.config cat "${srcdir}/config" > ./.config
# add pkgrel to extraversion
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
# don't run depmod on 'make install'. We'll do this ourselves in packaging # don't run depmod on 'make install'. We'll do this ourselves in packaging
sed -i '2iexit 0' scripts/depmod.sh sed -i '2iexit 0' scripts/depmod.sh
} }
build() { pkgver() {
cd "${srcdir}/${_srcname}" cd "${srcdir}/${_srcname}"
kernelver="$(make kernelversion)"
printf "%s.r%s.g%s" "${kernelver%-*}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
# Dirty hack to get rid of the + in kernel version build() {
mv .git .git_1 cd ${_srcname}
# add pkgrel to extraversion
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
# get kernel version # get kernel version
make prepare make prepare
@ -83,11 +87,11 @@ _package() {
optdepends=('crda: to set the correct wireless channels of your country') optdepends=('crda: to set the correct wireless channels of your country')
provides=('kernel26' "linux=${pkgver}") provides=('kernel26' "linux=${pkgver}")
replaces=('linux-armv8') replaces=('linux-armv8')
conflicts=('linux' 'linux-aarch64') conflicts=('linux')
backup=("etc/mkinitcpio.d/${pkgbase}.preset") backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=${pkgname}.install install=${pkgname}.install
cd "${srcdir}/${_srcname}" cd ${_srcname}
KARCH=arm64 KARCH=arm64
@ -96,156 +100,112 @@ _package() {
_basekernel=${_kernver%%-*} _basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*} _basekernel=${_basekernel%.*}
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware} mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
make INSTALL_MOD_PATH="${pkgdir}" modules_install make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install make INSTALL_DTBS_PATH="${pkgdir}/boot/dtbs" dtbs_install
cp arch/$KARCH/boot/Image{,.gz} "${pkgdir}/boot" cp arch/$KARCH/boot/Image{,.gz} "${pkgdir}/boot"
# set correct depmod command for install # make room for external modules
sed \ local _extramodules="extramodules-${_basekernel}${_kernelname}"
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \ ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
-i "${startdir}/${pkgname}.install"
# install mkinitcpio preset file for kernel # add real version for building modules and running depmod from hook
install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" echo "${_kernver}" |
sed \ install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"
-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"
# remove build and source links # remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} rm "${pkgdir}"/usr/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"
# Now we call depmod... # now we call depmod...
depmod -b "$pkgdir" -F System.map "$_kernver" depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
# move module tree /lib -> /usr/lib
mkdir -p "${pkgdir}/usr"
mv "$pkgdir/lib" "$pkgdir/usr"
# add vmlinux # add vmlinux
install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux" install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
# 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"
} }
_package-headers() { _package-headers() {
pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}" pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}"
provides=("linux-headers=${pkgver}") provides=("linux-headers=${pkgver}")
replaces=('linux-armv8-headers') conflicts=('linux-headers')
conflicts=('linux-headers' 'linux-aarch64-headers')
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}" cd ${_srcname}
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
cd "${srcdir}/${_srcname}" install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
install -D -m644 Makefile \ install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
install -D -m644 kernel/Makefile \
"${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
install -D -m644 .config \
"${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include" mkdir "${_builddir}/.tmp_versions"
for i in acpi asm-generic clocksource config crypto drm generated keys linux \ cp -t "${_builddir}" -a include scripts
math-emu media net pcmcia scsi soc sound trace uapi video xen; do
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
done
# copy arch includes for external modules install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s arch/$KARCH/kernel/module.lds
cp -a arch/$KARCH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/
# copy files necessary for later builds, like nvidia and vmware cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build" mkdir -p "${_builddir}/arch/arm"
cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build" cp -t "${_builddir}/arch/arm" -a arch/arm/include
# fix permissions on scripts dir install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
# copy module linker script
cp arch/$KARCH/kernel/module.lds "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
# add dm headers
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
# add inotify.h
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
# add wireless headers
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/11194
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
# in reference to:
# http://bugs.archlinux.org/task/13146 # http://bugs.archlinux.org/task/13146
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/" install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
# add dvb headers
# in reference to:
# http://bugs.archlinux.org/task/20402 # http://bugs.archlinux.org/task/20402
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb" install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/" install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends" install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
# add xfs and shmem for aufs building # add xfs and shmem for aufs building
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs" mkdir -p "${_builddir}"/{fs/xfs,mm}
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
# copy in Kconfig files # copy in Kconfig files
for i in $(find . -name "Kconfig*"); do find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
done
chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
# strip scripts directory
find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
case "$(file -bi "${binary}")" in
*application/x-sharedlib*) # Libraries (.so)
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
*application/x-archive*) # Libraries (.a)
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
*application/x-executable*) # Binaries
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
esac
done
# remove unneeded architectures # remove unneeded architectures
rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,x86,xtensa} local _arch
for _arch in "${_builddir}"/arch/*/; do
[[ ${_arch} == */${KARCH}/ || ${_arch} == */arm/ ]] && continue
rm -r "${_arch}"
done
# remove files already in linux-docs package
rm -r "${_builddir}/Documentation"
# remove now broken symlinks
find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
# Fix permissions
chmod -R u=rwX,go=rX "${_builddir}"
# strip scripts directory
local _binary _strip
while read -rd '' _binary; do
case "$(file -bi "${_binary}")" in
*application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
*application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
*application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
*) continue ;;
esac
/usr/bin/strip ${_strip} "${_binary}"
done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
} }
pkgname=("${pkgbase}" "${pkgbase}-headers") pkgname=("${pkgbase}" "${pkgbase}-headers")

File diff suppressed because it is too large Load diff

View file

@ -1,27 +1,10 @@
# arg 1: the new package version
# arg 2: the old package version
KERNEL_NAME=-aarch64-raspberrypi
KERNEL_VERSION=4.12.5-1-ARCH
post_install () {
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
depmod ${KERNEL_VERSION}
}
post_upgrade() { post_upgrade() {
if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; 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." echo "WARNING: /boot appears to be a separate partition but is not mounted."
fi fi
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
depmod ${KERNEL_VERSION}
} }
post_remove() { post_remove() {
# also remove the compat symlinks
rm -f boot/initramfs-linux.img rm -f boot/initramfs-linux.img
rm -f boot/initramfs-linux-fallback.img rm -f boot/initramfs-linux-fallback.img
} }

View file

@ -1,7 +1,7 @@
# mkinitcpio preset file for the 'linux-aarch64-raspberrypi' package # mkinitcpio preset file for the '%PKGBASE%' package
ALL_config="/etc/mkinitcpio.conf" ALL_config="/etc/mkinitcpio.conf"
ALL_kver="4.3.0-1-ARCH" ALL_kver="%KERNVER%"
PRESETS=('default' 'fallback') PRESETS=('default' 'fallback')