core/linux-raspberrypi4 to 5.4.81-2

add aarch64 support for rpi4
This commit is contained in:
graysky 2020-12-10 12:37:08 -05:00
parent 05a24781c3
commit d6aed67fdf
6 changed files with 7890 additions and 17 deletions

View file

@ -0,0 +1,29 @@
From 988f69b247fa3a1b70876395342aeb8c7dc2e834 Mon Sep 17 00:00:00 2001
From: graysky <graysky@archlinux.us>
Date: Mon, 7 Dec 2020 13:03:40 -0500
Subject: [PATCH] Make /proc/cpuinfo consistent on arm64 and arm
Signed-off-by: graysky <graysky@archlinux.us>
---
arch/arm64/kernel/cpuinfo.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index 721350d21074..88e2b8fcd7e6 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -153,9 +153,8 @@ static int c_show(struct seq_file *m, void *v)
* "processor". Give glibc what it expects.
*/
seq_printf(m, "processor\t: %d\n", i);
- if (compat)
- seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
- MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);
+ seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
+ MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
loops_per_jiffy / (500000UL/HZ),
--
2.29.2

View file

@ -3,7 +3,7 @@
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
# Maintainer: graysky <graysky@archlinux.us>
buildarch=4
buildarch=12
pkgbase=linux-raspberrypi4
_commit=ffb90a8b06e5ebd6a918c56b44260c3dae8f3348
@ -11,37 +11,47 @@ _srcname=linux-${_commit}
_kernelname=${pkgbase#linux}
_desc="Raspberry Pi 4"
pkgver=5.4.81
pkgrel=1
arch=('armv7h')
pkgrel=2
arch=('armv7h' 'aarch64')
url="http://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
options=('!strip')
source=("https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz"
'config.txt'
'cmdline.txt'
'config'
'linux.preset'
'60-linux.hook'
'90-linux.hook')
'90-linux.hook'
0001-Make-proc-cpuinfo-consistent-on-arm64-and-arm.patch)
source_armv7h=('config' 'config.txt')
source_aarch64=('config8' 'config8.txt')
md5sums=('67d627bf708d9e04d6adbf712a651e71'
'7c6b37a1353caccf6d3786bb4161c218'
'60bc3624123c183305677097bcd56212'
'0fc39bc5d19ba8503011ab5e033de67d'
'86d4a35722b5410e3b29fc92dae15d4b'
'ce6c81ad1ad1f8b333fd6077d47abdaf'
'69e1db90d78f691dc446fe2ab94727eb')
'69e1db90d78f691dc446fe2ab94727eb'
'f66a7ea3feb708d398ef57e4da4815e9')
md5sums_armv7h=('fd469cad3472549e5a4b2cde99285d8d'
'7c6b37a1353caccf6d3786bb4161c218')
md5sums_aarch64=('80fb4289dfeca2f541416e5cf0dd3a81'
'1cac5b1e040fd4bd6535cb6d0ffe487c')
# setup vars
[[ $CARCH == "armv7h" ]] && _kernel=kernel7.img KARCH=arm _image=zImage _config=config _bconfig=config.txt
[[ $CARCH == "aarch64" ]] && _kernel=kernel8.img KARCH=arm64 _image=Image _config=config8 _bconfig=config8.txt
prepare() {
cd "${srcdir}/${_srcname}"
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
sed -i '2iexit 0' scripts/depmod.sh
patch -Np1 -i ../0001-Make-proc-cpuinfo-consistent-on-arm64-and-arm.patch
}
build() {
@ -71,7 +81,7 @@ build() {
#yes "" | make config
make ${MAKEFLAGS} zImage modules dtbs
make ${MAKEFLAGS} $_image modules dtbs
}
_package() {
@ -79,15 +89,13 @@ _package() {
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7' 'firmware-raspberrypi')
optdepends=('crda: to set the correct wireless channels of your country')
provides=('kernel26' "linux=${pkgver}")
conflicts=('kernel26' 'linux')
conflicts=('kernel26' 'linux' 'uboot-raspberrypi')
install=${pkgname}.install
backup=('boot/config.txt' 'boot/cmdline.txt')
replaces=('linux-raspberrypi-latest')
cd "${srcdir}/${_srcname}"
KARCH=arm
# get kernel version
_kernver="$(make kernelrelease)"
_basekernel=${_kernver%%-*}
@ -97,7 +105,8 @@ _package() {
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
make INSTALL_DTBS_PATH="${pkgdir}/boot" dtbs_install
cp arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel7.img"
cp arch/$KARCH/boot/$_image "${pkgdir}/boot/$_kernel"
cp arch/$KARCH/boot/dts/overlays/README "${pkgdir}/boot/overlays"
# make room for external modules
@ -132,7 +141,8 @@ _package() {
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
# install boot files
install -m644 ../config.txt ../cmdline.txt "${pkgdir}/boot"
install -m644 ../$_bconfig "${pkgdir}/boot/config.txt"
install -m644 ../cmdline.txt "${pkgdir}/boot"
}
_package-headers() {
@ -153,6 +163,7 @@ _package-headers() {
install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s arch/$KARCH/kernel/module.lds
#install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include

View file

@ -5930,7 +5930,7 @@ CONFIG_RTC_DRV_ISL12022=m
# CONFIG_RTC_DRV_ISL12026 is not set
CONFIG_RTC_DRV_X1205=m
CONFIG_RTC_DRV_PCF8523=m
CONFIG_RTC_DRV_PCF85063=m
# CONFIG_RTC_DRV_PCF85063 is not set
CONFIG_RTC_DRV_PCF85363=m
CONFIG_RTC_DRV_PCF8563=m
CONFIG_RTC_DRV_PCF8583=m

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,8 @@
# See /boot/overlays/README for all available options
gpu_mem=64
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
device_tree=broadcom/bcm2711-rpi-4-b.dtb
enable_gic=1

View file

@ -7,6 +7,15 @@ disable_cma() {
fi
}
correct_fstab() {
# starting with v5.10.y, fstab requires a padded zero in the path to /boot
if [[ -f /etc/fstab ]]; then
if grep -q mmcblk1p1 /scratch/fstab; then
sed -i 's/mmcblk1p1/mmcblk01p1/' /etc/fstab
fi
fi
}
post_install () {
disable_cma
}