Step 1 : Install cmake Dependencies

  • In this program, you are going to learn

  • How to ?

  • Ensure your host system is up to date. We can use following commands to update os.

sudo apt-get update
sudo apt-get upgrade
  • Note that both Ninja and Make are installed with these instructions; you only need one.

sudo apt-get install --no-install-recommends git cmake ninja-build gperf \
ccache dfu-util device-tree-compiler wget \
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
  • A recent CMake version is required.

  • Check what version you have by using below command.

cmake --version.
  • The current minimum required version for the main dependencies are:

CMake                   3.20.5
Python                  3.8
Devicetree compiler     1.4.6
  • If using an Ubuntu version older than 22.04, it is necessary to add extra repositories to meet the minimum required versions for the main dependencies listed above. In that case, download, inspect and execute the Kitware archive script to add the Kitware APT repository to your sources list.

wget https://apt.kitware.com/kitware-archive.sh
sudo bash kitware-archive.sh
  • Use apt to install the required dependencies:

sudo apt install --no-install-recommends git cmake ninja-build gperf \
ccache dfu-util device-tree-compiler wget \
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
  • Verify the versions of the main dependencies installed on your system by entering:

cmake --version
python3 --version
dtc --version