0% found this document useful (0 votes)
560 views3 pages

OpenWrt Feeds - OpenWrt Wiki

Feeds are additional predefined package build recipes for OpenWrt Buildroot. The list of usable feeds is configured from the f e e d s. C o n ffile. Each feed line consists of 3 whitespace-separated components: the feed method, the feed name, and the feed source.

Uploaded by

Alex Fernandes
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
560 views3 pages

OpenWrt Feeds - OpenWrt Wiki

Feeds are additional predefined package build recipes for OpenWrt Buildroot. The list of usable feeds is configured from the f e e d s. C o n ffile. Each feed line consists of 3 whitespace-separated components: the feed method, the feed name, and the feed source.

Uploaded by

Alex Fernandes
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

OpenWrt Feeds

In OpenWrt, a "feed" is a collection of packages which share a common location. Feeds may reside on a remote server, in a version control system, on the local filesystem, or in any other location addressable by a single name (path/URL) over a protocol with a supported feed method. Feeds are additional predefined package build recipes for OpenWrt Buildroot.

Working with Feeds


Feed Configuration
The list of usable feeds is configured from the f e e d s . c o n ffile (or f e e d s . c o n f . d e f a u l twhen f e e d s . c o n fdoes not exist). This file contains a list of feeds, one per line, and any number of empty lines. Comments begin with # and extend to the end of a line and are ignored during parsing. Each feed line consists of 3 whitespace-separated components: The feed method, the feed name, and the feed source. As of this writing the file

< b u i l r o o td i r > / f e e d s . c o n f . d e f a u l tcontains:

s r c s v n p a c k a g e s s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / p a c k a g e s s r c s v n x w r t h t t p : / / x w r t . g o o g l e c o d e . c o m / s v n / t r u n k / p a c k a g e s r c g i t l u c i g i t : / / n b d . n a m e / l u c i . g i t s r c g i t r o u t i n g g i t : / / g i t h u b . c o m / o p e n w r t r o u t i n g / p a c k a g e s . g i t s r c g i t t e l e p h o n yh t t p : / / f e e d s . o p e n w r t . n a n l . d e / o p e n w r t / t e l e p h o n y . g i t # s r c s v n p h o n e s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / f e e d s / p h o n e # s r c s v n e f l s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / f e e d s / e f l # s r c s v n x o r g s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / f e e d s / x o r g # s r c s v n d e s k t o p s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / f e e d s / d e s k t o p # s r c s v n x f c e s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / f e e d s / x f c e # s r c s v n l x d e s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / f e e d s / l x d e # s r c l i n kc u s t o m / u s r / s r c / o p e n w r t / c u s t o m f e e d

As of this writing, the following methods are supported:


Method src-bzr src-cpy Function Data is downloaded from the source path/URL using b z r Data is copied from the source path

src-darcs Data is downloaded from the source path/URL using d a r c s src-git src-hg src-link src-svn Data is downloaded from the source path/URL using g i t . Data is downloaded from the source path/URL using h g A symlink to the source path is created Data is downloaded from the source path/URL using s v n
1)

Feed names are used to identify feeds and serve as the basis for several file and directory names that are created to hold information about the feeds. The feed source is the location from which the feed data is downloaded. For the methods listed above which rely on version control systems that support a "limited history" option (such as d e p t hfor g i t and l i g h t w e i g h tfor b z r ) the smallest available history is downloaded. This is a good default, but developers who are actively committing to a feed and/or using the commit history may want to change this behavior. This can be done by editing s c r i p t s / f e e d sappropriately or by checking out the feed without using s c r i p t s / f e e d s .

Feed Commands
Feeds can be utilized through the s c r i p t s / f e e d sscript. A list of the available commands is generated by invoking s c r i p t s / f e e d swithout any arguments. Most commands require the feed information to be available locally, so running update first is usually necessary. In the following discussion the term "applicable packages" usually refers to the package names given on the command line or all packages in a feed when the -a option is used.

Clean
The clean command removes the locally stored feed data, including the feed indexes and data for all packages in the feed (but not the symlinks created by the install command, which will be dangling until the feeds are re-downloaded by the update command). This is done by removing the f e e d sdirectory and all subdirectories.

Install
The install command installs the applicable packages and any packages on which the applicable packages depend (both direct dependencies and build dependencies). The installation process consists of creating a symbolic link from p a c k a g e s / f e e d s / $ f e e d _ n a m e / $ p a c k a g e _ n a m eto f e e d s / $ f e e d _ n a m e / $ p a c k a g e _ n a m eso that the package will be included in the configuration process when the directory hierarchy under p a c k a g e sis searched.

Command ./scripts/feeds install -a ./scripts/feeds install luci Install only the package LuC I

Description Install all packages (not recommended, only install the packages you need)

./scripts/feeds install -a -p luci Install the complete LuC I WebUI by installing all (-a) packages from the preferred feed (-p) luci

See the above section for a list of the feeds available by default.

Please note that this replaces the old method of creating symlinks, which can be still found on-line in many old forum and user-group entries

List
The list command reads and displays the list of packages in each feed from the index file for the applicable feeds. The index file is stored in the f e e d sdirectory with the name of the feed suffixed with . i n d e x . The file is generated by the update command.

Search
The search command reads through the feed metadata and lists packages which match the given search criteria.

Uninstall
The uninstall command does the opposite of the install command (although it does not address dependent packages in any way). It simply removes any symlinks to the package from the subdirectories of p a c k a g e s / f e e d s .

Update
When s c r i p t s / f e e d su p d a t eis invoked, each of the applicable feeds are downloaded from their source location into a subdirectory of f e e d swith the feed name. It then parses the package information from the feed into an index file used by the list and search commands.
Command Description

./scripts/feeds update packages luci C heckout the packages and luci feeds

Note that update also stores the configured location of the feed in the configuration can be detected and handled appropriately.

f e e d s / $ f e e d _ n a m e . t m p / l o c a t i o nsuch that changes to

After retrieval the downloaded packages need to be "installed". Only after installation will they be available in the configuration interface!

Custom Feeds
Ok, you've developed your package, and now you want to use it via make menuconfig, OR you are developing a package and you want to test it in a build before you try to get it included in OpenWrt. The solution is a custom feed. You can either create an entirely new feed, or use a modified version of one of the standard ones.

Creating the package directory


Adding your package to an existing feed
For this example we assume that your are in 1. You create your current project dir 1. Then while in 1. 2.

/ h o m e / u s e r / o p e n w r tas your base directory.

p r o j e c t .

/ h o m e / u s e r / o p e n w r t / p r o j e c t

s v nc os v n : / / s v n . o p e n w r t . o r g / o p e n w r t / t r u n k[ s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / t r u n k ]o p e n w r t(for
the OpenWRT base system) (for the packages feed)

s v nc os v n : / / s v n . o p e n w r t . o r g / o p e n w r t / p a c k a g e s[ s v n : / / s v n . o p e n w r t . o r g / o p e n w r t / p a c k a g e s ]p a c k a g e s / h o m e / u s e r / o p e n w r t / p r o j e c t / p a c k a g e s

1. Add your package in the appropriate subdirectory under

Creating your own feed


1. Create your project dir and get trunk, as above 2. Create your package dir and copy your package into it (e.g.

c pp a c k a g e d i r/ h o m e / u s e r / o p e n w r t / p r o j e c t / c u s t o m f e e d / ), so that your package is under (in this example) / h o m e / u s e r / o p e n w r t / p r o j e c t / c u s t o m f e e d / p a c k a g e d i r

Using the feed

1. Edit your 3. e.g.

f e e d s . c o n f(i.e. / h o m e / u s e r / o p e n w r t / p r o j e c t / o p e n w r t / f e e d s . c o n f )

2. Add a new line to access the feed (and in the case of adding to the packages feed comment out the normal packages feed.)

# s r v s v np a c k a g e ss v n : / / s v n . o p e n w r t . o r g / o p e n w r t / p a c k a g e s s r c l i n kc u s t o m f e e d/ h o m e / u s e r / o p e n w r t / p r o j e c t / p a c k a g e s or in the case of the second example: s r c l i n kc u s t o m f e e d/ h o m e / u s e r / o p e n w r t / p r o j e c t / c u s t o m f e e d 1. Update the feed: from the

< b u i l d r o o td i r >(e.g. / h o m e / u s e r / o p e n w r t / p r o j e c t / o p e n w r t ) do:

. / s c r i p t s / f e e d su p d a t ec u s t o m f e e d

2. And then install it


. / s c r i p t s / f e e d si n s t a l lpc u s t o m f e e d

3. Now your package(s) should be available when you do


m a k em e n u c o n f i g

Explanations
The downloaded sources (referenced in package Makefiles) are not there The downloads go first to <buildroot>/dl as gzipped .gz files. And there they are stored and then they get unzipped to /build_dir. See e.g. <buildroot>/build_dir/target-*/ and below it you will find subdirectories for each package's sources.

Documentation
1. OpenWrt Buildroot About 2. OpenWrt Buildroot Installation 3. OpenWrt Buildroot Usage 4. OpenWrt Buildroot Feeds 5. OpenWrt Buildroot Technical Reference this article needs your attention.

Link dump
https://forum.openwrt.org/viewtopic.php?id=45293 [https://forum.openwrt.org/viewtopic.php?id=45293] exFAT support
1)

If the source contains a semicolon, the portion before the semicolon is treated as a URL and the portion after as a branch name.

Back to top doc/devel/feeds.txt Last modified: 2013/07/16 19:16 by lorema This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

You might also like