mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
core/linux-raspberrypi to 5.10.63-14
This commit is contained in:
parent
6753de8dbb
commit
dbd80e62f8
5 changed files with 113 additions and 177 deletions
|
@ -1,12 +0,0 @@
|
|||
[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%
|
|
@ -1,12 +0,0 @@
|
|||
[Trigger]
|
||||
Type = File
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Target = boot/kernel.img
|
||||
Target = boot/kernel7.img
|
||||
Target = usr/lib/initcpio/*
|
||||
|
||||
[Action]
|
||||
Description = Updating %PKGBASE% initcpios...
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/mkinitcpio -p %PKGBASE%
|
|
@ -1,77 +1,64 @@
|
|||
# Maintainer: Dave Higham <pepedog@archlinuxarm.org>
|
||||
# Maintainer: graysky <graysky@archlinux.us>
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
|
||||
# Maintainer: graysky <graysky@archlinux.us>
|
||||
# Maintainer: Dave Higham <pepedog@archlinuxarm.org>
|
||||
# Contributer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
||||
|
||||
buildarch=20
|
||||
|
||||
pkgbase=linux-raspberrypi
|
||||
_commit=f694d1cfee63afaaa77e7d9e1f621a83e2f98846
|
||||
_commit=1faafd963e48eafb3abd555e13496a773d858b02
|
||||
_srcname=linux-${_commit}
|
||||
_kernelname=${pkgbase#linux}
|
||||
_desc="Raspberry Pi 2"
|
||||
_desc="Raspberry Pi 1 and 2"
|
||||
pkgver=5.10.63
|
||||
pkgrel=13
|
||||
arch=('armv6h' 'armv7h')
|
||||
pkgrel=14
|
||||
pkgdesc='Linux'
|
||||
url="http://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git')
|
||||
arch=(armv6h armv7h)
|
||||
license=(GPL2)
|
||||
makedepends=(
|
||||
bc kmod inetutils
|
||||
)
|
||||
options=('!strip')
|
||||
source=("https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz"
|
||||
'cmdline.txt'
|
||||
'linux.preset'
|
||||
'config.txt'
|
||||
'config'
|
||||
'60-linux.hook'
|
||||
'90-linux.hook')
|
||||
md5sums=('cb39469f07bcf3c3eb2509ed24231f9f'
|
||||
cmdline.txt
|
||||
config.txt
|
||||
config
|
||||
)
|
||||
md5sums=('8b6f5b06d5a252cbb06ea1b33ee45c25'
|
||||
'31c02f4518d46deb5f0c2ad1f8b083cd'
|
||||
'86d4a35722b5410e3b29fc92dae15d4b'
|
||||
'9669d916a5929a2eedbd64477f83d99e'
|
||||
'4e77a3c2e7dbf645f60fcc9217587dc6'
|
||||
'ce6c81ad1ad1f8b333fd6077d47abdaf'
|
||||
'69e1db90d78f691dc446fe2ab94727eb')
|
||||
'18d63f130f6e161aece55aea93b38e14')
|
||||
|
||||
# setup vars
|
||||
[[ $CARCH == "armv6h" ]] && _kernel=kernel.img
|
||||
[[ $CARCH == "armv7h" ]] && _kernel=kernel7.img
|
||||
_image=zImage
|
||||
_config=config
|
||||
_bconfig=config.txt
|
||||
KARCH=arm
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
cat "${srcdir}/config" > ./.config
|
||||
echo "Setting version..."
|
||||
scripts/setlocalversion --save-scmversion
|
||||
echo "-$pkgrel" > localversion.10-pkgrel
|
||||
echo "${pkgbase#linux}" > localversion.20-pkgname
|
||||
|
||||
# add pkgrel to extraversion
|
||||
sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile
|
||||
echo "Setting config..."
|
||||
cp ../"$_config" .config
|
||||
make olddefconfig
|
||||
|
||||
# don't run depmod on 'make install'. We'll do this ourselves in packaging
|
||||
sed -i '2iexit 0' scripts/depmod.sh
|
||||
make -s kernelrelease > version
|
||||
echo "Prepared $pkgbase version $(<version)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
# get kernel version
|
||||
make prepare
|
||||
|
||||
# load configuration
|
||||
# Configure the kernel. Replace the line below with one of your choice.
|
||||
#make menuconfig # CLI menu for configuration
|
||||
#make nconfig # new CLI menu for configuration
|
||||
#make xconfig # X-based configuration
|
||||
#make oldconfig # using old config from previous kernel version
|
||||
#make bcmrpi_defconfig # using RPi defconfig
|
||||
# ... or manually edit .config
|
||||
|
||||
# Copy back our configuration (use with new kernel version)
|
||||
#cp ./.config ../${pkgver}.config
|
||||
|
||||
####################
|
||||
# stop here
|
||||
# this is useful to configure the kernel
|
||||
#msg "Stopping build"
|
||||
#return 1
|
||||
####################
|
||||
|
||||
#yes "" | make config
|
||||
|
||||
make ${MAKEFLAGS} zImage modules dtbs
|
||||
make "$_image" modules dtbs
|
||||
}
|
||||
|
||||
_package() {
|
||||
|
@ -86,56 +73,29 @@ _package() {
|
|||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
KARCH=arm
|
||||
local kernver="$(<version)"
|
||||
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make kernelrelease)"
|
||||
_basekernel=${_kernver%%-*}
|
||||
_basekernel=${_basekernel%.*}
|
||||
# Used by mkinitcpio to name the kernel
|
||||
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
|
||||
|
||||
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" \
|
||||
&& rm -f "${pkgdir}"/boot/bcm{2836,2837,2838,2709,2710,2711}*.dtb
|
||||
[[ $CARCH == "armv7h" ]] && cp arch/$KARCH/boot/zImage "${pkgdir}/boot/kernel7.img" \
|
||||
&& rm -f "${pkgdir}"/boot/bcm{2835,2838,2708,2711}*.dtb
|
||||
cp arch/$KARCH/boot/dts/overlays/README "${pkgdir}/boot/overlays"
|
||||
|
||||
# make room for external modules
|
||||
local _extramodules="extramodules-${_basekernel}${_kernelname}"
|
||||
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
|
||||
|
||||
# add real version for building modules and running depmod from hook
|
||||
echo "${_kernver}" |
|
||||
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"
|
||||
echo "Installing modules..."
|
||||
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
|
||||
|
||||
# remove build and source links
|
||||
rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
|
||||
rm "$modulesdir"/{source,build}
|
||||
|
||||
# now we call depmod...
|
||||
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
|
||||
echo "Installing Arch ARM specific stuff..."
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
make INSTALL_DTBS_PATH="${pkgdir}/boot" dtbs_install
|
||||
|
||||
# sed expression for following substitutions
|
||||
local _subst="
|
||||
s|%PKGBASE%|${pkgbase}|g
|
||||
s|%KERNVER%|${_kernver}|g
|
||||
s|%EXTRAMODULES%|${_extramodules}|g
|
||||
"
|
||||
cp arch/$KARCH/boot/$_image "${pkgdir}/boot/$_kernel"
|
||||
cp arch/$KARCH/boot/dts/overlays/README "${pkgdir}/boot/overlays"
|
||||
install -m644 ../$_bconfig "${pkgdir}/boot/config.txt"
|
||||
install -m644 ../cmdline.txt "${pkgdir}/boot"
|
||||
|
||||
# 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"
|
||||
[[ $CARCH == "armv6h" ]] && rm -f "${pkgdir}"/boot/bcm{2836,2837,2838,2709,2710,2711}*.dtb
|
||||
[[ $CARCH == "armv7h" ]] && rm -f "${pkgdir}"/boot/bcm{2835,2838,2708,2711}*.dtb
|
||||
}
|
||||
|
||||
_package-headers() {
|
||||
|
@ -145,66 +105,75 @@ _package-headers() {
|
|||
replaces=('linux-raspberrypi-latest-headers')
|
||||
|
||||
cd ${_srcname}
|
||||
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
|
||||
|
||||
install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
|
||||
install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
|
||||
|
||||
mkdir "${_builddir}/.tmp_versions"
|
||||
|
||||
cp -t "${_builddir}" -a include scripts
|
||||
|
||||
install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
|
||||
install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s scripts/module.lds
|
||||
|
||||
cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
|
||||
|
||||
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
|
||||
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
|
||||
|
||||
# http://bugs.archlinux.org/task/13146
|
||||
install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||
|
||||
# http://bugs.archlinux.org/task/20402
|
||||
install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||
install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||
install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||
echo "Installing build files..."
|
||||
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
|
||||
localversion.* version
|
||||
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
||||
install -Dt "$builddir/arch/$KARCH" -m644 "arch/$KARCH/Makefile"
|
||||
cp -t "$builddir" -a scripts
|
||||
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p "${_builddir}"/{fs/xfs,mm}
|
||||
mkdir -p "$builddir"/{fs/xfs,mm}
|
||||
|
||||
# copy in Kconfig files
|
||||
find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
|
||||
echo "Installing headers..."
|
||||
cp -t "$builddir" -a include
|
||||
cp -t "$builddir/arch/$KARCH" -a "arch/$KARCH/include"
|
||||
install -Dt "$builddir/arch/$KARCH/kernel" -m644 "arch/$KARCH/kernel/asm-offsets.s"
|
||||
|
||||
# remove unneeded architectures
|
||||
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
|
||||
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
|
||||
|
||||
# https://bugs.archlinux.org/task/13146
|
||||
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||
|
||||
# https://bugs.archlinux.org/task/20402
|
||||
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||
|
||||
# https://bugs.archlinux.org/task/71392
|
||||
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
|
||||
|
||||
echo "Installing KConfig files..."
|
||||
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||
|
||||
echo "Removing unneeded architectures..."
|
||||
local _arch
|
||||
for _arch in "${_builddir}"/arch/*/; do
|
||||
[[ ${_arch} == */${KARCH}/ ]] && continue
|
||||
rm -r "${_arch}"
|
||||
for _arch in "$builddir"/arch/*/; do
|
||||
[[ $_arch = */"$KARCH"/ ]] && continue
|
||||
echo "Removing $(basename "$_arch")"
|
||||
rm -r "$_arch"
|
||||
done
|
||||
|
||||
# remove files already in linux-docs package
|
||||
rm -r "${_builddir}/Documentation"
|
||||
echo "Removing documentation..."
|
||||
rm -r "$builddir/Documentation"
|
||||
|
||||
# remove now broken symlinks
|
||||
find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
|
||||
echo "Removing broken symlinks..."
|
||||
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
|
||||
|
||||
# Fix permissions
|
||||
if ! chmod -R u=rwX,go=rX "${_builddir}"; then
|
||||
true
|
||||
fi
|
||||
echo "Removing loose objects..."
|
||||
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
|
||||
|
||||
# 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 ;;
|
||||
echo "Stripping build tools..."
|
||||
local file
|
||||
while read -rd '' file; do
|
||||
case "$(file -bi "$file")" in
|
||||
application/x-sharedlib\;*) # Libraries (.so)
|
||||
strip -v $STRIP_SHARED "$file" ;;
|
||||
application/x-archive\;*) # Libraries (.a)
|
||||
strip -v $STRIP_STATIC "$file" ;;
|
||||
application/x-executable\;*) # Binaries
|
||||
strip -v $STRIP_BINARIES "$file" ;;
|
||||
application/x-pie-executable\;*) # Relocatable binaries
|
||||
strip -v $STRIP_SHARED "$file" ;;
|
||||
esac
|
||||
/usr/bin/strip ${_strip} "${_binary}"
|
||||
done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
|
||||
done < <(find "$builddir" -type f -perm -u+x)
|
||||
|
||||
echo "Adding symlink..."
|
||||
mkdir -p "$pkgdir/usr/src"
|
||||
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
|
||||
}
|
||||
|
||||
pkgname=("${pkgbase}" "${pkgbase}-headers")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 5.10.52-4 Kernel Configuration
|
||||
# Linux/arm 5.10.63 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.2.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
|
@ -4087,7 +4087,7 @@ CONFIG_REGULATOR_GPIO=y
|
|||
# CONFIG_REGULATOR_PV88080 is not set
|
||||
# CONFIG_REGULATOR_PV88090 is not set
|
||||
# CONFIG_REGULATOR_PWM is not set
|
||||
# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set
|
||||
CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m
|
||||
# CONFIG_REGULATOR_RT4801 is not set
|
||||
# CONFIG_REGULATOR_RTMV20 is not set
|
||||
# CONFIG_REGULATOR_SLG51000 is not set
|
||||
|
@ -4548,6 +4548,7 @@ CONFIG_VIDEO_IMX290=m
|
|||
CONFIG_VIDEO_IMX477=m
|
||||
# CONFIG_VIDEO_IMX319 is not set
|
||||
# CONFIG_VIDEO_IMX355 is not set
|
||||
CONFIG_VIDEO_IMX519=m
|
||||
# CONFIG_VIDEO_OV2640 is not set
|
||||
# CONFIG_VIDEO_OV2659 is not set
|
||||
# CONFIG_VIDEO_OV2680 is not set
|
||||
|
@ -4978,7 +4979,7 @@ CONFIG_DRM_DISPLAY_CONNECTOR=m
|
|||
# CONFIG_DRM_SII9234 is not set
|
||||
CONFIG_DRM_SIMPLE_BRIDGE=m
|
||||
# CONFIG_DRM_THINE_THC63LVD1024 is not set
|
||||
# CONFIG_DRM_TOSHIBA_TC358762 is not set
|
||||
CONFIG_DRM_TOSHIBA_TC358762=m
|
||||
# CONFIG_DRM_TOSHIBA_TC358764 is not set
|
||||
# CONFIG_DRM_TOSHIBA_TC358767 is not set
|
||||
# CONFIG_DRM_TOSHIBA_TC358768 is not set
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
# mkinitcpio preset file for the '%PKGBASE%' package
|
||||
|
||||
ALL_config="/etc/mkinitcpio.conf"
|
||||
ALL_kver="%KERNVER%"
|
||||
|
||||
PRESETS=('default')
|
||||
|
||||
#default_config="/etc/mkinitcpio.conf"
|
||||
default_image="/boot/initramfs-linux.img"
|
||||
#default_options=""
|
Loading…
Reference in a new issue