DESK-MX6-L-AN-0003: Package Management with Yocto and DNF

From DAVE Developer's Wiki
Revision as of 15:02, 4 October 2021 by U0007 (talk | contribs) (Created page with "{{InfoBoxTop}} {{AppliesToAXEL ULite AN}} {{InfoBoxBottom}} {{ImportantMessage|text=This application note has been validated using the '''kit version''' in the History table....")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Info Box


200px-Emblem-important.svg.png

This application note has been validated using the kit version in the History table.

History[edit | edit source]

Version Date Development Kit version
1.0.1 Oct 2021 DESK-MX6UL-L 1.0.1

Introduction[edit | edit source]

This application note details how to use DNF for installing

DNF[edit | edit source]

DNF is a software package manager that installs, updates, and removes packages on RPM-based Linux distributions. It automatically computes dependencies and determines the actions required to install packages. DNF also makes it easier to maintain groups of machines, eliminating the need to manually update each one using rpm. Introduced in Fedora 18, it has been the default package manager since Fedora 22.

More information can be found on Fedora's wiki DNF page

Configuring the DNF repository[edit | edit source]

It is possibile to add and configure DNF repositories using additional .repo files: it is recommended to define individual repositories in new or existing .repo files in the /etc/yum.repos.d/ directory.

More information in the Configuring DNF and DNF_Repositories Fedora's page.

Here below an example on how to create the .repo with the proper setting options

root@desk-mx6ul-axelulite:~# mkdir -p /etc/yum.repos.d 
root@desk-mx6ul-axelulite:~# 
{
  echo [cortexa7hf]
  echo name=desk-mx6ul-1.0.1
  echo enabled=1                                                    
  echo gpgcheck=0                                                  
  echo baseurl=http://yocto.dave.eu/desk-mx6ul-l-1.0.1/cortexa7hf_neon/
} | tee >> /etc/yum.repos.d/dave.repo
root@desk-mx6ul-axelulite:~#

Installing packages on target[edit | edit source]

We assume that network interface has been already configured for Internet access. In any case, a simple network configuration can be done directly on serial console with the following commands:

root@desk-mx6ul-axelulite:~# ifconfig eth0 192.168.0.94
root@desk-mx6ul-axelulite:~# route add default gw 192.168.0.254
root@desk-mx6ul-axelulite:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf

Then, for installing a package, it is enough to invoke dnf with the install parameter, for example:

root@desk-mx6ul-axelulite:~# dnf install fb-test


References[edit | edit source]