Package generated by toltecmk
are meant to be used with Opkg, a lightweight package manager targeting embedded devices like the reMarkable.
Opkg is developed both by OpenWrt and by the Yocto Project.
Opkg is a fork of ipkg, the package manager used in NSLU2's Optware, which is designed to add software to stock firmware of embedded devices.
The package format is similar to the format of Debian packages (deb).
It’s a tar.gz
archive with three files:
control.tar.gz
: Sub-archive with metadata about the package itself.control
: Text file containing information about the package. See the Debian documentation for details about the value and expected format for each field.preinst
,postinst
,prerm
,postrm
: Optional shell scripts that are run before and after installation or removal of the package, if provided. See the Debian documentation for more information about when and how those scripts are invoked.conffiles
: List of files to keep upon upgrading the package (optional).
data.tar.gz
: Sub-archive with the actual contents of the package (binaries, configuration files, data) arranged in a folder structure that mirrors the one of your device’s root folder.debian-binary
: Text file that contains the value2.0
. Used for telling apart normal.tar.gz
archives from actual packages.
To see an example of an ipk package, you can download one from Toltec’s package listing and dissect its contents with your archive manager.
Packages are published in repository feeds such as Entware’s feed or Toltec’s feed.
Opkg automatically download the feeds listed in /opt/etc/opkg.conf
, builds an internal index of available packages, and offers the end-user to manage those packages.
- Opkg: Debian’s Little Cousin (Alejandro del Castillo, 2020). A presentation about Opkg’s history, differences and similarities to Debian, and dependency resolution challenges.
- Managing a custom opkg repository (Jumpnow Technologies, 2019). Information about what is needed to setup an Opkg repository.
- Building opkg .ipk packages by hand (Remy van Elst, 2019). Information about how to create a functional ipk package.