Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-developer:feeds [2019/04/27 21:22] – improved clarity and fixed some issues overdamped1docs:guide-developer:feeds [2021/10/15 09:06] (current) – ↷ Links adapted because of a move operation bobafetthotmail
Line 1: Line 1:
 ====== OpenWrt Feeds ====== ====== OpenWrt Feeds ======
- 
-FIXME: As of March 2019 - The 'feed' method described here no longer works. 
  
 In OpenWrt, a "feed" is a collection of [[docs:guide-developer: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. In OpenWrt, a "feed" is a collection of [[docs:guide-developer: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.
Line 50: Line 48:
 ===== Working with Feeds ===== ===== Working with Feeds =====
  
-As of December, 2018, feeds are retrieved and managed by script ''scripts/feeds'' within the ''openwrt/openwrt.git'' repository. The ''feeds'' script incorporates packages from a variety of feed sources into the OpenWrt build system. This is a two step process done by the developer before building an image by updating a feed followed by installing packages from specific to that feed.+As of December, 2018, feeds are retrieved and managed by the script ''scripts/feeds'' within the ''openwrt/openwrt.git'' repository. The ''feeds'' script incorporates packages from a variety of feed sources into the OpenWrt build system. This is a two step process done by the developer before building an image by updating a feed followed by installing packages from specific to that feed.
  
 During the ''update'' step, the feeds are obtained from their sources listed within a [[docs:guide-developer:feeds#feed_configuration|feed configuration]] and then copied into the ''feeds'' directory. After a successful update, each package recipe within a feed is represented within a folder in ''feeds/<feed_name>/<package_name>/'', but they are not currently incorporated into the OpenWrt build system as they are not contained within the `package/` directory. During the ''update'' step, the feeds are obtained from their sources listed within a [[docs:guide-developer:feeds#feed_configuration|feed configuration]] and then copied into the ''feeds'' directory. After a successful update, each package recipe within a feed is represented within a folder in ''feeds/<feed_name>/<package_name>/'', but they are not currently incorporated into the OpenWrt build system as they are not contained within the `package/` directory.
Line 106: Line 104:
 === Install === === Install ===
  
-FIXME: There is no longer a ''packages'' directory nor a ''feeds'' directory in the build system (December, 2018) +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 ''package/feeds/$feed_name/$package_name'' to ''feeds/$feed_name/$package_name'' so that the package will be included in the configuration process when the directory hierarchy under ''packages'' is searched.
- +
-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 ''packages/feeds/$feed_name/$package_name'' to ''feeds/$feed_name/$package_name'' so that the package will be included in the configuration process when the directory hierarchy under ''packages'' is searched.+
  
 ^ Command                            ^ Description ^ ^ Command                            ^ Description ^
Line 129: Line 125:
 === Uninstall === === 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 ''packages/feeds''.+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 ''package/feeds''.
  
 === Update === === Update ===
Line 149: Line 145:
  
 ==== Creating the package directory ==== ==== Creating the package directory ====
 +
 +For this example we assume that your are in ''/home/user/openwrt'' as your base directory.
  
 === Adding your package to an existing feed === === Adding your package to an existing feed ===
  
-For this example we assume that your are in ''/home/user/openwrt'' as your base directory. 
  
-  - You create your current project dir ''project''+FIXME
-  - Then while in ''/home/user/openwrt/project'' +
-    - ''svn co svn://svn.openwrt.org/openwrt/trunk openwrt'' (for the OpenWRT base system) +
-    - ''svn co svn://svn.openwrt.org/openwrt/packages packages'' (for the packages feed) +
-  - Add your package in the appropriate subdirectory under ''/home/user/openwrt/project/packages''+
  
-=== Creating your own feed === +=== Adding your package to your own feed ===
-  - Create your project dir and get trunk, as above +
-  - Create your package dir and copy your package into it (e.g. ''cp packagedir /home/user/openwrt/project/customfeed/''), so that your package is under (in this example) ''/home/user/openwrt/project/customfeed/packagedir''+
  
-==== Using the feed ==== +For this example we assume that you name your feed ''custom'' and your project is called ''helloworld'' and its openwrt Makefile is located at ''/usr/src/openwrt/custom-feed/helloworld/Makefile''.
-  - Edit your ''feeds.conf'' (i.e. ''/home/user/openwrt/project/openwrt/feeds.conf''+
-  - Add a new line to access the feed (and in the case of adding to the packages feed comment out the normal packages feed.) +
-  - e.g.+
  
-''#srv-svn packages %%svn://svn.openwrt.org/openwrt/packages%% +  - Edit ''/home/user/openwrt/feeds.conf.default'' 
-src-link customfeed /home/user/openwrt/project/packages'' |+  - Add a new line for your feed. <code>src-link custom /usr/src/openwrt/custom-feed/</code>
  
-or in the case of the second example: 
  
-''src-link customfeed /home/user/openwrt/project/customfeed'' |+  - Update the feed: from the ''<buildroot dir>'' (e.g. ''/home/user/openwrt'') do: <code>./scripts/feeds update custom</code> 
 +  - And then install it <code>./scripts/feeds install -a -p custom</code>
  
-  - Update the feed: from the ''<buildroot dir>'' (e.g. ''/home/user/openwrt/project/openwrt'') do: <code>./scripts/feeds update customfeed</code> + 
-  - And then install it <code>./scripts/feeds install -p customfeed</code>+==== Using the feed ====
   - Now your package(s) should be available when you do <code>make menuconfig</code>   - Now your package(s) should be available when you do <code>make menuconfig</code>
  
Line 185: Line 173:
  
 ==== Documentation ==== ==== Documentation ====
-  - [[docs:guide-developer:build-system:start|OpenWrt Buildroot – About]] +  - [[docs:guide-developer:toolchain:start|OpenWrt Buildroot – About]] 
-  - [[docs:guide-developer:build-system:install-buildsystem|OpenWrt Buildroot – Installation]] +  - [[docs:guide-developer:toolchain:install-buildsystem|OpenWrt Buildroot – Installation]] 
-  - [[docs:guide-developer:build-system:use-buildsystem|OpenWrt Buildroot – Usage]]+  - [[docs:guide-developer:toolchain:use-buildsystem|OpenWrt Buildroot – Usage]]
   - OpenWrt Buildroot – Feeds   - OpenWrt Buildroot – Feeds
   - [[docs:techref:buildroot|OpenWrt Buildroot – Technical Reference]] {{:meta:icons:tango:48px-construction.svg.png?nolink&16}} this article needs //your// attention.   - [[docs:techref:buildroot|OpenWrt Buildroot – Technical Reference]] {{:meta:icons:tango:48px-construction.svg.png?nolink&16}} this article needs //your// attention.
  • Last modified: 2019/04/27 21:22
  • by overdamped1