mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
delete in prep for rename: core/linux-raspberrypi
This commit is contained in:
parent
02e41d742d
commit
dc6de4e985
8 changed files with 0 additions and 8490 deletions
|
@ -1,11 +0,0 @@
|
|||
[Trigger]
|
||||
Type = File
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Target = usr/lib/modules/%KERNVER%/*
|
||||
|
||||
[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,212 +0,0 @@
|
|||
# Maintainer: graysky <graysky@archlinux.us>
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
|
||||
# Maintainer: Dave Higham <pepedog@archlinuxarm.org>
|
||||
# Contributer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
||||
|
||||
buildarch=20
|
||||
|
||||
pkgbase=linux-raspberrypi
|
||||
_commit=f9bd396cd0f5f8c2026473f1e570deed3d08d350
|
||||
_srcname=linux-${_commit}
|
||||
_kernelname=${pkgbase#linux}
|
||||
_desc="RPi 1/2/Zero/Zero W"
|
||||
pkgver=5.10.81
|
||||
pkgrel=1
|
||||
pkgdesc='Linux'
|
||||
url="http://www.kernel.org/"
|
||||
arch=(armv6h armv7h)
|
||||
license=(GPL2)
|
||||
makedepends=(
|
||||
bc kmod inetutils
|
||||
)
|
||||
options=('!strip')
|
||||
source=("linux-$pkgver-$pkgrel-${_commit:0:10}.tar.gz::https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz"
|
||||
cmdline.txt
|
||||
config.txt
|
||||
config
|
||||
linux.preset
|
||||
60-linux.hook
|
||||
90-linux.hook
|
||||
)
|
||||
md5sums=('60734f75c54c6eae9e32a9c6aacc572e'
|
||||
'31c02f4518d46deb5f0c2ad1f8b083cd'
|
||||
'9669d916a5929a2eedbd64477f83d99e'
|
||||
'0de8feb422dbd1cb5561d86f3d063245'
|
||||
'86d4a35722b5410e3b29fc92dae15d4b'
|
||||
'0a5f16bfec6ad982a2f6782724cca8ba'
|
||||
'69e1db90d78f691dc446fe2ab94727eb')
|
||||
|
||||
# setup vars
|
||||
if [[ $CARCH == "armv6h" ]]; then
|
||||
_kernel=kernel.img
|
||||
elif [[ $CARCH == "armv7h" ]]; then
|
||||
_kernel=kernel7.img
|
||||
fi
|
||||
_image=zImage
|
||||
_config=config
|
||||
_bconfig=config.txt
|
||||
KARCH=arm
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
echo "Setting version..."
|
||||
scripts/setlocalversion --save-scmversion
|
||||
echo "-$pkgrel" > localversion.10-pkgrel
|
||||
echo "${pkgbase#linux}" > localversion.20-pkgname
|
||||
|
||||
echo "Setting config..."
|
||||
cp ../"$_config" .config
|
||||
make olddefconfig
|
||||
|
||||
make -s kernelrelease > version
|
||||
echo "Prepared $pkgbase version $(<version)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
make "$_image" modules dtbs
|
||||
}
|
||||
|
||||
_package() {
|
||||
pkgdesc="RPi Foundation patched Linux kernel and modules - ${_desc}"
|
||||
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}" 'WIREGUARD-MODULE')
|
||||
conflicts=('kernel26' 'linux')
|
||||
install=${pkgname}.install
|
||||
backup=('boot/config.txt' 'boot/cmdline.txt')
|
||||
replaces=('linux-raspberrypi-latest')
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
local kernver="$(<version)"
|
||||
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
|
||||
|
||||
# Used by mkinitcpio to name the kernel
|
||||
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
|
||||
|
||||
echo "Installing modules..."
|
||||
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
|
||||
|
||||
# remove build and source links
|
||||
rm "$modulesdir"/{source,build}
|
||||
|
||||
echo "Installing Arch ARM specific stuff..."
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
make INSTALL_DTBS_PATH="${pkgdir}/boot" dtbs_install
|
||||
|
||||
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"
|
||||
|
||||
if [[ $CARCH == "armv6h" ]]; then
|
||||
rm -f "${pkgdir}"/boot/bcm{2836,2837,2838,2709,2710,2711}*.dtb
|
||||
elif [[ $CARCH == "armv7h" ]]; then
|
||||
rm -f "${pkgdir}"/boot/bcm{2835,2838,2708,2711}*.dtb
|
||||
fi
|
||||
|
||||
# sed expression for following substitutions
|
||||
local _subst="
|
||||
s|%PKGBASE%|${pkgbase}|g
|
||||
s|%KERNVER%|${kernver}|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() {
|
||||
pkgdesc="RPi Foundation header and scripts for building modules for Linux kernel - ${_desc}"
|
||||
provides=("linux-headers=${pkgver}")
|
||||
conflicts=('linux-headers')
|
||||
replaces=('linux-raspberrypi-latest-headers')
|
||||
|
||||
cd ${_srcname}
|
||||
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
|
||||
|
||||
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}
|
||||
|
||||
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"
|
||||
|
||||
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
|
||||
echo "Removing $(basename "$_arch")"
|
||||
rm -r "$_arch"
|
||||
done
|
||||
|
||||
echo "Removing documentation..."
|
||||
rm -r "$builddir/Documentation"
|
||||
|
||||
echo "Removing broken symlinks..."
|
||||
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
|
||||
|
||||
echo "Removing loose objects..."
|
||||
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
|
||||
|
||||
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
|
||||
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")
|
||||
for _p in ${pkgname[@]}; do
|
||||
eval "package_${_p}() {
|
||||
_package${_p#${pkgbase}}
|
||||
}"
|
||||
done
|
|
@ -1 +0,0 @@
|
|||
root=/dev/mmcblk0p2 rw rootwait console=serial0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +0,0 @@
|
|||
# See /boot/overlays/README for all available options
|
||||
|
||||
dtoverlay=vc4-kms-v3d
|
||||
initramfs initramfs-linux.img followkernel
|
|
@ -1,46 +0,0 @@
|
|||
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"
|
||||
echo ">>> in newer kernels and will cause many issues if left enabled."
|
||||
echo ">>> Disabling that for you now."
|
||||
sed -i 's/^cma_/#cma_/g' /boot/config.txt
|
||||
fi
|
||||
}
|
||||
|
||||
post_install () {
|
||||
disable_cma
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
|
||||
if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
|
||||
echo "WARNING: /boot appears to be a separate partition but is not mounted."
|
||||
echo " You probably just broke your system. Congratulations."
|
||||
fi
|
||||
fi
|
||||
|
||||
disable_cma
|
||||
|
||||
if [ "$(vercmp $2 3.18.3)" -lt 0 ]; then
|
||||
echo "________________________________________________________________________________"
|
||||
echo ""
|
||||
echo "WARNING: This kernel provides updated config.txt and cmdline.txt files."
|
||||
echo " Check for pacnew files in /boot and merge or replace the existing files"
|
||||
echo " with the new versions."
|
||||
echo "________________________________________________________________________________"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [[ $(grep 'Raspberry Pi 4' /sys/firmware/devicetree/base/model) ]]; then
|
||||
echo "________________________________________________________________________________"
|
||||
echo ""
|
||||
echo "WARNING: You must switch to a different kernel for the Raspberry Pi 4:"
|
||||
echo " pacman -S linux-raspberrypi4"
|
||||
echo "________________________________________________________________________________"
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
rm -f boot/initramfs-linux.img
|
||||
}
|
|
@ -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