C
Package Manager in Boot to Qt
Boot to Qt images use the IPK package (Itsy Package) format and the corresponding OPKG (Open Package) package manager for handling the packages in the target devices. With opkg
, you can install, update, and remove packages in a target device.
The Qt Company does not offer a package feed that you could use to install new packages or updates into the target device over the network. However, Yocto provides way to create your own package feeds for either personal development purposes or to be shared with other users.
To get started, you need to have a Yocto build done for you target device. To do this, follow instructions in How to Create Boot to Qt Image and build the Boot to Qt image and any additional components you want to offer from the feed. After this, you need to instruct bitbake to prepare the package feed by running the following command:
bitbake package-index
This creates the required package feed files under tmp/deploy/ipk. You must then make this directory structure available from a http server. For development purposes, you can use a simple python command to start a http server:
cd tmp/deploy/ipk python3 -m http.server
Next, you need to edit the opkg configuration in the target device and add your package feed URLs. For this, you need to know the IP address of your host machine and directory names in the package feed directory.
For the following example, let's assume that your host machine has an IP address 172.16.58.2 and that you have following package feed directories available: aarch64, aarch64-mx8, all. The example IP address is usually available if you are connected to the target device via USB, but may be different in your case. The actual package directories always depend on the target device that your are using.
The package feed URLs are added in the /etc/opkg/opkg.conf configuration file in your target device in the following format:
src aarch64 http://172.16.58.2:8000/aarch64 src aarch64-mx8 http://172.16.58.2:8000/aarch64-mx8 src all http://172.16.58.2:8000/all
After this, you can use the opkg
tool the update the target device:
root@b2qt-imx8:~# opkg update Downloading http://172.16.58.2:8000/aarch64/Packages. Updated source 'aarch64'. Downloading http://172.16.58.2:8000/aarch64-mx8/Packages. Updated source 'aarch64-mx8'. Downloading http://172.16.58.2:8000/all/Packages. Updated source 'all'.
For more information, see Using Runtime Package Management in the Yocto documentation.
Available under certain Qt licenses.
Find out more.