Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parralel jobs + platformio + optional features #19

Open
wants to merge 77 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
b1328a4
add mirte pico telemetrix package
ArendJan Jun 1, 2023
b7ae034
apt clean
ArendJan Jun 1, 2023
0ef836b
Merge branch 'main' of https://github.com/ArendJan/mirte-install-scri…
ArendJan Jun 1, 2023
f2f5d59
install and build pico sdk
ArendJan Jun 8, 2023
efa01c9
install pico at image generation
ArendJan Jun 8, 2023
9263f61
add pico apt compiler package
ArendJan Jun 9, 2023
e730870
change install to parrallel jobs
ArendJan Jun 21, 2023
ee92ba1
Fix styling
ArendJan Jun 21, 2023
a16cdad
Add logging info
ArendJan Jun 21, 2023
5a29864
sed unbuffered
ArendJan Jun 21, 2023
fd6846f
add done message
ArendJan Jun 21, 2023
48491d2
change to platformio + add install_docs
ArendJan Jun 21, 2023
e298629
Styling + test platformio
ArendJan Jun 21, 2023
827ab45
change to platformio branch tmx
ArendJan Jun 21, 2023
dbfffc2
change to sourcing
ArendJan Jun 21, 2023
887eb1d
issues with linking
ArendJan Jun 21, 2023
6f18279
add update script
ArendJan Jun 21, 2023
a75715d
enable all components
ArendJan Jun 21, 2023
10b4777
enable all 2
ArendJan Jun 21, 2023
ec36d65
network_install problem packer
ArendJan Jun 21, 2023
3b01e4e
test network
ArendJan Jun 21, 2023
bc455ee
trigger dns
ArendJan Jun 21, 2023
d2fcc15
netplan delay test
ArendJan Jun 21, 2023
aebdc24
dont download git repos with packer
ArendJan Jun 24, 2023
ee04b10
Merge branch 'shellcheck' of https://github.com/ArendJan/mirte-instal…
ArendJan Jun 24, 2023
ac896a0
Merge branch 'ArendJan-shellcheck' into main
ArendJan Jun 24, 2023
bb7ceab
Fixes for packer build
ArendJan Jun 28, 2023
12f966f
cleanups
Jul 19, 2023
5891c08
add possibility to only install certain parts
ArendJan Aug 30, 2023
df56409
add fallback when no settings.sh
ArendJan Aug 30, 2023
bc1844b
Merge branch 'develop' of https://github.com/mirte-robot/mirte-instal…
ArendJan Aug 30, 2023
2671e55
Fix shellcheck
ArendJan Aug 30, 2023
08c4af0
Add pico sdk and rpi pico tmx
ArendJan Sep 25, 2023
2470b77
Fix styling
ArendJan Sep 25, 2023
38548ec
Fix install pico
ArendJan Sep 25, 2023
3815389
start provisioning
ArendJan Sep 26, 2023
984e421
update provi
ArendJan Sep 26, 2023
1784ab0
Add ssh
ArendJan Sep 26, 2023
c887099
Fix no permission systemctl
ArendJan Sep 26, 2023
9c3c088
sudooo
ArendJan Sep 26, 2023
7f1c48e
fix numpy install issue
ArendJan Sep 26, 2023
7b7add9
Add readback hostname
ArendJan Sep 29, 2023
2b5c56d
password check + prev config
ArendJan Sep 29, 2023
f016cd6
Move usb ethernet to separate service
ArendJan Sep 29, 2023
a3bae0e
Fix usb-ethernet install
ArendJan Sep 29, 2023
2813cc9
fmt fix
ArendJan Sep 29, 2023
b8eedab
Styling fixes
ArendJan Sep 29, 2023
1828a10
Fix provisioning name
ArendJan Sep 29, 2023
7cf3a78
Fix usb-ethernet
ArendJan Sep 29, 2023
d918f10
enable usb eth
ArendJan Sep 29, 2023
162880d
test only binary numpy
ArendJan Sep 29, 2023
6cf7428
only binary all
ArendJan Sep 29, 2023
f8f5c63
Revert pre-built numpy
ArendJan Sep 29, 2023
0f2d604
style
ArendJan Oct 10, 2023
37e202d
Merge branch 'main' of https://github.com/ArendJan/mirte-install-scri…
ArendJan Oct 10, 2023
7dcd33b
nodeenv latest version
ArendJan Oct 16, 2023
8749480
Add switch parallel
ArendJan Oct 17, 2023
ded1dbc
set node 16.2.0
ArendJan Oct 17, 2023
b32efc1
docs linking error test
ArendJan Oct 17, 2023
d9ad87a
install catkin_pkg
ArendJan Oct 17, 2023
8b18882
Merge branch 'mirte-robot:main' into parralel-jobs
ArendJan Oct 30, 2023
e889793
Make ros install wait for others due to apt problem
ArendJan Oct 30, 2023
c56624d
Merge branch '28-remove-0s-from-mirte-xxxxxx' of https://github.com/A…
ArendJan Oct 31, 2023
45bbdb6
Merge branch 'main' of https://github.com/ArendJan/mirte-install-scripts
ArendJan Oct 31, 2023
2037fcb
Merge branch 'main' of https://github.com/ArendJan/mirte-install-scri…
ArendJan Oct 31, 2023
09ce8b2
Merge branch '30-ssh-host-key-files-empty' of https://github.com/Aren…
ArendJan Oct 31, 2023
1416d1c
add build_web option
ArendJan Nov 28, 2023
85d3a74
Merge branch 'develop' of https://github.com/mirte-robot/mirte-instal…
ArendJan Feb 1, 2024
77c406b
fix vscode install
ArendJan Feb 1, 2024
5af2f38
rm update checks
ArendJan Feb 1, 2024
2ec7c7b
Cleanup provisioning system
ArendJan Feb 1, 2024
5f13a64
Fix bt install wrong dir
ArendJan Feb 1, 2024
8b7ce42
fix wait mirte-install
ArendJan Feb 1, 2024
d840d47
style fixes
ArendJan Feb 1, 2024
e5d7b1b
Fix install_docs
ArendJan Feb 1, 2024
93e03c9
Fix ros not waited
ArendJan Feb 1, 2024
970128f
fix usb install
ArendJan Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions default_settings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

export INSTALL_DOCS=true
export INSTALL_ROS=true
export INSTALL_ARDUINO=true
export INSTALL_WEB=true
export INSTALL_PYTHON=true
export INSTALL_JUPYTER=true
export EXPIRE_PASSWD=true
export INSTALL_NETWORK=true
export INSTALL_PROVISIONING=false
export INSTALL_VSCODE=true
export INSTALL_PAM=true
export EXTRA_SCRIPTS=(
# "testExtra.sh"
# "testExtra2.sh"
)
export PARALLEL=true
1 change: 1 addition & 0 deletions download_repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sudo apt-get update
sudo apt-get install -y python3-vcstool

# Download all Mirte repositories
ls -alh
vcs import --workers 1 <repos.yaml #TODO: get yaml file as parameter

# TODO: set remote to gitlab when checkout from local
12 changes: 9 additions & 3 deletions install_ROS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ wget https://apt.kitware.com/kitware-archive.sh
chmod +x kitware-archive.sh
sudo ./kitware-archive.sh
rm kitware-archive.sh
sudo apt update
until sudo apt update; do
echo "retrying apt update in 1s"
sleep 1
done
sudo apt install cmake -y
# Install ROS Noetic
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
until sudo apt update; do
echo "retrying apt update in 1s"
sleep 1
done
sudo apt install -y ros-noetic-ros-base python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential python3-catkin-tools python3-osrf-pycommon
grep -qxF "source /opt/ros/noetic/setup.bash" /home/mirte/.bashrc || echo "source /opt/ros/noetic/setup.bash" >>/home/mirte/.bashrc
source /opt/ros/noetic/setup.bash
Expand Down Expand Up @@ -64,7 +70,7 @@ sudo pip3 install adafruit-circuitpython-busdevice==5.1.1 adafruit-circuitpython
sudo pip3 install pillow adafruit-circuitpython-ssd1306==2.12.1

# Install aio dependencies
sudo pip3 install janus async-generator nest-asyncio
sudo pip3 install janus async-generator nest-asyncio catkin_pkg
git clone https://github.com/locusrobotics/aiorospy.git
cd aiorospy/aiorospy || exit 1
sudo pip3 install .
Expand Down
87 changes: 33 additions & 54 deletions install_arduino.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,36 @@ MIRTE_SRC_DIR=/usr/local/src/mirte

# Install dependencies
sudo apt install -y git curl binutils libusb-1.0-0

# Install arduino-cli
# We need to install version 0.13.0. From version 0.14.0 on a check is done on the hash of the packages,
# while the community version of the STM (see below) needs insecure packages.
curl https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sudo BINDIR=/usr/local/bin sh -s 0.13.0

# Install arduino avr support (for nano)
arduino-cli -v core update-index --additional-urls https://raw.githubusercontent.com/koendv/stm32duino-raspberrypi/master/BoardManagerFiles/package_stm_index.json
arduino-cli -v core install arduino:avr

# Install STM32 support. Currently not supported by stm32duino (see https://github.com/stm32duino/Arduino_Core_STM32/issues/708), but there is already
# a community version (https://github.com/koendv/stm32duino-raspberrypi). TODO: go back to stm32duino as soon as it is merged into stm32duino.
arduino-cli -v core install STM32:stm32 --additional-urls https://github.com/koendv/stm32duino-raspberrypi/blob/v1.3.2-4/BoardManagerFiles/package_stm_index.json
#arduino-cli -v core install STM32:stm32 --additional-urls https://github.com/zoef-robot/stm32duino-raspberrypi/master/BoardManagerFiles/package_stm_index.json

# Fix for community STM32 (TODO: make version independant)
sed -i 's/dfu-util\.sh/dfu-util\/dfu-util/g' /home/mirte/.arduino15/packages/STM32/tools/STM32Tools/1.4.0/tools/linux/maple_upload
ln -s /home/mirte/.arduino15/packages/STM32/tools/STM32Tools/1.4.0/tools/linux/maple_upload /home/mirte/.arduino15/packages/STM32/tools/STM32Tools/1.4.0/tools/linux/maple_upload.sh
sudo cp /home/mirte/.arduino15/packages/STM32/tools/STM32Tools/1.4.0/tools/linux/45-maple.rules /etc/udev/rules.d/45-maple.rules
# Retartsing should only be done when not in qemu
#sudo service udev restart

# Install libraries needed by FirmataExpress
arduino-cli lib install "NewPing"
arduino-cli lib install "Stepper"
arduino-cli lib install "Servo"
arduino-cli lib install "DHTNEW"

# Install our own arduino libraries
ln -s $MIRTE_SRC_DIR/mirte-arduino-libraries/OpticalEncoder /home/mirte/Arduino/libraries

# Install Blink example code
mkdir /home/mirte/arduino_project/Blink
ln -s $MIRTE_SRC_DIR/mirte-install-scripts/Blink.ino /home/mirte/arduino_project/Blink

# Already build all versions so only upload is needed
./run_arduino.sh build Telemetrix4Arduino
./run_arduino.sh build_nano Telemetrix4Arduino
./run_arduino.sh build_nano_old Telemetrix4Arduino
./run_arduino.sh build_uno Telemetrix4Arduino

# Add mirte to dialout
sudo adduser mirte dialout

# By default, armbian has ssh login for root enabled with password 1234.
# The password need to be set to mirte_mirte so users can use the
# Arduino IDE remotely.
# TODO: when the Arduino IDE also supports ssh for non-root-users
# this has to be changed
echo -e "mirte_mirte\nmirte_mirte" | sudo passwd root

# Enable tuploading from remote IDE
sudo ln -s $MIRTE_SRC_DIR/mirte-install-scripts/run-avrdude /usr/bin
sudo bash -c 'echo "mirte ALL = (root) NOPASSWD: /usr/local/bin/arduino-cli" >> /etc/sudoers'
ls -alh $MIRTE_SRC_DIR
pip3 install -U platformio
echo "export PATH=$PATH:/home/mirte/.local/bin" >/home/mirte/.bashrc
export PATH=$PATH:/home/mirte/.local/bin
curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/system/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules

mkdir -p /home/mirte/Arduino/Telemetrix4Arduino
ls $MIRTE_SRC_DIR/mirte-telemetrix4arduino -al
ln -s $MIRTE_SRC_DIR/mirte-telemetrix4arduino /home/mirte/Arduino/Telemetrix4Arduino || true
cd $MIRTE_SRC_DIR/mirte-telemetrix4arduino || exit
pio run -e robotdyn_blackpill_f303cc -e nanoatmega328new -e nanoatmega328

# pico stuff
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential libusb-1.0-0-dev libstdc++-arm-none-eabi-newlib -y
cd $MIRTE_SRC_DIR/pico-sdk/ || exit
git submodule update --init
echo "export PICO_SDK_PATH=$MIRTE_SRC_DIR/pico-sdk/" >/home/mirte/.bashrc
export PICO_SDK_PATH=$MIRTE_SRC_DIR/pico-sdk/
cd $MIRTE_SRC_DIR/mirte-telemetrix4rpipico || exit
mkdir build
cd build || exit
cmake ..
make

# TODO: add picotool and install it:
# git clone https://github.com/raspberrypi/picotool.git --branch master --progress
# cd picotool
# mkdir build
# cd build
# export PICO_SDK_PATH=~/pico/pico-sdk
# cmake ../
# make
# make install
19 changes: 19 additions & 0 deletions install_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

cd $MIRTE_SRC_DIR/mirte-documentation || exit
sudo apt install -y python3.8-venv libenchant-dev
python3 -m venv docs-env
source docs-env/bin/activate
pip install -r requirements.txt
mkdir -p _modules/catkin_ws/src
cd _modules || exit
ls
ln -s $MIRTE_SRC_DIR/mirte-python .
ls
cd mirte-python || exit
pip install .
source /opt/ros/noetic/setup.bash
source /home/mirte/mirte_ws/devel/setup.bash
cd ../../
make html
deactivate
8 changes: 7 additions & 1 deletion install_jupyter_ros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ deactivate
sudo chown -R mirte:mirte /home/mirte/jupyter

# TEMP: download examples
git clone https://github.com/RoboStack/jupyter-ros.git
if [ "$UPDATE" ]; then
cd /home/mirte/jupyter-ros || exit
git pull
else
git clone https://github.com/RoboStack/jupyter-ros.git
fi

sudo chown -R mirte:mirte /home/mirte/jupyter-ros

# Add systemd service to start jupyter
Expand Down
Loading
Loading