Ensure your system has the necessary packages installed:
sudo apt install autoconf bison flex gcc libncurses5-dev pkg-config libconfuse-dev libssl-dev python3 python3-pip python-is-python3 cmake libyaml-dev scons mtools bzip2
Additionally, install Python packages using pip
:
pip3 install pycryptodome gmssl scons==3.1.2
To manage the source code, install the repo
tool:
-
Create a directory for the
repo
binary and add it to yourPATH
:mkdir -p ~/.bin export PATH="${HOME}/.bin:${PATH}"
-
Download the
repo
script and make it executable:curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo chmod a+rx ~/.bin/repo
-
Persist the
PATH
change by adding it to your shell configuration file (e.g.,~/.bashrc
):echo 'export PATH="${HOME}/.bin:${PATH}"' >> ~/.bashrc source ~/.bashrc
Initialize and sync the repository to get the source code:
repo init -u https://github.com/canmv-k230/manifest
repo sync
-
Download the toolchain (only needed the first time):
make dl_toolchain
-
List available configurations:
make list_def
-
Select a configuration for your board:
make k230_canmv_defconfig # Replace with the appropriate defconfig for your board
-
Start the build process:
time make log
This process will compile the software, tailored to your selected board configuration.