From 3e55a3c261b74f956329dec4834eae2a98b3c005 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Fri, 22 Jul 2022 21:24:46 -0400 Subject: sq - linux-libre-64 --- libre/linux-libre-64/PKGBUILD | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libre/linux-libre-64') diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index a75d06f1d..461b71fa9 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -6,10 +6,9 @@ # Contributor: Michał Masłowski # Contributor: Luke R. # Contributor: Andreas Grapentin -# Maintainers: Parabola hackers +# Maintainer: Parabola hackers # Based on linux package -# Based on linux-libre package, actually - megver83 will become maintainer eventually # WIP: This PKGBUILD is derived from the 'linux-libre' PKGBUILD, # and includes a lot of unused cruft, to minimize the diff. @@ -32,7 +31,9 @@ # should be identical to the linux-libre PKGBUILD. # 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 aarch64 kernel for armv7h systems. +# 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. _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix -- cgit v1.2.3 From 43762a8ab258defc08c991c6d355883befb14f8d Mon Sep 17 00:00:00 2001 From: bill-auger Date: Fri, 22 Jul 2022 22:48:54 -0400 Subject: sq - linux-libre-64 --- libre/linux-libre-64/PKGBUILD | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'libre/linux-libre-64') 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 # Contributor: Luke R. # Contributor: Andreas Grapentin -# Maintainer: Parabola hackers +# Maintainer: Parabola Hackers # 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_ 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" -- cgit v1.2.3 From e73290a7c64cecdac22b11bc2f48d71024e74f73 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Fri, 22 Jul 2022 23:55:53 -0400 Subject: sq - linux-libre-64 --- libre/linux-libre-64/PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'libre/linux-libre-64') diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index 20f495065..fc190ef36 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -1,4 +1,7 @@ # Contributor: David P. +# Maintainer (arch32): Erich Eckner +# Maintainer (arch32): Andreas Baumann +# Maintainer (archarm): Kevin Mihelich # Contributor: André Silva # Contributor: Márcio Silva # Contributor: fauno @@ -10,6 +13,55 @@ # Based on linux package +# Rationale: This package enables to run 64bit kernels with 32bit rootfs. +# +# For armv7k/aarch64, we have no aarch64 port yet, and the 32bit +# kernels don't work for 64bit computers (no 64bit DTB files, etc). +# +# In turn if we can boot Parabola on these computers, it enables +# people to work on an aarch64 port more easily as chrooting in 64bit +# rootfs from 32bit rootfs work when we have a 64bit kernel (tested on +# an x86_64 computer with a Parabola i686 rootfs and a Parabola x86_64 +# chroot). +# +# This enable to make rootfs that work on both 64bit and 32bit +# computers. In that case the user will still need to select the right +# kernel at boot. +# +# Generally speaking it also enable users to benefit from many of the +# improvements of 64bit kernels (ability to chroot in 64bit rootfs, +# better security, 4GiB address space per process instead of 3GiB for +# 32bit rootfs, etc) without having to reinstall everything. In +# addition, there was and is still no conversion guide to convert a +# 32bit Parabola installation to 64bit), and in some cases (lot of +# self-built software in /usr/local, PostgreSQL database, etc) the +# migration to 64bit requires some work. +# +# As for using i686 for new installation on x86_64 computers, it can +# enable people doing that to find and fix bugs on Parabola i686 to +# enable people with 32bit-only computers (like Libreboot compatible +# I945 Thinkpads) to still be able to use Parabola. +# +# Having both architectures (arm and x86) in the same PKGBUILD enables +# to more widely test this package (if we find issues on x86, they'll +# most likely apply to arm as well). Though it can become a problem if +# we need different kernel versions for both architectures. +# +# Status: +# - Tested on both arm and x86. +# - The build is currently broken on ARM due to a missing cross +# compiler for armv7h (it was accidentally removed and it doesn't +# build anymore). +# - External modules (like Wireguard or tp_smapi) also need to be +# cross compiled. So modules for linux-libre-64 need to be added +# (like tp_smapi-64) and dkms packages need to be adapted to also +# work for this kernel. +# - Some software (like building Guix) break with 32bit rootfs and +# 64bit kernels due to wrong assumption about the number of bits, +# through other software (like building rust with mrustc) work +# better (here because we have 3GiB instead of 3GiB of memory per +# process). Most software is not affected though. + # WIP: This PKGBUILD is derived from the 'linux-libre' PKGBUILD, # and includes a lot of unused cruft, to minimize the diff. # Eventually, these differences can be merged into linux-libre, @@ -157,6 +209,7 @@ case "$CARCH" in i686|x86_64) KARCH=x86;; armv7h) KARCH=arm;; esac +pkgdesc+=" 64-bit (${CROSS_COMPILE%%-*}) for Parabola ${CARCH}" # cross-compile over-ride export KBUILD_BUILD_HOST=parabola export KBUILD_BUILD_USER=$pkgbase -- cgit v1.2.3 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') 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="$(