From 8e42dd4054c1cd480c7bf0a1dce32e3b7bb15881 Mon Sep 17 00:00:00 2001 From: Ruledo Date: Fri, 27 Dec 2024 21:36:39 -0800 Subject: [PATCH] Update foxbunto_env_setup.sh Added update_image function that pulls from femtofox repo and rebuilds image (including kernel and rootfs). --- environment-setup/foxbunto_env_setup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/environment-setup/foxbunto_env_setup.sh b/environment-setup/foxbunto_env_setup.sh index 9460b5c..0a0dfc2 100644 --- a/environment-setup/foxbunto_env_setup.sh +++ b/environment-setup/foxbunto_env_setup.sh @@ -133,6 +133,19 @@ modify_chroot() { create_image } +update_image() { + #we still need the chroot scripts function but this will work for now. + echo "Updating repo..." + cd /home/${sudoer}/femtofox + git pull + cd /home/${sudoer}/ + copy_femtofox_kernelcfg + build_kernelconfig + build_rootfs + build_firmware + create_image +} + modify_rootfs() { echo "Modifying rootfs..." cd /home/${sudoer}/luckfox-pico/output/image @@ -289,6 +302,8 @@ elif [[ ${1} == "modify_chroot" ]]; then modify_chroot elif [[ ${1} == "modify_kernel" ]]; then modify_kernel +elif [[ ${1} == "update_image" ]]; then + update_image elif [[ ${1} == "install" ]]; then { echo 'Defaults timestamp_timeout=180' | sudo EDITOR='tee -a' visudo; } > /dev/null 2>&1 start_time=$(date +%s)