Moving internal keyboard rules files to sit with the system installation scripts, also best to create the directory before trying to move files into it
This commit is contained in:
parent
71e6e206c6
commit
db2c3c9e86
5 changed files with 16 additions and 30 deletions
1
debian/gemian-system.install
vendored
Normal file
1
debian/gemian-system.install
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
udev/rules.d/* /usr/lib/gemian/udev-rules/
|
||||||
10
debian/postinst
vendored
10
debian/postinst
vendored
|
|
@ -8,21 +8,30 @@ if [ "$action" != configure ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmdline=$(</proc/cmdline)
|
cmdline=$(</proc/cmdline)
|
||||||
|
device="unknown"
|
||||||
|
android_system_dir="unknown"
|
||||||
android_system_img="unknown"
|
android_system_img="unknown"
|
||||||
target_checksum="unknown"
|
target_checksum="unknown"
|
||||||
|
|
||||||
if [[ "$cmdline" =~ ^(.*)androidboot.hardware\=mt6797(.*)$ ]];
|
if [[ "$cmdline" =~ ^(.*)androidboot.hardware\=mt6797(.*)$ ]];
|
||||||
then
|
then
|
||||||
|
device="mt6797"
|
||||||
|
android_system_dir="/data"
|
||||||
android_system_img="/data/system.img"
|
android_system_img="/data/system.img"
|
||||||
target_checksum="39cd17718e838823c80be0ddfc9763d88e32c1b0"
|
target_checksum="39cd17718e838823c80be0ddfc9763d88e32c1b0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$cmdline" =~ ^(.*)androidboot.hardware\=mt6771(.*)$ ]];
|
if [[ "$cmdline" =~ ^(.*)androidboot.hardware\=mt6771(.*)$ ]];
|
||||||
then
|
then
|
||||||
|
device="mt6771"
|
||||||
|
android_system_dir="/var/lib/lxc/android"
|
||||||
android_system_img="/var/lib/lxc/android/android-rootfs.img"
|
android_system_img="/var/lib/lxc/android/android-rootfs.img"
|
||||||
target_checksum="4478ce425e593fb708b86234a8ea83e6fcdaaeec"
|
target_checksum="4478ce425e593fb708b86234a8ea83e6fcdaaeec"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ -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
|
||||||
|
|
||||||
echo "Target checksum $target_checksum"
|
echo "Target checksum $target_checksum"
|
||||||
|
|
||||||
echo "Checking $android_system_img"
|
echo "Checking $android_system_img"
|
||||||
|
|
@ -45,6 +54,7 @@ else
|
||||||
if [ "$target_checksum" == "$downloaded_checksum" ];
|
if [ "$target_checksum" == "$downloaded_checksum" ];
|
||||||
then
|
then
|
||||||
echo "Moving new system image into place, please reboot to activate"
|
echo "Moving new system image into place, please reboot to activate"
|
||||||
|
mkdir -p $android_system_dir
|
||||||
mv $tempfile $android_system_img
|
mv $tempfile $android_system_img
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
|
|
||||||
33
debian/rules
vendored
33
debian/rules
vendored
|
|
@ -1,34 +1,7 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
# -*- makefile -*-
|
|
||||||
|
|
||||||
# Uncomment this to turn on verbose mode.
|
# Uncomment this to turn on verbose mode.
|
||||||
#export DH_VERBOSE=1
|
export DH_VERBOSE=1
|
||||||
|
|
||||||
# keep lintian happy:
|
%:
|
||||||
build: build-arch build-indep
|
dh $@
|
||||||
build-arch: build-stamp
|
|
||||||
build-indep:
|
|
||||||
|
|
||||||
build-stamp:
|
|
||||||
|
|
||||||
clean: checkdir
|
|
||||||
|
|
||||||
binary-arch:
|
|
||||||
|
|
||||||
binary-indep:
|
|
||||||
-rm -rf debian/tmp
|
|
||||||
install -p -d -o root -g root -m 755 debian/tmp
|
|
||||||
install -p -d -o root -g root -m 755 debian/tmp/DEBIAN
|
|
||||||
install -p -o root -g root -m 755 debian/postinst debian/tmp/DEBIAN/
|
|
||||||
dpkg-gencontrol
|
|
||||||
dpkg --build debian/tmp ..
|
|
||||||
|
|
||||||
binary: binary-arch binary-indep
|
|
||||||
|
|
||||||
checkdir:
|
|
||||||
@test -f debian/rules
|
|
||||||
|
|
||||||
checkroot: checkdir
|
|
||||||
@test 0 = `id -u` || { echo "Error: not super-user"; exit 1; }
|
|
||||||
|
|
||||||
.PHONY: binary binary-arch binary-indep clean checkroot checkdir build build-arch build-indep
|
|
||||||
|
|
|
||||||
1
udev/rules.d/80-keyboard-mt6771.rules
Normal file
1
udev/rules.d/80-keyboard-mt6771.rules
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
SUBSYSTEM=="input", ATTRS{name}=="Integrated keyboard", ENV{XKBMODEL}="planetcosmo"
|
||||||
1
udev/rules.d/80-keyboard-mt6797.rules
Normal file
1
udev/rules.d/80-keyboard-mt6797.rules
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
SUBSYSTEM=="input", ATTRS{name}=="Integrated keyboard", ENV{XKBMODEL}="planetgemini"
|
||||||
Loading…
Add table
Reference in a new issue