Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
579 views
in Technique[技术] by (71.8m points)

arm - Buildroot package management

I'm using buildroot to create a rootfs running on my ARM platform.

I'd like to have a package manager on my platform to easily install packages, like apt-get in ubuntu.

I found opkg, who can be simply added to the buildroot build, but I can't find any information about how to find a repository.

Also, reading some stuff on the web about this, I also read that buildroot didn't include a package manager. Isn't opkg a package manager? Or just some kind of frontend to fetch packages?

I don't really understand what a package manager consist of, and I don't find any information about this.

Could someone explain what is really needed to implement that kind of manager, or where to find such informations?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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,

  1. Building and patching.
  2. Package dependency and hence package database.
  3. Package migration.
  4. Package specialization.
  5. Automated download
  6. 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...