Changes

Jump to: navigation, search

LELK-AN-001: Package installation using opkg

6,664 bytes added, 11:57, 12 December 2017
no edit summary
This task can be performed using DAVE Yocto pre-built package server available at the <code>http://yocto.dave.eu</code> address.
== Installing packages on target (manually) ==
To use <code>opkg</code> at runtime first of all you need to enable the network interface with <code>DNS</code> configuration for accessing external http servers.
Once the network interface is configured, the DAVE's Yocto Lizard package server can be accessed for package downloading:
root@lizard:~# wget http://yocto.dave.eu/sucelizard/cortexa8hf-vfp-neon-2.6.37.2/<i>pack_name</i> 
Where:
* <code>cortexa8hf-vfp-neon-2.6.37.2</code> is the package directory
* <code>http://yocto.dave.eu/sucelizard</code> is the URL of the webserver
For example:
'''
<pre class="board-terminal">
root@lizard:~# wget http://yocto.dave.eu/sucelizard/cortexa8hf-vfp-neon-2.6.37.2/openssh-sftp_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk
Connecting to yocto.dave.eu (79.143.179.155:80)
openssh-sftp_6.1p1-r 100% |*******************************| 46000 0:00:00 ETA
root@lizard:~# wget http://yocto.dave.eu/sucelizard/cortexa8hf-vfp-neon-2.6.37.2/openssh-keygen_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk
Connecting to yocto.dave.eu (79.143.179.155:80)0_cortexa8hf-vfp-neon-2.6.37.2.ipk
openssh-keygen_6.1p1 100% |*******************************| 79936 0:00:00 ETA
root@lizard:~# wget http://yocto.dave.eu/sucelizard/cortexa8hf-vfp-neon-2.6.37.2/openssh-sshd_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk
Connecting to yocto.dave.eu (79.143.179.155:80)
openssh-sshd_6.1p1-r 100% |*******************************| 188k 0:00:00 ETA
root@lizard:~# wget http://yocto.dave.eu/sucelizard/cortexa8hf-vfp-neon-2.6.37.2/openssh-ssh_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk
Connecting to yocto.dave.eu (79.143.179.155:80)
openssh-ssh_6.1p1-r0 100% |*******************************| 161k 0:00:00 ETA
root@lizard:~# wget http://yocto.dave.eu/sucelizard/cortexa8hf-vfp-neon-2.6.37.2/openssh_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk
Connecting to yocto.dave.eu (79.143.179.155:80)
openssh_6.1p1-r0-ara 100% |*******************************| 890 0:00:00 ETA
</pre>
For example, for the <code>openssh</code> pakcges reviously packages previously downloaded, you can install the packages on the target with the following command:
<pre>
root@lizard:~#
</pre>
 
{{ImportantMessage|text=The package dependencies will NOT be resolved automatically.
* openssh-ssh * openssh-keygen * openssh-sshd *
* opkg_install_cmd: Cannot install package openssh.
root@lizard:~#
</pre>
 
== Installing packages on target (using feed) ==
 
We need to tell <code>opkg</code> on the embedded system where to look for packages.
 
The opkg configuration file is /etc/opkg/opkg.conf.
 
Edit the opkg.conf file to look like this:
 
<pre>
root@lizard:~# vi /etc/opkg/opkg.conf
# Must have one or more source entries of the form:
#
# src <src-name> <source-url>
#
# and one or more destination entries of the form:
#
# dest <dest-name> <target-path>
#
# where <src-name> and <dest-names> are identifiers that
# should match [a-zA-Z0-9._-]+, <source-url> should be a
# URL that points to a directory containing a Familiar
# Packages file, and <target-path> should be a directory
# that exists on the target system.
 
 
</pre>
 
and add the following server:
 
src/gz cortexa8hf-vfp-neon http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/
src/gz all http://yocto.dave.eu/lizard/all
 
<pre class="board-terminal">
root@lizard:~# opkg update
Downloading http://yocto.dave.eu/all/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/any/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv5ehf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv5hf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv5tehf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv5thf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv6hf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv6thf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv7ahf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv7ahf-vfp-neon/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv7at2hf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/armv7at2hf-vfp-neon/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/cortexa8hf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/cortexa8hf-vfp-neon-2.6.37.2/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/cortexa8hf-vfp-neon/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/cortexa8t2hf-vfp/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/cortexa8t2hf-vfp-neon/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/lizard/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/noarch/Packages.gz.
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/Packages.gz.
Inflating http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/Packages.gz.
Updated list of available packages in /var/lib/opkg/cortexa8hf-vfp-neon.
Downloading http://yocto.dave.eu/lizard/all/Packages.gz.
Inflating http://yocto.dave.eu/lizard/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/all.
</pre>
 
Then, simply, instruct opkg to install the required package, for example:
 
<pre class="board-terminal">
root@lizard:~# opkg install openssh
Installing openssh (6.1p1-r0-arago0) to root...
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/openssh_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk.
Installing openssh-scp (6.1p1-r0-arago0) to root...
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/openssh-scp_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk.
Installing update-alternatives-cworth (1:0.1.8+svnr649-r13.0-arago0) to root...
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/update-alternatives-cworth_0.1.8+svnr649-r13.0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk.
Installing openssh-ssh (6.1p1-r0-arago0) to root...
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/openssh-ssh_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk.
Installing openssh-keygen (6.1p1-r0-arago0) to root...
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/openssh-keygen_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk.
Installing openssh-sshd (6.1p1-r0-arago0) to root...
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/openssh-sshd_6.1p1-r0-arago0_cortexa8hf-vfp-neon-2.6.37.2.ipk.
Installing shadow (4.1.4.3-r13) to root...
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/shadow_4.1.4.3-r13_cortexa8hf-vfp-neon-2.6.37.2.ipk.
Installing shadow-securetty (4.1.4.3-r2-arago0) to root...
Downloading http://yocto.dave.eu/lizard/lizard/shadow-securetty_4.1.4.3-r2-arago0_lizard.ipk.
Installing base-passwd (3.5.26-r2) to root...
Downloading http://yocto.dave.eu/lizard/cortexa8hf-vfp-neon-2.6.37.2/base-passwd_3.5.26-r2_cortexa8hf-vfp-neon-2.6.37.2.ipk.
Running useradd commands...
Note: username sshd already exists, not re-creating it
Installing update-rc.d (0.7-r5) to root...
Downloading http://yocto.dave.eu/suce/all/update-rc.d_0.7-r5_all.ipk.
Configuring shadow-securetty.
Configuring update-alternatives-cworth.
Configuring openssh-ssh.
update-alternatives: Linking //usr/bin/ssh to /usr/bin/ssh.openssh
Configuring openssh-scp.
update-alternatives: Linking //usr/bin/scp to /usr/bin/scp.openssh
Configuring openssh-keygen.
Configuring base-passwd.
Configuring shadow.
update-alternatives: Linking //usr/bin/passwd to /usr/bin/passwd.shadow
update-alternatives: Linking //usr/bin/chfn to /usr/bin/chfn.shadow
update-alternatives: Linking //usr/bin/newgrp to /usr/bin/newgrp.shadow
update-alternatives: Linking //usr/bin/chsh to /usr/bin/chsh.shadow
update-alternatives: Linking //usr/bin/groups to /usr/bin/groups.shadow
update-alternatives: Linking //usr/sbin/chpasswd to /usr/sbin/chpasswd.shadow
update-alternatives: Linking //bin/login to /bin/login.shadow
update-alternatives: Linking //sbin/vipw to /sbin/vipw.shadow
update-alternatives: Linking //sbin/vigr to /sbin/vigr.shadow
Configuring openssh-sshd.
System startup links for /etc/init.d/sshd already exist.
Restarting OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 910)
.
Configuring update-rc.d.
Configuring openssh.
root@lizard:~#
</pre>
8,154
edits

Navigation menu