summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-07-22 22:48:54 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-07-22 22:48:54 -0400
commit43762a8ab258defc08c991c6d355883befb14f8d (patch)
tree3213f907838a9b466827020ffe4c80ed2bede8c1
parente1f1521e6272a22f2c094e4ddbfc218a9ca3bdcf (diff)
downloadabslibre-43762a8ab258defc08c991c6d355883befb14f8d.tar.gz
abslibre-43762a8ab258defc08c991c6d355883befb14f8d.tar.bz2
abslibre-43762a8ab258defc08c991c6d355883befb14f8d.zip
sq - linux-libre-64
-rw-r--r--libre/linux-libre-64/PKGBUILD20
1 files changed, 13 insertions, 7 deletions
diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD
index 461b71fa9..20f495065 100644
--- a/libre/linux-libre-64/PKGBUILD
+++ b/libre/linux-libre-64/PKGBUILD
@@ -6,7 +6,7 @@
# Contributor: Michał Masłowski <mtjm@mtjm.eu>
# Contributor: Luke R. <g4jc@openmailbox.org>
# Contributor: Andreas Grapentin <andreas@grapentin.org>
-# Maintainer: Parabola hackers <dev@lists.parabola.nu>
+# Maintainer: Parabola Hackers <dev@lists.parabola.nu>
# Based on linux package
@@ -32,8 +32,7 @@
# In this way, the diff is minimal against the linux-libre PKGBUILD;
# 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 cleaned up greatly,
-# to focus only on the aarch64 kernel for armv7h, and the x86_64 kernel for i686.
+# After that, this PKGBUILD could be simplified, to focus only on the cross-compiled kernels.
_replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix
@@ -63,10 +62,13 @@ 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}
+ # TODO: Move (in linux-libre) config.i686 config.armv7h, linux-armv7h.preset,
+ # and "kernel"{.its,.keyblock,_data_key.vbprivk}
+ # into their respective source_<CARCH> arrays.
+ # Rename linux-armv7h.preset to linux-arm.preset, or add a new one for aarch64.
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
@@ -80,6 +82,7 @@ source=(
)
source_i686=(
# avoid using zstd compression in ultra mode (exhausts virtual memory)
+ # Arch Linux 32 patches
no-ultra-zstd.patch
)
source_armv7h=(
@@ -274,8 +277,8 @@ _package() {
# 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
- [[ "$KARCH" == 'arm64' ]] && \
- install -Dm644 arch/$KARCH/boot/Image "$modulesdir/vmlinuz" || \
+ [[ "$KARCH" == 'arm64' ]] && # cross-compile over-ride
+ install -Dm644 arch/$KARCH/boot/Image "$modulesdir/vmlinuz" ||
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
# FIXME: aarch64 - the kernel is not installed under /boot
@@ -298,6 +301,9 @@ _package() {
make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE INSTALL_DTBS_PATH="$pkgdir/boot/dtbs/$pkgbase" dtbs_install # cross-compile over-ride
# armv7h presets only work with ALL_kver=$kernver
+ # TODO: kernel version auto-detection does not work for ARM kernels.
+ # it may be best to not use auto-detection at all, and use the same mechanism
+ # for all arches, eg: System.map or somthing simple like this below.
backup=("etc/mkinitcpio.d/$pkgbase.preset")
echo "Installing mkinitcpio preset..."
sed "s|%PKGBASE%|$pkgbase|g;s|%KERNVER%|$kernver|g" ../linux-armv7h.preset \
@@ -346,7 +352,7 @@ _package-headers() {
install -Dt "$builddir/arch/$KARCH/kernel" -m644 arch/$KARCH/kernel/asm-offsets.s
# from linux-armv7
- [[ "$KARCH" != 'arm64' ]] && # aarch64 over-ride
+ [[ "$KARCH" != 'arm64' ]] && # cross-compile over-ride
if [ "$CARCH" = "armv7h" ]; then
for i in dove omap2; do
mkdir -p "$builddir/arch/$KARCH/mach-$i"