Populate the rest of the parameters based upon the selected device

This commit is contained in:
Adam Boardman 2021-01-06 21:46:51 +00:00
parent 3fb8a43970
commit 17b40b7c6b

19
debian/postinst vendored
View file

@ -16,17 +16,11 @@ target_checksum="unknown"
if [[ "$cmdline" =~ ^(.*)androidboot.hardware\=mt6797(.*)$ ]];
then
device="mt6797"
android_system_dir="/data"
android_system_img="/data/system.img"
target_checksum="39cd17718e838823c80be0ddfc9763d88e32c1b0"
fi
if [[ "$cmdline" =~ ^(.*)androidboot.hardware\=mt6771(.*)$ ]];
then
device="mt6771"
android_system_dir="/var/lib/lxc/android"
android_system_img="/var/lib/lxc/android/android-rootfs.img"
target_checksum="4478ce425e593fb708b86234a8ea83e6fcdaaeec"
fi
if [ "$device" == unknown ]; then
@ -38,6 +32,19 @@ if [ "$device" == unknown ]; then
done
fi
case $device in
"mt6797")
android_system_dir="/data"
android_system_img="/data/system.img"
target_checksum="39cd17718e838823c80be0ddfc9763d88e32c1b0"
;;
"mt6771")
android_system_dir="/var/lib/lxc/android"
android_system_img="/var/lib/lxc/android/android-rootfs.img"
target_checksum="4478ce425e593fb708b86234a8ea83e6fcdaaeec"
;;
esac
[ -e /lib/udev/rules.d/80-keyboard.rules ] || \
cp /usr/lib/gemian/udev-rules/80-keyboard-$device.rules /lib/udev/rules.d/80-keyboard.rules