Thanks to the <b>opkg</b> packet manager installed on Yocto built root file system, Lizard module allows to install new packages (if available).
== Installing packages on target ==
To use <code>opkg</code> at runtime first of all you need to enable a channel, which commonly is a remote webserver that provide packages feed and the network interface with <code>DNS</code> configuration for accessing external http servers.binary packages itself
An example of network interface configuration for Internet access is described here below. Configuration can be done directly on serial console with the following commands:
where ''192.168.0.254'' is the <code>gateway</code> address and ''8.8.8.8'' is the <code>DNS server</code> (in this case Google's one).
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/suce/cortexa8hf-vfp-neon-2.6.37.2/On the target edit the <icode>pack_nameopkg</icode>configuration file to tell opkg where to look for packages.
The opkg configuration file is /etc/opkg/opkg.conf.
Where<pre>root@lizard:~# vi /etc/opkg/opkg.conf* # Must have one or more source entries of the form:## src <codesrc-name>cortexa8hf<source-vfpurl>## and one or more destination entries of the form:## dest <dest-neonname> <target-2.6.37.2path>## where </codesrc-name> is the package directory* and <codedest-names>http://yoctoare identifiers that# should match [a-zA-Z0-9.dave.eu/suce_-]+, </codesource-url> is the should be a# URL of that points to a directory containing a Familiar# Packages file, and <target-path> should be a directory# that exists on the webservertarget system.
openssh_6.1p1-r0-ara 100% |*******************************| 890 0:00:00 ETA
root@lizard:~#
</pre>
and add the following server:
After the required packages have been download, you need to install them using opkg 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:~# opkgupdateopkg must have one sub-command argumentusage: opkg [options...] sub-command [arguments...]where sub-command is one ofDownloading http: Package Manipulation: update Update list of available packages upgrade Upgrade installed packages install <pkgs> Install package(s) configure <pkgs> Configure unpacked package(s) remove <pkgs|regexp> Remove package(s) flag <flag> <pkgs> Flag package(s) <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation)Informational Commands: list List available packages list//yocto.dave.eu/lizard/cortexa8hf-installed List installed packages listvfp-upgradable List installed and upgradable packages listneon-changed-conffiles List user modified configuration files files <pkg> List files belonging to <pkg> search <file|regexp> List package providing <file> info [pkg|regexp] Display all info for <pkg> status [pkg|regexp] Display all status for <pkg> download <pkg> Download <pkg> to current directory compare-versions <v1> <op> <v2> compare versions using <= < > >= = << >> print-architecture List installable package architectures depends [-A] [pkgname|pat]+ whatdepends [-A] [pkgname|pat]+ whatdependsrec [-A] [pkgname|pat]+ whatrecommends[-A] [pkgname|pat]+ whatsuggests[-A] [pkgname|pat]+ whatprovides [-A] [pkgname|pat]+ whatconflicts [-A] [pkgname|pat]+ whatreplaces [-A] [pkgname|pat]+2.6.37.2/Packages.gz. OptionsInflating http: -A Query all packages not just those installed//yocto.dave.eu/lizard/cortexa8hf-V[<level>] Set verbosity level to <level>.vfp-neon-verbosity[=<level>] Verbosity levels: 0 errors only 1 normal messages (default)2 informative messages 3 debug 4 debug level .6.37.2 -f <conf_file> Use <conf_file> as the opkg configuration file --conf <conf_file> --cache <directory> Use a package cache -d <dest_name> Use <dest_name> as the the root directory for --dest <dest_name> package installation, removal, upgrading/Packages. <dest_name> should be a defined dest name from the configuration file, (but can also be a directory name in a pinch)gz. -o <dir> Use <dir> as the root directory for --offline-root <dir> offline installation Updated list of available packages.in /var/lib/opkg/cortexa8hf-vfp-add-arch <arch>:<prio> Register architecture with given priorityneon. --add-dest <name>Downloading http:<path> Register destination with given path --prefer-arch-to-version Use the architecture priority package rather than the higher version one if more than one candidate is found//yocto.dave.eu/lizard/all/Packages.gz. Force OptionsInflating http: --force-depends Install/remove despite failed dependencies/yocto.dave.eu/lizard/all/Packages.gz. --force-maintainer Overwrite preexisting config files --force-reinstall Reinstall package(s) --force-overwrite Overwrite files from other package(s) --force-downgrade Allow opkg to downgrade Updated list of available packages --force-space Disable free space checks --force-postinstall Run postinstall scripts even in offline mode --force-remove Remove package even if prerm script fails --noaction No action -- test only --download-only No action -- download only --nodeps Do not follow dependencies --force-removal-of-dependent-packages Remove package and /var/lib/opkg/all dependencies --autoremove Remove packages that were installed automatically to satisfy dependencies -t Specify tmp-dir. --tmp-dir Specify tmp-dir. regexp could be something like 'pkgname*' '*file*' or similar e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'root@lizard:~#
</pre>
For exampleThen, for the <code>openssh</code> pakcges reviously downloadedsimply, you can instruct opkg to install the packages on the target with the following commandrequired package, for example:
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.
Adding system System startup links for /etc/init.d/sshdalready exist.Starting Restarting OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd(pid 910)done.root@lizard:~# opkg install openssh_6.1p1-r0-arago0_cortexa8hf-vfpConfiguring update-neon-2.6.37.2.ipkInstalling openssh (6.1p1-r0-arago0) to root.rc.d.
Configuring openssh.
root@lizard:~#
</pre>
Once the system is restarted, the new openssh package will be activated using the installed scripts. Fro checking is the daemon is running, simply:<pre class="board-terminal">root@lizard:~# ps | grep ssh 660 root 3916 S /usr/sbin/sshd 747 root 3964 S {sshd} sshd: root@pts/0 754 root 1780 S grep sshroot@lizard:~#</pre>= Other useful OPKG commands ==
A brief guide to OPKG command line interface is [http://wiki.openmoko.org/wiki/Opkg/Documentation here]. In the next section we'll show some example of OPKG usage.
The package dependencies will NOT be resolved automatically.=== List installed packages ===
== Installed User can see the list of installed packages ==with <code>opkg list-installed</code>
To see which packages are installed, it is possibile to use the <code>list-installed</code> option: <pre class="board-terminal">root@lizard:~# opkg list-installed | grep opensshbase-passwd - 3.5.26-r2libattr1 - 2.4.46-r4libc6 - 2.15-r2-arago5libcap2 - 2.22-r5libcrypto1.0.0 - 1.0.1e-r15.0-arago9libgcc-s1 - 4.7.3-r2-arago5libgcrypt11 - 1.5.0-r2libgpg-error0 - 1.11-r0libz1 - 1.2.7-r0