Merge branch 'master' of github.com:FunKey-Project/FunKey-OS

This commit is contained in:
Vincent-FK 2020-11-09 23:39:00 +01:00
commit c29a530f75
4 changed files with 40 additions and 42 deletions

View File

@ -17,28 +17,28 @@ do_postinst()
{
local version
notif "2/5 Resize root filesystem"
notif "2/5 RESIZE ROOT FILESYSTEM"
resize2fs ${root_part}
if [ $? -ne 0 ]; then
notif "Cannot resize root filesystem"
notif "CANNOT RESIZE ROOT FILESYSTEM"
exit 1
fi
notif "3/5 Mount root filesystem"
notif "3/5 MOUNT ROOT FILESYSTEM"
mkdir -p ${root_mount}
mount -t ext4 ${root_part} ${root_mount}
if [ $? -ne 0 ]; then
notif "Cannot mount root filesystem"
notif "CANNOT MOUNT ROOT FILESYSTEM"
exit 1
fi
notif "4/5 Unmount root filesystem"
notif "4/5 UNMOUNT ROOT FILESYSTEM"
touch "${root_mount}/.first_boot"
umount ${root_mount}
if [ $? -ne 0 ]; then
notif "Cannot unmount root filesystem"
notif "CANNOT UNMOUNT ROOT FILESYSTEM"
exit 1
fi
for file in $(ls /mnt/FunKey-rootfs-*.fwu); do
notif "5/5 Erase update file"
notif "5/5 ERASE UPDATE FILE"
rm -f "${file}"
done
exit 0
@ -48,15 +48,12 @@ echo $0 $1
case "$1" in
preinst)
notif "call do_preinst"
do_preinst
;;
postinst)
notif "call do_postinst"
do_postinst
;;
*)
notif "default"
exit 1
;;
esac

View File

@ -108,6 +108,7 @@ clean:
@$(call MESSAGE,"Clean everything")
@$(BR) BR2_EXTERNAL=../Recovery O=../Recovery/output distclean
@$(BR) BR2_EXTERNAL=../FunKey O=../FunKey/output distclean
@rm -f br.log
distclean: clean
@$(call MESSAGE,"Really clean everything")

View File

@ -19,54 +19,54 @@ menu_display () {
# USB mount/unmount
mount | grep -q /dev/mmcblk0p4
if [ $? -eq 0 ]; then
message=" USB mount"
message=" USB MOUNT"
else
message=" USB unmount"
message=" USB UNMOUNT"
fi
;;
1)
# USB check
message=" USB check"
message=" USB CHECK"
;;
2)
# USB format
message=" USB format"
message=" USB FORMAT"
;;
3)
# Network enable/disable
if [ -e /mnt/usbnet ]; then
message=" Network disable"
message=" NETWORK DISABLE"
else
message=" Network enable"
message=" NETWORK ENABLE"
fi
;;
4)
# QR code
message=" QR code"
message=" QR CODE"
;;
5)
# Factory tests enable/disable
if [ -e /mnt/.assembly_tests ]; then
message=" Factory tests disable"
message=" FACTORY TESTS DISABLE"
else
message=" Factory tests enable"
message=" FACTORY TESTS ENABLE"
fi
;;
6)
# Exit Recovery
message=" Exit Recovery"
message=" EXIT RECOVERY"
;;
esac
notif "${message}"
@ -85,25 +85,25 @@ menu_run () {
notif "${message}..."
share start
if [ $? -ne 0 ]; then
notif "${message}...^Cannot mount USB!"
notif "${message}...^CANNOT MOUNT USB!"
else
message=" USB unmount"
message=" USB UNMOUNT"
notif "${message}"
fi
else
notif "${message}..."
share stop
if [ $? -ne 0 ]; then
notif "${message}...^Cannot unmount USB!"
notif "${message}...^CANNOT UNMOUNT USB!"
else
for file in $(ls /mnt/FunKey-*.fwu); do
swupdate -i "${file}"
if [ $? -ne 0 ]; then
notif "${message}...^Cannot update!"
notif "${message}...^CANNOT UPDATE!"
break
fi
done
message=" USB mount"
message=" USB MOUNT"
notif "${message}"
fi
fi
@ -117,20 +117,20 @@ menu_run () {
notif "${message}..."
umount /mnt >/dev/null 2>&1
if [ $? -ne 0 ]; then
notif "${message}...^Cannot check USB!"
notif "${message}...^CANNOT CHECK USB!"
fi
fsck.fat -a -v -w /dev/mmcblk0p4
if [ $? -ne 0 ]; then
notif "${message}...^Cannot check USB!"
notif "${message}...^CANNOT CHECK USB!"
fi
mount /mnt
if [ $? -ne 0 ]; then
notif "${message}...^Cannot check USB!"
notif "${message}...^CANNOT CHECK USB!"
else
notif "${message} done"
notif "${message} DONE"
fi
else
notif "${message}...^Cannot check USB when mounted!"
notif "${message}...^CANNOT CHECK USB WHEN MOUNTED!"
fi
;;
@ -139,7 +139,7 @@ menu_run () {
# USB format
mount | grep -q /dev/mmcblk0p4
if [ $? -eq 0 ]; then
notif "${message}...^Press A to confirm"
notif "${message}...^PRESS A TO CONFIRM"
while true; do
case $(getkey) in
1e0001|1e0002)
@ -147,9 +147,9 @@ menu_run () {
mkfs.vfat /dev/mmcblk0p4 &&
mount /mnt
if [ $? -ne 0 ]; then
notif "${message}...^Cannot format USB!"
notif "${message}...^CANNOT FORMAT USB!"
else
notif "${message} done"
notif "${message} DONE"
fi
break
;;
@ -158,13 +158,13 @@ menu_run () {
;;
*)
notif "${message}...^Aborted!"
notif "${message}...^ABORTED!"
break
;;
esac
done
else
notif "${message}...^Cannot format USB when mounted!"
notif "${message}...^CANNOT FORMAT USB WHEN MOUNTED!"
fi
;;
@ -175,14 +175,14 @@ menu_run () {
if [ $? -eq 0 ]; then
if [ -e /mnt/usbnet ]; then
rm -f /mnt/usbnet
message=" Network enable"
message=" NETWORK ENABLE"
else
touch /mnt/usbnet
message=" Network disable"
message=" NETWORK DISABLE"
fi
notif "${message}"
else
notif "${message}...^Cannot change net if mounted!"
notif "${message}...^CANNOT CHANGE NET IF MOUNTED!"
fi
;;
@ -200,14 +200,14 @@ menu_run () {
if [ $? -eq 0 ]; then
if [ -e /mnt/.assembly_tests ]; then
rm -f /mnt/.assembly_tests
message=" Factory tests enable"
message=" FACTORY TESTS ENABLE"
else
touch /mnt/.assembly_tests
message=" Factory tests disable"
message=" FACTORY TESTS DISABLE"
fi
notif "${message}"
else
notif "${message}...^Cannot test if mounted!"
notif "${message}...^CANNOT TEST IF MOUNTED!"
fi
;;

View File

@ -17,7 +17,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_RECOVERY_PATH)/board/funkey/post-bu
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/FunKey-Project/linux"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="95c88d82835eef32096cda4c78e4d09fa1d4bfe5"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="e4dc6f8ad9a0e8be30d04cdb6c123797d923e644"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_RECOVERY_PATH)/board/funkey/linux.config"
BR2_LINUX_KERNEL_LZO=y