.. _build_third_party_component: Build Third-Party Component ########################### Building third-party components is a standard procedure after setting up the cross-compilation environment. If the project uses ``configure``, you must specify the correct host triplet for your target platform. .. note:: Before you run the following commands, ensure you have :ref:`setup the cross compilation environment `. .. tabs:: .. tab:: eLxr SDK (Modalix) For eLxr-based Modalix targets, use the ``aarch64-linux-gnu`` host triplet. .. code-block:: bash user@elxr-sdk:~$ sudo apt update && sudo apt install -y autoconf automake libtool user@elxr-sdk:~$ git clone https://github.com/htop-dev/htop.git user@elxr-sdk:~$ cd htop user@elxr-sdk:~/htop$ ./autogen.sh user@elxr-sdk:~/htop$ ./configure --host=aarch64-linux-gnu --prefix=/usr user@elxr-sdk:~/htop$ make Copy the binary to the DevKit and run it: .. code-block:: bash user@elxr-sdk:~/htop$ scp htop sima@:~/ user@elxr-sdk:~/htop$ ssh sima@ "./htop" .. tab:: Yocto SDK (MLSoC) For Yocto-based MLSoC targets, use the ``aarch64-poky-linux`` host triplet. .. code-block:: bash user@yocto-sdk:~$ git clone https://github.com/htop-dev/htop.git user@yocto-sdk:~$ cd htop user@yocto-sdk:~/htop$ ./autogen.sh user@yocto-sdk:~/htop$ ./configure --host=aarch64-poky-linux --prefix=/usr user@yocto-sdk:~/htop$ make Copy the binary to the DevKit and run it: .. code-block:: bash user@yocto-sdk:~/htop$ scp htop sima@:~/ user@yocto-sdk:~/htop$ ssh sima@ "./htop" .. tab:: On-Device Compilation .. _on_device_compilation: One of the primary benefits of **Modalix (eLxr)** is the ability to build components directly on the target hardware, bypassing the need for a cross-compilation environment entirely. 1. Connect to your Modalix device via SSH. 2. Install the standard Debian build-essential tools: .. code-block:: bash sima@modalix:~$ sudo apt update sima@modalix:~$ sudo apt install -y build-essential autoconf automake git 3. Clone and build the project on-device: .. code-block:: bash sima@modalix:~$ git clone https://github.com/htop-dev/htop.git sima@modalix:~$ cd htop sima@modalix:~/htop$ ./autogen.sh sima@modalix:~/htop$ ./configure --prefix=/usr sima@modalix:~/htop$ make sima@modalix:~/htop$ ./htop