<section begin=body/>Since NXP BSP [https://www.nxp.com/webapp/Download?colCode=L5.4.24_2.1.0_LINUX_DOCS 5.154.71 24] Yocto release, [https://debian-handbook.info/browse/stable/sect.apt-get.html apt-get] has been added as a package manager for installing packages in the DUT (target machine).
As reported by NXP official documentation:
This Application Note (AN) describes a way to apply the approach illustrated here to a Yocto distribution that makes use of Debian packetization. In other words, a local archive of Yocto-generated, prebuilt <code>.deb</code> packages is used in combination with the well known <code>apt-get</code> utility.
=== apt-get ===
The following instructions detail how to use apt-get for installing packages with Yocto repositories created by DAVE's build system for DESK-MX8M-L.
====Configuring <code>apt</code> for SBC-ORCA====
Edit the file <code>/etc/apt/apt.conf</code> like this:
root@desksed -i 's/\.\//all\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-mx8mm:~# 4.0.0_all_Packagessed -i 's/\.\//armv8a-mx8mm\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_armv8a-mx8mm_Packages0_armv8a_Packagesroot@desk-mx8mm:~# sed -i 's/\.\//desk%5fmx8mmarmv8a-mx8mm\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_desk%5fmx8mm_Packages0_armv8a-mx8mm_Packagesroot@desk-mx8mm:~# sed -i 's/\.\//alldesk%5fmx8mm\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_all_Packages0_desk%5fmx8mm_Packages
</pre>
=== Installing packages on target ===
We assume that network interface has been already configured for Internet access. In any case, a simple network configuration can be done according to the [[DESK-MX8M-L/Deployment/How_to_configure_the_network_interfaces#Static_IP_address | How to configure the network interfaces]] wiki page.
=== Install package on SBC-ORCA ===
The target is finally ready to install new packages. The following example shows for instance the installation of <code>graphviz</code>:
<pre class="board-terminal">
root@desk-mx8mp:~# apt-get install graphviz
</pre>
=== Install package on SBCX-Mito8MMini===The target is finally ready to install new packages. The following example shows for instance the installation of <code>graphviz</code>:<pre class="board-terminal">root@desk-mx8mm:~# apt-get install graphvizReading package lists... DoneBuilding dependency tree... DoneThe following NEW packages will be installed: graphviz0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.Need to get 2094 kB of archives.After this operation, 0 B of additional disk space will be used.Get:1 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ graphviz 2.50.0-r0 [2094 kB]Fetched 2094 kB in 1s (2020 kB/s) Selecting previously unselected package graphviz.(Reading database ... 59125 files and directories currently installed.)Preparing to unpack .../graphviz_2.50.0-r0_arm64.deb ...Unpacking graphviz (2.50.0-r0) ...Setting up graphviz (2.50.0-r0) ...</pre> == Other useful apt commands ===
==== List of configured software repositories ====
As shown before, the target is configured for accessing the Yocto repositories as listed in the <code>/etc/apt/sources.list.d</code> apt configuration directory:
</pre>
==== Search for packages ====
To search for an available package into the current configured channels use <code>apt-cache search</code>
</pre>
==== List of installed packages ====
User can see the list of installed packages with <code>dpkg --get-selections | sed 's:install$::'</code> (sed removes the ''install'' string from the output list)