aports/testing/linux-av/linux-av-cbook.post-install
Milan P. Stanić 7921c03f23 testing/linux-av: few fixes and improvements
fix kernel.its.armv7
improve linux-av-cbook.post-install
improve and fix APKBUILD
2026-04-17 12:17:44 +00:00

23 lines
886 B
Bash

#!/bin/sh
major=$(mountpoint -d / | cut -f 1 -d ':')
minor=$(mountpoint -d / | cut -f 2 -d ':')
device=$(cat /proc/partitions | awk {'if ($1 == "'${major}'" && $2 == "'${minor}'") print $4 '})
device="/dev/${device%?}1"
kernel="vmlinux-av.fit"
if ! $(lsblk -o PARTTYPENAME $device | busybox grep -q "ChromeOS kernel"); then
echo "*** Warning ***"
echo "$device is not a ChromeOS kernel partition"
echo "kernel is *** not *** flashed, machine will NOT boot properly"
echo "you can do this later by finding ChromeOS kernel partition and running:"
echo "dd if=/boot/$kernel of=/dev/\$partition"
echo "where \$partition is proper ChromeOS kernel partition"
else
echo "flashing new kernel version to ${device}."
dd if=/boot/$kernel of=${device}
sync
echo "if it is not successfuly flashed you can do this later by running:"
echo "dd if=/boot/$kernel of=${device}"
fi