The project shows how to add a relatively small application to the pre-built KRIA kv260 petalinux image building the utility from source. There is a lot of handy command line utilities which can complement linux based development environment while agnostic to hardware, nano text editor is an example of such tool.
Petalinux comes with dnf package manager and at the moment it doesn't provide nano but it can install tools necessary to build the utility and the project shows the whole process.
Pre-built image inspectionWe start from 2021.1 prebuilt SD card petalinux image for kv260 petalinux-sdimage-2021.1-update1.wic.xz
. After booting linux from the SD card, logging in with username petalinux and setting password, we are going to customize the OS building applications from source repository. Wile git is installed and functional in the pre-built image, gcc and some other handy tools can require adaptation to the platform.
BusyBox version of wget doesn't fit the environment, we'll check alternative options with dnf.
First of all we'll update dnf without upgrading anything
sudo dnf update
Choose 'N' to avoid packages upgrades and let's check available wget packages
sudo dnf search wget
Installation of the package ('-y') confirms the installation automatically) and inspection of the fresh installed instance
sudo dnf install wget.cortexa72_cortexa53 -y
The wget is completely different from the default BusyBox one:
Finally let's retry to download the nano editor source
wget http://www.nano-editor.org/dist/v2.0/nano-2.0.6.tar.gz
The next step is to install gcc tool-chain which we will need to build the utility. This time will install packagegroup-core-sdkpackagegroup
sudo dnf install packagegroup-core-sdk -y
Now we are almost ready to build the nano editor, the lat dependency to install is the couple of libraries used by the application which will be reported by configuration tool if they are not installed:
sudo dnf install ncurses-dev texinfo -y
and if you want to review what/when dnf installed
sudo dnf history
There is familiar linux sequence of commands to build the application from source
tar -zxvf nano-2.0.6.tar.gz
cd nano-2.0.6
./configure --build=aarch64-unknown-linux-gnu
make
sudo make install
Comments
Please log in or sign up to comment.