From 02b5dcbcac07caad9b22f2c23b9b301ead3ab76b Mon Sep 17 00:00:00 2001 From: Stefan Hansson Date: Thu, 18 Apr 2024 12:11:11 +0200 Subject: [PATCH] main/postmarketos-update-kernel: remove (MR 5045) Was integrated into boot-deploy in https://gitlab.com/postmarketOS/boot-deploy/-/commit/5c17849fab85d5d28755bfc9b6d4c7ec74349056 As such, this package is redundant. --- main/postmarketos-update-kernel/APKBUILD | 18 ----- .../update-kernel.sh | 66 ------------------- 2 files changed, 84 deletions(-) delete mode 100644 main/postmarketos-update-kernel/APKBUILD delete mode 100644 main/postmarketos-update-kernel/update-kernel.sh diff --git a/main/postmarketos-update-kernel/APKBUILD b/main/postmarketos-update-kernel/APKBUILD deleted file mode 100644 index 4cb9c4940..000000000 --- a/main/postmarketos-update-kernel/APKBUILD +++ /dev/null @@ -1,18 +0,0 @@ -pkgname=postmarketos-update-kernel -pkgver=0.0.9 -pkgrel=0 -pkgdesc="kernel updater script for postmarketOS" -url="https://postmarketos.org" -depends="devicepkg-utils util-linux" -source="update-kernel.sh" -arch="noarch" -license="GPL3" - -package() { - install -Dm755 "$srcdir/update-kernel.sh" \ - "$pkgdir/sbin/pmos-update-kernel" -} - -sha512sums=" -1bdbf90a291629bb72e277e5e9fbcdfbca3b38f0f4c6fcf604c487196e1f60139c9e0de656274f545b29b4b09d488bd248e8fa5049f765ad000220af98d08427 update-kernel.sh -" diff --git a/main/postmarketos-update-kernel/update-kernel.sh b/main/postmarketos-update-kernel/update-kernel.sh deleted file mode 100644 index abb743ddf..000000000 --- a/main/postmarketos-update-kernel/update-kernel.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/ash -# shellcheck shell=dash -set -e - -# Declare used deviceinfo variables to pass shellcheck -deviceinfo_append_dtb="" - -# shellcheck disable=SC1091 -. /usr/share/misc/source_deviceinfo - -# On A/B devices with bootloader cmdline ON this will return the slot suffix -# if booting with an alternate method which erases the stock bootloader cmdline -# this will be empty and the update will fail. -# https://source.android.com/devices/bootloader/updating#slots -# On non-A/B devices this will be empty -ab_get_slot() { - ab_slot_suffix=$(grep -o 'androidboot\.slot_suffix=..' /proc/cmdline | cut -d "=" -f2) || : - echo "$ab_slot_suffix" -} - -# $1: partition to flash from deviceinfo -update_android_fastboot() { - BOOT_PART_SUFFIX=$(ab_get_slot) # Empty for non-A/B devices - BOOT_PARTITION=$(findfs PARTLABEL="$1${BOOT_PART_SUFFIX}") - echo "Flashing boot.img to '$1${BOOT_PART_SUFFIX}'" - dd if=/boot/boot.img of="$BOOT_PARTITION" bs=1M -} - -update_android_split_kernel_initfs() { - KERNEL_PARTITION=$(findfs PARTLABEL="${deviceinfo_flash_heimdall_partition_kernel:?}") - INITFS_PARTITION=$(findfs PARTLABEL="${deviceinfo_flash_heimdall_partition_initfs:?}") - - KERNEL="vmlinuz" - if [ "${deviceinfo_append_dtb}" = "true" ]; then - KERNEL="$KERNEL-dtb" - fi - - echo "Flashing kernel ($KERNEL)..." - dd if=/boot/"$KERNEL" of="$KERNEL_PARTITION" bs=1M - - echo "Flashing initramfs..." - gunzip -c /boot/initramfs | lzop | dd of="$INITFS_PARTITION" bs=1M -} - -METHOD=${deviceinfo_flash_method:?} -case $METHOD in - fastboot) - update_android_fastboot "${deviceinfo_flash_fastboot_partition_kernel:-boot}" - ;; - heimdall-bootimg) - update_android_fastboot "${deviceinfo_flash_heimdall_partition_kernel:-KERNEL}" - ;; - heimdall-isorec) - update_android_split_kernel_initfs - ;; - 0xffff) - echo -n "No need to use this utility, since uboot loads the kernel directly from" - echo " the boot partition. Your kernel should be updated already." - exit 1 - ;; - *) - echo "Devices with flash method: $METHOD are not supported." - exit 1 - ;; -esac -echo "Done."