From d6fe52fca5397414cc8b0a3dd124bb5f57769cb1 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Mon, 11 Jul 2022 17:41:43 -0400 Subject: [linux-libre-64]: restrict build to armv7h --- libre/linux-libre-64/PKGBUILD | 147 ++++++++++++++++++++++++++++-------------- 1 file changed, 100 insertions(+), 47 deletions(-) diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index 6077b7f33..2dcfef4ff 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -1,48 +1,57 @@ # Maintainers: Parabola hackers -# WIP - Based on the linux-libre package. -# This PKGBUILD includes a lot of cruft, to minimize the diff. -# Eventually, these chanegs can be merged into linux-libre -# once parabola has an 'aarch64' build target and repos. - -# NOTE: aarch64 is not yet a valid parabola target. -# This PKGBUILD is inteneded to be cross-compiled -# only from an x86_64 librechroot. The x86_64 build of linux-libre -# does not have any specail per-arch treatments; so that mechanism is -# over-ridden for the special purpose of the cross-compilation. +# 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, +# once parabola has an 'aarch64' build target and repos. # -# The makedepends_x86_64, source_x86_64, and sha512sums_x86_64 arrays -# (also source_aarch64 and sha512sums_aarch64 obviously), -# and any lines with comment: '# aarch64 over-ride' -# indicate code that would eventually be deleted or associated with -# $CARCH == aarch64, if/when that target exists. -# All other LOCs of consequence in this file, -# except for the `make` and `strip` commands, -# 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 should become aarch64-specific -# (eg: source_x86_64 simpliy becomes source_aarch64). +# For now, 'aarch64' is not yet a valid parabola target. +# This PKGBUILD exists only for making an 'aarch64' kernel for use with +# parabola armv7h systems. This PKGBUILD is intended to be cross-compiled +# only from an armv7h librechroot. The per-arch mechanism for armv7h +# is over-ridden for the special purpose of the cross-compilation. +# +# The makedepends_armv7h, source_armv7h, and sha512sums_armv7h arrays +# (also source_aarch64 and sha512sums_aarch64 obviously), +# and any lines with comment: '# aarch64 over-ride', +# indicate code that would eventually be deleted or associated with +# $CARCH 'aarch64', if/when aarch64 becomes a valid target. +# All other LOCs of consequence in this file, +# except for the `make` and `strip` commands, +# 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 +# (eg: source_armv7h simply becomes source_aarch64). +# +# NOTE: There is no need to upload or publish the generated *.src.tar.gz package. +# Because this 'pkgbase' is identical to the 'linux-libre' PKGBUILD; +# the generated *.src.tar.gz package will be identical, in name and contents. +# After running `librestage`, you can delete the staging/ directory, +# before running `librerelease`. +# $ rm -rf $(source /etc/libretools.conf ; echo ${WORKDIR} ;)/staging/sources _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix -pkgbase=linux-libre-64 +pkgbase=linux-libre pkgver=5.18.5 pkgrel=1 -pkgdesc='Linux-libre 64-bit (aarch64) for Parabola armv7h' +pkgdesc='Linux-libre' +pkgdesc+=' 64-bit (aarch64) for Parabola armv7h' # aarch64 over-ride rcnver=5.18.2 rcnrel=armv7-x6 url='https://linux-libre.fsfla.org/' -arch=(x86_64) # aarch64 over-ride +arch=(i686 x86_64 armv7h) +arch=(armv7h) # aarch64 over-ride license=(GPL2) 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_x86_64=(aarch64-linux-gnu-gcc) # aarch64 over-ride +makedepends_armv7h+=(aarch64-linux-gnu-gcc) # aarch64 over-ride options=('!strip') _srcname=linux-5.18 source=( @@ -88,7 +97,7 @@ source_aarch64=( 0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch 0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch ) -source_x86_64=( ${source_aarch64[*]} ) # aarch64 over-ride +source_armv7h=( ${source_aarch64[*]} ) # aarch64 over-ride validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. @@ -128,18 +137,17 @@ sha512sums_armv7h=('5a75b12dd386940a0bf1be630d45a514ef3c32289ec5976988764baa8483 sha512sums_aarch64=('bc7b70863929737346fe6757373897391b43af36bb6884d5351a95aca0f9120f2d2cf9b9c2c6426a440c6b394e9fb334c280711d64081563322a834ecdfb2ba6' '69e81aff3ac5aada75f7330e8c82d0a6aa229585b3f442b2e1a9b86681b0eadc925408d5e2377026599fb0dee72d29043eca4d072b0e2606adc34c872e95c7d6' '4224779106cc520dc2c431322d9693cc968476706854ae9630611cf2896c48a34ca11bf31a4c3995573a128cf5838a6763bac86eb4cbaf509ade9b6a83a24369') -sha512sums_x86_64=( ${sha512sums_aarch64[*]} ) # aarch64 over-ride +sha512sums_armv7h=( ${sha512sums_aarch64[*]} ) # aarch64 over-ride _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") _replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") case "$CARCH" in - x86_64) KARCH=arm64 ; CROSS_COMPILE=aarch64-linux-gnu- ;; # aarch64 over-ride + armv7h) KARCH=arm64 ; CROSS_COMPILE=aarch64-linux-gnu- ;; # aarch64 over-ride i686|x86_64) KARCH=x86;; armv7h) KARCH=arm;; esac -export STRIP=${CROSS_COMPILE}strip export KBUILD_BUILD_HOST=parabola export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" @@ -183,7 +191,7 @@ prepare() { done fi - if [ "$CARCH" = "x86_64" ]; then # aarch64 over-ride + if [ "$CARCH" = "aarch64" ]; then # TODO: (unused) aarch64 is not yet a valid parabola target local src_aarch64 for src_aarch64 in "${source_aarch64[@]}"; do src_aarch64="${src_aarch64%%::*}" @@ -205,10 +213,10 @@ prepare() { echo "Setting config..." cp ../config.$CARCH .config - if [[ "$CARCH" == x86_64 ]] # aarch64 over-ride - # config.aarch64 comes straight from Arch Linux ARM and doesn't have the - # compatibility for 32bit rootfs enabled. This makes maintenance faster than - # having to modify the configuration file by hand at each new kernel release. + # config.aarch64 comes straight from Arch Linux ARM and doesn't have the + # compatibility for 32bit rootfs enabled. This makes maintenance faster than + # having to modify the configuration file by hand at each new kernel release. + if [[ "${KARCH}" == aarch64 ]] # aarch64 over-ride then cp ../config.aarch64 .config ; echo 'CONFIG_COMPAT=y' >> .config ; # aarch64 over-ride fi # aarch64 over-ride make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE olddefconfig @@ -230,10 +238,21 @@ _package() { 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) + conflicts=() # FIXME: in 'linux-libre', conflicts array is appended before declared replaces=(virtualbox-guest-modules-arch wireguard-arch) provides+=("${_replacesarchkernel[@]/%/=$pkgver}" "LINUX-ABI_VERSION=$pkgver") conflicts+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") + # 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 obsolete parabola 'linux-libre-aarch64'. + # These are defined analogougly in _package-headers(), _package-docs(), and _package-chromebook(). + conflicts=( ${conflicts[*]/linux*/} ) # aarch64 over-ride + replaces=( ${replaces[*]/linux*/} ) # aarch64 over-ride + provides_armv7h=( linux-libre ) # aarch64 over-ride + conflicts_armv7h=( linux-libre linux-libre-aarch64 ) # aarch64 over-ride + replaces_armv7h=( linux-libre linux-libre-aarch64 ) # aarch64 over-ride cd $_srcname local kernver="$( Starting package_linux-libre-64-chromebook()... # | FATAL ERROR: Couldn't open "arch/arm/boot/zImage": No such file or directory # | mkimage: Can't read kernel.signed.tmp: Invalid argument -# [[ $CARCH != x86_64 ]] || pkgname+=("$pkgbase-chromebook") # aarch64 over-ride +# [[ "${KARCH}" != aarch64 ]] || pkgname+=("$pkgbase-chromebook") # aarch64 over-ride for _p in "${pkgname[@]}"; do eval "package_$_p() { $(declare -f "_package${_p#$pkgbase}") -- cgit v1.2.3 From 9bc4fd733a17e71f442c2675e5b21a2f4f398bea Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sat, 16 Jul 2022 01:42:09 -0400 Subject: sq - aarch64 cross compiler --- libre/aarch64-linux-gnu-gcc-initial/PKGBUILD | 1 - libre/linux-libre-64/PKGBUILD | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libre/aarch64-linux-gnu-gcc-initial/PKGBUILD b/libre/aarch64-linux-gnu-gcc-initial/PKGBUILD index 774420c7f..cd80a1f7e 100644 --- a/libre/aarch64-linux-gnu-gcc-initial/PKGBUILD +++ b/libre/aarch64-linux-gnu-gcc-initial/PKGBUILD @@ -8,7 +8,6 @@ _pkgver=9.3.0 pkgver=$_pkgver _islver=0.24 pkgrel=1 -pkgrel+=.parabola1 pkgdesc='The GNU Compiler Collection - cross compiler for aarch64 target' arch=(x86_64 i686 armv7h) url='http://gcc.gnu.org/' diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index 2dcfef4ff..6a8043b1b 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -51,7 +51,7 @@ makedepends=( xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra ) makedepends_armv7h=(uboot-tools vboot-utils dtc) # required by linux-libre-chromebook -makedepends_armv7h+=(aarch64-linux-gnu-gcc) # aarch64 over-ride +makedepends_armv7h+=(aarch64-linux-gnu-gcc-initial) # aarch64 over-ride options=('!strip') _srcname=linux-5.18 source=( -- cgit v1.2.3 From c22a0659a4d69fbef47a9038555e48c76c800f73 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sat, 16 Jul 2022 20:40:40 -0400 Subject: sq - linux-libre-64 --- libre/linux-libre-64/PKGBUILD | 111 +++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index 6a8043b1b..db8c2378c 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -13,7 +13,7 @@ # # The makedepends_armv7h, source_armv7h, and sha512sums_armv7h arrays # (also source_aarch64 and sha512sums_aarch64 obviously), -# and any lines with comment: '# aarch64 over-ride', +# and any lines with comment: '# cross-compile over-ride', # indicate code that would eventually be deleted or associated with # $CARCH 'aarch64', if/when aarch64 becomes a valid target. # All other LOCs of consequence in this file, @@ -39,19 +39,19 @@ pkgbase=linux-libre pkgver=5.18.5 pkgrel=1 pkgdesc='Linux-libre' -pkgdesc+=' 64-bit (aarch64) for Parabola armv7h' # aarch64 over-ride +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) # aarch64 over-ride +arch=(armv7h) # cross-compile over-ride license=(GPL2) 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_armv7h+=(aarch64-linux-gnu-gcc-initial) # aarch64 over-ride +makedepends_armv7h+=(aarch64-linux-gnu-gcc-initial) # cross-compile over-ride options=('!strip') _srcname=linux-5.18 source=( @@ -97,7 +97,7 @@ source_aarch64=( 0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch 0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch ) -source_armv7h=( ${source_aarch64[*]} ) # aarch64 over-ride +source_armv7h=( ${source_aarch64[*]} ) # cross-compile over-ride validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. @@ -137,13 +137,13 @@ sha512sums_armv7h=('5a75b12dd386940a0bf1be630d45a514ef3c32289ec5976988764baa8483 sha512sums_aarch64=('bc7b70863929737346fe6757373897391b43af36bb6884d5351a95aca0f9120f2d2cf9b9c2c6426a440c6b394e9fb334c280711d64081563322a834ecdfb2ba6' '69e81aff3ac5aada75f7330e8c82d0a6aa229585b3f442b2e1a9b86681b0eadc925408d5e2377026599fb0dee72d29043eca4d072b0e2606adc34c872e95c7d6' '4224779106cc520dc2c431322d9693cc968476706854ae9630611cf2896c48a34ca11bf31a4c3995573a128cf5838a6763bac86eb4cbaf509ade9b6a83a24369') -sha512sums_armv7h=( ${sha512sums_aarch64[*]} ) # aarch64 over-ride +sha512sums_armv7h=( ${sha512sums_aarch64[*]} ) # cross-compile over-ride _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") _replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") case "$CARCH" in - armv7h) KARCH=arm64 ; CROSS_COMPILE=aarch64-linux-gnu- ;; # aarch64 over-ride + armv7h) KARCH=arm64 ; CROSS_COMPILE=aarch64-linux-gnu- ;; # cross-compile over-ride i686|x86_64) KARCH=x86;; armv7h) KARCH=arm;; esac @@ -168,6 +168,7 @@ prepare() { scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux-libre}" > localversion.20-pkgname + echo "${pkgbase#linux-libre}-64" > localversion.20-pkgname # cross-compile over-ride if [ "$CARCH" = "armv7h" ]; then local src_armv7h @@ -216,20 +217,20 @@ prepare() { # config.aarch64 comes straight from Arch Linux ARM and doesn't have the # compatibility for 32bit rootfs enabled. This makes maintenance faster than # having to modify the configuration file by hand at each new kernel release. - if [[ "${KARCH}" == aarch64 ]] # aarch64 over-ride - then cp ../config.aarch64 .config ; echo 'CONFIG_COMPAT=y' >> .config ; # aarch64 over-ride - fi # aarch64 over-ride - make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE olddefconfig + if [[ "${KARCH}" == aarch64 ]] # cross-compile over-ride + then cp ../config.aarch64 .config ; echo 'CONFIG_COMPAT=y' >> .config ; # cross-compile over-ride + fi # cross-compile over-ride + make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE olddefconfig # cross-compile over-ride diff -u ../config.$CARCH .config || : - make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE -s kernelrelease > version + make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE -s kernelrelease > version # cross-compile over-ride echo "Prepared $pkgbase version $( "$modulesdir/pkgbase" # cross-compile over-ride echo "Installing modules..." - make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install + make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install # cross-compile over-ride # remove build and source links rm "$modulesdir"/{source,build} - -# DEBUG BEGIN -echo "DEBUG: ls -l $pkgdir/etc/mkinitcpio.d/*" ; ls -l $pkgdir/etc/mkinitcpio.d/* ; -[[ -f "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset" ]] && cat "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset" || echo "DEBUG: $pkgbase.preset does not exist" -echo "DEBUG: END" -# DEBUG END - - if [ "$CARCH" = "armv7h" ]; then echo "Installing device tree binaries..." - make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE INSTALL_DTBS_PATH="$pkgdir/boot/dtbs/$pkgbase" dtbs_install + 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 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" - sed -i "s|${pkgbase}|${pkgbase}-64|g" "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset" # aarch64 over-ride - mv "$pkgdir/etc/mkinitcpio.d/$pkgbase{,-64}.preset" # aarch64 over-ride + + local preset_file="${pkgdir}"/etc/mkinitcpio.d/${pkgbase}.preset # cross-compile over-ride + mv "${pkgdir}"/boot/dtbs/${pkgbase}{,-64} # cross-compile over-ride + backup=( ${backup[*]/${pkgbase}/${pkgbase}-64} ) # cross-compile over-ride + sed -i "s|${pkgbase}|${pkgbase}-64|g" "${preset_file}" # cross-compile over-ride + mv "${preset_file}" "${preset_file/\.preset/-64\.preset}" # cross-compile over-ride fi } @@ -310,11 +309,11 @@ _package-headers() { provides=("${_replacesarchkernel[@]/%/-headers=$pkgver}") conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") - # aarch64 over-rides - see note in _package() - conflicts=() # aarch64 over-ride - replaces=() # aarch64 over-ride - conflicts_armv7h=( linux-libre-headers linux-libre-aarch64-headers ) # aarch64 over-ride - replaces_armv7h=( linux-libre-headers linux-libre-aarch64-headers ) # aarch64 over-ride + # 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 cd $_srcname local builddir="$pkgdir/usr/lib/modules/$( Starting package_linux-libre-64-chromebook()... # | FATAL ERROR: Couldn't open "arch/arm/boot/zImage": No such file or directory # | mkimage: Can't read kernel.signed.tmp: Invalid argument -# [[ "${KARCH}" != aarch64 ]] || pkgname+=("$pkgbase-chromebook") # aarch64 over-ride +# [[ "${KARCH}" != aarch64 ]] || pkgname+=("$pkgbase-chromebook") # cross-compile over-ride for _p in "${pkgname[@]}"; do eval "package_$_p() { - $(declare -f "_package${_p#$pkgbase}") - _package${_p#$pkgbase} + $(declare -f "_package${_p#${pkgbase}-64}") # cross-compile over-ride + _package${_p#${pkgbase}-64} # cross-compile over-ride }" done -- cgit v1.2.3 From 8dc356706598da18a3e6a81e843803bb78c85514 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 17 Jul 2022 05:05:00 -0400 Subject: finalize linux-libre-64 --- libre/linux-libre-64/PKGBUILD | 89 ++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index db8c2378c..c3210ab6a 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -1,4 +1,15 @@ -# Maintainers: Parabola hackers +# Contributor: David P. +# Contributor: André Silva +# Contributor: Márcio Silva +# Contributor: fauno +# Contributor: Sorin-Mihai Vârgolici +# Contributor: Michał Masłowski +# Contributor: Luke R. +# Contributor: Andreas Grapentin +# 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. @@ -12,33 +23,26 @@ # is over-ridden for the special purpose of the cross-compilation. # # The makedepends_armv7h, source_armv7h, and sha512sums_armv7h arrays -# (also source_aarch64 and sha512sums_aarch64 obviously), -# and any lines with comment: '# cross-compile over-ride', -# indicate code that would eventually be deleted or associated with -# $CARCH 'aarch64', if/when aarch64 becomes a valid target. +# (also source_aarch64 and sha512sums_aarch64 obviously), and the comments: +# '# cross-compile over-ride' and +# '# TODO: merge into 'linux-libre' PKGBUILD', +# indicate code that would eventually be deleted, merged into, +# or associated with $CARCH: 'aarch64', if/when aarch64 becomes a valid target. # All other LOCs of consequence in this file, -# except for the `make` and `strip` commands, # 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 -# (eg: source_armv7h simply becomes source_aarch64). -# -# NOTE: There is no need to upload or publish the generated *.src.tar.gz package. -# Because this 'pkgbase' is identical to the 'linux-libre' PKGBUILD; -# the generated *.src.tar.gz package will be identical, in name and contents. -# After running `librestage`, you can delete the staging/ directory, -# before running `librerelease`. -# $ rm -rf $(source /etc/libretools.conf ; echo ${WORKDIR} ;)/staging/sources +# and it is obvious which parts are intended to become aarch64-specific, +# or exist only for cross-compiling the aarch64 kernel for armv7h systems. _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix -pkgbase=linux-libre +pkgbase=linux-libre-64 # cross-compile over-ride pkgver=5.18.5 -pkgrel=1 -pkgdesc='Linux-libre' +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 @@ -58,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 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 @@ -75,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=( @@ -141,15 +149,18 @@ sha512sums_armv7h=( ${sha512sums_aarch64[*]} ) # cross-compile over-ride _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") _replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") +_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|x86_64) KARCH=x86;; armv7h) KARCH=arm;; esac export KBUILD_BUILD_HOST=parabola export KBUILD_BUILD_USER=$pkgbase +export KBUILD_BUILD_USER=${pkgbase/-64/} # cross-compile over-ride export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { @@ -168,7 +179,6 @@ prepare() { scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux-libre}" > localversion.20-pkgname - echo "${pkgbase#linux-libre}-64" > localversion.20-pkgname # cross-compile over-ride if [ "$CARCH" = "armv7h" ]; then local src_armv7h @@ -192,7 +202,8 @@ prepare() { done fi - if [ "$CARCH" = "aarch64" ]; then # TODO: (unused) aarch64 is not yet a valid parabola target + if [ "$CARCH" = "aarch64" ]; then # TODO: merge into 'linux-libre' PKGBUILD + # TODO: better yet, all of these per-arch patching routines should be DRY-ed out local src_aarch64 for src_aarch64 in "${source_aarch64[@]}"; do src_aarch64="${src_aarch64%%::*}" @@ -239,7 +250,7 @@ _package() { 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) - conflicts=() # FIXME: in 'linux-libre', conflicts array is appended before declared + conflicts=() # TODO: merge into 'linux-libre' PKGBUILD (conflicts array is appended before declared) replaces=(virtualbox-guest-modules-arch wireguard-arch) provides+=("${_replacesarchkernel[@]/%/=$pkgver}" "LINUX-ABI_VERSION=$pkgver") conflicts+=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") @@ -248,8 +259,8 @@ _package() { # 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 obsolete parabola 'linux-libre-aarch64'. - # These are defined analogougly in _package-headers(), _package-docs(), and _package-chromebook(). + # Below is providing/replacing 'linux-libre' and the obsoleted parabola 'linux-libre-aarch64'. + # 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 @@ -265,6 +276,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 [[ "$KARCH" == "arm64" ]] && \ install -Dm644 arch/$KARCH/boot/Image "$modulesdir/vmlinuz" || \ install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz" @@ -277,7 +289,6 @@ _package() { # Used by mkinitcpio to name the kernel echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase" - echo "${pkgbase}-64" > "$modulesdir/pkgbase" # cross-compile over-ride echo "Installing modules..." make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install # cross-compile over-ride @@ -294,12 +305,6 @@ _package() { 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" - - local preset_file="${pkgdir}"/etc/mkinitcpio.d/${pkgbase}.preset # cross-compile over-ride - mv "${pkgdir}"/boot/dtbs/${pkgbase}{,-64} # cross-compile over-ride - backup=( ${backup[*]/${pkgbase}/${pkgbase}-64} ) # cross-compile over-ride - sed -i "s|${pkgbase}|${pkgbase}-64|g" "${preset_file}" # cross-compile over-ride - mv "${preset_file}" "${preset_file/\.preset/-64\.preset}" # cross-compile over-ride fi } @@ -343,7 +348,6 @@ _package-headers() { cp -t "$builddir/arch/$KARCH" -a arch/$KARCH/include install -Dt "$builddir/arch/$KARCH/kernel" -m644 arch/$KARCH/kernel/asm-offsets.s - [[ "$KARCH" == "arm64" ]] || # cross-compile over-ride # from linux-armv7 if [ "$CARCH" = "armv7h" ]; then for i in dove omap2; do @@ -413,7 +417,6 @@ _package-headers() { echo "Adding symlink..." mkdir -p "$pkgdir/usr/src" ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase" - mv "${pkgdir}"/usr/src/${pkgbase}{,-64} # cross-compile over-ride } _package-docs() { @@ -441,7 +444,6 @@ _package-docs() { echo "Adding symlink..." mkdir -p "$pkgdir/usr/share/doc" ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase" - mv "${pkgdir}"/usr/share/doc/${pkgbase}{,-64} # cross-compile over-ride } _package-chromebook() { @@ -451,12 +453,11 @@ _package-chromebook() { conflicts=("${_replacesarchkernel[@]/%/-armv7-chromebook}" "${_replacesoldkernels[@]/%/-armv7-chromebook}") replaces=("${_replacesarchkernel[@]/%/-armv7-chromebook}" "${_replacesoldkernels[@]/%/-armv7-chromebook}") install=$pkgbase-chromebook.install - # cross-compile over-rides - see note in _package() - depends=( ${depends[*]/${pkgbase}/${pkgbase}-64} ) # cross-compile over-ride - provides=( ${provides[*]/armv7/aarch64} ) # cross-compile over-ride - conflicts=( ${conflicts[*]/armv7/aarch64} ) # cross-compile over-ride - replaces=( ${replaces[*]/armv7/aarch64} ) # cross-compile over-ride - install=${install/${pkgbase}/${pkgbase}-64} # cross-compile over-ride + # NOTE: when aarch64 becomes a supported target, 'armv7' above should be changed to "${CARCH}" + depends=( ${depends[*]/linux-libre/${pkgbase}} ) # cross-compile over-ride + provides=( ${provides[*]/armv7/aarch64} ) # cross-compile over-ride + conflicts=( ${conflicts[*]/armv7/aarch64} ) # cross-compile over-ride + replaces=( ${replaces[*]/armv7/aarch64} ) # cross-compile over-ride cd $_srcname @@ -465,6 +466,7 @@ _package-chromebook() { dd if=/dev/zero of=bootloader.bin bs=512 count=1 echo 'console=tty0 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd' > cmdline + # TODO: merge into 'linux-libre' PKGBUILD (--arch ${KARCH}) echo "Creating kernel sign..." vbutil_kernel \ --pack vmlinux.kpart \ @@ -482,16 +484,15 @@ _package-chromebook() { } pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs") -pkgname=( ${pkgname[*]/${pkgbase}/${pkgbase}-64} ) # cross-compile over-ride # The chromebook package is disabled until the following error is fixed: # | ==> Starting package_linux-libre-64-chromebook()... # | FATAL ERROR: Couldn't open "arch/arm/boot/zImage": No such file or directory # | mkimage: Can't read kernel.signed.tmp: Invalid argument -# [[ "${KARCH}" != aarch64 ]] || pkgname+=("$pkgbase-chromebook") # cross-compile over-ride +# [[ $CARCH = armv7h ]] && pkgname+=("$pkgbase-chromebook") # cross-compile over-ride for _p in "${pkgname[@]}"; do eval "package_$_p() { - $(declare -f "_package${_p#${pkgbase}-64}") # cross-compile over-ride - _package${_p#${pkgbase}-64} # cross-compile over-ride + $(declare -f "_package${_p#$pkgbase}") + _package${_p#$pkgbase} }" done -- cgit v1.2.3 From 31165779a5d09a19f574464ad6b2fe90bbaa3c22 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 17 Jul 2022 19:18:56 -0400 Subject: sq - aarch64 cross compilers --- libre/aarch64-linux-gnu-gcc-initial/PKGBUILD | 2 +- libre/aarch64-linux-gnu-gcc/PKGBUILD | 2 +- libre/aarch64-linux-gnu-glibc/PKGBUILD | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libre/aarch64-linux-gnu-gcc-initial/PKGBUILD b/libre/aarch64-linux-gnu-gcc-initial/PKGBUILD index cd80a1f7e..98cce034a 100644 --- a/libre/aarch64-linux-gnu-gcc-initial/PKGBUILD +++ b/libre/aarch64-linux-gnu-gcc-initial/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer (arch): Anatol Pomozov # Maintainer (arch): Eli Schwartz -# Maintainers: Parabola hackers +# Maintainer: Parabola Hackers _target=aarch64-linux-gnu pkgname=$_target-gcc-initial diff --git a/libre/aarch64-linux-gnu-gcc/PKGBUILD b/libre/aarch64-linux-gnu-gcc/PKGBUILD index 1a07cd27f..79e771172 100644 --- a/libre/aarch64-linux-gnu-gcc/PKGBUILD +++ b/libre/aarch64-linux-gnu-gcc/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer (arch): Anatol Pomozov # Maintainer (arch): Eli Schwartz -# Maintainers: Parabola hackers +# Maintainer: Parabola Hackers _target=aarch64-linux-gnu pkgname=$_target-gcc diff --git a/libre/aarch64-linux-gnu-glibc/PKGBUILD b/libre/aarch64-linux-gnu-glibc/PKGBUILD index 35a056338..5bbc8ef69 100644 --- a/libre/aarch64-linux-gnu-glibc/PKGBUILD +++ b/libre/aarch64-linux-gnu-glibc/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer (arch): Anatol Pomozov # Maintainer (arch): Eli Schwartz -# Maintainers: Parabola hackers +# Maintainer: Parabola Hackers _target=aarch64-linux-gnu pkgname=$_target-glibc -- cgit v1.2.3 From 34a247b83767fee8fe6e28dae55c736d05b6dbe8 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 17 Jul 2022 21:49:53 -0400 Subject: [rtl8812au]: add package v5.6.4.2.20220606 --- pcr/rtl8812au/PKGBUILD | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ pcr/rtl8812au/dkms.conf | 7 ++++ 2 files changed, 92 insertions(+) create mode 100644 pcr/rtl8812au/PKGBUILD create mode 100644 pcr/rtl8812au/dkms.conf diff --git a/pcr/rtl8812au/PKGBUILD b/pcr/rtl8812au/PKGBUILD new file mode 100644 index 000000000..3d0c564b3 --- /dev/null +++ b/pcr/rtl8812au/PKGBUILD @@ -0,0 +1,85 @@ +# Maintainer: Parabola Hackers + + +_pkgbase=rtl8812au +pkgname=rtl8812au-dkms +pkgver=5.6.4.2.20220606 # per upstream dkms.conf (see note in prepare()) +_cid=cab4e4ec56884f65e0c279c1b5ceaf70dbe79be0 +pkgrel=1 +pkgdesc="RTL8812AU/21AU and RTL8814AU driver with monitor mode and frame injection" +url=https://github.com/aircrack-ng/rtl8812au +license=(GPL2) +arch=(armv7h i686 x86_64) + +makedepends=() +depends=(dkms) + +source=(${_pkgbase}-${pkgver}.tar.gz::https://github.com/aircrack-ng/rtl8812au/archive/${_cid}.tar.gz + dkms.conf) + +sha256sums=(20b498bc597e5343ee6c240eabd45c36894db86c76f6bfc100448c8b9c420733 + 8303638219327cdc8559aa3a8fc62d7bb9cb2c64aaf6a3b5e6a515d4e98ce17e) + +case "${CARCH}" in +armv7h ) export KARCH=arm ;; +aarch64) export KARCH=arm64 ;; # TODO: not yet supported +esac + + +prepare() +{ + cd "${srcdir}"/${_pkgbase}-${_cid} + + # version sanity check + # NOTE: The upstream does not publich versioned releases, nor use git tags. + # However they are kind enough to version the dkms.conf. + # eg: PACKAGE_VERSION="5.6.4.2~20220715" + # This PKGBUILD attempts to version the package properly, based on + # that version ID (aka: pkgver) and the VCS commit (aka: _cid) which defined it. + local upstream_ver=$(grep PACKAGE_VERSION= dkms.conf | sed 's|PACKAGE_VERSION="\(.*\)"|\1|') + [[ "${upstream_ver/\~/.}" == ${pkgver} ]] || ! echo "version mismatch in dkms.conf" || return 1 + + # we will use our dkms.conf though + cp "${srcdir}"/dkms.conf . + + case "${CARCH}" in + armv7h) + sed -i 's|^CONFIG_PLATFORM_I386_PC = y|CONFIG_PLATFORM_I386_PC = n|' Makefile + sed -i 's|^CONFIG_PLATFORM_ARM_SUN7I = n|CONFIG_PLATFORM_ARM_SUN7I = y|' Makefile + sed -i "s|^MAKE\[0\]=\"|MAKE[0]=\"ARCH=${KARCH} |" dkms.conf + ;; + aarch64) + sed -i "s|^MAKE\[0\]=\"|MAKE[0]=\"ARCH=${KARCH} |" dkms.conf + ;; + esac + sed -i -e "s/@_PKGBASE@/${_pkgbase}/" -e "s/@PKGVER@/${pkgver}/" dkms.conf + + # cleanup some sources that we won't need + # the licensing of files under the tools/ directory is varied and unclear + # TODO: this could/should go into a mksource() function + rm -rf android/ tools/ +} + +package() +{ + cd "${srcdir}"/${_pkgbase}-${_cid} + + local dkms_srcdir="${pkgdir}"/usr/src/${_pkgbase}-${pkgver} + + # Install + # Makefile does not respect DESTDIR + # make DESTDIR="${pkgdir}" install + + # Copy dkms.conf + install -Dm644 dkms.conf "${dkms_srcdir}"/dkms.conf + + # Set name and version + # already did that + + # Copy sources (including Makefile) + cp -r ./* "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/ + + # install docs + install -Dm644 README.md "${pkgdir}"/usr/share/doc/${_pkgbase}/README.md + install -m644 docs/* "${pkgdir}"/usr/share/doc/${_pkgbase}/ +} diff --git a/pcr/rtl8812au/dkms.conf b/pcr/rtl8812au/dkms.conf new file mode 100644 index 000000000..098439924 --- /dev/null +++ b/pcr/rtl8812au/dkms.conf @@ -0,0 +1,7 @@ +PACKAGE_NAME="@_PKGBASE@" +PACKAGE_VERSION="@PKGVER@" +MAKE[0]="make --uname_r=$kernelver" +CLEAN="make clean" +BUILT_MODULE_NAME[0]="@_PKGBASE@" +DEST_MODULE_LOCATION[0]="/kernel/net/wireless" +AUTOINSTALL="yes" -- cgit v1.2.3 From 02a7ee1365e4c0e4a990e54e02d34141fd67d5d1 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Wed, 20 Jul 2022 15:09:58 -0400 Subject: wip rtl8812au --- pcr/rtl8812au/PKGBUILD | 4 ++-- pcr/rtl8812au/dkms.conf | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/pcr/rtl8812au/PKGBUILD b/pcr/rtl8812au/PKGBUILD index 3d0c564b3..a13e505f2 100644 --- a/pcr/rtl8812au/PKGBUILD +++ b/pcr/rtl8812au/PKGBUILD @@ -5,7 +5,7 @@ _pkgbase=rtl8812au pkgname=rtl8812au-dkms pkgver=5.6.4.2.20220606 # per upstream dkms.conf (see note in prepare()) _cid=cab4e4ec56884f65e0c279c1b5ceaf70dbe79be0 -pkgrel=1 +pkgrel=2 pkgdesc="RTL8812AU/21AU and RTL8814AU driver with monitor mode and frame injection" url=https://github.com/aircrack-ng/rtl8812au license=(GPL2) @@ -18,7 +18,7 @@ source=(${_pkgbase}-${pkgver}.tar.gz::https://github.com/aircrack-ng/rtl8812au/a dkms.conf) sha256sums=(20b498bc597e5343ee6c240eabd45c36894db86c76f6bfc100448c8b9c420733 - 8303638219327cdc8559aa3a8fc62d7bb9cb2c64aaf6a3b5e6a515d4e98ce17e) + 9164f68d837976d0992a50875281f22fb7a2a82981346bde33706701f15bbcc8) case "${CARCH}" in armv7h ) export KARCH=arm ;; diff --git a/pcr/rtl8812au/dkms.conf b/pcr/rtl8812au/dkms.conf index 098439924..54ee7056d 100644 --- a/pcr/rtl8812au/dkms.conf +++ b/pcr/rtl8812au/dkms.conf @@ -1,7 +1,11 @@ -PACKAGE_NAME="@_PKGBASE@" +PACKAGE_NAME="@PKGBASE@" PACKAGE_VERSION="@PKGVER@" -MAKE[0]="make --uname_r=$kernelver" -CLEAN="make clean" -BUILT_MODULE_NAME[0]="@_PKGBASE@" -DEST_MODULE_LOCATION[0]="/kernel/net/wireless" +BUILT_MODULE_NAME="8812au" +PROCS_NUM=$(nproc) +[ $PROCS_NUM -gt 16 ] && PROCS_NUM=16 +MAKE="'make' -j$PROCS_NUM KVER=${kernelver} +KSRC=/lib/modules/${kernelver}/build" +CLEAN="'make' clean" +DEST_MODULE_LOCATION="/kernel/drivers/net/wireless" AUTOINSTALL="yes" +#REMAKE_INITRD=no -- cgit v1.2.3 From 4d73f917afbbc08ee73bb6934b7e98009d24dbfc Mon Sep 17 00:00:00 2001 From: bill-auger Date: Wed, 20 Jul 2022 15:10:21 -0400 Subject: wip linux-libre-64 --- libre/linux-libre-64/PKGBUILD | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index c3210ab6a..3960ba5e5 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -41,7 +41,7 @@ _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-64 # cross-compile over-ride pkgver=5.18.5 -pkgrel=2 +pkgrel=1 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 @@ -300,7 +300,10 @@ _package() { echo "Installing device tree binaries..." 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 + # 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. + # NOTE: 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 \ -- cgit v1.2.3 From 583d647f2a741270e1efa4ea9a297ce8a9f4166e Mon Sep 17 00:00:00 2001 From: bill-auger Date: Thu, 21 Jul 2022 00:22:00 -0400 Subject: wip rtl8812au --- pcr/rtl8812au/PKGBUILD | 6 +++--- pcr/rtl8812au/dkms.conf | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pcr/rtl8812au/PKGBUILD b/pcr/rtl8812au/PKGBUILD index a13e505f2..b4e6141b0 100644 --- a/pcr/rtl8812au/PKGBUILD +++ b/pcr/rtl8812au/PKGBUILD @@ -5,7 +5,7 @@ _pkgbase=rtl8812au pkgname=rtl8812au-dkms pkgver=5.6.4.2.20220606 # per upstream dkms.conf (see note in prepare()) _cid=cab4e4ec56884f65e0c279c1b5ceaf70dbe79be0 -pkgrel=2 +pkgrel=3 pkgdesc="RTL8812AU/21AU and RTL8814AU driver with monitor mode and frame injection" url=https://github.com/aircrack-ng/rtl8812au license=(GPL2) @@ -18,7 +18,7 @@ source=(${_pkgbase}-${pkgver}.tar.gz::https://github.com/aircrack-ng/rtl8812au/a dkms.conf) sha256sums=(20b498bc597e5343ee6c240eabd45c36894db86c76f6bfc100448c8b9c420733 - 9164f68d837976d0992a50875281f22fb7a2a82981346bde33706701f15bbcc8) + 9f7c983df45db1938ee924b2dac8e8d98becef78822536b6c8f489a56a25c6a4) case "${CARCH}" in armv7h ) export KARCH=arm ;; @@ -52,7 +52,7 @@ prepare() sed -i "s|^MAKE\[0\]=\"|MAKE[0]=\"ARCH=${KARCH} |" dkms.conf ;; esac - sed -i -e "s/@_PKGBASE@/${_pkgbase}/" -e "s/@PKGVER@/${pkgver}/" dkms.conf + sed -i -e "s/@PKGBASE@/${_pkgbase}/" -e "s/@PKGVER@/${pkgver}/" dkms.conf # cleanup some sources that we won't need # the licensing of files under the tools/ directory is varied and unclear diff --git a/pcr/rtl8812au/dkms.conf b/pcr/rtl8812au/dkms.conf index 54ee7056d..e996e6496 100644 --- a/pcr/rtl8812au/dkms.conf +++ b/pcr/rtl8812au/dkms.conf @@ -1,11 +1,9 @@ PACKAGE_NAME="@PKGBASE@" PACKAGE_VERSION="@PKGVER@" -BUILT_MODULE_NAME="8812au" +BUILT_MODULE_NAME="88XXau" PROCS_NUM=$(nproc) [ $PROCS_NUM -gt 16 ] && PROCS_NUM=16 -MAKE="'make' -j$PROCS_NUM KVER=${kernelver} -KSRC=/lib/modules/${kernelver}/build" +MAKE="'make' -j$PROCS_NUM KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build" CLEAN="'make' clean" DEST_MODULE_LOCATION="/kernel/drivers/net/wireless" AUTOINSTALL="yes" -#REMAKE_INITRD=no -- cgit v1.2.3 From 89ddc5761e8c66fe38230f69fb964c9833f241e8 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Thu, 21 Jul 2022 22:14:03 -0400 Subject: wip - linux-libre-64 PKGBUILD from local src pkg --- libre/linux-libre-64/PKGBUILD | 213 +++++++++++------------------------------- 1 file changed, 53 insertions(+), 160 deletions(-) diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index 3960ba5e5..37a59db10 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -1,74 +1,39 @@ -# Contributor: David P. -# Contributor: André Silva -# Contributor: Márcio Silva -# Contributor: fauno -# Contributor: Sorin-Mihai Vârgolici -# Contributor: Michał Masłowski -# Contributor: Luke R. -# Contributor: Andreas Grapentin -# 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. -# Eventually, these differences can be merged into linux-libre, -# once parabola has an 'aarch64' build target and repos. -# -# For now, 'aarch64' is not yet a valid parabola target. -# This PKGBUILD exists only for making an 'aarch64' kernel for use with -# parabola armv7h systems. This PKGBUILD is intended to be cross-compiled -# only from an armv7h librechroot. The per-arch mechanism for armv7h -# is over-ridden for the special purpose of the cross-compilation. -# -# The makedepends_armv7h, source_armv7h, and sha512sums_armv7h arrays -# (also source_aarch64 and sha512sums_aarch64 obviously), and the comments: -# '# cross-compile over-ride' and -# '# TODO: merge into 'linux-libre' PKGBUILD', -# indicate code that would eventually be deleted, merged into, -# or associated with $CARCH: 'aarch64', if/when aarch64 becomes a valid target. -# All other LOCs of consequence in this file, -# 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. +# Maintainers: Parabola hackers + +# WIP - Based on the linux-libre package. +# this PKGBUILD includes a lot of cruft, to minimize the diff. +# eventually, these chanegs can be merged into linux-libre +# once parabola has an 'aarch64' build target and repos. _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix -pkgbase=linux-libre-64 # cross-compile over-ride +pkgbase=linux-libre-64 pkgver=5.18.5 -pkgrel=1 -pkgdesc="The Linux-libre kernel and modules" # TODO: merge into 'linux-libre' PKGBUILD -pkgdesc+=' 64-bit (aarch64) for Parabola armv7h' # cross-compile over-ride +pkgrel=2.test +pkgdesc="64bit Linux-libre for Parabola $CARCH" 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) license=(GPL2) 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_armv7h+=(aarch64-linux-gnu-gcc-initial) # cross-compile over-ride +makedepends_armv7h=(uboot-tools dtc) # required by linux-libre-chromebook 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} - # TODO: Move 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 @@ -82,13 +47,12 @@ source=( ) source_i686=( # avoid using zstd compression in ultra mode (exhausts virtual memory) - # Arch Linux 32 patches 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 + # Arch Linux ARM patches (for armv7h) 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 @@ -96,16 +60,13 @@ source_armv7h=( 0005-set-default-cubietruck-led-triggers.patch 0006-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch 0007-USB-Armory-MkII-support.patch + # Arch Linux ARM patches (for aarch64) + # ./0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch + 0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch # ChromiumOS patches 0001-CHROMIUM-block-partitions-efi-Add-support-for-IGNORE.patch ) -source_aarch64=( - config.aarch64 - # Arch Linux ARM patches (aarch64) - 0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch - 0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch -) -source_armv7h=( ${source_aarch64[*]} ) # cross-compile over-ride +source_armv7h+=(config.aarch64) validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. @@ -141,26 +102,21 @@ sha512sums_armv7h=('5a75b12dd386940a0bf1be630d45a514ef3c32289ec5976988764baa8483 'a1072dd808c63592178cc01ea3c36de946f277fb451b13c34f51a5ac134cde4a8a4d57487132af1c6d7b5820842cdda9dc4edb3da85d33bd02bf87a032c3263a' '85b2e16a930b8066990c42f973d386dc3c6d62fdf3d1289bbb51df3df296c26f30051162fba49a42d38f71f05de926aa8c065097f14bd8e9f8e28a52949ead00' '2e99582d8b670b6c6b27add14b60e957cbcf9cd6aae40491bd9dea6ac455c0ade0bbee21e3bdfb5e06ce83ad27c5a788404b05bf7ac93831ca18d2e60a67017c' - '5b77c587cf2ffb60acf1d9eb43330983548c7e81a53e0ffd2b04962a99441a0000d631ff77c245c7062afc2c8368d996a2456496d42dcb658f330e5083e5e029') -sha512sums_aarch64=('bc7b70863929737346fe6757373897391b43af36bb6884d5351a95aca0f9120f2d2cf9b9c2c6426a440c6b394e9fb334c280711d64081563322a834ecdfb2ba6' - '69e81aff3ac5aada75f7330e8c82d0a6aa229585b3f442b2e1a9b86681b0eadc925408d5e2377026599fb0dee72d29043eca4d072b0e2606adc34c872e95c7d6' - '4224779106cc520dc2c431322d9693cc968476706854ae9630611cf2896c48a34ca11bf31a4c3995573a128cf5838a6763bac86eb4cbaf509ade9b6a83a24369') -sha512sums_armv7h=( ${sha512sums_aarch64[*]} ) # cross-compile over-ride + '4224779106cc520dc2c431322d9693cc968476706854ae9630611cf2896c48a34ca11bf31a4c3995573a128cf5838a6763bac86eb4cbaf509ade9b6a83a24369' + '5b77c587cf2ffb60acf1d9eb43330983548c7e81a53e0ffd2b04962a99441a0000d631ff77c245c7062afc2c8368d996a2456496d42dcb658f330e5083e5e029' + 'bc7b70863929737346fe6757373897391b43af36bb6884d5351a95aca0f9120f2d2cf9b9c2c6426a440c6b394e9fb334c280711d64081563322a834ecdfb2ba6') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") _replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") -_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|x86_64) KARCH=x86;; - armv7h) KARCH=arm;; + i686) KARCH=x86;CROSS_COMPILE=x86_64-pc-linux-gnu-;; + armv7h) KARCH=arm64;CROSS_COMPILE=aarch64-linux-gnu-;; esac +export STRIP=${CROSS_COMPILE}strip export KBUILD_BUILD_HOST=parabola export KBUILD_BUILD_USER=$pkgbase -export KBUILD_BUILD_USER=${pkgbase/-64/} # cross-compile over-ride export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { @@ -202,18 +158,6 @@ prepare() { done fi - if [ "$CARCH" = "aarch64" ]; then # TODO: merge into 'linux-libre' PKGBUILD - # TODO: better yet, all of these per-arch patching routines should be DRY-ed out - local src_aarch64 - for src_aarch64 in "${source_aarch64[@]}"; do - src_aarch64="${src_aarch64%%::*}" - src_aarch64="${src_aarch64##*/}" - [[ $src_aarch64 = *.patch ]] || continue - echo "Applying patch $src_aarch64..." - patch -Np1 < "../$src_aarch64" - done - fi - local src for src in "${source[@]}"; do src="${src%%::*}" @@ -224,24 +168,23 @@ prepare() { done echo "Setting config..." - cp ../config.$CARCH .config + case "$CARCH" in + i686) cp ../config.x86_64 .config;; # config.aarch64 comes straight from Arch Linux ARM and doesn't have the # compatibility for 32bit rootfs enabled. This makes maintenance faster than # having to modify the configuration file by hand at each new kernel release. - if [[ "${KARCH}" == aarch64 ]] # cross-compile over-ride - then cp ../config.aarch64 .config ; echo 'CONFIG_COMPAT=y' >> .config ; # cross-compile over-ride - fi # cross-compile over-ride - make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE olddefconfig # cross-compile over-ride - diff -u ../config.$CARCH .config || : + armv7h) cp ../config.aarch64 .config;echo 'CONFIG_COMPAT=y' >> .config;; + esac + make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE olddefconfig - make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE -s kernelrelease > version # cross-compile over-ride + make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE -s kernelrelease > version echo "Prepared $pkgbase version $( cmdline - # TODO: merge into 'linux-libre' PKGBUILD (--arch ${KARCH}) echo "Creating kernel sign..." vbutil_kernel \ --pack vmlinux.kpart \ --version 1 \ --vmlinuz kernel.signed \ - --arch ${KARCH} \ + --arch aarch64 \ --keyblock ../kernel.keyblock \ --signprivate ../kernel_data_key.vbprivk \ --config cmdline \ @@ -491,7 +384,7 @@ pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs") # | ==> Starting package_linux-libre-64-chromebook()... # | FATAL ERROR: Couldn't open "arch/arm/boot/zImage": No such file or directory # | mkimage: Can't read kernel.signed.tmp: Invalid argument -# [[ $CARCH = armv7h ]] && pkgname+=("$pkgbase-chromebook") # cross-compile over-ride +# [[ $CARCH = armv7h ]] && pkgname+=("$pkgbase-chromebook") for _p in "${pkgname[@]}"; do eval "package_$_p() { $(declare -f "_package${_p#$pkgbase}") -- cgit v1.2.3 From c21f846561e049965ff6052314fce622198f3801 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Thu, 21 Jul 2022 22:16:45 -0400 Subject: wip - linux-libre-64 PKGBUILD from beeefcake filesystem --- libre/linux-libre-64/PKGBUILD | 197 ++++++++++++++++++++++++++++++++---------- 1 file changed, 149 insertions(+), 48 deletions(-) diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index 37a59db10..b3e70eb8d 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -1,29 +1,61 @@ +# Contributor: David P. +# Contributor: André Silva +# Contributor: Márcio Silva +# Contributor: fauno +# Contributor: Sorin-Mihai Vârgolici +# Contributor: Michał Masłowski +# Contributor: Luke R. +# Contributor: Andreas Grapentin # Maintainers: Parabola hackers -# WIP - Based on the linux-libre package. -# this PKGBUILD includes a lot of cruft, to minimize the diff. -# eventually, these chanegs can be merged into linux-libre -# once parabola has an 'aarch64' build target and repos. +# 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. +# Eventually, these differences can be merged into linux-libre, +# once parabola has an 'aarch64' build target and repos. +# +# For now, 'aarch64' is not yet a valid parabola target. +# This PKGBUILD exists only for making an 'aarch64' kernel for use with +# parabola armv7h systems. This PKGBUILD is intended to be cross-compiled +# only from an armv7h librechroot. The per-arch mechanism for armv7h +# is over-ridden for the special purpose of the cross-compilation. +# +# The makedepends_armv7h, source_armv7h, and sha512sums_armv7h arrays +# (also source_aarch64 and sha512sums_aarch64 obviously), and the comments: +# '# cross-compile over-ride' and +# '# TODO: merge into 'linux-libre' PKGBUILD', +# indicate code that would eventually be deleted, merged into, +# or associated with $CARCH: 'aarch64', if/when aarch64 becomes a valid target. +# All other LOCs of consequence in this file, +# 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. _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix -pkgbase=linux-libre-64 +pkgbase=linux-libre-64 # cross-compile over-ride pkgver=5.18.5 -pkgrel=2.test -pkgdesc="64bit Linux-libre for Parabola $CARCH" +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=(armv7h i686) +arch=(i686 x86_64 armv7h) +arch=(armv7h) # cross-compile over-ride license=(GPL2) makedepends=( bc libelf pahole cpio perl tar xz xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra ) -makedepends_armv7h=(uboot-tools dtc) # required by linux-libre-chromebook +makedepends_armv7h=(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 source=( @@ -52,7 +84,7 @@ source_i686=( 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 (for armv7h) + # Arch Linux ARM patches (armv7h) 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 @@ -60,13 +92,16 @@ source_armv7h=( 0005-set-default-cubietruck-led-triggers.patch 0006-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch 0007-USB-Armory-MkII-support.patch - # Arch Linux ARM patches (for aarch64) - # ./0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch - 0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch # ChromiumOS patches 0001-CHROMIUM-block-partitions-efi-Add-support-for-IGNORE.patch ) -source_armv7h+=(config.aarch64) +source_aarch64=( + config.aarch64 + # Arch Linux ARM patches (aarch64) + 0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch + 0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch +) +source_armv7h=( ${source_aarch64[*]} ) # cross-compile over-ride validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. @@ -102,21 +137,26 @@ sha512sums_armv7h=('5a75b12dd386940a0bf1be630d45a514ef3c32289ec5976988764baa8483 'a1072dd808c63592178cc01ea3c36de946f277fb451b13c34f51a5ac134cde4a8a4d57487132af1c6d7b5820842cdda9dc4edb3da85d33bd02bf87a032c3263a' '85b2e16a930b8066990c42f973d386dc3c6d62fdf3d1289bbb51df3df296c26f30051162fba49a42d38f71f05de926aa8c065097f14bd8e9f8e28a52949ead00' '2e99582d8b670b6c6b27add14b60e957cbcf9cd6aae40491bd9dea6ac455c0ade0bbee21e3bdfb5e06ce83ad27c5a788404b05bf7ac93831ca18d2e60a67017c' - '4224779106cc520dc2c431322d9693cc968476706854ae9630611cf2896c48a34ca11bf31a4c3995573a128cf5838a6763bac86eb4cbaf509ade9b6a83a24369' - '5b77c587cf2ffb60acf1d9eb43330983548c7e81a53e0ffd2b04962a99441a0000d631ff77c245c7062afc2c8368d996a2456496d42dcb658f330e5083e5e029' - 'bc7b70863929737346fe6757373897391b43af36bb6884d5351a95aca0f9120f2d2cf9b9c2c6426a440c6b394e9fb334c280711d64081563322a834ecdfb2ba6') + '5b77c587cf2ffb60acf1d9eb43330983548c7e81a53e0ffd2b04962a99441a0000d631ff77c245c7062afc2c8368d996a2456496d42dcb658f330e5083e5e029') +sha512sums_aarch64=('bc7b70863929737346fe6757373897391b43af36bb6884d5351a95aca0f9120f2d2cf9b9c2c6426a440c6b394e9fb334c280711d64081563322a834ecdfb2ba6' + '69e81aff3ac5aada75f7330e8c82d0a6aa229585b3f442b2e1a9b86681b0eadc925408d5e2377026599fb0dee72d29043eca4d072b0e2606adc34c872e95c7d6' + '4224779106cc520dc2c431322d9693cc968476706854ae9630611cf2896c48a34ca11bf31a4c3995573a128cf5838a6763bac86eb4cbaf509ade9b6a83a24369') +sha512sums_armv7h=( ${sha512sums_aarch64[*]} ) # cross-compile over-ride _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") _replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") +_replacesarchkernel=("${_replacesarchkernel[@]/-64/}") # cross-compile over-ride case "$CARCH" in - i686) KARCH=x86;CROSS_COMPILE=x86_64-pc-linux-gnu-;; - armv7h) KARCH=arm64;CROSS_COMPILE=aarch64-linux-gnu-;; + armv7h) KARCH=arm64 ; CROSS_COMPILE=aarch64-linux-gnu- ;; # cross-compile over-ride + aarch64) KARCH=arm64;; # TODO: merge into 'linux-libre' PKGBUILD + i686|x86_64) KARCH=x86;; + armv7h) KARCH=arm;; esac -export STRIP=${CROSS_COMPILE}strip export KBUILD_BUILD_HOST=parabola export KBUILD_BUILD_USER=$pkgbase +export KBUILD_BUILD_USER=${pkgbase/-64/} # cross-compile over-ride export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { @@ -158,6 +198,18 @@ prepare() { done fi + if [ "$CARCH" = "aarch64" ]; then # TODO: merge into 'linux-libre' PKGBUILD + # TODO: better yet, all of these per-arch patching routines should be DRY-ed out + local src_aarch64 + for src_aarch64 in "${source_aarch64[@]}"; do + src_aarch64="${src_aarch64%%::*}" + src_aarch64="${src_aarch64##*/}" + [[ $src_aarch64 = *.patch ]] || continue + echo "Applying patch $src_aarch64..." + patch -Np1 < "../$src_aarch64" + done + fi + local src for src in "${source[@]}"; do src="${src%%::*}" @@ -168,23 +220,24 @@ prepare() { done echo "Setting config..." - case "$CARCH" in - i686) cp ../config.x86_64 .config;; + cp ../config.$CARCH .config # config.aarch64 comes straight from Arch Linux ARM and doesn't have the # compatibility for 32bit rootfs enabled. This makes maintenance faster than # having to modify the configuration file by hand at each new kernel release. - armv7h) cp ../config.aarch64 .config;echo 'CONFIG_COMPAT=y' >> .config;; - esac - make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE olddefconfig + if [[ "$KARCH" == 'arm64' ]] # cross-compile over-ride + then cp ../config.aarch64 .config ; echo 'CONFIG_COMPAT=y' >> .config ; # cross-compile over-ride + fi # cross-compile over-ride + make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE olddefconfig # cross-compile over-ride + diff -u ../config.$CARCH .config || : - make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE -s kernelrelease > version + make ARCH=$KARCH CROSS_COMPILE=$CROSS_COMPILE -s kernelrelease > version # cross-compile over-ride echo "Prepared $pkgbase version $( cmdline + # TODO: merge into 'linux-libre' PKGBUILD (--arch ${KARCH}) echo "Creating kernel sign..." vbutil_kernel \ --pack vmlinux.kpart \ --version 1 \ --vmlinuz kernel.signed \ - --arch aarch64 \ + --arch ${KARCH} \ --keyblock ../kernel.keyblock \ --signprivate ../kernel_data_key.vbprivk \ --config cmdline \ -- cgit v1.2.3 From 51b56166c4547506ad93de453b150bfd4de99d33 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Thu, 21 Jul 2022 12:06:30 -0500 Subject: linux-libre-64: added CONFIG_BATTERY_CW2015 option --- libre/linux-libre-64/PKGBUILD | 2 +- libre/linux-libre-64/config.aarch64 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libre/linux-libre-64/PKGBUILD b/libre/linux-libre-64/PKGBUILD index b3e70eb8d..a75d06f1d 100644 --- a/libre/linux-libre-64/PKGBUILD +++ b/libre/linux-libre-64/PKGBUILD @@ -138,7 +138,7 @@ sha512sums_armv7h=('5a75b12dd386940a0bf1be630d45a514ef3c32289ec5976988764baa8483 '85b2e16a930b8066990c42f973d386dc3c6d62fdf3d1289bbb51df3df296c26f30051162fba49a42d38f71f05de926aa8c065097f14bd8e9f8e28a52949ead00' '2e99582d8b670b6c6b27add14b60e957cbcf9cd6aae40491bd9dea6ac455c0ade0bbee21e3bdfb5e06ce83ad27c5a788404b05bf7ac93831ca18d2e60a67017c' '5b77c587cf2ffb60acf1d9eb43330983548c7e81a53e0ffd2b04962a99441a0000d631ff77c245c7062afc2c8368d996a2456496d42dcb658f330e5083e5e029') -sha512sums_aarch64=('bc7b70863929737346fe6757373897391b43af36bb6884d5351a95aca0f9120f2d2cf9b9c2c6426a440c6b394e9fb334c280711d64081563322a834ecdfb2ba6' +sha512sums_aarch64=('0510d1ad02d0ed0dbc03084fa36ae27b869eec8efe74dbe063b76a0b5ff09828c728baa17b89d20d092b310f3142656bcd9c66f006a6b7800ecd36550b6e15be' '69e81aff3ac5aada75f7330e8c82d0a6aa229585b3f442b2e1a9b86681b0eadc925408d5e2377026599fb0dee72d29043eca4d072b0e2606adc34c872e95c7d6' '4224779106cc520dc2c431322d9693cc968476706854ae9630611cf2896c48a34ca11bf31a4c3995573a128cf5838a6763bac86eb4cbaf509ade9b6a83a24369') sha512sums_armv7h=( ${sha512sums_aarch64[*]} ) # cross-compile over-ride diff --git a/libre/linux-libre-64/config.aarch64 b/libre/linux-libre-64/config.aarch64 index 9552782c8..d85efd173 100644 --- a/libre/linux-libre-64/config.aarch64 +++ b/libre/linux-libre-64/config.aarch64 @@ -4705,7 +4705,7 @@ CONFIG_POWER_SUPPLY_HWMON=y # CONFIG_GENERIC_ADC_BATTERY is not set # CONFIG_TEST_POWER is not set # CONFIG_CHARGER_ADP5061 is not set -# CONFIG_BATTERY_CW2015 is not set +CONFIG_BATTERY_CW2015=y # CONFIG_BATTERY_DS2760 is not set # CONFIG_BATTERY_DS2780 is not set # CONFIG_BATTERY_DS2781 is not set -- cgit v1.2.3