From 2187e3ffefad9f0133cede7f90cdda88c955b44d Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 24 Jul 2022 02:56:41 -0400 Subject: wip - linux-libre-64 --- libre/linux-libre-64/PKGBUILD | 70 +++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 23 deletions(-) (limited to 'libre/linux-libre-64/PKGBUILD') diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index fc190ef36..12c942541 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -85,8 +85,24 @@ # and it is obvious which parts are intended to become aarch64-specific, # or exist only for cross-compiling the 64-bit foreign kernels for armv7h and i686. # After that, this PKGBUILD could be simplified, to focus only on the cross-compiled kernels. - - +# comments: +# TODO: repalce in 'linux-libre' PKGBUILD +# cross-compile over-ride +# TODO: merge into 'linux-libre' PKGBUILD + + +# TODO: This is a bug (in the 'linux-libre' PKGBUILD) for migrations from archlinuxarm. +# _replacesarchkernel assumes that the upstream kernel packages are named like: +# - 'linux' 'linux-headers' +# - 'linux-hardened' 'linux-hardened-headers' +# - 'linux-lts' 'linux-lts-headers' +# That is true for arch and arch32; but archlinuxarm has no packages by those names. +# Archlinuxarm systems would have a kernel package named like: +# - 'linux-armv7' 'linux-armv7-headers' +# - 'linux-armv7-chromebook' +# - 'linux-veyron' 'linux-veyron-headers' +# - 'linux-aarch64' 'linux-aarch64-headers' +# so Parabola armv7h and aarch64 kernels would not replace any archlinuxarm kernel. _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix @@ -95,18 +111,22 @@ pkgbase=linux-libre-64 # cross-compile over-ride pkgver=5.18.5 pkgrel=2 pkgdesc="The Linux-libre kernel and modules" # TODO: merge into 'linux-libre' PKGBUILD -pkgdesc+=' 64-bit (aarch64) for Parabola armv7h' # cross-compile over-ride rcnver=5.18.2 rcnrel=armv7-x6 url='https://linux-libre.fsfla.org/' arch=(i686 x86_64 armv7h) -arch=(armv7h) # cross-compile over-ride +arch=(armv7h i686) # cross-compile over-ride license=(GPL2) +conflicts_armv7h=(linux-libre-aarch64) # cross-compile over-ride +replaces_armv7h=( linux-libre-aarch64) # cross-compile over-ride +conflicts_i686=( linux-libre-x86_64 ) # cross-compile over-ride +replaces_i686=( linux-libre-x86_64 ) # cross-compile over-ride makedepends=( bc libelf pahole cpio perl tar xz xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra ) -makedepends_armv7h=(uboot-tools vboot-utils dtc) # required by linux-libre-chromebook +makedepends_i686+=('x86_64-pc-linux-gnu-gcc') +makedepends_armv7h=(kmod uboot-tools vboot-utils dtc) # required by linux-libre-chromebook makedepends_armv7h+=(aarch64-linux-gnu-gcc-initial) # cross-compile over-ride options=('!strip') _srcname=linux-5.18 @@ -121,6 +141,7 @@ source=( config.i686 config.x86_64 config.armv7h # the main kernel config files linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk "kernel"{.its,.keyblock,_data_key.vbprivk} # files for signing Chromebooks kernels + # 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 @@ -206,6 +227,7 @@ _replacesarchkernel=("${_replacesarchkernel[@]/-64/}") # cross-compile over-ride case "$CARCH" in armv7h) KARCH=arm64 ; CROSS_COMPILE=aarch64-linux-gnu- ;; # cross-compile over-ride aarch64) KARCH=arm64;; # TODO: merge into 'linux-libre' PKGBUILD + i686) KARCH=x86;CROSS_COMPILE=x86_64-pc-linux-gnu-;; # cross-compile over-ride i686|x86_64) KARCH=x86;; armv7h) KARCH=arm;; esac @@ -309,16 +331,18 @@ _package() { conflicts+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") # cross-compile over-rides - # NOTE: Above is providing/replacing the archarm armv7h 'linux' with the armv7h 'linux-libre'. - # We do not want this aarch64 'linux-libre-64' to provide nor replace the archarm armv7h 'linux'; - # for the obvious reason. Anyways, the parabola armv7h 'linux-libre' serves that purpose. - # Below is providing/replacing 'linux-libre' and the obsoleted parabola 'linux-libre-aarch64'. + # NOTE: Above is providing an upstream 'linux{,-*}' (eg: linux, linux-hardened), + # and replacing the same during migration to Parabola. + # Below is providing 'linux-libre' for 'parabola-base', + # and replacing the obsoleted parabola 'linux-libre-{aarch64,x86_64}'. # These are defined analogously in _package-headers(), _package-docs(), and _package-chromebook(). - conflicts=( ${conflicts[*]/linux*/} ) # cross-compile over-ride - replaces=( ${replaces[*]/linux*/} ) # cross-compile over-ride - provides_armv7h=( linux-libre ) # cross-compile over-ride - conflicts_armv7h=( linux-libre linux-libre-aarch64 ) # cross-compile over-ride - replaces_armv7h=( linux-libre linux-libre-aarch64 ) # cross-compile over-ride + provides+=( linux-libre ) # cross-compile over-ride + conflicts=( ${conflicts[*]/linux*/} ) # cross-compile over-ride + replaces=( ${replaces[*]/linux*/} ) # cross-compile over-ride + conflicts_armv7h=( linux-libre-aarch64 ) # cross-compile over-ride + replaces_armv7h=( linux-libre-aarch64 ) # cross-compile over-ride + conflicts_i686=( linux-libre-x86_64 ) # cross-compile over-ride + replaces_i686=( linux-libre-x86_64 ) # cross-compile over-ride cd $_srcname local kernver="$(