Building packages for the Kria SOM requires access to either a native build environment (Linux running on Arm64) or a chroot/cross-compile setup (Linux with sbuild or pbuilder on AMD64). Of the two options, a native setup is significantly easier to work with and allows the installation and testing of the resulting packages. The following steps outline the process for getting Ubuntu set up and configured for packaging on a Kria SOM board.
The developer is encouraged to first test the build and installation of the source
locally on the target, to ensure it can be built and is functional. For example,
git clone
the source and then run make
and
sudo make install
to see everything is behaving as expected.
Setup Package Build Environment
The build environment expects certain tools to build the packages. These tools also provide a helper utility to generate the some of the Debian files required for the build process.
Install following tools before starting the build process:
sudo apt install gnupg dput dh-make devscripts lintian pbuilder fakeroot
Setup the email and user name to be used for the package. Consider keeping this in
the .bashrc
.
DEBEMAIL="your.email.address@example.org"
DEBFULLNAME="Firstname Lastname"
export DEBEMAIL DEBFULLNAME