2022-11-10 12:33:02 -08:00
|
|
|
#!/usr/bin/env bash
|
2021-03-24 18:39:49 -07:00
|
|
|
|
2022-02-12 06:56:59 -08:00
|
|
|
#
|
|
|
|
# it's totally possible to develop on Windows. Also WSL is amazing!
|
2024-02-21 16:18:39 -08:00
|
|
|
# TL,DR: use same gcc version as GitHub Actions from .github/workflows
|
2021-05-15 02:19:14 -07:00
|
|
|
#
|
|
|
|
# by the way to uninstall package with old compiler version you might use
|
|
|
|
# sudo apt remove binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi
|
|
|
|
#
|
|
|
|
|
2021-03-24 18:39:49 -07:00
|
|
|
# This script will download and install all dependencies require to develop rusEFI on Linux.
|
|
|
|
# After running this script, executing `make` in the firmware folder is expected to produce a functional firmware binary.
|
|
|
|
|
2024-01-07 12:54:26 -08:00
|
|
|
# Ensure submodules got cloned
|
|
|
|
git submodule update --init
|
|
|
|
|
2021-03-24 18:39:49 -07:00
|
|
|
# Update package lists
|
|
|
|
sudo apt-get update
|
|
|
|
|
|
|
|
# install dependencies
|
2024-10-14 11:03:07 -07:00
|
|
|
sudo bash misc/actions/ubuntu-install-tools.sh
|
|
|
|
sudo apt-get install -y build-essential gcc gdb gcc-multilib make openjdk-11-jdk-headless xxd libncurses5 libncursesw5
|
2021-03-24 18:39:49 -07:00
|
|
|
|
|
|
|
# delete any old tools, create a new folder, and go there
|
|
|
|
rm -rf ~/.rusefi-tools
|
|
|
|
mkdir ~/.rusefi-tools
|
2022-11-10 12:33:02 -08:00
|
|
|
dir=$(pwd)
|
2021-03-24 18:39:49 -07:00
|
|
|
cd ~/.rusefi-tools
|
|
|
|
|
2022-11-08 15:10:53 -08:00
|
|
|
# provide GCC arm-none-eabi toolchain
|
2022-11-10 12:33:02 -08:00
|
|
|
${dir}/provide_gcc.sh
|
2021-03-24 18:39:49 -07:00
|
|
|
|
2021-03-25 13:22:16 -07:00
|
|
|
# Add the compiler to your path
|
2022-11-08 15:10:53 -08:00
|
|
|
echo 'export PATH=$PATH:$HOME/.rusefi-tools/gcc-arm-none-eabi/bin' >> ~/.profile
|
2021-11-25 04:58:30 -08:00
|
|
|
|
|
|
|
# Allow the current user to use serial ports
|
|
|
|
sudo usermod -a -G dialout $USER
|