Updating OpenWrt Packages

From Qi-Hardware
Jump to: navigation, search

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.

  1. 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 make commands.

  2. Attempt to update the OpenWrt packaging using the appropriate version control tool. For example:
    svn update
  3. If you need to actually update the packaging yourself, first edit the Makefile of the package. See below for details.
  4. 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.
  5. 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.

  1. Change PKG_VERSION to the desired release.
  2. Change PKG_RELEASE to 1 (as this is probably the first attempt at packaging the release).
  3. Change PKG_SOURCE_URL to incorporate the release number.
  4. Comment out PKG_MD5SUM so 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 the dl directory and then re-add this checksum to the Makefile.

[edit] Useful Resources

Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export