Build Third-Party Component

Building third-party components is a standard procedure after setting up the cross-compilation environment. If the project uses configure, specify --host=aarch64-poky-linux during configuration.

In this example, we will compile htop, a popular system-monitoring tool, for the DevKit. htop provides an interactive, real-time view of system processes. It offers detailed insights into CPU usage, memory consumption, and task management, making it more powerful than basic tools like top.

Note

Before you run the following commands, ensure you have setup the cross compilation environment.

user@palette-container-id:/home/docker/{project}$ git clone https://github.com/htop-dev/htop.git
user@palette-container-id:/home/docker/{project}$ cd htop
user@palette-container-id:/home/docker/{project}/htop$ ./autogen.sh
user@palette-container-id:/home/docker/{project}/htop$ ./configure --host=aarch64-poky-linux --prefix=/usr
user@palette-container-id:/home/docker/{project}/htop$ make
user@palette-container-id:/home/docker/{project}/htop$ file htop
htop: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=07e842801a55cfdce80b25a0d6133f4c7dcc56a2, for GNU/Linux 3.14.0, with debug_info, not stripped

Now that you’ve compiled htop, you can deploy it to the DevKit and run it on the target system.

user@palette-container-id:/home/docker/{project}/htop$ scp htop sima@<DevKit IP>:~/

Then ssh to the DevKit and run the following command to see the output:

davinci~/$ ./htop