summaryrefslogtreecommitdiff
path: root/libre/linux-libre-64/linux-libre-64-chromebook.install
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-07-10 16:05:04 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2022-07-15 03:33:24 -0400
commitfa70b032579aeb81f0625febff96339da7fa24f5 (patch)
treeae80f897cc2f27d8d6eb234b0d699ec8fb94be6d /libre/linux-libre-64/linux-libre-64-chromebook.install
parent3db6372809ed0b37a2d11a072b34230ec0d6a8af (diff)
downloadabslibre-fa70b032579aeb81f0625febff96339da7fa24f5.tar.gz
abslibre-fa70b032579aeb81f0625febff96339da7fa24f5.tar.bz2
abslibre-fa70b032579aeb81f0625febff96339da7fa24f5.zip
[linux-libre-64]: WIP - upgrade to v5.18.5
Diffstat (limited to 'libre/linux-libre-64/linux-libre-64-chromebook.install')
-rw-r--r--libre/linux-libre-64/linux-libre-64-chromebook.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/libre/linux-libre-64/linux-libre-64-chromebook.install b/libre/linux-libre-64/linux-libre-64-chromebook.install
new file mode 100644
index 000000000..54682de7e
--- /dev/null
+++ b/libre/linux-libre-64/linux-libre-64-chromebook.install
@@ -0,0 +1,26 @@
+post_install () {
+ if mountpoint -q /boot; then
+ major=$(mountpoint -d /boot | cut -f 1 -d ':')
+ minor=$(mountpoint -d /boot | cut -f 2 -d ':')
+ else
+ major=$(mountpoint -d / | cut -f 1 -d ':')
+ minor=$(mountpoint -d / | cut -f 2 -d ':')
+ fi
+ device=$(cat /proc/partitions | awk {'if ($1 == "'${major}'" && $2 == "'${minor}'") print $4 '})
+ device="/dev/${device/%2/1}"
+
+ echo "A new kernel version needs to be flashed onto ${device}."
+ echo "Do you want to do this now? [y|N]"
+ read -r shouldwe
+ if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
+ dd if=/boot/vmlinux.kpart of=${device}
+ sync
+ else
+ echo "You can do this later by running:"
+ echo "# dd if=/boot/vmlinux.kpart of=${device}"
+ fi
+}
+
+post_upgrade() {
+ post_install
+}