This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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.
This guide not works on Asahi, please make sure you are on x86_64 platform
1. Install dependence
sudo pacman -S git tar wget dfu-util cmake make python3 bzip2 lz4 curl hackrf python-distutils-extra python-setuptools python-pip python-yaml
Check the output and make sure the packages listed above were installed correctly.
2. Install ARM gcc-arm-none-eabi
package from AUR
you can follow the instructions in Debian based distro page in this wiki as well. This doesn’t work before and it turns out that it’s nushell caused the bug. If you don’t use nushell, you are all good with that set up.
This will automatically add the binaries of arm toolchain to the /usr/bin of your system. Note that you are adding an old toolchain into your system.
- Go to the page of
gcc-arm-none-eabi
package in AUR. - Click
View Changes
to check the commit history of this AUR package. - Click version 9-2020-q2 to check the specific version of
gcc-arm-none-eabi
, then clickDownload
to download the package formakepkg
. - Assuming you download the package to
~
. - Create a directory to satisfying and checking the package.
mkdir AUR
mv aur-11b618acbed084c37cdf1568a1bc2b05152af7e1.tar.gz ./AUR
cd AUR
tar -xvf aur-11b618acbed084c37cdf1568a1bc2b05152af7e1.tar.gz
cd aur-11b618acbed084c37cdf1568a1bc2b05152af7e1
makepkg
(ARM already fixed this but in case of it happend again we'll leave it here.)
Note that since the SSL certificate of the file thismakepkg
pointed to already expired, thecurl
wouldn't download it correctly, thus, you have to add-k
argument to yourmakepkg.conf
:
sudo vim /etc/makepkg.conf
Edit the line
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
to
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -k -o %o %u'
(You may change it back after installing, if you needed)
Thenmakepkg
, waiting it finished.
- Install the package with
pacman
:
sudo pacman -U gcc-arm-none-eabi-bin-9_2020_q2_update-1-x86_64.pkg.tar.zst
3. Clone your repo to local and satisfying the sub-module
cd ~
git clone https://github.com/portapack-mayhem/mayhem-firmware.git
cd portapack-mayhem
git submodule update --init --recursive
4. Give permission to the repo directory in your local and compile it
No need to do this step if all the things you do are on one user.
sudo chown -R my_user:my_usergroup ~/mayhem-firmware
cd ~/mayhem-firmware
mkdir build
cd build
cmake ..
make firmware
If you want, use -j
argument to increase the compile speed, for example make -j firmware
to auto decide the number of threads to compile, or manually set the thread numbers, for example make -j4 firmware
Notes
-
You cannot directly install
gcc-arm-none-eabi
from AUR using yay or others tool, otherwise the version would be not match. -
(ARM already fixed this but in case of it happend again we'll leave it here.)
After installinggcc-arm-none-eabi
you may change themakepkg.conf
back:
sudo vim /etc/makepkg.conf
Edit the line
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -k -o %o %u'
to
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
How to collaborate
How to ask questions correctly
User manual
- 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
Developer Manual
- 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
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.