mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2025-12-12 15:48:51 +01:00
add fix for funkey_gpio_management in Recovery
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
7678fcab13
commit
1862c4d21e
@ -12,6 +12,11 @@ software =
|
|||||||
installed-directly = true;
|
installed-directly = true;
|
||||||
compressed = "zlib";
|
compressed = "zlib";
|
||||||
}
|
}
|
||||||
|
files: (
|
||||||
|
{
|
||||||
|
filename = "funkey_gpio_management";
|
||||||
|
path = "/tmp/";
|
||||||
|
}
|
||||||
);
|
);
|
||||||
scripts: (
|
scripts: (
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,19 +9,24 @@ root_mount=/tmp/rootfs
|
|||||||
|
|
||||||
do_preinst()
|
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
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
do_postinst()
|
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}
|
resize2fs ${root_part}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
notif " CANNOT RESIZE ROOT^FILESYSTEM"
|
notif " CANNOT RESIZE ROOT^FILESYSTEM"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
folder_opks_emulators=/mnt/Emulators
|
||||||
if [ ! -d "$folder_opks_emulators" ]; then
|
if [ ! -d "$folder_opks_emulators" ]; then
|
||||||
mkdir -p "$folder_opks_emulators"
|
mkdir -p "$folder_opks_emulators"
|
||||||
@ -39,7 +44,7 @@ do_postinst()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
for file in $(ls /mnt/FunKey-*.fwu); do
|
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}"
|
rm -f "${file}"
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
3
Makefile
3
Makefile
@ -121,12 +121,13 @@ update: fun
|
|||||||
@mkdir -p tmp
|
@mkdir -p tmp
|
||||||
@cp FunKey/board/funkey/sw-description tmp/
|
@cp FunKey/board/funkey/sw-description tmp/
|
||||||
@cp FunKey/board/funkey/update_partition tmp/
|
@cp FunKey/board/funkey/update_partition tmp/
|
||||||
|
@cp -a Recovery/output/target/usr/local/sbin/funkey_gpio_management tmp/
|
||||||
@cd FunKey/output/images && \
|
@cd FunKey/output/images && \
|
||||||
rm -f rootfs.ext2.gz && \
|
rm -f rootfs.ext2.gz && \
|
||||||
gzip -k rootfs.ext2 &&\
|
gzip -k rootfs.ext2 &&\
|
||||||
mv rootfs.ext2.gz ../../../tmp/
|
mv rootfs.ext2.gz ../../../tmp/
|
||||||
@cd tmp && \
|
@cd tmp && \
|
||||||
echo sw-description rootfs.ext2.gz update_partition | \
|
echo sw-description rootfs.ext2.gz update_partition funkey_gpio_management | \
|
||||||
tr " " "\n" | \
|
tr " " "\n" | \
|
||||||
cpio -o -H crc --quiet > ../images/FunKey-rootfs-$(shell cat FunKey/board/funkey/rootfs-overlay/etc/sw-versions | cut -f 2).fwu
|
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
|
@rm -rf tmp
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user