summaryrefslogtreecommitdiff
path: root/libre/linux-libre-pck/PKGBUILD
diff options
context:
space:
mode:
authorDavid P. <megver83@parabola.nu>2024-01-02 21:41:28 -0300
committerDavid P. <megver83@parabola.nu>2024-01-02 21:41:28 -0300
commitb1e45cf75d7cf878607ead25d209844b19d54e20 (patch)
treec82eedcb94e2c635ff841398713bc3d717729e37 /libre/linux-libre-pck/PKGBUILD
parent81cc824643d83f4eb8d203dd4e3515238e98e97c (diff)
remove linux-libre-pck
Signed-off-by: David P. <megver83@parabola.nu>
Diffstat (limited to 'libre/linux-libre-pck/PKGBUILD')
-rw-r--r--libre/linux-libre-pck/PKGBUILD354
1 files changed, 0 insertions, 354 deletions
diff --git a/libre/linux-libre-pck/PKGBUILD b/libre/linux-libre-pck/PKGBUILD
deleted file mode 100644
index 035825fe4..000000000
--- a/libre/linux-libre-pck/PKGBUILD
+++ /dev/null
@@ -1,354 +0,0 @@
-# Maintainer: David P. <megver83@parabola.nu>
-# Contributor: André Silva <emulatorman@hyperbola.info>
-# Contributor: Márcio Silva <coadde@hyperbola.info>
-# Contributor: Nicolás Reynolds <fauno@kiwwwi.com.ar>
-# Contributor: Sorin-Mihai Vârgolici <smv@yobicore.org>
-# Contributor: Michał Masłowski <mtjm@mtjm.eu>
-# Contributor: Luke R. <g4jc@openmailbox.org>
-
-# Based on linux-zen package
-
-_replacesarchkernel=('linux-zen')
-_replacesoldkernels=()
-_replacesoldmodules=()
-
-pkgbase=linux-libre-pck
-pkgver=5.18.14.pck1
-pkgrel=1
-pkgdesc='Linux-libre PCK (Parabola community kernel)'
-zenver="${pkgver//pck/zen}"
-aufsver=20220620
-rcnver=5.18.12
-rcnrel=armv7-x8
-url='https://wiki.parabola.nu/PCK'
-arch=(i686 x86_64 armv7h)
-license=(GPL2)
-makedepends=(
- bc libelf pahole cpio perl tar xz
- xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra
-)
-options=('!strip')
-_srcname=linux-5.18
-source=(
- "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign}
- "https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver%.*}-gnu/patch-${_srcname##*-}-gnu-${pkgver%.*}-gnu.xz"{,.sign}
- "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig}
- "https://framagit.org/Megver83/zen-patches/-/raw/main/patch-${zenver//.zen/-zen}.diff"
- #"https://raw.githubusercontent.com/dolohow/uksm/master/v5.x/uksm-${_srcname##*-}.patch"
- "https://gitlab.com/sirlucjan/kernel-patches/-/raw/master/${_srcname##*-}/aufs-patches/0001-aufs-${aufsver}.patch"
- config.i686 config.x86_64 config.armv7h # the main kernel config files
- linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk
-
- # maintain the TTY over USB disconnects
- # http://www.coreboot.org/EHCI_Gadget_Debug
- 0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch
- # fix Atmel maXTouch touchscreen support
- # https://labs.parabola.nu/issues/877
- # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html
- 0002-fix-Atmel-maXTouch-touchscreen-support.patch
-)
-source_i686=(
- # avoid using zstd compression in ultra mode (exhausts virtual memory)
- no-ultra-zstd.patch
-)
-source_armv7h=(
- # RCN patch (CM3 firmware deblobbed and bloatware removed)
- "https://repo.parabola.nu/other/rcn-libre/patches/$rcnver/rcn-libre-$rcnver-$rcnrel.patch"{,.sig}
- # Arch Linux ARM patches
- 0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch
- 0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch
- 0003-fix-mvsdio-eMMC-timing.patch
- 0004-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
- 0005-set-default-cubietruck-led-triggers.patch
- 0006-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch
- 0007-USB-Armory-MkII-support.patch
-)
-validpgpkeys=(
- '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
- '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P.
-)
-sha512sums=('13be3762fffd74c63eeb23b0d34b994a3e5198bfdbda4f013b38f8d3edd24b9bbebe5a4bfde0f5191aa1cf2678e4517f3b5540a40b30ebc05da1f6708cbb98bb'
- 'SKIP'
- '9016e87060d3ddbf4bad5adee54f07cba3930a23a5c2a7ca32338a98d0c51676228f3d97405c624f2f48a67849f9b40a5dc670e10fbc02bc75cc4d47deab4c34'
- 'SKIP'
- '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
- 'SKIP'
- '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78'
- 'SKIP'
- '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1'
- 'SKIP'
- 'e86399efba97b385cb748e1f5e41dd777d9ce3c7a0affb33bfa6f3a3e7ca1c6d2b3a50b3341f1132cdd2be9590e817b82e73883698e50447e45ddc490c6b52a7'
- 'f47bcdd8d32b0b2ff1c58d552e2fe83047b6aa183ba03670dfd4e0f1f27eec6808eab53904847b316d8e31c85b4d63a7f365c6a91008a6d6cbcf89639073a880'
- '1f247490ca428c372194838919ba049e61f357249419998692c3a20cc6728d509b079f39f3edcc0f76342c437a350d28eefafe8aa743477cecbfff1bb43ea8bb'
- '88369e64e767fe490c22a221a55a5aa51377995897b7462320d53d64c9e83cb57fba3ea8ec591f15263905f86dc9f23cca0492cbb6a562aeb1a0fab0f8e447cf'
- '959f644c82015be6ddf0b84100b24d48a8208af7374d3ae748226e45ca592970354d20125df8cad2d71369c3d9d950f930776263dde8ce222d1afd571af331eb'
- '53103bf55b957b657039510527df0df01279dec59cda115a4d6454e4135025d4546167fa30bdc99107f232561c1e096d8328609ab5a876cf7017176f92ad3e0b'
- '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af'
- 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168')
-sha512sums_i686=('bca15cc96f64c38adcd13a46752866b5b30555ac21e19b3f7afcd20fcb7ec585c9d990fe8f842f44d5f69d477d72867fe6a9102729f26f93f5a80b372e41ce85')
-sha512sums_armv7h=('94c6243d23bc995dec3edcb1dd5cc7d5e7d30fec70fc32b9be5f3e7d934da7035e9152fea3cce58a53b0f35f29060bdef2a3a2dac3c46f520adf1088897362f9'
- 'SKIP'
- '8da996a42249672893fa532ccbd096347580a0dc1698c45e9c865646e2765789553b1bb42793e721de30aea70340fdc116d2e4a50580fef999ca5fc627aaf4c3'
- '0e6ddc24011d77a2e422b642c4507317fc2d26b20f5649818a2f11acac165ccab2cf2e64ab50d44ce7affcfe12c2ef5158790e499058831e7995400b2087df78'
- '5d2f228151148358b07744a9c09cf6e2420c4284735d4ce7dc925a1deb3970298cc95dd766ee13e094e2853847b016c3ebc2d61bb423e370b4bc33938367ebda'
- 'a206c3dc678839831d72eefee997cbe1bb877af7f6f90dfe5cab0bd7d9686a3b13a2aba74c8fbe5533872e12306ac9ea1b5eede18ef3cf10b8d01361afd67e9c'
- 'a1072dd808c63592178cc01ea3c36de946f277fb451b13c34f51a5ac134cde4a8a4d57487132af1c6d7b5820842cdda9dc4edb3da85d33bd02bf87a032c3263a'
- '85b2e16a930b8066990c42f973d386dc3c6d62fdf3d1289bbb51df3df296c26f30051162fba49a42d38f71f05de926aa8c065097f14bd8e9f8e28a52949ead00'
- '2e99582d8b670b6c6b27add14b60e957cbcf9cd6aae40491bd9dea6ac455c0ade0bbee21e3bdfb5e06ce83ad27c5a788404b05bf7ac93831ca18d2e60a67017c')
-
-_replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}")
-_replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}")
-_replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}")
-
-case "$CARCH" in
- i686|x86_64) KARCH=x86;;
- armv7h) KARCH=arm;;
-esac
-
-export KBUILD_BUILD_HOST=parabola
-export KBUILD_BUILD_USER=$pkgbase
-export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
-
-prepare() {
- cd $_srcname
-
- if [ "${_srcname##*-}" != "${pkgver%.*}" ]; then
- echo "Applying upstream patch..."
- patch -Np1 < "../patch-${_srcname##*-}-gnu-${pkgver%.*}-gnu"
- fi
-
- echo "Adding freedo as boot logo..."
- install -m644 -t drivers/video/logo \
- ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm}
-
- echo "Setting version..."
- scripts/setlocalversion --save-scmversion
- echo "-$pkgrel" > localversion.10-pkgrel
- echo "${pkgbase#linux-libre}" > localversion.20-pkgname
-
- echo "Applying Zen Patch..."
- sed -e "/^+EXTRAVERSION = -zen/s/zen/pck/" \
- -e "/^[-+]EXTRAVERSION =/s/= */= -gnu/" \
- "../patch-${zenver//.zen/-zen}.diff" | patch -Np1 -i -
-
- if [ "$CARCH" = "armv7h" ]; then
- local src_armv7h
- for src_armv7h in "${source_armv7h[@]}"; do
- src_armv7h="${src_armv7h%%::*}"
- src_armv7h="${src_armv7h##*/}"
- [[ $src_armv7h = *.patch ]] || continue
- echo "Applying patch $src_armv7h..."
- patch -Np1 < "../$src_armv7h"
- done
- fi
-
- if [ "$CARCH" = "i686" ]; then
- local src_i686
- for src_i686 in "${source_i686[@]}"; do
- src_i686="${src_i686%%::*}"
- src_i686="${src_i686##*/}"
- [[ $src_i686 = *.patch ]] || continue
- echo "Applying patch $src_i686..."
- patch -Np1 < "../$src_i686"
- done
- fi
-
- local src
- for src in "${source[@]}"; do
- src="${src%%::*}"
- src="${src##*/}"
- [[ $src = *.patch ]] || continue
- echo "Applying patch $src..."
- patch -Np1 < "../$src"
- done
-
- echo "Setting config..."
- cp ../config.$CARCH .config
- make olddefconfig
- diff -u ../config.$CARCH .config || :
-
- make -s kernelrelease > version
- echo "Prepared $pkgbase version $(<version)"
-}
-
-build() {
- cd $_srcname
- make htmldocs all
-}
-
-_package() {
- pkgdesc="The $pkgdesc kernel and modules"
- depends=(coreutils kmod initramfs)
- optdepends=('wireless-regdb: to set the correct wireless channels of your country'
- 'linux-libre-firmware: firmware images needed for some devices')
- provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE VHBA-MODULE)
- provides+=("${_replacesarchkernel[@]/%/=$zenver}" "LINUX-ABI_VERSION=${pkgver%.*}")
- conflicts+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
- replaces+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
-
- cd $_srcname
- local kernver="$(<version)"
- local modulesdir="$pkgdir/usr/lib/modules/$kernver"
-
- echo "Installing boot image..."
- # systemd expects to find the kernel here to allow hibernation
- # https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
- install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
-
- # Used by mkinitcpio to name the kernel
- echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
-
- echo "Installing modules..."
- make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
- DEPMOD=/doesnt/exist modules_install # Suppress depmod
-
- # remove build and source links
- rm "$modulesdir"/{source,build}
-
- if [ "$CARCH" = "armv7h" ]; then
- echo "Installing device tree binaries..."
- make INSTALL_DTBS_PATH="$pkgdir/boot/dtbs/$pkgbase" dtbs_install
-
- # armv7h presets only work with ALL_kver=$kernver
- backup=("etc/mkinitcpio.d/$pkgbase.preset")
- echo "Installing mkinitcpio preset..."
- sed "s|%PKGBASE%|$pkgbase|g;s|%KERNVER%|$kernver|g" ../linux-armv7h.preset \
- | install -Dm644 /dev/stdin "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"
- fi
-}
-
-_package-headers() {
- pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
- depends=(pahole)
- provides=("${_replacesarchkernel[@]/%/-headers=$zenver}")
- conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
- replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-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 vmlinux
- install -Dt "$builddir/kernel" -m644 kernel/Makefile
- install -Dt "$builddir/arch/$KARCH" -m644 arch/$KARCH/Makefile
- if [ "$CARCH" = "i686" ]; then
- install -Dt "$builddir/arch/$KARCH" -m644 arch/$KARCH/Makefile_32.cpu
- fi
- cp -t "$builddir" -a scripts
-
- # required when STACK_VALIDATION is enabled
- if [[ -e tools/objtool/objtool ]]; then
- install -Dt "$builddir/tools/objtool" tools/objtool/objtool
- fi
-
- # required when DEBUG_INFO_BTF_MODULES is enabled
- if [[ -e tools/bpf/resolve_btfids/resolve_btfids ]]; then
- install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
- fi
-
- 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
-
- # from linux-armv7
- if [ "$CARCH" = "armv7h" ]; then
- for i in dove omap2; do
- mkdir -p "$builddir/arch/$KARCH/mach-$i"
- cp -t "$builddir/arch/$KARCH/mach-$i/" -a arch/$KARCH/mach-$i/include
- done
- for i in omap orion versatile; do
- mkdir -p "$builddir/arch/$KARCH/plat-$i"
- cp -t "$builddir/arch/$KARCH/plat-$i/" -a arch/$KARCH/plat-$i/include
- done
- fi
-
- 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 ! -name vmlinux -print0)
-
- echo "Stripping vmlinux..."
- strip -v $STRIP_STATIC "$builddir/vmlinux"
-
- echo "Adding symlink..."
- mkdir -p "$pkgdir/usr/src"
- ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
-}
-
-_package-docs() {
- pkgdesc="Documentation for the $pkgdesc kernel"
- provides=("${_replacesarchkernel[@]/%/-docs=$zenver}")
- conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
- replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
-
- cd $_srcname
- local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
-
- echo "Installing documentation..."
- local src dst
- while read -rd '' src; do
- dst="${src#Documentation/}"
- dst="$builddir/Documentation/${dst#output/}"
- install -Dm644 "$src" "$dst"
- done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
-
- echo "Adding symlink..."
- mkdir -p "$pkgdir/usr/share/doc"
- ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
-}
-
-pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
-for _p in "${pkgname[@]}"; do
- eval "package_$_p() {
- $(declare -f "_package${_p#$pkgbase}")
- _package${_p#$pkgbase}
- }"
-done
-
-# vim:set ts=8 sts=2 sw=2 et: