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
|
|
|
#
|
2024-02-13 17:31:43 -08:00
|
|
|
# This script configures your Linux machine (probably just Debian/Ubuntu-based machine, really)
|
|
|
|
# for FOME firmware development and compilation.
|
2021-05-15 02:19:14 -07:00
|
|
|
#
|
2024-02-13 17:31:43 -08:00
|
|
|
# This script will also work on a Windows Subsystem for Linux installation on top of a Windows PC.
|
|
|
|
#
|
|
|
|
# Purposes for dependencies:
|
|
|
|
# - `gcc`, `gdb`, `gcc-multilib`, `g++-multilib`: Native compilers for your PC, used for unit tests and simulator.
|
|
|
|
# - `make`: GNU Make, build tool that orchestrates the correct build steps.
|
|
|
|
# - `openjdk-8-jdk-headless`: Java compiler for FOME console and code generation tools.
|
|
|
|
# - `mtools`, `zip`, `xxd`: Used to generate the on-ECU filesystem that stores the matching ini file.
|
2021-05-15 02:19:14 -07:00
|
|
|
#
|
|
|
|
|
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
|
2023-07-17 22:33:14 -07:00
|
|
|
sudo apt-get install -y build-essential gcc gdb gcc-multilib g++-multilib make openjdk-8-jdk-headless mtools zip xxd libncurses5 libncursesw5
|
2021-03-24 18:39:49 -07:00
|
|
|
|
2021-11-25 04:58:30 -08:00
|
|
|
# Allow the current user to use serial ports
|
|
|
|
sudo usermod -a -G dialout $USER
|
2024-03-20 01:53:23 -07:00
|
|
|
|
|
|
|
# For gdb to work, unpack it.
|
|
|
|
bash ./ext/build-tools/inflate.sh
|