Buildroot package management
Isn't opkg a package manager? Or just some kind of frontend to fetch packages?
opkg is based on ipkg. It looks like it tries to provide all the features of apt-get
.
Could someone explain what is really needed to implement that kind of manager, or where to find such information?
Package managers provide many different features. As they have evolved, different layers of ease for the end user has been added. Generally, they started in the Linux desktop or server space and have been ported for use in embedded systems.
Some differences; an embedded system is usually single tasked. A package management system allows the user to pick and choose what is installed. Often, an embedded system might not want to allow a user to pick and choose packages. Of course, it depends on the applications.
Some package management features,
- Building and patching.
- Package dependency and hence package database.
- Package migration.
- Package specialization.
- Automated download
- Minimize download time/bandwidth.
Rpm, dpkg, ipkg are typically only fulfilling items 1-4. Buildroot doesn't even do this, only item one is really relevant. The reason is that Buildroot is intended to build software for a fixed system that will never be updated. It doesn't make sense to have a file system with network update and package migration, it there is not network connection or external storage in the device. Also, Buildroot tries to be minimal and these extra features have a cost.
LTIB provide a system to create items 1-3, but not the network download. Also, out of the box, it is rather in-efficient in RPM size. Item 4, leads to typical devel and deploy packages. In order to build a library, you need header files to compile dependent packages. A typical LTIB rpm includes all the header files. It is an easy task to make sub-packages that exclude these headers and man pages, etc.
OpenWrt works well for routers, but if you need graphics, sound and other features the packages may not be available. There are various file system builders, but due to the amount of variations, each has costs and benefits. Just as there are many Linux desktop and server distributions, there are many root filesystem builder with different package management options. You have to evaluate the strengths for you application and system.