From b68a5a0bd95868652bfd9b28d89a7998bbc3989e Mon Sep 17 00:00:00 2001 From: Ruledo Date: Sat, 28 Dec 2024 18:08:51 -0800 Subject: [PATCH 1/5] Update foxbunto_env_setup.sh Added a basic menu system. --- environment-setup/foxbunto_env_setup.sh | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/environment-setup/foxbunto_env_setup.sh b/environment-setup/foxbunto_env_setup.sh index 0a0dfc2..3738d36 100644 --- a/environment-setup/foxbunto_env_setup.sh +++ b/environment-setup/foxbunto_env_setup.sh @@ -289,6 +289,71 @@ usage() { exit 0 } +################### MENU SYSTEM ################### + +while true; do + CHOICE=$(dialog --clear --backtitle "Foxbuntu SDK Builder" \ + --title "Main Menu" \ + --menu "Choose an action:" 20 60 12 \ + 1 "Update Image" \ + 2 "Modify Chroot" \ + 3 "Modify Kernel" \ + 4 "Install Prerequisites" \ + 5 "Clone Repositories" \ + 6 "Build Environment" \ + 7 "Build SysDrv" \ + 8 "Build U-Boot" \ + 9 "Build RootFS" \ + 10 "Create Final Image" \ + 11 "Install (Run All Steps)" \ + 12 "Exit" \ + 2>&1 >/dev/tty) + + clear + + case $CHOICE in + 1) + update_image + ;; + 2) + modify_chroot + ;; + 3) + modify_kernel + ;; + 4) + install_prerequisites + ;; + 5) + clone_repos + ;; + 6) + build_env + ;; + 7) + build_sysdrv + ;; + 8) + build_uboot + ;; + 9) + build_rootfs + ;; + 10) + create_image + ;; + 11) + install + ;; + 12) + echo "Exiting..." + break + ;; + *) + echo "Invalid option, please try again." + ;; + esac +done ### Run all functions. Broken out so any individual step can be performed if failed. # Should add clean functions... From c682bee0a84eae65923786151b2187ebcbfe9f27 Mon Sep 17 00:00:00 2001 From: noon92 <40807970+noon92@users.noreply.github.com> Date: Mon, 30 Dec 2024 14:23:04 +0200 Subject: [PATCH 2/5] Revert "Default password for femto is now femto. Must be changed on first login." --- environment-setup/foxbunto_env_setup.sh | 7 ++-- .../sysdrv/out/rootfs_uclibc_rv1106/etc/issue | 2 +- .../etc/pam.d/common-password | 33 ------------------- 3 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/pam.d/common-password diff --git a/environment-setup/foxbunto_env_setup.sh b/environment-setup/foxbunto_env_setup.sh index 758d549..ce3067a 100755 --- a/environment-setup/foxbunto_env_setup.sh +++ b/environment-setup/foxbunto_env_setup.sh @@ -22,7 +22,7 @@ sudoer=$(echo $SUDO_USER) install_prerequisites() { echo “Setting up Foxbuntu build environment…” apt update - apt install -y git ssh make gcc gcc-multilib g++-multilib module-assistant expect g++ gawk texinfo libssl-dev bison flex fakeroot cmake unzip gperf autoconf device-tree-compiler libncurses5-dev pkg-config bc python-is-python3 passwd openssl openssh-server openssh-client vim file cpio rsync qemu-user-static binfmt-support dialog + apt install -y git ssh make gcc gcc-multilib g++-multilib module-assistant expect g++ gawk texinfo libssl-dev bison flex fakeroot cmake unzip gperf autoconf device-tree-compiler libncurses5-dev pkg-config bc python-is-python3 passwd openssl openssh-server openssh-client vim file cpio rsync qemu-user-static binfmt-support } clone_repos() { @@ -190,7 +190,7 @@ ln -sf /usr/share/zoneinfo/UTC /etc/localtime echo "Installing packages..." apt update -DEBIAN_FRONTEND=noninteractive apt install -y --option Dpkg::Options::="--force-confold" linux-firmware wireless-tools git python3.10-venv libgpiod-dev libyaml-cpp-dev libbluetooth-dev openssl libssl-dev libulfius-dev liborcania-dev evtest screen avahi-daemon protobuf-compiler telnet fonts-noto-color-emoji ninja-build chrony qrencode +DEBIAN_FRONTEND=noninteractive apt install -y --option Dpkg::Options::="--force-confold" linux-firmware wireless-tools git python3.10-venv libgpiod-dev libyaml-cpp-dev libbluetooth-dev openssl libssl-dev libulfius-dev liborcania-dev evtest screen avahi-daemon protobuf-compiler telnet fonts-noto-color-emoji ninja-build chrony if [[ $? -eq 2 ]]; then echo "Error, step failed..."; fi DEBIAN_FRONTEND=noninteractive apt upgrade -y --option Dpkg::Options::="--force-confold" @@ -248,8 +248,7 @@ find / -group pico -exec chgrp femto {} \ find / -user pico -exec chown femto {} \ usermod -d /home/femto -m femto ls -ld /home/femto -echo 'femto:femto' | chpasswd -sudo chage -d 0 femto +echo 'femto:fox' | chpasswd usermod -a -G tty femto usermod -a -G dialout femto diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/issue b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/issue index 0f52a0a..2b85869 100644 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/issue +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/issue @@ -1,4 +1,4 @@ Ubuntu 22.04.3 LTS \n \l -[username:password] root:root femto:femto (default) +[username:password] root:root femto:fox diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/pam.d/common-password b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/pam.d/common-password deleted file mode 100644 index aad381d..0000000 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/pam.d/common-password +++ /dev/null @@ -1,33 +0,0 @@ -# -# /etc/pam.d/common-password - password-related modules common to all services -# -# This file is included from other service-specific PAM config files, -# and should contain a list of modules that define the services to be -# used to change user passwords. The default is pam_unix. - -# Explanation of pam_unix options: -# The "yescrypt" option enables -#hashed passwords using the yescrypt algorithm, introduced in Debian -#11. Without this option, the default is Unix crypt. Prior releases -#used the option "sha512"; if a shadow password hash will be shared -#between Debian 11 and older releases replace "yescrypt" with "sha512" -#for compatibility . The "obscure" option replaces the old -#`OBSCURE_CHECKS_ENAB' option in login.defs. See the pam_unix manpage -#for other options. - -# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. -# To take advantage of this, it is recommended that you configure any -# local modules either before or after the default block, and use -# pam-auth-update to manage selection of other modules. See -# pam-auth-update(8) for details. - -# here are the per-package modules (the "Primary" block) -password [success=1 default=ignore] pam_unix.so obscure yescrypt minlen=0 -# here's the fallback if no module succeeds -password requisite pam_deny.so -# prime the stack with a positive return value if there isn't one already; -# this avoids us returning an error just because nothing sets a success code -# since the modules above will each just jump around -password required pam_permit.so -# and here are more per-package modules (the "Additional" block) -# end of pam-auth-update config From de4447b2be07e0e9f1b94d0c3d971d3c90043e00 Mon Sep 17 00:00:00 2001 From: noon92 <40807970+noon92@users.noreply.github.com> Date: Mon, 30 Dec 2024 17:41:05 +0200 Subject: [PATCH 3/5] usb_config.md updated from https://stackedit.io/ --- usb_config.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/usb_config.md b/usb_config.md index a9a4afd..e2d049c 100644 --- a/usb_config.md +++ b/usb_config.md @@ -49,8 +49,6 @@ meshtastic_legacy_admin="true" > * `sx1262_xtal` *(for AiThinker RA01SH, and Waveshare Pi hat)* > * `lr1121_tcxo` *(experimental, for Ebyte E80-900M2213S)* > * `none` *(for simulated radio)* -> ->To add a `meshtastic_admin_key`, copy it from the app and add `base64:` to the beginning (`meshtastic_admin_key="base64:T/b8EGvi/Nqi6GyGefJt/jOQr+5uWHHZuBavkNcUwWQ="`). > > Clearing the `meshtastic_admin_key` list: The admin key list can contain up to three keys - *if more are added they will be ignored*. The USB configuration tool supports clearing the admin key list, after which you will need to re-add your admin key/s in a second operation. To clear the admin key list, enter `meshtastic_admin_key="clear"`. @@ -74,6 +72,3 @@ When the Femtofox is finished booting, it will blink its User LED (see below) in > [!NOTE] > Boot codes can appear in sequence - for example: one long (4 second) blink, followed by 5 medium (half second) blinks means the USB drive failed to mount, and that the boot sequence is complete. - \ No newline at end of file From 27fe1732846dcd151c8c5aba563900a078fa66d1 Mon Sep 17 00:00:00 2001 From: noon92 <40807970+noon92@users.noreply.github.com> Date: Mon, 30 Dec 2024 17:42:24 +0200 Subject: [PATCH 4/5] usb_config.md updated from https://stackedit.io/ --- usb_config.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usb_config.md b/usb_config.md index e2d049c..6b37c0b 100644 --- a/usb_config.md +++ b/usb_config.md @@ -72,3 +72,6 @@ When the Femtofox is finished booting, it will blink its User LED (see below) in > [!NOTE] > Boot codes can appear in sequence - for example: one long (4 second) blink, followed by 5 medium (half second) blinks means the USB drive failed to mount, and that the boot sequence is complete. + \ No newline at end of file From 1193f062e5bdb05de2416ed1b36c15d03d3eea2c Mon Sep 17 00:00:00 2001 From: noon92 <40807970+noon92@users.noreply.github.com> Date: Mon, 30 Dec 2024 18:04:36 +0200 Subject: [PATCH 5/5] supported_hardware.md updated from https://stackedit.io/ --- supported_hardware.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/supported_hardware.md b/supported_hardware.md index 7da1375..68f607d 100644 --- a/supported_hardware.md +++ b/supported_hardware.md @@ -1,12 +1,12 @@ ## Supported Hardware | Hardware | Confirmed working | Expected to work | Notes | |-|-|-|--| -|LoRa radios (working with Meshtasticd)|
  • [Waveshare RPi LoRa hat without GNSS](https://www.waveshare.com/sx1262-lorawan-hat.htm?sku=22002)*
  • [Seeed Wio SX1262](https://www.seeedstudio.com/Wio-SX1262-Wireless-Module-p-5981.html)
  • [Ebyte E220900M30S](https://aliexpress.com/item/4000543921245.html)
  • AI Thinker RA-01SH
  • [Heltec HT-RA62](https://www.aliexpress.com/item/1005005445349105.html)|
  • Ebyte E22-900mm22s
  • [Ebyte E22-900m22s](https://www.aliexpress.com/item/1005001808069127.html)
  • Any SPI LoRa radio that's Meshtastic compatible|*Waveshare RPi hat is not recommended as it has issues with sending longer messages.| | -|MicroSD cards|
  • [Kingston Endurance 32gb](https://www.kingston.com/en/memory-cards/high-endurance-microsd-card)
  • [Sandisk Ultra UHS-I 32gb](https://shop.sandisk.com/products/memory-cards/microsd-cards/sandisk-ultra-uhs-i-microsd?sku=SDSQUA4-032G-GN6MA)|Any reasonably fast (UHS-I or better) card with 8gb or more|Stick with reputable manufacturers (Kingston, PNY Samsung, Sandisk, Transcend...)
    The faster the better! Consider sticking with "endurance" cards, especially for remotely deployed nodes.| | -|RTC (real time clock)|
  • [DS3231M](https://vi.aliexpress.com/item/1005007143842437.html)
  • [DS1307](https://vi.aliexpress.com/item/1005007143542894.html)|DS1337, DS1338, DS1340, other DS3231 variants |Some DS3231 modules are listed as having a supercapacitor - these are usually actually lithium coin cells.| | -|Meshtastic nodes|USB+UART: [RAK4631 with RAK19007 or RAK19003 base board](https://store.rakwireless.com/products/wisblock-meshtastic-starter-kit)| |RAK4630 and 4631 are the same.| | -|USB wifi adapter chipsets|||See below | | -|Misc. hardware|
  • USB hubs (powered or not)
  • Thumb drives
  • SD card readers||If power draw exceeds supply, the device will reboot, bootloop or hard crash. Unpowered USB hubs seem to be notorious for causing reboots.| | +|LoRa radios (working with Meshtasticd)|
  • [Waveshare RPi LoRa hat without GNSS](https://www.waveshare.com/sx1262-lorawan-hat.htm?sku=22002)*
  • [Seeed Wio SX1262](https://www.seeedstudio.com/Wio-SX1262-Wireless-Module-p-5981.html)
  • [Ebyte E220900M30S](https://aliexpress.com/item/4000543921245.html)
  • AI Thinker RA-01SH
  • [Heltec HT-RA62](https://www.aliexpress.com/item/1005005445349105.html)|
  • Ebyte E22-900mm22s
  • [Ebyte E22-900m22s](https://www.aliexpress.com/item/1005001808069127.html)
  • Any SPI LoRa radio that's Meshtastic compatible|*Waveshare RPi hat is not recommended as it has issues with sending longer messages.| +|MicroSD cards|
  • [Kingston Endurance 32gb](https://www.kingston.com/en/memory-cards/high-endurance-microsd-card)
  • [Sandisk Ultra UHS-I 32gb](https://shop.sandisk.com/products/memory-cards/microsd-cards/sandisk-ultra-uhs-i-microsd?sku=SDSQUA4-032G-GN6MA)|Any reasonably fast (UHS-I or better) card with 8gb or more|Stick with reputable manufacturers (Kingston, PNY Samsung, Sandisk, Transcend...)
    The faster the better! Consider sticking with "endurance" cards, especially for remotely deployed nodes.| +|RTC (real time clock)|
  • [DS3231M](https://vi.aliexpress.com/item/1005007143842437.html)
  • [DS1307](https://vi.aliexpress.com/item/1005007143542894.html)|DS1337, DS1338, DS1340, other DS3231 variants |Some DS3231 modules are listed as having a supercapacitor - these are usually actually lithium coin cells.| +|Meshtastic nodes|USB+UART: [RAK4631 with RAK19007 or RAK19003 base board](https://store.rakwireless.com/products/wisblock-meshtastic-starter-kit)| |RAK4630 and 4631 are the same.| +|USB wifi adapter chipsets|||See below| | +|Misc. hardware|
  • USB hubs (powered or not)
  • Thumb drives
  • SD card readers||If power draw exceeds supply, the device will reboot, bootloop or hard crash. Unpowered USB hubs seem to be notorious for causing reboots.
    Some users have reported that USB-C flash drives do not work. This requires more study.| ### Wifi chipsets The following wifi chipsets/devices have their drivers included in the OS images. Most of these have not been tested. Note that power consumption metrics are for a specific version of a chipset and may not apply to all implementations.