diff --git a/README.md b/README.md index 532a76f..fd47dba 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,24 @@ -# Install-script +# Install script -## Flashing Jetson devices - -Requirements: - -- A Linux computer -- USB cable to connect to the Jetson device -- Jumper cable (for devices without reset button) - -Run the script `jetson_flash.sh` on your own computer. The script will download the necessary files (BSP and root filesystem) and flash them to the Jetson device. - -The script will prompt you for the exact version of Jetson Linux you want to install. Available versions are listed here: . You can find the links to the BSP and root filesystem by clicking on the desired version and on the next page copying the links for "Driver Package (BSP) and Sample Root Filesystem". +This repository contains scripts for flashing and configuring computers for use in F4F/MRS. -The script will also ask you whether you want to keep the temporary files after flashing. -If you need to flash multiple devices then select yes to avoid re-downloading them. -A separate directory will be created for each version of Jetson Linux, my default at `$HOME/jetson_flash_tmp_VERSION/`. -In case you change your mind you can always delete the entire directory. -The size of this directory is about 75 GB. +## Configuration utility -After the script completes, you can continue configuration on the Jetson device by cloning this repository and running the `setup_utility.sh` script. +Use these scripts directly on the host that you want to configure. -## Configuration utility +### Interactive configuration utility - Run the script with "setup_utility.sh" in the root directory of the repository. - The menu items will be automatically generated from the `subscripts` folder - Scripts and folders will appear in the menu as items or folders. - You can easily add new functionality by putting new scripts into the subscripts folder. See examples of menus in the `examples_whiptail` folder. -## Non-interactive configuration +### Non-interactive configuration utility -Use `setup_utility_auto.sh` to run setup non-interactively from a profile file, which contains all the necessary information and toggles for the configuration. This is useful for automating the setup process or for running it on multiple devices with the same configuration. +Use `auto_setup_utility.sh` to run setup non-interactively from a profile file, which contains all the necessary information and toggles for the configuration. This is useful for automating the setup process or for running it on multiple devices with the same configuration. ```sh - ./setup_utility_auto.sh profiles/sample.conf + ./auto_setup_utility.sh profiles/sample.conf ``` Profile files are located in `profiles/` directly. They contain a list of toggles and variables for guiding the configuration. @@ -44,3 +30,23 @@ Note that not all functionality of the manual setup utilities is available in th - Installation and uninstallation of ROS without docker (directly with `apt`). This can be implemented in the future. - MRS internal only configuration. Can be implemented in the future. - Disregarded scripts + +## Flashing Jetson devices + +Requirements: + +- A Linux computer +- USB cable to connect to the Jetson device +- Jumper cable (for devices without reset button) + +Run the script `jetson_flash.sh` on your own computer. The script will download the necessary files (BSP and root filesystem) and flash them to the Jetson device. + +The script will prompt you for the exact version of Jetson Linux you want to install. Available versions are listed here: . You can find the links to the BSP and root filesystem by clicking on the desired version and on the next page copying the links for "Driver Package (BSP) and Sample Root Filesystem". + +The script will also ask you whether you want to keep the temporary files after flashing. +If you need to flash multiple devices then select yes to avoid re-downloading them. +A separate directory will be created for each version of Jetson Linux, my default at `$HOME/jetson_flash_tmp_VERSION/`. +In case you change your mind you can always delete the entire directory. +The size of this directory is about 75 GB. + +After the script completes, you can continue configuration on the Jetson device by cloning this repository and running the `setup_utility.sh` script. diff --git a/setup_utility_auto.sh b/auto_setup_utility.sh similarity index 85% rename from setup_utility_auto.sh rename to auto_setup_utility.sh index 1a96071..5163b0b 100755 --- a/setup_utility_auto.sh +++ b/auto_setup_utility.sh @@ -174,12 +174,18 @@ main() { run_step "RUN_INSTALL_DOCKER" "Install Docker" "$DIR/subscripts/2Install/6Install_Docker.sh" || exit 1 run_step "RUN_INSTALL_INTEL_WIFI_DRIVERS" "Install Intel WiFi drivers" "$DIR/subscripts/2Install/7Install_Intel_WiFi_drivers.sh" || exit 1 - run_step "RUN_DISABLE_HIBERNATION" "Disable hibernation" "$DIR/subscripts/3PostInstall/2Disable_hibernation.sh" || exit 1 + run_step "RUN_DISABLE_POWER_SAVING" "Disable power saving" "$DIR/subscripts/3PostInstall/2Disable_power_saving.sh" || exit 1 run_step "RUN_GENERATE_SSH_CONFIG" "Generate SSH config" "$DIR/subscripts/3PostInstall/3Generate_SSH_config.sh" || exit 1 run_step "RUN_SET_SWAP_16GB" "Set swap to 16GB" "$DIR/subscripts/3PostInstall/4Set_Swap_to_16GB.sh" || exit 1 + run_step "RUN_CLEANUP_HOME_DIRECTORY" "Cleanup home directory" "$DIR/subscripts/3PostInstall/5Cleanup_home_directory.sh" || exit 1 + run_step "RUN_SETUP_RTC_ON_JETSON" "Setup RTC on Jetson" "$DIR/subscripts/3PostInstall/6Setup_RTC_on_Jetson.sh" || exit 1 + run_step "RUN_SET_TIMEZONE_TO_PRAGUE" "Set timezone to Europe/Prague" "$DIR/subscripts/3PostInstall/7Set_timezone_to_Prague.sh" || exit 1 run_step "RUN_FIX_NETWORK_INTERFACE_NAMES" "Fix network interface names" "$DIR/subscripts/4Network/1Fix_network_interface_names.sh" || exit 1 - run_step "RUN_CONFIGURE_NETWORKING" "Configure networking" "$DIR/subscripts/4Network/2Configure_networking.sh" "${TARGET_VARIANT:-}" || exit 1 + + run_step "RUN_SET_WALLPAPER" "Set wallpaper" "$DIR/subscripts/6Branding/1Set_wallpaper.sh" || exit 1 + run_step "RUN_SET_PROFILE_PICTURE" "Set profile picture" "$DIR/subscripts/6Branding/2Set_profile_picture.sh" "${TARGET_VARIANT:-}" || exit 1 + run_step "RUN_SET_TERMINAL_MOTD" "Set terminal MOTD" "$DIR/subscripts/6Branding/3Set_terminal_MOTD.sh" "${TARGET_VARIANT:-}" || exit 1 log "Done." } diff --git a/profiles/jetson.conf b/profiles/jetson.conf new file mode 100644 index 0000000..10adae5 --- /dev/null +++ b/profiles/jetson.conf @@ -0,0 +1,25 @@ +# Sample profile. All options are set to false, meaning the script will do nothing. +# To use profiles, copy this file and change options to true for the steps you want to run. +# The steps correspond almost 1:1 to options in the wizard (but the wizard supports more functionality) + +# Enable/disable toggles for setup steps +RUN_UPDATE_SYSTEM=true # Updates the system (apt only, use this if you want to update the system and have ROS installed in docker) +RUN_UPDATE_SYSTEM_AND_ROS=false # Updates the system and ROS (use this if you want to update the system and ROS that is installed directly on the host, not in docker) + +RUN_INSTALL_BASIC_PACKAGES=true # Installs basic packages, such as vim, curl, git, etc. +RUN_INSTALL_DOCKER=true # Installs docker and adds the current user to the docker group +RUN_INSTALL_INTEL_WIFI_DRIVERS=false # Installs iwlwifi drivers for Intel WiFi cards (used for some old NUCs, not needed for Jetson) + +RUN_DISABLE_POWER_SAVING=true # Disables power saving features (such as hibernation) and sets the higher power profile +RUN_GENERATE_SSH_CONFIG=false # Generates SSH config and hosts file with predefined hostnames and IP addresses +RUN_SET_SWAP_16GB=true # Set swap size to 16 GB +RUN_CLEANUP_HOME_DIRECTORY=true # Cleans up the home directory by removing directories ~/Downloads, ~/Templates, ~/Pictures, etc. If the directories are not empty, they won't be removed +RUN_SETUP_RTC_ON_JETSON=true # Configures Jetson devices to use the hardware RTC +RUN_SET_TIMEZONE_TO_PRAGUE=true # Sets the timezone to Europe/Prague + +RUN_FIX_NETWORK_INTERFACE_NAMES=true # New versions of Linux use "predictable" network names (such as enp3s0). This option restores reverts back to old eth0, wlan0, etc. names + +RUN_SET_WALLPAPER=true # Sets the wallpaper to $VAL_WALLPAPER_NAME. See subscripts/6Branding/DISREGARD/wallpapers for available wallpapers +VAL_WALLPAPER_NAME="RoboCore.png" # Name of the wallpaper to set. Must be in subscripts/6Branding/DISREGARD/wallpapers +RUN_SET_PROFILE_PICTURE=true # Sets the profile picture +RUN_SET_TERMINAL_MOTD=true # Sets the terminal MOTD (message of the day) to a custom message diff --git a/profiles/sample.conf b/profiles/sample.conf index be641f7..50afecd 100644 --- a/profiles/sample.conf +++ b/profiles/sample.conf @@ -3,51 +3,23 @@ # The steps correspond almost 1:1 to options in the wizard (but the wizard supports more functionality) # Enable/disable toggles for setup steps -RUN_UPDATE_SYSTEM=false # Updates the system (apt only, use this if you want to update the system and have ROS installed in docker) -RUN_UPDATE_SYSTEM_AND_ROS=false # Updates the system and ROS (use this if you want to update the system and ROS that is installed directly on the host, not in docker) +RUN_UPDATE_SYSTEM=false # Updates the system (apt only, use this if you want to update the system and have ROS installed in docker) +RUN_UPDATE_SYSTEM_AND_ROS=false # Updates the system and ROS (use this if you want to update the system and ROS that is installed directly on the host, not in docker) -RUN_INSTALL_BASIC_PACKAGES=false # Installs basic packages, such as vim, curl, git, etc. -RUN_INSTALL_DOCKER=false # Installs docker and adds the current user to the docker group -RUN_INSTALL_INTEL_WIFI_DRIVERS=false # Installs iwlwifi drivers for Intel WiFi cards (used for NUCs, not needed for Jetson) +RUN_INSTALL_BASIC_PACKAGES=false # Installs basic packages, such as vim, curl, git, etc. +RUN_INSTALL_DOCKER=false # Installs docker and adds the current user to the docker group +RUN_INSTALL_INTEL_WIFI_DRIVERS=false # Installs iwlwifi drivers for Intel WiFi cards (used for some old NUCs, not needed for Jetson) -RUN_DISABLE_HIBERNATION=false # Disables hibernation to prevent drone from going to sleep -RUN_GENERATE_SSH_CONFIG=false # Generates SSH config and hosts file with predefined hostnames and IP addresses -RUN_SET_SWAP_16GB=false # Set swap size to 16 GB +RUN_DISABLE_POWER_SAVING=false # Disables power saving features (such as hibernation) and sets the higher power profile +RUN_GENERATE_SSH_CONFIG=false # Generates SSH config and hosts file with predefined hostnames and IP addresses +RUN_SET_SWAP_16GB=false # Set swap size to 16 GB +RUN_CLEANUP_HOME_DIRECTORY=false # Cleans up the home directory by removing directories ~/Downloads, ~/Templates, ~/Pictures, etc. If the directories are not empty, they won't be removed +RUN_SETUP_RTC_ON_JETSON=false # Configures Jetson devices to use the hardware RTC +RUN_SET_TIMEZONE_TO_PRAGUE=false # Sets the timezone to Europe/Prague -RUN_FIX_NETWORK_INTERFACE_NAMES=false # New versions of Linux use "predictable" network names (such as enp3s0). This option restores reverts back to old eth0, wlan0, etc. names -RUN_CONFIGURE_NETWORKING=false # Configures Ethernet and WiFi interfaces with information provided lower in this file +RUN_FIX_NETWORK_INTERFACE_NAMES=false # New versions of Linux use "predictable" network names (such as enp3s0). This option restores reverts back to old eth0, wlan0, etc. names -# Networking -NETWORKING_DELETE_PREVIOUS_NETPLAN_CONFIGS=false # Deletes all previous netplan configs -NETWORKING_NETPLAN_CONFIG="network: - version: 2 - renderer: networkd - ethernets: - eth0: - dhcp4: yes - dhcp6: no - addresses: [ - 10.10.20.101/24 - ] - routes: - - to: default - via: 10.10.20.1 - metric: 100 - nameservers: - addresses: [8.8.8.8] - wifis: - wlan0: - dhcp4: no - dhcp6: no - addresses: [ - 192.168.112.2/24 - ] - routes: - - to: default - via: 192.168.112.1 - metric: 200 - access-points: - "f4f_robot": - password: "mikrokopter" - nameservers: - addresses: [8.8.8.8]" \ No newline at end of file +RUN_SET_WALLPAPER=false # Sets the wallpaper to $VAL_WALLPAPER_NAME. See subscripts/6Branding/DISREGARD/wallpapers for available wallpapers +VAL_WALLPAPER_NAME="Custom_Drone.png" # Name of the wallpaper to set. Must be in subscripts/6Branding/DISREGARD/wallpapers +RUN_SET_PROFILE_PICTURE=false # Sets the profile picture +RUN_SET_TERMINAL_MOTD=false # Sets the terminal MOTD (message of the day) to a custom message