From 17b40b7c6bb95cf84cae8e65efeabbe550e24d2a Mon Sep 17 00:00:00 2001 From: Adam Boardman Date: Wed, 6 Jan 2021 21:46:51 +0000 Subject: [PATCH] Populate the rest of the parameters based upon the selected device --- debian/postinst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/debian/postinst b/debian/postinst index b8481f2..57604c7 100755 --- a/debian/postinst +++ b/debian/postinst @@ -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