core/linux-raspberrypi to 4.9.11-1

This commit is contained in:
Kevin Mihelich 2017-02-21 03:14:27 +00:00
parent 02566aac1a
commit 131caa9de9
7 changed files with 910 additions and 5909 deletions

View file

@ -0,0 +1,11 @@
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/kernel*.img
Target = usr/lib/initcpio/*
[Action]
Description = Updating %PKGBASE% initcpios
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p %PKGBASE%

View file

@ -2,67 +2,40 @@
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
# NOTE: Packages replace linux-raspberrypi-latest, remove if that package comes back
buildarch=20
pkgbase=linux-raspberrypi
_commit=8d1dd639a4db6ccc416bb0a00afc7a8888018b3d
_commit=204050d0eafb565b68abf512710036c10ef1bd23
_srcname=linux-${_commit}
_kernelname=${pkgbase#linux}
_desc="Raspberry Pi"
pkgver=4.4.49
pkgver=4.9.11
pkgrel=1
bfqver=v7r11
arch=('armv6h' 'armv7h')
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"
"git+https://github.com/sfjro/aufs4-standalone.git#branch=aufs${pkgver%.*}"
"bfq1.patch::ftp://teambelgium.net/bfq/patches/${pkgver%.*}.0-${bfqver}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${pkgver%.*}.0.patch"
"bfq2.patch::ftp://teambelgium.net/bfq/patches/${pkgver%.*}.0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${pkgver%.*}.0.patch"
"bfq3.patch::ftp://teambelgium.net/bfq/patches/${pkgver%.*}.0-${bfqver}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${bfqver}-for.patch"
'https://archlinuxarm.org/builder/src/brcmfmac43430-sdio.bin' 'https://archlinuxarm.org/builder/src/brcmfmac43430-sdio.txt'
'config.txt'
'cmdline.txt'
'config.v6'
'config.v7')
md5sums=('2ece0422bcd59b3c39e4c575707e0244'
'SKIP'
'c1d7fcfe88edb658375089c0a9cc1811'
'953133d5e387de2ad79ac0ae5c27cb6b'
'f0387e673975e9f2a5e05136948edece'
'config'
'linux.preset'
'99-linux.hook')
md5sums=('f62fe930281bcf8e66d5704240093f76'
'4a410ab9a1eefe82e158d36df02b3589'
'8c3cb6d8f0609b43f09d083b4006ec5a'
'f95eb9c22c18722e30fc28a5640aeba5'
'7c6b37a1353caccf6d3786bb4161c218'
'60bc3624123c183305677097bcd56212'
'301693694819bb8d3b84fb9edaba5620'
'da2a7f5b987f2394cdd6d8f80e9d88ae')
'3137548caf1def6ba43c28ea74702017'
'552c43bf6c0225bc213b31ee942b7000'
'982f9184dfcfbe52110795cf73674334')
prepare() {
cd "${srcdir}/${_srcname}"
msg2 "AUFS patches"
cp -ru "${srcdir}/aufs4-standalone/Documentation" .
cp -ru "${srcdir}/aufs4-standalone/fs" .
cp -ru "${srcdir}/aufs4-standalone/include/uapi/linux/aufs_type.h" ./include/linux
cp -ru "${srcdir}/aufs4-standalone/include/uapi/linux/aufs_type.h" ./include/uapi/linux
patch -Np1 -i ../aufs4-standalone/aufs4-kbuild.patch
patch -Np1 -i ../aufs4-standalone/aufs4-base.patch
patch -Np1 -i ../aufs4-standalone/aufs4-mmap.patch
patch -Np1 -i ../aufs4-standalone/aufs4-standalone.patch
msg2 "Add BFQ patches"
patch -Np1 -i "${srcdir}/bfq1.patch"
patch -Np1 -i "${srcdir}/bfq2.patch"
patch -Np1 -i "${srcdir}/bfq3.patch"
msg "Prepare to build"
[[ $CARCH == "armv6h" ]] && cat "${srcdir}/config.v6" > ./.config
[[ $CARCH == "armv7h" ]] && cat "${srcdir}/config.v7" > ./.config
cat "${srcdir}/config" > ./.config
# add pkgrel to extraversion
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
@ -101,15 +74,14 @@ build() {
#yes "" | make config
msg "Building!"
make ${MAKEFLAGS} zImage modules dtbs
}
_package() {
pkgdesc="The Linux Kernel and modules - ${_desc}"
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.16')
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country')
provides=('kernel26' "linux=${pkgver}" 'aufs_friendly')
provides=('kernel26' "linux=${pkgver}")
conflicts=('kernel26' 'linux')
install=${pkgname}.install
backup=('boot/config.txt' 'boot/cmdline.txt')
@ -126,8 +98,10 @@ _package() {
make INSTALL_MOD_PATH="${pkgdir}" modules_install
make INSTALL_DTBS_PATH="${pkgdir}/boot" dtbs_install
[[ $CARCH == "armv6h" ]] && perl scripts/mkknlimg --dtok arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel.img"
[[ $CARCH == "armv7h" ]] && perl scripts/mkknlimg --dtok arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel7.img"
[[ $CARCH == "armv6h" ]] && perl scripts/mkknlimg --dtok arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel.img" \
&& rm -f "${pkgdir}"/boot/bcm{2836,2709,2710}*.dtb
[[ $CARCH == "armv7h" ]] && perl scripts/mkknlimg --dtok arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel7.img" \
&& rm -f "${pkgdir}"/boot/bcm{2835,2708}*.dtb
cp arch/$KARCH/boot/dts/overlays/README "${pkgdir}/boot/overlays"
# set correct depmod command for install
@ -136,17 +110,26 @@ _package() {
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
-i "${startdir}/${pkgname}.install"
# 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"
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
# gzip -9 all modules to save 100MB of space
find "${pkgdir}" -name '*.ko' |xargs -P 2 -n 1 gzip -9
# make room for external modules
ln -s "../extramodules-${pkgver}-${_kernelname:-ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
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-${pkgver}-${_kernelname:-ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${pkgver}-${_kernelname:-ARCH}/version"
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
# Now we call depmod...
depmod -b "$pkgdir" -F System.map "$_kernver"
@ -178,18 +161,13 @@ _package-headers() {
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
for i in acpi asm-generic config crypto drm generated keys linux math-emu \
media net pcmcia scsi sound trace uapi video xen; do
media net pcmcia scsi soc sound trace uapi video xen; do
cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
done
[[ $CARCH == "armv6h" ]] && MACH="mach-bcm2708"
[[ $CARCH == "armv7h" ]] && MACH="mach-bcm2709"
# copy arch includes for external modules
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH
cp -a arch/$KARCH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/
mkdir -p ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/$MACH
cp -a arch/$KARCH/$MACH/include ${pkgdir}/usr/lib/modules/${_kernver}/build/arch/$KARCH/$MACH/
# copy files necessary for later builds, like nvidia and vmware
cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"

View file

@ -1,3 +1,4 @@
# See /boot/overlays/README for all available options
gpu_mem=64
initramfs initramfs-linux.img followkernel

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=-raspberrypi
KERNEL_VERSION=3.18.3-1-ARCH
KERNEL_VERSION=4.9.11-1-ARCH
disable_cma() {
if [[ -f /boot/config.txt && $(grep '^cma' /boot/config.txt) != '' ]]; then
@ -44,3 +44,7 @@ post_upgrade() {
echo ""
fi
}
post_remove() {
rm -f boot/initramfs-linux.img
}

View file

@ -0,0 +1,10 @@
# mkinitcpio preset file for the linux-raspberrypi package
ALL_config="/etc/mkinitcpio.conf"
ALL_kver="4.10.0-rc4-1-ARCH"
PRESETS=('default')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_options=""