Difference between revisions of "DESK-MX8M-AN-0001: Package Management with apt-get"

From DAVE Developer's Wiki
Jump to: navigation, search
Line 15: Line 15:
 
| Apr 2022
 
| Apr 2022
 
|[[DESK-MX8M-L/General/Release_Notes#DESK-MX8M-L_2.0.0-rc2|DESK-MX8M-L 2.0.0-rc2]]
 
|[[DESK-MX8M-L/General/Release_Notes#DESK-MX8M-L_2.0.0-rc2|DESK-MX8M-L 2.0.0-rc2]]
 +
|-
 +
| 2.0.0
 +
| Aug 2023
 +
|[[DESK-MX8M-L/General/Release_Notes#DESK-MX8M-L_4.0.0|DESK-MX8M-L 4.0.0]]
 
|-
 
|-
 
|}
 
|}
Line 20: Line 24:
 
==Introduction==
 
==Introduction==
  
Since NXP BSP [https://www.nxp.com/webapp/Download?colCode=L5.4.24_2.1.0_LINUX_DOCS 5.4.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).  
+
Since NXP BSP 5.15.71 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:
 
As reported by NXP official documentation:
Line 36: Line 40:
 
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.
 
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>===
+
===Configuring <code>apt</code> for SBC-ORCA===
 
Edit the file <code>/etc/apt/apt.conf</code> like this:
 
Edit the file <code>/etc/apt/apt.conf</code> like this:
 
<pre>
 
<pre>
 +
root@desk-mx8mp:~# cat /etc/apt/apt.conf
 
APT::Architecture "arm64";
 
APT::Architecture "arm64";
 
APT::Get::AllowUnauthenticated "true";
 
APT::Get::AllowUnauthenticated "true";
Line 47: Line 52:
 
<pre class="board-terminal">
 
<pre class="board-terminal">
 
root@desk-mx8mp:~# cat /etc/apt/sources.list.d/debian-10.list
 
root@desk-mx8mp:~# cat /etc/apt/sources.list.d/debian-10.list
deb [trusted=yes] http://yocto.dave.eu/imx-5.4.70-2.3.0/ all/
+
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ all/
deb [trusted=yes] http://yocto.dave.eu/imx-5.4.70-2.3.0/ aarch64/
+
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ armv8a-mx8mp/
deb [trusted=yes] http://yocto.dave.eu/imx-5.4.70-2.3.0/ aarch64-mx8mp/
+
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ desk_mx8mp/
 
</pre>
 
</pre>
  
Line 63: Line 68:
 
root@desk-mx8mp:~# rm -rf /var/lib/apt/lists/*
 
root@desk-mx8mp:~# rm -rf /var/lib/apt/lists/*
 
root@desk-mx8mp:~# apt-get clean
 
root@desk-mx8mp:~# apt-get clean
root@orca:~# apt-get update
+
root@desk-mx8mp:~# apt-get update
0% [Working]
+
Ign:1 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ InRelease
Ign:1 http://yocto.dave.eu/imx-5.4.70-2.3.0 all/ InRelease
+
Ign:2 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ InRelease
Ign:2 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ InRelease
+
Ign:3 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ InRelease
Ign:3 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64-mx8mp/ InRelease
+
Get:4 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release [1215 B]
Get:4 http://yocto.dave.eu/imx-5.4.70-2.3.0 all/ Release [1213 B]
+
Get:5 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ Release [1224 B]
Get:5 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ Release [1217 B]
+
Get:6 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ Release [1222 B]
Get:6 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64-mx8mp/ Release [1223 B]
+
Ign:7 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release.gpg
Ign:7 http://yocto.dave.eu/imx-5.4.70-2.3.0 all/ Release.gpg
+
Ign:8 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ Release.gpg
Ign:8 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ Release.gpg
+
Ign:9 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ Release.gpg
Ign:9 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64-mx8mp/ Release.gpg
+
Get:10 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Packages [174 kB]
Get:10 http://yocto.dave.eu/imx-5.4.70-2.3.0 all/ Packages [146 kB]
+
Get:11 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ Packages [308 kB]
Get:11 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ Packages [2848 kB]
+
Get:12 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ Packages [263 kB]
Get:12 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64-mx8mp/ Packages [283 kB]
+
Fetched 749 kB in 1s (866 kB/s)
Fetched 3280 kB in 6s (545 kB/s)
 
 
Reading package lists... Done
 
Reading package lists... Done
 +
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release (expected all/ but got )
 +
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ Release (expected armv8a-mx8mp/ but got )
 +
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ Release (expected desk_mx8mp/ but got )
 
</pre>
 
</pre>
  
Line 84: Line 91:
  
 
<pre>
 
<pre>
sed -i 's/\.\//aarch64\//g' /var/lib/apt/lists/yocto.dave.eu_imx-5.4.70-2.3.0_aarch64_Packages
+
root@desk-mx8mp:~# sed -i 's/\.\//armv8a-mx8mp\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_armv8a-mx8mp_Packages
sed -i 's/\.\//all\//g' /var/lib/apt/lists/yocto.dave.eu_imx-5.4.70-2.3.0_all_Packages
+
root@desk-mx8mp:~# sed -i 's/\.\//all\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_all_Packages
sed -i 's/\.\//aarch64-mx8mp\//g' /var/lib/apt/lists/yocto.dave.eu_imx-5.4.70-2.3.0_aarch64-mx8mp_Packages
+
root@desk-mx8mp:~# sed -i 's/\.\//desk%5fmx8mp\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_desk%5fmx8mp_Packages
 +
</pre>
 +
 
 +
===Configuring <code>apt</code> for SBCX-Mito8MMini===
 +
Edit the file <code>/etc/apt/apt.conf</code> like this:
 +
<pre>
 +
root@desk-mx8mm:~# cat /etc/apt/apt.conf
 +
APT::Architecture "arm64";
 +
APT::Get::AllowUnauthenticated "true";
 +
Acquire::Languages "none";
 +
</pre>
 +
 
 +
Edit the file <code>/etc/apt/sources.list.d/debian-10.list</code> like this:
 +
<pre class="board-terminal">
 +
root@desk-mx8mm:~# cat /etc/apt/sources.list.d/debian-10.list
 +
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ all/
 +
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ armv8a-mx8mm/
 +
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ desk_mx8mm/
 +
</pre>
 +
 
 +
Execute the following commands in order to re-create the ''apt'' cache based on the new server's list:
 +
 
 +
<pre>
 +
rm -rf /var/lib/apt/lists/*
 +
apt-get clean
 +
apt-get update
 +
</pre>
 +
 
 +
<pre class="board-terminal">
 +
root@desk-mx8mm:~# rm -rf /var/lib/apt/lists/*
 +
root@desk-mx8mm:~# apt-get clean
 +
root@desk-mx8mm:~# apt-get update
 +
Ign:1 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ InRelease
 +
Ign:2 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ InRelease
 +
Ign:3 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ InRelease
 +
Get:4 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release [1215 B]
 +
Get:5 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ Release [1224 B]
 +
Get:6 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ Release [1222 B]
 +
Ign:7 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release.gpg
 +
Ign:8 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ Release.gpg
 +
Ign:9 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ Release.gpg
 +
Get:10 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Packages [174 kB]
 +
Get:11 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ Packages [304 kB]
 +
Get:12 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ Packages [259 kB]
 +
Fetched 740 kB in 1s (714 kB/s)
 +
Reading package lists... Done
 +
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release (expected all/ but got )
 +
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ Release (expected armv8a-mx8mm/ but got )
 +
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ Release (expected desk_mx8mm/ but got )
 +
</pre>
 +
 
 +
Then, modify the cached package list due to the proper DAVE's server configuration:
 +
 
 +
<pre>
 +
root@desk-mx8mm:~# sed -i 's/\.\//armv8a-mx8mm\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_armv8a-mx8mm_Packages
 +
root@desk-mx8mm:~# sed -i 's/\.\//desk%5fmx8mm\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_desk%5fmx8mm_Packages
 +
root@desk-mx8mm:~# sed -i 's/\.\//all\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_all_Packages
 
</pre>
 
</pre>
  
Line 93: Line 156:
 
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.
 
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.
  
The target is finally ready to install new packages. The following example shows for instance the installation of <code>vim</code>:
+
=== 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
 +
Reading package lists... Done
 +
Building dependency tree... Done
 +
The following NEW packages will be installed:
 +
  graphviz
 +
0 upgraded, 1 newly installed, 0 to remove and 0 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-mx8mp/ graphviz 2.50.0-r0 [2094 kB]
 +
Fetched 2094 kB in 1s (1913 kB/s)
 +
Selecting previously unselected package graphviz.
 +
(Reading database ... 81414 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>
 +
 
 +
=== 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">
 
<pre class="board-terminal">
root@orca:~# apt-get install vim
+
root@desk-mx8mm:~# apt-get install graphviz
 
Reading package lists... Done
 
Reading package lists... Done
Building dependency tree
+
Building dependency tree... Done
Reading state information... Done
 
The following additional packages will be installed:
 
  vim-common vim-help vim-syntax vim-tutor vim-vimrc
 
 
The following NEW packages will be installed:
 
The following NEW packages will be installed:
   vim vim-common vim-help vim-syntax vim-tutor vim-vimrc
+
   graphviz
0 upgraded, 6 newly installed, 0 to remove and 20 not upgraded.
+
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 6584 kB of archives.
+
Need to get 2094 kB of archives.
 
After this operation, 0 B of additional disk space will be used.
 
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
+
Get:1 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ graphviz 2.50.0-r0 [2094 kB]
Get:1 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ vim 8.1.1518-r0 [1051 kB]
+
Fetched 2094 kB in 1s (2020 kB/s)
Get:2 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ vim-common 8.1.1518-r0 [2314 kB]
+
Selecting previously unselected package graphviz.
Get:3 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ vim-help 8.1.1518-r0 [1757 kB]
+
(Reading database ... 59125 files and directories currently installed.)
Get:4 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ vim-syntax 8.1.1518-r0 [1049 kB]
+
Preparing to unpack .../graphviz_2.50.0-r0_arm64.deb ...
Get:5 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ vim-tutor 8.1.1518-r0 [411 kB]
+
Unpacking graphviz (2.50.0-r0) ...
Get:6 http://yocto.dave.eu/imx-5.4.70-2.3.0 aarch64/ vim-vimrc 8.1.1518-r0 [1596 B]
+
Setting up graphviz (2.50.0-r0) ...
Fetched 6584 kB in 9s (660 kB/s)
 
Selecting previously unselected package vim.
 
(Reading database ... 71726 files and directories currently installed.)
 
Preparing to unpack .../vim_8.1.1518-r0_arm64.deb ...
 
Unpacking vim (8.1.1518-r0) ...
 
Selecting previously unselected package vim-common.
 
Preparing to unpack .../vim-common_8.1.1518-r0_arm64.deb ...
 
Unpacking vim-common (8.1.1518-r0) ...
 
Selecting previously unselected package vim-help.
 
Preparing to unpack .../vim-help_8.1.1518-r0_arm64.deb ...
 
Unpacking vim-help (8.1.1518-r0) ...
 
Selecting previously unselected package vim-syntax.
 
Preparing to unpack .../vim-syntax_8.1.1518-r0_arm64.deb ...
 
Unpacking vim-syntax (8.1.1518-r0) ...
 
Selecting previously unselected package vim-tutor.
 
Preparing to unpack .../vim-tutor_8.1.1518-r0_arm64.deb ...
 
Unpacking vim-tutor (8.1.1518-r0) ...
 
Selecting previously unselected package vim-vimrc.
 
Preparing to unpack .../vim-vimrc_8.1.1518-r0_arm64.deb ...
 
Unpacking vim-vimrc (8.1.1518-r0) ...
 
Setting up vim (8.1.1518-r0) ...
 
update-alternatives: Linking /bin/vi to /usr/bin/vim.vim
 
update-alternatives: Linking /usr/bin/vim to /usr/bin/vim.vim
 
update-alternatives: Linking /usr/bin/xxd to /usr/bin/xxd.vim
 
Setting up vim-common (8.1.1518-r0) ...
 
Setting up vim-help (8.1.1518-r0) ...
 
Setting up vim-syntax (8.1.1518-r0) ...
 
Setting up vim-tutor (8.1.1518-r0) ...
 
Setting up vim-vimrc (8.1.1518-r0) ...
 
 
</pre>
 
</pre>
  
Line 151: Line 205:
 
<pre class="board-terminal">
 
<pre class="board-terminal">
 
root@desk-mx8mp:~# cat /etc/apt/sources.list.d/debian-10.list
 
root@desk-mx8mp:~# cat /etc/apt/sources.list.d/debian-10.list
deb [trusted=yes] http://yocto.dave.eu/imx-5.4.70-2.3.0/ all/
+
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ all/
deb [trusted=yes] http://yocto.dave.eu/imx-5.4.70-2.3.0/ aarch64/
+
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ armv8a-mx8mp/
deb [trusted=yes] http://yocto.dave.eu/imx-5.4.70-2.3.0/ aarch64-mx8mp/
+
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ desk_mx8mp/
 
</pre>
 
</pre>
  
Line 164: Line 218:
 
<pre class="board-terminal">
 
<pre class="board-terminal">
 
root@desk-mx8mp:~# apt-cache search vim
 
root@desk-mx8mp:~# apt-cache search vim
vim-dbg - Vi IMproved - enhanced vi editor - Debugging files
 
 
vim - Vi IMproved - enhanced vi editor
 
vim - Vi IMproved - enhanced vi editor
 
vim-common - Vi IMproved - enhanced vi editor
 
vim-common - Vi IMproved - enhanced vi editor
vim-src - Vi IMproved - enhanced vi editor - Source files
+
vim-help - Vi IMproved - enhanced vi editor
 +
vim-syntax - Vi IMproved - enhanced vi editor
 
vim-tutor - Vi IMproved - enhanced vi editor
 
vim-tutor - Vi IMproved - enhanced vi editor
 
vim-vimrc - Vi IMproved - enhanced vi editor
 
vim-vimrc - Vi IMproved - enhanced vi editor
vim-syntax - Vi IMproved - enhanced vi editor
 
vim-tools - Vi IMproved - enhanced vi editor
 
vim-help - Vi IMproved - enhanced vi editor
 
vim-dev - Vi IMproved - enhanced vi editor - Development files
 
vim-doc - Vi IMproved - enhanced vi editor - Documentation files
 
root@desk-mx8mp:~#
 
 
</pre>
 
</pre>
  
Line 212: Line 260:
 
xz
 
xz
 
xz-dev
 
xz-dev
root@desk-mx8mm:~#
 
 
</pre>
 
</pre>

Revision as of 13:25, 7 August 2023

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.0 Apr 2022 DESK-MX8M-L 2.0.0-rc2
2.0.0 Aug 2023 DESK-MX8M-L 4.0.0

Introduction[edit | edit source]

Since NXP BSP 5.15.71 Yocto release, apt-get has been added as a package manager for installing packages in the DUT (target machine).

As reported by NXP official documentation:

The default package management with Yocto Project is rpm. The i.MX distro now enables debian as the package management. This can be easily turned off by add PACKAGE_CLASSES set to package_rpm to the local.conf (or creating a custom distro without the debian package feed PACKAGE_CLASSES = "package_rpm".
With the addition of the debian package feed, a sources.list can be added /etc/apt that links in Debian's package feed. This allows users to install packages not provided in the image without having to add them to a yocto image. Because this package feed is not generated by the i.MX Yocto build process, there is no guarantee each package will work with the right dependencies but it allows simpler tools to be provided. Software that is complex and has more dependencies on specific versions might have issues with an external package feed.

apt-get performs runtime package management of .deb packages. In order to use apt-get for runtime package management, you must perform an initial setup on the target machine for cases where the PACKAGE_FEED_* variables were not set as part of the image that is running on the target.

In principle, the adoption of the Debian package management should allow to use prebuilt package archives available for Debian distributions. However, close attention should be paid when mixing packages of different distributions. For instance, Debian packages installed on a Yocto file system could not work. Even worse, they could interfere with existing packages and make these unusable.

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 .deb packages is used in combination with the well known apt-get utility.

apt-get[edit | edit source]

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 apt for SBC-ORCA[edit | edit source]

Edit the file /etc/apt/apt.conf like this:

root@desk-mx8mp:~# cat /etc/apt/apt.conf
APT::Architecture "arm64";
APT::Get::AllowUnauthenticated "true";
Acquire::Languages "none";

Edit the file /etc/apt/sources.list.d/debian-10.list like this:

root@desk-mx8mp:~# cat /etc/apt/sources.list.d/debian-10.list
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ all/
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ armv8a-mx8mp/
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ desk_mx8mp/

Execute the following commands in order to re-create the apt cache based on the new server's list:

rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update
root@desk-mx8mp:~# rm -rf /var/lib/apt/lists/*
root@desk-mx8mp:~# apt-get clean
root@desk-mx8mp:~# apt-get update
Ign:1 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ InRelease
Ign:2 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ InRelease
Ign:3 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ InRelease
Get:4 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release [1215 B]
Get:5 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ Release [1224 B]
Get:6 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ Release [1222 B]
Ign:7 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release.gpg
Ign:8 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ Release.gpg
Ign:9 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ Release.gpg
Get:10 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Packages [174 kB]
Get:11 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ Packages [308 kB]
Get:12 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ Packages [263 kB]
Fetched 749 kB in 1s (866 kB/s)
Reading package lists... Done
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release (expected all/ but got )
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mp/ Release (expected armv8a-mx8mp/ but got )
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mp/ Release (expected desk_mx8mp/ but got )

Then, modify the cached package list due to the proper DAVE's server configuration:

root@desk-mx8mp:~# sed -i 's/\.\//armv8a-mx8mp\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_armv8a-mx8mp_Packages
root@desk-mx8mp:~# sed -i 's/\.\//all\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_all_Packages
root@desk-mx8mp:~# sed -i 's/\.\//desk%5fmx8mp\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_desk%5fmx8mp_Packages

Configuring apt for SBCX-Mito8MMini[edit | edit source]

Edit the file /etc/apt/apt.conf like this:

root@desk-mx8mm:~# cat /etc/apt/apt.conf
APT::Architecture "arm64";
APT::Get::AllowUnauthenticated "true";
Acquire::Languages "none";

Edit the file /etc/apt/sources.list.d/debian-10.list like this:

root@desk-mx8mm:~# cat /etc/apt/sources.list.d/debian-10.list
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ all/
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ armv8a-mx8mm/
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ desk_mx8mm/

Execute the following commands in order to re-create the apt cache based on the new server's list:

rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update
root@desk-mx8mm:~# rm -rf /var/lib/apt/lists/*
root@desk-mx8mm:~# apt-get clean
root@desk-mx8mm:~# apt-get update
Ign:1 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ InRelease
Ign:2 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ InRelease
Ign:3 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ InRelease
Get:4 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release [1215 B]
Get:5 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ Release [1224 B]
Get:6 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ Release [1222 B]
Ign:7 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release.gpg
Ign:8 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ Release.gpg
Ign:9 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ Release.gpg
Get:10 http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Packages [174 kB]
Get:11 http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ Packages [304 kB]
Get:12 http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ Packages [259 kB]
Fetched 740 kB in 1s (714 kB/s)
Reading package lists... Done
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 all/ Release (expected all/ but got )
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 armv8a-mx8mm/ Release (expected armv8a-mx8mm/ but got )
W: Conflicting distribution: http://yocto.dave.eu/desk-mx8m-l-4.0.0 desk_mx8mm/ Release (expected desk_mx8mm/ but got )

Then, modify the cached package list due to the proper DAVE's server configuration:

root@desk-mx8mm:~# sed -i 's/\.\//armv8a-mx8mm\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_armv8a-mx8mm_Packages
root@desk-mx8mm:~# sed -i 's/\.\//desk%5fmx8mm\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_desk%5fmx8mm_Packages
root@desk-mx8mm:~# sed -i 's/\.\//all\//g' /var/lib/apt/lists/yocto.dave.eu_desk-mx8m-l-4.0.0_all_Packages

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 according to the How to configure the network interfaces wiki page.

Install package on SBC-ORCA[edit | edit source]

The target is finally ready to install new packages. The following example shows for instance the installation of graphviz:

root@desk-mx8mp:~# apt-get install graphviz
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  graphviz
0 upgraded, 1 newly installed, 0 to remove and 0 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-mx8mp/ graphviz 2.50.0-r0 [2094 kB]
Fetched 2094 kB in 1s (1913 kB/s)
Selecting previously unselected package graphviz.
(Reading database ... 81414 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) ...

Install package on SBCX-Mito8MMini[edit | edit source]

The target is finally ready to install new packages. The following example shows for instance the installation of graphviz:

root@desk-mx8mm:~# apt-get install graphviz
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  graphviz
0 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) ...

Other useful apt commands[edit | edit source]

List of configured software repositories[edit | edit source]

As shown before, the target is configured for accessing the Yocto repositories as listed in the /etc/apt/sources.list.d apt configuration directory:

root@desk-mx8mp:~# cat /etc/apt/sources.list.d/debian-10.list
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ all/
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ armv8a-mx8mp/
deb [trusted=yes] http://yocto.dave.eu/desk-mx8m-l-4.0.0/ desk_mx8mp/

Search for packages[edit | edit source]

To search for an available package into the current configured channels use apt-cache search

Please note that this will show all packages, it's usually more useful to grep for a pattern, e.g.:

root@desk-mx8mp:~# apt-cache search vim
vim - Vi IMproved - enhanced vi editor
vim-common - Vi IMproved - enhanced vi editor
vim-help - Vi IMproved - enhanced vi editor
vim-syntax - Vi IMproved - enhanced vi editor
vim-tutor - Vi IMproved - enhanced vi editor
vim-vimrc - Vi IMproved - enhanced vi editor

List of installed packages[edit | edit source]

User can see the list of installed packages with dpkg --get-selections | sed 's:install$::' (sed removes the install string from the output list)

acl
acl-dev
adwaita-icon-theme-symbolic
alsa-conf
alsa-state
alsa-states
alsa-tools
alsa-utils
alsa-utils-aconnect
alsa-utils-alsactl
alsa-utils-alsaloop
alsa-utils-alsamixer
alsa-utils-alsatplg
...
[snip]
...
volatile-binds-dev
wayland
wayland-dev
which
which-dev
wireless-regdb-static
wireless-tools
wpa-supplicant
wpa-supplicant-cli
wpa-supplicant-passphrase
xinetd
xz
xz-dev