Changes

Jump to: navigation, search

XELK-AN-003: Package Management with Yocto

5,279 bytes added, 10:36, 5 April 2019
Installing packages on target
{{Applies To Yocto}}
{{InfoBoxBottom}}
{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}
==History==
* <code>cortexa9hf_vfp_neon</code> is the name of the channel
* <code>http://myyocto.example.com/cortexa9hf_vfp_neon</code> is the URL of the webserver
 
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:
 
<pre class="board-terminal">
root@imx6qxelk:~# ifconfig eth0 192.168.0.94
root@imx6qxelk:~# route add default gw 192.168.0.254
root@imx6qxelk:~# echo "nameserver 8.8.8.8" > /etc/resolv.conf
</pre>
 
For example:
'''
<pre class="board-terminal">
root@imx6qxelk:~# smart channel --add cortexa9hf_neon type=rpm-md baseurl=http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/
 
Alias: cortexa9hf_neon
Type: rpm-md
Base URL: http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/
 
Include this channel? (y/N): y
</pre>
You can also add a ''local'' directory, for example mounted via NFS directly on target, with the following command:
After you configure the channel and/or update packages feed on server, you need to update smart database:
<preclass="board-terminal">root@imx6qxelk:~# smart updateLoading cache...Updating cache... ############################################################ [100%] Fetching information for 'cortexa9hf_neon'... -> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/repodata/repomd.xml repomd.xml ############################################################ [ 50%]-> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/repodata/primary.xml.gz -> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/repodata/filelists.xml.gz filelists.xml.gz ############################################################ [ 75%]primary.xml.gz ############################################################ [100%] Updating cache... ############################################################ [100%] Channels have 17495 new packages.Saving cache... root@imx6qxelk:~#
</pre>
</pre>
E.g. For example:<codepre class="board-terminal">root@imx6qxelk:~# smart install emacs</code>vim Loading cache...Updating cache... ############################################################ [100%]
Computing transaction...
 
Installing packages (6):
vim-7.4.769-r0@cortexa9hf_neon vim-syntax-7.4.769-r0@cortexa9hf_neon
vim-common-7.4.769-r0@cortexa9hf_neon vim-tutor-7.4.769-r0@cortexa9hf_neon
vim-help-7.4.769-r0@cortexa9hf_neon vim-vimrc-7.4.769-r0@cortexa9hf_neon
 
9.4MB of package files are needed. 26.9MB will be used.
 
Confirm changes? (Y/n):
 
Fetching packages...
-> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/vim-vimrc-7.4.769-r0.cortexa9hf_neon.rpm
vim-vimrc-7.4.769-r0.cortexa9hf_neon.rpm ############################################################ [ 16%]
-> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/vim-syntax-7.4.769-r0.cortexa9hf_neon.rpm
-> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/vim-tutor-7.4.769-r0.cortexa9hf_neon.rpm
vim-tutor-7.4.769-r0.cortexa9hf_neon.rpm ############################################################ [ 33%]
-> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/vim-7.4.769-r0.cortexa9hf_neon.rpm
vim-7.4.769-r0.cortexa9hf_neon.rpm ############################################################ [ 50%]
vim-syntax-7.4.769-r0.cortexa9hf_neon.rpm ############################################################ [ 66%]
-> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/vim-common-7.4.769-r0.cortexa9hf_neon.rpm
-> http://yocto.dave.eu/xelk-3.0.0/cortexa9hf_neon/vim-help-7.4.769-r0.cortexa9hf_neon.rpm
vim-help-7.4.769-r0.cortexa9hf_neon.rpm ############################################################ [ 83%]
vim-common-7.4.769-r0.cortexa9hf_neon.rpm ############################################################ [100%]
 
Committing transaction...
Preparing... ############################################################ [ 0%]
1:Installing vim-vimrc ############################################################ [ 16%]
2:Installing vim-help ############################################################ [ 33%]
3:Installing vim-tutor ############################################################ [ 50%]
4:Installing vim ############################################################ [ 66%]
Output from vim-7.4.769-r0@cortexa9hf_neon:
update-alternatives: Linking /bin/vi to /usr/bin/vim.vim
update-alternatives: Linking /usr/bin/vim to /usr/bin/vim.vim
5:Installing vim-common ############################################################ [ 83%]
6:Installing vim-syntax ############################################################ [100%]
</pre>
The package dependencies will be resolved automatically.
8,154
edits

Navigation menu