-
-
Notifications
You must be signed in to change notification settings - Fork 561
Compile on WSL with ninja
sommermorgentraum edited this page Oct 17, 2024
·
3 revisions
Note
ccache is default disabled because it creats issues in particular situation.
If you are aware its pros and cons and you insist enable it, following this guide: https://github.com/portapack-mayhem/mayhem-firmware/wiki/Notes-About-ccache
If you don't know what's this, just use default.
- Update your system:
sudo apt-get update
sudo apt-get upgrade
- Install dependencies:
sudo apt-get install -y git tar wget dfu-util cmake python3 ccache bzip2 liblz4-tool curl ninja-build python3-pip
- Install pip and pyyaml:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py --break-system-packages
sudo python3 get-pip.py
pip install pyyaml --break-system-packages
- Set up environment variables:
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
- Download and install the ARM toolchain:
mkdir -p /opt/build
cd /opt/build
wget -O gcc-arm-none-eabi.tar.bz2 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2?revision=108bd959-44bd-4619-9c19-26187abf5225&la=en&hash=E788CE92E5DFD64B2A8C246BBA91A249CB8E2D2D"
sudo mkdir armbin
sudo tar --strip=1 -xjvf gcc-arm-none-eabi.tar.bz2 -C armbin
- Add the ARM toolchain to your PATH:
echo 'export PATH=$PATH:/opt/build/armbin/bin' >> ~/.bashrc
source ~/.bashrc
- Clone the PortaPack Mayhem repository (if you haven't already):
sudo git clone --recurse-submodules https://github.com/portapack-mayhem/mayhem-firmware.git
cd mayhem-firmware
sudo chmod -R 777 ~/mayhem-firmware
- Create a build directory and run CMake:
mkdir build
cd build
cmake -G Ninja ..
- Build the firmware:
ninja
Note
The wiki is incomplete. Please add content and collaborate.
Important
- This is a public wiki. Everything is visible to everyone. Don't use it for personal notes.
- Avoid linking to external tutorials/articles; they may become outdated or contain false information.
How to collaborate
How to ask questions correctly
- First steps
- Usage cautions
- Intended use and Legality
- Features
- PortaPack Versions (which one to buy)
- HackRF Versions
- Firmware update procedure
- Description of the hardware
- User interface
- Powering the PortaPack
- Troubleshooting
- Applications
-
Compilation of the firmware
- Compile on WSL with ninja
- How to compile on Windows faster with WSL 2
- Using Docker and Kitematic
- Docker command-line reference
- Using Buddyworks and other CI platforms
- Notes for Buddy.Works (and other CI platforms)
- Using ARM on Debian host
- All in one script for ARM on Debian host
- Compile on Arch based distro (exclude Asahi)
- Dev build versions
- Notes About ccache
- Create a custom map
- Code formatting
- PR process
- Description of the Structure
- Software Dev Guides
- Tools
- Research
- UI Screenshots
- Maintaining
- Creating a prod/stable release (Maintainers only)
- Maintaining rules
- Development States Notes