rusefi/firmware/setup_linux_environment.sh

37 lines
1.2 KiB
Bash
Raw Normal View History

2022-11-10 12:33:02 -08:00
#!/usr/bin/env bash
2022-02-12 06:56:59 -08:00
#
# it's totally possible to develop on Windows. Also WSL is amazing!
# 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
#
# 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
# Update package lists
sudo apt-get update
# install dependencies
2024-02-21 13:59:12 -08:00
sudo apt-get install -y build-essential gcc gdb gcc-multilib g++-multilib make openjdk-11-jdk-headless mtools zip xxd libncurses5 libncursesw5
# 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)
cd ~/.rusefi-tools
# provide GCC arm-none-eabi toolchain
2022-11-10 12:33:02 -08:00
${dir}/provide_gcc.sh
# Add the compiler to your path
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