From 1862c4d21ea0fbb4a006e74607e7997dc6287ce6 Mon Sep 17 00:00:00 2001 From: Michel-FK Date: Mon, 1 Mar 2021 23:23:34 +0100 Subject: [PATCH] add fix for funkey_gpio_management in Recovery Signed-off-by: Michel-FK --- FunKey/board/funkey/sw-description | 5 +++++ FunKey/board/funkey/update_partition | 13 +++++++++---- Makefile | 3 ++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/FunKey/board/funkey/sw-description b/FunKey/board/funkey/sw-description index d411479..a4158d1 100644 --- a/FunKey/board/funkey/sw-description +++ b/FunKey/board/funkey/sw-description @@ -12,6 +12,11 @@ software = installed-directly = true; compressed = "zlib"; } + files: ( + { + filename = "funkey_gpio_management"; + path = "/tmp/"; + } ); scripts: ( { diff --git a/FunKey/board/funkey/update_partition b/FunKey/board/funkey/update_partition index 82f46b1..ae3c1f3 100755 --- a/FunKey/board/funkey/update_partition +++ b/FunKey/board/funkey/update_partition @@ -9,19 +9,24 @@ root_mount=/tmp/rootfs do_preinst() { - notif " 1/4 EXTRACT FIRMWARE UPDATE..^DO NOT TURN OFF THE CONSOLE" + notif " 1/5 EXTRACT FIRMWARE UPDATE..^DO NOT TURN OFF THE CONSOLE" exit 0 } do_postinst() { - notif " 2/4 RESIZE ROOT FILESYSTEM^DO NOT TURN OFF THE CONSOLE" + notif " 2/5 FIX RECOVERY GPIO MANAGER" + rw + cp -a /tmp/funkey_gpio_management /usr/local/sbin/ + chmod +x /usr/local/sbin/funkey_gpio_management + ro + notif " 3/5 RESIZE ROOT FILESYSTEM^DO NOT TURN OFF THE CONSOLE" resize2fs ${root_part} if [ $? -ne 0 ]; then notif " CANNOT RESIZE ROOT^FILESYSTEM" exit 1 fi - notif " 3/4 COPY OPKS TO USB MOUNT^DO NOT TURN OFF THE CONSOLE" + notif " 4/5 COPY OPKS TO USB MOUNT^DO NOT TURN OFF THE CONSOLE" folder_opks_emulators=/mnt/Emulators if [ ! -d "$folder_opks_emulators" ]; then mkdir -p "$folder_opks_emulators" @@ -39,7 +44,7 @@ do_postinst() fi fi for file in $(ls /mnt/FunKey-*.fwu); do - notif " 4/4 ERASE UPDATE FILE^DO NOT TURN OFF THE CONSOLE" + notif " 5/5 ERASE UPDATE FILE^DO NOT TURN OFF THE CONSOLE" rm -f "${file}" done exit 0 diff --git a/Makefile b/Makefile index dfcee80..d7536e0 100644 --- a/Makefile +++ b/Makefile @@ -121,12 +121,13 @@ update: fun @mkdir -p tmp @cp FunKey/board/funkey/sw-description tmp/ @cp FunKey/board/funkey/update_partition tmp/ + @cp -a Recovery/output/target/usr/local/sbin/funkey_gpio_management tmp/ @cd FunKey/output/images && \ rm -f rootfs.ext2.gz && \ gzip -k rootfs.ext2 &&\ mv rootfs.ext2.gz ../../../tmp/ @cd tmp && \ - echo sw-description rootfs.ext2.gz update_partition | \ + echo sw-description rootfs.ext2.gz update_partition funkey_gpio_management | \ tr " " "\n" | \ cpio -o -H crc --quiet > ../images/FunKey-rootfs-$(shell cat FunKey/board/funkey/rootfs-overlay/etc/sw-versions | cut -f 2).fwu @rm -rf tmp