Updating OpenWrt Packages
From Qi-Hardware
When porting programs, there can be a need to update the various OpenWrt packages to support newer releases of upstream projects. Here are some notes about how this can be done.
- Identify the package to be updated and its location. You can try and find the OpenWrt package using the following command:
scripts/feeds search <package>
Its location will typically be somewhere of the form...
feeds/<feedname>/<section>/<package>
...also appearing at...
package/feeds/<feedname>/<package>
...for the purpose of performing
makecommands. - Attempt to update the OpenWrt packaging using the appropriate version control tool. For example:
svn update
- If you need to actually update the packaging yourself, first edit the
Makefileof the package. See below for details. - You might hope for the best and try and build at this point. If you're lucky, the upstream code either won't need patching or won't have changed enough to prevent the existing patches from applying.
- If the build failed, review any existing
patches, discarding obsolete patches, adjusting patches which will no longer apply but which still need applying. Additional patches may also be needed if new problems have been introduced.
[edit] Editing the Makefile
You may already know which release of a project you need, but sometimes it is necessary to find out which releases are available. Some download locations can be found in the scripts/download.pl file, and by looking at PKG_SOURCE_URL in the Makefile, you should be able to deduce where OpenWrt will look for upstream code archives. You can then browse those archives for suitable releases.
- Change
PKG_VERSIONto the desired release. - Change
PKG_RELEASEto1(as this is probably the first attempt at packaging the release). - Change
PKG_SOURCE_URLto incorporate the release number. - Comment out
PKG_MD5SUMso that OpenWrt doesn't think that the download has failed. Once a download has been made, you can then verify the integrity of the download in thedldirectory and then re-add this checksum to theMakefile.
[edit] Useful Resources
- http://patchwork.openwrt.org/patch/2524/ - a patch that seems to fix various
pkg-configpath issues