From 12ac8bd1ecadda157d0122f141c2fa2124fb5ba7 Mon Sep 17 00:00:00 2001 From: nagumii Date: Tue, 17 Dec 2024 14:38:07 +0200 Subject: [PATCH] Add Foxbuntu version number in /etc/foxbuntu-release Also includes a temp fix for usb config issue --- .../overlay-luckfox-ubuntu/etc/rc.local | 34 +++++++++++-------- .../rootfs_uclibc_rv1106/etc/foxbuntu-release | 1 + .../etc/update-motd.d/00-header | 8 +++-- 3 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release diff --git a/foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local b/foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local index 9839927..511dfc8 100755 --- a/foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local +++ b/foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local @@ -67,22 +67,26 @@ fi # does not appear to lower power consumption, but needs more testing #(sleep 5 && cpufreq-set -u 408000 && echo "Boot complete, setting CPU frequency to 408mhz.") & -# run USB automount and config tool -/usr/local/bin/usbconfig.sh - -# boot complete ( - echo "Disabling ACT LED..." - echo "none" > /sys/class/leds/work/trigger & - sleep 1 + sleep 5 + # run USB automount and config tool + /usr/local/bin/usbconfig.sh - # blink successful boot code - for i in $(seq 1 5); do - echo 1 > /sys/class/gpio/gpio34/value; - sleep 0.5; - echo 0 > /sys/class/gpio/gpio34/value; - sleep 0.5; - done + # boot complete + ( + echo "Disabling ACT LED..." + echo "none" > /sys/class/leds/work/trigger & + sleep 1 + + # blink successful boot code + for i in $(seq 1 5); do + echo 1 > /sys/class/gpio/gpio34/value; + sleep 0.5; + echo 0 > /sys/class/gpio/gpio34/value; + sleep 0.5; + done + ) + echo "Boot complete." ) & -exit 0 +exit 0 \ No newline at end of file diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release new file mode 100644 index 0000000..ffb3693 --- /dev/null +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/foxbuntu-release @@ -0,0 +1 @@ +0.94a \ No newline at end of file diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header index 7c0ff2e..329dfea 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/update-motd.d/00-header @@ -29,10 +29,12 @@ if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then fi [ -r /etc/lsb-release ] && . /etc/lsb-release +foxbuntu_version=$(cat /etc/foxbuntu-release) +spaces=$((9 - ${#foxbuntu_version})) -#printf "\n" -printf " %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)" -printf " Meshtastic is a registered trademark of Meshtastic LLC.\n" +# Print the result with the appropriate number of spaces +printf " Foxbuntu v$foxbuntu_version%*s%s(%s)\n" $spaces "" "$DISTRIB_DESCRIPTION" "$(uname -r)" +printf " Meshtastic is a registered trademark of Meshtastic LLC.\n" printf " Meshtastic software components are released under various licenses,\n" printf " see GitHub for details. No warranty is provided - use at your own risk.\n" printf " Luckfox: wiki.luckfox.com This image built by github.com/noon92/femtofox\n"