summaryrefslogtreecommitdiff
path: root/libre/linux-libre-64
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre-64')
-rw-r--r--libre/linux-libre-64/PKGBUILD70
1 files changed, 47 insertions, 23 deletions
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="$(<version)"
@@ -329,7 +353,7 @@ _package() {
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
# The default arm64 image target is 'Image.gz' (per `make -s image_name`);
# but some u-boot configs/versions don't support that, so we build 'Image' instead.
- # TODO: merge into 'linux-libre' PKGBUILD
+ # TODO: merge into 'linux-libre' PKGBUILD (actually [[ "$CARCH" == 'aarch64' ]])
[[ "$KARCH" == 'arm64' ]] && # cross-compile over-ride
install -Dm644 arch/$KARCH/boot/Image "$modulesdir/vmlinuz" ||
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
@@ -371,10 +395,10 @@ _package-headers() {
conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
# cross-compile over-rides - see note in _package()
- conflicts=() # cross-compile over-ride
- replaces=() # cross-compile over-ride
- conflicts_armv7h=( linux-libre-headers linux-libre-aarch64-headers ) # cross-compile over-ride
- replaces_armv7h=( linux-libre-headers linux-libre-aarch64-headers ) # cross-compile over-ride
+ conflicts=() # cross-compile over-ride
+ replaces=() # cross-compile over-ride
+ conflicts_armv7h=( linux-libre-aarch64-headers ) # cross-compile over-ride
+ replaces_armv7h=( linux-libre-aarch64-headers ) # cross-compile over-ride
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
@@ -482,10 +506,10 @@ _package-docs() {
conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
# cross-compile over-rides - see note in _package()
- conflicts=() # cross-compile over-ride
- replaces=() # cross-compile over-ride
- conflicts_armv7h=(linux-libre-docs linux-libre-aarch64-docs) # cross-compile over-ride
- replaces_armv7h=( linux-libre-docs linux-libre-aarch64-docs) # cross-compile over-ride
+ conflicts=() # cross-compile over-ride
+ replaces=() # cross-compile over-ride
+ conflicts_armv7h=(linux-libre-aarch64-docs) # cross-compile over-ride
+ replaces_armv7h=( linux-libre-aarch64-docs) # cross-compile over-ride
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"